Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef QTXGRIDBOX_H
00024 #define QTXGRIDBOX_H
00025
00026 #include "Qtx.h"
00027
00028 #include <QWidget>
00029
00030 class QGridLayout;
00031
00032 class QTX_EXPORT QtxGridBox : public QWidget
00033 {
00034 Q_OBJECT
00035
00036 class Space;
00037
00038 public:
00039 QtxGridBox( QWidget* = 0, const int = 5, const int = 5 );
00040 QtxGridBox( const int, Qt::Orientation, QWidget* = 0, const int = 5, const int = 5 );
00041 virtual ~QtxGridBox();
00042
00043 int columns() const;
00044 Qt::Orientation orientation() const;
00045
00046 void setColumns( const int );
00047 void setOrientation( Qt::Orientation );
00048
00049 void setLayout( const int, Qt::Orientation );
00050
00051 bool skipInvisible() const;
00052 void setSkipInvisible( const bool );
00053
00054 void addSpace( const int );
00055
00056 int insideMargin() const;
00057 int insideSpacing() const;
00058 void setInsideMargin( const int );
00059 void setInsideSpacing( const int );
00060
00061 virtual bool eventFilter( QObject*, QEvent* );
00062
00063 protected:
00064 void childEvent( QChildEvent* );
00065
00066 private:
00067 void skip();
00068 void arrangeWidgets();
00069 void placeWidget( QWidget* );
00070
00071 private:
00072 int myCols;
00073 bool mySkip;
00074 Qt::Orientation myOrient;
00075 QGridLayout* myLayout;
00076
00077 int myCol, myRow;
00078 };
00079
00080 #endif