LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
flowlayout.h
Go to the documentation of this file.
1 /**********************************************************************
2  * LeechCraft - modular cross-platform feature rich internet client.
3  * Copyright (C) 2006-2014 Georg Rudoy
4  *
5  * Distributed under the Boost Software License, Version 1.0.
6  * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7  **********************************************************************/
8 
9 #pragma once
10 
11 #include <QLayout>
12 #include <QStyle>
13 #include "guiconfig.h"
14 
15 namespace LC::Util
16 {
24  class UTIL_GUI_API FlowLayout final : public QLayout
25  {
26  QList<QLayoutItem*> ItemList_;
27  int HSpace_;
28  int VSpace_;
29  public:
30  explicit FlowLayout (QWidget*, int = -1, int = -1, int = -1);
31  explicit FlowLayout (int = -1, int = -1, int = -1);
32  ~FlowLayout () override;
33 
34  void addItem (QLayoutItem*) override;
35 
36  int horizontalSpacing () const;
37  int verticalSpacing () const;
38 
39  Qt::Orientations expandingDirections () const override;
40  bool hasHeightForWidth () const override;
41  int heightForWidth (int) const override;
42  int count () const override;
43  QLayoutItem* itemAt (int) const override;
44  QLayoutItem* takeAt (int) override;
45  QSize minimumSize () const override;
46  void setGeometry (const QRect&) override;
47  QSize sizeHint () const override;
48  private:
49  int DoLayout (const QRect&, bool) const;
50  int SmartSpacing (QStyle::PixelMetric) const;
51  };
52 }
QList< QLayoutItem * >
LC::Util
Definition: icoreproxy.h:33
LC::Util::oral::sph::count
constexpr detail::AggregateType< detail::AggregateFunction::Count, Ptr > count
Definition: oral.h:966
UTIL_GUI_API
#define UTIL_GUI_API
Definition: guiconfig.h:16
LC::Util::FlowLayout
A simple flow layout implementation.
Definition: flowlayout.h:30
guiconfig.h