kivio
kivio_layer_panel.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef KIVIOLAYERPANEL_H
00020 #define KIVIOLAYERPANEL_H
00021
00022 class KAction;
00023
00024 class KivioView;
00025 class KivioLayer;
00026
00027 #include <qlistview.h>
00028
00029 #include "kivio_layer_panel_base.h"
00030
00031 class KivioLayerItem: public QListViewItem
00032 {
00033 friend class KivioLayerPanel;
00034 public:
00035 KivioLayerItem(QListView* parent, KivioLayer*, int id);
00036 ~KivioLayerItem();
00037
00038 KivioLayer* layer() const { return data; }
00039
00040 protected:
00041 void update();
00042
00043 private:
00044 KivioLayer* data;
00045 };
00046
00047
00048
00049 class KivioLayerPanel : public KivioLayerPanelBase
00050 {
00051 Q_OBJECT
00052 public:
00053 KivioLayerPanel(KivioView* view, QWidget* parent=0, const char* name=0);
00054 ~KivioLayerPanel();
00055
00056 bool eventFilter(QObject*, QEvent*);
00057
00058 public slots:
00059 void reset();
00060
00061 protected slots:
00062 void addItem();
00063 void removeItem();
00064 void renameItem();
00065 void upItem();
00066 void downItem();
00067
00068 void itemClicked(QListViewItem*, const QPoint&, int);
00069 void itemActivated(QListViewItem*);
00070 void updateButtons(QListViewItem*);
00071
00072 private:
00073 KivioView* m_pView;
00074
00075 KAction* actNew;
00076 KAction* actDel;
00077 KAction* actRename;
00078 KAction* actUp;
00079 KAction* actDown;
00080
00081 int id;
00082 };
00083
00084 #endif
|