summaryrefslogtreecommitdiff
path: root/noncore
authormickeyl <mickeyl>2003-12-07 13:51:01 (UTC)
committer mickeyl <mickeyl>2003-12-07 13:51:01 (UTC)
commitc648101ca50a9782911b58b5158b31e1d0427ab3 (patch) (unidiff)
tree0fcf5801e23d95e071c7f1b62230c5b15c6256ea /noncore
parent2d793ca674944241480f6939814e3f61d0a0e0fb (diff)
downloadopie-c648101ca50a9782911b58b5158b31e1d0427ab3.zip
opie-c648101ca50a9782911b58b5158b31e1d0427ab3.tar.gz
opie-c648101ca50a9782911b58b5158b31e1d0427ab3.tar.bz2
s/QPEMenuBar/QMenuBar:
- remove usage of deprecated classses - makes it easier to migrate to OMenuBar in the future
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/brightnessapplet/.cvsignore4
-rw-r--r--noncore/apps/checkbook/mainwindow.cpp2
-rw-r--r--noncore/apps/confedit/mainwindow.cpp6
-rw-r--r--noncore/apps/opie-bartender/bartender.cpp2
-rw-r--r--noncore/apps/opie-reader/QTReaderApp.cpp2
-rw-r--r--noncore/apps/opie-reader/QTReaderApp.h4
-rw-r--r--noncore/apps/opie-sheet/mainwindow.cpp2
-rw-r--r--noncore/apps/opie-sheet/mainwindow.h4
-rwxr-xr-xnoncore/apps/qashmoney/budgetdisplay.cpp2
-rwxr-xr-xnoncore/apps/qashmoney/budgetdisplay.h4
-rwxr-xr-xnoncore/apps/qashmoney/qashmoney.cpp2
-rwxr-xr-xnoncore/apps/qashmoney/qashmoney.h4
-rw-r--r--noncore/apps/tableviewer/tableviewer.cpp2
-rw-r--r--noncore/games/backgammon/backgammon.cpp2
-rw-r--r--noncore/games/fifteen/fifteen.cpp2
-rw-r--r--noncore/games/go/gowidget.cpp2
-rw-r--r--noncore/games/minesweep/minesweep.cpp2
-rw-r--r--noncore/games/solitaire/canvascardgame.h2
-rw-r--r--noncore/games/solitaire/canvascardwindow.cpp2
-rw-r--r--noncore/graphics/drawpad/drawpad.cpp2
-rw-r--r--noncore/multimedia/showimg/showimg.cpp2
-rw-r--r--noncore/multimedia/showimg/showimg.h6
-rw-r--r--noncore/net/opieftp/opieftp.cpp2
-rw-r--r--noncore/net/opieftp/opieftp.h2
-rw-r--r--noncore/net/opieirc/mainwindow.cpp2
-rw-r--r--noncore/net/wellenreiter/TODO15
-rw-r--r--noncore/unsupported/filebrowser/filebrowser.cpp4
-rw-r--r--noncore/unsupported/mail2/composerbase.cpp2
-rw-r--r--noncore/unsupported/mail2/composerbase.h4
-rw-r--r--noncore/unsupported/mail2/mainwindowbase.cpp2
-rw-r--r--noncore/unsupported/mail2/mainwindowbase.h4
-rw-r--r--noncore/unsupported/mail2/viewmailbase.cpp2
-rw-r--r--noncore/unsupported/mail2/viewmailbase.h4
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp4
34 files changed, 59 insertions, 50 deletions
diff --git a/noncore/applets/brightnessapplet/.cvsignore b/noncore/applets/brightnessapplet/.cvsignore
new file mode 100644
index 0000000..51d12e8
--- a/dev/null
+++ b/noncore/applets/brightnessapplet/.cvsignore
@@ -0,0 +1,4 @@
1Makefile*
2advancedconfigbase.cpp
3advancedconfigbase.h
4moc_*
diff --git a/noncore/apps/checkbook/mainwindow.cpp b/noncore/apps/checkbook/mainwindow.cpp
index bf00102..25f9910 100644
--- a/noncore/apps/checkbook/mainwindow.cpp
+++ b/noncore/apps/checkbook/mainwindow.cpp
@@ -21,97 +21,97 @@
21 -.   .:....=;==+<; General Public License along with this file; 21 -.   .:....=;==+<; General Public License along with this file;
22  -_. . .   )=.  = see the file COPYING. If not, write to the 22  -_. . .   )=.  = see the file COPYING. If not, write to the
23    --        :-=` Free Software Foundation, Inc., 23    --        :-=` Free Software Foundation, Inc.,
24 59 Temple Place - Suite 330, 24 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28 28
29#include "mainwindow.h" 29#include "mainwindow.h"
30#include "cbinfo.h" 30#include "cbinfo.h"
31#include "configuration.h" 31#include "configuration.h"
32#include "password.h" 32#include "password.h"
33#include "checkbook.h" 33#include "checkbook.h"
34#include "listedit.h" 34#include "listedit.h"
35 35
36#include <qpe/config.h> 36#include <qpe/config.h>
37#include <qpe/global.h> 37#include <qpe/global.h>
38#include <qpe/qpeapplication.h> 38#include <qpe/qpeapplication.h>
39#include <qpe/qpemenubar.h> 39#include <qpe/qpemenubar.h>
40#include <qpe/qpemessagebox.h> 40#include <qpe/qpemessagebox.h>
41#include <qpe/qpetoolbar.h> 41#include <qpe/qpetoolbar.h>
42#include <qpe/resource.h> 42#include <qpe/resource.h>
43 43
44#include <qaction.h> 44#include <qaction.h>
45#include <qcheckbox.h> 45#include <qcheckbox.h>
46#include <qdir.h> 46#include <qdir.h>
47#include <qlineedit.h> 47#include <qlineedit.h>
48#include <qwhatsthis.h> 48#include <qwhatsthis.h>
49 49
50 50
51MainWindow::MainWindow( QWidget* parent, const char* name, WFlags fl ) 51MainWindow::MainWindow( QWidget* parent, const char* name, WFlags fl )
52 : QMainWindow( parent, name, fl || WStyle_ContextHelp ) 52 : QMainWindow( parent, name, fl || WStyle_ContextHelp )
53{ 53{
54 setCaption( tr( "Checkbook" ) ); 54 setCaption( tr( "Checkbook" ) );
55 55
56 cbDir = Global::applicationFileName( "checkbook", "" ); 56 cbDir = Global::applicationFileName( "checkbook", "" );
57 lockIcon = Resource::loadPixmap( "locked" ); 57 lockIcon = Resource::loadPixmap( "locked" );
58 58
59 // Load configuration options 59 // Load configuration options
60 Config config( "checkbook" ); 60 Config config( "checkbook" );
61 _cfg.readConfig( config ); 61 _cfg.readConfig( config );
62 62
63 63
64 // Build menu and tool bars 64 // Build menu and tool bars
65 setToolBarsMovable( FALSE ); 65 setToolBarsMovable( FALSE );
66 66
67 QPEToolBar *bar = new QPEToolBar( this ); 67 QPEToolBar *bar = new QPEToolBar( this );
68 bar->setHorizontalStretchable( TRUE ); 68 bar->setHorizontalStretchable( TRUE );
69 QPEMenuBar *mb = new QPEMenuBar( bar ); 69 QMenuBar *mb = new QMenuBar( bar );
70 mb->setMargin( 0 ); 70 mb->setMargin( 0 );
71 QPopupMenu *popup = new QPopupMenu( this ); 71 QPopupMenu *popup = new QPopupMenu( this );
72 72
73 bar = new QPEToolBar( this ); 73 bar = new QPEToolBar( this );
74 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 ); 74 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 );
75 a->setWhatsThis( tr( "Click here to create a new checkbook.\n\nYou also can select New from the Checkbook menu." ) ); 75 a->setWhatsThis( tr( "Click here to create a new checkbook.\n\nYou also can select New from the Checkbook menu." ) );
76 connect( a, SIGNAL( activated() ), this, SLOT( slotNew() ) ); 76 connect( a, SIGNAL( activated() ), this, SLOT( slotNew() ) );
77 a->addTo( popup ); 77 a->addTo( popup );
78 a->addTo( bar ); 78 a->addTo( bar );
79 79
80 actionOpen = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null, 80 actionOpen = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null,
81 0, this, 0 ); 81 0, this, 0 );
82 actionOpen->setWhatsThis( tr( "Select a checkbook and then click here to edit it.\n\nYou also can select Edit from the Checkbook menu, or click and hold on a checkbook name." ) ); 82 actionOpen->setWhatsThis( tr( "Select a checkbook and then click here to edit it.\n\nYou also can select Edit from the Checkbook menu, or click and hold on a checkbook name." ) );
83 connect( actionOpen, SIGNAL( activated() ), this, SLOT( slotEdit() ) ); 83 connect( actionOpen, SIGNAL( activated() ), this, SLOT( slotEdit() ) );
84 actionOpen->addTo( popup ); 84 actionOpen->addTo( popup );
85 actionOpen->addTo( bar ); 85 actionOpen->addTo( bar );
86 86
87 actionDelete = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, 87 actionDelete = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null,
88 0, this, 0 ); 88 0, this, 0 );
89 actionDelete->setWhatsThis( tr( "Select a checkbook and then click here delete it.\n\nYou also can select Delete from the Checkbook menu." ) ); 89 actionDelete->setWhatsThis( tr( "Select a checkbook and then click here delete it.\n\nYou also can select Delete from the Checkbook menu." ) );
90 connect( actionDelete, SIGNAL( activated() ), this, SLOT( slotDelete() ) ); 90 connect( actionDelete, SIGNAL( activated() ), this, SLOT( slotDelete() ) );
91 actionDelete->addTo( popup ); 91 actionDelete->addTo( popup );
92 actionDelete->addTo( bar ); 92 actionDelete->addTo( bar );
93 93
94 popup->insertSeparator(); 94 popup->insertSeparator();
95 95
96 a = new QAction( tr( "Configure" ), Resource::loadPixmap( "SettingsIcon" ), QString::null, 0, this, 0 ); 96 a = new QAction( tr( "Configure" ), Resource::loadPixmap( "SettingsIcon" ), QString::null, 0, this, 0 );
97 a->setWhatsThis( tr( "Click here to configure this app." ) ); 97 a->setWhatsThis( tr( "Click here to configure this app." ) );
98 connect( a, SIGNAL( activated() ), this, SLOT( slotConfigure() ) ); 98 connect( a, SIGNAL( activated() ), this, SLOT( slotConfigure() ) );
99 a->addTo( popup ); 99 a->addTo( popup );
100 a->addTo( bar ); 100 a->addTo( bar );
101 101
102 mb->insertItem( tr( "Checkbook" ), popup ); 102 mb->insertItem( tr( "Checkbook" ), popup );
103 103
104 // Load Checkbook selection list 104 // Load Checkbook selection list
105 checkbooks = new CBInfoList(); 105 checkbooks = new CBInfoList();
106 106
107 QDir checkdir( cbDir ); 107 QDir checkdir( cbDir );
108 if (checkdir.exists() == true) 108 if (checkdir.exists() == true)
109 { 109 {
110 QStringList cblist = checkdir.entryList( "*.qcb", QDir::Files|QDir::Readable|QDir::Writable, 110 QStringList cblist = checkdir.entryList( "*.qcb", QDir::Files|QDir::Readable|QDir::Writable,
111 QDir::Time ); 111 QDir::Time );
112 CBInfo *cb = 0x0; 112 CBInfo *cb = 0x0;
113 QString filename; 113 QString filename;
114 114
115 for ( QStringList::Iterator it = cblist.begin(); it != cblist.end(); it++ ) 115 for ( QStringList::Iterator it = cblist.begin(); it != cblist.end(); it++ )
116 { 116 {
117 filename = cbDir; 117 filename = cbDir;
diff --git a/noncore/apps/confedit/mainwindow.cpp b/noncore/apps/confedit/mainwindow.cpp
index 58538af..4fe45ba 100644
--- a/noncore/apps/confedit/mainwindow.cpp
+++ b/noncore/apps/confedit/mainwindow.cpp
@@ -1,68 +1,62 @@
1/*************************************************************************** 1/***************************************************************************
2 * * 2 * *
3 * This program is free software; you can redistribute it and/or modify * 3 * This program is free software; you can redistribute it and/or modify *
4 * it under the terms of the GNU General Public License as published by * 4 * it under the terms of the GNU General Public License as published by *
5 * the Free Software Foundation; either version 2 of the License, or * 5 * the Free Software Foundation; either version 2 of the License, or *
6 * (at your option) any later version. * 6 * (at your option) any later version. *
7 * * 7 * *
8 ***************************************************************************/ 8 ***************************************************************************/
9 9
10// (c) 2002 Patrick S. Vogt <tille@handhelds.org> 10// (c) 2002 Patrick S. Vogt <tille@handhelds.org>
11 11
12 12
13#include "mainwindow.h" 13#include "mainwindow.h"
14 14
15#include <opie2/omenubar.h>
16#include <opie2/omessagebox.h>
17#include <opie2/oresource.h>
18#include <opie2/oconfig.h>
19#include <opie2/otoolbar.h>
20#include <opie2/oapplication.h>
21#include <qaction.h> 15#include <qaction.h>
22#include <qmessagebox.h> 16#include <qmessagebox.h>
23#include <qpopupmenu.h> 17#include <qpopupmenu.h>
24#include <qtoolbutton.h> 18#include <qtoolbutton.h>
25#include <qstring.h> 19#include <qstring.h>
26#include <qlabel.h> 20#include <qlabel.h>
27#include <qfile.h> 21#include <qfile.h>
28#include <qpushbutton.h> 22#include <qpushbutton.h>
29#include <qlayout.h> 23#include <qlayout.h>
30#include <qlineedit.h> 24#include <qlineedit.h>
31#include <qcursor.h> 25#include <qcursor.h>
32 26
33#include "listviewconfdir.h" 27#include "listviewconfdir.h"
34#include "listviewitemconf.h" 28#include "listviewitemconf.h"
35#include "listviewitemconfigentry.h" 29#include "listviewitemconfigentry.h"
36 30
37 31
38MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : 32MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) :
39 QMainWindow( parent, name, f ), _currentItem(0), _fileItem(0) 33 QMainWindow( parent, name, f ), _currentItem(0), _fileItem(0)
40{ 34{
41 setCaption( tr("Conf File Editor") ); 35 setCaption( tr("Conf File Editor") );
42 36
43 //setBaseSize( qApp->globalStrut() ); 37 //setBaseSize( qApp->globalStrut() );
44 setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));//, sizePolicy().hasHeightForWidth() ) ); 38 setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));//, sizePolicy().hasHeightForWidth() ) );
45 39
46 mainLayout = new QVBoxLayout( this ); 40 mainLayout = new QVBoxLayout( this );
47 mainLayout->setSpacing( 0 ); 41 mainLayout->setSpacing( 0 );
48 mainLayout->setMargin( 0 ); 42 mainLayout->setMargin( 0 );
49 43
50 44
51 qDebug("creating settingList"); 45 qDebug("creating settingList");
52 settingList = new ListViewConfDir( QDir::homeDirPath() + "/Settings", this, "settingslist"); 46 settingList = new ListViewConfDir( QDir::homeDirPath() + "/Settings", this, "settingslist");
53 settingList->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));//, sizePolicy().hasHeightForWidth() ) ); 47 settingList->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));//, sizePolicy().hasHeightForWidth() ) );
54 mainLayout->addWidget( settingList, 0); 48 mainLayout->addWidget( settingList, 0);
55 49
56 qDebug("creating editor"); 50 qDebug("creating editor");
57 editor = new EditWidget(this); 51 editor = new EditWidget(this);
58 editor->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Maximum));//, sizePolicy().hasHeightForWidth() ) ); 52 editor->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Maximum));//, sizePolicy().hasHeightForWidth() ) );
59 mainLayout->addWidget( editor, 1 ); 53 mainLayout->addWidget( editor, 1 );
60 editor->layoutType( ListViewItemConf::File ); 54 editor->layoutType( ListViewItemConf::File );
61 55
62 makeMenu(); 56 makeMenu();
63 57
64 connect(settingList, SIGNAL( pressed(QListViewItem*) ), 58 connect(settingList, SIGNAL( pressed(QListViewItem*) ),
65 this, SLOT(setCurrent(QListViewItem*))); 59 this, SLOT(setCurrent(QListViewItem*)));
66 connect( settingList, SIGNAL( clicked( QListViewItem* ) ), 60 connect( settingList, SIGNAL( clicked( QListViewItem* ) ),
67 this, SLOT( stopTimer( QListViewItem* ) ) ); 61 this, SLOT( stopTimer( QListViewItem* ) ) );
68 62
diff --git a/noncore/apps/opie-bartender/bartender.cpp b/noncore/apps/opie-bartender/bartender.cpp
index 5661ad5..3a0d8d1 100644
--- a/noncore/apps/opie-bartender/bartender.cpp
+++ b/noncore/apps/opie-bartender/bartender.cpp
@@ -22,97 +22,97 @@
22#include <opie/colorpopupmenu.h> 22#include <opie/colorpopupmenu.h>
23#include <qpe/qpeapplication.h> 23#include <qpe/qpeapplication.h>
24#include <qpe/resource.h> 24#include <qpe/resource.h>
25 25
26#include <qcstring.h> 26#include <qcstring.h>
27#include <qlineedit.h> 27#include <qlineedit.h>
28#include <qdir.h> 28#include <qdir.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30#include <qlistbox.h> 30#include <qlistbox.h>
31#include <qstringlist.h> 31#include <qstringlist.h>
32#include <qmultilineedit.h> 32#include <qmultilineedit.h>
33#include <qmessagebox.h> 33#include <qmessagebox.h>
34#include <qfile.h> 34#include <qfile.h>
35#include <qtextstream.h> 35#include <qtextstream.h>
36#include <qfile.h> 36#include <qfile.h>
37#include <qaction.h> 37#include <qaction.h>
38#include <qheader.h> 38#include <qheader.h>
39#include <qlistview.h> 39#include <qlistview.h>
40#include <qwidget.h> 40#include <qwidget.h>
41#include <qlayout.h> 41#include <qlayout.h>
42#include <qvariant.h> 42#include <qvariant.h>
43#include <qtooltip.h> 43#include <qtooltip.h>
44#include <qwhatsthis.h> 44#include <qwhatsthis.h>
45#include <qimage.h> 45#include <qimage.h>
46#include <qpixmap.h> 46#include <qpixmap.h>
47 47
48#include <fcntl.h> 48#include <fcntl.h>
49#include <unistd.h> 49#include <unistd.h>
50#include <stdlib.h> 50#include <stdlib.h>
51#include <stdio.h> 51#include <stdio.h>
52#include <errno.h> 52#include <errno.h>
53 53
54 54
55Bartender::Bartender( QWidget* parent, const char* name, WFlags fl ) 55Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
56 : QMainWindow( parent, name, fl ) { 56 : QMainWindow( parent, name, fl ) {
57 if ( !name ) 57 if ( !name )
58 setName( "Bartender" ); 58 setName( "Bartender" );
59 QGridLayout *layout = new QGridLayout( this ); 59 QGridLayout *layout = new QGridLayout( this );
60 layout->setSpacing( 2); 60 layout->setSpacing( 2);
61 layout->setMargin( 2); 61 layout->setMargin( 2);
62 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 62 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
63 63
64 setCaption( tr( "Bartender" ) ); 64 setCaption( tr( "Bartender" ) );
65 65
66 ToolBar1 = new QPEToolBar( this, "ToolBar1" ); 66 ToolBar1 = new QPEToolBar( this, "ToolBar1" );
67 ToolBar1->setFixedHeight(22); 67 ToolBar1->setFixedHeight(22);
68 layout->addMultiCellWidget( ToolBar1, 0, 0, 0, 4 ); 68 layout->addMultiCellWidget( ToolBar1, 0, 0, 0, 4 );
69 69
70 QPEMenuBar *menuBar = new QPEMenuBar( ToolBar1 ); 70 QMenuBar *menuBar = new QMenuBar( ToolBar1 );
71 QPopupMenu *fileMenu; 71 QPopupMenu *fileMenu;
72 fileMenu = new QPopupMenu( this); 72 fileMenu = new QPopupMenu( this);
73 menuBar->insertItem( tr("File"), fileMenu ); 73 menuBar->insertItem( tr("File"), fileMenu );
74 74
75 fileMenu->insertItem(tr("New Drink")); 75 fileMenu->insertItem(tr("New Drink"));
76 fileMenu->insertItem(tr("Open Drink")); 76 fileMenu->insertItem(tr("Open Drink"));
77 fileMenu->insertItem(tr("Find by Drink Name")); 77 fileMenu->insertItem(tr("Find by Drink Name"));
78 fileMenu->insertItem(tr("Find by Alcohol")); 78 fileMenu->insertItem(tr("Find by Alcohol"));
79 79
80 QPopupMenu *editMenu; 80 QPopupMenu *editMenu;
81 editMenu = new QPopupMenu( this); 81 editMenu = new QPopupMenu( this);
82 menuBar->insertItem( tr("Edit"), editMenu ); 82 menuBar->insertItem( tr("Edit"), editMenu );
83 editMenu->insertItem(tr("edit")); 83 editMenu->insertItem(tr("edit"));
84 84
85 connect( fileMenu, SIGNAL( activated(int) ), this, SLOT( fileMenuActivated(int) )); 85 connect( fileMenu, SIGNAL( activated(int) ), this, SLOT( fileMenuActivated(int) ));
86 connect( editMenu, SIGNAL( activated(int) ), this, SLOT( editMenuActivated(int) )); 86 connect( editMenu, SIGNAL( activated(int) ), this, SLOT( editMenuActivated(int) ));
87 87
88 88
89 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), "New", 0, this, 0 ); 89 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), "New", 0, this, 0 );
90 connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) ); 90 connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) );
91 a->addTo( ToolBar1 ); 91 a->addTo( ToolBar1 );
92 92
93 a = new QAction( tr( "Open" ), Resource::loadPixmap( "bartender/bartender_sm" ), "open", 0, this, 0 ); 93 a = new QAction( tr( "Open" ), Resource::loadPixmap( "bartender/bartender_sm" ), "open", 0, this, 0 );
94 connect( a, SIGNAL( activated() ), this, SLOT( openCurrentDrink() ) ); 94 connect( a, SIGNAL( activated() ), this, SLOT( openCurrentDrink() ) );
95 a->addTo( ToolBar1 ); 95 a->addTo( ToolBar1 );
96 96
97 a = new QAction( tr( "Find" ), Resource::loadPixmap( "find" ), "Find", 0, this, 0 ); 97 a = new QAction( tr( "Find" ), Resource::loadPixmap( "find" ), "Find", 0, this, 0 );
98 connect( a, SIGNAL( activated() ), this, SLOT( askSearch() ) ); 98 connect( a, SIGNAL( activated() ), this, SLOT( askSearch() ) );
99 a->addTo( ToolBar1 ); 99 a->addTo( ToolBar1 );
100 100
101 a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ),"Edit", 0, this, 0 ); 101 a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ),"Edit", 0, this, 0 );
102 connect( a, SIGNAL( activated() ), this, SLOT( doEdit() ) ); 102 connect( a, SIGNAL( activated() ), this, SLOT( doEdit() ) );
103 a->addTo( ToolBar1 ); 103 a->addTo( ToolBar1 );
104 104
105 QPushButton *t; 105 QPushButton *t;
106 t= new QPushButton( "BAC", ToolBar1, "bacButtin"); 106 t= new QPushButton( "BAC", ToolBar1, "bacButtin");
107 connect( t, SIGNAL( clicked() ), this, SLOT( doBac() ) ); 107 connect( t, SIGNAL( clicked() ), this, SLOT( doBac() ) );
108 108
109 DrinkView = new QListView( this, "DrinkView" ); 109 DrinkView = new QListView( this, "DrinkView" );
110 DrinkView->addColumn( tr( "Name of Drink" ) ); 110 DrinkView->addColumn( tr( "Name of Drink" ) );
111// DrinkView->setRootIsDecorated( TRUE ); 111// DrinkView->setRootIsDecorated( TRUE );
112 DrinkView->header()->hide(); 112 DrinkView->header()->hide();
113 113
114 QPEApplication::setStylusOperation( DrinkView->viewport(),QPEApplication::RightOnHold); 114 QPEApplication::setStylusOperation( DrinkView->viewport(),QPEApplication::RightOnHold);
115 115
116 connect(DrinkView, SIGNAL( doubleClicked(QListViewItem*)),this,SLOT(showDrink( QListViewItem*))); 116 connect(DrinkView, SIGNAL( doubleClicked(QListViewItem*)),this,SLOT(showDrink( QListViewItem*)));
117 connect(DrinkView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), 117 connect(DrinkView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)),
118 this,SLOT( showDrink(int, QListViewItem *, const QPoint&, int))); 118 this,SLOT( showDrink(int, QListViewItem *, const QPoint&, int)));
diff --git a/noncore/apps/opie-reader/QTReaderApp.cpp b/noncore/apps/opie-reader/QTReaderApp.cpp
index 087ce00..8c0d138 100644
--- a/noncore/apps/opie-reader/QTReaderApp.cpp
+++ b/noncore/apps/opie-reader/QTReaderApp.cpp
@@ -237,97 +237,97 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
237 } 237 }
238 else if (rot.contains("Rot180")) 238 else if (rot.contains("Rot180"))
239 { 239 {
240 m_rot = 180; 240 m_rot = 180;
241 } 241 }
242 else if (rot.contains("Rot270")) 242 else if (rot.contains("Rot270"))
243 { 243 {
244 m_rot = 270; 244 m_rot = 270;
245 } 245 }
246 246
247// qDebug("Initial Rotation(%d):%s", m_rot, (const char*)rot); 247// qDebug("Initial Rotation(%d):%s", m_rot, (const char*)rot);
248*/ 248*/
249 m_autogenstr = "^ *[A-Z].*[a-z] *$"; 249 m_autogenstr = "^ *[A-Z].*[a-z] *$";
250 250
251#ifdef USEQPE 251#ifdef USEQPE
252 setIcon( Resource::loadPixmap( PICDIR "uqtreader") ); 252 setIcon( Resource::loadPixmap( PICDIR "uqtreader") );
253#else 253#else
254 setIcon( QPixmap (PICDIR "uqtreader.png") ); 254 setIcon( QPixmap (PICDIR "uqtreader.png") );
255#endif /* USEQPE */ 255#endif /* USEQPE */
256 256
257// QPEToolBar *bar = new QPEToolBar( this ); 257// QPEToolBar *bar = new QPEToolBar( this );
258// menubar = new QPEToolBar( this ); 258// menubar = new QPEToolBar( this );
259#ifdef USEQPE 259#ifdef USEQPE
260 Config config( APPDIR ); 260 Config config( APPDIR );
261#else 261#else
262 QDir d = QDir::home(); // "/" 262 QDir d = QDir::home(); // "/"
263 if ( !d.cd(APPDIR) ) { // "/tmp" 263 if ( !d.cd(APPDIR) ) { // "/tmp"
264 qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); 264 qWarning( "Cannot find the \"~/" APPDIR "\" directory" );
265 d = QDir::home(); 265 d = QDir::home();
266 d.mkdir(APPDIR); 266 d.mkdir(APPDIR);
267 d.cd(APPDIR); 267 d.cd(APPDIR);
268 } 268 }
269 QFileInfo fi(d, INIFILE); 269 QFileInfo fi(d, INIFILE);
270// qDebug("Path:%s", (const char*)fi.absFilePath()); 270// qDebug("Path:%s", (const char*)fi.absFilePath());
271 Config config(fi.absFilePath()); 271 Config config(fi.absFilePath());
272#endif 272#endif
273 config.setGroup("Toolbar"); 273 config.setGroup("Toolbar");
274 m_tbmovesave = m_tbmove = config.readBoolEntry("Movable", false); 274 m_tbmovesave = m_tbmove = config.readBoolEntry("Movable", false);
275 m_tbpolsave = m_tbpol = (ToolbarPolicy)config.readNumEntry("Policy", 1); 275 m_tbpolsave = m_tbpol = (ToolbarPolicy)config.readNumEntry("Policy", 1);
276 m_tbposition = (ToolBarDock)config.readNumEntry("Position", 2); 276 m_tbposition = (ToolBarDock)config.readNumEntry("Position", 2);
277 menubar = new QToolBar("Menus", this, m_tbposition); 277 menubar = new QToolBar("Menus", this, m_tbposition);
278 278
279// fileBar = new QToolBar("File", this); 279// fileBar = new QToolBar("File", this);
280// QToolBar* viewBar = new QToolBar("File", this); 280// QToolBar* viewBar = new QToolBar("File", this);
281// QToolBar* navBar = new QToolBar("File", this); 281// QToolBar* navBar = new QToolBar("File", this);
282// QToolBar* markBar = new QToolBar("File", this); 282// QToolBar* markBar = new QToolBar("File", this);
283 283
284#ifdef USEQPE 284#ifdef USEQPE
285 mb = new QPEMenuBar( menubar ); 285 mb = new QMenuBar( menubar );
286#else 286#else
287 mb = new QMenuBar( menubar ); 287 mb = new QMenuBar( menubar );
288#endif 288#endif
289 289
290//#ifdef USEQPE 290//#ifdef USEQPE
291 QPopupMenu* tmp = new QPopupMenu(mb); 291 QPopupMenu* tmp = new QPopupMenu(mb);
292 mb->insertItem( geticon( "AppsIcon" ), tmp ); 292 mb->insertItem( geticon( "AppsIcon" ), tmp );
293//#else 293//#else
294// QMenuBar* tmp = mb; 294// QMenuBar* tmp = mb;
295//#endif 295//#endif
296 296
297 QPopupMenu *file = new QPopupMenu( mb ); 297 QPopupMenu *file = new QPopupMenu( mb );
298 tmp->insertItem( tr( "File" ), file ); 298 tmp->insertItem( tr( "File" ), file );
299 299
300 QPopupMenu *navigation = new QPopupMenu(mb); 300 QPopupMenu *navigation = new QPopupMenu(mb);
301 tmp->insertItem( tr( "Navigation" ), navigation ); 301 tmp->insertItem( tr( "Navigation" ), navigation );
302 302
303 QPopupMenu *view = new QPopupMenu( mb ); 303 QPopupMenu *view = new QPopupMenu( mb );
304 tmp->insertItem( tr( "View" ), view ); 304 tmp->insertItem( tr( "View" ), view );
305 305
306 QPopupMenu *marks = new QPopupMenu( this ); 306 QPopupMenu *marks = new QPopupMenu( this );
307 tmp->insertItem( tr( "Marks" ), marks ); 307 tmp->insertItem( tr( "Marks" ), marks );
308 308
309 QPopupMenu *settings = new QPopupMenu( this ); 309 QPopupMenu *settings = new QPopupMenu( this );
310 tmp->insertItem( tr( "Settings" ), settings ); 310 tmp->insertItem( tr( "Settings" ), settings );
311 311
312// addToolBar(menubar, "Menus",QMainWindow::Top); 312// addToolBar(menubar, "Menus",QMainWindow::Top);
313// addToolBar(fileBar, "Toolbar",QMainWindow::Top); 313// addToolBar(fileBar, "Toolbar",QMainWindow::Top);
314 314
315 // QPopupMenu *edit = new QPopupMenu( this ); 315 // QPopupMenu *edit = new QPopupMenu( this );
316 316
317 /* 317 /*
318 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 ); 318 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 );
319 connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) ); 319 connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) );
320 a->addTo( bar ); 320 a->addTo( bar );
321 a->addTo( file ); 321 a->addTo( file );
322 */ 322 */
323 323
324 editorStack = new QWidgetStack( this ); 324 editorStack = new QWidgetStack( this );
325 setCentralWidget( editorStack ); 325 setCentralWidget( editorStack );
326 326
327 searchVisible = FALSE; 327 searchVisible = FALSE;
328 regVisible = FALSE; 328 regVisible = FALSE;
329 m_fontVisible = false; 329 m_fontVisible = false;
330 330
331 m_annoWin = new CAnnoEdit(editorStack); 331 m_annoWin = new CAnnoEdit(editorStack);
332 editorStack->addWidget(m_annoWin, get_unique_id()); 332 editorStack->addWidget(m_annoWin, get_unique_id());
333 connect( m_annoWin, SIGNAL( finished(const QString&, const QString&) ), this, SLOT( addAnno(const QString&, const QString&) ) ); 333 connect( m_annoWin, SIGNAL( finished(const QString&, const QString&) ), this, SLOT( addAnno(const QString&, const QString&) ) );
diff --git a/noncore/apps/opie-reader/QTReaderApp.h b/noncore/apps/opie-reader/QTReaderApp.h
index 2765d47..86c14b1 100644
--- a/noncore/apps/opie-reader/QTReaderApp.h
+++ b/noncore/apps/opie-reader/QTReaderApp.h
@@ -1,96 +1,96 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qt Palmtop Environment. 4** This file is part of Qt Palmtop Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef __QTREADERAPP_H 20#ifndef __QTREADERAPP_H
21#define __QTREADERAPP_H 21#define __QTREADERAPP_H
22 22
23//#define _SCROLLPIPE 23//#define _SCROLLPIPE
24//#define __ISEARCH 24//#define __ISEARCH
25 25
26//#define MAX_ENCODING 6 26//#define MAX_ENCODING 6
27#define MAX_ACTIONS 5 27#define MAX_ACTIONS 5
28 28
29#include "useqpe.h" 29#include "useqpe.h"
30#include <sys/timeb.h> 30#include <sys/timeb.h>
31#include <qmainwindow.h> 31#include <qmainwindow.h>
32#include "CExpander.h" 32#include "CExpander.h"
33#include "CEncoding.h" 33#include "CEncoding.h"
34#include <qlist.h> 34#include <qlist.h>
35//#include <qpe/filemanager.h> 35//#include <qpe/filemanager.h>
36#include <qmap.h> 36#include <qmap.h>
37#include <qlineedit.h> 37#include <qlineedit.h>
38#include <qstack.h> 38#include <qstack.h>
39#include <qlistbox.h> 39#include <qlistbox.h>
40//#include "Queue.h" 40//#include "Queue.h"
41 41
42class QWidgetStack; 42class QWidgetStack;
43class QToolButton; 43class QToolButton;
44class QPopupMenu; 44class QPopupMenu;
45class QToolBar; 45class QToolBar;
46#ifdef USEQPE 46#ifdef USEQPE
47class QPEToolBar; 47class QPEToolBar;
48class QPEMenuBar; 48class QMenuBar;
49#endif 49#endif
50class CBkmkSelector; 50class CBkmkSelector;
51class QProgressBar; 51class QProgressBar;
52class QAction; 52class QAction;
53class CAnnoEdit; 53class CAnnoEdit;
54class QFloatBar; 54class QFloatBar;
55class CDrawBuffer; 55class CDrawBuffer;
56class QTReader; 56class QTReader;
57class QImage; 57class QImage;
58class Config; 58class Config;
59 59
60enum ActionTypes 60enum ActionTypes
61{ 61{
62 cesNone = 0, 62 cesNone = 0,
63 cesOpenFile, 63 cesOpenFile,
64 cesAutoScroll, 64 cesAutoScroll,
65 cesActionMark, 65 cesActionMark,
66 cesActionAnno, 66 cesActionAnno,
67 cesFullScreen, 67 cesFullScreen,
68 cesZoomIn, 68 cesZoomIn,
69 cesZoomOut, 69 cesZoomOut,
70 cesBack, 70 cesBack,
71 cesForward, 71 cesForward,
72 cesHome, 72 cesHome,
73 cesPageUp, 73 cesPageUp,
74 cesPageDown, 74 cesPageDown,
75 cesLineUp, 75 cesLineUp,
76 cesLineDown, 76 cesLineDown,
77 cesStartDoc, 77 cesStartDoc,
78 cesEndDoc 78 cesEndDoc
79}; 79};
80/* 80/*
81*m_preferences_action, *m_close_action *m_info_action, *m_touch_action, 81*m_preferences_action, *m_close_action *m_info_action, *m_touch_action,
82*m_find_action, *m_jump_action, *m_setfont_action *m_goto_action, 82*m_find_action, *m_jump_action, *m_setfont_action *m_goto_action,
83*m_delete_action; *m_autogen_action, *m_clear_action, *m_save_action; 83*m_delete_action; *m_autogen_action, *m_clear_action, *m_save_action;
84*m_tidy_action, *m_startBlock_action, *m_endBlock_action; 84*m_tidy_action, *m_startBlock_action, *m_endBlock_action;
85*m_setenc_action, *m_setmono_action; 85*m_setenc_action, *m_setmono_action;
86*/ 86*/
87enum ToolbarPolicy 87enum ToolbarPolicy
88{ 88{
89 cesSingle = 0, 89 cesSingle = 0,
90 cesMenuTool, 90 cesMenuTool,
91 cesMultiple 91 cesMultiple
92}; 92};
93 93
94enum regedit_type 94enum regedit_type
95{ 95{
96 cAutoGen, 96 cAutoGen,
@@ -338,97 +338,97 @@ private slots:
338#ifdef _SCRIPT 338#ifdef _SCRIPT
339 void SaveScript(const char* sname); 339 void SaveScript(const char* sname);
340#endif 340#endif
341/* 341/*
342 void setstate(unsigned char* _sd, unsigned short _sdlen); 342 void setstate(unsigned char* _sd, unsigned short _sdlen);
343 void getstate(unsigned char*& data, unsigned short& len); 343 void getstate(unsigned char*& data, unsigned short& len);
344*/ 344*/
345 void fileOpen2(); 345 void fileOpen2();
346 void readfilelist(); 346 void readfilelist();
347 void savefilelist(); 347 void savefilelist();
348 void updatefileinfo(); 348 void updatefileinfo();
349 bool openfrombkmk(Bkmk*); 349 bool openfrombkmk(Bkmk*);
350 QString m_targetapp, m_targetmsg; 350 QString m_targetapp, m_targetmsg;
351 bool listbkmk(CList<Bkmk>*, const QString& _lab = QString::null); 351 bool listbkmk(CList<Bkmk>*, const QString& _lab = QString::null);
352 QString usefilebrowser(); 352 QString usefilebrowser();
353 void do_regedit(); 353 void do_regedit();
354 void colorChanged( const QColor &c ); 354 void colorChanged( const QColor &c );
355 void clear(); 355 void clear();
356 void updateCaption(); 356 void updateCaption();
357 void do_autogen(const QString&); 357 void do_autogen(const QString&);
358 void do_addbkmk(const QString&); 358 void do_addbkmk(const QString&);
359 bool findNextBookmark(size_t start); 359 bool findNextBookmark(size_t start);
360 360
361 private: 361 private:
362 362
363 QAction* m_scrollButton; 363 QAction* m_scrollButton;
364 364
365 QAction* m_buttonAction[MAX_ACTIONS]; 365 QAction* m_buttonAction[MAX_ACTIONS];
366 366
367 CBkmkSelector* bkmkselector; 367 CBkmkSelector* bkmkselector;
368 368
369 ActionTypes m_spaceTarget, m_escapeTarget, m_returnTarget, m_leftTarget, m_rightTarget, 369 ActionTypes m_spaceTarget, m_escapeTarget, m_returnTarget, m_leftTarget, m_rightTarget,
370 m_upTarget, m_downTarget; 370 m_upTarget, m_downTarget;
371 bool m_leftScroll, m_rightScroll, m_upScroll, m_downScroll; 371 bool m_leftScroll, m_rightScroll, m_upScroll, m_downScroll;
372 bool m_bcloseDisabled, m_disableesckey; 372 bool m_bcloseDisabled, m_disableesckey;
373 size_t searchStart; 373 size_t searchStart;
374#ifdef __ISEARCH 374#ifdef __ISEARCH
375 QStack<searchrecord>* searchStack; 375 QStack<searchrecord>* searchStack;
376 bool dosearch(size_t start, CDrawBuffer& test, const QString& arg); 376 bool dosearch(size_t start, CDrawBuffer& test, const QString& arg);
377#else 377#else
378 bool dosearch(size_t start, CDrawBuffer& test, const QRegExp& arg); 378 bool dosearch(size_t start, CDrawBuffer& test, const QRegExp& arg);
379#endif 379#endif
380 QWidgetStack *editorStack; 380 QWidgetStack *editorStack;
381 QTReader* reader; 381 QTReader* reader;
382 QComboBox* m_fontSelector; 382 QComboBox* m_fontSelector;
383// QPEToolBar /* *menu,*/ *fileBar; 383// QPEToolBar /* *menu,*/ *fileBar;
384 QToolBar *menubar, *fileBar, *navBar, *viewBar, *markBar; 384 QToolBar *menubar, *fileBar, *navBar, *viewBar, *markBar;
385#ifdef USEQPE 385#ifdef USEQPE
386 QPEMenuBar *mb; 386 QMenuBar *mb;
387#else 387#else
388 QMenuBar *mb; 388 QMenuBar *mb;
389#endif 389#endif
390 QFloatBar *searchBar, *regBar/*, *m_fontBar*/; 390 QFloatBar *searchBar, *regBar/*, *m_fontBar*/;
391 QToolBar /* *searchBar, *regBar,*/ *m_fontBar; 391 QToolBar /* *searchBar, *regBar,*/ *m_fontBar;
392 QLineEdit *searchEdit, *regEdit; 392 QLineEdit *searchEdit, *regEdit;
393 bool searchVisible; 393 bool searchVisible;
394 bool regVisible; 394 bool regVisible;
395 bool m_fontVisible, m_twoTouch; 395 bool m_fontVisible, m_twoTouch;
396 bool bFromDocView; 396 bool bFromDocView;
397 static unsigned long m_uid; 397 static unsigned long m_uid;
398 long unsigned get_unique_id() { return m_uid++; } 398 long unsigned get_unique_id() { return m_uid++; }
399 /* 399 /*
400 void resizeEvent( QResizeEvent * r) 400 void resizeEvent( QResizeEvent * r)
401 { 401 {
402// qDebug("resize:(%u,%u)", r->oldSize().width(), r->oldSize().height()); 402// qDebug("resize:(%u,%u)", r->oldSize().width(), r->oldSize().height());
403// qDebug("resize:(%u,%u)", r->size().width(), r->size().height()); 403// qDebug("resize:(%u,%u)", r->size().width(), r->size().height());
404 // bgroup->move( width()-bgroup->width(), 0 ); 404 // bgroup->move( width()-bgroup->width(), 0 );
405 } 405 }
406 */ 406 */
407 CList<Bkmk>* pBkmklist; 407 CList<Bkmk>* pBkmklist;
408 CList<Bkmk>* pOpenlist; 408 CList<Bkmk>* pOpenlist;
409 infowin* m_infoWin; 409 infowin* m_infoWin;
410 GraphicWin* m_graphicwin; 410 GraphicWin* m_graphicwin;
411 QProgressBar* pbar; 411 QProgressBar* pbar;
412 bool m_fBkmksChanged; 412 bool m_fBkmksChanged;
413// int m_nRegAction; 413// int m_nRegAction;
414 regedit_type m_nRegAction; 414 regedit_type m_nRegAction;
415 bkmk_action m_nBkmkAction; 415 bkmk_action m_nBkmkAction;
416 QString m_autogenstr; 416 QString m_autogenstr;
417 bool m_dontSave; 417 bool m_dontSave;
418}; 418};
419 419
420//const int cAutoGen = 0; 420//const int cAutoGen = 0;
421//const int cAddBkmk = 1; 421//const int cAddBkmk = 1;
422//const int cDelBkmk = 2; 422//const int cDelBkmk = 2;
423//const int cGotoBkmk = 3; 423//const int cGotoBkmk = 3;
424//const int cRmBkmkFile = 4; 424//const int cRmBkmkFile = 4;
425//const int cJump = 5; 425//const int cJump = 5;
426//const int cMonoSpace = 6; 426//const int cMonoSpace = 6;
427//const int cOverlap = 7; 427//const int cOverlap = 7;
428//const int cSetTarget = 8; 428//const int cSetTarget = 8;
429//const int cOpenFile = 9; 429//const int cOpenFile = 9;
430//const int cSetPipeTarget = 10; 430//const int cSetPipeTarget = 10;
431//const int cSetConfigName = 11; 431//const int cSetConfigName = 11;
432//const int cMargin = 12; 432//const int cMargin = 12;
433//const int cExtraSpace = 14; 433//const int cExtraSpace = 14;
434//const int cExtraLead = 15; 434//const int cExtraLead = 15;
diff --git a/noncore/apps/opie-sheet/mainwindow.cpp b/noncore/apps/opie-sheet/mainwindow.cpp
index 3915e52..fb2ca79 100644
--- a/noncore/apps/opie-sheet/mainwindow.cpp
+++ b/noncore/apps/opie-sheet/mainwindow.cpp
@@ -316,97 +316,97 @@ void MainWindow::initActions()
316 316
317 colWidth=new QAction(tr("Column Width"), tr("&Width"), 0, this); 317 colWidth=new QAction(tr("Column Width"), tr("&Width"), 0, this);
318 connect(colWidth, SIGNAL(activated()), this, SLOT(slotColumnWidth())); 318 connect(colWidth, SIGNAL(activated()), this, SLOT(slotColumnWidth()));
319 colAdjust=new QAction(tr("Adjust Column"), tr("&Adjust"), 0, this); 319 colAdjust=new QAction(tr("Adjust Column"), tr("&Adjust"), 0, this);
320 connect(colAdjust, SIGNAL(activated()), this, SLOT(slotColumnAdjust())); 320 connect(colAdjust, SIGNAL(activated()), this, SLOT(slotColumnAdjust()));
321 colShow=new QAction(tr("Show Column"), tr("&Show"), 0, this); 321 colShow=new QAction(tr("Show Column"), tr("&Show"), 0, this);
322 connect(colShow, SIGNAL(activated()), this, SLOT(slotColumnShow())); 322 connect(colShow, SIGNAL(activated()), this, SLOT(slotColumnShow()));
323 colHide=new QAction(tr("Hide Column"), tr("&Hide"), 0, this); 323 colHide=new QAction(tr("Hide Column"), tr("&Hide"), 0, this);
324 connect(colHide, SIGNAL(activated()), this, SLOT(slotColumnHide())); 324 connect(colHide, SIGNAL(activated()), this, SLOT(slotColumnHide()));
325 325
326 sheetRename=new QAction(tr("Rename Sheet"), tr("&Rename"), 0, this); 326 sheetRename=new QAction(tr("Rename Sheet"), tr("&Rename"), 0, this);
327 connect(sheetRename, SIGNAL(activated()), this, SLOT(slotSheetRename())); 327 connect(sheetRename, SIGNAL(activated()), this, SLOT(slotSheetRename()));
328 sheetRemove=new QAction(tr("Remove Sheet"), tr("R&emove"), 0, this); 328 sheetRemove=new QAction(tr("Remove Sheet"), tr("R&emove"), 0, this);
329 connect(sheetRemove, SIGNAL(activated()), this, SLOT(slotSheetRemove())); 329 connect(sheetRemove, SIGNAL(activated()), this, SLOT(slotSheetRemove()));
330 330
331 dataSort=new QAction(tr("Sort Data"), tr("&Sort"), 0, this); 331 dataSort=new QAction(tr("Sort Data"), tr("&Sort"), 0, this);
332 connect(dataSort, SIGNAL(activated()), this, SLOT(slotDataSort())); 332 connect(dataSort, SIGNAL(activated()), this, SLOT(slotDataSort()));
333 dataFindReplace=new QAction(tr("Find && Replace"), tr("&Find && Replace"), 0, this); 333 dataFindReplace=new QAction(tr("Find && Replace"), tr("&Find && Replace"), 0, this);
334 connect(dataFindReplace, SIGNAL(activated()), this, SLOT(slotDataFindReplace())); 334 connect(dataFindReplace, SIGNAL(activated()), this, SLOT(slotDataFindReplace()));
335 335
336 funcEqual=new QAction(tr("Equal To"), QPixmap(func_equal_xpm), tr("&Equal To"), 0, this); 336 funcEqual=new QAction(tr("Equal To"), QPixmap(func_equal_xpm), tr("&Equal To"), 0, this);
337 funcEqual->setToolTip("="); 337 funcEqual->setToolTip("=");
338 connect(funcEqual, SIGNAL(activated()), this, SLOT(slotFuncOutput())); 338 connect(funcEqual, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
339 funcPlus=new QAction(tr("Addition"), QPixmap(func_plus_xpm), tr("&Addition"), 0, this); 339 funcPlus=new QAction(tr("Addition"), QPixmap(func_plus_xpm), tr("&Addition"), 0, this);
340 funcPlus->setToolTip("+"); 340 funcPlus->setToolTip("+");
341 connect(funcPlus, SIGNAL(activated()), this, SLOT(slotFuncOutput())); 341 connect(funcPlus, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
342 funcMinus=new QAction(tr("Subtraction"), QPixmap(func_minus_xpm), tr("&Subtraction"), 0, this); 342 funcMinus=new QAction(tr("Subtraction"), QPixmap(func_minus_xpm), tr("&Subtraction"), 0, this);
343 funcMinus->setToolTip("-"); 343 funcMinus->setToolTip("-");
344 connect(funcMinus, SIGNAL(activated()), this, SLOT(slotFuncOutput())); 344 connect(funcMinus, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
345 funcCross=new QAction(tr("Multiplication"), QPixmap(func_cross_xpm), tr("&Multiplication"), 0, this); 345 funcCross=new QAction(tr("Multiplication"), QPixmap(func_cross_xpm), tr("&Multiplication"), 0, this);
346 funcCross->setToolTip("*"); 346 funcCross->setToolTip("*");
347 connect(funcCross, SIGNAL(activated()), this, SLOT(slotFuncOutput())); 347 connect(funcCross, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
348 funcDivide=new QAction(tr("Division"), QPixmap(func_divide_xpm), tr("&Division"), 0, this); 348 funcDivide=new QAction(tr("Division"), QPixmap(func_divide_xpm), tr("&Division"), 0, this);
349 funcDivide->setToolTip("/"); 349 funcDivide->setToolTip("/");
350 connect(funcDivide, SIGNAL(activated()), this, SLOT(slotFuncOutput())); 350 connect(funcDivide, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
351 funcParanOpen=new QAction(tr("Open ParanthesistempCellData->row+row1, tempCellData->col+col1"), QPixmap(func_paran_open_xpm), tr("&Open Paranthesis"), 0, this); 351 funcParanOpen=new QAction(tr("Open ParanthesistempCellData->row+row1, tempCellData->col+col1"), QPixmap(func_paran_open_xpm), tr("&Open Paranthesis"), 0, this);
352 funcParanOpen->setToolTip("("); 352 funcParanOpen->setToolTip("(");
353 connect(funcParanOpen, SIGNAL(activated()), this, SLOT(slotFuncOutput())); 353 connect(funcParanOpen, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
354 funcParanClose=new QAction(tr("Close Paranthesis"), QPixmap(func_paran_close_xpm), tr("&Close Paranthesis"), 0, this); 354 funcParanClose=new QAction(tr("Close Paranthesis"), QPixmap(func_paran_close_xpm), tr("&Close Paranthesis"), 0, this);
355 funcParanClose->setToolTip(")"); 355 funcParanClose->setToolTip(")");
356 connect(funcParanClose, SIGNAL(activated()), this, SLOT(slotFuncOutput())); 356 connect(funcParanClose, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
357 funcComma=new QAction(tr("Comma"), QPixmap(func_comma_xpm), tr("&Comma"), 0, this); 357 funcComma=new QAction(tr("Comma"), QPixmap(func_comma_xpm), tr("&Comma"), 0, this);
358 funcComma->setToolTip(","); 358 funcComma->setToolTip(",");
359 connect(funcComma, SIGNAL(activated()), this, SLOT(slotFuncOutput())); 359 connect(funcComma, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
360} 360}
361 361
362void MainWindow::initMenu() 362void MainWindow::initMenu()
363{ 363{
364 menu=new QPEMenuBar(this); 364 menu=new QMenuBar(this);
365 365
366 menuFile=new QPopupMenu; 366 menuFile=new QPopupMenu;
367 fileNew->addTo(menuFile); 367 fileNew->addTo(menuFile);
368 fileOpen->addTo(menuFile); 368 fileOpen->addTo(menuFile);
369 fileSave->addTo(menuFile); 369 fileSave->addTo(menuFile);
370 fileSaveAs->addTo(menuFile); 370 fileSaveAs->addTo(menuFile);
371// menuFile->insertSeparator(); 371// menuFile->insertSeparator();
372// fileQuit->addTo(menuFile); 372// fileQuit->addTo(menuFile);
373 menu->insertItem(tr("&File"), menuFile); 373 menu->insertItem(tr("&File"), menuFile);
374 374
375 menuEdit=new QPopupMenu; 375 menuEdit=new QPopupMenu;
376 editAccept->addTo(menuEdit); 376 editAccept->addTo(menuEdit);
377 editCancel->addTo(menuEdit); 377 editCancel->addTo(menuEdit);
378 editCellSelect->addTo(menuEdit); 378 editCellSelect->addTo(menuEdit);
379 menuEdit->insertSeparator(); 379 menuEdit->insertSeparator();
380 editCut->addTo(menuEdit); 380 editCut->addTo(menuEdit);
381 editCopy->addTo(menuEdit); 381 editCopy->addTo(menuEdit);
382 editPaste->addTo(menuEdit); 382 editPaste->addTo(menuEdit);
383 editPasteContents->addTo(menuEdit); 383 editPasteContents->addTo(menuEdit);
384 editClear->addTo(menuEdit); 384 editClear->addTo(menuEdit);
385 menu->insertItem(tr("&Edit"), menuEdit); 385 menu->insertItem(tr("&Edit"), menuEdit);
386 386
387 menuInsert=new QPopupMenu; 387 menuInsert=new QPopupMenu;
388 menu->insertItem(tr("&Insert"), menuInsert); 388 menu->insertItem(tr("&Insert"), menuInsert);
389 389
390 menuFormat=new QPopupMenu; 390 menuFormat=new QPopupMenu;
391 formatCells->addTo(menuFormat); 391 formatCells->addTo(menuFormat);
392 menu->insertItem(tr("&Format"), menuFormat); 392 menu->insertItem(tr("&Format"), menuFormat);
393 393
394 menuData=new QPopupMenu; 394 menuData=new QPopupMenu;
395 dataSort->addTo(menuData); 395 dataSort->addTo(menuData);
396 dataFindReplace->addTo(menuData); 396 dataFindReplace->addTo(menuData);
397 menu->insertItem(tr("&Data"), menuData); 397 menu->insertItem(tr("&Data"), menuData);
398 398
399// menuHelp=new QPopupMenu; 399// menuHelp=new QPopupMenu;
400// helpGeneral->addTo(menuHelp); 400// helpGeneral->addTo(menuHelp);
401// helpAbout->addTo(menuHelp); 401// helpAbout->addTo(menuHelp);
402// menu->insertItem(tr("&Help"), menuHelp); 402// menu->insertItem(tr("&Help"), menuHelp);
403 403
404 submenuRow=new QPopupMenu; 404 submenuRow=new QPopupMenu;
405 rowHeight->addTo(submenuRow); 405 rowHeight->addTo(submenuRow);
406 rowAdjust->addTo(submenuRow); 406 rowAdjust->addTo(submenuRow);
407 rowShow->addTo(submenuRow); 407 rowShow->addTo(submenuRow);
408 rowHide->addTo(submenuRow); 408 rowHide->addTo(submenuRow);
409 menuFormat->insertItem(tr("&Row"), submenuRow); 409 menuFormat->insertItem(tr("&Row"), submenuRow);
410 410
411 submenuCol=new QPopupMenu; 411 submenuCol=new QPopupMenu;
412 colWidth->addTo(submenuCol); 412 colWidth->addTo(submenuCol);
diff --git a/noncore/apps/opie-sheet/mainwindow.h b/noncore/apps/opie-sheet/mainwindow.h
index 370d82e..4007f88 100644
--- a/noncore/apps/opie-sheet/mainwindow.h
+++ b/noncore/apps/opie-sheet/mainwindow.h
@@ -1,91 +1,91 @@
1/*************************************************************************** 1/***************************************************************************
2 * * 2 * *
3 * This program is free software; you can redistribute it and/or modify * 3 * This program is free software; you can redistribute it and/or modify *
4 * it under the terms of the GNU General Public License as published by * 4 * it under the terms of the GNU General Public License as published by *
5 * the Free Software Foundation; either version 2 of the License, or * 5 * the Free Software Foundation; either version 2 of the License, or *
6 * (at your option) any later version. * 6 * (at your option) any later version. *
7 * * 7 * *
8 ***************************************************************************/ 8 ***************************************************************************/
9 9
10/* 10/*
11 * Opie Sheet (formerly Sheet/Qt) 11 * Opie Sheet (formerly Sheet/Qt)
12 * by Serdar Ozler <sozler@sitebest.com> 12 * by Serdar Ozler <sozler@sitebest.com>
13 */ 13 */
14 14
15#ifndef MAINWINDOW_H 15#ifndef MAINWINDOW_H
16#define MAINWINDOW_H 16#define MAINWINDOW_H
17 17
18#include <qpe/applnk.h> 18#include <qpe/applnk.h>
19#include <qpe/fileselector.h> 19#include <qpe/fileselector.h>
20#include <qpe/qpemenubar.h> 20#include <qmenubar.h>
21#include <qpe/qpetoolbar.h> 21#include <qpe/qpetoolbar.h>
22#include <qmainwindow.h> 22#include <qmainwindow.h>
23#include <qaction.h> 23#include <qaction.h>
24#include <qlineedit.h> 24#include <qlineedit.h>
25#include <qbutton.h> 25#include <qbutton.h>
26#include <qcombobox.h> 26#include <qcombobox.h>
27#include <qtoolbutton.h> 27#include <qtoolbutton.h>
28 28
29#include "sheet.h" 29#include "sheet.h"
30 30
31typedef struct typeSheet 31typedef struct typeSheet
32{ 32{
33 QString name; 33 QString name;
34 QList<typeCellData> data; 34 QList<typeCellData> data;
35}; 35};
36 36
37class MainWindow: public QMainWindow 37class MainWindow: public QMainWindow
38{ 38{
39 Q_OBJECT 39 Q_OBJECT
40 40
41 // QPE objects 41 // QPE objects
42 DocLnk* currentDoc; 42 DocLnk* currentDoc;
43 QPEMenuBar *menu; 43 QMenuBar *menu;
44 QPEToolBar *toolbarFunctions, *toolbarEdit, *toolbarStandard; 44 QPEToolBar *toolbarFunctions, *toolbarEdit, *toolbarStandard;
45 FileSelector *fileSelector; 45 FileSelector *fileSelector;
46 46
47 // QT objects 47 // QT objects
48 QPopupMenu *menuFile, *menuEdit, *menuInsert, *menuFormat, *menuData, *menuHelp, 48 QPopupMenu *menuFile, *menuEdit, *menuInsert, *menuFormat, *menuData, *menuHelp,
49 *submenuFunc, *submenuFuncStd, *submenuFuncMath, *submenuFuncStat, 49 *submenuFunc, *submenuFuncStd, *submenuFuncMath, *submenuFuncStat,
50 *submenuRow, *submenuCol, *submenuSheet; 50 *submenuRow, *submenuCol, *submenuSheet;
51 QAction *fileNew, *fileOpen, *fileSave, *fileSaveAs, *fileQuit, *helpAbout, *editAccept, *editCancel, *formatCells, 51 QAction *fileNew, *fileOpen, *fileSave, *fileSaveAs, *fileQuit, *helpAbout, *editAccept, *editCancel, *formatCells,
52 *funcPlus, *funcMinus, *funcCross, *funcDivide, *funcParanOpen, *funcParanClose, *funcComma, *funcEqual, 52 *funcPlus, *funcMinus, *funcCross, *funcDivide, *funcParanOpen, *funcParanClose, *funcComma, *funcEqual,
53 *editCut, *editCopy, *editPaste, *editPasteContents, *editClear, *insertCols, *insertRows, *insertSheets, *insertCells, 53 *editCut, *editCopy, *editPaste, *editPasteContents, *editClear, *insertCols, *insertRows, *insertSheets, *insertCells,
54 *rowHeight, *rowShow, *rowHide, *rowAdjust, *colWidth, *colShow, *colHide, *colAdjust, *sheetRename, *sheetRemove, 54 *rowHeight, *rowShow, *rowHide, *rowAdjust, *colWidth, *colShow, *colHide, *colAdjust, *sheetRename, *sheetRemove,
55 *dataSort, *dataFindReplace, *editCellSelect, *helpGeneral; 55 *dataSort, *dataFindReplace, *editCellSelect, *helpGeneral;
56 QLineEdit *editData; 56 QLineEdit *editData;
57 QButton *buttonUp, *buttonDown, *buttonLeft, *buttonRight; 57 QButton *buttonUp, *buttonDown, *buttonLeft, *buttonRight;
58 QComboBox *comboSheets; 58 QComboBox *comboSheets;
59 QToolButton *toolFunction; 59 QToolButton *toolFunction;
60 QList<typeSheet> listSheets; 60 QList<typeSheet> listSheets;
61 QString helpFile; 61 QString helpFile;
62 62
63 // Other objects 63 // Other objects
64 Sheet *sheet; 64 Sheet *sheet;
65 65
66 // Variables 66 // Variables
67 bool documentModified; 67 bool documentModified;
68 68
69 // Private functions 69 // Private functions
70 void initMenu(); 70 void initMenu();
71 void initActions(); 71 void initActions();
72 void initFunctionsToolbar(); 72 void initFunctionsToolbar();
73 void initEditToolbar(); 73 void initEditToolbar();
74 void initStandardToolbar(); 74 void initStandardToolbar();
75 void initSheet(); 75 void initSheet();
76 void addToData(const QString &data); 76 void addToData(const QString &data);
77 int saveCurrentFile(bool ask=TRUE); 77 int saveCurrentFile(bool ask=TRUE);
78 void documentOpen(const DocLnk &lnkDoc); 78 void documentOpen(const DocLnk &lnkDoc);
79 void documentSave(DocLnk *lnkDoc); 79 void documentSave(DocLnk *lnkDoc);
80 void closeEvent(QCloseEvent *e); 80 void closeEvent(QCloseEvent *e);
81 void addFlyAction(const QString &text, const QString &menuText, const QString &tip, QWidget *w); 81 void addFlyAction(const QString &text, const QString &menuText, const QString &tip, QWidget *w);
82 typeSheet *createNewSheet(); 82 typeSheet *createNewSheet();
83 typeSheet *findSheet(const QString &name); 83 typeSheet *findSheet(const QString &name);
84 84
85 private slots: 85 private slots:
86 void slotFileNew(); 86 void slotFileNew();
87 void slotFileOpen(); 87 void slotFileOpen();
88 void slotFileSave(); 88 void slotFileSave();
89 void slotFileSaveAs(); 89 void slotFileSaveAs();
90 void slotHelpAbout(); 90 void slotHelpAbout();
91 void slotEditAccept(); 91 void slotEditAccept();
diff --git a/noncore/apps/qashmoney/budgetdisplay.cpp b/noncore/apps/qashmoney/budgetdisplay.cpp
index afc6a2d..492595a 100755
--- a/noncore/apps/qashmoney/budgetdisplay.cpp
+++ b/noncore/apps/qashmoney/budgetdisplay.cpp
@@ -1,84 +1,84 @@
1#include <qmessagebox.h> 1#include <qmessagebox.h>
2#include <qheader.h> 2#include <qheader.h>
3#include <qfont.h> 3#include <qfont.h>
4#include <sqlite.h> 4#include <sqlite.h>
5 5
6#include "budgetdisplay.h" 6#include "budgetdisplay.h"
7#include "budget.h" 7#include "budget.h"
8#include "newaccount.h" 8#include "newaccount.h"
9#include "datepicker.h" 9#include "datepicker.h"
10#include "preferences.h" 10#include "preferences.h"
11#include "transaction.h" 11#include "transaction.h"
12 12
13extern Preferences *preferences; 13extern Preferences *preferences;
14extern Budget *budget; 14extern Budget *budget;
15extern Transaction *transaction; 15extern Transaction *transaction;
16 16
17BudgetDisplay::BudgetDisplay ( QWidget *parent ) : QWidget ( parent ) 17BudgetDisplay::BudgetDisplay ( QWidget *parent ) : QWidget ( parent )
18 { 18 {
19 QFont font = this->font(); 19 QFont font = this->font();
20 font.setWeight ( QFont::Bold ); 20 font.setWeight ( QFont::Bold );
21 21
22 //set the default date to today 22 //set the default date to today
23 newDate = QDate::currentDate (); 23 newDate = QDate::currentDate ();
24 year = newDate.year(); 24 year = newDate.year();
25 month = newDate.month(); 25 month = newDate.month();
26 day = newDate.day(); 26 day = newDate.day();
27 datelabel = preferences->getDate ( year, month ); 27 datelabel = preferences->getDate ( year, month );
28 28
29 setCaption ( "Budget" ); 29 setCaption ( "Budget" );
30 30
31 firstline = new QHBox ( this ); 31 firstline = new QHBox ( this );
32 firstline->setSpacing ( 2 ); 32 firstline->setSpacing ( 2 );
33 secondline = new QHBox ( this ); 33 secondline = new QHBox ( this );
34 secondline->setSpacing ( 10 ); 34 secondline->setSpacing ( 10 );
35 35
36 menu = new QPEMenuBar ( this ); 36 menu = new QMenuBar ( this );
37 menu->setFrameStyle ( QFrame::Box | QFrame::Sunken ); 37 menu->setFrameStyle ( QFrame::Box | QFrame::Sunken );
38 budgetmenu = new QPopupMenu ( this ); 38 budgetmenu = new QPopupMenu ( this );
39 lineitemsmenu = new QPopupMenu ( this ); 39 lineitemsmenu = new QPopupMenu ( this );
40 datemenu = new QPopupMenu ( this ); 40 datemenu = new QPopupMenu ( this );
41 menu->insertItem ( "Budget", budgetmenu ); 41 menu->insertItem ( "Budget", budgetmenu );
42 menu->insertItem ( "Line Item", lineitemsmenu ); 42 menu->insertItem ( "Line Item", lineitemsmenu );
43 menu->insertItem ( "Date", datemenu ); 43 menu->insertItem ( "Date", datemenu );
44 budgetmenu->insertItem ( "New", this, SLOT ( newBudget () ), 0, 1 ); 44 budgetmenu->insertItem ( "New", this, SLOT ( newBudget () ), 0, 1 );
45 budgetmenu->insertItem ( "Edit", this, SLOT ( editBudget () ), 0, 2 ); 45 budgetmenu->insertItem ( "Edit", this, SLOT ( editBudget () ), 0, 2 );
46 budgetmenu->insertItem ( "Delete", this, SLOT ( deleteBudget () ), 0, 3 ); 46 budgetmenu->insertItem ( "Delete", this, SLOT ( deleteBudget () ), 0, 3 );
47 lineitemsmenu->insertItem ( "New", this, SLOT ( newLineItem () ), 0, 1 ); 47 lineitemsmenu->insertItem ( "New", this, SLOT ( newLineItem () ), 0, 1 );
48 lineitemsmenu->insertItem ( "Edit", this, SLOT ( editLineItem () ), 0, 2 ); 48 lineitemsmenu->insertItem ( "Edit", this, SLOT ( editLineItem () ), 0, 2 );
49 lineitemsmenu->insertItem ( "Delete", this, SLOT ( deleteLineItem () ), 0, 3 ); 49 lineitemsmenu->insertItem ( "Delete", this, SLOT ( deleteLineItem () ), 0, 3 );
50 datemenu->insertItem ( "Change", this, SLOT ( showCalendar() ) ); 50 datemenu->insertItem ( "Change", this, SLOT ( showCalendar() ) );
51 51
52 budgetbox = new QComboBox ( firstline ); 52 budgetbox = new QComboBox ( firstline );
53 connect ( budgetbox, SIGNAL ( activated ( int ) ), this, SLOT ( setCurrentBudget ( int ) ) ); 53 connect ( budgetbox, SIGNAL ( activated ( int ) ), this, SLOT ( setCurrentBudget ( int ) ) );
54 54
55 budgetview = new QComboBox ( firstline ); 55 budgetview = new QComboBox ( firstline );
56 budgetview->insertItem ( "Month" ); 56 budgetview->insertItem ( "Month" );
57 budgetview->insertItem ( "Year" ); 57 budgetview->insertItem ( "Year" );
58 connect ( budgetview, SIGNAL ( activated ( int ) ), this, SLOT ( setCurrentView ( int ) ) ); 58 connect ( budgetview, SIGNAL ( activated ( int ) ), this, SLOT ( setCurrentView ( int ) ) );
59 59
60 budgeted = new QLabel ( secondline ); 60 budgeted = new QLabel ( secondline );
61 budgeted->setFont ( font ); 61 budgeted->setFont ( font );
62 actual = new QLabel ( secondline ); 62 actual = new QLabel ( secondline );
63 actual->setFont ( font ); 63 actual->setFont ( font );
64 date = new QLabel ( secondline ); 64 date = new QLabel ( secondline );
65 date->setFont ( font ); 65 date->setFont ( font );
66 66
67 listview = new QListView ( this ); 67 listview = new QListView ( this );
68 listview->setAllColumnsShowFocus ( TRUE ); 68 listview->setAllColumnsShowFocus ( TRUE );
69 listview->setShowSortIndicator ( TRUE ); 69 listview->setShowSortIndicator ( TRUE );
70 listview->setRootIsDecorated ( TRUE ); 70 listview->setRootIsDecorated ( TRUE );
71 listview->setMultiSelection ( FALSE ); 71 listview->setMultiSelection ( FALSE );
72 listview->addColumn ( "Line Item", preferences->getColumnPreference ( 13 ) ); // column id 13 72 listview->addColumn ( "Line Item", preferences->getColumnPreference ( 13 ) ); // column id 13
73 listview->addColumn ( "Budget", preferences->getColumnPreference ( 14 ) ); // column id 14 73 listview->addColumn ( "Budget", preferences->getColumnPreference ( 14 ) ); // column id 14
74 listview->addColumn ( "Actual", preferences->getColumnPreference ( 15 ) ); // column id 15 74 listview->addColumn ( "Actual", preferences->getColumnPreference ( 15 ) ); // column id 15
75 listview->addColumn ( "", 0 ); // line item ids 75 listview->addColumn ( "", 0 ); // line item ids
76 listview->setColumnWidthMode ( 0, QListView::Manual ); 76 listview->setColumnWidthMode ( 0, QListView::Manual );
77 listview->setColumnWidthMode ( 1, QListView::Manual ); 77 listview->setColumnWidthMode ( 1, QListView::Manual );
78 listview->setColumnWidthMode ( 2, QListView::Manual ); 78 listview->setColumnWidthMode ( 2, QListView::Manual );
79 listview->setColumnAlignment ( 1, Qt::AlignRight ); 79 listview->setColumnAlignment ( 1, Qt::AlignRight );
80 listview->setColumnAlignment ( 2, Qt::AlignRight ); 80 listview->setColumnAlignment ( 2, Qt::AlignRight );
81 listview->setColumnWidthMode ( 3, QListView::Manual ); 81 listview->setColumnWidthMode ( 3, QListView::Manual );
82 82
83 listview->header()->setTracking ( FALSE ); 83 listview->header()->setTracking ( FALSE );
84 connect ( listview->header(), SIGNAL ( sizeChange ( int, int, int ) ), this, SLOT ( saveColumnSize ( int, int, int ) ) ); 84 connect ( listview->header(), SIGNAL ( sizeChange ( int, int, int ) ), this, SLOT ( saveColumnSize ( int, int, int ) ) );
diff --git a/noncore/apps/qashmoney/budgetdisplay.h b/noncore/apps/qashmoney/budgetdisplay.h
index 3976ce1..a4e806c 100755
--- a/noncore/apps/qashmoney/budgetdisplay.h
+++ b/noncore/apps/qashmoney/budgetdisplay.h
@@ -1,73 +1,73 @@
1#ifndef BUDGETDISPLAY_H 1#ifndef BUDGETDISPLAY_H
2#define BUDGETDISPLAY_H 2#define BUDGETDISPLAY_H
3 3
4#include <qlistview.h> 4#include <qlistview.h>
5#include <qlineedit.h> 5#include <qlineedit.h>
6#include <qpushbutton.h> 6#include <qpushbutton.h>
7#include <qcombobox.h> 7#include <qcombobox.h>
8#include <qlayout.h> 8#include <qlayout.h>
9#include <qlabel.h> 9#include <qlabel.h>
10#include <qstringlist.h> 10#include <qstringlist.h>
11#include <qdatetime.h> 11#include <qdatetime.h>
12#include <qpe/qpemenubar.h> 12#include <qmenubar.h>
13#include <qpopupmenu.h> 13#include <qpopupmenu.h>
14#include <qhbox.h> 14#include <qhbox.h>
15 15
16#include "currency.h" 16#include "currency.h"
17 17
18class BudgetDisplay : public QWidget 18class BudgetDisplay : public QWidget
19 { 19 {
20 Q_OBJECT 20 Q_OBJECT
21 21
22 public: 22 public:
23 BudgetDisplay ( QWidget *parent ); 23 BudgetDisplay ( QWidget *parent );
24 24
25 QPEMenuBar *menu; 25 QMenuBar *menu;
26 QPopupMenu *budgetmenu; 26 QPopupMenu *budgetmenu;
27 QPopupMenu *lineitemsmenu; 27 QPopupMenu *lineitemsmenu;
28 QPopupMenu *datemenu; 28 QPopupMenu *datemenu;
29 29
30 QHBox *firstline; 30 QHBox *firstline;
31 QHBox *secondline; 31 QHBox *secondline;
32 32
33 QLabel *budgeted; 33 QLabel *budgeted;
34 QLabel *actual; 34 QLabel *actual;
35 QLabel *date; 35 QLabel *date;
36 36
37 QLineEdit *budgetname; 37 QLineEdit *budgetname;
38 QLineEdit *description; 38 QLineEdit *description;
39 Currency *currencybox; 39 Currency *currencybox;
40 40
41 QLineEdit *lineitemname; 41 QLineEdit *lineitemname;
42 QLineEdit *lineitemamount; 42 QLineEdit *lineitemamount;
43 QComboBox *lineitemtime; 43 QComboBox *lineitemtime;
44 44
45 QListView *listview; 45 QListView *listview;
46 QComboBox *budgetbox; 46 QComboBox *budgetbox;
47 QComboBox *budgetview; 47 QComboBox *budgetview;
48 48
49 QBoxLayout *layout; 49 QBoxLayout *layout;
50 50
51 int getIDColumn (); 51 int getIDColumn ();
52 52
53 public slots: 53 public slots:
54 void displayBudgetNames (); 54 void displayBudgetNames ();
55 void displayLineItems (); 55 void displayLineItems ();
56 void updateBudgetInformation (); 56 void updateBudgetInformation ();
57 57
58 private slots: 58 private slots:
59 void saveColumnSize ( int column, int oldsize, int newsize ); 59 void saveColumnSize ( int column, int oldsize, int newsize );
60 void newBudget (); 60 void newBudget ();
61 void deleteBudget (); 61 void deleteBudget ();
62 void setCurrentBudget ( int ); 62 void setCurrentBudget ( int );
63 void setCurrentView ( int ); 63 void setCurrentView ( int );
64 void showCalendar (); 64 void showCalendar ();
65 void newLineItem (); 65 void newLineItem ();
66 void deleteLineItem (); 66 void deleteLineItem ();
67 void checkBudgets (); 67 void checkBudgets ();
68 void editBudget (); 68 void editBudget ();
69 void editLineItem (); 69 void editLineItem ();
70 void constructBudgetWindow (); 70 void constructBudgetWindow ();
71 void constructLineItemWindow (); 71 void constructLineItemWindow ();
72 void saveSortingPreference ( int column ); 72 void saveSortingPreference ( int column );
73 73
diff --git a/noncore/apps/qashmoney/qashmoney.cpp b/noncore/apps/qashmoney/qashmoney.cpp
index 20e8d32..e985f0b 100755
--- a/noncore/apps/qashmoney/qashmoney.cpp
+++ b/noncore/apps/qashmoney/qashmoney.cpp
@@ -1,74 +1,74 @@
1#include "qashmoney.h" 1#include "qashmoney.h"
2#include "preferencedialogs.h" 2#include "preferencedialogs.h"
3#include "memorydialog.h" 3#include "memorydialog.h"
4 4
5#include <qheader.h> 5#include <qheader.h>
6#include <iostream.h> 6#include <iostream.h>
7 7
8Budget *budget = new Budget (); 8Budget *budget = new Budget ();
9Preferences *preferences = new Preferences (); 9Preferences *preferences = new Preferences ();
10Account *account = new Account (); 10Account *account = new Account ();
11Transaction *transaction = new Transaction (); 11Transaction *transaction = new Transaction ();
12Transfer *transfer = new Transfer (); 12Transfer *transfer = new Transfer ();
13Memory *memory = new Memory (); 13Memory *memory = new Memory ();
14 14
15QashMoney::QashMoney () : QWidget () 15QashMoney::QashMoney () : QWidget ()
16 { 16 {
17 preferences->addPreferences (); 17 preferences->addPreferences ();
18 preferences->initializeColumnPreferences (); 18 preferences->initializeColumnPreferences ();
19 preferences->initializeSortingPreferences (); 19 preferences->initializeSortingPreferences ();
20 20
21 // set the text in the upper part of the frame 21 // set the text in the upper part of the frame
22 setCaption ( tr ( "QashMoney" ) ); 22 setCaption ( tr ( "QashMoney" ) );
23 23
24 // Create new menubar for our mainwindow 24 // Create new menubar for our mainwindow
25 // and add menu items 25 // and add menu items
26 mainmenu = new QPEMenuBar ( this ); 26 mainmenu = new QMenuBar ( this );
27 mainmenu->setFrameStyle ( QFrame::PopupPanel | QFrame::Raised ); 27 mainmenu->setFrameStyle ( QFrame::PopupPanel | QFrame::Raised );
28 preferencesmenu = new QPopupMenu ( this ); 28 preferencesmenu = new QPopupMenu ( this );
29 utilitiesmenu = new QPopupMenu ( this ); 29 utilitiesmenu = new QPopupMenu ( this );
30 mainmenu->insertItem ( "Preferences", preferencesmenu ); 30 mainmenu->insertItem ( "Preferences", preferencesmenu );
31 mainmenu->insertItem ( "Utilities", utilitiesmenu ); 31 mainmenu->insertItem ( "Utilities", utilitiesmenu );
32 preferencesmenu->insertItem ( "Date", this, SLOT ( displayDatePreferencesDialog () ) ); 32 preferencesmenu->insertItem ( "Date", this, SLOT ( displayDatePreferencesDialog () ) );
33 preferencesmenu->insertItem ( "Account", this, SLOT ( displayAccountPreferencesDialog () ) ); 33 preferencesmenu->insertItem ( "Account", this, SLOT ( displayAccountPreferencesDialog () ) );
34 preferencesmenu->insertItem ( "Transaction", this, SLOT ( displayTransactionPreferencesDialog () ) ); 34 preferencesmenu->insertItem ( "Transaction", this, SLOT ( displayTransactionPreferencesDialog () ) );
35 utilitiesmenu->insertItem ( "Memory", this, SLOT ( displayMemoryDialog () ) ); 35 utilitiesmenu->insertItem ( "Memory", this, SLOT ( displayMemoryDialog () ) );
36 36
37 // create the main tabwidget for displaying accounts and transactions 37 // create the main tabwidget for displaying accounts and transactions
38 maintabs = new QTabWidget ( this ); 38 maintabs = new QTabWidget ( this );
39 tab = new QWidget ( this ); 39 tab = new QWidget ( this );
40 tab_2 = new QWidget ( this ); 40 tab_2 = new QWidget ( this );
41 tab_3 = new QWidget ( this ); 41 tab_3 = new QWidget ( this );
42 maintabs->addTab ( tab, "Accounts" ); 42 maintabs->addTab ( tab, "Accounts" );
43 maintabs->addTab ( tab_2, "Transactions" ); 43 maintabs->addTab ( tab_2, "Transactions" );
44 maintabs->addTab ( tab_3, "Budgets" ); 44 maintabs->addTab ( tab_3, "Budgets" );
45 tabheight = tab->height(); 45 tabheight = tab->height();
46 maintabs->setTabEnabled ( tab_2, FALSE ); 46 maintabs->setTabEnabled ( tab_2, FALSE );
47 47
48 // create a new account display object 48 // create a new account display object
49 accountdisplay = new AccountDisplay ( maintabs ); 49 accountdisplay = new AccountDisplay ( maintabs );
50 accountdisplay->setTabs ( tab_2, maintabs ); 50 accountdisplay->setTabs ( tab_2, maintabs );
51 connect ( accountdisplay->listview, SIGNAL ( selectionChanged () ), this, SLOT ( setTransactionTab () ) ); 51 connect ( accountdisplay->listview, SIGNAL ( selectionChanged () ), this, SLOT ( setTransactionTab () ) );
52 52
53 // set the connection to disable the one touch account viewing if we are transfering money 53 // set the connection to disable the one touch account viewing if we are transfering money
54 connect ( accountdisplay->transferbutton, SIGNAL ( toggled ( bool ) ), this, SLOT ( toggleOneTouchViewing ( bool ) ) ); 54 connect ( accountdisplay->transferbutton, SIGNAL ( toggled ( bool ) ), this, SLOT ( toggleOneTouchViewing ( bool ) ) );
55 55
56 // create a new transactiondisplay object 56 // create a new transactiondisplay object
57 transactiondisplay = new TransactionDisplay ( maintabs ); 57 transactiondisplay = new TransactionDisplay ( maintabs );
58 transactiondisplay->hide(); 58 transactiondisplay->hide();
59 59
60 // create new budgetdisplay object 60 // create new budgetdisplay object
61 budgetdisplay = new BudgetDisplay ( maintabs ); 61 budgetdisplay = new BudgetDisplay ( maintabs );
62 budgetdisplay->hide(); 62 budgetdisplay->hide();
63 63
64 tabslayout = new QVBoxLayout ( maintabs, 4, 2 ); 64 tabslayout = new QVBoxLayout ( maintabs, 4, 2 );
65 tabslayout->addSpacing ( tabheight ); 65 tabslayout->addSpacing ( tabheight );
66 tabslayout->addWidget ( accountdisplay ); 66 tabslayout->addWidget ( accountdisplay );
67 tabslayout->addWidget ( transactiondisplay ); 67 tabslayout->addWidget ( transactiondisplay );
68 tabslayout->addWidget ( budgetdisplay ); 68 tabslayout->addWidget ( budgetdisplay );
69 69
70 // connect a change in the maintabs with changing the tab display 70 // connect a change in the maintabs with changing the tab display
71 connect ( maintabs, SIGNAL ( currentChanged ( QWidget * ) ), this, SLOT ( changeTabDisplay () ) ); 71 connect ( maintabs, SIGNAL ( currentChanged ( QWidget * ) ), this, SLOT ( changeTabDisplay () ) );
72 72
73 // create layout that will contain the menubar and the maintabs 73 // create layout that will contain the menubar and the maintabs
74 layout = new QVBoxLayout ( this, 2, 2 ); 74 layout = new QVBoxLayout ( this, 2, 2 );
diff --git a/noncore/apps/qashmoney/qashmoney.h b/noncore/apps/qashmoney/qashmoney.h
index ec2c7ec..f2c456c 100755
--- a/noncore/apps/qashmoney/qashmoney.h
+++ b/noncore/apps/qashmoney/qashmoney.h
@@ -1,64 +1,64 @@
1#ifndef QASHMONEY_H 1#ifndef QASHMONEY_H
2#define QASHMONEY_H 2#define QASHMONEY_H
3 3
4#include <qpe/qpemenubar.h> 4#include <qmenubar.h>
5#include <qpopupmenu.h> 5#include <qpopupmenu.h>
6#include <qlayout.h> 6#include <qlayout.h>
7#include <qtabwidget.h> 7#include <qtabwidget.h>
8#include <qdatetime.h> 8#include <qdatetime.h>
9 9
10#include "accountdisplay.h" 10#include "accountdisplay.h"
11#include "transactiondisplay.h" 11#include "transactiondisplay.h"
12#include "budgetdisplay.h" 12#include "budgetdisplay.h"
13#include "account.h" 13#include "account.h"
14#include "preferences.h" 14#include "preferences.h"
15#include "transaction.h" 15#include "transaction.h"
16#include "transfer.h" 16#include "transfer.h"
17#include "memory.h" 17#include "memory.h"
18#include "budget.h" 18#include "budget.h"
19 19
20class QashMoney : public QWidget 20class QashMoney : public QWidget
21 { 21 {
22 Q_OBJECT 22 Q_OBJECT
23 23
24 public: 24 public:
25 QashMoney (); 25 QashMoney ();
26 ~QashMoney(); 26 ~QashMoney();
27 27
28 QTabWidget* maintabs; 28 QTabWidget* maintabs;
29 QWidget* tab; 29 QWidget* tab;
30 QWidget* tab_2; 30 QWidget* tab_2;
31 QWidget* tab_3; 31 QWidget* tab_3;
32 32
33 QPEMenuBar *mainmenu; 33 QMenuBar *mainmenu;
34 QPopupMenu *preferencesmenu; 34 QPopupMenu *preferencesmenu;
35 QPopupMenu *utilitiesmenu; 35 QPopupMenu *utilitiesmenu;
36 36
37 public slots: 37 public slots:
38 void displayDatePreferencesDialog (); 38 void displayDatePreferencesDialog ();
39 void displayTransactionPreferencesDialog (); 39 void displayTransactionPreferencesDialog ();
40 void displayAccountPreferencesDialog (); 40 void displayAccountPreferencesDialog ();
41 void displayMemoryDialog (); 41 void displayMemoryDialog ();
42 void setTransactionTab (); 42 void setTransactionTab ();
43 43
44 private slots: 44 private slots:
45 void changeTabDisplay (); 45 void changeTabDisplay ();
46 void showTransactions (); 46 void showTransactions ();
47 void enableOneTouchViewing (); 47 void enableOneTouchViewing ();
48 void disableOneTouchViewing (); 48 void disableOneTouchViewing ();
49 void toggleOneTouchViewing ( bool ); 49 void toggleOneTouchViewing ( bool );
50 void setTransactionDisplayDate (); 50 void setTransactionDisplayDate ();
51 51
52 private: 52 private:
53 QVBoxLayout *layout; 53 QVBoxLayout *layout;
54 QVBoxLayout *tabslayout; 54 QVBoxLayout *tabslayout;
55 AccountDisplay *accountdisplay; 55 AccountDisplay *accountdisplay;
56 TransactionDisplay *transactiondisplay; 56 TransactionDisplay *transactiondisplay;
57 BudgetDisplay *budgetdisplay; 57 BudgetDisplay *budgetdisplay;
58 int tabheight; 58 int tabheight;
59 QDate newdate; 59 QDate newdate;
60 60
61 }; 61 };
62 62
63#endif 63#endif
64 64
diff --git a/noncore/apps/tableviewer/tableviewer.cpp b/noncore/apps/tableviewer/tableviewer.cpp
index fbb5c24..fdf0072 100644
--- a/noncore/apps/tableviewer/tableviewer.cpp
+++ b/noncore/apps/tableviewer/tableviewer.cpp
@@ -21,97 +21,97 @@
21/* local includes */ 21/* local includes */
22#include "tableviewer.h" 22#include "tableviewer.h"
23#include "ui/tvbrowseview.h" 23#include "ui/tvbrowseview.h"
24#include "ui/tvfilterview.h" 24#include "ui/tvfilterview.h"
25#include "ui/tvlistview.h" 25#include "ui/tvlistview.h"
26#include "ui/tveditview.h" 26#include "ui/tveditview.h"
27#include "ui/tvkeyedit.h" 27#include "ui/tvkeyedit.h"
28#include "db/datacache.h" 28#include "db/datacache.h"
29 29
30/* QPE includes */ 30/* QPE includes */
31#include <qpe/fileselector.h> 31#include <qpe/fileselector.h>
32#include <qpe/resource.h> 32#include <qpe/resource.h>
33#include <qpe/qpetoolbar.h> 33#include <qpe/qpetoolbar.h>
34 34
35/* QTE includes */ 35/* QTE includes */
36#include <qpe/qpemenubar.h> 36#include <qpe/qpemenubar.h>
37#include <qpe/qpetoolbar.h> 37#include <qpe/qpetoolbar.h>
38#include <qpopupmenu.h> 38#include <qpopupmenu.h>
39#include <qapplication.h> 39#include <qapplication.h>
40#include <qwidgetstack.h> 40#include <qwidgetstack.h>
41#include <qlayout.h> 41#include <qlayout.h>
42#include <qbuffer.h> 42#include <qbuffer.h>
43/*! 43/*!
44 \class TableViewerWindow 44 \class TableViewerWindow
45 \brief The main window widget of the application 45 \brief The main window widget of the application
46 46
47 This is the main widget of the table viewer application. 47 This is the main widget of the table viewer application.
48 It is the co-ordination point. 48 It is the co-ordination point.
49*/ 49*/
50 50
51/*! 51/*!
52 Constructs a new TableViewerWindow 52 Constructs a new TableViewerWindow
53*/ 53*/
54TableViewerWindow::TableViewerWindow(QWidget *parent, const char *name, WFlags f) 54TableViewerWindow::TableViewerWindow(QWidget *parent, const char *name, WFlags f)
55 : QMainWindow(parent, name, f) 55 : QMainWindow(parent, name, f)
56{ 56{
57 setCaption(tr("Table Viewer")); 57 setCaption(tr("Table Viewer"));
58 58
59/* Build data */ 59/* Build data */
60 ds = new DBStore(); 60 ds = new DBStore();
61 doc.setType("text/x-xml-tableviewer"); 61 doc.setType("text/x-xml-tableviewer");
62 doc.setName("table"); 62 doc.setName("table");
63 63
64 dirty = FALSE; 64 dirty = FALSE;
65 ts.current_column = 0; 65 ts.current_column = 0;
66 ts.kRep = ds->getKeys(); 66 ts.kRep = ds->getKeys();
67 67
68/* build menus */ 68/* build menus */
69 menu = new QPEMenuBar(this, 0); 69 menu = new QMenuBar(this, 0);
70 70
71 QPopupMenu *file_menu = new QPopupMenu; 71 QPopupMenu *file_menu = new QPopupMenu;
72 file_menu->insertItem("New", this, SLOT(newDocument())); 72 file_menu->insertItem("New", this, SLOT(newDocument()));
73 73
74 file_menu->insertItem("Open", this, SLOT(selectDocument())); 74 file_menu->insertItem("Open", this, SLOT(selectDocument()));
75 file_menu->insertSeparator(); 75 file_menu->insertSeparator();
76 file_menu->insertItem("Properties"); 76 file_menu->insertItem("Properties");
77 77
78 /* later will want to set this up to clean up first via this, SLOT(quit) */ 78 /* later will want to set this up to clean up first via this, SLOT(quit) */
79 menu->insertItem("Document", file_menu); 79 menu->insertItem("Document", file_menu);
80 80
81 QPopupMenu *edit_menu = new QPopupMenu; 81 QPopupMenu *edit_menu = new QPopupMenu;
82 edit_menu->insertItem("Edit Item", this, SLOT(editItemSlot())); 82 edit_menu->insertItem("Edit Item", this, SLOT(editItemSlot()));
83 edit_menu->insertItem("Edit Keys", this, SLOT(editKeysSlot())); 83 edit_menu->insertItem("Edit Keys", this, SLOT(editKeysSlot()));
84 edit_menu->insertItem("Edit filters", this, SLOT(filterViewSlot())); 84 edit_menu->insertItem("Edit filters", this, SLOT(filterViewSlot()));
85 menu->insertItem("Edit", edit_menu); 85 menu->insertItem("Edit", edit_menu);
86 86
87 QPopupMenu *view_menu = new QPopupMenu; 87 QPopupMenu *view_menu = new QPopupMenu;
88 view_menu->insertItem("Browse View", this, SLOT(browseViewSlot())); 88 view_menu->insertItem("Browse View", this, SLOT(browseViewSlot()));
89 view_menu->insertItem("List View", this, SLOT(listViewSlot())); 89 view_menu->insertItem("List View", this, SLOT(listViewSlot()));
90 menu->insertItem("View", view_menu); 90 menu->insertItem("View", view_menu);
91 91
92 QVBoxLayout *main_layout = new QVBoxLayout; 92 QVBoxLayout *main_layout = new QVBoxLayout;
93 93
94 /* Build tool bar */ 94 /* Build tool bar */
95 navigation = new QPEToolBar(this, "navigation"); 95 navigation = new QPEToolBar(this, "navigation");
96 QToolButton *newItemButton = new QToolButton( 96 QToolButton *newItemButton = new QToolButton(
97 QIconSet(Resource::loadPixmap("new")), "New Item", QString::null, 97 QIconSet(Resource::loadPixmap("new")), "New Item", QString::null,
98 this, SLOT(newItemSlot()), navigation, "New Item"); 98 this, SLOT(newItemSlot()), navigation, "New Item");
99 QToolButton *editItemButton = new QToolButton( 99 QToolButton *editItemButton = new QToolButton(
100 QIconSet(Resource::loadPixmap("edit")), "Edit Item", QString::null, 100 QIconSet(Resource::loadPixmap("edit")), "Edit Item", QString::null,
101 this, SLOT(editItemSlot()), navigation, "Edit Item"); 101 this, SLOT(editItemSlot()), navigation, "Edit Item");
102 QToolButton *deleteItemButton = new QToolButton( 102 QToolButton *deleteItemButton = new QToolButton(
103 QIconSet(Resource::loadPixmap("trash")), "Delete Item", 103 QIconSet(Resource::loadPixmap("trash")), "Delete Item",
104 QString::null, this, 104 QString::null, this,
105 SLOT(deleteItemSlot()), navigation, "Delete Item"); 105 SLOT(deleteItemSlot()), navigation, "Delete Item");
106 106
107 navigation->addSeparator(); 107 navigation->addSeparator();
108 108
109 QToolButton *firstItemButton = new QToolButton( 109 QToolButton *firstItemButton = new QToolButton(
110 QIconSet(Resource::loadPixmap("fastback")), "First Item", 110 QIconSet(Resource::loadPixmap("fastback")), "First Item",
111 QString::null, this, 111 QString::null, this,
112 SLOT(firstItem()), navigation, "First Item"); 112 SLOT(firstItem()), navigation, "First Item");
113 QToolButton *previousItemButton = new QToolButton( 113 QToolButton *previousItemButton = new QToolButton(
114 QIconSet(Resource::loadPixmap("back")), "Previous Item", 114 QIconSet(Resource::loadPixmap("back")), "Previous Item",
115 QString::null, this, 115 QString::null, this,
116 SLOT(previousItem()), navigation, "Previous Item"); 116 SLOT(previousItem()), navigation, "Previous Item");
117 QToolButton *nextItemButton = new QToolButton( 117 QToolButton *nextItemButton = new QToolButton(
diff --git a/noncore/games/backgammon/backgammon.cpp b/noncore/games/backgammon/backgammon.cpp
index 06523f1..755ed10 100644
--- a/noncore/games/backgammon/backgammon.cpp
+++ b/noncore/games/backgammon/backgammon.cpp
@@ -57,97 +57,97 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
57 conf.setGroup("general"); 57 conf.setGroup("general");
58 theme_name=conf.readEntry("theme","default"); 58 theme_name=conf.readEntry("theme","default");
59 QString theme_file=QPEApplication::qpeDir()+"/backgammon/"+theme_name+".theme"; 59 QString theme_file=QPEApplication::qpeDir()+"/backgammon/"+theme_name+".theme";
60 60
61 //the rules 61 //the rules
62 conf.setGroup("rules"); 62 conf.setGroup("rules");
63 rules.move_with_pieces_out=conf.readBoolEntry("move_with_pieces_out",false); 63 rules.move_with_pieces_out=conf.readBoolEntry("move_with_pieces_out",false);
64 rules.generous_dice=conf.readBoolEntry("nice_dice",false); 64 rules.generous_dice=conf.readBoolEntry("nice_dice",false);
65 65
66 move->setRules(rules); 66 move->setRules(rules);
67 67
68 //get the AI settings 68 //get the AI settings
69 AISettings ai; 69 AISettings ai;
70 conf.setGroup("ai"); 70 conf.setGroup("ai");
71 ai.rescue=conf.readNumEntry("rescue",6); 71 ai.rescue=conf.readNumEntry("rescue",6);
72 ai.eliminate=conf.readNumEntry("eliminate",4); 72 ai.eliminate=conf.readNumEntry("eliminate",4);
73 ai.expose=conf.readNumEntry("expose",1); 73 ai.expose=conf.readNumEntry("expose",1);
74 ai.protect=conf.readNumEntry("protect",5); 74 ai.protect=conf.readNumEntry("protect",5);
75 ai.safe=conf.readNumEntry("safe",3); 75 ai.safe=conf.readNumEntry("safe",3);
76 ai.empty=conf.readNumEntry("empty",2); 76 ai.empty=conf.readNumEntry("empty",2);
77 move->setAISettings(ai); 77 move->setAISettings(ai);
78 78
79 79
80 //get the theme component names 80 //get the theme component names
81 Config theme(theme_file,Config::File); 81 Config theme(theme_file,Config::File);
82 if(!theme.isValid()) 82 if(!theme.isValid())
83 { 83 {
84 qDebug("theme file does not exist"); 84 qDebug("theme file does not exist");
85 theme.setGroup("theme"); 85 theme.setGroup("theme");
86 theme.writeEntry("board","casino_board_1"); 86 theme.writeEntry("board","casino_board_1");
87 theme.writeEntry("pieces1","casino_pieces_blue"); 87 theme.writeEntry("pieces1","casino_pieces_blue");
88 theme.writeEntry("pieces2","casino_pieces_white"); 88 theme.writeEntry("pieces2","casino_pieces_white");
89 theme.writeEntry("dice1","casino_dice"); 89 theme.writeEntry("dice1","casino_dice");
90 theme.writeEntry("dice2","casino_dice"); 90 theme.writeEntry("dice2","casino_dice");
91 theme.writeEntry("table","casino_table_green"); 91 theme.writeEntry("table","casino_table_green");
92 theme.writeEntry("odds","casino_odds"); 92 theme.writeEntry("odds","casino_odds");
93 } 93 }
94 theme.setGroup("theme"); 94 theme.setGroup("theme");
95 board_name=theme.readEntry("board","casino_board_1"); 95 board_name=theme.readEntry("board","casino_board_1");
96 piecesA_name=theme.readEntry("pieces1","casino_pieces_blue"); 96 piecesA_name=theme.readEntry("pieces1","casino_pieces_blue");
97 piecesB_name=theme.readEntry("pieces2","casino_pieces_white"); 97 piecesB_name=theme.readEntry("pieces2","casino_pieces_white");
98 diceA_name=theme.readEntry("dice1","casino_dice"); 98 diceA_name=theme.readEntry("dice1","casino_dice");
99 diceB_name=theme.readEntry("dice2","casino_dice"); 99 diceB_name=theme.readEntry("dice2","casino_dice");
100 table_name=theme.readEntry("table","casino_table_green"); 100 table_name=theme.readEntry("table","casino_table_green");
101 odds_name=theme.readEntry("odds","casino_odds"); 101 odds_name=theme.readEntry("odds","casino_odds");
102 102
103 103
104 //the menu 104 //the menu
105 QPEMenuBar* menuBar = new QPEMenuBar(this); 105 QMenuBar* menuBar = new QMenuBar(this);
106 106
107 QPopupMenu* gamemenu= new QPopupMenu(this); 107 QPopupMenu* gamemenu= new QPopupMenu(this);
108 gamemenu->insertItem(tr( "New" ),this,SLOT(newgame())); 108 gamemenu->insertItem(tr( "New" ),this,SLOT(newgame()));
109 gamemenu->insertSeparator(); 109 gamemenu->insertSeparator();
110 gamemenu->insertItem(tr( "Load" ),this,SLOT(loadgame())); 110 gamemenu->insertItem(tr( "Load" ),this,SLOT(loadgame()));
111 gamemenu->insertItem(tr( "Save" ),this,SLOT(savegame())); 111 gamemenu->insertItem(tr( "Save" ),this,SLOT(savegame()));
112 gamemenu->insertSeparator(); 112 gamemenu->insertSeparator();
113 gamemenu->insertItem(tr( "Delete" ),this,SLOT(deletegame())); 113 gamemenu->insertItem(tr( "Delete" ),this,SLOT(deletegame()));
114 menuBar->insertItem(tr( "Game" ),gamemenu); 114 menuBar->insertItem(tr( "Game" ),gamemenu);
115 115
116 QPopupMenu* thememenu= new QPopupMenu(this); 116 QPopupMenu* thememenu= new QPopupMenu(this);
117 thememenu->insertItem(tr( "New" ),this,SLOT(newtheme())); 117 thememenu->insertItem(tr( "New" ),this,SLOT(newtheme()));
118 thememenu->insertSeparator(); 118 thememenu->insertSeparator();
119 thememenu->insertItem(tr( "Load"),this,SLOT(loadtheme())); 119 thememenu->insertItem(tr( "Load"),this,SLOT(loadtheme()));
120 thememenu->insertItem(tr( "Save" ),this,SLOT(savetheme())); 120 thememenu->insertItem(tr( "Save" ),this,SLOT(savetheme()));
121 thememenu->insertSeparator(); 121 thememenu->insertSeparator();
122 thememenu->insertItem(tr( "Default"),this,SLOT(themedefault())); 122 thememenu->insertItem(tr( "Default"),this,SLOT(themedefault()));
123 thememenu->insertItem(tr( "Delete" ),this,SLOT(deletetheme())); 123 thememenu->insertItem(tr( "Delete" ),this,SLOT(deletetheme()));
124 menuBar->insertItem(tr( "Theme" ),thememenu); 124 menuBar->insertItem(tr( "Theme" ),thememenu);
125 125
126 QPopupMenu* optionmenu=new QPopupMenu(this); 126 QPopupMenu* optionmenu=new QPopupMenu(this);
127 optionmenu->insertItem(tr( "Player" ),this,SLOT(playerselect())); 127 optionmenu->insertItem(tr( "Player" ),this,SLOT(playerselect()));
128 optionmenu->insertSeparator(); 128 optionmenu->insertSeparator();
129 optionmenu->insertItem(tr( "AI" ),this,SLOT(modify_AI())); 129 optionmenu->insertItem(tr( "AI" ),this,SLOT(modify_AI()));
130 optionmenu->insertItem(tr( "Rules" ),this,SLOT(setrules())); 130 optionmenu->insertItem(tr( "Rules" ),this,SLOT(setrules()));
131 menuBar->insertItem(tr( "Options"),optionmenu); 131 menuBar->insertItem(tr( "Options"),optionmenu);
132 132
133 QWidget* mainarea=new QWidget(this); 133 QWidget* mainarea=new QWidget(this);
134 setCentralWidget(mainarea); 134 setCentralWidget(mainarea);
135 //the main area 135 //the main area
136 QBoxLayout* layout=new QBoxLayout(mainarea,QBoxLayout::TopToBottom); 136 QBoxLayout* layout=new QBoxLayout(mainarea,QBoxLayout::TopToBottom);
137 area=new QCanvas(235,235); 137 area=new QCanvas(235,235);
138 boardview=new BackGammonView(area,mainarea); 138 boardview=new BackGammonView(area,mainarea);
139 boardview->setMaximumHeight(240); 139 boardview->setMaximumHeight(240);
140 layout->addWidget(boardview); 140 layout->addWidget(boardview);
141 connect(boardview,SIGNAL(mouse(int,int)),this,SLOT(mouse(int,int))); 141 connect(boardview,SIGNAL(mouse(int,int)),this,SLOT(mouse(int,int)));
142 //status bar 142 //status bar
143 message=new QLabel("<b>Backgammon</b>",mainarea); 143 message=new QLabel("<b>Backgammon</b>",mainarea);
144 message->setAlignment(AlignHCenter); 144 message->setAlignment(AlignHCenter);
145 layout->addWidget(message); 145 layout->addWidget(message);
146 146
147 //the marker 147 //the marker
148 marker_current=new QCanvasRectangle(area); 148 marker_current=new QCanvasRectangle(area);
149 marker_current->setBrush(QColor(0,0,255)); 149 marker_current->setBrush(QColor(0,0,255));
150 marker_current->setSize(15,5); 150 marker_current->setSize(15,5);
151 marker_current->setZ(1); 151 marker_current->setZ(1);
152 152
153 for(a=0;a<4;a++) 153 for(a=0;a<4;a++)
diff --git a/noncore/games/fifteen/fifteen.cpp b/noncore/games/fifteen/fifteen.cpp
index 293cd65..212f7b1 100644
--- a/noncore/games/fifteen/fifteen.cpp
+++ b/noncore/games/fifteen/fifteen.cpp
@@ -7,97 +7,97 @@
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "fifteen.h" 21#include "fifteen.h"
22 22
23#include <qpe/resource.h> 23#include <qpe/resource.h>
24#include <qpe/config.h> 24#include <qpe/config.h>
25 25
26#include <qvbox.h> 26#include <qvbox.h>
27#include <qaction.h> 27#include <qaction.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qpainter.h> 29#include <qpainter.h>
30#include <qpopupmenu.h> 30#include <qpopupmenu.h>
31#include <qmessagebox.h> 31#include <qmessagebox.h>
32#include <qpe/qpetoolbar.h> 32#include <qpe/qpetoolbar.h>
33#include <qpe/qpemenubar.h> 33#include <qpe/qpemenubar.h>
34#include <qstringlist.h> 34#include <qstringlist.h>
35#include <qapplication.h> 35#include <qapplication.h>
36 36
37#include <stdlib.h> 37#include <stdlib.h>
38#include <time.h> 38#include <time.h>
39 39
40FifteenMainWindow::FifteenMainWindow(QWidget *parent, const char* name) 40FifteenMainWindow::FifteenMainWindow(QWidget *parent, const char* name)
41 : QMainWindow( parent, name ) 41 : QMainWindow( parent, name )
42{ 42{
43 // random seed 43 // random seed
44 srand(time(0)); 44 srand(time(0));
45 45
46 setToolBarsMovable( FALSE ); 46 setToolBarsMovable( FALSE );
47 QVBox *vbox = new QVBox( this ); 47 QVBox *vbox = new QVBox( this );
48 PiecesTable *table = new PiecesTable( vbox ); 48 PiecesTable *table = new PiecesTable( vbox );
49 setCentralWidget(vbox); 49 setCentralWidget(vbox);
50 50
51 QPEToolBar *toolbar = new QPEToolBar(this); 51 QPEToolBar *toolbar = new QPEToolBar(this);
52 toolbar->setHorizontalStretchable( TRUE ); 52 toolbar->setHorizontalStretchable( TRUE );
53 addToolBar(toolbar); 53 addToolBar(toolbar);
54 54
55 QPEMenuBar *menubar = new QPEMenuBar( toolbar ); 55 QMenuBar *menubar = new QMenuBar( toolbar );
56 menubar->setMargin(0); 56 menubar->setMargin(0);
57 57
58 QPopupMenu *game = new QPopupMenu( this ); 58 QPopupMenu *game = new QPopupMenu( this );
59 59
60 QWidget *spacer = new QWidget( toolbar ); 60 QWidget *spacer = new QWidget( toolbar );
61 spacer->setBackgroundMode( PaletteButton ); 61 spacer->setBackgroundMode( PaletteButton );
62 toolbar->setStretchableWidget( spacer ); 62 toolbar->setStretchableWidget( spacer );
63 63
64 QAction *a = new QAction( tr( "Randomize" ), Resource::loadPixmap( "new" ), 64 QAction *a = new QAction( tr( "Randomize" ), Resource::loadPixmap( "new" ),
65 QString::null, 0, this, 0 ); 65 QString::null, 0, this, 0 );
66 connect( a, SIGNAL( activated() ), table, SLOT( slotRandomize() ) ); 66 connect( a, SIGNAL( activated() ), table, SLOT( slotRandomize() ) );
67 a->addTo( game ); 67 a->addTo( game );
68 a->addTo( toolbar ); 68 a->addTo( toolbar );
69 69
70 a = new QAction( tr( "Solve" ), Resource::loadPixmap( "repeat" ), 70 a = new QAction( tr( "Solve" ), Resource::loadPixmap( "repeat" ),
71 QString::null, 0, this, 0 ); 71 QString::null, 0, this, 0 );
72 connect( a, SIGNAL( activated() ), table, SLOT( slotReset() ) ); 72 connect( a, SIGNAL( activated() ), table, SLOT( slotReset() ) );
73 a->addTo( game ); 73 a->addTo( game );
74 a->addTo( toolbar ); 74 a->addTo( toolbar );
75 75
76 menubar->insertItem( tr( "Game" ), game ); 76 menubar->insertItem( tr( "Game" ), game );
77} 77}
78 78
79PiecesTable::PiecesTable(QWidget* parent, const char* name ) 79PiecesTable::PiecesTable(QWidget* parent, const char* name )
80 : QTableView(parent, name), _menu(0), _randomized(false) 80 : QTableView(parent, name), _menu(0), _randomized(false)
81{ 81{
82 // setup table view 82 // setup table view
83 setFrameStyle(StyledPanel | Sunken); 83 setFrameStyle(StyledPanel | Sunken);
84 setBackgroundMode(NoBackground); 84 setBackgroundMode(NoBackground);
85 setMouseTracking(true); 85 setMouseTracking(true);
86 86
87 setNumRows(4); 87 setNumRows(4);
88 setNumCols(4); 88 setNumCols(4);
89 89
90 // init arrays 90 // init arrays
91 initMap(); 91 initMap();
92 readConfig(); 92 readConfig();
93 initColors(); 93 initColors();
94 94
95 // set font 95 // set font
96 QFont f = font(); 96 QFont f = font();
97 f.setPixelSize(18); 97 f.setPixelSize(18);
98 f.setBold( TRUE ); 98 f.setBold( TRUE );
99 setFont(f); 99 setFont(f);
100} 100}
101 101
102PiecesTable::~PiecesTable() 102PiecesTable::~PiecesTable()
103{ 103{
diff --git a/noncore/games/go/gowidget.cpp b/noncore/games/go/gowidget.cpp
index 1d38c9f..476f7ce1 100644
--- a/noncore/games/go/gowidget.cpp
+++ b/noncore/games/go/gowidget.cpp
@@ -17,97 +17,97 @@
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "gowidget.h" 21#include "gowidget.h"
22 22
23#include <qpe/config.h> 23#include <qpe/config.h>
24#include <qpe/resource.h> 24#include <qpe/resource.h>
25 25
26#include <qpainter.h> 26#include <qpainter.h>
27#include <qpixmap.h> 27#include <qpixmap.h>
28#include <qpe/qpetoolbar.h> 28#include <qpe/qpetoolbar.h>
29#include <qpe/qpemenubar.h> 29#include <qpe/qpemenubar.h>
30#include <qpopupmenu.h> 30#include <qpopupmenu.h>
31#include <qaction.h> 31#include <qaction.h>
32#include <qapplication.h> //processEvents() 32#include <qapplication.h> //processEvents()
33#include <qlabel.h> 33#include <qlabel.h>
34 34
35//#include <stdio.h> 35//#include <stdio.h>
36 36
37#include "amigo.h" 37#include "amigo.h"
38#include "goplayutils.h" 38#include "goplayutils.h"
39 39
40static const enum bVal computer_color = BLACK; 40static const enum bVal computer_color = BLACK;
41 41
42static int current_handicap = 1; 42static int current_handicap = 1;
43 43
44static QBrush *goBrush; 44static QBrush *goBrush;
45//static QImage *newBlackStone; 45//static QImage *newBlackStone;
46//static QImage *blackStone; 46//static QImage *blackStone;
47//static QImage *whiteStone; 47//static QImage *whiteStone;
48static QPixmap *newBlackStone; 48static QPixmap *newBlackStone;
49static QPixmap *blackStone; 49static QPixmap *blackStone;
50static QPixmap *whiteStone; 50static QPixmap *whiteStone;
51 51
52static bool smallStones = FALSE; 52static bool smallStones = FALSE;
53 53
54GoMainWidget::GoMainWidget( QWidget *parent, const char* name) : 54GoMainWidget::GoMainWidget( QWidget *parent, const char* name) :
55 QMainWindow( parent, name ) 55 QMainWindow( parent, name )
56{ 56{
57 setToolBarsMovable( FALSE ); 57 setToolBarsMovable( FALSE );
58 GoWidget *go = new GoWidget(this); 58 GoWidget *go = new GoWidget(this);
59 59
60 setCentralWidget(go); 60 setCentralWidget(go);
61 toolbar = new QPEToolBar(this); 61 toolbar = new QPEToolBar(this);
62 toolbar->setHorizontalStretchable( TRUE ); 62 toolbar->setHorizontalStretchable( TRUE );
63 addToolBar(toolbar); 63 addToolBar(toolbar);
64 64
65 QPEMenuBar *mb = new QPEMenuBar( toolbar ); 65 QMenuBar *mb = new QMenuBar( toolbar );
66 mb->setMargin(0); 66 mb->setMargin(0);
67 QPopupMenu *file = new QPopupMenu( this ); 67 QPopupMenu *file = new QPopupMenu( this );
68 68
69 QAction *a = new QAction( tr( "New Game" ), QString::null, 0, this, 0 ); 69 QAction *a = new QAction( tr( "New Game" ), QString::null, 0, this, 0 );
70 connect( a, SIGNAL( activated() ), go, SLOT( newGame() ) ); 70 connect( a, SIGNAL( activated() ), go, SLOT( newGame() ) );
71 a->addTo( file ); 71 a->addTo( file );
72 72
73 a = new QAction( tr( "Pass" ), Resource::loadPixmap( "pass" ), QString::null, 0, this, 0 ); 73 a = new QAction( tr( "Pass" ), Resource::loadPixmap( "pass" ), QString::null, 0, this, 0 );
74 connect( a, SIGNAL( activated() ), go, SLOT( pass() ) ); 74 connect( a, SIGNAL( activated() ), go, SLOT( pass() ) );
75 a->addTo( file ); 75 a->addTo( file );
76 a->addTo( toolbar ); 76 a->addTo( toolbar );
77 77
78 78
79 a = new QAction( tr( "Resign" ), Resource::loadPixmap( "reset" ), QString::null, 0, this, 0 ); 79 a = new QAction( tr( "Resign" ), Resource::loadPixmap( "reset" ), QString::null, 0, this, 0 );
80 connect( a, SIGNAL( activated() ), go, SLOT( resign() ) ); 80 connect( a, SIGNAL( activated() ), go, SLOT( resign() ) );
81 a->addTo( file ); 81 a->addTo( file );
82 82
83 a = new QAction( tr( "Two player option" ), QString::null, 0, this, 0 ); 83 a = new QAction( tr( "Two player option" ), QString::null, 0, this, 0 );
84 a->setToggleAction( TRUE ); 84 a->setToggleAction( TRUE );
85 connect( a, SIGNAL( toggled(bool) ), go, SLOT( setTwoplayer(bool) ) ); 85 connect( a, SIGNAL( toggled(bool) ), go, SLOT( setTwoplayer(bool) ) );
86 a->addTo( file ); 86 a->addTo( file );
87 87
88 mb->insertItem( tr( "Game" ), file ); 88 mb->insertItem( tr( "Game" ), file );
89 89
90 QLabel *turnLabel = new QLabel( toolbar ); 90 QLabel *turnLabel = new QLabel( toolbar );
91 turnLabel->setBackgroundMode( PaletteButton ); 91 turnLabel->setBackgroundMode( PaletteButton );
92 connect( go, SIGNAL(showTurn(const QPixmap&)), 92 connect( go, SIGNAL(showTurn(const QPixmap&)),
93 turnLabel, SLOT(setPixmap(const QPixmap&)) ); 93 turnLabel, SLOT(setPixmap(const QPixmap&)) );
94 94
95 95
96 QLabel * scoreLabel = new QLabel( toolbar ); 96 QLabel * scoreLabel = new QLabel( toolbar );
97 scoreLabel->setBackgroundMode( PaletteButton ); 97 scoreLabel->setBackgroundMode( PaletteButton );
98 connect( go, SIGNAL(showScore(const QString&)), 98 connect( go, SIGNAL(showScore(const QString&)),
99 scoreLabel, SLOT(setText(const QString&)) ); 99 scoreLabel, SLOT(setText(const QString&)) );
100 100
101 toolbar->setStretchableWidget( scoreLabel ); 101 toolbar->setStretchableWidget( scoreLabel );
102 102
103 go->readConfig(); 103 go->readConfig();
104} 104}
105 105
106void GoMainWidget::resizeEvent( QResizeEvent * ) 106void GoMainWidget::resizeEvent( QResizeEvent * )
107{ 107{
108 //### this won't work because of the text label... 108 //### this won't work because of the text label...
109 /* 109 /*
110 if ( width() > height() ) 110 if ( width() > height() )
111 moveToolBar( toolbar, Left ); 111 moveToolBar( toolbar, Left );
112 else 112 else
113 moveToolBar( toolbar, Top ); 113 moveToolBar( toolbar, Top );
diff --git a/noncore/games/minesweep/minesweep.cpp b/noncore/games/minesweep/minesweep.cpp
index c84fe53..814070b 100644
--- a/noncore/games/minesweep/minesweep.cpp
+++ b/noncore/games/minesweep/minesweep.cpp
@@ -201,97 +201,97 @@ void ResultIndicator::center()
201 pp.y() + w->height()/ 2 - s.height()/2 ); 201 pp.y() + w->height()/ 2 - s.height()/2 );
202 202
203 setGeometry( QRect(pp, s) ); 203 setGeometry( QRect(pp, s) );
204 204
205} 205}
206 206
207void ResultIndicator::timerEvent( QTimerEvent *te ) 207void ResultIndicator::timerEvent( QTimerEvent *te )
208{ 208{
209 if ( te->timerId() != timerId ) 209 if ( te->timerId() != timerId )
210 return; 210 return;
211 killTimer( timerId ); 211 killTimer( timerId );
212 if ( twoStage ) { 212 if ( twoStage ) {
213 center(); 213 center();
214 twoStage = FALSE; 214 twoStage = FALSE;
215 timerId = startTimer( 1000 ); 215 timerId = startTimer( 1000 );
216 } else { 216 } else {
217 delete this; 217 delete this;
218 } 218 }
219} 219}
220 220
221 221
222class MineFrame : public QFrame 222class MineFrame : public QFrame
223{ 223{
224public: 224public:
225 MineFrame( QWidget *parent, const char *name = 0 ) 225 MineFrame( QWidget *parent, const char *name = 0 )
226 :QFrame( parent, name ) {} 226 :QFrame( parent, name ) {}
227 void setField( MineField *f ) { field = f; } 227 void setField( MineField *f ) { field = f; }
228protected: 228protected:
229 void resizeEvent( QResizeEvent *e ) { 229 void resizeEvent( QResizeEvent *e ) {
230 field->setAvailableRect( contentsRect()); 230 field->setAvailableRect( contentsRect());
231 QFrame::resizeEvent(e); 231 QFrame::resizeEvent(e);
232 } 232 }
233private: 233private:
234 MineField *field; 234 MineField *field;
235}; 235};
236 236
237 237
238 238
239MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f ) 239MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f )
240: QMainWindow( parent, name, f ) 240: QMainWindow( parent, name, f )
241{ 241{
242 srand(::time(0)); 242 srand(::time(0));
243 setCaption( tr("Mine Hunt") ); 243 setCaption( tr("Mine Hunt") );
244 setIcon( Resource::loadPixmap( "minesweep_icon" ) ); 244 setIcon( Resource::loadPixmap( "minesweep_icon" ) );
245 245
246 QPEToolBar *toolBar = new QPEToolBar( this ); 246 QPEToolBar *toolBar = new QPEToolBar( this );
247 toolBar->setHorizontalStretchable( TRUE ); 247 toolBar->setHorizontalStretchable( TRUE );
248 248
249 QPEMenuBar *menuBar = new QPEMenuBar( toolBar ); 249 QMenuBar *menuBar = new QMenuBar( toolBar );
250 250
251 QPopupMenu *gameMenu = new QPopupMenu( this ); 251 QPopupMenu *gameMenu = new QPopupMenu( this );
252 gameMenu->insertItem( tr("Beginner"), this, SLOT( beginner() ) ); 252 gameMenu->insertItem( tr("Beginner"), this, SLOT( beginner() ) );
253 gameMenu->insertItem( tr("Advanced"), this, SLOT( advanced() ) ); 253 gameMenu->insertItem( tr("Advanced"), this, SLOT( advanced() ) );
254 gameMenu->insertItem( tr("Expert"), this, SLOT( expert() ) ); 254 gameMenu->insertItem( tr("Expert"), this, SLOT( expert() ) );
255 255
256 menuBar->insertItem( tr("Game"), gameMenu ); 256 menuBar->insertItem( tr("Game"), gameMenu );
257 257
258 guessLCD = new QLCDNumber( toolBar ); 258 guessLCD = new QLCDNumber( toolBar );
259 toolBar->setStretchableWidget( guessLCD ); 259 toolBar->setStretchableWidget( guessLCD );
260 260
261 QPalette lcdPal( red ); 261 QPalette lcdPal( red );
262 lcdPal.setColor( QColorGroup::Background, QApplication::palette().active().background() ); 262 lcdPal.setColor( QColorGroup::Background, QApplication::palette().active().background() );
263 lcdPal.setColor( QColorGroup::Button, QApplication::palette().active().button() ); 263 lcdPal.setColor( QColorGroup::Button, QApplication::palette().active().button() );
264 264
265// guessLCD->setPalette( lcdPal ); 265// guessLCD->setPalette( lcdPal );
266 guessLCD->setSegmentStyle( QLCDNumber::Flat ); 266 guessLCD->setSegmentStyle( QLCDNumber::Flat );
267 guessLCD->setFrameStyle( QFrame::NoFrame ); 267 guessLCD->setFrameStyle( QFrame::NoFrame );
268 guessLCD->setNumDigits( 2 ); 268 guessLCD->setNumDigits( 2 );
269 guessLCD->setBackgroundMode( PaletteButton ); 269 guessLCD->setBackgroundMode( PaletteButton );
270 newGameButton = new QPushButton( toolBar ); 270 newGameButton = new QPushButton( toolBar );
271 newGameButton->setPixmap( QPixmap( pix_new ) ); 271 newGameButton->setPixmap( QPixmap( pix_new ) );
272 newGameButton->setFocusPolicy(QWidget::NoFocus); 272 newGameButton->setFocusPolicy(QWidget::NoFocus);
273 connect( newGameButton, SIGNAL(clicked()), this, SLOT(newGame()) ); 273 connect( newGameButton, SIGNAL(clicked()), this, SLOT(newGame()) );
274 274
275 timeLCD = new QLCDNumber( toolBar ); 275 timeLCD = new QLCDNumber( toolBar );
276// timeLCD->setPalette( lcdPal ); 276// timeLCD->setPalette( lcdPal );
277 timeLCD->setSegmentStyle( QLCDNumber::Flat ); 277 timeLCD->setSegmentStyle( QLCDNumber::Flat );
278 timeLCD->setFrameStyle( QFrame::NoFrame ); 278 timeLCD->setFrameStyle( QFrame::NoFrame );
279 timeLCD->setNumDigits( 5 ); // "mm:ss" 279 timeLCD->setNumDigits( 5 ); // "mm:ss"
280 timeLCD->setBackgroundMode( PaletteButton ); 280 timeLCD->setBackgroundMode( PaletteButton );
281 281
282 setToolBarsMovable ( FALSE ); 282 setToolBarsMovable ( FALSE );
283 283
284 addToolBar( toolBar ); 284 addToolBar( toolBar );
285 285
286 MineFrame *mainframe = new MineFrame( this ); 286 MineFrame *mainframe = new MineFrame( this );
287 mainframe->setFrameShape( QFrame::Box ); 287 mainframe->setFrameShape( QFrame::Box );
288 mainframe->setFrameShadow( QFrame::Raised ); 288 mainframe->setFrameShadow( QFrame::Raised );
289 289
290 mainframe->setLineWidth(2); 290 mainframe->setLineWidth(2);
291 291
292 field = new MineField( mainframe ); 292 field = new MineField( mainframe );
293 mainframe->setField( field ); 293 mainframe->setField( field );
294 QFont fnt = field->font(); 294 QFont fnt = field->font();
295 fnt.setBold( TRUE ); 295 fnt.setBold( TRUE );
296 field->setFont( QFont( fnt ) ); 296 field->setFont( QFont( fnt ) );
297 field->setFocus(); 297 field->setFocus();
diff --git a/noncore/games/solitaire/canvascardgame.h b/noncore/games/solitaire/canvascardgame.h
index d159de6..b93cfbf 100644
--- a/noncore/games/solitaire/canvascardgame.h
+++ b/noncore/games/solitaire/canvascardgame.h
@@ -1,79 +1,79 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef CANVAS_CARD_GAME_H 20#ifndef CANVAS_CARD_GAME_H
21#define CANVAS_CARD_GAME_H 21#define CANVAS_CARD_GAME_H
22 22
23#include "cardgame.h" 23#include "cardgame.h"
24#include "canvasshapes.h" 24#include "canvasshapes.h"
25#include "canvascard.h" 25#include "canvascard.h"
26 26
27#include <qpe/resource.h> 27#include <qpe/resource.h>
28#include <qpe/config.h> 28#include <qpe/config.h>
29 29
30#include <qmainwindow.h> 30#include <qmainwindow.h>
31#include <qpe/qpemenubar.h> 31#include <qmenubar.h>
32#include <qpainter.h> 32#include <qpainter.h>
33 33
34#include <stdlib.h> 34#include <stdlib.h>
35#include <time.h> 35#include <time.h>
36 36
37 37
38class CanvasCardPile; 38class CanvasCardPile;
39 39
40 40
41class CanvasCardGame : public QCanvasView, public CardGame 41class CanvasCardGame : public QCanvasView, public CardGame
42{ 42{
43public: 43public:
44 CanvasCardGame(QCanvas &c, bool snap, QWidget *parent = 0, int numOfDecks = 1, const char *name = 0, WFlags f = 0) : 44 CanvasCardGame(QCanvas &c, bool snap, QWidget *parent = 0, int numOfDecks = 1, const char *name = 0, WFlags f = 0) :
45 QCanvasView( &c, parent, name, f ), 45 QCanvasView( &c, parent, name, f ),
46 CardGame(0,numOfDecks), 46 CardGame(0,numOfDecks),
47 moved(FALSE), 47 moved(FALSE),
48 moving(NULL), 48 moving(NULL),
49 alphaCardPile( NULL ), 49 alphaCardPile( NULL ),
50 cardXOff(0), cardYOff(0), 50 cardXOff(0), cardYOff(0),
51 snapOn(snap), 51 snapOn(snap),
52 numberToDraw(1) { } 52 numberToDraw(1) { }
53 53
54 virtual ~CanvasCardGame(); 54 virtual ~CanvasCardGame();
55 55
56 virtual Card *newCard( eValue v, eSuit s, bool f ) { 56 virtual Card *newCard( eValue v, eSuit s, bool f ) {
57 return new CanvasCard( v, s, f, canvas() ); 57 return new CanvasCard( v, s, f, canvas() );
58 } 58 }
59 59
60 virtual void readConfig( Config& cfg ) { Q_UNUSED( cfg ); } 60 virtual void readConfig( Config& cfg ) { Q_UNUSED( cfg ); }
61 virtual void writeConfig( Config& cfg ) { Q_UNUSED( cfg ); } 61 virtual void writeConfig( Config& cfg ) { Q_UNUSED( cfg ); }
62 62
63 virtual void gameWon(); 63 virtual void gameWon();
64 virtual bool haveWeWon() { return FALSE; } 64 virtual bool haveWeWon() { return FALSE; }
65 65
66 virtual bool mousePressCard(Card *card, QPoint p) { Q_UNUSED(card); Q_UNUSED(p); return FALSE; } 66 virtual bool mousePressCard(Card *card, QPoint p) { Q_UNUSED(card); Q_UNUSED(p); return FALSE; }
67 virtual void mouseReleaseCard(Card *card, QPoint p) { Q_UNUSED(card); Q_UNUSED(p); } 67 virtual void mouseReleaseCard(Card *card, QPoint p) { Q_UNUSED(card); Q_UNUSED(p); }
68 68
69 void cancelMoving() { moving = NULL; } 69 void cancelMoving() { moving = NULL; }
70 void toggleSnap() { snapOn = (snapOn == TRUE) ? FALSE : TRUE; } 70 void toggleSnap() { snapOn = (snapOn == TRUE) ? FALSE : TRUE; }
71 void toggleCardsDrawn() { numberToDraw = (numberToDraw == 1) ? 3 : 1; } 71 void toggleCardsDrawn() { numberToDraw = (numberToDraw == 1) ? 3 : 1; }
72 int cardsDrawn() { return numberToDraw; } 72 int cardsDrawn() { return numberToDraw; }
73 void setNumberToDraw(int numToDraw) { this->numberToDraw = numToDraw; } 73 void setNumberToDraw(int numToDraw) { this->numberToDraw = numToDraw; }
74 74
75 void readPile( Config& cfg, CardPile *pile, QString name, int& highestZ ); 75 void readPile( Config& cfg, CardPile *pile, QString name, int& highestZ );
76 76
77protected: 77protected:
78 void contentsMousePressEvent(QMouseEvent *e); 78 void contentsMousePressEvent(QMouseEvent *e);
79 void contentsMouseReleaseEvent(QMouseEvent *e); 79 void contentsMouseReleaseEvent(QMouseEvent *e);
diff --git a/noncore/games/solitaire/canvascardwindow.cpp b/noncore/games/solitaire/canvascardwindow.cpp
index 317a02d..dec5591 100644
--- a/noncore/games/solitaire/canvascardwindow.cpp
+++ b/noncore/games/solitaire/canvascardwindow.cpp
@@ -12,97 +12,97 @@
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "canvascardwindow.h" 21#include "canvascardwindow.h"
22#include "patiencecardgame.h" 22#include "patiencecardgame.h"
23#include "freecellcardgame.h" 23#include "freecellcardgame.h"
24#include "chicanecardgame.h" 24#include "chicanecardgame.h"
25#include "harpcardgame.h" 25#include "harpcardgame.h"
26#include "teeclubcardgame.h" 26#include "teeclubcardgame.h"
27 27
28#include <qpe/resource.h> 28#include <qpe/resource.h>
29 29
30#include <qmainwindow.h> 30#include <qmainwindow.h>
31#include <qpopupmenu.h> 31#include <qpopupmenu.h>
32#include <qstyle.h> 32#include <qstyle.h>
33 33
34 34
35CanvasCardWindow::CanvasCardWindow(QWidget* parent, const char* name, WFlags f) : 35CanvasCardWindow::CanvasCardWindow(QWidget* parent, const char* name, WFlags f) :
36 QMainWindow(parent, name, f), canvas(230, 260), snapOn(TRUE), cardBack(4), gameType(0), 36 QMainWindow(parent, name, f), canvas(230, 260), snapOn(TRUE), cardBack(4), gameType(0),
37 cardGame(NULL) 37 cardGame(NULL)
38{ 38{
39 setIcon( Resource::loadPixmap( "cards" ) ); 39 setIcon( Resource::loadPixmap( "cards" ) );
40 40
41 // Create Playing Area for Games 41 // Create Playing Area for Games
42 if ( QPixmap::defaultDepth() < 12 ) { 42 if ( QPixmap::defaultDepth() < 12 ) {
43// canvas.setBackgroundColor(QColor(0x51, 0x74, 0x6B)); 43// canvas.setBackgroundColor(QColor(0x51, 0x74, 0x6B));
44// canvas.setBackgroundColor(QColor(0x20, 0xb0, 0x50)); 44// canvas.setBackgroundColor(QColor(0x20, 0xb0, 0x50));
45 canvas.setBackgroundColor(QColor(0x08, 0x98, 0x2D)); 45 canvas.setBackgroundColor(QColor(0x08, 0x98, 0x2D));
46 } else { 46 } else {
47 QPixmap bg; 47 QPixmap bg;
48 bg.convertFromImage( Resource::loadImage( "table_pattern" ), ThresholdDither ); 48 bg.convertFromImage( Resource::loadImage( "table_pattern" ), ThresholdDither );
49 canvas.setBackgroundPixmap(bg); 49 canvas.setBackgroundPixmap(bg);
50 } 50 }
51 51
52#if defined( QT_QWS_CASSIOPEIA ) 52#if defined( QT_QWS_CASSIOPEIA )
53 canvas.setAdvancePeriod(70); 53 canvas.setAdvancePeriod(70);
54#else 54#else
55 canvas.setAdvancePeriod(30); 55 canvas.setAdvancePeriod(30);
56#endif 56#endif
57 57
58 58
59#ifdef _PATIENCE_USE_ACCELS_ 59#ifdef _PATIENCE_USE_ACCELS_
60 QPEMenuBar* menu = menuBar(); 60 QMenuBar* menu = menuBar();
61 61
62 QPopupMenu* file = new QPopupMenu; 62 QPopupMenu* file = new QPopupMenu;
63 file->insertItem(tr("Patience"), this, SLOT(initPatience()), CTRL+Key_F); 63 file->insertItem(tr("Patience"), this, SLOT(initPatience()), CTRL+Key_F);
64 file->insertItem(tr("Freecell"), this, SLOT(initFreecell()), CTRL+Key_F); 64 file->insertItem(tr("Freecell"), this, SLOT(initFreecell()), CTRL+Key_F);
65 file->insertItem(tr("Chicane"), this, SLOT(initChicane()), CTRL+Key_F); 65 file->insertItem(tr("Chicane"), this, SLOT(initChicane()), CTRL+Key_F);
66 file->insertItem(tr("Harp"), this, SLOT(initHarp()), CTRL+Key_F); 66 file->insertItem(tr("Harp"), this, SLOT(initHarp()), CTRL+Key_F);
67 file->insertItem(tr("Teeclub"), this, SLOT(initTeeclub()), CTRL+Key_F); 67 file->insertItem(tr("Teeclub"), this, SLOT(initTeeclub()), CTRL+Key_F);
68 menu->insertItem(tr("&Game"), file); 68 menu->insertItem(tr("&Game"), file);
69 69
70 menu->insertSeparator(); 70 menu->insertSeparator();
71 71
72 settings = new QPopupMenu; 72 settings = new QPopupMenu;
73 settings->insertItem(tr("&Change card backs"), this, SLOT(changeCardBacks()), Key_F2); 73 settings->insertItem(tr("&Change card backs"), this, SLOT(changeCardBacks()), Key_F2);
74 snap_id = settings->insertItem(tr("&Snap to position"), this, SLOT(snapToggle()), Key_F3); 74 snap_id = settings->insertItem(tr("&Snap to position"), this, SLOT(snapToggle()), Key_F3);
75 settings->setCheckable(TRUE); 75 settings->setCheckable(TRUE);
76 menu->insertItem(tr("&Settings"),settings); 76 menu->insertItem(tr("&Settings"),settings);
77 77
78 menu->insertSeparator(); 78 menu->insertSeparator();
79 79
80 QPopupMenu* help = new QPopupMenu; 80 QPopupMenu* help = new QPopupMenu;
81 help->insertItem(tr("&About"), this, SLOT(help()), Key_F1); 81 help->insertItem(tr("&About"), this, SLOT(help()), Key_F1);
82 help->setItemChecked(dbf_id, TRUE); 82 help->setItemChecked(dbf_id, TRUE);
83 menu->insertItem(tr("&Help"),help); 83 menu->insertItem(tr("&Help"),help);
84#else 84#else
85 QMenuBar* menu = menuBar(); 85 QMenuBar* menu = menuBar();
86 86
87 QPopupMenu* file = new QPopupMenu; 87 QPopupMenu* file = new QPopupMenu;
88 file->insertItem(tr("Patience"), this, SLOT(initPatience())); 88 file->insertItem(tr("Patience"), this, SLOT(initPatience()));
89 file->insertItem(tr("Freecell"), this, SLOT(initFreecell())); 89 file->insertItem(tr("Freecell"), this, SLOT(initFreecell()));
90 file->insertItem(tr("Chicane"), this, SLOT(initChicane())); 90 file->insertItem(tr("Chicane"), this, SLOT(initChicane()));
91 file->insertItem(tr("Harp"), this, SLOT(initHarp())); 91 file->insertItem(tr("Harp"), this, SLOT(initHarp()));
92 file->insertItem(tr("Teeclub"), this, SLOT(initTeeclub())); 92 file->insertItem(tr("Teeclub"), this, SLOT(initTeeclub()));
93 menu->insertItem(tr("Play"), file); 93 menu->insertItem(tr("Play"), file);
94 94
95 menu->insertSeparator(); 95 menu->insertSeparator();
96 96
97 settings = new QPopupMenu; 97 settings = new QPopupMenu;
98 settings->setCheckable(TRUE); 98 settings->setCheckable(TRUE);
99 settings->insertItem(tr("Change card backs"), this, SLOT(changeCardBacks())); 99 settings->insertItem(tr("Change card backs"), this, SLOT(changeCardBacks()));
100 snap_id = settings->insertItem(tr("Snap to position"), this, SLOT(snapToggle())); 100 snap_id = settings->insertItem(tr("Snap to position"), this, SLOT(snapToggle()));
101 QString m; 101 QString m;
102 102
103 drawId = settings->insertItem(tr("Turn one card"), this, SLOT(drawnToggle())); 103 drawId = settings->insertItem(tr("Turn one card"), this, SLOT(drawnToggle()));
104 menu->insertItem(tr("Settings"),settings); 104 menu->insertItem(tr("Settings"),settings);
105 settings->setCheckable(TRUE); 105 settings->setCheckable(TRUE);
106 106
107#endif 107#endif
108 108
diff --git a/noncore/graphics/drawpad/drawpad.cpp b/noncore/graphics/drawpad/drawpad.cpp
index ac08e15..feae237 100644
--- a/noncore/graphics/drawpad/drawpad.cpp
+++ b/noncore/graphics/drawpad/drawpad.cpp
@@ -20,97 +20,97 @@
20#include "filledellipsetool.h" 20#include "filledellipsetool.h"
21#include "filledrectangletool.h" 21#include "filledrectangletool.h"
22#include "filltool.h" 22#include "filltool.h"
23#include "importdialog.h" 23#include "importdialog.h"
24#include "linetool.h" 24#include "linetool.h"
25#include "newpagedialog.h" 25#include "newpagedialog.h"
26#include "page.h" 26#include "page.h"
27#include "pageinformationdialog.h" 27#include "pageinformationdialog.h"
28#include "pointtool.h" 28#include "pointtool.h"
29#include "rectangletool.h" 29#include "rectangletool.h"
30#include "texttool.h" 30#include "texttool.h"
31#include "thumbnailview.h" 31#include "thumbnailview.h"
32 32
33#include <opie/colordialog.h> 33#include <opie/colordialog.h>
34#include <opie/colorpopupmenu.h> 34#include <opie/colorpopupmenu.h>
35 35
36#include <qpe/applnk.h> 36#include <qpe/applnk.h>
37#include <qpe/config.h> 37#include <qpe/config.h>
38#include <qpe/global.h> 38#include <qpe/global.h>
39#include <qpe/qpemenubar.h> 39#include <qpe/qpemenubar.h>
40#include <qpe/qpetoolbar.h> 40#include <qpe/qpetoolbar.h>
41#include <qpe/resource.h> 41#include <qpe/resource.h>
42 42
43#include <qaction.h> 43#include <qaction.h>
44#include <qfile.h> 44#include <qfile.h>
45#include <qmessagebox.h> 45#include <qmessagebox.h>
46#include <qpainter.h> 46#include <qpainter.h>
47#include <qspinbox.h> 47#include <qspinbox.h>
48#include <qtoolbutton.h> 48#include <qtoolbutton.h>
49#include <qtooltip.h> 49#include <qtooltip.h>
50#include <qwhatsthis.h> 50#include <qwhatsthis.h>
51 51
52DrawPad::DrawPad(QWidget* parent, const char* name, WFlags fl ) 52DrawPad::DrawPad(QWidget* parent, const char* name, WFlags fl )
53 : QMainWindow(parent, name, WStyle_ContextHelp) 53 : QMainWindow(parent, name, WStyle_ContextHelp)
54{ 54{
55 // init members 55 // init members
56 56
57 m_pDrawPadCanvas = new DrawPadCanvas(this, this); 57 m_pDrawPadCanvas = new DrawPadCanvas(this, this);
58 58
59 connect(m_pDrawPadCanvas, SIGNAL(pagesChanged()), this, SLOT(updateView())); 59 connect(m_pDrawPadCanvas, SIGNAL(pagesChanged()), this, SLOT(updateView()));
60 60
61 setCentralWidget(m_pDrawPadCanvas); 61 setCentralWidget(m_pDrawPadCanvas);
62 62
63 // init menu 63 // init menu
64 64
65 setToolBarsMovable(false); 65 setToolBarsMovable(false);
66 66
67 QPEToolBar* menuToolBar = new QPEToolBar(this); 67 QPEToolBar* menuToolBar = new QPEToolBar(this);
68 QPEMenuBar* menuBar = new QPEMenuBar(menuToolBar); 68 QMenuBar* menuBar = new QMenuBar(menuToolBar);
69 69
70 QPopupMenu* toolsPopupMenu = new QPopupMenu(menuBar); 70 QPopupMenu* toolsPopupMenu = new QPopupMenu(menuBar);
71 71
72 QAction* deleteAllAction = new QAction(tr("Delete All"), QString::null, 0, this); 72 QAction* deleteAllAction = new QAction(tr("Delete All"), QString::null, 0, this);
73 connect(deleteAllAction, SIGNAL(activated()), this, SLOT(deleteAll())); 73 connect(deleteAllAction, SIGNAL(activated()), this, SLOT(deleteAll()));
74 deleteAllAction->addTo(toolsPopupMenu); 74 deleteAllAction->addTo(toolsPopupMenu);
75 75
76 toolsPopupMenu->insertSeparator(); 76 toolsPopupMenu->insertSeparator();
77 77
78 QAction* importPageAction = new QAction(tr("Import"), tr("Import..."), 0, this); 78 QAction* importPageAction = new QAction(tr("Import"), tr("Import..."), 0, this);
79 connect(importPageAction, SIGNAL(activated()), this, SLOT(importPage())); 79 connect(importPageAction, SIGNAL(activated()), this, SLOT(importPage()));
80 importPageAction->addTo(toolsPopupMenu); 80 importPageAction->addTo(toolsPopupMenu);
81 81
82 QAction* exportPageAction = new QAction(tr("Export"), tr("Export..."), 0, this); 82 QAction* exportPageAction = new QAction(tr("Export"), tr("Export..."), 0, this);
83 connect(exportPageAction, SIGNAL(activated()), this, SLOT(exportPage())); 83 connect(exportPageAction, SIGNAL(activated()), this, SLOT(exportPage()));
84 exportPageAction->addTo(toolsPopupMenu); 84 exportPageAction->addTo(toolsPopupMenu);
85 85
86 toolsPopupMenu->insertSeparator(); 86 toolsPopupMenu->insertSeparator();
87 87
88 QAction* thumbnailViewAction = new QAction(tr("Thumbnail View"), tr("Thumbnail View..."), 0, this); 88 QAction* thumbnailViewAction = new QAction(tr("Thumbnail View"), tr("Thumbnail View..."), 0, this);
89 connect(thumbnailViewAction, SIGNAL(activated()), this, SLOT(thumbnailView())); 89 connect(thumbnailViewAction, SIGNAL(activated()), this, SLOT(thumbnailView()));
90 thumbnailViewAction->addTo(toolsPopupMenu); 90 thumbnailViewAction->addTo(toolsPopupMenu);
91 91
92 QAction* pageInformationAction = new QAction(tr("Page Information"), tr("Page Information..."), 0, this); 92 QAction* pageInformationAction = new QAction(tr("Page Information"), tr("Page Information..."), 0, this);
93 connect(pageInformationAction, SIGNAL(activated()), this, SLOT(pageInformation())); 93 connect(pageInformationAction, SIGNAL(activated()), this, SLOT(pageInformation()));
94 pageInformationAction->addTo(toolsPopupMenu); 94 pageInformationAction->addTo(toolsPopupMenu);
95 95
96 toolsPopupMenu->insertSeparator(); 96 toolsPopupMenu->insertSeparator();
97 97
98 m_pAntiAliasingAction = new QAction(tr("Anti-Aliasing"), QString::null, 0, this); 98 m_pAntiAliasingAction = new QAction(tr("Anti-Aliasing"), QString::null, 0, this);
99 m_pAntiAliasingAction->setToggleAction(true); 99 m_pAntiAliasingAction->setToggleAction(true);
100 m_pAntiAliasingAction->addTo(toolsPopupMenu); 100 m_pAntiAliasingAction->addTo(toolsPopupMenu);
101 101
102 menuBar->insertItem(tr("Tools"), toolsPopupMenu); 102 menuBar->insertItem(tr("Tools"), toolsPopupMenu);
103 103
104 // init page toolbar 104 // init page toolbar
105 105
106 QPEToolBar* pageToolBar = new QPEToolBar(this); 106 QPEToolBar* pageToolBar = new QPEToolBar(this);
107 107
108 QAction* newPageAction = new QAction(tr("New Page"), Resource::loadPixmap("new"), QString::null, 0, this); 108 QAction* newPageAction = new QAction(tr("New Page"), Resource::loadPixmap("new"), QString::null, 0, this);
109 connect(newPageAction, SIGNAL(activated()), this, SLOT(newPage())); 109 connect(newPageAction, SIGNAL(activated()), this, SLOT(newPage()));
110 newPageAction->addTo(pageToolBar); 110 newPageAction->addTo(pageToolBar);
111 newPageAction->setWhatsThis( tr( "Click here to add a new sheet." ) ); 111 newPageAction->setWhatsThis( tr( "Click here to add a new sheet." ) );
112 112
113 QAction* clearPageAction = new QAction(tr("Clear Page"), Resource::loadPixmap("drawpad/clear"), QString::null, 0, this); 113 QAction* clearPageAction = new QAction(tr("Clear Page"), Resource::loadPixmap("drawpad/clear"), QString::null, 0, this);
114 connect(clearPageAction, SIGNAL(activated()), this, SLOT(clearPage())); 114 connect(clearPageAction, SIGNAL(activated()), this, SLOT(clearPage()));
115 clearPageAction->addTo(pageToolBar); 115 clearPageAction->addTo(pageToolBar);
116 clearPageAction->setWhatsThis( tr( "Click here to erase the current sheet." ) ); 116 clearPageAction->setWhatsThis( tr( "Click here to erase the current sheet." ) );
diff --git a/noncore/multimedia/showimg/showimg.cpp b/noncore/multimedia/showimg/showimg.cpp
index 56bdecf..b7754f7 100644
--- a/noncore/multimedia/showimg/showimg.cpp
+++ b/noncore/multimedia/showimg/showimg.cpp
@@ -186,97 +186,97 @@ void ImagePane::imageClicked()
186{ 186{
187 emit clicked(); 187 emit clicked();
188} 188}
189//=========================================================================== 189//===========================================================================
190/* 190/*
191 Draws the portion of the scaled pixmap that needs to be updated 191 Draws the portion of the scaled pixmap that needs to be updated
192*/ 192*/
193 193
194void ImageWidget::paintEvent( QPaintEvent *e ) 194void ImageWidget::paintEvent( QPaintEvent *e )
195{ 195{
196 QPainter painter(this); 196 QPainter painter(this);
197 197
198 painter.setClipRect(e->rect()); 198 painter.setClipRect(e->rect());
199 painter.fillRect(0,0,width(),height(),QColor(0,0,0)); 199 painter.fillRect(0,0,width(),height(),QColor(0,0,0));
200 200
201 if ( pixmap.size() != QSize( 0, 0 ) ) 201 if ( pixmap.size() != QSize( 0, 0 ) )
202 { // is an image loaded? 202 { // is an image loaded?
203 painter.drawPixmap((width() - pixmap.width()) / 2, (height() - pixmap.height()) / 2, pixmap); 203 painter.drawPixmap((width() - pixmap.width()) / 2, (height() - pixmap.height()) / 2, pixmap);
204 } 204 }
205} 205}
206 206
207void ImageWidget::mouseReleaseEvent(QMouseEvent *) 207void ImageWidget::mouseReleaseEvent(QMouseEvent *)
208{ 208{
209 emit clicked(); 209 emit clicked();
210} 210}
211 211
212//=========================================================================== 212//===========================================================================
213 213
214ImageViewer::ImageViewer( QWidget *parent, const char *name, int wFlags ) 214ImageViewer::ImageViewer( QWidget *parent, const char *name, int wFlags )
215: QMainWindow( parent, name, WResizeNoErase ), filename( 0 ), bFromDocView( FALSE ) 215: QMainWindow( parent, name, WResizeNoErase ), filename( 0 ), bFromDocView( FALSE )
216{ 216{
217 setCaption( tr("Image Viewer") ); 217 setCaption( tr("Image Viewer") );
218 setIcon( Resource::loadPixmap( "ImageViewer" ) ); 218 setIcon( Resource::loadPixmap( "ImageViewer" ) );
219 219
220 220
221 Config cfg("Image Viewer"); 221 Config cfg("Image Viewer");
222 cfg.setGroup("Image Viewer"); 222 cfg.setGroup("Image Viewer");
223 223
224 showThumbView=cfg.readBoolEntry("ShowThumbnails",false); 224 showThumbView=cfg.readBoolEntry("ShowThumbnails",false);
225 isSized=cfg.readBoolEntry("SizeToScreen",true); 225 isSized=cfg.readBoolEntry("SizeToScreen",true);
226 226
227 isFullScreen = FALSE; 227 isFullScreen = FALSE;
228 228
229 setToolBarsMovable( FALSE ); 229 setToolBarsMovable( FALSE );
230 230
231 toolBar = new QPEToolBar( this ); 231 toolBar = new QPEToolBar( this );
232 toolBar->setHorizontalStretchable( TRUE ); 232 toolBar->setHorizontalStretchable( TRUE );
233 233
234 menuBar = new QPEMenuBar( toolBar ); 234 menuBar = new QMenuBar( toolBar );
235 235
236 current=menuBar; 236 current=menuBar;
237 237
238 238
239 239
240 fileMenuFile = new QPopupMenu(this); 240 fileMenuFile = new QPopupMenu(this);
241 //menuBarmenubarFile->insertItem( tr("File"), fileMenu ); 241 //menuBarmenubarFile->insertItem( tr("File"), fileMenu );
242 fileMenuFile->insertItem(tr("Open"), 242 fileMenuFile->insertItem(tr("Open"),
243 this, SLOT(openFile()), 0); 243 this, SLOT(openFile()), 0);
244 244
245 viewMenuFile = new QPopupMenu( this ); 245 viewMenuFile = new QPopupMenu( this );
246 //menubarFile->insertItem( tr("View"), viewMenu ); 246 //menubarFile->insertItem( tr("View"), viewMenu );
247 viewMenuFile->insertItem( tr("Thumbnail View"), 247 viewMenuFile->insertItem( tr("Thumbnail View"),
248 this, SLOT(switchThumbView()), 0, SHOW_THUMBNAILS ); 248 this, SLOT(switchThumbView()), 0, SHOW_THUMBNAILS );
249 249
250 viewMenuFile->setItemChecked ( SHOW_THUMBNAILS, showThumbView ); 250 viewMenuFile->setItemChecked ( SHOW_THUMBNAILS, showThumbView );
251 251
252 252
253 253
254 254
255 optionsMenuFile = new QPopupMenu( this); 255 optionsMenuFile = new QPopupMenu( this);
256 //menubarFile->insertItem( tr("Options"),optionsMenu ); 256 //menubarFile->insertItem( tr("Options"),optionsMenu );
257 slideAction = new QAction( tr( "Slide show" ), Resource::loadIconSet( "slideshow" ), 257 slideAction = new QAction( tr( "Slide show" ), Resource::loadIconSet( "slideshow" ),
258 QString::null, 0, this, 0 ); 258 QString::null, 0, this, 0 );
259 slideAction->setToggleAction( TRUE ); 259 slideAction->setToggleAction( TRUE );
260 connect( slideAction, SIGNAL( toggled(bool) ), this, SLOT( slideShow(bool) ) ); 260 connect( slideAction, SIGNAL( toggled(bool) ), this, SLOT( slideShow(bool) ) );
261 slideAction->addTo( optionsMenuFile); 261 slideAction->addTo( optionsMenuFile);
262// slideAction->addTo( toolBar ); 262// slideAction->addTo( toolBar );
263 263
264 264
265// optionsMenuFile->insertItem( tr("Slideshow") ); 265// optionsMenuFile->insertItem( tr("Slideshow") );
266 optionsMenuFile->insertSeparator(); 266 optionsMenuFile->insertSeparator();
267 optionsMenuFile->insertItem( tr("Preferences.."), this, SLOT(settings()), 0); 267 optionsMenuFile->insertItem( tr("Preferences.."), this, SLOT(settings()), 0);
268// optionsMenuFile->insertItem( tr("Help"), this, SLOT(help()), 0); 268// optionsMenuFile->insertItem( tr("Help"), this, SLOT(help()), 0);
269 269
270 QStrList fmt = QImage::outputFormats(); 270 QStrList fmt = QImage::outputFormats();
271 271
272 272
273 fileMenuView = new QPopupMenu( this ); 273 fileMenuView = new QPopupMenu( this );
274 //menubarView->insertItem( tr("File"),fileMenu ); 274 //menubarView->insertItem( tr("File"),fileMenu );
275 fileMenuView->insertItem( tr("Image Info ..."),this, SLOT(displayInfoDialog()),0 ); 275 fileMenuView->insertItem( tr("Image Info ..."),this, SLOT(displayInfoDialog()),0 );
276 fileMenuView->insertSeparator(); 276 fileMenuView->insertSeparator();
277 277
278 viewMenuView = new QPopupMenu(this ); 278 viewMenuView = new QPopupMenu(this );
279 viewMenuView->setCheckable ( true ); 279 viewMenuView->setCheckable ( true );
280 280
281 //menubarView->insertItem( tr("View"),viewMenu ); 281 //menubarView->insertItem( tr("View"),viewMenu );
282 viewMenuView->insertItem(tr("Horizontal flip"), this, SLOT(hFlip()), 0); 282 viewMenuView->insertItem(tr("Horizontal flip"), this, SLOT(hFlip()), 0);
diff --git a/noncore/multimedia/showimg/showimg.h b/noncore/multimedia/showimg/showimg.h
index abbd976..da4c0b6 100644
--- a/noncore/multimedia/showimg/showimg.h
+++ b/noncore/multimedia/showimg/showimg.h
@@ -1,86 +1,86 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#ifndef SHOWIMG_H 21#ifndef SHOWIMG_H
22#define SHOWIMG_H 22#define SHOWIMG_H
23 23
24#include <qwidget.h> 24#include <qwidget.h>
25#include <qmainwindow.h> 25#include <qmainwindow.h>
26#include <qimage.h> 26#include <qimage.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qscrollview.h> 29#include <qscrollview.h>
30#include <qdialog.h> 30#include <qdialog.h>
31#include <qstringlist.h> 31#include <qstringlist.h>
32#include <qvaluelist.h> 32#include <qvaluelist.h>
33#include <qwmatrix.h> 33#include <qwmatrix.h>
34 34
35 35
36class QAction; 36class QAction;
37class QPEToolBar; 37class QPEToolBar;
38class QPEMenuBar; 38class QMenuBar;
39class QPopupMenu; 39class QPopupMenu;
40class QWidgetStack; 40class QWidgetStack;
41class FileSelector; 41class FileSelector;
42class DocLnk; 42class DocLnk;
43class QLabel; 43class QLabel;
44class QAction; 44class QAction;
45class QSpinBox; 45class QSpinBox;
46class ImageFileSelector; 46class ImageFileSelector;
47class QTimer; 47class QTimer;
48 48
49 49
50class ImageWidget : public QWidget 50class ImageWidget : public QWidget
51{ 51{
52 Q_OBJECT 52 Q_OBJECT
53 public: 53 public:
54 ImageWidget( QWidget *parent=0 ) 54 ImageWidget( QWidget *parent=0 )
55 : QWidget( parent ) { 55 : QWidget( parent ) {
56 setBackgroundMode(NoBackground); 56 setBackgroundMode(NoBackground);
57 } 57 }
58 ~ImageWidget() { } 58 ~ImageWidget() { }
59 59
60 void setPixmap( const QPixmap &pm ) { 60 void setPixmap( const QPixmap &pm ) {
61 pixmap = pm; 61 pixmap = pm;
62 show(); 62 show();
63 } 63 }
64 64
65signals: 65signals:
66 void clicked(); 66 void clicked();
67 67
68protected: 68protected:
69 void paintEvent( QPaintEvent * ); 69 void paintEvent( QPaintEvent * );
70 void mouseReleaseEvent(QMouseEvent* event); 70 void mouseReleaseEvent(QMouseEvent* event);
71 71
72private: 72private:
73 QPixmap pixmap; 73 QPixmap pixmap;
74}; 74};
75 75
76class InfoDialog:public QDialog 76class InfoDialog:public QDialog
77{ 77{
78 Q_OBJECT 78 Q_OBJECT
79 79
80public: 80public:
81 81
82 static void displayInfo(const QString &caption, const QStringList text, QWidget *parent); 82 static void displayInfo(const QString &caption, const QStringList text, QWidget *parent);
83 83
84private: 84private:
85 85
86 InfoDialog(const QString &caption,const QStringList text, QWidget *parent); 86 InfoDialog(const QString &caption,const QStringList text, QWidget *parent);
@@ -205,85 +205,85 @@ private:
205 void switchToImageView(); 205 void switchToImageView();
206 206
207 void updateImage(); 207 void updateImage();
208 208
209private slots: 209private slots:
210 210
211 void slideShow( bool on ); 211 void slideShow( bool on );
212 void help(); 212 void help();
213 void slideUpdate(); 213 void slideUpdate();
214 bool nextImage(); 214 bool nextImage();
215 bool prevImage(); 215 bool prevImage();
216 void settings(); 216 void settings();
217 217
218 void switchThumbView(); 218 void switchThumbView();
219 void switchSizeToScreen(); 219 void switchSizeToScreen();
220 void setDocument(const QString& fileref); 220 void setDocument(const QString& fileref);
221 void doDelayedLoad(); 221 void doDelayedLoad();
222 void openFile( const DocLnk &file ); 222 void openFile( const DocLnk &file );
223 void openFile(); 223 void openFile();
224 void open(); 224 void open();
225 void closeFileSelector(); 225 void closeFileSelector();
226 void hFlip(); 226 void hFlip();
227 void vFlip(); 227 void vFlip();
228 void rot180(); 228 void rot180();
229 void rot90(); 229 void rot90();
230 void rot270(); 230 void rot270();
231 void normalView(); 231 void normalView();
232 void fullScreen(); 232 void fullScreen();
233 void stopSlideShow(); 233 void stopSlideShow();
234 void blackAndWhite(); 234 void blackAndWhite();
235 void displayInfoDialog(); 235 void displayInfoDialog();
236 void displayControlsDialog(); 236 void displayControlsDialog();
237private: 237private:
238 QWMatrix matrix; 238 QWMatrix matrix;
239 bool rotated90; 239 bool rotated90;
240 enum MENU_ITEMS { 240 enum MENU_ITEMS {
241 SHOW_THUMBNAILS, 241 SHOW_THUMBNAILS,
242 SIZE_TO_SCREEN, 242 SIZE_TO_SCREEN,
243 BLACKANDWHITE 243 BLACKANDWHITE
244 }; 244 };
245 245
246 QString filename; 246 QString filename;
247 QString delayLoad; 247 QString delayLoad;
248 QImage image; // the loaded image 248 QImage image; // the loaded image
249 QPixmap pm; // the converted pixmap 249 QPixmap pm; // the converted pixmap
250 QPixmap pmScaled; // the scaled pixmap 250 QPixmap pmScaled; // the scaled pixmap
251 QPEToolBar *toolBar; 251 QPEToolBar *toolBar;
252 QPEToolBar *iconToolBar; 252 QPEToolBar *iconToolBar;
253 QPEMenuBar *menuBar; 253 QMenuBar *menuBar;
254 QPEMenuBar *current; 254 QMenuBar *current;
255 255
256 256
257 QPopupMenu *fileMenuFile; 257 QPopupMenu *fileMenuFile;
258 QPopupMenu *viewMenuFile; 258 QPopupMenu *viewMenuFile;
259 QPopupMenu *optionsMenuFile; 259 QPopupMenu *optionsMenuFile;
260 QPopupMenu *fileMenuView; 260 QPopupMenu *fileMenuView;
261 QPopupMenu *viewMenuView; 261 QPopupMenu *viewMenuView;
262 262
263 QAction *sss; // scale to screen size 263 QAction *sss; // scale to screen size
264 264
265 QLabel *lab; 265 QLabel *lab;
266 ImagePane *imagePanel; 266 ImagePane *imagePanel;
267 QWidgetStack *stack; 267 QWidgetStack *stack;
268 //FileSelector *fileSelector; 268 //FileSelector *fileSelector;
269 ImageFileSelector *fileSelector; 269 ImageFileSelector *fileSelector;
270 bool isFullScreen; 270 bool isFullScreen;
271 bool isSized; // true if image is to be resized to fit the window size 271 bool isSized; // true if image is to be resized to fit the window size
272 bool bFromDocView; // a flag to indicate whether or not we were 272 bool bFromDocView; // a flag to indicate whether or not we were
273 // launched from the document view... 273 // launched from the document view...
274 274
275 int slideDelay; 275 int slideDelay;
276 bool slideRepeat; 276 bool slideRepeat;
277 bool slideReverse; // show slideshow in reverse order 277 bool slideReverse; // show slideshow in reverse order
278 bool rotateOnLoad; // rotate by 90 degrees on loading 278 bool rotateOnLoad; // rotate by 90 degrees on loading
279 bool fastLoad; 279 bool fastLoad;
280 QTimer *slideTimer; 280 QTimer *slideTimer;
281 QValueList<DocLnk> imageList; 281 QValueList<DocLnk> imageList;
282 QAction *slideAction; 282 QAction *slideAction;
283 283
284 284
285 QString imageInfo[LAST]; 285 QString imageInfo[LAST];
286}; 286};
287 287
288 288
289#endif // SHOWIMG_H 289#endif // SHOWIMG_H
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp
index ee7d32f..48629bf 100644
--- a/noncore/net/opieftp/opieftp.cpp
+++ b/noncore/net/opieftp/opieftp.cpp
@@ -23,97 +23,97 @@ extern "C" {
23#include <qpe/qpeapplication.h> 23#include <qpe/qpeapplication.h>
24#include <qpe/resource.h> 24#include <qpe/resource.h>
25#include <qpe/config.h> 25#include <qpe/config.h>
26#include <qpe/mimetype.h> 26#include <qpe/mimetype.h>
27 27
28#include <qtextstream.h> 28#include <qtextstream.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30#include <qtoolbutton.h> 30#include <qtoolbutton.h>
31#include <qcombobox.h> 31#include <qcombobox.h>
32#include <qlistview.h> 32#include <qlistview.h>
33#include <qlabel.h> 33#include <qlabel.h>
34#include <qprogressbar.h> 34#include <qprogressbar.h>
35#include <qspinbox.h> 35#include <qspinbox.h>
36#include <qtabwidget.h> 36#include <qtabwidget.h>
37#include <qlayout.h> 37#include <qlayout.h>
38#include <qmessagebox.h> 38#include <qmessagebox.h>
39#include <qlineedit.h> 39#include <qlineedit.h>
40#include <qlistbox.h> 40#include <qlistbox.h>
41 41
42#include <unistd.h> 42#include <unistd.h>
43#include <stdlib.h> 43#include <stdlib.h>
44 44
45 45
46QProgressBar *ProgressBar; 46QProgressBar *ProgressBar;
47static netbuf *conn=NULL; 47static netbuf *conn=NULL;
48 48
49static int log_progress(netbuf *, int xfered, void *) 49static int log_progress(netbuf *, int xfered, void *)
50{ 50{
51// int fsz = *(int *)arg; 51// int fsz = *(int *)arg;
52// int pct = (xfered * 100) / fsz; 52// int pct = (xfered * 100) / fsz;
53// printf("%3d%%\r", pct); 53// printf("%3d%%\r", pct);
54// fflush(stdout); 54// fflush(stdout);
55 ProgressBar->setProgress(xfered); 55 ProgressBar->setProgress(xfered);
56 qApp->processEvents(); 56 qApp->processEvents();
57 return 1; 57 return 1;
58} 58}
59 59
60OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) 60OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl)
61 : QMainWindow( parent, name, fl ) 61 : QMainWindow( parent, name, fl )
62{ 62{
63 setCaption( tr( "OpieFtp" ) ); 63 setCaption( tr( "OpieFtp" ) );
64 fuckeduphack=FALSE; 64 fuckeduphack=FALSE;
65 QGridLayout *layout = new QGridLayout( this ); 65 QGridLayout *layout = new QGridLayout( this );
66 layout->setSpacing( 2); 66 layout->setSpacing( 2);
67 layout->setMargin( 2); 67 layout->setMargin( 2);
68 68
69 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 69 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
70 70
71 QPEMenuBar *menuBar = new QPEMenuBar(this); 71 QMenuBar *menuBar = new QMenuBar(this);
72// QPEToolBar *menuBar = new QPEToolBar(this); 72// QPEToolBar *menuBar = new QPEToolBar(this);
73// menuBar->setHorizontalStretchable( TRUE ); 73// menuBar->setHorizontalStretchable( TRUE );
74 74
75 QWMatrix matrix; 75 QWMatrix matrix;
76 QPixmap pix(Resource::loadPixmap( "UnknownDocument" )); 76 QPixmap pix(Resource::loadPixmap( "UnknownDocument" ));
77 matrix.scale( .4, .4); 77 matrix.scale( .4, .4);
78 unknownXpm = pix.xForm(matrix); 78 unknownXpm = pix.xForm(matrix);
79 79
80 connectionMenu = new QPopupMenu( this ); 80 connectionMenu = new QPopupMenu( this );
81 localMenu = new QPopupMenu( this ); 81 localMenu = new QPopupMenu( this );
82 remoteMenu = new QPopupMenu( this ); 82 remoteMenu = new QPopupMenu( this );
83 tabMenu = new QPopupMenu( this ); 83 tabMenu = new QPopupMenu( this );
84 84
85 layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 ); 85 layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 );
86 86
87 menuBar->insertItem( tr( "Connection" ), connectionMenu); 87 menuBar->insertItem( tr( "Connection" ), connectionMenu);
88// menuBar->insertItem( tr( "Local" ), localMenu); 88// menuBar->insertItem( tr( "Local" ), localMenu);
89// menuBar->insertItem( tr( "Remote" ), remoteMenu); 89// menuBar->insertItem( tr( "Remote" ), remoteMenu);
90 menuBar->insertItem( tr( "View" ), tabMenu); 90 menuBar->insertItem( tr( "View" ), tabMenu);
91 91
92 tabMenu->insertItem( tr( "Local" ), localMenu); 92 tabMenu->insertItem( tr( "Local" ), localMenu);
93 tabMenu->insertItem( tr( "Remote" ), remoteMenu); 93 tabMenu->insertItem( tr( "Remote" ), remoteMenu);
94 94
95 connectionMenu->insertItem( tr( "New" ), this, SLOT( newConnection() )); 95 connectionMenu->insertItem( tr( "New" ), this, SLOT( newConnection() ));
96 connectionMenu->insertItem( tr( "Connect" ), this, SLOT( connector() )); 96 connectionMenu->insertItem( tr( "Connect" ), this, SLOT( connector() ));
97 connectionMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() )); 97 connectionMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() ));
98 98
99 localMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); 99 localMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() ));
100 localMenu->insertSeparator(); 100 localMenu->insertSeparator();
101 localMenu->insertItem( tr( "Upload" ), this, SLOT( localUpload() )); 101 localMenu->insertItem( tr( "Upload" ), this, SLOT( localUpload() ));
102 localMenu->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); 102 localMenu->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() ));
103 localMenu->insertItem( tr( "Rename" ), this, SLOT( localRename() )); 103 localMenu->insertItem( tr( "Rename" ), this, SLOT( localRename() ));
104 localMenu->insertSeparator(); 104 localMenu->insertSeparator();
105 localMenu->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); 105 localMenu->insertItem( tr( "Delete" ), this, SLOT( localDelete() ));
106 localMenu->setCheckable(TRUE); 106 localMenu->setCheckable(TRUE);
107 107
108 remoteMenu->insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); 108 remoteMenu->insertItem( tr( "Download" ), this, SLOT( remoteDownload() ));
109 remoteMenu->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); 109 remoteMenu->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() ));
110 remoteMenu->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); 110 remoteMenu->insertItem( tr( "Rename" ), this, SLOT( remoteRename() ));
111 remoteMenu->insertSeparator(); 111 remoteMenu->insertSeparator();
112 remoteMenu->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); 112 remoteMenu->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() ));
113 113
114 tabMenu->insertSeparator(); 114 tabMenu->insertSeparator();
115 tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); 115 tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() ));
116 tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); 116 tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() ));
117 tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() )); 117 tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() ));
118 tabMenu->insertSeparator(); 118 tabMenu->insertSeparator();
119// tabMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); 119// tabMenu->insertItem( tr( "About" ), this, SLOT( doAbout() ));
diff --git a/noncore/net/opieftp/opieftp.h b/noncore/net/opieftp/opieftp.h
index 7bd615a..f58778a 100644
--- a/noncore/net/opieftp/opieftp.h
+++ b/noncore/net/opieftp/opieftp.h
@@ -1,83 +1,83 @@
1/*************************************************************************** 1/***************************************************************************
2 opieftp.h 2 opieftp.h
3 ------------------- 3 -------------------
4** Created: Sat Mar 9 23:33:09 2002 4** Created: Sat Mar 9 23:33:09 2002
5 copyright : (C) 2002 by ljp 5 copyright : (C) 2002 by ljp
6 email : ljp@llornkcor.com 6 email : ljp@llornkcor.com
7 * This program is free software; you can redistribute it and/or modify * 7 * This program is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by * 8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation; either version 2 of the License, or * 9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. * 10 * (at your option) any later version. *
11 ***************************************************************************/ 11 ***************************************************************************/
12#ifndef OPIEFTP_H 12#ifndef OPIEFTP_H
13#define OPIEFTP_H 13#define OPIEFTP_H
14 14
15#include <qvariant.h> 15#include <qvariant.h>
16#include <qdialog.h> 16#include <qdialog.h>
17#include <qmainwindow.h> 17#include <qmainwindow.h>
18#include <qdir.h> 18#include <qdir.h>
19#include <qstring.h> 19#include <qstring.h>
20#include <qpoint.h> 20#include <qpoint.h>
21#include <qpixmap.h> 21#include <qpixmap.h>
22 22
23class QVBoxLayout; 23class QVBoxLayout;
24class QHBoxLayout; 24class QHBoxLayout;
25class QGridLayout; 25class QGridLayout;
26class QComboBox; 26class QComboBox;
27class QListView; 27class QListView;
28class QListViewItem; 28class QListViewItem;
29class QLabel; 29class QLabel;
30class QProgressBar; 30class QProgressBar;
31class QSpinBox; 31class QSpinBox;
32class QTabWidget; 32class QTabWidget;
33class QWidget; 33class QWidget;
34class QPEToolBar; 34class QPEToolBar;
35class QPEMenuBar; 35class QMenuBar;
36class QPopupMenu; 36class QPopupMenu;
37class QFile; 37class QFile;
38class QLineEdit; 38class QLineEdit;
39class QPushButton; 39class QPushButton;
40class QToolButton; 40class QToolButton;
41class QStringList; 41class QStringList;
42class QListBox; 42class QListBox;
43class QTimer; 43class QTimer;
44 44
45class OpieFtp : public QMainWindow 45class OpieFtp : public QMainWindow
46{ 46{
47 Q_OBJECT 47 Q_OBJECT
48 48
49public: 49public:
50 OpieFtp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 50 OpieFtp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
51 ~OpieFtp(); 51 ~OpieFtp();
52 52
53 static QString appName() { return QString::fromLatin1("opieftp"); } 53 static QString appName() { return QString::fromLatin1("opieftp"); }
54 QTabWidget *TabWidget; 54 QTabWidget *TabWidget;
55 QWidget *tab, *tab_2, *tab_3; 55 QWidget *tab, *tab_2, *tab_3;
56 QListView *Local_View, *Remote_View; 56 QListView *Local_View, *Remote_View;
57 QListBox *serverListView; 57 QListBox *serverListView;
58 58
59 QComboBox *UsernameComboBox, *ServerComboBox, *currentPathCombo; 59 QComboBox *UsernameComboBox, *ServerComboBox, *currentPathCombo;
60 QLineEdit *PasswordEdit, *remotePath; 60 QLineEdit *PasswordEdit, *remotePath;
61 QLabel *TextLabel2, *TextLabel1, *TextLabel3, *TextLabel4;; 61 QLabel *TextLabel2, *TextLabel1, *TextLabel3, *TextLabel4;;
62 QSpinBox* PortSpinBox; 62 QSpinBox* PortSpinBox;
63 QPopupMenu *connectionMenu, *localMenu, *remoteMenu, *tabMenu, *aboutMenu; 63 QPopupMenu *connectionMenu, *localMenu, *remoteMenu, *tabMenu, *aboutMenu;
64 QDir currentDir; 64 QDir currentDir;
65 QString currentRemoteDir; 65 QString currentRemoteDir;
66 QString filterStr; 66 QString filterStr;
67 QListViewItem * item; 67 QListViewItem * item;
68 QPushButton *connectServerBtn, *newServerButton;// 68 QPushButton *connectServerBtn, *newServerButton;//
69 QToolButton *cdUpButton, *homeButton, *docButton; 69 QToolButton *cdUpButton, *homeButton, *docButton;
70 bool b; 70 bool b;
71 int currentServerConfig; 71 int currentServerConfig;
72protected slots: 72protected slots:
73 void timerOut(); 73 void timerOut();
74 void upDir(); 74 void upDir();
75 void homeButtonPushed(); 75 void homeButtonPushed();
76 void docButtonPushed(); 76 void docButtonPushed();
77 void doAbout(); 77 void doAbout();
78 78
79 void serverComboEdited(const QString & ); 79 void serverComboEdited(const QString & );
80 void UsernameComboBoxEdited(const QString & ); 80 void UsernameComboBoxEdited(const QString & );
81 void PasswordEditEdited(const QString & ); 81 void PasswordEditEdited(const QString & );
82 82
83 void showLocalMenu( QListViewItem *); 83 void showLocalMenu( QListViewItem *);
diff --git a/noncore/net/opieirc/mainwindow.cpp b/noncore/net/opieirc/mainwindow.cpp
index 8f76cdd..95fbdcd 100644
--- a/noncore/net/opieirc/mainwindow.cpp
+++ b/noncore/net/opieirc/mainwindow.cpp
@@ -1,67 +1,67 @@
1#include <qpe/qpemenubar.h> 1#include <qpe/qpemenubar.h>
2#include <qpe/resource.h> 2#include <qpe/resource.h>
3#include <qpe/config.h> 3#include <qpe/config.h>
4#include <qpopupmenu.h> 4#include <qpopupmenu.h>
5#include <qwhatsthis.h> 5#include <qwhatsthis.h>
6 6
7#include "mainwindow.h" 7#include "mainwindow.h"
8#include "ircservertab.h" 8#include "ircservertab.h"
9#include "ircserverlist.h" 9#include "ircserverlist.h"
10#include "ircsettings.h" 10#include "ircsettings.h"
11 11
12MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { 12MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) {
13 setCaption(tr("IRC Client")); 13 setCaption(tr("IRC Client"));
14 m_tabWidget = new IRCTabWidget(this); 14 m_tabWidget = new IRCTabWidget(this);
15 QWhatsThis::add(m_tabWidget, tr("Server connections, channels, queries and other things will be placed here")); 15 QWhatsThis::add(m_tabWidget, tr("Server connections, channels, queries and other things will be placed here"));
16 connect(m_tabWidget, SIGNAL(currentChanged(QWidget *)), this, SLOT(selected(QWidget *))); 16 connect(m_tabWidget, SIGNAL(currentChanged(QWidget *)), this, SLOT(selected(QWidget *)));
17 setCentralWidget(m_tabWidget); 17 setCentralWidget(m_tabWidget);
18 setToolBarsMovable(FALSE); 18 setToolBarsMovable(FALSE);
19 QPEMenuBar *menuBar = new QPEMenuBar(this); 19 QMenuBar *menuBar = new QMenuBar(this);
20 QPopupMenu *irc = new QPopupMenu(this); 20 QPopupMenu *irc = new QPopupMenu(this);
21 menuBar->insertItem(tr("IRC"), irc); 21 menuBar->insertItem(tr("IRC"), irc);
22 QAction *a = new QAction(tr("New connection"), Resource::loadPixmap("pass"), QString::null, 0, this, 0); 22 QAction *a = new QAction(tr("New connection"), Resource::loadPixmap("pass"), QString::null, 0, this, 0);
23 connect(a, SIGNAL(activated()), this, SLOT(newConnection())); 23 connect(a, SIGNAL(activated()), this, SLOT(newConnection()));
24 a->setWhatsThis(tr("Create a new connection to an IRC server")); 24 a->setWhatsThis(tr("Create a new connection to an IRC server"));
25 a->addTo(irc); 25 a->addTo(irc);
26 a = new QAction(tr("Settings"), Resource::loadPixmap("SettingsIcon"), QString::null, 0, this, 0); 26 a = new QAction(tr("Settings"), Resource::loadPixmap("SettingsIcon"), QString::null, 0, this, 0);
27 a->setWhatsThis(tr("Configure OpieIRC's behavior and appearance")); 27 a->setWhatsThis(tr("Configure OpieIRC's behavior and appearance"));
28 connect(a, SIGNAL(activated()), this, SLOT(settings())); 28 connect(a, SIGNAL(activated()), this, SLOT(settings()));
29 a->addTo(irc); 29 a->addTo(irc);
30 loadSettings(); 30 loadSettings();
31} 31}
32 32
33/*IRCTabWidget MainWindow::getTabWidget(){ 33/*IRCTabWidget MainWindow::getTabWidget(){
34 return m_tabWidget; 34 return m_tabWidget;
35} */ 35} */
36 36
37void MainWindow::loadSettings() { 37void MainWindow::loadSettings() {
38 Config config("OpieIRC"); 38 Config config("OpieIRC");
39 config.setGroup("OpieIRC"); 39 config.setGroup("OpieIRC");
40 IRCTab::m_backgroundColor = config.readEntry("BackgroundColor", "#FFFFFF"); 40 IRCTab::m_backgroundColor = config.readEntry("BackgroundColor", "#FFFFFF");
41 IRCTab::m_textColor = config.readEntry("TextColor", "#000000"); 41 IRCTab::m_textColor = config.readEntry("TextColor", "#000000");
42 IRCTab::m_errorColor = config.readEntry("ErrorColor", "#FF0000"); 42 IRCTab::m_errorColor = config.readEntry("ErrorColor", "#FF0000");
43 IRCTab::m_selfColor = config.readEntry("SelfColor", "#CC0000"); 43 IRCTab::m_selfColor = config.readEntry("SelfColor", "#CC0000");
44 IRCTab::m_otherColor = config.readEntry("OtherColor", "#0000BB"); 44 IRCTab::m_otherColor = config.readEntry("OtherColor", "#0000BB");
45 IRCTab::m_serverColor = config.readEntry("ServerColor", "#0000FF"); 45 IRCTab::m_serverColor = config.readEntry("ServerColor", "#0000FF");
46 IRCTab::m_notificationColor = config.readEntry("NotificationColor", "#AA3300"); 46 IRCTab::m_notificationColor = config.readEntry("NotificationColor", "#AA3300");
47 IRCTab::m_maxLines = config.readNumEntry("Lines", 100); 47 IRCTab::m_maxLines = config.readNumEntry("Lines", 100);
48} 48}
49 49
50void MainWindow::selected(QWidget *) { 50void MainWindow::selected(QWidget *) {
51 m_tabWidget->setTabColor(m_tabWidget->currentPageIndex(), black); 51 m_tabWidget->setTabColor(m_tabWidget->currentPageIndex(), black);
52 emit updateScroll(); 52 emit updateScroll();
53} 53}
54 54
55void MainWindow::addTab(IRCTab *tab) { 55void MainWindow::addTab(IRCTab *tab) {
56 connect(tab, SIGNAL(changed(IRCTab *)), this, SLOT(changeEvent(IRCTab *))); 56 connect(tab, SIGNAL(changed(IRCTab *)), this, SLOT(changeEvent(IRCTab *)));
57 m_tabWidget->addTab(tab, tab->title()); 57 m_tabWidget->addTab(tab, tab->title());
58 m_tabWidget->showPage(tab); 58 m_tabWidget->showPage(tab);
59 tab->setID(m_tabWidget->currentPageIndex()); 59 tab->setID(m_tabWidget->currentPageIndex());
60 m_tabs.append(tab); 60 m_tabs.append(tab);
61} 61}
62 62
63void MainWindow::changeEvent(IRCTab *tab) { 63void MainWindow::changeEvent(IRCTab *tab) {
64 if (tab->id() != m_tabWidget->currentPageIndex()) 64 if (tab->id() != m_tabWidget->currentPageIndex())
65 m_tabWidget->setTabColor(tab->id(), blue); 65 m_tabWidget->setTabColor(tab->id(), blue);
66} 66}
67 67
diff --git a/noncore/net/wellenreiter/TODO b/noncore/net/wellenreiter/TODO
index a1d5bee..0336417 100644
--- a/noncore/net/wellenreiter/TODO
+++ b/noncore/net/wellenreiter/TODO
@@ -1,4 +1,15 @@
1- save configuration settings
2- beep over headphone / customizable 1- beep over headphone / customizable
3- autoshow new nets - maybe in other color or more contrast
4 2
3- identification of probe requests
4 i.e. other sniffers around
5
6- decloaking of falsely reported zero-length SSIDs
7
8- option to run skript on
9 - new net
10 - new station
11 - <whatever>
12
13- adaptive hopping scheme !
14
15-
diff --git a/noncore/unsupported/filebrowser/filebrowser.cpp b/noncore/unsupported/filebrowser/filebrowser.cpp
index d16e771..114ebfa 100644
--- a/noncore/unsupported/filebrowser/filebrowser.cpp
+++ b/noncore/unsupported/filebrowser/filebrowser.cpp
@@ -1,88 +1,88 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21 21
22#include "inlineedit.h" 22#include "inlineedit.h"
23#include "filebrowser.h" 23#include "filebrowser.h"
24#include "filePermissions.h" 24#include "filePermissions.h"
25#include <qpe/resource.h> 25#include <qpe/resource.h>
26#include <qpe/global.h> 26#include <qpe/global.h>
27#include <qpe/mimetype.h> 27#include <qpe/mimetype.h>
28#include <qpe/applnk.h> 28#include <qpe/applnk.h>
29#include <qpe/config.h> 29#include <qpe/config.h>
30 30
31#include <qcopchannel_qws.h> 31#include <qcopchannel_qws.h>
32#include <qpe/qcopenvelope_qws.h> 32#include <qpe/qcopenvelope_qws.h>
33 33
34#include <qmessagebox.h> 34#include <qmessagebox.h>
35#include <qdir.h> 35#include <qdir.h>
36#include <qregexp.h> 36#include <qregexp.h>
37#include <qheader.h> 37#include <qheader.h>
38#include <qpe/qpetoolbar.h> 38#include <qpe/qpetoolbar.h>
39#include <qpopupmenu.h> 39#include <qpopupmenu.h>
40#include <qpe/qpemenubar.h> 40#include <qmenubar.h>
41#include <qaction.h> 41#include <qaction.h>
42#include <qstringlist.h> 42#include <qstringlist.h>
43#include <qcursor.h> 43#include <qcursor.h>
44#include <qmultilineedit.h> 44#include <qmultilineedit.h>
45#include <qfont.h> 45#include <qfont.h>
46#include <qpainter.h> 46#include <qpainter.h>
47#include <qprogressbar.h> 47#include <qprogressbar.h>
48 48
49#include <unistd.h> 49#include <unistd.h>
50#include <stdlib.h> 50#include <stdlib.h>
51#include <sys/stat.h> 51#include <sys/stat.h>
52#include <qpe/qpeapplication.h> 52#include <qpe/qpeapplication.h>
53 53
54// 54//
55// FileItem 55// FileItem
56// 56//
57FileItem::FileItem( QListView * parent, const QFileInfo & fi ) 57FileItem::FileItem( QListView * parent, const QFileInfo & fi )
58 : QListViewItem( parent ), 58 : QListViewItem( parent ),
59 fileInfo( fi ) 59 fileInfo( fi )
60{ 60{
61 QDate d = fi.lastModified().date(); 61 QDate d = fi.lastModified().date();
62 62
63 setText( 0, fi.fileName() ); 63 setText( 0, fi.fileName() );
64 setText( 1, sizeString( fi.size() ) + " " ); 64 setText( 1, sizeString( fi.size() ) + " " );
65 setText( 2, QString().sprintf("%4d-%02d-%02d",d.year(), d.month(), d.day() ) ); 65 setText( 2, QString().sprintf("%4d-%02d-%02d",d.year(), d.month(), d.day() ) );
66 66
67 MimeType mt(fi.filePath()); 67 MimeType mt(fi.filePath());
68 68
69 if ( fi.isSymLink() ) 69 if ( fi.isSymLink() )
70 setText( 3, "symlink" ); 70 setText( 3, "symlink" );
71 else if( fi.isDir() ) 71 else if( fi.isDir() )
72 setText( 3, "directory" ); 72 setText( 3, "directory" );
73 else if( isLib() ) 73 else if( isLib() )
74 setText( 3, "library" ); 74 setText( 3, "library" );
75 else 75 else
76 setText( 3, mt.description() ); 76 setText( 3, mt.description() );
77 77
78 QPixmap pm; 78 QPixmap pm;
79 if( fi.isDir() ){ 79 if( fi.isDir() ){
80 if( !QDir( fi.filePath() ).isReadable() ) 80 if( !QDir( fi.filePath() ).isReadable() )
81 pm = Resource::loadPixmap( "lockedfolder" ); 81 pm = Resource::loadPixmap( "lockedfolder" );
82 else 82 else
83 pm = Resource::loadPixmap( "folder" ); 83 pm = Resource::loadPixmap( "folder" );
84 } 84 }
85 else if( !fi.isReadable() ) 85 else if( !fi.isReadable() )
86 pm = Resource::loadPixmap( "locked" ); 86 pm = Resource::loadPixmap( "locked" );
87 else if( isLib() ) 87 else if( isLib() )
88 pm = Resource::loadPixmap( "library" ); 88 pm = Resource::loadPixmap( "library" );
@@ -797,97 +797,97 @@ void FileView::setShowThumbnails(bool thumbnails)
797} 797}
798 798
799void FileView::setMenuKeepsOpen(bool keepOpen) 799void FileView::setMenuKeepsOpen(bool keepOpen)
800{ 800{
801 menuKeepsOpen=keepOpen; 801 menuKeepsOpen=keepOpen;
802} 802}
803 803
804FileBrowser::FileBrowser( QWidget * parent, 804FileBrowser::FileBrowser( QWidget * parent,
805 const char * name, WFlags f ) : 805 const char * name, WFlags f ) :
806 QMainWindow( parent, name, f ) 806 QMainWindow( parent, name, f )
807{ 807{
808 init( QDir::current().canonicalPath() ); 808 init( QDir::current().canonicalPath() );
809} 809}
810 810
811FileBrowser::FileBrowser( const QString & dir, QWidget * parent, 811FileBrowser::FileBrowser( const QString & dir, QWidget * parent,
812 const char * name, WFlags f ) : 812 const char * name, WFlags f ) :
813 QMainWindow( parent, name, f ) 813 QMainWindow( parent, name, f )
814{ 814{
815 init( dir ); 815 init( dir );
816} 816}
817 817
818void FileBrowser::init(const QString & dir) 818void FileBrowser::init(const QString & dir)
819{ 819{
820 setCaption( tr("File Manager") ); 820 setCaption( tr("File Manager") );
821 setIcon( Resource::loadPixmap( "filebrowser_icon" ) ); 821 setIcon( Resource::loadPixmap( "filebrowser_icon" ) );
822 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 822 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
823 823
824 824
825 Config cfg("Filebrowser"); 825 Config cfg("Filebrowser");
826 cfg.setGroup("View"); 826 cfg.setGroup("View");
827 bool showHidden=(cfg.readEntry("Hidden","FALSE") == "TRUE"); 827 bool showHidden=(cfg.readEntry("Hidden","FALSE") == "TRUE");
828 bool showSymlinks=(cfg.readEntry("Symlinks","FALSE") == "TRUE"); 828 bool showSymlinks=(cfg.readEntry("Symlinks","FALSE") == "TRUE");
829 bool showThumbnails=(cfg.readEntry("Thumbnails","FALSE") == "TRUE"); 829 bool showThumbnails=(cfg.readEntry("Thumbnails","FALSE") == "TRUE");
830 830
831 cfg.setGroup("Menu"); 831 cfg.setGroup("Menu");
832 bool menuKeepsOpen=(cfg.readEntry("KeepOpen", "FALSE") == "TRUE"); 832 bool menuKeepsOpen=(cfg.readEntry("KeepOpen", "FALSE") == "TRUE");
833 833
834 834
835 fileView = new FileView( dir, this, 0, showHidden, showSymlinks, showThumbnails ); 835 fileView = new FileView( dir, this, 0, showHidden, showSymlinks, showThumbnails );
836 fileView->setAllColumnsShowFocus( TRUE ); 836 fileView->setAllColumnsShowFocus( TRUE );
837 fileView->setMenuKeepsOpen(menuKeepsOpen); 837 fileView->setMenuKeepsOpen(menuKeepsOpen);
838 838
839 setCentralWidget( fileView ); 839 setCentralWidget( fileView );
840 setToolBarsMovable( FALSE ); 840 setToolBarsMovable( FALSE );
841 841
842 QPEToolBar* toolBar = new QPEToolBar( this ); 842 QPEToolBar* toolBar = new QPEToolBar( this );
843 toolBar->setHorizontalStretchable( TRUE ); 843 toolBar->setHorizontalStretchable( TRUE );
844 844
845 QPEMenuBar* menuBar = new QPEMenuBar( toolBar ); 845 QMenuBar* menuBar = new QMenuBar( toolBar );
846 846
847 dirMenu = new QPopupMenu( this ); 847 dirMenu = new QPopupMenu( this );
848 menuBar->insertItem( tr( "Dir" ), dirMenu ); 848 menuBar->insertItem( tr( "Dir" ), dirMenu );
849 849
850 sortMenu = new QPopupMenu( this ); 850 sortMenu = new QPopupMenu( this );
851 menuBar->insertItem( tr( "Sort" ), sortMenu ); 851 menuBar->insertItem( tr( "Sort" ), sortMenu );
852 sortMenu->insertItem( tr( "by Name "), this, SLOT( sortName() ) ); 852 sortMenu->insertItem( tr( "by Name "), this, SLOT( sortName() ) );
853 sortMenu->insertItem( tr( "by Size "), this, SLOT( sortSize() ) ); 853 sortMenu->insertItem( tr( "by Size "), this, SLOT( sortSize() ) );
854 sortMenu->insertItem( tr( "by Date "), this, SLOT( sortDate() ) ); 854 sortMenu->insertItem( tr( "by Date "), this, SLOT( sortDate() ) );
855 sortMenu->insertItem( tr( "by Type "), this, SLOT( sortType() ) ); 855 sortMenu->insertItem( tr( "by Type "), this, SLOT( sortType() ) );
856 sortMenu->insertSeparator(); 856 sortMenu->insertSeparator();
857 sortMenu->insertItem( tr( "Ascending" ), this, SLOT( updateSorting() ) ); 857 sortMenu->insertItem( tr( "Ascending" ), this, SLOT( updateSorting() ) );
858 858
859 sortMenu->setItemChecked( sortMenu->idAt( 5 ), TRUE ); 859 sortMenu->setItemChecked( sortMenu->idAt( 5 ), TRUE );
860 sortMenu->setItemChecked( sortMenu->idAt( 0 ), TRUE ); 860 sortMenu->setItemChecked( sortMenu->idAt( 0 ), TRUE );
861 861
862 viewMenu = new QPopupMenu( this); 862 viewMenu = new QPopupMenu( this);
863 viewMenu->insertItem( tr( "Hidden"), this, SLOT( updateShowHidden() ) ); 863 viewMenu->insertItem( tr( "Hidden"), this, SLOT( updateShowHidden() ) );
864 viewMenu->insertItem( tr( "Symlinks"), this, SLOT( updateShowSymlinks() ) ); 864 viewMenu->insertItem( tr( "Symlinks"), this, SLOT( updateShowSymlinks() ) );
865 viewMenu->insertItem( tr( "Thumbnails"), this, SLOT( updateShowThumbnails() ) ); 865 viewMenu->insertItem( tr( "Thumbnails"), this, SLOT( updateShowThumbnails() ) );
866 viewMenu->setItemChecked( viewMenu->idAt( 0 ), showHidden ); 866 viewMenu->setItemChecked( viewMenu->idAt( 0 ), showHidden );
867 viewMenu->setItemChecked( viewMenu->idAt( 1 ), showSymlinks ); 867 viewMenu->setItemChecked( viewMenu->idAt( 1 ), showSymlinks );
868 viewMenu->setItemChecked( viewMenu->idAt( 2 ), showThumbnails ); 868 viewMenu->setItemChecked( viewMenu->idAt( 2 ), showThumbnails );
869 869
870 menuBar->insertItem( tr("View"), viewMenu ); 870 menuBar->insertItem( tr("View"), viewMenu );
871 871
872 toolBar = new QPEToolBar( this ); 872 toolBar = new QPEToolBar( this );
873 873
874 lastAction = new QAction( tr("Previous dir"), Resource::loadIconSet( "back" ), 874 lastAction = new QAction( tr("Previous dir"), Resource::loadIconSet( "back" ),
875 QString::null, 0, this, 0 ); 875 QString::null, 0, this, 0 );
876 connect( lastAction, SIGNAL( activated() ), fileView, SLOT( lastDir() ) ); 876 connect( lastAction, SIGNAL( activated() ), fileView, SLOT( lastDir() ) );
877 lastAction->addTo( toolBar ); 877 lastAction->addTo( toolBar );
878 lastAction->setEnabled( FALSE ); 878 lastAction->setEnabled( FALSE );
879 879
880 upAction = new QAction( tr("Parent dir"), Resource::loadIconSet( "up" ), 880 upAction = new QAction( tr("Parent dir"), Resource::loadIconSet( "up" ),
881 QString::null, 0, this, 0 ); 881 QString::null, 0, this, 0 );
882 connect( upAction, SIGNAL( activated() ), fileView, SLOT( parentDir() ) ); 882 connect( upAction, SIGNAL( activated() ), fileView, SLOT( parentDir() ) );
883 upAction->addTo( toolBar ); 883 upAction->addTo( toolBar );
884 884
885 QAction *a = new QAction( tr("New folder"), Resource::loadPixmap( "newfolder" ), 885 QAction *a = new QAction( tr("New folder"), Resource::loadPixmap( "newfolder" ),
886 QString::null, 0, this, 0 ); 886 QString::null, 0, this, 0 );
887 connect( a, SIGNAL( activated() ), fileView, SLOT( newFolder() ) ); 887 connect( a, SIGNAL( activated() ), fileView, SLOT( newFolder() ) );
888 a->addTo( toolBar ); 888 a->addTo( toolBar );
889 889
890 a = new QAction( tr("Cut"), Resource::loadPixmap( "cut" ), 890 a = new QAction( tr("Cut"), Resource::loadPixmap( "cut" ),
891 QString::null, 0, this, 0 ); 891 QString::null, 0, this, 0 );
892 connect( a, SIGNAL( activated() ), fileView, SLOT( cut() ) ); 892 connect( a, SIGNAL( activated() ), fileView, SLOT( cut() ) );
893 a->addTo( toolBar ); 893 a->addTo( toolBar );
diff --git a/noncore/unsupported/mail2/composerbase.cpp b/noncore/unsupported/mail2/composerbase.cpp
index 6f6ab8e..34d6eb6 100644
--- a/noncore/unsupported/mail2/composerbase.cpp
+++ b/noncore/unsupported/mail2/composerbase.cpp
@@ -1,73 +1,73 @@
1#include <qmultilineedit.h> 1#include <qmultilineedit.h>
2#include <qpopupmenu.h> 2#include <qpopupmenu.h>
3#include <qcombobox.h> 3#include <qcombobox.h>
4#include <qlineedit.h> 4#include <qlineedit.h>
5#include <qlayout.h> 5#include <qlayout.h>
6#include <qaction.h> 6#include <qaction.h>
7#include <qlabel.h> 7#include <qlabel.h>
8#include <qvbox.h> 8#include <qvbox.h>
9 9
10#include <qpe/qpetoolbar.h> 10#include <qpe/qpetoolbar.h>
11#include <qpe/qpemenubar.h> 11#include <qpe/qpemenubar.h>
12#include <qpe/resource.h> 12#include <qpe/resource.h>
13 13
14#include "mailstatusbar.h" 14#include "mailstatusbar.h"
15#include "listviewplus.h" 15#include "listviewplus.h"
16#include "composerbase.h" 16#include "composerbase.h"
17 17
18ComposerBase::ComposerBase(QWidget *parent, const char *name, WFlags fl) 18ComposerBase::ComposerBase(QWidget *parent, const char *name, WFlags fl)
19 : QMainWindow(parent, name, fl) 19 : QMainWindow(parent, name, fl)
20{ 20{
21 setCaption(tr("Compose Message")); 21 setCaption(tr("Compose Message"));
22 setToolBarsMovable(false); 22 setToolBarsMovable(false);
23 23
24 toolbar = new QPEToolBar(this); 24 toolbar = new QPEToolBar(this);
25 menubar = new QPEMenuBar( toolbar ); 25 menubar = new QMenuBar( toolbar );
26 mailmenu = new QPopupMenu( menubar ); 26 mailmenu = new QPopupMenu( menubar );
27 menubar->insertItem( tr( "Mail" ), mailmenu ); 27 menubar->insertItem( tr( "Mail" ), mailmenu );
28 addToolBar(toolbar); 28 addToolBar(toolbar);
29 toolbar->setHorizontalStretchable(true); 29 toolbar->setHorizontalStretchable(true);
30 30
31 QLabel *spacer = new QLabel(toolbar); 31 QLabel *spacer = new QLabel(toolbar);
32 spacer->setBackgroundMode(QWidget::PaletteButton); 32 spacer->setBackgroundMode(QWidget::PaletteButton);
33 toolbar->setStretchableWidget(spacer); 33 toolbar->setStretchableWidget(spacer);
34 34
35 sendmail = new QAction(tr("Send the mail"), QIconSet(Resource::loadPixmap("mail/sendmail")), 0, 0, this); 35 sendmail = new QAction(tr("Send the mail"), QIconSet(Resource::loadPixmap("mail/sendmail")), 0, 0, this);
36 sendmail->addTo(toolbar); 36 sendmail->addTo(toolbar);
37 sendmail->addTo(mailmenu); 37 sendmail->addTo(mailmenu);
38 38
39 queuemail = new QAction(tr("Queue the mail"), QIconSet(Resource::loadPixmap("mail/sendall")), 0, 0, this); 39 queuemail = new QAction(tr("Queue the mail"), QIconSet(Resource::loadPixmap("mail/sendall")), 0, 0, this);
40 queuemail->addTo(toolbar); 40 queuemail->addTo(toolbar);
41 queuemail->addTo(mailmenu); 41 queuemail->addTo(mailmenu);
42 42
43 attachfile = new QAction(tr("Attach a file"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true); 43 attachfile = new QAction(tr("Attach a file"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true);
44 attachfile->addTo(toolbar); 44 attachfile->addTo(toolbar);
45 attachfile->addTo(mailmenu); 45 attachfile->addTo(mailmenu);
46 connect(attachfile, SIGNAL(toggled(bool)), SLOT(slotAttachfileChanged(bool))); 46 connect(attachfile, SIGNAL(toggled(bool)), SLOT(slotAttachfileChanged(bool)));
47 47
48 addressbook = new QAction(tr("Addressbook"), QIconSet(Resource::loadPixmap("mail/addbook")), 0, 0, this); 48 addressbook = new QAction(tr("Addressbook"), QIconSet(Resource::loadPixmap("mail/addbook")), 0, 0, this);
49 addressbook->addTo(toolbar); 49 addressbook->addTo(toolbar);
50 addressbook->addTo(mailmenu); 50 addressbook->addTo(mailmenu);
51 51
52 QWidget *main = new QWidget(this); 52 QWidget *main = new QWidget(this);
53 setCentralWidget(main); 53 setCentralWidget(main);
54 54
55 QGridLayout *layout = new QGridLayout(main); 55 QGridLayout *layout = new QGridLayout(main);
56 56
57 fromBox = new QComboBox(main); 57 fromBox = new QComboBox(main);
58 fromBox->insertItem(tr("From"), POPUP_FROM_FROM); 58 fromBox->insertItem(tr("From"), POPUP_FROM_FROM);
59 fromBox->insertItem(tr("Reply"), POPUP_FROM_REPLYTO); 59 fromBox->insertItem(tr("Reply"), POPUP_FROM_REPLYTO);
60 layout->addWidget(fromBox, 0, 0); 60 layout->addWidget(fromBox, 0, 0);
61 61
62 connect(fromBox, SIGNAL(activated(int)), SLOT(slotFromMenuChanged(int))); 62 connect(fromBox, SIGNAL(activated(int)), SLOT(slotFromMenuChanged(int)));
63 63
64 QHBoxLayout *fromLayout = new QHBoxLayout(); 64 QHBoxLayout *fromLayout = new QHBoxLayout();
65 layout->addLayout(fromLayout, 0, 1); 65 layout->addLayout(fromLayout, 0, 1);
66 66
67 from = new QComboBox(main); 67 from = new QComboBox(main);
68 fromLayout->addWidget(from); 68 fromLayout->addWidget(from);
69 69
70 replyto = new QLineEdit(main); 70 replyto = new QLineEdit(main);
71 replyto->hide(); 71 replyto->hide();
72 fromLayout->addWidget(replyto); 72 fromLayout->addWidget(replyto);
73 73
diff --git a/noncore/unsupported/mail2/composerbase.h b/noncore/unsupported/mail2/composerbase.h
index 58f1157..2c832d6 100644
--- a/noncore/unsupported/mail2/composerbase.h
+++ b/noncore/unsupported/mail2/composerbase.h
@@ -1,61 +1,61 @@
1#ifndef COMPOSERBASE_H 1#ifndef COMPOSERBASE_H
2#define COMPOSERBASE_H 2#define COMPOSERBASE_H
3 3
4#include <qmainwindow.h> 4#include <qmainwindow.h>
5 5
6class QMultiLineEdit; 6class QMultiLineEdit;
7class MailStatusBar; 7class MailStatusBar;
8class ListViewPlus; 8class ListViewPlus;
9class QPopupMenu; 9class QPopupMenu;
10class QPEToolBar; 10class QPEToolBar;
11class QPEMenuBar; 11class QMenuBar;
12class QPopupMenu; 12class QPopupMenu;
13class QComboBox; 13class QComboBox;
14class QLineEdit; 14class QLineEdit;
15class QAction; 15class QAction;
16class QLabel; 16class QLabel;
17 17
18class ComposerBase : public QMainWindow 18class ComposerBase : public QMainWindow
19{ 19{
20 Q_OBJECT 20 Q_OBJECT
21 21
22public: 22public:
23 ComposerBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); 23 ComposerBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0);
24 24
25protected: 25protected:
26 static const int POPUP_FROM_FROM = 0; 26 static const int POPUP_FROM_FROM = 0;
27 static const int POPUP_FROM_REPLYTO = 1; 27 static const int POPUP_FROM_REPLYTO = 1;
28 static const int POPUP_RECV_TO = 0; 28 static const int POPUP_RECV_TO = 0;
29 static const int POPUP_RECV_CC = 1; 29 static const int POPUP_RECV_CC = 1;
30 static const int POPUP_RECV_BCC = 2; 30 static const int POPUP_RECV_BCC = 2;
31 static const int POPUP_SUBJ_SUBJECT = 0; 31 static const int POPUP_SUBJ_SUBJECT = 0;
32 static const int POPUP_SUBJ_PRIORITY = 1; 32 static const int POPUP_SUBJ_PRIORITY = 1;
33 static const int POPUP_PRIO_LOW = 0; 33 static const int POPUP_PRIO_LOW = 0;
34 static const int POPUP_PRIO_NORMAL = 1; 34 static const int POPUP_PRIO_NORMAL = 1;
35 static const int POPUP_PRIO_HIGH = 2; 35 static const int POPUP_PRIO_HIGH = 2;
36 static const int POPUP_ATTACH_RENAME = 0; 36 static const int POPUP_ATTACH_RENAME = 0;
37 static const int POPUP_ATTACH_DESC = 1; 37 static const int POPUP_ATTACH_DESC = 1;
38 static const int POPUP_ATTACH_REMOVE = 2; 38 static const int POPUP_ATTACH_REMOVE = 2;
39 39
40 QMultiLineEdit *message; 40 QMultiLineEdit *message;
41 MailStatusBar *status; 41 MailStatusBar *status;
42 ListViewPlus *attachView; 42 ListViewPlus *attachView;
43 QMainWindow *attachWindow; 43 QMainWindow *attachWindow;
44 QPopupMenu *attachPopup; 44 QPopupMenu *attachPopup;
45 QPEToolBar *toolbar, *attachToolbar; 45 QPEToolBar *toolbar, *attachToolbar;
46 QPEMenuBar *menubar; 46 QMenuBar *menubar;
47 QPopupMenu *mailmenu; 47 QPopupMenu *mailmenu;
48 QComboBox *fromBox, *from, *receiversBox, *subjectBox, *priority; 48 QComboBox *fromBox, *from, *receiversBox, *subjectBox, *priority;
49 QLineEdit *replyto, *to, *cc, *bcc, *subject; 49 QLineEdit *replyto, *to, *cc, *bcc, *subject;
50 QAction *sendmail, *queuemail, *attachfile, *addressbook, *abort, *addattach, *delattach; 50 QAction *sendmail, *queuemail, *attachfile, *addressbook, *abort, *addattach, *delattach;
51 QLabel *fromLabel; 51 QLabel *fromLabel;
52 52
53protected slots: 53protected slots:
54 void slotAttachfileChanged(bool toggled); 54 void slotAttachfileChanged(bool toggled);
55 void slotFromMenuChanged(int id); 55 void slotFromMenuChanged(int id);
56 void slotReceiverMenuChanged(int id); 56 void slotReceiverMenuChanged(int id);
57 void slotSubjectMenuChanged(int id); 57 void slotSubjectMenuChanged(int id);
58 58
59}; 59};
60 60
61#endif 61#endif
diff --git a/noncore/unsupported/mail2/mainwindowbase.cpp b/noncore/unsupported/mail2/mainwindowbase.cpp
index e35d489..119acfb 100644
--- a/noncore/unsupported/mail2/mainwindowbase.cpp
+++ b/noncore/unsupported/mail2/mainwindowbase.cpp
@@ -1,71 +1,71 @@
1#include <qpopupmenu.h> 1#include <qpopupmenu.h>
2#include <qaction.h> 2#include <qaction.h>
3#include <qheader.h> 3#include <qheader.h>
4#include <qlabel.h> 4#include <qlabel.h>
5#include <qvbox.h> 5#include <qvbox.h>
6 6
7#include <qpe/qpetoolbar.h> 7#include <qpe/qpetoolbar.h>
8#include <qpe/qpemenubar.h> 8#include <qpe/qpemenubar.h>
9#include <qpe/resource.h> 9#include <qpe/resource.h>
10 10
11#include "mainwindowbase.h" 11#include "mainwindowbase.h"
12#include "mailstatusbar.h" 12#include "mailstatusbar.h"
13#include "folderwidget.h" 13#include "folderwidget.h"
14#include "mailtable.h" 14#include "mailtable.h"
15 15
16MainWindowBase::MainWindowBase(QWidget *parent, const char *name, WFlags fl) 16MainWindowBase::MainWindowBase(QWidget *parent, const char *name, WFlags fl)
17 : QMainWindow(parent, name, fl) 17 : QMainWindow(parent, name, fl)
18{ 18{
19 setCaption(tr("E-Mail")); 19 setCaption(tr("E-Mail"));
20 setToolBarsMovable(false); 20 setToolBarsMovable(false);
21 21
22 toolbar = new QPEToolBar(this); 22 toolbar = new QPEToolBar(this);
23 menubar = new QPEMenuBar( toolbar ); 23 menubar = new QMenuBar( toolbar );
24 mailmenu = new QPopupMenu( menubar ); 24 mailmenu = new QPopupMenu( menubar );
25 servermenu = new QPopupMenu( menubar ); 25 servermenu = new QPopupMenu( menubar );
26 menubar->insertItem( tr( "Mail" ), mailmenu ); 26 menubar->insertItem( tr( "Mail" ), mailmenu );
27 menubar->insertItem( tr( "Servers" ), servermenu ); 27 menubar->insertItem( tr( "Servers" ), servermenu );
28 28
29 addToolBar(toolbar); 29 addToolBar(toolbar);
30 toolbar->setHorizontalStretchable(true); 30 toolbar->setHorizontalStretchable(true);
31 31
32 QLabel *spacer = new QLabel(toolbar); 32 QLabel *spacer = new QLabel(toolbar);
33 spacer->setBackgroundMode(QWidget::PaletteButton); 33 spacer->setBackgroundMode(QWidget::PaletteButton);
34 toolbar->setStretchableWidget(spacer); 34 toolbar->setStretchableWidget(spacer);
35 35
36 compose = new QAction(tr("Compose new mail"), QIconSet(Resource::loadPixmap("mail/newmail")), 0, 0, this); 36 compose = new QAction(tr("Compose new mail"), QIconSet(Resource::loadPixmap("mail/newmail")), 0, 0, this);
37 compose->addTo(toolbar); 37 compose->addTo(toolbar);
38 compose->addTo(mailmenu); 38 compose->addTo(mailmenu);
39 39
40 sendQueue = new QAction(tr("Send queued mails"), QIconSet(Resource::loadPixmap("mail/sendqueue")), 0, 0, this); 40 sendQueue = new QAction(tr("Send queued mails"), QIconSet(Resource::loadPixmap("mail/sendqueue")), 0, 0, this);
41 sendQueue->addTo(toolbar); 41 sendQueue->addTo(toolbar);
42 sendQueue->addTo(mailmenu); 42 sendQueue->addTo(mailmenu);
43 43
44 folders = new QAction(tr("Show/hide folders"), QIconSet(Resource::loadPixmap("mail/folder")), 0, 0, this, 0, true); 44 folders = new QAction(tr("Show/hide folders"), QIconSet(Resource::loadPixmap("mail/folder")), 0, 0, this, 0, true);
45 folders->addTo(toolbar); 45 folders->addTo(toolbar);
46 folders->addTo(servermenu); 46 folders->addTo(servermenu);
47 connect(folders, SIGNAL(toggled(bool)), SLOT(slotFoldersToggled(bool))); 47 connect(folders, SIGNAL(toggled(bool)), SLOT(slotFoldersToggled(bool)));
48 48
49 findmails = new QAction(tr("Search mails"), QIconSet(Resource::loadPixmap("mail/find")), 0, 0, this); 49 findmails = new QAction(tr("Search mails"), QIconSet(Resource::loadPixmap("mail/find")), 0, 0, this);
50 findmails->addTo(toolbar); 50 findmails->addTo(toolbar);
51 findmails->addTo(mailmenu); 51 findmails->addTo(mailmenu);
52 52
53 configure = new QAction(tr("Configuration"), QIconSet(Resource::loadPixmap("mail/configure")), 0, 0, this); 53 configure = new QAction(tr("Configuration"), QIconSet(Resource::loadPixmap("mail/configure")), 0, 0, this);
54 configure->addTo(servermenu); 54 configure->addTo(servermenu);
55 55
56 QVBox *view = new QVBox(this); 56 QVBox *view = new QVBox(this);
57 setCentralWidget(view); 57 setCentralWidget(view);
58 58
59 folderView = new FolderWidget(view); 59 folderView = new FolderWidget(view);
60 folderView->setMinimumHeight(90); 60 folderView->setMinimumHeight(90);
61 folderView->setMaximumHeight(90); 61 folderView->setMaximumHeight(90);
62 folderView->hide(); 62 folderView->hide();
63 63
64 mailView = new MailTable(view); 64 mailView = new MailTable(view);
65 mailView->setMinimumHeight(50); 65 mailView->setMinimumHeight(50);
66 66
67 status = new MailStatusBar(view); 67 status = new MailStatusBar(view);
68} 68}
69 69
70void MainWindowBase::slotFoldersToggled(bool toggled) 70void MainWindowBase::slotFoldersToggled(bool toggled)
71{ 71{
diff --git a/noncore/unsupported/mail2/mainwindowbase.h b/noncore/unsupported/mail2/mainwindowbase.h
index 11c5ea0..b2e1dc5 100644
--- a/noncore/unsupported/mail2/mainwindowbase.h
+++ b/noncore/unsupported/mail2/mainwindowbase.h
@@ -1,37 +1,37 @@
1#ifndef MAINWINDOWBASE_H 1#ifndef MAINWINDOWBASE_H
2#define MAINWINDOWBASE_H 2#define MAINWINDOWBASE_H
3 3
4#include <qmainwindow.h> 4#include <qmainwindow.h>
5 5
6class ServerConnection; 6class ServerConnection;
7class MailStatusBar; 7class MailStatusBar;
8class FolderWidget; 8class FolderWidget;
9class QPEToolBar; 9class QPEToolBar;
10class QPEMenuBar; 10class QMenuBar;
11class QPopupMenu; 11class QPopupMenu;
12class MailTable; 12class MailTable;
13class QAction; 13class QAction;
14 14
15class MainWindowBase : public QMainWindow 15class MainWindowBase : public QMainWindow
16{ 16{
17 Q_OBJECT 17 Q_OBJECT
18 18
19public: 19public:
20 MainWindowBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); 20 MainWindowBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0);
21 21
22protected slots: 22protected slots:
23 void slotFoldersToggled(bool toggled); 23 void slotFoldersToggled(bool toggled);
24 24
25protected: 25protected:
26 ServerConnection *serverConnection; 26 ServerConnection *serverConnection;
27 MailStatusBar *status; 27 MailStatusBar *status;
28 FolderWidget *folderView; 28 FolderWidget *folderView;
29 QPEToolBar *toolbar; 29 QPEToolBar *toolbar;
30 QPEMenuBar *menubar; 30 QMenuBar *menubar;
31 QPopupMenu *mailmenu, *servermenu; 31 QPopupMenu *mailmenu, *servermenu;
32 MailTable *mailView; 32 MailTable *mailView;
33 QAction *compose, *sendQueue, *folders, *findmails, *configure; 33 QAction *compose, *sendQueue, *folders, *findmails, *configure;
34 34
35}; 35};
36 36
37#endif 37#endif
diff --git a/noncore/unsupported/mail2/viewmailbase.cpp b/noncore/unsupported/mail2/viewmailbase.cpp
index a02f73a..10aa14d 100644
--- a/noncore/unsupported/mail2/viewmailbase.cpp
+++ b/noncore/unsupported/mail2/viewmailbase.cpp
@@ -1,70 +1,70 @@
1#include <qtextbrowser.h> 1#include <qtextbrowser.h>
2#include <qlistview.h> 2#include <qlistview.h>
3#include <qaction.h> 3#include <qaction.h>
4#include <qlabel.h> 4#include <qlabel.h>
5#include <qvbox.h> 5#include <qvbox.h>
6#include <qpopupmenu.h> 6#include <qpopupmenu.h>
7 7
8#include <qpe/qpetoolbar.h> 8#include <qpe/qpetoolbar.h>
9#include <qpe/qpemenubar.h> 9#include <qpe/qpemenubar.h>
10#include <qpe/resource.h> 10#include <qpe/resource.h>
11 11
12#include "viewmailbase.h" 12#include "viewmailbase.h"
13#include "opendiag.h" 13#include "opendiag.h"
14 14
15ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) 15ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
16 : QMainWindow(parent, name, fl) 16 : QMainWindow(parent, name, fl)
17{ 17{
18 setCaption(tr("E-Mail by %1")); 18 setCaption(tr("E-Mail by %1"));
19 setToolBarsMovable(false); 19 setToolBarsMovable(false);
20 20
21 toolbar = new QPEToolBar(this); 21 toolbar = new QPEToolBar(this);
22 menubar = new QPEMenuBar( toolbar ); 22 menubar = new QMenuBar( toolbar );
23 mailmenu = new QPopupMenu( menubar ); 23 mailmenu = new QPopupMenu( menubar );
24 menubar->insertItem( tr( "Mail" ), mailmenu ); 24 menubar->insertItem( tr( "Mail" ), mailmenu );
25 25
26 toolbar->setHorizontalStretchable(true); 26 toolbar->setHorizontalStretchable(true);
27 addToolBar(toolbar); 27 addToolBar(toolbar);
28 28
29 QLabel *spacer = new QLabel(toolbar); 29 QLabel *spacer = new QLabel(toolbar);
30 spacer->setBackgroundMode(QWidget::PaletteButton); 30 spacer->setBackgroundMode(QWidget::PaletteButton);
31 toolbar->setStretchableWidget(spacer); 31 toolbar->setStretchableWidget(spacer);
32 32
33 reply = new QAction(tr("Reply"), QIconSet(Resource::loadPixmap("mail/reply")), 0, 0, this); 33 reply = new QAction(tr("Reply"), QIconSet(Resource::loadPixmap("mail/reply")), 0, 0, this);
34 reply->addTo(toolbar); 34 reply->addTo(toolbar);
35 reply->addTo(mailmenu); 35 reply->addTo(mailmenu);
36 36
37 forward = new QAction(tr("Forward"), QIconSet(Resource::loadPixmap("mail/forward")), 0, 0, this); 37 forward = new QAction(tr("Forward"), QIconSet(Resource::loadPixmap("mail/forward")), 0, 0, this);
38 forward->addTo(toolbar); 38 forward->addTo(toolbar);
39 forward->addTo(mailmenu); 39 forward->addTo(mailmenu);
40 40
41 attachbutton = new QAction(tr("Attachments"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true); 41 attachbutton = new QAction(tr("Attachments"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true);
42 attachbutton->addTo(toolbar); 42 attachbutton->addTo(toolbar);
43 attachbutton->addTo(mailmenu); 43 attachbutton->addTo(mailmenu);
44 connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool))); 44 connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool)));
45 45
46 deleteMail = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this); 46 deleteMail = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this);
47 deleteMail->addTo(toolbar); 47 deleteMail->addTo(toolbar);
48 deleteMail->addTo(mailmenu); 48 deleteMail->addTo(mailmenu);
49 49
50 QVBox *view = new QVBox(this); 50 QVBox *view = new QVBox(this);
51 setCentralWidget(view); 51 setCentralWidget(view);
52 52
53 attachments = new QListView(view); 53 attachments = new QListView(view);
54 attachments->setMinimumHeight(90); 54 attachments->setMinimumHeight(90);
55 attachments->setMaximumHeight(90); 55 attachments->setMaximumHeight(90);
56 attachments->setAllColumnsShowFocus(true); 56 attachments->setAllColumnsShowFocus(true);
57 attachments->addColumn("Mime Type", 100); 57 attachments->addColumn("Mime Type", 100);
58 attachments->addColumn("Filename", 100); 58 attachments->addColumn("Filename", 100);
59 attachments->addColumn("Description", 100); 59 attachments->addColumn("Description", 100);
60 attachments->hide(); 60 attachments->hide();
61 61
62 browser = new QTextBrowser(view); 62 browser = new QTextBrowser(view);
63 63
64 openDiag = new OpenDiag(view); 64 openDiag = new OpenDiag(view);
65 openDiag->hide(); 65 openDiag->hide();
66 66
67} 67}
68 68
69void ViewMailBase::slotChangeAttachview(bool state) 69void ViewMailBase::slotChangeAttachview(bool state)
70{ 70{
diff --git a/noncore/unsupported/mail2/viewmailbase.h b/noncore/unsupported/mail2/viewmailbase.h
index ba82017..6e55021 100644
--- a/noncore/unsupported/mail2/viewmailbase.h
+++ b/noncore/unsupported/mail2/viewmailbase.h
@@ -1,36 +1,36 @@
1#ifndef VIEWMAILBASE_H 1#ifndef VIEWMAILBASE_H
2#define VIEWMAILBASE_H 2#define VIEWMAILBASE_H
3 3
4#include <qmainwindow.h> 4#include <qmainwindow.h>
5 5
6class QAction; 6class QAction;
7class OpenDiag; 7class OpenDiag;
8class QListView; 8class QListView;
9class QPEToolBar; 9class QPEToolBar;
10class QTextBrowser; 10class QTextBrowser;
11class QPEMenuBar; 11class QMenuBar;
12class QPopupMenu; 12class QPopupMenu;
13 13
14class ViewMailBase : public QMainWindow 14class ViewMailBase : public QMainWindow
15{ 15{
16 Q_OBJECT 16 Q_OBJECT
17 17
18public: 18public:
19 ViewMailBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); 19 ViewMailBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0);
20 20
21protected: 21protected:
22 QAction *reply, *forward, *attachbutton, *deleteMail; 22 QAction *reply, *forward, *attachbutton, *deleteMail;
23 QListView *attachments; 23 QListView *attachments;
24 QPEToolBar *toolbar; 24 QPEToolBar *toolbar;
25 QTextBrowser *browser; 25 QTextBrowser *browser;
26 OpenDiag *openDiag; 26 OpenDiag *openDiag;
27 QPEMenuBar *menubar; 27 QMenuBar *menubar;
28 QPopupMenu *mailmenu; 28 QPopupMenu *mailmenu;
29 29
30protected slots: 30protected slots:
31 void slotChangeAttachview(bool state); 31 void slotChangeAttachview(bool state);
32 32
33}; 33};
34 34
35#endif 35#endif
36 36
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp
index 04362d3..6930d60 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -1,134 +1,134 @@
1/*************************************************************************** 1/***************************************************************************
2 * * 2 * *
3 * This program is free software; you can redistribute it and/or modify * 3 * This program is free software; you can redistribute it and/or modify *
4 * it under the terms of the GNU General Public License as published by * 4 * it under the terms of the GNU General Public License as published by *
5 * the Free Software Foundation; either version 2 of the License, or * 5 * the Free Software Foundation; either version 2 of the License, or *
6 * (at your option) any later version. * 6 * (at your option) any later version. *
7 * * 7 * *
8 ***************************************************************************/ 8 ***************************************************************************/
9// Copyright (C) 2000 Trolltech AS. 9// Copyright (C) 2000 Trolltech AS.
10// adadpted form qpe/qipkg 10// adadpted form qpe/qipkg
11// (c) 2002 Patrick S. Vogt <tille@handhelds.org> 11// (c) 2002 Patrick S. Vogt <tille@handhelds.org>
12 12
13 13
14#include "mainwindow.h" 14#include "mainwindow.h"
15 15
16#include <qpe/qpemenubar.h> 16#include <qmenubar.h>
17#include <qpe/qpemessagebox.h> 17#include <qpe/qpemessagebox.h>
18#include <qpe/resource.h> 18#include <qpe/resource.h>
19#include <qpe/config.h> 19#include <qpe/config.h>
20#include <qpe/qpetoolbar.h> 20#include <qpe/qpetoolbar.h>
21#include <qpe/qcopenvelope_qws.h> 21#include <qpe/qcopenvelope_qws.h>
22#include <qaction.h> 22#include <qaction.h>
23#include <qmessagebox.h> 23#include <qmessagebox.h>
24#include <qpopupmenu.h> 24#include <qpopupmenu.h>
25#include <qtoolbutton.h> 25#include <qtoolbutton.h>
26#include <qstring.h> 26#include <qstring.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qfile.h> 28#include <qfile.h>
29#include <qlistview.h> 29#include <qlistview.h>
30#include <qtextview.h> 30#include <qtextview.h>
31#include <qcheckbox.h> 31#include <qcheckbox.h>
32#include <qlineedit.h> 32#include <qlineedit.h>
33#include <qtabwidget.h> 33#include <qtabwidget.h>
34#include <qcombobox.h> 34#include <qcombobox.h>
35#include <qmessagebox.h> 35#include <qmessagebox.h>
36#include <qpushbutton.h> 36#include <qpushbutton.h>
37#include <qlayout.h> 37#include <qlayout.h>
38 38
39#include "pksettingsbase.h" 39#include "pksettingsbase.h"
40#include "utils.h" 40#include "utils.h"
41#include "packagelistitem.h" 41#include "packagelistitem.h"
42 42
43 43
44MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : 44MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) :
45 QMainWindow( parent, name, f ) 45 QMainWindow( parent, name, f )
46// packageListServers( QObject(parent), name ), 46// packageListServers( QObject(parent), name ),
47// packageListSearch( parent, name ), 47// packageListSearch( parent, name ),
48// packageListDocLnk( parent, name ) 48// packageListDocLnk( parent, name )
49 { 49 {
50 setCaption( tr("Package Manager") ); 50 setCaption( tr("Package Manager") );
51 settings = new PackageManagerSettings(this,0,TRUE); 51 settings = new PackageManagerSettings(this,0,TRUE);
52 listViewPackages = new PackageListView( this,"listViewPackages",settings ); 52 listViewPackages = new PackageListView( this,"listViewPackages",settings );
53 setCentralWidget( listViewPackages ); 53 setCentralWidget( listViewPackages );
54 listViewPackages->addList( tr("feeds"), &packageListServers ); 54 listViewPackages->addList( tr("feeds"), &packageListServers );
55 listViewPackages->addList( tr("ipkgfind&killefiz"), &packageListSearch ); 55 listViewPackages->addList( tr("ipkgfind&killefiz"), &packageListSearch );
56 listViewPackages->addList( tr("documents"), &packageListDocLnk ); 56 listViewPackages->addList( tr("documents"), &packageListDocLnk );
57 ipkg = new PmIpkg( settings, this ); 57 ipkg = new PmIpkg( settings, this );
58 packageListServers.setSettings( settings ); 58 packageListServers.setSettings( settings );
59 packageListSearch.setSettings( settings ); 59 packageListSearch.setSettings( settings );
60 packageListDocLnk.setSettings( settings ); 60 packageListDocLnk.setSettings( settings );
61 pvDebug(9,"packageListServers.update"); 61 pvDebug(9,"packageListServers.update");
62 packageListServers.update(); 62 packageListServers.update();
63 pvDebug(9,"packageListDocLnk.update"); 63 pvDebug(9,"packageListDocLnk.update");
64 packageListDocLnk.update(); 64 packageListDocLnk.update();
65 pvDebug(9,"makeMenu"); 65 pvDebug(9,"makeMenu");
66 makeMenu(); 66 makeMenu();
67 makeChannel(); 67 makeChannel();
68 68
69 69
70 connect( section, SIGNAL(activated(int)), SLOT(sectionChanged()) ); 70 connect( section, SIGNAL(activated(int)), SLOT(sectionChanged()) );
71 connect( subsection, SIGNAL(activated(int)), SLOT(subSectionChanged()) ); 71 connect( subsection, SIGNAL(activated(int)), SLOT(subSectionChanged()) );
72 72
73 connect( settings->removeLinksButton, SIGNAL( clicked()), 73 connect( settings->removeLinksButton, SIGNAL( clicked()),
74 SLOT(removeLinks()) ); 74 SLOT(removeLinks()) );
75 connect( settings->createLinksButton, SIGNAL( clicked()), 75 connect( settings->createLinksButton, SIGNAL( clicked()),
76 SLOT(createLinks()) ); 76 SLOT(createLinks()) );
77 77
78 pvDebug(9,"displayList"); 78 pvDebug(9,"displayList");
79 displayList(); 79 displayList();
80} 80}
81 81
82void MainWindow::makeMenu() 82void MainWindow::makeMenu()
83{ 83{
84 84
85 QPEToolBar *toolBar = new QPEToolBar( this ); 85 QPEToolBar *toolBar = new QPEToolBar( this );
86 QPEMenuBar *menuBar = new QPEMenuBar( toolBar ); 86 QMenuBar *menuBar = new QMenuBar( toolBar );
87 QPopupMenu *srvMenu = new QPopupMenu( menuBar ); 87 QPopupMenu *srvMenu = new QPopupMenu( menuBar );
88 QPopupMenu *viewMenu = new QPopupMenu( menuBar ); 88 QPopupMenu *viewMenu = new QPopupMenu( menuBar );
89 QPopupMenu *cfgMenu = new QPopupMenu( menuBar ); 89 QPopupMenu *cfgMenu = new QPopupMenu( menuBar );
90 QPopupMenu *helpMenu = new QPopupMenu( menuBar ); 90 QPopupMenu *helpMenu = new QPopupMenu( menuBar );
91 91
92 setToolBarsMovable( false ); 92 setToolBarsMovable( false );
93 toolBar->setHorizontalStretchable( true ); 93 toolBar->setHorizontalStretchable( true );
94 menuBar->insertItem( tr( "Package" ), srvMenu ); 94 menuBar->insertItem( tr( "Package" ), srvMenu );
95 menuBar->insertItem( tr( "View" ), viewMenu ); 95 menuBar->insertItem( tr( "View" ), viewMenu );
96 menuBar->insertItem( tr( "Settings" ), cfgMenu ); 96 menuBar->insertItem( tr( "Settings" ), cfgMenu );
97 menuBar->insertItem( tr( "Help" ), helpMenu ); 97 menuBar->insertItem( tr( "Help" ), helpMenu );
98 98
99// QLabel *spacer; 99// QLabel *spacer;
100// spacer = new QLabel( "", toolBar ); 100// spacer = new QLabel( "", toolBar );
101// spacer->setBackgroundColor( toolBar->backgroundColor() ); 101// spacer->setBackgroundColor( toolBar->backgroundColor() );
102// toolBar->setStretchableWidget( spacer ); 102// toolBar->setStretchableWidget( spacer );
103 103
104 104
105 runAction = new QAction( tr( "Apply" ), 105 runAction = new QAction( tr( "Apply" ),
106 Resource::loadPixmap( "oipkg/install" ), 106 Resource::loadPixmap( "oipkg/install" ),
107 QString::null, 0, this, 0 ); 107 QString::null, 0, this, 0 );
108 connect( runAction, SIGNAL( activated() ), 108 connect( runAction, SIGNAL( activated() ),
109 this, SLOT( runIpkg() ) ); 109 this, SLOT( runIpkg() ) );
110 runAction->addTo( toolBar ); 110 runAction->addTo( toolBar );
111 runAction->addTo( srvMenu ); 111 runAction->addTo( srvMenu );
112 112
113 srvMenu->insertSeparator(); 113 srvMenu->insertSeparator();
114 114
115 updateAction = new QAction( tr( "Update" ), 115 updateAction = new QAction( tr( "Update" ),
116 Resource::loadIconSet( "oipkg/update" ), 116 Resource::loadIconSet( "oipkg/update" ),
117 QString::null, 0, this, 0 ); 117 QString::null, 0, this, 0 );
118 connect( updateAction, SIGNAL( activated() ), 118 connect( updateAction, SIGNAL( activated() ),
119 this , SLOT( updateList() ) ); 119 this , SLOT( updateList() ) );
120 updateAction->addTo( toolBar ); 120 updateAction->addTo( toolBar );
121 updateAction->addTo( srvMenu ); 121 updateAction->addTo( srvMenu );
122 122
123 QAction *cfgact; 123 QAction *cfgact;
124 124
125 cfgact = new QAction( tr( "Setups" ), 125 cfgact = new QAction( tr( "Setups" ),
126 QString::null, 0, this, 0 ); 126 QString::null, 0, this, 0 );
127 connect( cfgact, SIGNAL( activated() ), 127 connect( cfgact, SIGNAL( activated() ),
128 SLOT( showSettingsSetup() ) ); 128 SLOT( showSettingsSetup() ) );
129 cfgact->addTo( cfgMenu ); 129 cfgact->addTo( cfgMenu );
130 130
131 cfgact = new QAction( tr( "Servers" ), 131 cfgact = new QAction( tr( "Servers" ),
132 QString::null, 0, this, 0 ); 132 QString::null, 0, this, 0 );
133 connect( cfgact, SIGNAL( activated() ), 133 connect( cfgact, SIGNAL( activated() ),
134 SLOT( showSettingsSrv() ) ); 134 SLOT( showSettingsSrv() ) );