2 ** Copyright (C) 2007 Toivo Pedaste <toivo@ucs.uwa.edu.au>
4 ** This is the main widget for kpackage
5 ** The whole widget is a DND drop zone where users can drop packages to
10 ** This program is free software; you can redistribute it and/or modify
11 ** it under the terms of the GNU General Public License as published by
12 ** the Free Software Foundation; either version 2 of the License, or
13 ** (at your option) any later version.
15 ** This program is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ** GNU General Public License for more details.
20 ** You should have received a copy of the GNU General Public License
21 ** along with this program in a file called COPYING; if not, write to
22 ** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
23 ** MA 02110-1301, USA.
27 ** Bug reports and questions can be sent to kde-devel@kde.org
35 #include <kxmlguiwindow.h>
37 #include <ksharedconfig.h>
38 #include <QtGui/QDragEnterEvent>
39 #include <QtGui/QLabel>
40 #include <QtGui/QFrame>
41 #include <QtGui/QResizeEvent>
42 #include <QtGui/QDropEvent>
43 #include <QtGui/QCloseEvent>
47 class KRecentFilesAction
;
52 //////////////////////////////////////////////////////////////////////////////
53 //////////////////////////////////////////////////////////////////////////////
55 class KPKG
: public KXmlGuiWindow
71 KPKG(const KSharedConfigPtr
&_config
);
74 void add_recent_file(const QString
&newfile
);
75 // keep list of files accessed
77 void add_recent_host(const QString
&newhost
);
79 void createSettings();
80 // Edit settings dialog
83 // write config settings
85 void saveProperties(KConfigGroup
& config
);
86 void readProperties(const KConfigGroup
& config
);
87 // save and read restart sstate
91 // enable/deisable menu elements
95 void disablePrevious();
96 void enablePrevious();
97 // Control next and previous commands
101 // indicates a restart from saved state
103 Options
*optiondialog
;
106 KSharedConfigPtr config
;
107 // Saved config information
115 // This sets up the menubar
121 QAction
*kpack_reload
;
124 QAction
*pack_install
;
125 QAction
*pack_uninstall
;
127 KConfigGroup
*fgroup
;
128 KConfigGroup
*hgroup
;
130 int toolID
, selectID
;
131 // refrences to toolbar and menu items
134 // don't display toolbar
136 KRecentFilesAction
*recent
;
137 KRecentFilesAction
*recentHosts
;
143 void openRecentHost(const KUrl
& url
);
145 void openRecent(const KUrl
& url
);
146 // opens file from list of recently opened ones
154 void configureToolBars();
156 void updateConfiguration();
163 void slotNewToolbarConfig();
166 void closeEvent ( QCloseEvent
*e
);
171 //////////////////////////////////////////////////////////////////////////////