2 ** Copyright (C) 1999,2000 Toivo Pedaste <toivo@ucs.uwa.edu.au>
4 // This widget is used to display information and the file list of a
7 // Package information will be displayed using (another) sub-widget
8 // that is inherited from a QTableView.
10 // The file list will be displayed using a tree list.
12 // The widget is mainly a QTabDialog with two tabs: Info and FileList.
13 // The Info tab is the default one.
17 ** This program is free software; you can redistribute it and/or modify
18 ** it under the terms of the GNU General Public License as published by
19 ** the Free Software Foundation; either version 2 of the License, or
20 ** (at your option) any later version.
22 ** This program is distributed in the hope that it will be useful,
23 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
24 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ** GNU General Public License for more details.
27 ** You should have received a copy of the GNU General Public License
28 ** along with this program in a file called COPYING; if not, write to
29 ** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
30 ** MA 02110-1301, USA.
34 ** Bug reports and questions can be sent to kde-devel@kde.org
37 #ifndef PACKAGEDISPLAY_H
38 #define PACKAGEDISPLAY_H
41 #include <QtGui/QTabBar>
42 #include <QtGui/QTabWidget>
45 #include <QtGui/QPixmap>
47 #include <k3listview.h>
49 class packagePropertiesWidget
;
54 class packageDisplayWidget
;
55 class kpFileList
: public K3ListView
61 kpFileList(QWidget
* parent
, packageDisplayWidget
* parent2
);
62 virtual ~kpFileList() {}
63 QString
item2Path(Q3ListViewItem
*it
);
68 void openContext(K3ListView
*, Q3ListViewItem
*, const QPoint
&);
72 Q3ListViewItem
* insert(const QString
&cur
, const QPixmap
&pixmap
);
77 packageDisplayWidget
* pkDisplay
;
83 class packageDisplayWidget
: public QTabWidget
87 friend class kpFileList
;
88 ///////////// METHODS ------------------------------------------------------
90 packageDisplayWidget(QWidget
*parent
=0);
93 ~packageDisplayWidget();
97 // clear package display in right panel
99 void changePackage(packageInfo
*p
);
100 // Set currently selected package
104 // This sets up the sub-widgets
106 void updateFileList();
107 // This updates the file list to match that found with the currently
110 void updateDepends();
111 // Update dependency list
113 void updateChangeLog();
114 // This updates the change log to match that found with the currently
117 void tabSet(QWidget
*);
118 // Set display for corresponding tab
120 ///////////// SLOTS --------------------------------------------------------
123 void tabSelected(QWidget
*);
125 void openBinding(Q3ListViewItem
*);
127 void openBindingWith(Q3ListViewItem
*);
129 void __openBindingWith();
132 ///////////// SIGNALS ------------------------------------------------------
134 ///////////// DATA ---------------------------------------------------------
136 packageInfo
*package
;
137 // the currently selected package
144 KVBox
*proptab
, *deptab
, *fltab
, *cltab
;
147 // current active tab
149 kpFileList
*fileList
;
150 // This holds the file list (and is used as a page on the tab dialog)
152 QTextEdit
*changeLog
;
155 QPixmap tick
, cross
, question
, *blank
;
156 // The pixmaps for the filelist
158 packagePropertiesWidget
*packageProperties
;
159 // This displays the package properties (and is used as a page on the
162 packageDepends
*depends
;
163 // Dependency display in tab dialog
166 // True is file list has been initialised