kplato

kptresourcespanel.h
1/* This file is part of the KDE project
2 Copyright (C) 2003 Thomas Zander <zander@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KPTPRESOURCESPANEL_H
21#define KPTPRESOURCESPANEL_H
22
23#include "kptresource.h"
24#include "resourcespanelbase.h"
25
26#include <tqlistbox.h>
27#include <tqstring.h>
28
29class TQListViewItem;
30class KCommand;
31
32namespace KPlato
33{
34
35class Project;
36class GroupItem;
37class ResourcesPanelResourceItem;
38class ResourcesPanelGroupLVItem;
39class Part;
40
41class ResourcesPanel : public ResourcesPanelBase {
42 TQ_OBJECT
43
44public:
45 ResourcesPanel (TQWidget *parent, Project *project);
46
47 bool ok();
48 KCommand *buildCommand(Part *part);
49
50 void sendChanged();
51
52 void renameStopped(TQListViewItem* item);
53
54protected slots:
55 void slotAddGroup();
56 void slotDeleteGroup();
57
58 void slotAddResource();
59 void slotEditResource();
60 void slotDeleteResource();
61
62 void slotGroupChanged(TQListViewItem *item);
63 void slotGroupChanged();
64 void slotResourceRename(const TQString &newName);
65 void slotResourceChanged( TQListBoxItem*);
66 void slotCurrentChanged( TQListBoxItem*);
67
68 void slotListDoubleClicked(TQListViewItem*, const TQPoint&, int);
69 void slotItemRenamed(TQListViewItem *item, int col);
70 void slotRenameStarted(TQListViewItem *item, int col);
71 void slotStartRename(TQListViewItem *item, int col);
72signals:
73 void changed();
74 void selectionChanged();
75 void startRename(TQListViewItem *item, int col);
76 void renameStarted(TQListViewItem *item, int col);
77
78private:
79 Project *project;
80 ResourcesPanelGroupLVItem *m_groupItem;
81
82 TQPtrList<GroupItem> m_groupItems;
83 TQPtrList<GroupItem> m_deletedGroupItems;
84
85 bool m_blockResourceRename;
86 TQListViewItem *m_renameItem;
87};
88
89} //KPlato namespace
90
91#endif // PRESOURCESPANEL_H
Project is the main node in a project, it contains child nodes and possibly sub-projects.
Definition kptproject.h:52