summaryrefslogtreecommitdiff
authorandyq <andyq>2002-10-16 18:59:07 (UTC)
committer andyq <andyq>2002-10-16 18:59:07 (UTC)
commit5d3fda975262b1bf406415c3f27ffd71af126304 (patch) (unidiff)
treebd42d40d99ca1bea8bff37faafacbd3dcd20b9b8
parent0feff4043ce813c63e501d6bbd3114e7fcfd8ce6 (diff)
downloadopie-5d3fda975262b1bf406415c3f27ffd71af126304.zip
opie-5d3fda975262b1bf406415c3f27ffd71af126304.tar.gz
opie-5d3fda975262b1bf406415c3f27ffd71af126304.tar.bz2
Now displays an about box (only the version is shown)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp
index 5de4dc9..206d11c 100644
--- a/noncore/settings/aqpkg/mainwin.cpp
+++ b/noncore/settings/aqpkg/mainwin.cpp
@@ -1,43 +1,44 @@
1/*************************************************************************** 1/***************************************************************************
2 mainwin.cpp - description 2 mainwin.cpp - description
3 ------------------- 3 -------------------
4 begin : Mon Aug 26 13:32:30 BST 2002 4 begin : Mon Aug 26 13:32:30 BST 2002
5 copyright : (C) 2002 by Andy Qua 5 copyright : (C) 2002 by Andy Qua
6 email : andy.qua@blueyonder.co.uk 6 email : andy.qua@blueyonder.co.uk
7 ***************************************************************************/ 7 ***************************************************************************/
8 8
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or * 13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. * 14 * (at your option) any later version. *
15 * * 15 * *
16 ***************************************************************************/ 16 ***************************************************************************/
17 17
18#include <qmenubar.h> 18#include <qmenubar.h>
19#include <qpopupmenu.h> 19#include <qpopupmenu.h>
20#include <qmessagebox.h>
20 21
21#include "mainwin.h" 22#include "mainwin.h"
22#include "datamgr.h" 23#include "datamgr.h"
23#include "networkpkgmgr.h" 24#include "networkpkgmgr.h"
24#include "settingsimpl.h" 25#include "settingsimpl.h"
25#include "helpwindow.h" 26#include "helpwindow.h"
26#include "global.h" 27#include "global.h"
27 28
28MainWindow :: MainWindow( QWidget *p, char *name ) 29MainWindow :: MainWindow( QWidget *p, char *name )
29 :QMainWindow( p, name ) 30 :QMainWindow( p, name )
30{ 31{
31#ifdef QWS 32#ifdef QWS
32 showMaximized(); 33 showMaximized();
33#endif 34#endif
34 35
35 setCaption( "AQPkg - Package Manager" ); 36 setCaption( "AQPkg - Package Manager" );
36 37
37 // Create our menu 38 // Create our menu
38 QPopupMenu *help = new QPopupMenu( this ); 39 QPopupMenu *help = new QPopupMenu( this );
39 help->insertItem( "&General", this, SLOT(displayHelp()), Qt::CTRL+Qt::Key_H ); 40 help->insertItem( "&General", this, SLOT(displayHelp()), Qt::CTRL+Qt::Key_H );
40 help->insertItem( "&About", this, SLOT(displayAbout()), Qt::CTRL+Qt::Key_A ); 41 help->insertItem( "&About", this, SLOT(displayAbout()), Qt::CTRL+Qt::Key_A );
41 42
42 QPopupMenu *settings = new QPopupMenu( this ); 43 QPopupMenu *settings = new QPopupMenu( this );
43 settings->insertItem( "&Settings", this, SLOT(displaySettings()), Qt::CTRL+Qt::Key_S ); 44 settings->insertItem( "&Settings", this, SLOT(displaySettings()), Qt::CTRL+Qt::Key_S );
@@ -60,26 +61,26 @@ MainWindow :: MainWindow( QWidget *p, char *name )
60} 61}
61 62
62MainWindow :: ~MainWindow() 63MainWindow :: ~MainWindow()
63{ 64{
64 delete networkPkgWindow; 65 delete networkPkgWindow;
65} 66}
66 67
67void MainWindow :: displaySettings() 68void MainWindow :: displaySettings()
68{ 69{
69 SettingsImpl *dlg = new SettingsImpl( mgr, this, "Settings", true ); 70 SettingsImpl *dlg = new SettingsImpl( mgr, this, "Settings", true );
70 if ( dlg->showDlg( 0 ) ) 71 if ( dlg->showDlg( 0 ) )
71 networkPkgWindow->updateData(); 72 networkPkgWindow->updateData();
72 delete dlg; 73 delete dlg;
73} 74}
74 75
75void MainWindow :: displayHelp() 76void MainWindow :: displayHelp()
76{ 77{
77 HelpWindow *dlg = new HelpWindow( this ); 78 HelpWindow *dlg = new HelpWindow( this );
78 dlg->exec(); 79 dlg->exec();
79 delete dlg; 80 delete dlg;
80} 81}
81 82
82void MainWindow :: displayAbout() 83void MainWindow :: displayAbout()
83{ 84{
84 85 QMessageBox::about( this, "About AQPkg", VERSION_TEXT );
85} 86}