Vesna
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TextMessagePredefinedAnswersLayout.h
Go to the documentation of this file.
1 #ifndef TEXTMESSAGEPREDEFINEDANSWERSLAYOUT_H
2 #define TEXTMESSAGEPREDEFINEDANSWERSLAYOUT_H
3 
4 #include <QLayout>
5 #include <QRect>
6 #include <QStyle>
7 
8 class TextMessagePredefinedAnswersLayout : public QLayout
9 {
10 public:
11  explicit TextMessagePredefinedAnswersLayout( QWidget *parent, int hMargin = -1, int vMargin = -1, int spacing = -1 );
12  explicit TextMessagePredefinedAnswersLayout( int hMargin = -1, int vMargin = -1, int spacing = -1 );
14 
15  void addItem( QLayoutItem *item ) override;
16  int horizontalSpacing() const;
17  int verticalSpacing() const;
18  Qt::Orientations expandingDirections() const override;
19  bool hasHeightForWidth() const override;
20  int heightForWidth( int width ) const override;
21  int count() const override;
22  QLayoutItem *itemAt( int index ) const override;
23  QSize minimumSize() const override;
24  void setGeometry( const QRect &rect ) override;
25  QSize sizeHint() const override;
26  QLayoutItem *takeAt( int index ) override;
27 
28 private:
30 
31  int doLayout( const QRect &rect, bool testOnly ) const;
32  int smartSpacing( QStyle::PixelMetric pm ) const;
33 
34  class DataClass;
35  QScopedPointer<DataClass> d;
36 
38 };
39 
40 #endif // TEXTMESSAGEPREDEFINEDANSWERSLAYOUT_H
Definition: TextMessagePredefinedAnswersLayout.h:8
void addItem(QLayoutItem *item) override
Definition: TextMessagePredefinedAnswersLayout.cpp:43
QSize minimumSize() const override
Definition: TextMessagePredefinedAnswersLayout.cpp:95
int horizontalSpacing() const
Definition: TextMessagePredefinedAnswersLayout.cpp:48
TextMessagePredefinedAnswersLayout(QWidget *parent, int hMargin=-1, int vMargin=-1, int spacing=-1)
Definition: TextMessagePredefinedAnswersLayout.cpp:21
~TextMessagePredefinedAnswersLayout()
Definition: TextMessagePredefinedAnswersLayout.cpp:34
QLayoutItem * itemAt(int index) const override
Definition: TextMessagePredefinedAnswersLayout.cpp:90
QSize sizeHint() const override
Definition: TextMessagePredefinedAnswersLayout.cpp:116
Qt::Orientations expandingDirections() const override
Definition: TextMessagePredefinedAnswersLayout.cpp:68
int verticalSpacing() const
Definition: TextMessagePredefinedAnswersLayout.cpp:58
void setGeometry(const QRect &rect) override
Definition: TextMessagePredefinedAnswersLayout.cpp:110
bool hasHeightForWidth() const override
Definition: TextMessagePredefinedAnswersLayout.cpp:73
int count() const override
Definition: TextMessagePredefinedAnswersLayout.cpp:85
int heightForWidth(int width) const override
Definition: TextMessagePredefinedAnswersLayout.cpp:78
QLayoutItem * takeAt(int index) override
Definition: TextMessagePredefinedAnswersLayout.cpp:121