kivio
kiviostencilsetaction.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KIVIOSTENCILSETACTION_H
00022 #define KIVIOSTENCILSETACTION_H
00023
00024
00025 #include <kaction.h>
00026
00027 #include <qptrlist.h>
00028 #include <qvaluelist.h>
00029 #include <qstringlist.h>
00030
00031 class KPopupMenu;
00032 class QPixmap;
00033
00034 class KivioStencilSetAction : public KAction
00035 {
00036 Q_OBJECT
00037 public:
00038 KivioStencilSetAction(const QString &text, const QString &pix,
00039 KActionCollection *parent, const char *name);
00040
00041 virtual ~KivioStencilSetAction();
00042
00043 KPopupMenu* popupMenu() const;
00044 void popup( const QPoint& global );
00045
00046 virtual int plug( QWidget* widget, int index = -1 );
00047
00048 public slots:
00049 void updateMenu();
00050
00051 protected slots:
00052 void slotActivated(int);
00053
00054 signals:
00055 void activated( const QString& );
00056 void showDialog();
00057
00058 protected:
00059 QPixmap dirtPixmap( const QString& dir );
00060 void loadCollections( const QString& rootDirStr );
00061 void loadSet( KPopupMenu* menu, const QString& rootDirStr );
00062 void clearCollectionMenuList();
00063
00064 protected:
00065 KPopupMenu* m_popup;
00066 uint m_ssId;
00067 QPtrList<QString> m_pathList;
00068 QStringList m_collectionIdList;
00069 QValueList<KPopupMenu*> m_collectionMenuList;
00070 };
00071
00072 #endif
|