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
00024
00025
00026 #ifndef QTXLISTACTION_H
00027 #define QTXLISTACTION_H
00028
00029 #include "Qtx.h"
00030 #include "QtxAction.h"
00031 #include <QStringList>
00032
00033 #ifdef WIN32
00034 #pragma warning( disable:4251 )
00035 #endif
00036
00037 class QTX_EXPORT QtxListAction : public QtxAction
00038 {
00039 Q_OBJECT
00040
00041 class ListFrame;
00042 class ListWidget;
00043 class ScrollEvent;
00044
00045 public:
00047 enum {
00048 Item,
00049 SubMenu
00050 } PopupMode;
00051
00052 public:
00053 QtxListAction( QObject* = 0 );
00054 QtxListAction( const QString&, int, QObject* );
00055 QtxListAction( const QString&, const QString&, int, QObject* );
00056 QtxListAction( const QIcon&, const QString&, int, QObject* );
00057 QtxListAction( const QString&, const QIcon&, const QString&, int, QObject* );
00058 virtual ~QtxListAction();
00059
00060 int popupMode() const;
00061 void setPopupMode( const int );
00062
00063 QStringList names() const;
00064 void addNames( const QStringList&, bool = true );
00065 void setComment( const QString&, const QString& = QString() );
00066
00067 int linesNumber() const;
00068 int charsNumber() const;
00069
00070 void setLinesNumber( const int );
00071 void setCharsNumber( const int );
00072
00073 signals:
00074 void triggered( int );
00075
00076 private slots:
00077 void onChanged();
00078 void onMultiple( const int );
00079 void onSingle( bool = false );
00080 void onTriggered( bool = false );
00081
00082 protected:
00083 virtual QWidget* createWidget( QWidget* );
00084 virtual void deleteWidget( QWidget* );
00085
00086 private:
00087 void initialize();
00088
00089 private:
00090 ListFrame* myFrame;
00091
00092 friend class QtxListAction::ListFrame;
00093 };
00094
00095 #ifdef WIN32
00096 #pragma warning( default:4251 )
00097 #endif
00098
00099 #endif