kplato
kptresourcespanel.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KPTPRESOURCESPANEL_H
00021 #define KPTPRESOURCESPANEL_H
00022
00023 #include "kptresource.h"
00024 #include "resourcespanelbase.h"
00025
00026 #include <qlistbox.h>
00027 #include <qstring.h>
00028
00029 class QListViewItem;
00030 class KCommand;
00031
00032 namespace KPlato
00033 {
00034
00035 class Project;
00036 class GroupItem;
00037 class ResourcesPanelResourceItem;
00038 class ResourcesPanelGroupLVItem;
00039 class Part;
00040
00041 class ResourcesPanel : public ResourcesPanelBase {
00042 Q_OBJECT
00043 public:
00044 ResourcesPanel (QWidget *parent, Project *project);
00045
00046 bool ok();
00047 KCommand *buildCommand(Part *part);
00048
00049 void sendChanged();
00050
00051 void renameStopped(QListViewItem* item);
00052
00053 protected slots:
00054 void slotAddGroup();
00055 void slotDeleteGroup();
00056
00057 void slotAddResource();
00058 void slotEditResource();
00059 void slotDeleteResource();
00060
00061 void slotGroupChanged(QListViewItem *item);
00062 void slotGroupChanged();
00063 void slotResourceRename(const QString &newName);
00064 void slotResourceChanged( QListBoxItem*);
00065 void slotCurrentChanged( QListBoxItem*);
00066
00067 void slotListDoubleClicked(QListViewItem*, const QPoint&, int);
00068 void slotItemRenamed(QListViewItem *item, int col);
00069 void slotRenameStarted(QListViewItem *item, int col);
00070 void slotStartRename(QListViewItem *item, int col);
00071 signals:
00072 void changed();
00073 void selectionChanged();
00074 void startRename(QListViewItem *item, int col);
00075 void renameStarted(QListViewItem *item, int col);
00076
00077 private:
00078 Project *project;
00079 ResourcesPanelGroupLVItem *m_groupItem;
00080
00081 QPtrList<GroupItem> m_groupItems;
00082 QPtrList<GroupItem> m_deletedGroupItems;
00083
00084 bool m_blockResourceRename;
00085 QListViewItem *m_renameItem;
00086 };
00087
00088 }
00089
00090 #endif // PRESOURCESPANEL_H
|