summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/commandeditdialog.cpp2
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp8
-rw-r--r--core/apps/embeddedkonsole/konsole.h4
-rw-r--r--core/apps/helpbrowser/helpbrowser.cpp6
-rw-r--r--core/apps/textedit/textedit.cpp8
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp6
-rw-r--r--core/pim/addressbook/addressbook.cpp6
-rw-r--r--core/pim/addressbook/addressbook.h4
-rw-r--r--core/pim/datebook/datebook.cpp6
-rw-r--r--core/pim/datebook2/mainwindow.cpp4
-rw-r--r--core/pim/datebook2/mainwindow.h6
-rw-r--r--core/pim/osearch/mainwindow.cpp6
-rw-r--r--core/pim/osearch/mainwindow.h2
-rw-r--r--core/pim/todo/mainwindow.cpp2
-rw-r--r--core/pim/todo/quickeditimpl.cpp2
-rw-r--r--core/pim/todo/quickeditimpl.h4
-rw-r--r--noncore/apps/checkbook/mainwindow.cpp6
-rw-r--r--noncore/apps/confedit/mainwindow.h2
-rw-r--r--noncore/apps/opie-bartender/bartender.cpp4
-rw-r--r--noncore/apps/opie-bartender/bartender.h4
-rw-r--r--noncore/apps/opie-reader/QTReaderApp.cpp6
-rw-r--r--noncore/apps/opie-reader/QTReaderApp.h4
-rw-r--r--noncore/apps/opie-sheet/mainwindow.cpp6
-rw-r--r--noncore/apps/opie-sheet/mainwindow.h4
-rw-r--r--noncore/apps/tableviewer/tableviewer.cpp4
-rw-r--r--noncore/comm/keypebble/kvnc.cpp2
-rw-r--r--noncore/games/backgammon/backgammon.cpp2
-rw-r--r--noncore/games/fifteen/fifteen.cpp4
-rw-r--r--noncore/games/go/gowidget.cpp4
-rw-r--r--noncore/games/mindbreaker/mindbreaker.cpp2
-rw-r--r--noncore/games/minesweep/minesweep.cpp4
-rw-r--r--noncore/games/parashoot/interface.cpp2
-rw-r--r--noncore/games/snake/interface.cpp2
-rw-r--r--noncore/games/solitaire/canvascardgame.cpp2
-rw-r--r--noncore/games/wordgame/wordgame.cpp2
-rw-r--r--noncore/graphics/drawpad/drawpad.cpp16
-rw-r--r--noncore/multimedia/opierec/helpwindow.cpp2
-rw-r--r--noncore/multimedia/showimg/showimg.cpp6
-rw-r--r--noncore/multimedia/showimg/showimg.h6
-rw-r--r--noncore/net/opieftp/opieftp.cpp4
-rw-r--r--noncore/net/opieftp/opieftp.h2
-rw-r--r--noncore/net/opieirc/mainwindow.cpp2
-rw-r--r--noncore/net/ubrowser/mainview.cpp2
-rw-r--r--noncore/net/ubrowser/mainview.h2
-rw-r--r--noncore/settings/usermanager/usermanager.cpp2
-rw-r--r--noncore/settings/usermanager/usermanager.h2
-rw-r--r--noncore/tools/formatter/formatter.cpp2
-rw-r--r--noncore/unsupported/filebrowser/filebrowser.cpp6
-rw-r--r--noncore/unsupported/mail2/composerbase.cpp6
-rw-r--r--noncore/unsupported/mail2/composerbase.h4
-rw-r--r--noncore/unsupported/mail2/mainwindowbase.cpp4
-rw-r--r--noncore/unsupported/mail2/mainwindowbase.h4
-rw-r--r--noncore/unsupported/mail2/viewmailbase.cpp4
-rw-r--r--noncore/unsupported/mail2/viewmailbase.h4
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp12
-rw-r--r--noncore/unsupported/oipkg/mainwindow.h10
-rw-r--r--noncore/unsupported/qpdf/qpdf.cpp2
57 files changed, 123 insertions, 123 deletions
diff --git a/core/apps/embeddedkonsole/commandeditdialog.cpp b/core/apps/embeddedkonsole/commandeditdialog.cpp
index 97b0a9e..dd35466 100644
--- a/core/apps/embeddedkonsole/commandeditdialog.cpp
+++ b/core/apps/embeddedkonsole/commandeditdialog.cpp
@@ -1,55 +1,55 @@
1//comandeditdialog.cpp 1//comandeditdialog.cpp
2 2
3#include "commandeditdialog.h" 3#include "commandeditdialog.h"
4#include "playlistselection.h" 4#include "playlistselection.h"
5#include <qstring.h> 5#include <qstring.h>
6#include <qpe/config.h> 6#include <qpe/config.h>
7#include <qpe/qpetoolbar.h> 7#include <qtoolbar.h>
8#include <qwidget.h> 8#include <qwidget.h>
9#include <qmenubar.h> 9#include <qmenubar.h>
10#include <qpe/resource.h> 10#include <qpe/resource.h>
11#include <qlist.h> 11#include <qlist.h>
12#include <qtoolbutton.h> 12#include <qtoolbutton.h>
13#include <qvbox.h> 13#include <qvbox.h>
14#include <qlistview.h> 14#include <qlistview.h>
15#include <qlineedit.h> 15#include <qlineedit.h>
16#include <qheader.h> 16#include <qheader.h>
17#include <qlabel.h> 17#include <qlabel.h>
18#include <qmessagebox.h> 18#include <qmessagebox.h>
19#include "smallcommandeditdialogbase.h" 19#include "smallcommandeditdialogbase.h"
20 20
21CommandEditDialog::CommandEditDialog(QWidget *parent, const char* name, WFlags fl ) 21CommandEditDialog::CommandEditDialog(QWidget *parent, const char* name, WFlags fl )
22 : CommandEditDialogBase(parent, name, TRUE, fl) 22 : CommandEditDialogBase(parent, name, TRUE, fl)
23 23
24{ 24{
25 m_SuggestedCommandList->addColumn( tr("Command Selection") ); 25 m_SuggestedCommandList->addColumn( tr("Command Selection") );
26 m_SuggestedCommandList->header()->hide(); 26 m_SuggestedCommandList->header()->hide();
27 m_SuggestedCommandList->setSorting(-1,FALSE); 27 m_SuggestedCommandList->setSorting(-1,FALSE);
28 m_SuggestedCommandList->clearSelection(); 28 m_SuggestedCommandList->clearSelection();
29 m_SuggestedCommandList->setSorting(0,TRUE); 29 m_SuggestedCommandList->setSorting(0,TRUE);
30 QListViewItem *item; 30 QListViewItem *item;
31 item = new QListViewItem( m_SuggestedCommandList,"export "); 31 item = new QListViewItem( m_SuggestedCommandList,"export ");
32 item = new QListViewItem( m_SuggestedCommandList,"ifconfig "); 32 item = new QListViewItem( m_SuggestedCommandList,"ifconfig ");
33 item = new QListViewItem( m_SuggestedCommandList,"ipkg "); 33 item = new QListViewItem( m_SuggestedCommandList,"ipkg ");
34 item = new QListViewItem( m_SuggestedCommandList,"gzip "); 34 item = new QListViewItem( m_SuggestedCommandList,"gzip ");
35 item = new QListViewItem( m_SuggestedCommandList,"gunzip "); 35 item = new QListViewItem( m_SuggestedCommandList,"gunzip ");
36 item = new QListViewItem( m_SuggestedCommandList,"chgrp "); 36 item = new QListViewItem( m_SuggestedCommandList,"chgrp ");
37 item = new QListViewItem( m_SuggestedCommandList,"chown "); 37 item = new QListViewItem( m_SuggestedCommandList,"chown ");
38 item = new QListViewItem( m_SuggestedCommandList,"date "); 38 item = new QListViewItem( m_SuggestedCommandList,"date ");
39 item = new QListViewItem( m_SuggestedCommandList,"dd "); 39 item = new QListViewItem( m_SuggestedCommandList,"dd ");
40 item = new QListViewItem( m_SuggestedCommandList,"dmesg "); 40 item = new QListViewItem( m_SuggestedCommandList,"dmesg ");
41 item = new QListViewItem( m_SuggestedCommandList,"fuser "); 41 item = new QListViewItem( m_SuggestedCommandList,"fuser ");
42 item = new QListViewItem( m_SuggestedCommandList,"hostname "); 42 item = new QListViewItem( m_SuggestedCommandList,"hostname ");
43 item = new QListViewItem( m_SuggestedCommandList,"kill "); 43 item = new QListViewItem( m_SuggestedCommandList,"kill ");
44 item = new QListViewItem( m_SuggestedCommandList,"killall "); 44 item = new QListViewItem( m_SuggestedCommandList,"killall ");
45 item = new QListViewItem( m_SuggestedCommandList,"ln "); 45 item = new QListViewItem( m_SuggestedCommandList,"ln ");
46 item = new QListViewItem( m_SuggestedCommandList,"ln -s "); 46 item = new QListViewItem( m_SuggestedCommandList,"ln -s ");
47 item = new QListViewItem( m_SuggestedCommandList,"lsmod"); 47 item = new QListViewItem( m_SuggestedCommandList,"lsmod");
48 item = new QListViewItem( m_SuggestedCommandList,"depmod -a"); 48 item = new QListViewItem( m_SuggestedCommandList,"depmod -a");
49 item = new QListViewItem( m_SuggestedCommandList,"modprobe "); 49 item = new QListViewItem( m_SuggestedCommandList,"modprobe ");
50 item = new QListViewItem( m_SuggestedCommandList,"mount "); 50 item = new QListViewItem( m_SuggestedCommandList,"mount ");
51 item = new QListViewItem( m_SuggestedCommandList,"more "); 51 item = new QListViewItem( m_SuggestedCommandList,"more ");
52 item = new QListViewItem( m_SuggestedCommandList,"sort "); 52 item = new QListViewItem( m_SuggestedCommandList,"sort ");
53 item = new QListViewItem( m_SuggestedCommandList,"touch "); 53 item = new QListViewItem( m_SuggestedCommandList,"touch ");
54 item = new QListViewItem( m_SuggestedCommandList,"umount "); 54 item = new QListViewItem( m_SuggestedCommandList,"umount ");
55 item = new QListViewItem( m_SuggestedCommandList,"mknod "); 55 item = new QListViewItem( m_SuggestedCommandList,"mknod ");
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index d855d90..fff2f68 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -1,79 +1,79 @@
1/* ---------------------------------------------------------------------- */ 1/* ---------------------------------------------------------------------- */
2/* */ 2/* */
3/* [main.C] Konsole */ 3/* [main.C] Konsole */
4/* */ 4/* */
5/* ---------------------------------------------------------------------- */ 5/* ---------------------------------------------------------------------- */
6/* */ 6/* */
7/* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */ 7/* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */
8/* */ 8/* */
9/* This file is part of Konsole, an X terminal. */ 9/* This file is part of Konsole, an X terminal. */
10/* */ 10/* */
11/* The material contained in here more or less directly orginates from */ 11/* The material contained in here more or less directly orginates from */
12/* kvt, which is copyright (c) 1996 by Matthias Ettrich <ettrich@kde.org> */ 12/* kvt, which is copyright (c) 1996 by Matthias Ettrich <ettrich@kde.org> */
13/* */ 13/* */
14/* ---------------------------------------------------------------------- */ 14/* ---------------------------------------------------------------------- */
15/* */ 15/* */
16/* Ported Konsole to Qt/Embedded */ 16/* Ported Konsole to Qt/Embedded */
17/* */ 17/* */
18/* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ 18/* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */
19/* */ 19/* */
20/* -------------------------------------------------------------------------- */ 20/* -------------------------------------------------------------------------- */
21// enhancements added by L.J. Potter <ljp@llornkcor.com> 21// enhancements added by L.J. Potter <ljp@llornkcor.com>
22#define QT_QWS_OPIE 22#define QT_QWS_OPIE
23 23
24#include <qpe/resource.h> 24#include <qpe/resource.h>
25 25
26#include <qdir.h> 26#include <qdir.h>
27#include <qevent.h> 27#include <qevent.h>
28#include <qdragobject.h> 28#include <qdragobject.h>
29#include <qobjectlist.h> 29#include <qobjectlist.h>
30#include <qtoolbutton.h> 30#include <qtoolbutton.h>
31#include <qpe/qpetoolbar.h> 31#include <qtoolbar.h>
32#include <qpushbutton.h> 32#include <qpushbutton.h>
33#include <qfontdialog.h> 33#include <qfontdialog.h>
34#include <qglobal.h> 34#include <qglobal.h>
35#include <qpainter.h> 35#include <qpainter.h>
36#include <qmenubar.h> 36#include <qmenubar.h>
37#include <qmessagebox.h> 37#include <qmessagebox.h>
38#include <qaction.h> 38#include <qaction.h>
39#include <qapplication.h> 39#include <qapplication.h>
40#include <qfontmetrics.h> 40#include <qfontmetrics.h>
41#include <qcombobox.h> 41#include <qcombobox.h>
42#include <qevent.h> 42#include <qevent.h>
43#include <qtabwidget.h> 43#include <qtabwidget.h>
44#include <qtabbar.h> 44#include <qtabbar.h>
45#include <qpe/config.h> 45#include <qpe/config.h>
46#include <qstringlist.h> 46#include <qstringlist.h>
47#include <qpalette.h> 47#include <qpalette.h>
48 48
49#include <unistd.h> 49#include <unistd.h>
50#include <pwd.h> 50#include <pwd.h>
51#include <sys/types.h> 51#include <sys/types.h>
52#include <sys/wait.h> 52#include <sys/wait.h>
53#include <stdio.h> 53#include <stdio.h>
54#include <stdlib.h> 54#include <stdlib.h>
55#include <assert.h> 55#include <assert.h>
56 56
57#include "konsole.h" 57#include "konsole.h"
58#include "keytrans.h" 58#include "keytrans.h"
59#include "commandeditdialog.h" 59#include "commandeditdialog.h"
60 60
61#ifdef QT_QWS_OPIE 61#ifdef QT_QWS_OPIE
62#include <opie/colorpopupmenu.h> 62#include <opie/colorpopupmenu.h>
63#endif 63#endif
64 64
65class EKNumTabBar : public QTabBar { 65class EKNumTabBar : public QTabBar {
66public: 66public:
67 void numberTabs() 67 void numberTabs()
68 { 68 {
69 // Yes, it really is this messy. QTabWidget needs functions 69 // Yes, it really is this messy. QTabWidget needs functions
70 // that provide acces to tabs in a sequential way. 70 // that provide acces to tabs in a sequential way.
71 int m=INT_MIN; 71 int m=INT_MIN;
72 for (int i=0; i<count(); i++) { 72 for (int i=0; i<count(); i++) {
73 QTab* left=0; 73 QTab* left=0;
74 QListIterator<QTab> it(*tabList()); 74 QListIterator<QTab> it(*tabList());
75 int x=INT_MAX; 75 int x=INT_MAX;
76 for( QTab* t; (t=it.current()); ++it ) { 76 for( QTab* t; (t=it.current()); ++it ) {
77 int tx = t->rect().x(); 77 int tx = t->rect().x();
78 if ( tx<x && tx>m ) { 78 if ( tx<x && tx>m ) {
79 x = tx; 79 x = tx;
@@ -237,192 +237,192 @@ void Konsole::initCommandList()
237 commonCombo->insertItem(commonCmds[i],i); 237 commonCombo->insertItem(commonCmds[i],i);
238 } 238 }
239 } else { 239 } else {
240 for (int i = 0; i < 100; i++) { 240 for (int i = 0; i < 100; i++) {
241 if (!(cfg.readEntry( QString::number(i),"")).isEmpty()) 241 if (!(cfg.readEntry( QString::number(i),"")).isEmpty())
242 commonCombo->insertItem((cfg.readEntry( QString::number(i),""))); 242 commonCombo->insertItem((cfg.readEntry( QString::number(i),"")));
243 } 243 }
244 } 244 }
245 245
246} 246}
247 247
248void Konsole::init(const char* _pgm, QStrList & _args) 248void Konsole::init(const char* _pgm, QStrList & _args)
249{ 249{
250 b_scroll = TRUE; // histon; 250 b_scroll = TRUE; // histon;
251 n_keytab = 0; 251 n_keytab = 0;
252 n_render = 0; 252 n_render = 0;
253 startUp=0; 253 startUp=0;
254 fromMenu = FALSE; 254 fromMenu = FALSE;
255 255
256 setCaption( tr("Terminal") ); 256 setCaption( tr("Terminal") );
257 setIcon( Resource::loadPixmap( "konsole" ) ); 257 setIcon( Resource::loadPixmap( "konsole" ) );
258 258
259 Config cfg("Konsole"); 259 Config cfg("Konsole");
260 cfg.setGroup("Konsole"); 260 cfg.setGroup("Konsole");
261 QString tmp; 261 QString tmp;
262 // initialize the list of allowed fonts /////////////////////////////////// 262 // initialize the list of allowed fonts ///////////////////////////////////
263 cfont = cfg.readNumEntry("FontID", 1); 263 cfont = cfg.readNumEntry("FontID", 1);
264 QFont f = QFont("Micro", 4, QFont::Normal); 264 QFont f = QFont("Micro", 4, QFont::Normal);
265 f.setFixedPitch(TRUE); 265 f.setFixedPitch(TRUE);
266 fonts.append(new VTFont(tr("Micro"), f)); 266 fonts.append(new VTFont(tr("Micro"), f));
267 267
268 f = QFont("Fixed", 7, QFont::Normal); 268 f = QFont("Fixed", 7, QFont::Normal);
269 f.setFixedPitch(TRUE); 269 f.setFixedPitch(TRUE);
270 fonts.append(new VTFont(tr("Small Fixed"), f)); 270 fonts.append(new VTFont(tr("Small Fixed"), f));
271 271
272 f = QFont("Fixed", 12, QFont::Normal); 272 f = QFont("Fixed", 12, QFont::Normal);
273 f.setFixedPitch(TRUE); 273 f.setFixedPitch(TRUE);
274 fonts.append(new VTFont(tr("Medium Fixed"), f)); 274 fonts.append(new VTFont(tr("Medium Fixed"), f));
275 275
276 // create terminal emulation framework //////////////////////////////////// 276 // create terminal emulation framework ////////////////////////////////////
277 nsessions = 0; 277 nsessions = 0;
278 278
279 tab = new EKNumTabWidget(this); 279 tab = new EKNumTabWidget(this);
280 280
281 connect(tab, SIGNAL(currentChanged(QWidget*)), this, SLOT(switchSession(QWidget*))); 281 connect(tab, SIGNAL(currentChanged(QWidget*)), this, SLOT(switchSession(QWidget*)));
282 282
283 // create terminal toolbar //////////////////////////////////////////////// 283 // create terminal toolbar ////////////////////////////////////////////////
284 setToolBarsMovable( FALSE ); 284 setToolBarsMovable( FALSE );
285 QPEToolBar *menuToolBar = new QPEToolBar( this ); 285 QToolBar *menuToolBar = new QToolBar( this );
286 menuToolBar->setHorizontalStretchable( TRUE ); 286 menuToolBar->setHorizontalStretchable( TRUE );
287 287
288 QMenuBar *menuBar = new QMenuBar( menuToolBar ); 288 QMenuBar *menuBar = new QMenuBar( menuToolBar );
289 289
290 fontList = new QPopupMenu( this ); 290 fontList = new QPopupMenu( this );
291 for(uint i = 0; i < fonts.count(); i++) { 291 for(uint i = 0; i < fonts.count(); i++) {
292 VTFont *fnt = fonts.at(i); 292 VTFont *fnt = fonts.at(i);
293 fontList->insertItem(fnt->getName(), i); 293 fontList->insertItem(fnt->getName(), i);
294 } 294 }
295 fontChanged(cfont); 295 fontChanged(cfont);
296 296
297 configMenu = new QPopupMenu( this); 297 configMenu = new QPopupMenu( this);
298 colorMenu = new QPopupMenu( this); 298 colorMenu = new QPopupMenu( this);
299 scrollMenu = new QPopupMenu( this); 299 scrollMenu = new QPopupMenu( this);
300 editCommandListMenu = new QPopupMenu( this); 300 editCommandListMenu = new QPopupMenu( this);
301 301
302 configMenu->insertItem(tr("Command List"), editCommandListMenu); 302 configMenu->insertItem(tr("Command List"), editCommandListMenu);
303 303
304 bool listHidden; 304 bool listHidden;
305 cfg.setGroup("Menubar"); 305 cfg.setGroup("Menubar");
306 if( cfg.readEntry("Hidden","FALSE") == "TRUE") { 306 if( cfg.readEntry("Hidden","FALSE") == "TRUE") {
307 editCommandListMenu->insertItem( tr( "Show command list" )); 307 editCommandListMenu->insertItem( tr( "Show command list" ));
308 listHidden=TRUE; 308 listHidden=TRUE;
309 } else { 309 } else {
310 editCommandListMenu->insertItem( tr( "Hide command list" )); 310 editCommandListMenu->insertItem( tr( "Hide command list" ));
311 listHidden=FALSE; 311 listHidden=FALSE;
312 } 312 }
313 313
314 cfg.setGroup("Tabs"); 314 cfg.setGroup("Tabs");
315 tmp=cfg.readEntry("Position","Bottom"); 315 tmp=cfg.readEntry("Position","Bottom");
316 if(tmp=="Top") { 316 if(tmp=="Top") {
317 tab->setTabPosition(QTabWidget::Top); 317 tab->setTabPosition(QTabWidget::Top);
318 configMenu->insertItem( tr( "Tabs on Bottom" ) ); 318 configMenu->insertItem( tr( "Tabs on Bottom" ) );
319 } else { 319 } else {
320 tab->setTabPosition(QTabWidget::Bottom); 320 tab->setTabPosition(QTabWidget::Bottom);
321 configMenu->insertItem(tr("Tabs on Top")); 321 configMenu->insertItem(tr("Tabs on Top"));
322 } 322 }
323 configMenu->insertSeparator(2); 323 configMenu->insertSeparator(2);
324 324
325 colorMenu->insertItem(tr( "Green on Black")); 325 colorMenu->insertItem(tr( "Green on Black"));
326 colorMenu->insertItem(tr( "Black on White")); 326 colorMenu->insertItem(tr( "Black on White"));
327 colorMenu->insertItem(tr( "White on Black")); 327 colorMenu->insertItem(tr( "White on Black"));
328 colorMenu->insertItem(tr( "Black on Transparent")); 328 colorMenu->insertItem(tr( "Black on Transparent"));
329 colorMenu->insertItem(tr( "Black on Red")); 329 colorMenu->insertItem(tr( "Black on Red"));
330 colorMenu->insertItem(tr( "Red on Black")); 330 colorMenu->insertItem(tr( "Red on Black"));
331 colorMenu->insertItem(tr( "Green on Yellow")); 331 colorMenu->insertItem(tr( "Green on Yellow"));
332 colorMenu->insertItem(tr( "Blue on Magenta")); 332 colorMenu->insertItem(tr( "Blue on Magenta"));
333 colorMenu->insertItem(tr( "Magenta on Blue")); 333 colorMenu->insertItem(tr( "Magenta on Blue"));
334 colorMenu->insertItem(tr( "Cyan on White")); 334 colorMenu->insertItem(tr( "Cyan on White"));
335 colorMenu->insertItem(tr( "White on Cyan")); 335 colorMenu->insertItem(tr( "White on Cyan"));
336 colorMenu->insertItem(tr( "Blue on Black")); 336 colorMenu->insertItem(tr( "Blue on Black"));
337 colorMenu->insertItem(tr( "Amber on Black")); 337 colorMenu->insertItem(tr( "Amber on Black"));
338 338
339#ifdef QT_QWS_OPIE 339#ifdef QT_QWS_OPIE
340 colorMenu->insertItem(tr( "Custom")); 340 colorMenu->insertItem(tr( "Custom"));
341#endif 341#endif
342 342
343 configMenu->insertItem( tr("Font"), fontList ); 343 configMenu->insertItem( tr("Font"), fontList );
344 configMenu->insertItem(tr( "Colors") ,colorMenu); 344 configMenu->insertItem(tr( "Colors") ,colorMenu);
345 345
346 connect( fontList, SIGNAL( activated(int) ), this, SLOT( fontChanged(int) )); 346 connect( fontList, SIGNAL( activated(int) ), this, SLOT( fontChanged(int) ));
347 connect( configMenu, SIGNAL( activated(int) ), this, SLOT( configMenuSelected(int) )); 347 connect( configMenu, SIGNAL( activated(int) ), this, SLOT( configMenuSelected(int) ));
348 connect( colorMenu, SIGNAL( activated(int) ), this, SLOT( colorMenuIsSelected(int) )); 348 connect( colorMenu, SIGNAL( activated(int) ), this, SLOT( colorMenuIsSelected(int) ));
349 connect( scrollMenu, SIGNAL(activated(int)),this,SLOT(scrollMenuSelected(int))); 349 connect( scrollMenu, SIGNAL(activated(int)),this,SLOT(scrollMenuSelected(int)));
350 connect(editCommandListMenu,SIGNAL(activated(int)),this,SLOT(editCommandListMenuSelected(int))); 350 connect(editCommandListMenu,SIGNAL(activated(int)),this,SLOT(editCommandListMenuSelected(int)));
351 351
352 menuBar->insertItem( tr("Options"), configMenu ); 352 menuBar->insertItem( tr("Options"), configMenu );
353 353
354 QPEToolBar *toolbar = new QPEToolBar( this ); 354 QToolBar *toolbar = new QToolBar( this );
355 355
356 QAction *a; 356 QAction *a;
357 357
358 // Button Commands 358 // Button Commands
359 a = new QAction( tr("New"), Resource::loadPixmap( "konsole" ), QString::null, 0, this, 0 ); 359 a = new QAction( tr("New"), Resource::loadPixmap( "konsole" ), QString::null, 0, this, 0 );
360 connect( a, SIGNAL( activated() ), this, SLOT( newSession() ) ); a->addTo( toolbar ); 360 connect( a, SIGNAL( activated() ), this, SLOT( newSession() ) ); a->addTo( toolbar );
361 a = new QAction( tr("Enter"), Resource::loadPixmap( "konsole/enter" ), QString::null, 0, this, 0 ); 361 a = new QAction( tr("Enter"), Resource::loadPixmap( "konsole/enter" ), QString::null, 0, this, 0 );
362 connect( a, SIGNAL( activated() ), this, SLOT( hitEnter() ) ); a->addTo( toolbar ); 362 connect( a, SIGNAL( activated() ), this, SLOT( hitEnter() ) ); a->addTo( toolbar );
363 a = new QAction( tr("Space"), Resource::loadPixmap( "konsole/space" ), QString::null, 0, this, 0 ); 363 a = new QAction( tr("Space"), Resource::loadPixmap( "konsole/space" ), QString::null, 0, this, 0 );
364 connect( a, SIGNAL( activated() ), this, SLOT( hitSpace() ) ); a->addTo( toolbar ); 364 connect( a, SIGNAL( activated() ), this, SLOT( hitSpace() ) ); a->addTo( toolbar );
365 a = new QAction( tr("Tab"), Resource::loadPixmap( "konsole/tab" ), QString::null, 0, this, 0 ); 365 a = new QAction( tr("Tab"), Resource::loadPixmap( "konsole/tab" ), QString::null, 0, this, 0 );
366 connect( a, SIGNAL( activated() ), this, SLOT( hitTab() ) ); a->addTo( toolbar ); 366 connect( a, SIGNAL( activated() ), this, SLOT( hitTab() ) ); a->addTo( toolbar );
367 a = new QAction( tr("Up"), Resource::loadPixmap( "konsole/up" ), QString::null, 0, this, 0 ); 367 a = new QAction( tr("Up"), Resource::loadPixmap( "konsole/up" ), QString::null, 0, this, 0 );
368 connect( a, SIGNAL( activated() ), this, SLOT( hitUp() ) ); a->addTo( toolbar ); 368 connect( a, SIGNAL( activated() ), this, SLOT( hitUp() ) ); a->addTo( toolbar );
369 a = new QAction( tr("Down"), Resource::loadPixmap( "konsole/down" ), QString::null, 0, this, 0 ); 369 a = new QAction( tr("Down"), Resource::loadPixmap( "konsole/down" ), QString::null, 0, this, 0 );
370 connect( a, SIGNAL( activated() ), this, SLOT( hitDown() ) ); a->addTo( toolbar ); 370 connect( a, SIGNAL( activated() ), this, SLOT( hitDown() ) ); a->addTo( toolbar );
371 a = new QAction( tr("Paste"), Resource::loadPixmap( "paste" ), QString::null, 0, this, 0 ); 371 a = new QAction( tr("Paste"), Resource::loadPixmap( "paste" ), QString::null, 0, this, 0 );
372 connect( a, SIGNAL( activated() ), this, SLOT( hitPaste() ) ); a->addTo( toolbar ); 372 connect( a, SIGNAL( activated() ), this, SLOT( hitPaste() ) ); a->addTo( toolbar );
373/* 373/*
374 a = new QAction( tr("Up"), Resource::loadPixmap( "up" ), QString::null, 0, this, 0 ); 374 a = new QAction( tr("Up"), Resource::loadPixmap( "up" ), QString::null, 0, this, 0 );
375 connect( a, SIGNAL( activated() ), this, SLOT( hitUp() ) ); a->addTo( toolbar ); 375 connect( a, SIGNAL( activated() ), this, SLOT( hitUp() ) ); a->addTo( toolbar );
376 a = new QAction( tr("Down"), Resource::loadPixmap( "down" ), QString::null, 0, this, 0 ); 376 a = new QAction( tr("Down"), Resource::loadPixmap( "down" ), QString::null, 0, this, 0 );
377 connect( a, SIGNAL( activated() ), this, SLOT( hitDown() ) ); a->addTo( toolbar ); 377 connect( a, SIGNAL( activated() ), this, SLOT( hitDown() ) ); a->addTo( toolbar );
378*/ 378*/
379 379
380 secondToolBar = new QPEToolBar( this ); 380 secondToolBar = new QToolBar( this );
381 secondToolBar->setHorizontalStretchable( TRUE ); 381 secondToolBar->setHorizontalStretchable( TRUE );
382 382
383 commonCombo = new QComboBox( secondToolBar ); 383 commonCombo = new QComboBox( secondToolBar );
384 commonCombo->setMaximumWidth(236); 384 commonCombo->setMaximumWidth(236);
385 385
386 editCommandListMenu->insertItem( tr( "Quick Edit" ) ); 386 editCommandListMenu->insertItem( tr( "Quick Edit" ) );
387 if( listHidden) { 387 if( listHidden) {
388 secondToolBar->hide(); 388 secondToolBar->hide();
389 editCommandListMenu->setItemEnabled(-23 ,FALSE); 389 editCommandListMenu->setItemEnabled(-23 ,FALSE);
390 } 390 }
391 editCommandListMenu->insertItem(tr( "Edit" ) ); 391 editCommandListMenu->insertItem(tr( "Edit" ) );
392 392
393 cfg.setGroup("Commands"); 393 cfg.setGroup("Commands");
394 commonCombo->setInsertionPolicy(QComboBox::AtCurrent); 394 commonCombo->setInsertionPolicy(QComboBox::AtCurrent);
395 395
396 initCommandList(); 396 initCommandList();
397// for (int i = 0; commonCmds[i] != NULL; i++) { 397// for (int i = 0; commonCmds[i] != NULL; i++) {
398// commonCombo->insertItem( commonCmds[i], i ); 398// commonCombo->insertItem( commonCmds[i], i );
399// tmp = cfg.readEntry( QString::number(i),""); 399// tmp = cfg.readEntry( QString::number(i),"");
400// if(tmp != "") 400// if(tmp != "")
401// commonCombo->changeItem( tmp,i ); 401// commonCombo->changeItem( tmp,i );
402// } 402// }
403 403
404 connect( commonCombo, SIGNAL( activated(int) ), this, SLOT( enterCommand(int) )); 404 connect( commonCombo, SIGNAL( activated(int) ), this, SLOT( enterCommand(int) ));
405 405
406 scrollMenu->insertItem(tr( "None" )); 406 scrollMenu->insertItem(tr( "None" ));
407 scrollMenu->insertItem(tr( "Left" )); 407 scrollMenu->insertItem(tr( "Left" ));
408 scrollMenu->insertItem(tr( "Right" )); 408 scrollMenu->insertItem(tr( "Right" ));
409// scrollMenu->insertSeparator(4); 409// scrollMenu->insertSeparator(4);
410// scrollMenu->insertItem(tr( "Horizontal" )); 410// scrollMenu->insertItem(tr( "Horizontal" ));
411 411
412 configMenu->insertItem(tr( "ScrollBar" ),scrollMenu); 412 configMenu->insertItem(tr( "ScrollBar" ),scrollMenu);
413 413
414 int jut = configMenu->insertItem(tr( "Wrap" )); 414 int jut = configMenu->insertItem(tr( "Wrap" ));
415 cfg.setGroup("ScrollBar"); 415 cfg.setGroup("ScrollBar");
416 configMenu->setItemChecked(jut, cfg.readBoolEntry("HorzScroll",0)); 416 configMenu->setItemChecked(jut, cfg.readBoolEntry("HorzScroll",0));
417 417
418 jut = configMenu->insertItem(tr( "Use Beep" )); 418 jut = configMenu->insertItem(tr( "Use Beep" ));
419 cfg.setGroup("Menubar"); 419 cfg.setGroup("Menubar");
420 420
421 configMenu->setItemChecked(jut, cfg.readBoolEntry("useBeep",0)); 421 configMenu->setItemChecked(jut, cfg.readBoolEntry("useBeep",0));
422 422
423 423
424//scrollMenuSelected(-29); 424//scrollMenuSelected(-29);
425// cfg.setGroup("ScrollBar"); 425// cfg.setGroup("ScrollBar");
426// if(cfg.readBoolEntry("HorzScroll",0)) { 426// if(cfg.readBoolEntry("HorzScroll",0)) {
427// if(cfg.readNumEntry("Position",2) == 0) 427// if(cfg.readNumEntry("Position",2) == 0)
428// te->setScrollbarLocation(1); 428// te->setScrollbarLocation(1);
diff --git a/core/apps/embeddedkonsole/konsole.h b/core/apps/embeddedkonsole/konsole.h
index e9d0e4b..7d5a908 100644
--- a/core/apps/embeddedkonsole/konsole.h
+++ b/core/apps/embeddedkonsole/konsole.h
@@ -1,102 +1,102 @@
1/* ----------------------------------------------------------------------- */ 1/* ----------------------------------------------------------------------- */
2/* */ 2/* */
3/* [konsole.h] Konsole */ 3/* [konsole.h] Konsole */
4/* */ 4/* */
5/* -------------------------------------------------------------------------- */ 5/* -------------------------------------------------------------------------- */
6/* */ 6/* */
7/* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */ 7/* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */
8/* */ 8/* */
9/* This file is part of Konsole, an X terminal. */ 9/* This file is part of Konsole, an X terminal. */
10/* */ 10/* */
11/* The material contained in here more or less directly orginates from */ 11/* The material contained in here more or less directly orginates from */
12/* kvt, which is copyright (c) 1996 by Matthias Ettrich <ettrich@kde.org> */ 12/* kvt, which is copyright (c) 1996 by Matthias Ettrich <ettrich@kde.org> */
13/* */ 13/* */
14/* -------------------------------------------------------------------------- */ 14/* -------------------------------------------------------------------------- */
15/* */ 15/* */
16/* Ported Konsole to Qt/Embedded */ 16/* Ported Konsole to Qt/Embedded */
17/* */ 17/* */
18/* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ 18/* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */
19/* */ 19/* */
20/* -------------------------------------------------------------------------- */ 20/* -------------------------------------------------------------------------- */
21 21
22#ifndef KONSOLE_H 22#ifndef KONSOLE_H
23#define KONSOLE_H 23#define KONSOLE_H
24 24
25 25
26#include <qmainwindow.h> 26#include <qmainwindow.h>
27#include <qaction.h> 27#include <qaction.h>
28#include <qpopupmenu.h> 28#include <qpopupmenu.h>
29#include <qstrlist.h> 29#include <qstrlist.h>
30#include <qintdict.h> 30#include <qintdict.h>
31#include <qptrdict.h> 31#include <qptrdict.h>
32#include <qtabwidget.h> 32#include <qtabwidget.h>
33#include <qpe/qpetoolbar.h> 33#include <qtoolbar.h>
34#include <qcombobox.h> 34#include <qcombobox.h>
35#include <qcolor.h> 35#include <qcolor.h>
36 36
37#include "MyPty.h" 37#include "MyPty.h"
38#include "TEWidget.h" 38#include "TEWidget.h"
39#include "TEmuVt102.h" 39#include "TEmuVt102.h"
40#include "session.h" 40#include "session.h"
41 41
42class EKNumTabWidget; 42class EKNumTabWidget;
43 43
44class Konsole : public QMainWindow 44class Konsole : public QMainWindow
45{ 45{
46 Q_OBJECT 46 Q_OBJECT
47 47
48public: 48public:
49 static QString appName() { return QString::fromLatin1("embeddedkonsole"); } 49 static QString appName() { return QString::fromLatin1("embeddedkonsole"); }
50 50
51 Konsole(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); 51 Konsole(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
52 ~Konsole(); 52 ~Konsole();
53 void setColLin(int columns, int lines); 53 void setColLin(int columns, int lines);
54 QPEToolBar *secondToolBar; 54 QToolBar *secondToolBar;
55 void show(); 55 void show();
56 void setColor(); 56 void setColor();
57 int lastSelectedMenu; 57 int lastSelectedMenu;
58 int startUp; 58 int startUp;
59private slots: 59private slots:
60 void setDocument(const QString &); 60 void setDocument(const QString &);
61 void doneSession(TESession*,int); 61 void doneSession(TESession*,int);
62 void changeColumns(int); 62 void changeColumns(int);
63 void fontChanged(int); 63 void fontChanged(int);
64 void configMenuSelected(int ); 64 void configMenuSelected(int );
65 void colorMenuSelected(int); 65 void colorMenuSelected(int);
66 void colorMenuIsSelected(int); 66 void colorMenuIsSelected(int);
67 void enterCommand(int); 67 void enterCommand(int);
68 void hitEnter(); 68 void hitEnter();
69 void hitSpace(); 69 void hitSpace();
70 void hitTab(); 70 void hitTab();
71 void hitPaste(); 71 void hitPaste();
72 void hitUp(); 72 void hitUp();
73 void hitDown(); 73 void hitDown();
74 void switchSession(QWidget *); 74 void switchSession(QWidget *);
75 void newSession(); 75 void newSession();
76 void changeCommand(const QString &, int); 76 void changeCommand(const QString &, int);
77 void initCommandList(); 77 void initCommandList();
78 void scrollMenuSelected(int); 78 void scrollMenuSelected(int);
79 void editCommandListMenuSelected(int); 79 void editCommandListMenuSelected(int);
80 void parseCommandLine(); 80 void parseCommandLine();
81 void changeForegroundColor(const QColor &); 81 void changeForegroundColor(const QColor &);
82 void changeBackgroundColor(const QColor &); 82 void changeBackgroundColor(const QColor &);
83private: 83private:
84 void doWrap(); 84 void doWrap();
85 void init(const char* _pgm, QStrList & _args); 85 void init(const char* _pgm, QStrList & _args);
86 void initSession(const char* _pgm, QStrList & _args); 86 void initSession(const char* _pgm, QStrList & _args);
87 void runSession(TESession* s); 87 void runSession(TESession* s);
88 void setColorPixmaps(); 88 void setColorPixmaps();
89 void setHistory(bool); 89 void setHistory(bool);
90 QSize calcSize(int columns, int lines); 90 QSize calcSize(int columns, int lines);
91 TEWidget* getTe(); 91 TEWidget* getTe();
92 QStringList commands; 92 QStringList commands;
93 QLabel * msgLabel; 93 QLabel * msgLabel;
94 QColor foreground, background; 94 QColor foreground, background;
95bool fromMenu; 95bool fromMenu;
96private: 96private:
97 class VTFont 97 class VTFont
98 { 98 {
99 public: 99 public:
100 VTFont(QString name, QFont& font) 100 VTFont(QString name, QFont& font)
101 { 101 {
102 this->name = name; 102 this->name = name;
diff --git a/core/apps/helpbrowser/helpbrowser.cpp b/core/apps/helpbrowser/helpbrowser.cpp
index ed1c165..6f84ae2 100644
--- a/core/apps/helpbrowser/helpbrowser.cpp
+++ b/core/apps/helpbrowser/helpbrowser.cpp
@@ -1,137 +1,137 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the 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#define QTOPIA_INTERNAL_LANGLIST 21#define QTOPIA_INTERNAL_LANGLIST
22 22
23#include "helpbrowser.h" 23#include "helpbrowser.h"
24 24
25#include <qpe/qpeapplication.h> 25#include <qpe/qpeapplication.h>
26#include <qpe/resource.h> 26#include <qpe/resource.h>
27#include <qpe/mimetype.h> 27#include <qpe/mimetype.h>
28#include <qpe/applnk.h> 28#include <qpe/applnk.h>
29#include <qpe/global.h> 29#include <qpe/global.h>
30 30
31#include <qstatusbar.h> 31#include <qstatusbar.h>
32#include <qdragobject.h> 32#include <qdragobject.h>
33#include <qpixmap.h> 33#include <qpixmap.h>
34#include <qpopupmenu.h> 34#include <qpopupmenu.h>
35#include <qmenubar.h> 35#include <qmenubar.h>
36#include <qpe/qpetoolbar.h> 36#include <qtoolbar.h>
37#include <qpe/qcopenvelope_qws.h> 37#include <qpe/qcopenvelope_qws.h>
38#include <qtoolbutton.h> 38#include <qtoolbutton.h>
39#include <qiconset.h> 39#include <qiconset.h>
40#include <qfile.h> 40#include <qfile.h>
41#include <qtextstream.h> 41#include <qtextstream.h>
42#include <qstylesheet.h> 42#include <qstylesheet.h>
43#include <qmessagebox.h> 43#include <qmessagebox.h>
44#include <qfiledialog.h> 44#include <qfiledialog.h>
45#include <qevent.h> 45#include <qevent.h>
46#include <qlineedit.h> 46#include <qlineedit.h>
47#include <qobjectlist.h> 47#include <qobjectlist.h>
48#include <qfileinfo.h> 48#include <qfileinfo.h>
49#include <qfile.h> 49#include <qfile.h>
50#include <qdatastream.h> 50#include <qdatastream.h>
51#include <qprinter.h> 51#include <qprinter.h>
52#include <qsimplerichtext.h> 52#include <qsimplerichtext.h>
53#include <qpaintdevicemetrics.h> 53#include <qpaintdevicemetrics.h>
54#include <qaction.h> 54#include <qaction.h>
55 55
56#include <cctype> 56#include <cctype>
57 57
58#include "magictextbrowser.h" 58#include "magictextbrowser.h"
59 59
60HelpBrowser::HelpBrowser( QWidget* parent, const char *name, WFlags f ) 60HelpBrowser::HelpBrowser( QWidget* parent, const char *name, WFlags f )
61 : QMainWindow( parent, name, f ), 61 : QMainWindow( parent, name, f ),
62 selectedURL() 62 selectedURL()
63{ 63{
64 init( "index.html" ); 64 init( "index.html" );
65} 65}
66 66
67 67
68 68
69void HelpBrowser::init( const QString& _home ) 69void HelpBrowser::init( const QString& _home )
70{ 70{
71 setIcon( Resource::loadPixmap( "HelpBrowser" ) ); 71 setIcon( Resource::loadPixmap( "HelpBrowser" ) );
72 setBackgroundMode( PaletteButton ); 72 setBackgroundMode( PaletteButton );
73 73
74 browser = new MagicTextBrowser( this ); 74 browser = new MagicTextBrowser( this );
75 browser->setFrameStyle( QFrame::Panel | QFrame::Sunken ); 75 browser->setFrameStyle( QFrame::Panel | QFrame::Sunken );
76 connect( browser, SIGNAL( textChanged() ), 76 connect( browser, SIGNAL( textChanged() ),
77 this, SLOT( textChanged() ) ); 77 this, SLOT( textChanged() ) );
78 78
79 setCentralWidget( browser ); 79 setCentralWidget( browser );
80 setToolBarsMovable( FALSE ); 80 setToolBarsMovable( FALSE );
81 81
82 if ( !_home.isEmpty() ) 82 if ( !_home.isEmpty() )
83 browser->setSource( _home ); 83 browser->setSource( _home );
84 84
85 QPEToolBar* toolbar = new QPEToolBar( this ); 85 QToolBar* toolbar = new QToolBar( this );
86 toolbar->setHorizontalStretchable( TRUE ); 86 toolbar->setHorizontalStretchable( TRUE );
87 QMenuBar *menu = new QMenuBar( toolbar ); 87 QMenuBar *menu = new QMenuBar( toolbar );
88 88
89 toolbar = new QPEToolBar( this ); 89 toolbar = new QToolBar( this );
90 // addToolBar( toolbar, "Toolbar"); 90 // addToolBar( toolbar, "Toolbar");
91 91
92 QPopupMenu* go = new QPopupMenu( this ); 92 QPopupMenu* go = new QPopupMenu( this );
93 backAction = new QAction( tr( "Backward" ), Resource::loadIconSet( "back" ), QString::null, 0, this, 0 ); 93 backAction = new QAction( tr( "Backward" ), Resource::loadIconSet( "back" ), QString::null, 0, this, 0 );
94 connect( backAction, SIGNAL( activated() ), browser, SLOT( backward() ) ); 94 connect( backAction, SIGNAL( activated() ), browser, SLOT( backward() ) );
95 connect( browser, SIGNAL( backwardAvailable( bool ) ), 95 connect( browser, SIGNAL( backwardAvailable( bool ) ),
96 backAction, SLOT( setEnabled( bool ) ) ); 96 backAction, SLOT( setEnabled( bool ) ) );
97 backAction->addTo( go ); 97 backAction->addTo( go );
98 backAction->addTo( toolbar ); 98 backAction->addTo( toolbar );
99 backAction->setEnabled( FALSE ); 99 backAction->setEnabled( FALSE );
100 100
101 forwardAction = new QAction( tr( "Forward" ), Resource::loadIconSet( "forward" ), QString::null, 0, this, 0 ); 101 forwardAction = new QAction( tr( "Forward" ), Resource::loadIconSet( "forward" ), QString::null, 0, this, 0 );
102 connect( forwardAction, SIGNAL( activated() ), browser, SLOT( forward() ) ); 102 connect( forwardAction, SIGNAL( activated() ), browser, SLOT( forward() ) );
103 connect( browser, SIGNAL( forwardAvailable( bool ) ), 103 connect( browser, SIGNAL( forwardAvailable( bool ) ),
104 forwardAction, SLOT( setEnabled( bool ) ) ); 104 forwardAction, SLOT( setEnabled( bool ) ) );
105 forwardAction->addTo( go ); 105 forwardAction->addTo( go );
106 forwardAction->addTo( toolbar ); 106 forwardAction->addTo( toolbar );
107 forwardAction->setEnabled( FALSE ); 107 forwardAction->setEnabled( FALSE );
108 108
109 QAction *a = new QAction( tr( "Home" ), Resource::loadIconSet( "home" ), QString::null, 0, this, 0 ); 109 QAction *a = new QAction( tr( "Home" ), Resource::loadIconSet( "home" ), QString::null, 0, this, 0 );
110 connect( a, SIGNAL( activated() ), browser, SLOT( home() ) ); 110 connect( a, SIGNAL( activated() ), browser, SLOT( home() ) );
111 a->addTo( go ); 111 a->addTo( go );
112 a->addTo( toolbar ); 112 a->addTo( toolbar );
113 113
114 bookm = new QPopupMenu( this ); 114 bookm = new QPopupMenu( this );
115 bookm->insertItem( tr( "Add Bookmark" ), this, SLOT( addBookmark() ) ); 115 bookm->insertItem( tr( "Add Bookmark" ), this, SLOT( addBookmark() ) );
116 bookm->insertItem( tr( "Remove from Bookmarks" ), this, SLOT( removeBookmark() ) ); 116 bookm->insertItem( tr( "Remove from Bookmarks" ), this, SLOT( removeBookmark() ) );
117 bookm->insertSeparator(); 117 bookm->insertSeparator();
118 connect( bookm, SIGNAL( activated( int ) ), 118 connect( bookm, SIGNAL( activated( int ) ),
119 this, SLOT( bookmChosen( int ) ) ); 119 this, SLOT( bookmChosen( int ) ) );
120 120
121 readBookmarks(); 121 readBookmarks();
122 122
123 menu->insertItem( tr("Go"), go ); 123 menu->insertItem( tr("Go"), go );
124 menu->insertItem( tr( "Bookmarks" ), bookm ); 124 menu->insertItem( tr( "Bookmarks" ), bookm );
125 125
126 resize( 240, 300 ); 126 resize( 240, 300 );
127 browser->setFocus(); 127 browser->setFocus();
128 browser->setFrameStyle( QFrame::NoFrame ); 128 browser->setFrameStyle( QFrame::NoFrame );
129 129
130#if !defined(QT_NO_COP) 130#if !defined(QT_NO_COP)
131 QCopChannel *addressChannel = new QCopChannel("QPE/HelpBrowser" , this ); 131 QCopChannel *addressChannel = new QCopChannel("QPE/HelpBrowser" , this );
132 connect (addressChannel, SIGNAL( received(const QCString &, const QByteArray &)), 132 connect (addressChannel, SIGNAL( received(const QCString &, const QByteArray &)),
133 this, SLOT ( appMessage(const QCString &, const QByteArray &) ) ); 133 this, SLOT ( appMessage(const QCString &, const QByteArray &) ) );
134#endif 134#endif
135 135
136 connect( qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)), 136 connect( qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)),
137 this, SLOT(appMessage(const QCString&, const QByteArray&)) ); 137 this, SLOT(appMessage(const QCString&, const QByteArray&)) );
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index 0e3254f..be18140 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -1,78 +1,78 @@
1/********************************************************************** 1/**********************************************************************
2// textedit.cpp 2// textedit.cpp
3** Copyright (C) 2000 Trolltech AS. All rights reserved. 3** Copyright (C) 2000 Trolltech AS. All rights reserved.
4** 4**
5** This file is part of Opie Environment. 5** This file is part of Opie Environment.
6** 6**
7** This file may be distributed and/or modified under the terms of the 7** This file may be distributed and/or modified under the terms of the
8** GNU General Public License version 2 as published by the Free Software 8** GNU General Public License version 2 as published by the Free Software
9** Foundation and appearing in the file LICENSE.GPL included in the 9** Foundation and appearing in the file LICENSE.GPL included in the
10** packaging of this file. 10** packaging of this file.
11** 11**
12**********************************************************************/ 12**********************************************************************/
13// changes added by L. J. Potter Sun 02-17-2002 21:31:31 13// changes added by L. J. Potter Sun 02-17-2002 21:31:31
14#include "textedit.h" 14#include "textedit.h"
15#include "filePermissions.h" 15#include "filePermissions.h"
16 16
17 17
18#include <opie/ofileselector.h> 18#include <opie/ofileselector.h>
19#include <opie/ofiledialog.h> 19#include <opie/ofiledialog.h>
20#include <opie/ofontselector.h> 20#include <opie/ofontselector.h>
21 21
22#include <qpe/fontdatabase.h> 22#include <qpe/fontdatabase.h>
23#include <qpe/global.h> 23#include <qpe/global.h>
24#include <qpe/fileselector.h> 24#include <qpe/fileselector.h>
25#include <qpe/applnk.h> 25#include <qpe/applnk.h>
26#include <qpe/resource.h> 26#include <qpe/resource.h>
27#include <qpe/config.h> 27#include <qpe/config.h>
28#include <qpe/qpeapplication.h> 28#include <qpe/qpeapplication.h>
29#include <qmenubar.h> 29#include <qmenubar.h>
30#include <qpe/qpetoolbar.h> 30#include <qtoolbar.h>
31#include <qpe/qcopenvelope_qws.h> 31#include <qpe/qcopenvelope_qws.h>
32 32
33#include <qpoint.h> 33#include <qpoint.h>
34#include <qtextstream.h> 34#include <qtextstream.h>
35#include <qdatetime.h> 35#include <qdatetime.h>
36#include <qclipboard.h> 36#include <qclipboard.h>
37#include <qstringlist.h> 37#include <qstringlist.h>
38#include <qaction.h> 38#include <qaction.h>
39#include <qcolordialog.h> 39#include <qcolordialog.h>
40#include <qfileinfo.h> 40#include <qfileinfo.h>
41#include <qlineedit.h> 41#include <qlineedit.h>
42#include <qmessagebox.h> 42#include <qmessagebox.h>
43#include <qobjectlist.h> 43#include <qobjectlist.h>
44#include <qpopupmenu.h> 44#include <qpopupmenu.h>
45#include <qspinbox.h> 45#include <qspinbox.h>
46#include <qtoolbutton.h> 46#include <qtoolbutton.h>
47#include <qwidgetstack.h> 47#include <qwidgetstack.h>
48#include <qcheckbox.h> 48#include <qcheckbox.h>
49#include <qcombo.h> 49#include <qcombo.h>
50#include <qlayout.h> 50#include <qlayout.h>
51#include <qapplication.h> 51#include <qapplication.h>
52#include <qtimer.h> 52#include <qtimer.h>
53#include <qdir.h> 53#include <qdir.h>
54#include <unistd.h> 54#include <unistd.h>
55#include <sys/stat.h> 55#include <sys/stat.h>
56#include <stdlib.h> //getenv 56#include <stdlib.h> //getenv
57 57
58#if QT_VERSION < 300 58#if QT_VERSION < 300
59 59
60class QpeEditor : public QMultiLineEdit 60class QpeEditor : public QMultiLineEdit
61{ 61{
62 62
63public: 63public:
64 QpeEditor( QWidget *parent, const char * name = 0 ) 64 QpeEditor( QWidget *parent, const char * name = 0 )
65 : QMultiLineEdit( parent, name ) { 65 : QMultiLineEdit( parent, name ) {
66 clearTableFlags(); 66 clearTableFlags();
67 setTableFlags( Tbl_vScrollBar | Tbl_autoHScrollBar ); 67 setTableFlags( Tbl_vScrollBar | Tbl_autoHScrollBar );
68} 68}
69 69
70 void find( const QString &txt, bool caseSensitive, 70 void find( const QString &txt, bool caseSensitive,
71 bool backwards ); 71 bool backwards );
72protected: 72protected:
73 bool markIt; 73 bool markIt;
74 int line1, line2, col1, col2; 74 int line1, line2, col1, col2;
75 void mousePressEvent( QMouseEvent * ); 75 void mousePressEvent( QMouseEvent * );
76 void mouseReleaseEvent( QMouseEvent * ); 76 void mouseReleaseEvent( QMouseEvent * );
77 77
78//public slots: 78//public slots:
@@ -137,108 +137,108 @@ void QpeEditor::find ( const QString &txt, bool caseSensitive,
137 for ( ; ; ) { 137 for ( ; ; ) {
138 if ( line >= numLines() ) { 138 if ( line >= numLines() ) {
139 wrap = true; 139 wrap = true;
140 //emit notFound(); 140 //emit notFound();
141 break; 141 break;
142 } 142 }
143 int findCol = getString( line )->find( txt, col, caseSensitive ); 143 int findCol = getString( line )->find( txt, col, caseSensitive );
144 if ( findCol >= 0 ) { 144 if ( findCol >= 0 ) {
145 setCursorPosition( line, findCol, false ); 145 setCursorPosition( line, findCol, false );
146 col = findCol + txt.length(); 146 col = findCol + txt.length();
147 setCursorPosition( line, col, true ); 147 setCursorPosition( line, col, true );
148 148
149 //found = true; 149 //found = true;
150 break; 150 break;
151 } 151 }
152 line++; 152 line++;
153 col = 0; 153 col = 0;
154 } 154 }
155 } 155 }
156} 156}
157 157
158 158
159#else 159#else
160 160
161#error "Must make a QpeEditor that inherits QTextEdit" 161#error "Must make a QpeEditor that inherits QTextEdit"
162 162
163#endif 163#endif
164 164
165 165
166static const int nfontsizes = 6; 166static const int nfontsizes = 6;
167static const int fontsize[nfontsizes] = {8,10,12,14,18,24}; 167static const int fontsize[nfontsizes] = {8,10,12,14,18,24};
168 168
169TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f ) 169TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f )
170 : QMainWindow( parent, name, f ), bFromDocView( false ) 170 : QMainWindow( parent, name, f ), bFromDocView( false )
171{ 171{
172 doc = 0; 172 doc = 0;
173 edited=false; 173 edited=false;
174 fromSetDocument=false; 174 fromSetDocument=false;
175 175
176 setToolBarsMovable( false ); 176 setToolBarsMovable( false );
177 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 177 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
178 178
179 channel = new QCopChannel( "QPE/Application/textedit", this ); 179 channel = new QCopChannel( "QPE/Application/textedit", this );
180 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), 180 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
181 this, SLOT(receive(const QCString&, const QByteArray&)) ); 181 this, SLOT(receive(const QCString&, const QByteArray&)) );
182 182
183 setIcon( Resource::loadPixmap( "TextEditor" ) ); 183 setIcon( Resource::loadPixmap( "TextEditor" ) );
184 184
185 QPEToolBar *bar = new QPEToolBar( this ); 185 QToolBar *bar = new QToolBar( this );
186 bar->setHorizontalStretchable( true ); 186 bar->setHorizontalStretchable( true );
187 menu = bar; 187 menu = bar;
188 188
189 QMenuBar *mb = new QMenuBar( bar ); 189 QMenuBar *mb = new QMenuBar( bar );
190 QPopupMenu *file = new QPopupMenu( this ); 190 QPopupMenu *file = new QPopupMenu( this );
191 QPopupMenu *edit = new QPopupMenu( this ); 191 QPopupMenu *edit = new QPopupMenu( this );
192 QPopupMenu *advancedMenu = new QPopupMenu(this); 192 QPopupMenu *advancedMenu = new QPopupMenu(this);
193 193
194 font = new QPopupMenu( this ); 194 font = new QPopupMenu( this );
195 195
196 bar = new QPEToolBar( this ); 196 bar = new QToolBar( this );
197 editBar = bar; 197 editBar = bar;
198 198
199 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), 199 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ),
200 QString::null, 0, this, 0 ); 200 QString::null, 0, this, 0 );
201 connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) ); 201 connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) );
202// a->addTo( bar ); 202// a->addTo( bar );
203 a->addTo( file ); 203 a->addTo( file );
204 204
205 a = new QAction( tr( "Open" ), Resource::loadPixmap( "fileopen" ), 205 a = new QAction( tr( "Open" ), Resource::loadPixmap( "fileopen" ),
206 QString::null, 0, this, 0 ); 206 QString::null, 0, this, 0 );
207 connect( a, SIGNAL( activated() ), this, SLOT( fileOpen() ) ); 207 connect( a, SIGNAL( activated() ), this, SLOT( fileOpen() ) );
208 a->addTo( bar ); 208 a->addTo( bar );
209 a->addTo( file ); 209 a->addTo( file );
210 210
211 a = new QAction( tr( "Save" ), Resource::loadPixmap("save") , 211 a = new QAction( tr( "Save" ), Resource::loadPixmap("save") ,
212 QString::null, 0, this, 0 ); 212 QString::null, 0, this, 0 );
213 connect( a, SIGNAL( activated() ), this, SLOT( save() ) ); 213 connect( a, SIGNAL( activated() ), this, SLOT( save() ) );
214 file->insertSeparator(); 214 file->insertSeparator();
215 a->addTo( bar ); 215 a->addTo( bar );
216 a->addTo( file ); 216 a->addTo( file );
217 217
218 a = new QAction( tr( "Save As" ), Resource::loadPixmap("save") , 218 a = new QAction( tr( "Save As" ), Resource::loadPixmap("save") ,
219 QString::null, 0, this, 0 ); 219 QString::null, 0, this, 0 );
220 connect( a, SIGNAL( activated() ), this, SLOT( saveAs() ) ); 220 connect( a, SIGNAL( activated() ), this, SLOT( saveAs() ) );
221 a->addTo( file ); 221 a->addTo( file );
222 222
223 a = new QAction( tr( "Cut" ), Resource::loadPixmap( "cut" ), 223 a = new QAction( tr( "Cut" ), Resource::loadPixmap( "cut" ),
224 QString::null, 0, this, 0 ); 224 QString::null, 0, this, 0 );
225 connect( a, SIGNAL( activated() ), this, SLOT( editCut() ) ); 225 connect( a, SIGNAL( activated() ), this, SLOT( editCut() ) );
226 a->addTo( editBar ); 226 a->addTo( editBar );
227 a->addTo( edit ); 227 a->addTo( edit );
228 228
229 a = new QAction( tr( "Copy" ), Resource::loadPixmap( "copy" ), 229 a = new QAction( tr( "Copy" ), Resource::loadPixmap( "copy" ),
230 QString::null, 0, this, 0 ); 230 QString::null, 0, this, 0 );
231 connect( a, SIGNAL( activated() ), this, SLOT( editCopy() ) ); 231 connect( a, SIGNAL( activated() ), this, SLOT( editCopy() ) );
232 a->addTo( editBar ); 232 a->addTo( editBar );
233 a->addTo( edit ); 233 a->addTo( edit );
234 234
235 a = new QAction( tr( "Paste" ), Resource::loadPixmap( "paste" ), 235 a = new QAction( tr( "Paste" ), Resource::loadPixmap( "paste" ),
236 QString::null, 0, this, 0 ); 236 QString::null, 0, this, 0 );
237 connect( a, SIGNAL( activated() ), this, SLOT( editPaste() ) ); 237 connect( a, SIGNAL( activated() ), this, SLOT( editPaste() ) );
238 a->addTo( editBar ); 238 a->addTo( editBar );
239 a->addTo( edit ); 239 a->addTo( edit );
240 240
241 241
242#ifndef QT_NO_CLIPBOARD 242#ifndef QT_NO_CLIPBOARD
243 a = new QAction( tr( "Insert Time and Date" ), Resource::loadPixmap( "paste" ), 243 a = new QAction( tr( "Insert Time and Date" ), Resource::loadPixmap( "paste" ),
244 QString::null, 0, this, 0 ); 244 QString::null, 0, this, 0 );
@@ -287,97 +287,97 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f )
287 nStart->setToggleAction(true); 287 nStart->setToggleAction(true);
288 nStart->addTo( advancedMenu ); 288 nStart->addTo( advancedMenu );
289 nStart->setEnabled(false); 289 nStart->setEnabled(false);
290 290
291 nAdvanced = new QAction( tr("Prompt on Exit"), 291 nAdvanced = new QAction( tr("Prompt on Exit"),
292 QString::null, 0, this, 0 ); 292 QString::null, 0, this, 0 );
293 connect( nAdvanced, SIGNAL( toggled(bool) ), 293 connect( nAdvanced, SIGNAL( toggled(bool) ),
294 this, SLOT( doPrompt(bool) ) ); 294 this, SLOT( doPrompt(bool) ) );
295 nAdvanced->setToggleAction(true); 295 nAdvanced->setToggleAction(true);
296 nAdvanced->addTo( advancedMenu ); 296 nAdvanced->addTo( advancedMenu );
297 297
298 desktopAction = new QAction( tr("Always open linked file"), 298 desktopAction = new QAction( tr("Always open linked file"),
299 QString::null, 0, this, 0 ); 299 QString::null, 0, this, 0 );
300 connect( desktopAction, SIGNAL( toggled(bool) ), 300 connect( desktopAction, SIGNAL( toggled(bool) ),
301 this, SLOT( doDesktop(bool) ) ); 301 this, SLOT( doDesktop(bool) ) );
302 desktopAction->setToggleAction(true); 302 desktopAction->setToggleAction(true);
303 desktopAction->addTo( advancedMenu); 303 desktopAction->addTo( advancedMenu);
304 304
305 filePermAction = new QAction( tr("File Permissions"), 305 filePermAction = new QAction( tr("File Permissions"),
306 QString::null, 0, this, 0 ); 306 QString::null, 0, this, 0 );
307 connect( filePermAction, SIGNAL( toggled(bool) ), 307 connect( filePermAction, SIGNAL( toggled(bool) ),
308 this, SLOT( doFilePerms(bool) ) ); 308 this, SLOT( doFilePerms(bool) ) );
309 filePermAction->setToggleAction(true); 309 filePermAction->setToggleAction(true);
310 filePermAction->addTo( advancedMenu); 310 filePermAction->addTo( advancedMenu);
311 311
312 searchBarAction = new QAction( tr("Search Bar Open"), 312 searchBarAction = new QAction( tr("Search Bar Open"),
313 QString::null, 0, this, 0 ); 313 QString::null, 0, this, 0 );
314 connect( searchBarAction, SIGNAL( toggled(bool) ), 314 connect( searchBarAction, SIGNAL( toggled(bool) ),
315 this, SLOT( setSearchBar(bool) ) ); 315 this, SLOT( setSearchBar(bool) ) );
316 searchBarAction->setToggleAction(true); 316 searchBarAction->setToggleAction(true);
317 searchBarAction->addTo( advancedMenu); 317 searchBarAction->addTo( advancedMenu);
318 318
319 nAutoSave = new QAction( tr("Auto Save 5 min."), 319 nAutoSave = new QAction( tr("Auto Save 5 min."),
320 QString::null, 0, this, 0 ); 320 QString::null, 0, this, 0 );
321 connect( nAutoSave, SIGNAL( toggled(bool) ), 321 connect( nAutoSave, SIGNAL( toggled(bool) ),
322 this, SLOT( doTimer(bool) ) ); 322 this, SLOT( doTimer(bool) ) );
323 nAutoSave->setToggleAction(true); 323 nAutoSave->setToggleAction(true);
324 nAutoSave->addTo( advancedMenu); 324 nAutoSave->addTo( advancedMenu);
325 325
326 326
327 //font->insertSeparator(); 327 //font->insertSeparator();
328 328
329 //font->insertItem(tr("About"), this, SLOT( doAbout()) ); 329 //font->insertItem(tr("About"), this, SLOT( doAbout()) );
330 330
331 mb->insertItem( tr( "File" ), file ); 331 mb->insertItem( tr( "File" ), file );
332 mb->insertItem( tr( "Edit" ), edit ); 332 mb->insertItem( tr( "Edit" ), edit );
333 mb->insertItem( tr( "View" ), font ); 333 mb->insertItem( tr( "View" ), font );
334 334
335 searchBar = new QPEToolBar(this); 335 searchBar = new QToolBar(this);
336 addToolBar( searchBar, "Search", QMainWindow::Top, true ); 336 addToolBar( searchBar, "Search", QMainWindow::Top, true );
337 337
338 searchBar->setHorizontalStretchable( true ); 338 searchBar->setHorizontalStretchable( true );
339 339
340 searchEdit = new QLineEdit( searchBar, "searchEdit" ); 340 searchEdit = new QLineEdit( searchBar, "searchEdit" );
341 searchBar->setStretchableWidget( searchEdit ); 341 searchBar->setStretchableWidget( searchEdit );
342 connect( searchEdit, SIGNAL( textChanged( const QString & ) ), 342 connect( searchEdit, SIGNAL( textChanged( const QString & ) ),
343 this, SLOT( search() ) ); 343 this, SLOT( search() ) );
344 344
345 a = new QAction( tr( "Find Next" ), Resource::loadPixmap( "next" ), 345 a = new QAction( tr( "Find Next" ), Resource::loadPixmap( "next" ),
346 QString::null, 0, this, 0 ); 346 QString::null, 0, this, 0 );
347 connect( a, SIGNAL( activated() ), this, SLOT( findNext() ) ); 347 connect( a, SIGNAL( activated() ), this, SLOT( findNext() ) );
348 a->addTo( searchBar ); 348 a->addTo( searchBar );
349 a->addTo( edit ); 349 a->addTo( edit );
350 350
351 a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), 351 a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ),
352 QString::null, 0, this, 0 ); 352 QString::null, 0, this, 0 );
353 connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) ); 353 connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) );
354 a->addTo( searchBar ); 354 a->addTo( searchBar );
355 355
356 edit->insertSeparator(); 356 edit->insertSeparator();
357 a = new QAction( tr( "Delete" ), Resource::loadPixmap( "close" ), 357 a = new QAction( tr( "Delete" ), Resource::loadPixmap( "close" ),
358 QString::null, 0, this, 0 ); 358 QString::null, 0, this, 0 );
359 connect( a, SIGNAL( activated() ), this, SLOT( editDelete() ) ); 359 connect( a, SIGNAL( activated() ), this, SLOT( editDelete() ) );
360 a->addTo( edit ); 360 a->addTo( edit );
361 361
362 searchBar->hide(); 362 searchBar->hide();
363 363
364 editor = new QpeEditor( this ); 364 editor = new QpeEditor( this );
365 setCentralWidget( editor ); 365 setCentralWidget( editor );
366 editor->setFrameStyle( QFrame::Panel | QFrame::Sunken ); 366 editor->setFrameStyle( QFrame::Panel | QFrame::Sunken );
367 connect( editor, SIGNAL( textChanged() ), 367 connect( editor, SIGNAL( textChanged() ),
368 this, SLOT( editorChanged() ) ); 368 this, SLOT( editorChanged() ) );
369 369
370 QPEApplication::setStylusOperation( editor, QPEApplication::RightOnHold); 370 QPEApplication::setStylusOperation( editor, QPEApplication::RightOnHold);
371 371
372 Config cfg("TextEdit"); 372 Config cfg("TextEdit");
373 cfg. setGroup ( "Font" ); 373 cfg. setGroup ( "Font" );
374 374
375 QFont defaultFont = editor-> font ( ); 375 QFont defaultFont = editor-> font ( );
376 376
377 QString family = cfg. readEntry ( "Family", defaultFont. family ( )); 377 QString family = cfg. readEntry ( "Family", defaultFont. family ( ));
378 int size = cfg. readNumEntry ( "Size", defaultFont. pointSize ( )); 378 int size = cfg. readNumEntry ( "Size", defaultFont. pointSize ( ));
379 int weight = cfg. readNumEntry ( "Weight", defaultFont. weight ( )); 379 int weight = cfg. readNumEntry ( "Weight", defaultFont. weight ( ));
380 bool italic = cfg. readBoolEntry ( "Italic", defaultFont. italic ( )); 380 bool italic = cfg. readBoolEntry ( "Italic", defaultFont. italic ( ));
381 381
382 defaultFont = QFont ( family, size, weight, italic ); 382 defaultFont = QFont ( family, size, weight, italic );
383 editor-> setFont ( defaultFont ); 383 editor-> setFont ( defaultFont );
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index cfcfd41..5ce53b8 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -1,73 +1,73 @@
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// code added by L. J. Potter Sat 03-02-2002 06:17:54 20// code added by L. J. Potter Sat 03-02-2002 06:17:54
21#define QTOPIA_INTERNAL_FSLP 21#define QTOPIA_INTERNAL_FSLP
22#include <qpe/qcopenvelope_qws.h> 22#include <qpe/qcopenvelope_qws.h>
23 23
24#include <qmenubar.h> 24#include <qmenubar.h>
25#include <qpe/qpetoolbar.h> 25#include <qtoolbar.h>
26#include <qpe/fileselector.h> 26#include <qpe/fileselector.h>
27#include <qpe/qpeapplication.h> 27#include <qpe/qpeapplication.h>
28#include <qpe/lnkproperties.h> 28#include <qpe/lnkproperties.h>
29#include <qpe/storage.h> 29#include <qpe/storage.h>
30 30
31#include <qpe/applnk.h> 31#include <qpe/applnk.h>
32#include <qpe/config.h> 32#include <qpe/config.h>
33#include <qpe/global.h> 33#include <qpe/global.h>
34#include <qpe/resource.h> 34#include <qpe/resource.h>
35#include <qaction.h> 35#include <qaction.h>
36#include <qcursor.h> 36#include <qcursor.h>
37#include <qimage.h> 37#include <qimage.h>
38#include <qfile.h> 38#include <qfile.h>
39#include <qdir.h> 39#include <qdir.h>
40#include <qlayout.h> 40#include <qlayout.h>
41#include <qlabel.h> 41#include <qlabel.h>
42#include <qlist.h> 42#include <qlist.h>
43#include <qlistbox.h> 43#include <qlistbox.h>
44#include <qmainwindow.h> 44#include <qmainwindow.h>
45#include <qmessagebox.h> 45#include <qmessagebox.h>
46#include <qtoolbutton.h> 46#include <qtoolbutton.h>
47#include <qtabwidget.h> 47#include <qtabwidget.h>
48#include <qlistview.h> 48#include <qlistview.h>
49#include <qpoint.h> 49#include <qpoint.h>
50#include <qlineedit.h> 50#include <qlineedit.h>
51#include <qpushbutton.h> 51#include <qpushbutton.h>
52#include <qregexp.h> 52#include <qregexp.h>
53#include <qtextstream.h> 53#include <qtextstream.h>
54 54
55//#include <qtimer.h> 55//#include <qtimer.h>
56 56
57#include "playlistselection.h" 57#include "playlistselection.h"
58#include "playlistwidget.h" 58#include "playlistwidget.h"
59#include "mediaplayerstate.h" 59#include "mediaplayerstate.h"
60 60
61#include "inputDialog.h" 61#include "inputDialog.h"
62 62
63#include <stdlib.h> 63#include <stdlib.h>
64#include "audiowidget.h" 64#include "audiowidget.h"
65#include "videowidget.h" 65#include "videowidget.h"
66 66
67#include <unistd.h> 67#include <unistd.h>
68#include <sys/file.h> 68#include <sys/file.h>
69#include <sys/ioctl.h> 69#include <sys/ioctl.h>
70#include <sys/soundcard.h> 70#include <sys/soundcard.h>
71 71
72// for setBacklight() 72// for setBacklight()
73#include <linux/fb.h> 73#include <linux/fb.h>
@@ -109,104 +109,104 @@ class ToolButton : public QToolButton {
109public: 109public:
110 ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) 110 ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE )
111 : QToolButton( parent, name ) { 111 : QToolButton( parent, name ) {
112 setTextLabel( name ); 112 setTextLabel( name );
113 setPixmap( Resource::loadPixmap( icon ) ); 113 setPixmap( Resource::loadPixmap( icon ) );
114 setAutoRaise( TRUE ); 114 setAutoRaise( TRUE );
115 setFocusPolicy( QWidget::NoFocus ); 115 setFocusPolicy( QWidget::NoFocus );
116 setToggleButton( t ); 116 setToggleButton( t );
117 connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); 117 connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot );
118 QPEMenuToolFocusManager::manager()->addWidget( this ); 118 QPEMenuToolFocusManager::manager()->addWidget( this );
119 } 119 }
120}; 120};
121 121
122 122
123class MenuItem : public QAction { 123class MenuItem : public QAction {
124public: 124public:
125 MenuItem( QWidget *parent, const QString& text, QObject *handler, const QString& slot ) 125 MenuItem( QWidget *parent, const QString& text, QObject *handler, const QString& slot )
126 : QAction( text, QString::null, 0, 0 ) { 126 : QAction( text, QString::null, 0, 0 ) {
127 connect( this, SIGNAL( activated() ), handler, slot ); 127 connect( this, SIGNAL( activated() ), handler, slot );
128 addTo( parent ); 128 addTo( parent );
129 } 129 }
130}; 130};
131 131
132 132
133PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) 133PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
134 : QMainWindow( parent, name, fl ) { 134 : QMainWindow( parent, name, fl ) {
135 135
136 d = new PlayListWidgetPrivate; 136 d = new PlayListWidgetPrivate;
137 d->setDocumentUsed = FALSE; 137 d->setDocumentUsed = FALSE;
138 d->current = NULL; 138 d->current = NULL;
139 fromSetDocument = FALSE; 139 fromSetDocument = FALSE;
140 insanityBool=FALSE; 140 insanityBool=FALSE;
141 audioScan = FALSE; 141 audioScan = FALSE;
142 videoScan = FALSE; 142 videoScan = FALSE;
143// menuTimer = new QTimer( this ,"menu timer"), 143// menuTimer = new QTimer( this ,"menu timer"),
144// connect( menuTimer, SIGNAL( timeout() ), SLOT( addSelected() ) ); 144// connect( menuTimer, SIGNAL( timeout() ), SLOT( addSelected() ) );
145 channel = new QCopChannel( "QPE/Application/opieplayer", this ); 145 channel = new QCopChannel( "QPE/Application/opieplayer", this );
146 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), 146 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
147 this, SLOT( qcopReceive(const QCString&, const QByteArray&)) ); 147 this, SLOT( qcopReceive(const QCString&, const QByteArray&)) );
148 148
149 setBackgroundMode( PaletteButton ); 149 setBackgroundMode( PaletteButton );
150 150
151 setCaption( tr("OpiePlayer") ); 151 setCaption( tr("OpiePlayer") );
152 setIcon( Resource::loadPixmap( "opieplayer/MPEGPlayer" ) ); 152 setIcon( Resource::loadPixmap( "opieplayer/MPEGPlayer" ) );
153 153
154 setToolBarsMovable( FALSE ); 154 setToolBarsMovable( FALSE );
155 155
156 // Create Toolbar 156 // Create Toolbar
157 QPEToolBar *toolbar = new QPEToolBar( this ); 157 QToolBar *toolbar = new QToolBar( this );
158 toolbar->setHorizontalStretchable( TRUE ); 158 toolbar->setHorizontalStretchable( TRUE );
159 159
160 // Create Menubar 160 // Create Menubar
161 QMenuBar *menu = new QMenuBar( toolbar ); 161 QMenuBar *menu = new QMenuBar( toolbar );
162 menu->setMargin( 0 ); 162 menu->setMargin( 0 );
163 163
164 QPEToolBar *bar = new QPEToolBar( this ); 164 QToolBar *bar = new QToolBar( this );
165 bar->setLabel( tr( "Play Operations" ) ); 165 bar->setLabel( tr( "Play Operations" ) );
166// d->tbPlayCurList = new ToolButton( bar, tr( "play List" ), "opieplayer/play_current_list", 166// d->tbPlayCurList = new ToolButton( bar, tr( "play List" ), "opieplayer/play_current_list",
167// this , SLOT( addSelected()) ); 167// this , SLOT( addSelected()) );
168 tbDeletePlaylist = new QPushButton( Resource::loadIconSet("trash"),"",bar,"close"); 168 tbDeletePlaylist = new QPushButton( Resource::loadIconSet("trash"),"",bar,"close");
169 tbDeletePlaylist->setFlat(TRUE); 169 tbDeletePlaylist->setFlat(TRUE);
170 170
171 tbDeletePlaylist->setFixedSize(20,20); 171 tbDeletePlaylist->setFixedSize(20,20);
172 172
173 d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), "opieplayer/add_to_playlist", 173 d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), "opieplayer/add_to_playlist",
174 this , SLOT(addSelected()) ); 174 this , SLOT(addSelected()) );
175 d->tbRemoveFromList = new ToolButton( bar, tr( "Remove from Playlist" ), "opieplayer/remove_from_playlist", 175 d->tbRemoveFromList = new ToolButton( bar, tr( "Remove from Playlist" ), "opieplayer/remove_from_playlist",
176 this , SLOT(removeSelected()) ); 176 this , SLOT(removeSelected()) );
177// d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer/play", /*this */mediaPlayerState , SLOT(setPlaying(bool) /* btnPlay() */), TRUE ); 177// d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer/play", /*this */mediaPlayerState , SLOT(setPlaying(bool) /* btnPlay() */), TRUE );
178 d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer/play", 178 d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer/play",
179 this , SLOT( btnPlay(bool) ), TRUE ); 179 this , SLOT( btnPlay(bool) ), TRUE );
180 d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"opieplayer/shuffle", 180 d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"opieplayer/shuffle",
181 mediaPlayerState, SLOT(setShuffled(bool)), TRUE ); 181 mediaPlayerState, SLOT(setShuffled(bool)), TRUE );
182 d->tbLoop = new ToolButton( bar, tr( "Loop" ),"opieplayer/loop", 182 d->tbLoop = new ToolButton( bar, tr( "Loop" ),"opieplayer/loop",
183 mediaPlayerState, SLOT(setLooping(bool)), TRUE ); 183 mediaPlayerState, SLOT(setLooping(bool)), TRUE );
184 tbDeletePlaylist->hide(); 184 tbDeletePlaylist->hide();
185 185
186 QPopupMenu *pmPlayList = new QPopupMenu( this ); 186 QPopupMenu *pmPlayList = new QPopupMenu( this );
187 menu->insertItem( tr( "File" ), pmPlayList ); 187 menu->insertItem( tr( "File" ), pmPlayList );
188 new MenuItem( pmPlayList, tr( "Clear List" ), this, SLOT( clearList() ) ); 188 new MenuItem( pmPlayList, tr( "Clear List" ), this, SLOT( clearList() ) );
189 new MenuItem( pmPlayList, tr( "Add all audio files" ), this, SLOT( addAllMusicToList() ) ); 189 new MenuItem( pmPlayList, tr( "Add all audio files" ), this, SLOT( addAllMusicToList() ) );
190 new MenuItem( pmPlayList, tr( "Add all video files" ), this, SLOT( addAllVideoToList() ) ); 190 new MenuItem( pmPlayList, tr( "Add all video files" ), this, SLOT( addAllVideoToList() ) );
191 new MenuItem( pmPlayList, tr( "Add all files" ), this, SLOT( addAllToList() ) ); 191 new MenuItem( pmPlayList, tr( "Add all files" ), this, SLOT( addAllToList() ) );
192 pmPlayList->insertSeparator(-1); 192 pmPlayList->insertSeparator(-1);
193 new MenuItem( pmPlayList, tr( "Save PlayList" ), this, SLOT( saveList() ) ); 193 new MenuItem( pmPlayList, tr( "Save PlayList" ), this, SLOT( saveList() ) );
194 new MenuItem( pmPlayList, tr( "Open File or URL" ), this,SLOT( openFile() ) ); 194 new MenuItem( pmPlayList, tr( "Open File or URL" ), this,SLOT( openFile() ) );
195 pmPlayList->insertSeparator(-1); 195 pmPlayList->insertSeparator(-1);
196 new MenuItem( pmPlayList, tr( "Rescan for Audio Files" ), this,SLOT( scanForAudio() ) ); 196 new MenuItem( pmPlayList, tr( "Rescan for Audio Files" ), this,SLOT( scanForAudio() ) );
197 new MenuItem( pmPlayList, tr( "Rescan for Video Files" ), this,SLOT( scanForVideo() ) ); 197 new MenuItem( pmPlayList, tr( "Rescan for Video Files" ), this,SLOT( scanForVideo() ) );
198 198
199 QPopupMenu *pmView = new QPopupMenu( this ); 199 QPopupMenu *pmView = new QPopupMenu( this );
200 menu->insertItem( tr( "View" ), pmView ); 200 menu->insertItem( tr( "View" ), pmView );
201 201
202 fullScreenButton = new QAction(tr("Full Screen"), Resource::loadPixmap("fullscreen"), QString::null, 0, this, 0); 202 fullScreenButton = new QAction(tr("Full Screen"), Resource::loadPixmap("fullscreen"), QString::null, 0, this, 0);
203 fullScreenButton->addTo(pmView); 203 fullScreenButton->addTo(pmView);
204 scaleButton = new QAction(tr("Scale"), Resource::loadPixmap("opieplayer/scale"), QString::null, 0, this, 0); 204 scaleButton = new QAction(tr("Scale"), Resource::loadPixmap("opieplayer/scale"), QString::null, 0, this, 0);
205 scaleButton->addTo(pmView); 205 scaleButton->addTo(pmView);
206 206
207 207
208 skinsMenu = new QPopupMenu( this ); 208 skinsMenu = new QPopupMenu( this );
209 menu->insertItem( tr( "Skins" ), skinsMenu ); 209 menu->insertItem( tr( "Skins" ), skinsMenu );
210 skinsMenu->isCheckable(); 210 skinsMenu->isCheckable();
211 connect( skinsMenu, SIGNAL( activated( int ) ) , 211 connect( skinsMenu, SIGNAL( activated( int ) ) ,
212 this, SLOT( skinsMenuActivated( int ) ) ); 212 this, SLOT( skinsMenuActivated( int ) ) );
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 406ced6..9f668f4 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -1,157 +1,157 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** Copyright (C) 2003 Stefan Eilers (eilers.stefan@epost.de) 3** Copyright (C) 2003 Stefan Eilers (eilers.stefan@epost.de)
4** 4**
5** This file is part of the Open Palmtop Environment (see www.opie.info). 5** This file is part of the Open Palmtop Environment (see www.opie.info).
6** 6**
7** This file may be distributed and/or modified under the terms of the 7** This file may be distributed and/or modified under the terms of the
8** GNU General Public License version 2 as published by the Free Software 8** GNU General Public License version 2 as published by the Free Software
9** Foundation and appearing in the file LICENSE.GPL included in the 9** Foundation and appearing in the file LICENSE.GPL included in the
10** packaging of this file. 10** packaging of this file.
11** 11**
12** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 12** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
13** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 13** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14** 14**
15** See http://www.trolltech.com/gpl/ for GPL licensing information. 15** See http://www.trolltech.com/gpl/ for GPL licensing information.
16** 16**
17** 17**
18**********************************************************************/ 18**********************************************************************/
19 19
20#define QTOPIA_INTERNAL_FD 20#define QTOPIA_INTERNAL_FD
21 21
22#include "contacteditor.h" 22#include "contacteditor.h"
23#include "ablabel.h" 23#include "ablabel.h"
24#include "abview.h" 24#include "abview.h"
25#include "abtable.h" 25#include "abtable.h"
26// #include "addresssettings.h" 26// #include "addresssettings.h"
27#include "addressbook.h" 27#include "addressbook.h"
28 28
29 29
30#include <opie/ofileselector.h> 30#include <opie/ofileselector.h>
31#include <opie/ofiledialog.h> 31#include <opie/ofiledialog.h>
32#include <opie/ocontact.h> 32#include <opie/ocontact.h>
33#include <opie/ocontactaccessbackend_vcard.h> 33#include <opie/ocontactaccessbackend_vcard.h>
34 34
35#include <qpe/resource.h> 35#include <qpe/resource.h>
36#include <qpe/ir.h> 36#include <qpe/ir.h>
37#include <qpe/qpemessagebox.h> 37#include <qpe/qpemessagebox.h>
38#include <qpe/qcopenvelope_qws.h> 38#include <qpe/qcopenvelope_qws.h>
39#include <qpe/qpetoolbar.h> 39#include <qtoolbar.h>
40#include <qmenubar.h> 40#include <qmenubar.h>
41// #include <qtoolbar.h> 41// #include <qtoolbar.h>
42// #include <qmenubar.h> 42// #include <qmenubar.h>
43#include <qpe/qpeapplication.h> 43#include <qpe/qpeapplication.h>
44#include <qpe/config.h> 44#include <qpe/config.h>
45 45
46#include <qaction.h> 46#include <qaction.h>
47#include <qdialog.h> 47#include <qdialog.h>
48#include <qdir.h> 48#include <qdir.h>
49#include <qfile.h> 49#include <qfile.h>
50#include <qimage.h> 50#include <qimage.h>
51#include <qlayout.h> 51#include <qlayout.h>
52#include <qmessagebox.h> 52#include <qmessagebox.h>
53#include <qpixmap.h> 53#include <qpixmap.h>
54#include <qpopupmenu.h> 54#include <qpopupmenu.h>
55#include <qstringlist.h> 55#include <qstringlist.h>
56#include <qtoolbutton.h> 56#include <qtoolbutton.h>
57#include <qwhatsthis.h> 57#include <qwhatsthis.h>
58#include <qdatetime.h> 58#include <qdatetime.h>
59 59
60#include <stdlib.h> 60#include <stdlib.h>
61#include <sys/stat.h> 61#include <sys/stat.h>
62#include <sys/types.h> 62#include <sys/types.h>
63#include <fcntl.h> 63#include <fcntl.h>
64#include <unistd.h> 64#include <unistd.h>
65 65
66 66
67#include "picker.h" 67#include "picker.h"
68#include "configdlg.h" 68#include "configdlg.h"
69 69
70extern QString addressbookPersonalVCardName(); 70extern QString addressbookPersonalVCardName();
71 71
72AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, 72AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
73 WFlags f ) 73 WFlags f )
74 : QMainWindow( parent, name, f ), 74 : QMainWindow( parent, name, f ),
75 catMenu (0l), 75 catMenu (0l),
76 abEditor(0l), 76 abEditor(0l),
77 syncing(FALSE), 77 syncing(FALSE),
78 m_tableViewButton(0l), 78 m_tableViewButton(0l),
79 m_cardViewButton(0l) 79 m_cardViewButton(0l)
80{ 80{
81 isLoading = true; 81 isLoading = true;
82 82
83 m_config.load(); 83 m_config.load();
84 84
85 setCaption( tr("Contacts") ); 85 setCaption( tr("Contacts") );
86 setIcon( Resource::loadPixmap( "AddressBook" ) ); 86 setIcon( Resource::loadPixmap( "AddressBook" ) );
87 87
88 // Settings for Main Menu 88 // Settings for Main Menu
89 // setToolBarsMovable( false ); 89 // setToolBarsMovable( false );
90 setToolBarsMovable( !m_config.fixedBars() ); 90 setToolBarsMovable( !m_config.fixedBars() );
91 setRightJustification( true ); 91 setRightJustification( true );
92 92
93 QPEToolBar *bar = new QPEToolBar( this ); 93 QToolBar *bar = new QToolBar( this );
94 bar->setHorizontalStretchable( TRUE ); 94 bar->setHorizontalStretchable( TRUE );
95 95
96 QMenuBar *mbList = new QMenuBar( bar ); 96 QMenuBar *mbList = new QMenuBar( bar );
97 mbList->setMargin( 0 ); 97 mbList->setMargin( 0 );
98 98
99 QPopupMenu *edit = new QPopupMenu( mbList ); 99 QPopupMenu *edit = new QPopupMenu( mbList );
100 mbList->insertItem( tr( "Contact" ), edit ); 100 mbList->insertItem( tr( "Contact" ), edit );
101 101
102 // Category Menu 102 // Category Menu
103 catMenu = new QPopupMenu( this ); 103 catMenu = new QPopupMenu( this );
104 catMenu->setCheckable( TRUE ); 104 catMenu->setCheckable( TRUE );
105 connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) ); 105 connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) );
106 mbList->insertItem( tr("View"), catMenu ); 106 mbList->insertItem( tr("View"), catMenu );
107 107
108 // Create Toolbar 108 // Create Toolbar
109 listTools = new QPEToolBar( this, "list operations" ); 109 listTools = new QToolBar( this, "list operations" );
110 listTools->setHorizontalStretchable( true ); 110 listTools->setHorizontalStretchable( true );
111 addToolBar( listTools ); 111 addToolBar( listTools );
112 moveToolBar( listTools, m_config.getToolBarPos() ); 112 moveToolBar( listTools, m_config.getToolBarPos() );
113 113
114 // View Icons 114 // View Icons
115 m_tableViewButton = new QAction( tr( "List" ), Resource::loadPixmap( "addressbook/listview" ), 115 m_tableViewButton = new QAction( tr( "List" ), Resource::loadPixmap( "addressbook/listview" ),
116 QString::null, 0, this, 0 ); 116 QString::null, 0, this, 0 );
117 connect( m_tableViewButton, SIGNAL( activated() ), this, SLOT( slotListView() ) ); 117 connect( m_tableViewButton, SIGNAL( activated() ), this, SLOT( slotListView() ) );
118 m_tableViewButton->setToggleAction( true ); 118 m_tableViewButton->setToggleAction( true );
119 m_tableViewButton->addTo( listTools ); 119 m_tableViewButton->addTo( listTools );
120 m_cardViewButton = new QAction( tr( "Card" ), Resource::loadPixmap( "addressbook/cardview" ), QString::null, 0, this, 0 ); 120 m_cardViewButton = new QAction( tr( "Card" ), Resource::loadPixmap( "addressbook/cardview" ), QString::null, 0, this, 0 );
121 connect( m_cardViewButton, SIGNAL( activated() ), this, SLOT( slotCardView() ) ); 121 connect( m_cardViewButton, SIGNAL( activated() ), this, SLOT( slotCardView() ) );
122 m_cardViewButton->setToggleAction( true ); 122 m_cardViewButton->setToggleAction( true );
123 m_cardViewButton->addTo( listTools ); 123 m_cardViewButton->addTo( listTools );
124 124
125 listTools->addSeparator(); 125 listTools->addSeparator();
126 126
127 // Other Buttons 127 // Other Buttons
128 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 128 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null,
129 0, this, 0 ); 129 0, this, 0 );
130 actionNew = a; 130 actionNew = a;
131 connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) ); 131 connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) );
132 a->addTo( edit ); 132 a->addTo( edit );
133 a->addTo( listTools ); 133 a->addTo( listTools );
134 134
135 a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null, 135 a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null,
136 0, this, 0 ); 136 0, this, 0 );
137 actionEdit = a; 137 actionEdit = a;
138 connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) ); 138 connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) );
139 a->addTo( edit ); 139 a->addTo( edit );
140 a->addTo( listTools ); 140 a->addTo( listTools );
141 141
142 a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, 142 a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null,
143 0, this, 0 ); 143 0, this, 0 );
144 actionTrash = a; 144 actionTrash = a;
145 connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) ); 145 connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) );
146 a->addTo( edit ); 146 a->addTo( edit );
147 a->addTo( listTools ); 147 a->addTo( listTools );
148 148
149 149
150 // make it possible to go directly to businesscard via qcop call 150 // make it possible to go directly to businesscard via qcop call
151 //#if defined(Q_WS_QWS) // Why this ? (se) 151 //#if defined(Q_WS_QWS) // Why this ? (se)
152#if !defined(QT_NO_COP) 152#if !defined(QT_NO_COP)
153 QCopChannel *addressChannel = new QCopChannel("QPE/Addressbook" , this ); 153 QCopChannel *addressChannel = new QCopChannel("QPE/Addressbook" , this );
154 connect (addressChannel, SIGNAL( received(const QCString &, const QByteArray &)), 154 connect (addressChannel, SIGNAL( received(const QCString &, const QByteArray &)),
155 this, SLOT ( appMessage(const QCString &, const QByteArray &) ) ); 155 this, SLOT ( appMessage(const QCString &, const QByteArray &) ) );
156#endif 156#endif
157 // #endif 157 // #endif
diff --git a/core/pim/addressbook/addressbook.h b/core/pim/addressbook/addressbook.h
index 34bcb2a..9217e95 100644
--- a/core/pim/addressbook/addressbook.h
+++ b/core/pim/addressbook/addressbook.h
@@ -1,137 +1,137 @@
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 Addressbook_H 20#ifndef Addressbook_H
21#define Addressbook_H 21#define Addressbook_H
22 22
23// Remove this for OPIE releae 1.0 ! 23// Remove this for OPIE releae 1.0 !
24// #define __DEBUG_RELEASE 24// #define __DEBUG_RELEASE
25 25
26#include <qmainwindow.h> 26#include <qmainwindow.h>
27#include <qvaluelist.h> 27#include <qvaluelist.h>
28#include <qstringlist.h> 28#include <qstringlist.h>
29#include <qlineedit.h> 29#include <qlineedit.h>
30#include "ofloatbar.h" 30#include "ofloatbar.h"
31#include "abview.h" 31#include "abview.h"
32#include "abconfig.h" 32#include "abconfig.h"
33 33
34class ContactEditor; 34class ContactEditor;
35class AbLabel; 35class AbLabel;
36class AbTable; 36class AbTable;
37class QPEToolBar; 37class QToolBar;
38class QPopupMenu; 38class QPopupMenu;
39class QToolButton; 39class QToolButton;
40class QDialog; 40class QDialog;
41class Ir; 41class Ir;
42class QAction; 42class QAction;
43class LetterPicker; 43class LetterPicker;
44 44
45class AddressbookWindow: public QMainWindow 45class AddressbookWindow: public QMainWindow
46{ 46{
47 Q_OBJECT 47 Q_OBJECT
48public: 48public:
49 enum EntryMode { NewEntry=0, EditEntry }; 49 enum EntryMode { NewEntry=0, EditEntry };
50 50
51 static QString appName() { return QString::fromLatin1("addressbook"); } 51 static QString appName() { return QString::fromLatin1("addressbook"); }
52 AddressbookWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); 52 AddressbookWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
53 ~AddressbookWindow(); 53 ~AddressbookWindow();
54 54
55protected: 55protected:
56 void resizeEvent( QResizeEvent * e ); 56 void resizeEvent( QResizeEvent * e );
57 57
58 void editPersonal(); 58 void editPersonal();
59 void editEntry( EntryMode ); 59 void editEntry( EntryMode );
60 void closeEvent( QCloseEvent *e ); 60 void closeEvent( QCloseEvent *e );
61 bool save(); 61 bool save();
62 62
63public slots: 63public slots:
64 void flush(); 64 void flush();
65 void reload(); 65 void reload();
66 void appMessage(const QCString &, const QByteArray &); 66 void appMessage(const QCString &, const QByteArray &);
67 void setDocument( const QString & ); 67 void setDocument( const QString & );
68#ifdef __DEBUG_RELEASE 68#ifdef __DEBUG_RELEASE
69 // void slotSave(); 69 // void slotSave();
70#endif 70#endif
71 71
72private slots: 72private slots:
73 void importvCard(); 73 void importvCard();
74 void exportvCard(); 74 void exportvCard();
75 void slotListNew(); 75 void slotListNew();
76 /* void slotListView(); */ 76 /* void slotListView(); */
77 void slotListDelete(); 77 void slotListDelete();
78 void slotViewBack(); 78 void slotViewBack();
79 void slotViewEdit(); 79 void slotViewEdit();
80 void slotPersonalView(); 80 void slotPersonalView();
81 void listIsEmpty( bool ); 81 void listIsEmpty( bool );
82 /* void slotSettings(); */ 82 /* void slotSettings(); */
83 void writeMail(); 83 void writeMail();
84 void slotBeam(); 84 void slotBeam();
85 void beamDone( Ir * ); 85 void beamDone( Ir * );
86 void slotSetCategory( int ); 86 void slotSetCategory( int );
87 void slotSetLetter( char ); 87 void slotSetLetter( char );
88 void slotUpdateToolbar(); 88 void slotUpdateToolbar();
89 void slotSetFont(int); 89 void slotSetFont(int);
90 90
91 void slotFindOpen(); 91 void slotFindOpen();
92 void slotFindClose(); 92 void slotFindClose();
93 void slotFind(); 93 void slotFind();
94 void slotNotFound(); 94 void slotNotFound();
95 void slotWrapAround(); 95 void slotWrapAround();
96 96
97 void slotViewSwitched( int ); 97 void slotViewSwitched( int );
98 void slotListView(); 98 void slotListView();
99 void slotCardView(); 99 void slotCardView();
100 100
101 void slotConfig(); 101 void slotConfig();
102 102
103private: 103private:
104 void populateCategories(); 104 void populateCategories();
105 105
106 QPopupMenu *catMenu; 106 QPopupMenu *catMenu;
107 QPEToolBar *listTools; 107 QToolBar *listTools;
108 QToolButton *deleteButton; 108 QToolButton *deleteButton;
109 enum Panes { paneList=0, paneView, paneEdit }; 109 enum Panes { paneList=0, paneView, paneEdit };
110 ContactEditor *abEditor; 110 ContactEditor *abEditor;
111 LetterPicker *pLabel; 111 LetterPicker *pLabel;
112 AbView* m_abView; 112 AbView* m_abView;
113 QWidget *listContainer; 113 QWidget *listContainer;
114 114
115 // Searching stuff 115 // Searching stuff
116 OFloatBar* searchBar; 116 OFloatBar* searchBar;
117 QLineEdit* searchEdit; 117 QLineEdit* searchEdit;
118 118
119 QAction *actionNew, *actionEdit, *actionTrash, *actionFind, *actionBeam, *actionPersonal, *actionMail; 119 QAction *actionNew, *actionEdit, *actionTrash, *actionFind, *actionBeam, *actionPersonal, *actionMail;
120 120
121 int viewMargin; 121 int viewMargin;
122 122
123 bool syncing; 123 bool syncing;
124 QFont *defaultFont; 124 QFont *defaultFont;
125 int m_curFontSize; 125 int m_curFontSize;
126 126
127 bool isLoading; 127 bool isLoading;
128 128
129 AbConfig m_config; 129 AbConfig m_config;
130 130
131 QAction* m_tableViewButton; 131 QAction* m_tableViewButton;
132 QAction* m_cardViewButton; 132 QAction* m_cardViewButton;
133 133
134 int active_view; 134 int active_view;
135}; 135};
136 136
137#endif 137#endif
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index a040d7c..44f1515 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -1,160 +1,160 @@
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** $Id$ 19** $Id$
20** 20**
21**********************************************************************/ 21**********************************************************************/
22 22
23#define QTOPIA_INTERNAL_FD 23#define QTOPIA_INTERNAL_FD
24 24
25#include "datebook.h" 25#include "datebook.h"
26#include "datebookday.h" 26#include "datebookday.h"
27#include "datebooksettings.h" 27#include "datebooksettings.h"
28#include "datebookweek.h" 28#include "datebookweek.h"
29#include "datebookweeklst.h" 29#include "datebookweeklst.h"
30#include "dateentryimpl.h" 30#include "dateentryimpl.h"
31 31
32#include <qpe/datebookmonth.h> 32#include <qpe/datebookmonth.h>
33#include <qpe/qpeapplication.h> 33#include <qpe/qpeapplication.h>
34#include <qpe/config.h> 34#include <qpe/config.h>
35#include <qpe/qpedebug.h> 35#include <qpe/qpedebug.h>
36#include <qpe/event.h> 36#include <qpe/event.h>
37#include <qpe/finddialog.h> 37#include <qpe/finddialog.h>
38#include <qpe/ir.h> 38#include <qpe/ir.h>
39#include <qmenubar.h> 39#include <qmenubar.h>
40#include <qpe/qpemessagebox.h> 40#include <qpe/qpemessagebox.h>
41#include <qpe/resource.h> 41#include <qpe/resource.h>
42#include <qpe/sound.h> 42#include <qpe/sound.h>
43#include <qpe/timestring.h> 43#include <qpe/timestring.h>
44#include <qpe/qpetoolbar.h> 44#include <qtoolbar.h>
45#include <qpe/tzselect.h> 45#include <qpe/tzselect.h>
46#include <qpe/xmlreader.h> 46#include <qpe/xmlreader.h>
47 47
48#include <qaction.h> 48#include <qaction.h>
49#include <qcopchannel_qws.h> 49#include <qcopchannel_qws.h>
50#include <qdatetime.h> 50#include <qdatetime.h>
51#include <qdialog.h> 51#include <qdialog.h>
52#include <qfile.h> 52#include <qfile.h>
53#include <qlabel.h> 53#include <qlabel.h>
54#include <qlayout.h> 54#include <qlayout.h>
55#include <qmessagebox.h> 55#include <qmessagebox.h>
56#include <qpopupmenu.h> 56#include <qpopupmenu.h>
57#include <qpushbutton.h> 57#include <qpushbutton.h>
58#include <qregexp.h> 58#include <qregexp.h>
59#include <qtextcodec.h> 59#include <qtextcodec.h>
60#include <qtextstream.h> 60#include <qtextstream.h>
61#include <qtimer.h> 61#include <qtimer.h>
62#include <qtl.h> 62#include <qtl.h>
63#include <qwidgetstack.h> 63#include <qwidgetstack.h>
64#include <qwindowsystem_qws.h> 64#include <qwindowsystem_qws.h>
65 65
66#include <sys/stat.h> 66#include <sys/stat.h>
67#include <sys/types.h> 67#include <sys/types.h>
68#include <fcntl.h> 68#include <fcntl.h>
69#include <unistd.h> 69#include <unistd.h>
70 70
71#include <stdlib.h> 71#include <stdlib.h>
72 72
73DateBook::DateBook( QWidget *parent, const char *, WFlags f ) 73DateBook::DateBook( QWidget *parent, const char *, WFlags f )
74 : QMainWindow( parent, "datebook", f ), 74 : QMainWindow( parent, "datebook", f ),
75 aPreset( FALSE ), 75 aPreset( FALSE ),
76 presetTime( -1 ), 76 presetTime( -1 ),
77 startTime( 8 ), // an acceptable default 77 startTime( 8 ), // an acceptable default
78 rowStyle( 0 ), 78 rowStyle( 0 ),
79 bJumpToCurTime(FALSE), 79 bJumpToCurTime(FALSE),
80 syncing(FALSE), 80 syncing(FALSE),
81 inSearch(FALSE), 81 inSearch(FALSE),
82 alarmCounter(0) 82 alarmCounter(0)
83{ 83{
84 bool needEvilHack= false; // if we need an Evil Hack 84 bool needEvilHack= false; // if we need an Evil Hack
85 QTime t; 85 QTime t;
86 t.start(); 86 t.start();
87 db = new DateBookDBHack; 87 db = new DateBookDBHack;
88 qDebug("loading db t=%d", t.elapsed() ); 88 qDebug("loading db t=%d", t.elapsed() );
89 loadSettings(); 89 loadSettings();
90 setCaption( tr("Calendar") ); 90 setCaption( tr("Calendar") );
91 setIcon( Resource::loadPixmap( "datebook_icon" ) ); 91 setIcon( Resource::loadPixmap( "datebook_icon" ) );
92 92
93 setToolBarsMovable( FALSE ); 93 setToolBarsMovable( FALSE );
94 94
95 views = new QWidgetStack( this ); 95 views = new QWidgetStack( this );
96 setCentralWidget( views ); 96 setCentralWidget( views );
97 97
98 dayView = 0; 98 dayView = 0;
99 weekView = 0; 99 weekView = 0;
100 weekLstView = 0; 100 weekLstView = 0;
101 monthView = 0; 101 monthView = 0;
102 102
103// QPEToolBar *bar = new QPEToolBar( this ); 103// QToolBar *bar = new QToolBar( this );
104// bar->setHorizontalStretchable( TRUE ); 104// bar->setHorizontalStretchable( TRUE );
105 105
106// QMenuBar *mb = new QMenuBar( bar ); 106// QMenuBar *mb = new QMenuBar( bar );
107// mb->setMargin( 0 ); 107// mb->setMargin( 0 );
108 108
109// QPopupMenu *view = new QPopupMenu( this ); 109// QPopupMenu *view = new QPopupMenu( this );
110// mb->insertItem( tr( "View" ), view ); 110// mb->insertItem( tr( "View" ), view );
111 111
112 QPEToolBar *sub_bar = new QPEToolBar(this); 112 QToolBar *sub_bar = new QToolBar(this);
113 sub_bar->setHorizontalStretchable(TRUE); 113 sub_bar->setHorizontalStretchable(TRUE);
114 114
115 QActionGroup *g = new QActionGroup( this ); 115 QActionGroup *g = new QActionGroup( this );
116 g->setExclusive( TRUE ); 116 g->setExclusive( TRUE );
117 117
118 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 ); 118 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 );
119 connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) ); 119 connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) );
120 a->addTo( sub_bar ); 120 a->addTo( sub_bar );
121 121
122 sub_bar->addSeparator(); 122 sub_bar->addSeparator();
123 123
124 a = new QAction( tr( "Today" ), Resource::loadPixmap( "datebook/to_day" ), QString::null, 0, g, 0 ); 124 a = new QAction( tr( "Today" ), Resource::loadPixmap( "datebook/to_day" ), QString::null, 0, g, 0 );
125 connect( a, SIGNAL( activated() ), this, SLOT( slotToday() ) ); 125 connect( a, SIGNAL( activated() ), this, SLOT( slotToday() ) );
126 a->addTo( sub_bar ); 126 a->addTo( sub_bar );
127 //a->addTo( view ); 127 //a->addTo( view );
128 128
129 sub_bar->addSeparator(); 129 sub_bar->addSeparator();
130 130
131 a = new QAction( tr( "Day" ), Resource::loadPixmap( "day" ), QString::null, 0, g, 0 ); 131 a = new QAction( tr( "Day" ), Resource::loadPixmap( "day" ), QString::null, 0, g, 0 );
132 connect( a, SIGNAL( activated() ), this, SLOT( viewDay() ) ); 132 connect( a, SIGNAL( activated() ), this, SLOT( viewDay() ) );
133 a->addTo( sub_bar ); 133 a->addTo( sub_bar );
134// a->addTo( view ); 134// a->addTo( view );
135 a->setToggleAction( TRUE ); 135 a->setToggleAction( TRUE );
136 a->setOn( TRUE ); 136 a->setOn( TRUE );
137 dayAction = a; 137 dayAction = a;
138 138
139 a = new QAction( tr( "Week" ), Resource::loadPixmap( "week" ), QString::null, 0, g, 0 ); 139 a = new QAction( tr( "Week" ), Resource::loadPixmap( "week" ), QString::null, 0, g, 0 );
140 connect( a, SIGNAL( activated() ), this, SLOT( viewWeek() ) ); 140 connect( a, SIGNAL( activated() ), this, SLOT( viewWeek() ) );
141 a->addTo( sub_bar ); 141 a->addTo( sub_bar );
142// a->addTo( view ); 142// a->addTo( view );
143 a->setToggleAction( TRUE ); 143 a->setToggleAction( TRUE );
144 weekAction = a; 144 weekAction = a;
145 145
146 a = new QAction( tr( "WeekLst" ), Resource::loadPixmap( "datebook/weeklst" ), QString::null, 0, g, 0 ); 146 a = new QAction( tr( "WeekLst" ), Resource::loadPixmap( "datebook/weeklst" ), QString::null, 0, g, 0 );
147 connect( a, SIGNAL( activated() ), this, SLOT( viewWeekLst() ) ); 147 connect( a, SIGNAL( activated() ), this, SLOT( viewWeekLst() ) );
148 a->addTo( sub_bar ); 148 a->addTo( sub_bar );
149// a->addTo( view ); 149// a->addTo( view );
150 a->setToggleAction( TRUE ); 150 a->setToggleAction( TRUE );
151 weekLstAction = a; 151 weekLstAction = a;
152 152
153 a = new QAction( tr( "Month" ), Resource::loadPixmap( "month" ), QString::null, 0, g, 0 ); 153 a = new QAction( tr( "Month" ), Resource::loadPixmap( "month" ), QString::null, 0, g, 0 );
154 connect( a, SIGNAL( activated() ), this, SLOT( viewMonth() ) ); 154 connect( a, SIGNAL( activated() ), this, SLOT( viewMonth() ) );
155 a->addTo( sub_bar ); 155 a->addTo( sub_bar );
156// a->addTo( view ); 156// a->addTo( view );
157 a->setToggleAction( TRUE ); 157 a->setToggleAction( TRUE );
158 monthAction = a; 158 monthAction = a;
159 159
160 sub_bar->addSeparator(); 160 sub_bar->addSeparator();
diff --git a/core/pim/datebook2/mainwindow.cpp b/core/pim/datebook2/mainwindow.cpp
index 7d436ae..be30415 100644
--- a/core/pim/datebook2/mainwindow.cpp
+++ b/core/pim/datebook2/mainwindow.cpp
@@ -1,141 +1,141 @@
1 1
2#include <qcopchannel_qws.h> 2#include <qcopchannel_qws.h>
3#include <qwidgetstack.h> 3#include <qwidgetstack.h>
4#include <qlabel.h> 4#include <qlabel.h>
5#include <qaction.h> 5#include <qaction.h>
6#include <qpopupmenu.h> 6#include <qpopupmenu.h>
7#include <qtimer.h> 7#include <qtimer.h>
8 8
9#include <qpe/qpeapplication.h> 9#include <qpe/qpeapplication.h>
10#include <qpe/ir.h> 10#include <qpe/ir.h>
11#include <qmenubar.h> 11#include <qmenubar.h>
12#include <qpe/qpetoolbar.h> 12#include <qtoolbar.h>
13#include <qpe/qpemessagebox.h> 13#include <qpe/qpemessagebox.h>
14#include <qpe/resource.h> 14#include <qpe/resource.h>
15 15
16#include "editor.h" 16#include "editor.h"
17#include "show.h" 17#include "show.h"
18#include "templatemanager.h" 18#include "templatemanager.h"
19#include "bookmanager.h" 19#include "bookmanager.h"
20#include "mainwindow.h" 20#include "mainwindow.h"
21 21
22 22
23using namespace Datebook; 23using namespace Datebook;
24 24
25MainWindow::MainWindow() 25MainWindow::MainWindow()
26 : OPimMainWindow( "Datebook", 0, 0 ), m_descMan( "Descriptions" ), m_locMan( "Locations" ) 26 : OPimMainWindow( "Datebook", 0, 0 ), m_descMan( "Descriptions" ), m_locMan( "Locations" )
27{ 27{
28 setIcon( Resource::loadPixmap( "datebook_icon" ) ); 28 setIcon( Resource::loadPixmap( "datebook_icon" ) );
29 initUI(); 29 initUI();
30 initManagers(); 30 initManagers();
31 initView(); 31 initView();
32 initConfig(); 32 initConfig();
33 33
34 QTimer::singleShot(0, this, SLOT(populate() ) ); 34 QTimer::singleShot(0, this, SLOT(populate() ) );
35 35
36 QCopChannel* chan = new QCopChannel( "QPE/System", this ); 36 QCopChannel* chan = new QCopChannel( "QPE/System", this );
37 connect( chan, SIGNAL( received(const QCString&, const QByteArray& ) ), 37 connect( chan, SIGNAL( received(const QCString&, const QByteArray& ) ),
38 this, SLOT( slotReceive( const QCString&, const QByteArray& ) ) ); 38 this, SLOT( slotReceive( const QCString&, const QByteArray& ) ) );
39 39
40 chan = new QCopChannel( "QPE/Datebook", this ); 40 chan = new QCopChannel( "QPE/Datebook", this );
41 connect( chan, SIGNAL( received(const QCString&, const QByteArray& ) ), 41 connect( chan, SIGNAL( received(const QCString&, const QByteArray& ) ),
42 this, SLOT( slotReceive( const QCString&, const QByteArray& ) ) ); 42 this, SLOT( slotReceive( const QCString&, const QByteArray& ) ) );
43} 43}
44MainWindow::~MainWindow() { 44MainWindow::~MainWindow() {
45 m_tempMan.save(); 45 m_tempMan.save();
46 m_locMan.save(); 46 m_locMan.save();
47 m_descMan.save(); 47 m_descMan.save();
48 48
49 manager()->save(); 49 manager()->save();
50 delete m_manager; 50 delete m_manager;
51} 51}
52void MainWindow::doSetDocument( const QString& str ) { 52void MainWindow::doSetDocument( const QString& str ) {
53 53
54} 54}
55void MainWindow::flush() { 55void MainWindow::flush() {
56 manager()->save(); 56 manager()->save();
57} 57}
58void MainWindow::reload() { 58void MainWindow::reload() {
59 manager()->reload(); 59 manager()->reload();
60} 60}
61int MainWindow::create() { 61int MainWindow::create() {
62 return 0; 62 return 0;
63} 63}
64bool MainWindow::remove( int uid ) { 64bool MainWindow::remove( int uid ) {
65 manager()->remove( uid ); 65 manager()->remove( uid );
66 return true; 66 return true;
67} 67}
68void MainWindow::beam( int uid ) { 68void MainWindow::beam( int uid ) {
69 69
70} 70}
71void MainWindow::show( int uid ) { 71void MainWindow::show( int uid ) {
72 72
73 eventShow()->show( manager()->event( uid ) ); 73 eventShow()->show( manager()->event( uid ) );
74} 74}
75void MainWindow::add( const OPimRecord& ad) { 75void MainWindow::add( const OPimRecord& ad) {
76 manager()->add( ad ); 76 manager()->add( ad );
77} 77}
78void MainWindow::edit() { 78void MainWindow::edit() {
79 edit ( currentView()->currentItem() ); 79 edit ( currentView()->currentItem() );
80} 80}
81void MainWindow::edit( int uid ) { 81void MainWindow::edit( int uid ) {
82 82
83} 83}
84/* 84/*
85 * init tool bars layout and so on 85 * init tool bars layout and so on
86 */ 86 */
87void MainWindow::initUI() { 87void MainWindow::initUI() {
88 setToolBarsMovable( false ); 88 setToolBarsMovable( false );
89 89
90 m_stack = new QWidgetStack( this ); 90 m_stack = new QWidgetStack( this );
91 setCentralWidget( m_stack ); 91 setCentralWidget( m_stack );
92 92
93 m_toolBar = new QPEToolBar( this ); 93 m_toolBar = new QToolBar( this );
94 m_toolBar->setHorizontalStretchable( TRUE ); 94 m_toolBar->setHorizontalStretchable( TRUE );
95 95
96 QMenuBar* mb = new QMenuBar( m_toolBar ); 96 QMenuBar* mb = new QMenuBar( m_toolBar );
97 97
98 m_popView = new QPopupMenu( this ); 98 m_popView = new QPopupMenu( this );
99 m_popSetting = new QPopupMenu( this ); 99 m_popSetting = new QPopupMenu( this );
100 100
101 mb->insertItem( tr("View"), m_popView ); 101 mb->insertItem( tr("View"), m_popView );
102 mb->insertItem( tr("Settings" ), m_popSetting ); 102 mb->insertItem( tr("Settings" ), m_popSetting );
103 103
104 m_popTemplate = new QPopupMenu( this ); 104 m_popTemplate = new QPopupMenu( this );
105 m_popTemplate->setCheckable( TRUE ); 105 m_popTemplate->setCheckable( TRUE );
106 connect( m_popTemplate, SIGNAL(activated(int) ), 106 connect( m_popTemplate, SIGNAL(activated(int) ),
107 this, SLOT(slotNewFromTemplate(int) ) ); 107 this, SLOT(slotNewFromTemplate(int) ) );
108 m_popView->insertItem(tr("New from template"), m_popTemplate, -1, 0); 108 m_popView->insertItem(tr("New from template"), m_popTemplate, -1, 0);
109 109
110 110
111 QAction* a = new QAction( tr("New Event"), Resource::loadPixmap("new"), 111 QAction* a = new QAction( tr("New Event"), Resource::loadPixmap("new"),
112 QString::null, 0, this, 0 ); 112 QString::null, 0, this, 0 );
113 a->addTo( m_toolBar ); 113 a->addTo( m_toolBar );
114 a->addTo( m_popView ); 114 a->addTo( m_popView );
115 connect(a, SIGNAL( activated() ), this, SLOT( create() ) ); 115 connect(a, SIGNAL( activated() ), this, SLOT( create() ) );
116 116
117 a = new QAction( tr("Edit Event"), Resource::loadPixmap("edit"), 117 a = new QAction( tr("Edit Event"), Resource::loadPixmap("edit"),
118 QString::null, 0, this, 0 ); 118 QString::null, 0, this, 0 );
119 a->addTo( m_popView ); 119 a->addTo( m_popView );
120 connect(a, SIGNAL( activated() ), this, SLOT( edit() ) ); 120 connect(a, SIGNAL( activated() ), this, SLOT( edit() ) );
121 121
122 a = new QAction( tr("Today" ), Resource::loadPixmap( "datebook/to_day"), 122 a = new QAction( tr("Today" ), Resource::loadPixmap( "datebook/to_day"),
123 QString::null, 0, this, 0 ); 123 QString::null, 0, this, 0 );
124 a->addTo( m_toolBar ); 124 a->addTo( m_toolBar );
125 connect(a, SIGNAL( activated() ), this, SLOT( slotGoToNow() ) ); 125 connect(a, SIGNAL( activated() ), this, SLOT( slotGoToNow() ) );
126 126
127 a = new QAction( tr("Find"), Resource::loadPixmap( "mag" ), 127 a = new QAction( tr("Find"), Resource::loadPixmap( "mag" ),
128 QString::null, 0, this, 0 ); 128 QString::null, 0, this, 0 );
129 a->addTo( m_toolBar ); 129 a->addTo( m_toolBar );
130 connect(a, SIGNAL( activated() ), this, SLOT( slotFind() ) ); 130 connect(a, SIGNAL( activated() ), this, SLOT( slotFind() ) );
131 131
132 a = new QAction( tr("Configure"), QString::null, 0, 0 ); 132 a = new QAction( tr("Configure"), QString::null, 0, 0 );
133 a->addTo( m_popSetting ); 133 a->addTo( m_popSetting );
134 connect(a, SIGNAL( activated() ), this, SLOT( slotConfigure() ) ); 134 connect(a, SIGNAL( activated() ), this, SLOT( slotConfigure() ) );
135 135
136 a = new QAction( tr("Configure Locations"), QString::null, 0, 0 ); 136 a = new QAction( tr("Configure Locations"), QString::null, 0, 0 );
137 a->addTo( m_popSetting ); 137 a->addTo( m_popSetting );
138 connect(a, SIGNAL( activated() ), this, SLOT( slotConfigureLocs() ) ); 138 connect(a, SIGNAL( activated() ), this, SLOT( slotConfigureLocs() ) );
139 139
140 a = new QAction( tr("Configure Descriptions"), QString::null, 0, 0 ); 140 a = new QAction( tr("Configure Descriptions"), QString::null, 0, 0 );
141 a->addTo( m_popSetting ); 141 a->addTo( m_popSetting );
diff --git a/core/pim/datebook2/mainwindow.h b/core/pim/datebook2/mainwindow.h
index 3c22637..33ef864 100644
--- a/core/pim/datebook2/mainwindow.h
+++ b/core/pim/datebook2/mainwindow.h
@@ -1,107 +1,107 @@
1#ifndef DATE_BOOK_MAIN_WINDOW_H 1#ifndef DATE_BOOK_MAIN_WINDOW_H
2#define DATE_BOOK_MAIN_WINDOW_H 2#define DATE_BOOK_MAIN_WINDOW_H
3 3
4#include <qlist.h> 4#include <qlist.h>
5 5
6#include <opie/opimmainwindow.h> 6#include <opie/opimmainwindow.h>
7 7
8#include "descriptionmanager.h" 8#include "descriptionmanager.h"
9#include "locationmanager.h" 9#include "locationmanager.h"
10#include "templatemanager.h" 10#include "templatemanager.h"
11#include "view.h" 11#include "view.h"
12 12
13class QAction; 13class QAction;
14class QWidgetStack; 14class QWidgetStack;
15class QPopupMenu; 15class QPopupMenu;
16class QPEToolBar; 16class QToolBar;
17namespace Datebook { 17namespace Datebook {
18 class BookManager; 18 class BookManager;
19 class Show; 19 class Show;
20 class Editor; 20 class Editor;
21 class MainWindow : public OPimMainWindow { 21 class MainWindow : public OPimMainWindow {
22 Q_OBJECT 22 Q_OBJECT
23 friend class Show; // to avoid QObject 23 friend class Show; // to avoid QObject
24 friend class View; // to avoid QObject 24 friend class View; // to avoid QObject
25 friend class Editor; 25 friend class Editor;
26 public: 26 public:
27 MainWindow(); 27 MainWindow();
28 ~MainWindow(); 28 ~MainWindow();
29 29
30 private slots: 30 private slots:
31 void initUI(); // init the UI 31 void initUI(); // init the UI
32 void initConfig(); // apply the config 32 void initConfig(); // apply the config
33 void initView(); // init the Views.. 33 void initView(); // init the Views..
34 void initManagers(); // init the Managers including templates, location and description 34 void initManagers(); // init the Managers including templates, location and description
35 void raiseCurrentView(); // raise the current View 35 void raiseCurrentView(); // raise the current View
36 void slotGoToNow(); // will switch the currentView to the curren date time 36 void slotGoToNow(); // will switch the currentView to the curren date time
37 void slotFind(); // find!!! 37 void slotFind(); // find!!!
38 void slotConfigure(); // configure the app 38 void slotConfigure(); // configure the app
39 void slotClockChanged(bool); // clock changed 39 void slotClockChanged(bool); // clock changed
40 void slotWeekChanged( bool ); // week changed 40 void slotWeekChanged( bool ); // week changed
41 void slotAppMessage( const QCString&, const QByteArray& ); // qApp message QPE/Application/datebook 41 void slotAppMessage( const QCString&, const QByteArray& ); // qApp message QPE/Application/datebook
42 void slotReceive( const QCString&, const QByteArray& ); // QPE/System and QPE/Datebook 42 void slotReceive( const QCString&, const QByteArray& ); // QPE/System and QPE/Datebook
43 void slotAction( QAction* ); // View changed 43 void slotAction( QAction* ); // View changed
44 void slotConfigureLocs(); // Configure the Locations 44 void slotConfigureLocs(); // Configure the Locations
45 void slotConfigureDesc(); // Configure the Desc 45 void slotConfigureDesc(); // Configure the Desc
46 void slotConfigureTemp(); 46 void slotConfigureTemp();
47 void slotNewFromTemplate(int ); // called when someone chooses the template menu 47 void slotNewFromTemplate(int ); // called when someone chooses the template menu
48 48
49 void setTemplateMenu(); // updates the templateMenu 49 void setTemplateMenu(); // updates the templateMenu
50 50
51 protected slots: 51 protected slots:
52 void populate(); 52 void populate();
53 void doSetDocument( const QString& str ); 53 void doSetDocument( const QString& str );
54 void flush(); 54 void flush();
55 void reload(); 55 void reload();
56 int create(); 56 int create();
57 bool remove( int uid ); 57 bool remove( int uid );
58 void beam( int uid ); 58 void beam( int uid );
59 void show( int uid ); 59 void show( int uid );
60 void edit( int uid ); 60 void edit( int uid );
61 void edit(); 61 void edit();
62 void add( const OPimRecord& ); 62 void add( const OPimRecord& );
63 63
64 private: 64 private:
65 QPEToolBar* toolbar(); 65 QToolBar* toolbar();
66 QPopupMenu* viewMenu(); 66 QPopupMenu* viewMenu();
67 QPopupMenu* settingsMenu(); 67 QPopupMenu* settingsMenu();
68 QPopupMenu* templateMenu(); 68 QPopupMenu* templateMenu();
69 View* currentView(); 69 View* currentView();
70 BookManager* manager(); 70 BookManager* manager();
71 TemplateManager templateManager(); 71 TemplateManager templateManager();
72 LocationManager locationManager(); 72 LocationManager locationManager();
73 DescriptionManager descriptionManager(); 73 DescriptionManager descriptionManager();
74 void setLocationManager( const LocationManager& ); 74 void setLocationManager( const LocationManager& );
75 void setDescriptionManager( const DescriptionManager& ); 75 void setDescriptionManager( const DescriptionManager& );
76 Show* eventShow(); 76 Show* eventShow();
77 Editor* editor(); 77 Editor* editor();
78 78
79 private: // friend functions for Show 79 private: // friend functions for Show
80 void hideShow(); // to hide the view 80 void hideShow(); // to hide the view
81 // off friend Show 81 // off friend Show
82 82
83 // friend of the view 83 // friend of the view
84 private: 84 private:
85 void viewPopup( int ); 85 void viewPopup( int );
86 void viewAdd( const QDate& date ); 86 void viewAdd( const QDate& date );
87 void viewAdd( const QDateTime&, const QDateTime& ); 87 void viewAdd( const QDateTime&, const QDateTime& );
88 bool viewAP()const; 88 bool viewAP()const;
89 bool viewStartMonday()const; 89 bool viewStartMonday()const;
90 // off view show 90 // off view show
91 private: 91 private:
92 QList<View> m_view; // the Views.. not autoDelete 92 QList<View> m_view; // the Views.. not autoDelete
93 QWidgetStack* m_stack; 93 QWidgetStack* m_stack;
94 QPEToolBar *m_toolBar; 94 QToolBar *m_toolBar;
95 QPopupMenu* m_popView; 95 QPopupMenu* m_popView;
96 QPopupMenu* m_popSetting; 96 QPopupMenu* m_popSetting;
97 QPopupMenu* m_popTemplate; 97 QPopupMenu* m_popTemplate;
98 BookManager* m_manager; 98 BookManager* m_manager;
99 TemplateManager m_tempMan; 99 TemplateManager m_tempMan;
100 DescriptionManager m_descMan; 100 DescriptionManager m_descMan;
101 LocationManager m_locMan; 101 LocationManager m_locMan;
102 Show* m_show; 102 Show* m_show;
103 Editor* m_edit; 103 Editor* m_edit;
104 }; 104 };
105} 105}
106 106
107#endif 107#endif
diff --git a/core/pim/osearch/mainwindow.cpp b/core/pim/osearch/mainwindow.cpp
index 80738df..07403a1 100644
--- a/core/pim/osearch/mainwindow.cpp
+++ b/core/pim/osearch/mainwindow.cpp
@@ -1,165 +1,165 @@
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 13
14#include <qaction.h> 14#include <qaction.h>
15#include <qmessagebox.h> 15#include <qmessagebox.h>
16#include <qpopupmenu.h> 16#include <qpopupmenu.h>
17#include <qtoolbutton.h> 17#include <qtoolbutton.h>
18#include <qstring.h> 18#include <qstring.h>
19#include <qlabel.h> 19#include <qlabel.h>
20#include <qfile.h> 20#include <qfile.h>
21#include <qhbuttongroup.h> 21#include <qhbuttongroup.h>
22#include <qhbox.h> 22#include <qhbox.h>
23#include <qpushbutton.h> 23#include <qpushbutton.h>
24#include <qintdict.h> 24#include <qintdict.h>
25#include <qlayout.h> 25#include <qlayout.h>
26#include <qlineedit.h> 26#include <qlineedit.h>
27#include <qsignalmapper.h> 27#include <qsignalmapper.h>
28#include <qtextbrowser.h> 28#include <qtextbrowser.h>
29#include <qregexp.h> 29#include <qregexp.h>
30#include <qwhatsthis.h> 30#include <qwhatsthis.h>
31#include <qmenubar.h> 31#include <qmenubar.h>
32#include <qpe/qpemessagebox.h> 32#include <qpe/qpemessagebox.h>
33#include <qpe/resource.h> 33#include <qpe/resource.h>
34#include <qpe/config.h> 34#include <qpe/config.h>
35#include <qpe/qpetoolbar.h> 35#include <qtoolbar.h>
36#include <qpe/qpeapplication.h> 36#include <qpe/qpeapplication.h>
37#include <qpe/config.h> 37#include <qpe/config.h>
38#include <qpe/global.h> 38#include <qpe/global.h>
39#include <opie/owait.h> 39#include <opie/owait.h>
40 40
41#include "olistview.h" 41#include "olistview.h"
42#include "olistviewitem.h" 42#include "olistviewitem.h"
43#include "resultitem.h" 43#include "resultitem.h"
44#include "adresssearch.h" 44#include "adresssearch.h"
45#include "todosearch.h" 45#include "todosearch.h"
46#include "datebooksearch.h" 46#include "datebooksearch.h"
47#include "applnksearch.h" 47#include "applnksearch.h"
48#include "doclnksearch.h" 48#include "doclnksearch.h"
49#include "mainwindow.h" 49#include "mainwindow.h"
50 50
51MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : 51MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) :
52 QMainWindow( parent, name, f ), _currentItem(0) 52 QMainWindow( parent, name, f ), _currentItem(0)
53{ 53{
54 setCaption( tr("OSearch") ); 54 setCaption( tr("OSearch") );
55 55
56 setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding)); 56 setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
57 57
58 QFrame *mainFrame = new QFrame( this, "mainFrame" ); 58 QFrame *mainFrame = new QFrame( this, "mainFrame" );
59 mainFrame->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding)); 59 mainFrame->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
60 60
61 mainLayout = new QVBoxLayout( mainFrame ); 61 mainLayout = new QVBoxLayout( mainFrame );
62 mainLayout->setSpacing( 0 ); 62 mainLayout->setSpacing( 0 );
63 mainLayout->setMargin( 0 ); 63 mainLayout->setMargin( 0 );
64 64
65 resultsList = new OListView( mainFrame ); 65 resultsList = new OListView( mainFrame );
66 resultsList->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding)); 66 resultsList->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
67 mainLayout->addWidget( resultsList ); 67 mainLayout->addWidget( resultsList );
68 68
69 detailsFrame = new QFrame( mainFrame, "detailsFrame" ); 69 detailsFrame = new QFrame( mainFrame, "detailsFrame" );
70 QVBoxLayout *detailsLayout = new QVBoxLayout( detailsFrame ); 70 QVBoxLayout *detailsLayout = new QVBoxLayout( detailsFrame );
71 richEdit = new QTextView( detailsFrame ); 71 richEdit = new QTextView( detailsFrame );
72 QWhatsThis::add( richEdit, tr("The details of the current result") ); 72 QWhatsThis::add( richEdit, tr("The details of the current result") );
73 richEdit->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding)); 73 richEdit->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
74 detailsLayout->addWidget( richEdit ); 74 detailsLayout->addWidget( richEdit );
75 75
76 buttonBox = new QHBox( mainFrame, "Button Box" ); 76 buttonBox = new QHBox( mainFrame, "Button Box" );
77 77
78 _buttonCount = 0; 78 _buttonCount = 0;
79 79
80 mainLayout->addWidget( detailsFrame ); 80 mainLayout->addWidget( detailsFrame );
81 mainLayout->addWidget( buttonBox ); 81 mainLayout->addWidget( buttonBox );
82 detailsFrame->hide(); 82 detailsFrame->hide();
83 buttonBox->hide(); 83 buttonBox->hide();
84 84
85 searches.append( new AppLnkSearch( resultsList, tr("Applications") ) ); 85 searches.append( new AppLnkSearch( resultsList, tr("Applications") ) );
86 searches.append( new DocLnkSearch( resultsList, tr("Documents") ) ); 86 searches.append( new DocLnkSearch( resultsList, tr("Documents") ) );
87 searches.append( new TodoSearch( resultsList, tr("Todo List") ) ); 87 searches.append( new TodoSearch( resultsList, tr("Todo List") ) );
88 searches.append( new DatebookSearch( resultsList, tr("Calendar") ) ); 88 searches.append( new DatebookSearch( resultsList, tr("Calendar") ) );
89 searches.append( new AdressSearch( resultsList, tr("Contacts") ) ); 89 searches.append( new AdressSearch( resultsList, tr("Contacts") ) );
90 90
91 setCentralWidget( mainFrame ); 91 setCentralWidget( mainFrame );
92 92
93 popupTimer = new QTimer(); 93 popupTimer = new QTimer();
94 searchTimer = new QTimer(); 94 searchTimer = new QTimer();
95 95
96 connect(popupTimer, SIGNAL(timeout()), SLOT(showPopup())); 96 connect(popupTimer, SIGNAL(timeout()), SLOT(showPopup()));
97 connect(searchTimer, SIGNAL(timeout()), SLOT(searchStringChanged())); 97 connect(searchTimer, SIGNAL(timeout()), SLOT(searchStringChanged()));
98 connect(resultsList, SIGNAL(pressed(QListViewItem*)), SLOT(setCurrent(QListViewItem*))); 98 connect(resultsList, SIGNAL(pressed(QListViewItem*)), SLOT(setCurrent(QListViewItem*)));
99 connect(resultsList, SIGNAL(clicked(QListViewItem*)), SLOT(stopTimer(QListViewItem*))); 99 connect(resultsList, SIGNAL(clicked(QListViewItem*)), SLOT(stopTimer(QListViewItem*)));
100 100
101 signalMapper = new QSignalMapper( this ); 101 signalMapper = new QSignalMapper( this );
102 102
103 connect(signalMapper, SIGNAL(mapped(int)), SLOT( slotAction(int) ) ); 103 connect(signalMapper, SIGNAL(mapped(int)), SLOT( slotAction(int) ) );
104 104
105 makeMenu(); 105 makeMenu();
106 106
107 Config cfg( "osearch", Config::User ); 107 Config cfg( "osearch", Config::User );
108 cfg.setGroup( "search_settings" ); 108 cfg.setGroup( "search_settings" );
109 actionCaseSensitiv->setOn( cfg.readBoolEntry( "caseSensitiv", false ) ); 109 actionCaseSensitiv->setOn( cfg.readBoolEntry( "caseSensitiv", false ) );
110 actionWildcards->setOn( cfg.readBoolEntry( "wildcards", false ) ); 110 actionWildcards->setOn( cfg.readBoolEntry( "wildcards", false ) );
111// actionWholeWordsOnly->setOn( cfg.readBoolEntry( "whole_words_only", false ) ); 111// actionWholeWordsOnly->setOn( cfg.readBoolEntry( "whole_words_only", false ) );
112} 112}
113 113
114void MainWindow::makeMenu() 114void MainWindow::makeMenu()
115{ 115{
116 QPEToolBar *toolBar = new QPEToolBar( this ); 116 QToolBar *toolBar = new QToolBar( this );
117 QPEToolBar *searchBar = new QPEToolBar(this); 117 QToolBar *searchBar = new QToolBar(this);
118 QMenuBar *menuBar = new QMenuBar( toolBar ); 118 QMenuBar *menuBar = new QMenuBar( toolBar );
119 QPopupMenu *searchMenu = new QPopupMenu( menuBar ); 119 QPopupMenu *searchMenu = new QPopupMenu( menuBar );
120// QPopupMenu *viewMenu = new QPopupMenu( menuBar ); 120// QPopupMenu *viewMenu = new QPopupMenu( menuBar );
121 QPopupMenu *cfgMenu = new QPopupMenu( menuBar ); 121 QPopupMenu *cfgMenu = new QPopupMenu( menuBar );
122 QPopupMenu *searchOptions = new QPopupMenu( cfgMenu ); 122 QPopupMenu *searchOptions = new QPopupMenu( cfgMenu );
123 123
124 setToolBarsMovable( false ); 124 setToolBarsMovable( false );
125 toolBar->setHorizontalStretchable( true ); 125 toolBar->setHorizontalStretchable( true );
126 menuBar->insertItem( tr( "Search" ), searchMenu ); 126 menuBar->insertItem( tr( "Search" ), searchMenu );
127 menuBar->insertItem( tr( "Settings" ), cfgMenu ); 127 menuBar->insertItem( tr( "Settings" ), cfgMenu );
128 128
129 //SETTINGS MENU 129 //SETTINGS MENU
130 cfgMenu->insertItem( tr( "Search" ), searchOptions ); 130 cfgMenu->insertItem( tr( "Search" ), searchOptions );
131 QPopupMenu *pop; 131 QPopupMenu *pop;
132 for (SearchGroup *s = searches.first(); s != 0; s = searches.next() ){ 132 for (SearchGroup *s = searches.first(); s != 0; s = searches.next() ){
133 pop = s->popupMenu(); 133 pop = s->popupMenu();
134 if (pop){ 134 if (pop){
135 cfgMenu->insertItem( s->text(0), pop ); 135 cfgMenu->insertItem( s->text(0), pop );
136 } 136 }
137 } 137 }
138 138
139 139
140 //SEARCH 140 //SEARCH
141 SearchAllAction = new QAction( tr("Search all"),QString::null, 0, this, 0 ); 141 SearchAllAction = new QAction( tr("Search all"),QString::null, 0, this, 0 );
142 SearchAllAction->setIconSet( Resource::loadIconSet( "find" ) ); 142 SearchAllAction->setIconSet( Resource::loadIconSet( "find" ) );
143 // QWhatsThis::add( SearchAllAction, tr("Search everything...") ); 143 // QWhatsThis::add( SearchAllAction, tr("Search everything...") );
144 connect( SearchAllAction, SIGNAL(activated()), this, SLOT(searchAll()) ); 144 connect( SearchAllAction, SIGNAL(activated()), this, SLOT(searchAll()) );
145 SearchAllAction->addTo( searchMenu ); 145 SearchAllAction->addTo( searchMenu );
146 searchMenu->insertItem( tr( "Options" ), searchOptions ); 146 searchMenu->insertItem( tr( "Options" ), searchOptions );
147 147
148 //SEARCH OPTIONS 148 //SEARCH OPTIONS
149 //actionWholeWordsOnly = new QAction( tr("Whole words only"),QString::null, 0, this, 0, true ); 149 //actionWholeWordsOnly = new QAction( tr("Whole words only"),QString::null, 0, this, 0, true );
150 //actionWholeWordsOnly->addTo( searchOptions ); 150 //actionWholeWordsOnly->addTo( searchOptions );
151 actionCaseSensitiv = new QAction( tr("Case sensitiv"),QString::null, 0, this, 0, true ); 151 actionCaseSensitiv = new QAction( tr("Case sensitiv"),QString::null, 0, this, 0, true );
152 actionCaseSensitiv->addTo( searchOptions ); 152 actionCaseSensitiv->addTo( searchOptions );
153 actionWildcards = new QAction( tr("Use wildcards"),QString::null, 0, this, 0, true ); 153 actionWildcards = new QAction( tr("Use wildcards"),QString::null, 0, this, 0, true );
154 actionWildcards->addTo( searchOptions ); 154 actionWildcards->addTo( searchOptions );
155 155
156 //SEARCH BAR 156 //SEARCH BAR
157 addToolBar( searchBar, "Search", QMainWindow::Top, TRUE ); 157 addToolBar( searchBar, "Search", QMainWindow::Top, TRUE );
158 QLineEdit *searchEdit = new QLineEdit( searchBar, "seachEdit" ); 158 QLineEdit *searchEdit = new QLineEdit( searchBar, "seachEdit" );
159 QWhatsThis::add( searchEdit, tr("Enter your search terms here") ); 159 QWhatsThis::add( searchEdit, tr("Enter your search terms here") );
160 searchEdit->setFocus(); 160 searchEdit->setFocus();
161 searchBar->setHorizontalStretchable( TRUE ); 161 searchBar->setHorizontalStretchable( TRUE );
162 searchBar->setStretchableWidget( searchEdit ); 162 searchBar->setStretchableWidget( searchEdit );
163 SearchAllAction->addTo( searchBar ); 163 SearchAllAction->addTo( searchBar );
164 connect( searchEdit, SIGNAL( textChanged( const QString & ) ), 164 connect( searchEdit, SIGNAL( textChanged( const QString & ) ),
165 this, SLOT( setSearch( const QString & ) ) ); 165 this, SLOT( setSearch( const QString & ) ) );
diff --git a/core/pim/osearch/mainwindow.h b/core/pim/osearch/mainwindow.h
index 75054f0..bdc6c5f 100644
--- a/core/pim/osearch/mainwindow.h
+++ b/core/pim/osearch/mainwindow.h
@@ -1,73 +1,73 @@
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-2003 Patrick S. Vogt <tille@handhelds.org> 10// (c) 2002-2003 Patrick S. Vogt <tille@handhelds.org>
11 11
12#ifndef MAINWINDOW_H 12#ifndef MAINWINDOW_H
13#define MAINWINDOW_H 13#define MAINWINDOW_H
14 14
15#include <qmainwindow.h> 15#include <qmainwindow.h>
16#include <qdialog.h> 16#include <qdialog.h>
17#include <qaction.h> 17#include <qaction.h>
18#include <qlist.h> 18#include <qlist.h>
19 19
20#include <qmap.h> 20#include <qmap.h>
21#include <qtimer.h> 21#include <qtimer.h>
22#include <qpopupmenu.h> 22#include <qpopupmenu.h>
23 23
24class QAction; 24class QAction;
25class QPEToolBar; 25class QToolBar;
26class QHBox; 26class QHBox;
27class QVBoxLayout; 27class QVBoxLayout;
28class QTextView; 28class QTextView;
29class QFrame; 29class QFrame;
30class OListView; 30class OListView;
31class OListViewItem; 31class OListViewItem;
32class QListViewItem; 32class QListViewItem;
33class QPopupMenu; 33class QPopupMenu;
34class QTimer; 34class QTimer;
35 35
36class QSignalMapper; 36class QSignalMapper;
37class QButton; 37class QButton;
38 38
39class SearchGroup; 39class SearchGroup;
40 40
41class MainWindow : public QMainWindow 41class MainWindow : public QMainWindow
42{ 42{
43 Q_OBJECT 43 Q_OBJECT
44 44
45 45
46public: 46public:
47 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); 47 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
48 ~MainWindow(); 48 ~MainWindow();
49 static QString appName() { return QString::fromLatin1("osearch"); } 49 static QString appName() { return QString::fromLatin1("osearch"); }
50 50
51public slots: 51public slots:
52 void setCurrent(QListViewItem*); 52 void setCurrent(QListViewItem*);
53 void setSearch( const QString& ); 53 void setSearch( const QString& );
54 void searchAll(); 54 void searchAll();
55 55
56protected slots: 56protected slots:
57 void slotAction(int); 57 void slotAction(int);
58 void showPopup(); 58 void showPopup();
59 void stopTimer( QListViewItem* ); 59 void stopTimer( QListViewItem* );
60 void searchStringChanged(); 60 void searchStringChanged();
61 void optionChanged(int); 61 void optionChanged(int);
62 62
63private: 63private:
64 QHBox *buttonBox; 64 QHBox *buttonBox;
65 QMap<int, QButton*> buttonMap; 65 QMap<int, QButton*> buttonMap;
66 QSignalMapper* signalMapper; 66 QSignalMapper* signalMapper;
67 OListView *resultsList; 67 OListView *resultsList;
68 QTextView *richEdit; 68 QTextView *richEdit;
69 OListViewItem *_currentItem; 69 OListViewItem *_currentItem;
70 QVBoxLayout *mainLayout; 70 QVBoxLayout *mainLayout;
71 QFrame *detailsFrame; 71 QFrame *detailsFrame;
72 QTimer *popupTimer; 72 QTimer *popupTimer;
73 QTimer *searchTimer; 73 QTimer *searchTimer;
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp
index 7f40645..d06a405 100644
--- a/core/pim/todo/mainwindow.cpp
+++ b/core/pim/todo/mainwindow.cpp
@@ -167,97 +167,97 @@ void MainWindow::initActions() {
167 a->setWhatsThis( QWidget::tr( "Click here to send the current task to another device." ) ); 167 a->setWhatsThis( QWidget::tr( "Click here to send the current task to another device." ) );
168 a->addTo( m_edit ); 168 a->addTo( m_edit );
169 a->addTo( m_tool ); 169 a->addTo( m_tool );
170 } 170 }
171 171
172#if 0 172#if 0
173 // Options menu 173 // Options menu
174 a = new QAction( QWidget::tr("Find"), Resource::loadIconSet( "mag" ), 174 a = new QAction( QWidget::tr("Find"), Resource::loadIconSet( "mag" ),
175 QString::null, 0, this, 0 ); 175 QString::null, 0, this, 0 );
176 connect(a, SIGNAL( activated() ), this, SLOT( slotFind() ) ); 176 connect(a, SIGNAL( activated() ), this, SLOT( slotFind() ) );
177 a->addTo( m_options ); 177 a->addTo( m_options );
178 m_findAction = a; 178 m_findAction = a;
179 179
180 180
181 m_options->insertSeparator(); 181 m_options->insertSeparator();
182#endif 182#endif
183 183
184 m_completedAction = new QAction( QString::null, QWidget::tr("Show completed tasks"), 184 m_completedAction = new QAction( QString::null, QWidget::tr("Show completed tasks"),
185 0, this, 0, TRUE ); 185 0, this, 0, TRUE );
186 m_completedAction->addTo( m_options ); 186 m_completedAction->addTo( m_options );
187 m_completedAction->setOn( showCompleted() ); 187 m_completedAction->setOn( showCompleted() );
188 connect(m_completedAction, SIGNAL( toggled(bool) ), this, SLOT(slotShowCompleted(bool) ) ); 188 connect(m_completedAction, SIGNAL( toggled(bool) ), this, SLOT(slotShowCompleted(bool) ) );
189 189
190 a = new QAction( QString::null, QWidget::tr("Show only over-due tasks"), 190 a = new QAction( QString::null, QWidget::tr("Show only over-due tasks"),
191 0, this, 0, TRUE ); 191 0, this, 0, TRUE );
192 a->addTo( m_options ); 192 a->addTo( m_options );
193 a->setOn( showOverDue() ); 193 a->setOn( showOverDue() );
194 connect(a, SIGNAL(toggled(bool)), this, SLOT(slotShowDue(bool) ) ); 194 connect(a, SIGNAL(toggled(bool)), this, SLOT(slotShowDue(bool) ) );
195 195
196 m_showDeadLineAction = new QAction( QString::null, QWidget::tr("Show task deadlines"), 196 m_showDeadLineAction = new QAction( QString::null, QWidget::tr("Show task deadlines"),
197 0, this, 0, TRUE ); 197 0, this, 0, TRUE );
198 m_showDeadLineAction->addTo( m_options ); 198 m_showDeadLineAction->addTo( m_options );
199 m_showDeadLineAction->setOn( showDeadline() ); 199 m_showDeadLineAction->setOn( showDeadline() );
200 connect(m_showDeadLineAction, SIGNAL(toggled(bool) ), this, SLOT( slotShowDeadLine( bool ) ) ); 200 connect(m_showDeadLineAction, SIGNAL(toggled(bool) ), this, SLOT( slotShowDeadLine( bool ) ) );
201 201
202 m_showQuickTaskAction = new QAction( QString::null, QWidget::tr("Show quick task bar"), 202 m_showQuickTaskAction = new QAction( QString::null, QWidget::tr("Show quick task bar"),
203 0, this, 0, TRUE ); 203 0, this, 0, TRUE );
204 m_showQuickTaskAction->addTo( m_options ); 204 m_showQuickTaskAction->addTo( m_options );
205 m_showQuickTaskAction->setOn( showQuickTask() ); 205 m_showQuickTaskAction->setOn( showQuickTask() );
206 connect(m_showQuickTaskAction, SIGNAL( toggled(bool) ), this, SLOT(slotShowQuickTask(bool) ) ); 206 connect(m_showQuickTaskAction, SIGNAL( toggled(bool) ), this, SLOT(slotShowQuickTask(bool) ) );
207 207
208 m_options->insertSeparator(); 208 m_options->insertSeparator();
209 209
210 m_bar->insertItem( QWidget::tr("Data") ,m_edit ); 210 m_bar->insertItem( QWidget::tr("Data") ,m_edit );
211 m_bar->insertItem( QWidget::tr("Category"), m_catMenu ); 211 m_bar->insertItem( QWidget::tr("Category"), m_catMenu );
212 m_bar->insertItem( QWidget::tr("Options"), m_options ); 212 m_bar->insertItem( QWidget::tr("Options"), m_options );
213 213
214 m_curQuick = new QuickEditImpl( this, m_quicktask ); 214 m_curQuick = new QuickEditImpl( this, m_quicktask );
215 addToolBar( (QPEToolBar *)m_curQuick->widget(), QWidget::tr( "QuickEdit" ), QMainWindow::Top, TRUE ); 215 addToolBar( (QToolBar *)m_curQuick->widget(), QWidget::tr( "QuickEdit" ), QMainWindow::Top, TRUE );
216 m_curQuick->signal()->connect( this, SLOT(slotQuickEntered() ) ); 216 m_curQuick->signal()->connect( this, SLOT(slotQuickEntered() ) );
217 217
218} 218}
219/* m_curCat from Config */ 219/* m_curCat from Config */
220void MainWindow::initConfig() { 220void MainWindow::initConfig() {
221 Config config( "todo" ); 221 Config config( "todo" );
222 config.setGroup( "View" ); 222 config.setGroup( "View" );
223 m_completed = config.readBoolEntry( "ShowComplete", TRUE ); 223 m_completed = config.readBoolEntry( "ShowComplete", TRUE );
224 m_curCat = config.readEntry( "Category", QString::null ); 224 m_curCat = config.readEntry( "Category", QString::null );
225 m_deadline = config.readBoolEntry( "ShowDeadLine", TRUE); 225 m_deadline = config.readBoolEntry( "ShowDeadLine", TRUE);
226 m_overdue = config.readBoolEntry("ShowOverDue", FALSE ); 226 m_overdue = config.readBoolEntry("ShowOverDue", FALSE );
227 m_quicktask = config.readBoolEntry("ShowQuickTask", TRUE); 227 m_quicktask = config.readBoolEntry("ShowQuickTask", TRUE);
228} 228}
229void MainWindow::initUI() { 229void MainWindow::initUI() {
230 230
231 m_stack = new OWidgetStack(this, "main stack"); 231 m_stack = new OWidgetStack(this, "main stack");
232 232
233 setCentralWidget( m_stack ); 233 setCentralWidget( m_stack );
234 234
235 setToolBarsMovable( FALSE ); 235 setToolBarsMovable( FALSE );
236 236
237 QToolBar *menubarholder = new QToolBar( this ); 237 QToolBar *menubarholder = new QToolBar( this );
238 menubarholder->setHorizontalStretchable( TRUE ); 238 menubarholder->setHorizontalStretchable( TRUE );
239 m_bar = new QMenuBar( menubarholder ); 239 m_bar = new QMenuBar( menubarholder );
240 240
241 m_tool = new QToolBar( this ); 241 m_tool = new QToolBar( this );
242 242
243 /** QPopupMenu */ 243 /** QPopupMenu */
244 m_edit = new QPopupMenu( this ); 244 m_edit = new QPopupMenu( this );
245 m_options = new QPopupMenu( this ); 245 m_options = new QPopupMenu( this );
246 m_catMenu = new QPopupMenu( this ); 246 m_catMenu = new QPopupMenu( this );
247 m_template = new QPopupMenu( this ); 247 m_template = new QPopupMenu( this );
248 248
249 m_catMenu->setCheckable( TRUE ); 249 m_catMenu->setCheckable( TRUE );
250 m_template->setCheckable( TRUE ); 250 m_template->setCheckable( TRUE );
251 251
252 connect(m_catMenu, SIGNAL(activated(int) ), 252 connect(m_catMenu, SIGNAL(activated(int) ),
253 this, SLOT(setCategory(int) ) ); 253 this, SLOT(setCategory(int) ) );
254 connect(m_template, SIGNAL(activated(int) ), 254 connect(m_template, SIGNAL(activated(int) ),
255 this, SLOT(slotNewFromTemplate(int) ) ); 255 this, SLOT(slotNewFromTemplate(int) ) );
256} 256}
257void MainWindow::initViews() { 257void MainWindow::initViews() {
258 258
259 TableView* tableView = new TableView( this, m_stack ); 259 TableView* tableView = new TableView( this, m_stack );
260 QWhatsThis::add( tableView, QWidget::tr( "This is a listing of all current tasks.\n\nThe list displays the following information:\n1. Completed - A green checkmark indicates task is completed. Click here to complete a task.\n2. Priority - a graphical representation of task priority. Double-click here to modify.\n3. Description - description of task. Click here to select the task.\n4. Deadline - shows when task is due. This column can be shown or hidden by selecting Options->'Show task deadlines' from the menu above." ) ); 260 QWhatsThis::add( tableView, QWidget::tr( "This is a listing of all current tasks.\n\nThe list displays the following information:\n1. Completed - A green checkmark indicates task is completed. Click here to complete a task.\n2. Priority - a graphical representation of task priority. Double-click here to modify.\n3. Description - description of task. Click here to select the task.\n4. Deadline - shows when task is due. This column can be shown or hidden by selecting Options->'Show task deadlines' from the menu above." ) );
261 m_stack->addWidget( tableView, m_counter++ ); 261 m_stack->addWidget( tableView, m_counter++ );
262 m_views.append( tableView ); 262 m_views.append( tableView );
263 m_curView = tableView; 263 m_curView = tableView;
diff --git a/core/pim/todo/quickeditimpl.cpp b/core/pim/todo/quickeditimpl.cpp
index 70e0582..1863ef4 100644
--- a/core/pim/todo/quickeditimpl.cpp
+++ b/core/pim/todo/quickeditimpl.cpp
@@ -1,62 +1,62 @@
1#include <qaction.h> 1#include <qaction.h>
2#include <qlineedit.h> 2#include <qlineedit.h>
3#include <qwhatsthis.h> 3#include <qwhatsthis.h>
4 4
5#include <qpe/resource.h> 5#include <qpe/resource.h>
6 6
7#include <opie/oclickablelabel.h> 7#include <opie/oclickablelabel.h>
8 8
9#include "mainwindow.h" 9#include "mainwindow.h"
10#include "quickeditimpl.h" 10#include "quickeditimpl.h"
11 11
12 12
13QuickEditImpl::QuickEditImpl( QWidget* parent, bool visible ) 13QuickEditImpl::QuickEditImpl( QWidget* parent, bool visible )
14 : QPEToolBar( (QMainWindow *)parent ), Todo::QuickEdit( (Todo::MainWindow *)parent ) { 14 : QToolBar( (QMainWindow *)parent ), Todo::QuickEdit( (Todo::MainWindow *)parent ) {
15 setHorizontalStretchable( TRUE ); 15 setHorizontalStretchable( TRUE );
16 16
17 // Load priority icons 17 // Load priority icons
18 // TODO - probably should be done globally somewhere else, 18 // TODO - probably should be done globally somewhere else,
19 // see also tableview.cpp/h, taskeditoroverview.cpp/h 19 // see also tableview.cpp/h, taskeditoroverview.cpp/h
20 priority1 = Resource::loadPixmap( "todo/priority1" ); 20 priority1 = Resource::loadPixmap( "todo/priority1" );
21 priority3 = Resource::loadPixmap( "todo/priority3" ); 21 priority3 = Resource::loadPixmap( "todo/priority3" );
22 priority5 = Resource::loadPixmap( "todo/priority5" ); 22 priority5 = Resource::loadPixmap( "todo/priority5" );
23 23
24 m_lbl = new OClickableLabel( this ); 24 m_lbl = new OClickableLabel( this );
25 m_lbl->setMinimumWidth( 15 ); 25 m_lbl->setMinimumWidth( 15 );
26 m_lbl->setPixmap( priority3 ); 26 m_lbl->setPixmap( priority3 );
27 connect(m_lbl, SIGNAL(clicked() ), this, SLOT(slotPrio()) ); 27 connect(m_lbl, SIGNAL(clicked() ), this, SLOT(slotPrio()) );
28 QWhatsThis::add( m_lbl, QWidget::tr( "Click here to set the priority of new task.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); 28 QWhatsThis::add( m_lbl, QWidget::tr( "Click here to set the priority of new task.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) );
29 29
30 m_edit = new QLineEdit( this ); 30 m_edit = new QLineEdit( this );
31 setStretchableWidget( m_edit ); 31 setStretchableWidget( m_edit );
32 QWhatsThis::add( m_edit, QWidget::tr( "Enter description of new task here.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); 32 QWhatsThis::add( m_edit, QWidget::tr( "Enter description of new task here.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) );
33 33
34 /* 34 /*
35 * it's not implemented and won't be implemented for 1.0 35 * it's not implemented and won't be implemented for 1.0
36 */ 36 */
37#if 0 37#if 0
38 QAction *a = new QAction( QWidget::tr( "More" ), Resource::loadPixmap( "todo/more" ), QString::null, 0, this, 0 ); 38 QAction *a = new QAction( QWidget::tr( "More" ), Resource::loadPixmap( "todo/more" ), QString::null, 0, this, 0 );
39 connect( a, SIGNAL( activated() ), this, SLOT( slotMore() ) ); 39 connect( a, SIGNAL( activated() ), this, SLOT( slotMore() ) );
40 a->addTo( this ); 40 a->addTo( this );
41 a->setWhatsThis( QWidget::tr( "Click here to enter additional information for new task.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); 41 a->setWhatsThis( QWidget::tr( "Click here to enter additional information for new task.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) );
42#endif 42#endif
43 43
44 QAction *a = new QAction( QWidget::tr( "Enter" ), Resource::loadPixmap( "enter" ), QString::null, 0, this, 0 ); 44 QAction *a = new QAction( QWidget::tr( "Enter" ), Resource::loadPixmap( "enter" ), QString::null, 0, this, 0 );
45 connect( a, SIGNAL( activated() ), this, SLOT( slotEnter() ) ); 45 connect( a, SIGNAL( activated() ), this, SLOT( slotEnter() ) );
46 a->addTo( this ); 46 a->addTo( this );
47 a->setWhatsThis( QWidget::tr( "Click here to add new task.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); 47 a->setWhatsThis( QWidget::tr( "Click here to add new task.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) );
48 48
49 a = new QAction( QWidget::tr( "Cancel" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 49 a = new QAction( QWidget::tr( "Cancel" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
50 connect( a, SIGNAL( activated() ), this, SLOT( slotCancel() ) ); 50 connect( a, SIGNAL( activated() ), this, SLOT( slotCancel() ) );
51 a->addTo( this ); 51 a->addTo( this );
52 a->setWhatsThis( QWidget::tr( "Click here to reset new task information.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); 52 a->setWhatsThis( QWidget::tr( "Click here to reset new task information.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) );
53 53
54 m_visible = visible; 54 m_visible = visible;
55 if ( !m_visible ) { 55 if ( !m_visible ) {
56 hide(); 56 hide();
57 } 57 }
58 58
59 m_menu = 0l; 59 m_menu = 0l;
60 reinit(); 60 reinit();
61} 61}
62QuickEditImpl::~QuickEditImpl() { 62QuickEditImpl::~QuickEditImpl() {
diff --git a/core/pim/todo/quickeditimpl.h b/core/pim/todo/quickeditimpl.h
index 1253f3d..89b94f8 100644
--- a/core/pim/todo/quickeditimpl.h
+++ b/core/pim/todo/quickeditimpl.h
@@ -1,41 +1,41 @@
1#ifndef OPIE_QUICK_EDIT_IMPL_H 1#ifndef OPIE_QUICK_EDIT_IMPL_H
2#define OPIE_QUICK_EDIT_IMPL_H 2#define OPIE_QUICK_EDIT_IMPL_H
3 3
4#include <qpixmap.h> 4#include <qpixmap.h>
5 5
6#include <qpe/qpetoolbar.h> 6#include <qtoolbar.h>
7 7
8#include "quickedit.h" 8#include "quickedit.h"
9 9
10class QLineEdit; 10class QLineEdit;
11class QLabel; 11class QLabel;
12 12
13class QuickEditImpl : public QPEToolBar, public Todo::QuickEdit { 13class QuickEditImpl : public QToolBar, public Todo::QuickEdit {
14 Q_OBJECT 14 Q_OBJECT
15public: 15public:
16 QuickEditImpl( QWidget* parent, bool visible); 16 QuickEditImpl( QWidget* parent, bool visible);
17 ~QuickEditImpl(); 17 ~QuickEditImpl();
18 OTodo todo()const; 18 OTodo todo()const;
19 QWidget* widget(); 19 QWidget* widget();
20private slots: 20private slots:
21 void slotEnter(); 21 void slotEnter();
22 void slotPrio(); 22 void slotPrio();
23 void slotMore(); 23 void slotMore();
24 void slotCancel(); 24 void slotCancel();
25private: 25private:
26 void reinit(); 26 void reinit();
27 int m_state; 27 int m_state;
28 QLabel* m_lbl; 28 QLabel* m_lbl;
29 QLineEdit* m_edit; 29 QLineEdit* m_edit;
30 QLabel* m_enter; 30 QLabel* m_enter;
31 QLabel* m_more; 31 QLabel* m_more;
32 QPopupMenu* m_menu; 32 QPopupMenu* m_menu;
33 OTodo m_todo; 33 OTodo m_todo;
34 bool m_visible; 34 bool m_visible;
35 35
36 QPixmap priority1; 36 QPixmap priority1;
37 QPixmap priority3; 37 QPixmap priority3;
38 QPixmap priority5; 38 QPixmap priority5;
39}; 39};
40 40
41#endif 41#endif
diff --git a/noncore/apps/checkbook/mainwindow.cpp b/noncore/apps/checkbook/mainwindow.cpp
index 25f9910..9fc2125 100644
--- a/noncore/apps/checkbook/mainwindow.cpp
+++ b/noncore/apps/checkbook/mainwindow.cpp
@@ -1,121 +1,121 @@
1/* 1/*
2                This file is part of the OPIE Project 2                This file is part of the OPIE Project
3 =. 3 =.
4             .=l. Copyright (c) 2002 Dan Williams <drw@handhelds.org> 4             .=l. Copyright (c) 2002 Dan Williams <drw@handhelds.org>
5           .>+-= 5           .>+-=
6 _;:,     .>    :=|. This file is free software; you can 6 _;:,     .>    :=|. This file is free software; you can
7.> <`_,   >  .   <= redistribute it and/or modify it under 7.> <`_,   >  .   <= redistribute it and/or modify it under
8:`=1 )Y*s>-.--   : the terms of the GNU General Public 8:`=1 )Y*s>-.--   : the terms of the GNU General Public
9.="- .-=="i,     .._ License as published by the Free Software 9.="- .-=="i,     .._ License as published by the Free Software
10 - .   .-<_>     .<> Foundation; either version 2 of the License, 10 - .   .-<_>     .<> Foundation; either version 2 of the License,
11     ._= =}       : or (at your option) any later version. 11     ._= =}       : or (at your option) any later version.
12    .%`+i>       _;_. 12    .%`+i>       _;_.
13    .i_,=:_.      -<s. This file is distributed in the hope that 13    .i_,=:_.      -<s. This file is distributed in the hope that
14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15    : ..    .:,     . . . without even the implied warranty of 15    : ..    .:,     . . . without even the implied warranty of
16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
18..}^=.=       =       ; Public License for more details. 18..}^=.=       =       ; Public License for more details.
19++=   -.     .`     .: 19++=   -.     .`     .:
20 :     =  ...= . :.=- You should have received a copy of the GNU 20 :     =  ...= . :.=- You should have received a copy of the GNU
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 <qmenubar.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 QToolBar *bar = new QToolBar( this );
68 bar->setHorizontalStretchable( TRUE ); 68 bar->setHorizontalStretchable( TRUE );
69 QMenuBar *mb = new QMenuBar( 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 QToolBar( 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;
118 filename.append( (*it) ); 118 filename.append( (*it) );
119 119
120 cb = new CBInfo( (*it).remove( (*it).find('.'), (*it).length() ), filename ); 120 cb = new CBInfo( (*it).remove( (*it).find('.'), (*it).length() ), filename );
121 checkbooks->inSort( cb ); 121 checkbooks->inSort( cb );
diff --git a/noncore/apps/confedit/mainwindow.h b/noncore/apps/confedit/mainwindow.h
index 96331db..23aca52 100644
--- a/noncore/apps/confedit/mainwindow.h
+++ b/noncore/apps/confedit/mainwindow.h
@@ -1,68 +1,68 @@
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#ifndef MAINWINDOW_H 12#ifndef MAINWINDOW_H
13#define MAINWINDOW_H 13#define MAINWINDOW_H
14 14
15#include <qmainwindow.h> 15#include <qmainwindow.h>
16#include <qdialog.h> 16#include <qdialog.h>
17#include <qaction.h> 17#include <qaction.h>
18#include <qtimer.h> 18#include <qtimer.h>
19#include <qpopupmenu.h> 19#include <qpopupmenu.h>
20#include "editwidget.h" 20#include "editwidget.h"
21 21
22class QPEToolBar; 22class QToolBar;
23class ListViewItemConfFile; 23class ListViewItemConfFile;
24class ListViewConfDir; 24class ListViewConfDir;
25class ListViewItemConf; 25class ListViewItemConf;
26 26
27class MainWindow : public QMainWindow 27class MainWindow : public QMainWindow
28{ 28{
29 Q_OBJECT 29 Q_OBJECT
30 30
31 31
32public: 32public:
33 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); 33 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
34 ~MainWindow(); 34 ~MainWindow();
35 static QString appName() { return QString::fromLatin1("confedit"); } 35 static QString appName() { return QString::fromLatin1("confedit"); }
36 36
37public slots: 37public slots:
38 void setCurrent(QListViewItem*); 38 void setCurrent(QListViewItem*);
39 void groupChanged(const QString&); 39 void groupChanged(const QString&);
40 void keyChanged(const QString&); 40 void keyChanged(const QString&);
41 void valueChanged(const QString&); 41 void valueChanged(const QString&);
42 void showPopup(); 42 void showPopup();
43 void stopTimer( QListViewItem* ); 43 void stopTimer( QListViewItem* );
44 void saveConfFile(); 44 void saveConfFile();
45 void revertConfFile(); 45 void revertConfFile();
46 void removeConfFile(); 46 void removeConfFile();
47 47
48private: 48private:
49 ListViewConfDir *settingList; 49 ListViewConfDir *settingList;
50 EditWidget *editor; 50 EditWidget *editor;
51 QVBoxLayout *mainLayout; 51 QVBoxLayout *mainLayout;
52 ListViewItemConf *_item; 52 ListViewItemConf *_item;
53 ListViewItemConfigEntry *_currentItem; 53 ListViewItemConfigEntry *_currentItem;
54 ListViewItemConfFile *_fileItem; 54 ListViewItemConfFile *_fileItem;
55 QTimer *popupTimer; 55 QTimer *popupTimer;
56 QPopupMenu *popupMenuFile; 56 QPopupMenu *popupMenuFile;
57 QPopupMenu *popupMenuEntry; 57 QPopupMenu *popupMenuEntry;
58 QAction *popupActionSave; 58 QAction *popupActionSave;
59 QAction *popupActionRevert; 59 QAction *popupActionRevert;
60 QAction *popupActionDelete; 60 QAction *popupActionDelete;
61 QAction *popupActionNew; 61 QAction *popupActionNew;
62 //QAction *popupAction; 62 //QAction *popupAction;
63 //QAction *popupAction; 63 //QAction *popupAction;
64 64
65 void makeMenu(); 65 void makeMenu();
66}; 66};
67 67
68#endif 68#endif
diff --git a/noncore/apps/opie-bartender/bartender.cpp b/noncore/apps/opie-bartender/bartender.cpp
index 3a0d8d1..8c4ee93 100644
--- a/noncore/apps/opie-bartender/bartender.cpp
+++ b/noncore/apps/opie-bartender/bartender.cpp
@@ -1,114 +1,114 @@
1/**************************************************************************** 1/****************************************************************************
2** 2**
3** Created: Sat Jul 20 08:10:53 2002 3** Created: Sat Jul 20 08:10:53 2002
4** by: L.J. Potter <ljp@llornkcor.com> 4** by: L.J. Potter <ljp@llornkcor.com>
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 12
13#include "bartender.h" 13#include "bartender.h"
14#include "newdrinks.h" 14#include "newdrinks.h"
15#include "showdrinks.h" 15#include "showdrinks.h"
16#include "inputDialog.h" 16#include "inputDialog.h"
17#include "searchresults.h" 17#include "searchresults.h"
18#include "bac.h" 18#include "bac.h"
19 19
20#include <qpe/qpetoolbar.h> 20#include <qpe/qpetoolbar.h>
21#include <qpe/qpemenubar.h> 21#include <qmenubar.h>
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 QToolBar( 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 QMenuBar *menuBar = new QMenuBar( 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);
diff --git a/noncore/apps/opie-bartender/bartender.h b/noncore/apps/opie-bartender/bartender.h
index 69cfa82..df1af76 100644
--- a/noncore/apps/opie-bartender/bartender.h
+++ b/noncore/apps/opie-bartender/bartender.h
@@ -1,63 +1,63 @@
1/**************************************************************************** 1/****************************************************************************
2** Created: Sat Jul 20 08:10:31 2002 2** Created: Sat Jul 20 08:10:31 2002
3** by: L.J. Potter <ljp@llornkcor.com> 3** by: L.J. Potter <ljp@llornkcor.com>
4** copyright : (C) 2002 by ljp 4** copyright : (C) 2002 by ljp
5 email : ljp@llornkcor.com 5 email : ljp@llornkcor.com
6 * This program is free software; you can redistribute it and/or modify * 6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by * 7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 2 of the License, or * 8 * the Free Software Foundation; either version 2 of the License, or *
9 * (at your option) any later version. * 9 * (at your option) any later version. *
10 ***************************************************************************/ 10 ***************************************************************************/
11#ifndef BARTENDER_H 11#ifndef BARTENDER_H
12#define BARTENDER_H 12#define BARTENDER_H
13#include "newdrinks.h" 13#include "newdrinks.h"
14 14
15#include <qvariant.h> 15#include <qvariant.h>
16#include <qwidget.h> 16#include <qwidget.h>
17#include <qmainwindow.h> 17#include <qmainwindow.h>
18#include <qfile.h> 18#include <qfile.h>
19 19
20class QVBoxLayout; 20class QVBoxLayout;
21class QHBoxLayout; 21class QHBoxLayout;
22class QGridLayout; 22class QGridLayout;
23class QListView; 23class QListView;
24class QListViewItem; 24class QListViewItem;
25class QPEToolBar; 25class QToolBar;
26 26
27class Bartender : public QMainWindow 27class Bartender : public QMainWindow
28{ 28{
29 Q_OBJECT 29 Q_OBJECT
30 30
31public: 31public:
32 Bartender( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 32 Bartender( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
33 ~Bartender(); 33 ~Bartender();
34 34
35 QPEToolBar* ToolBar1; 35 QToolBar* ToolBar1;
36 QListView* DrinkView; 36 QListView* DrinkView;
37 QFile dbFile; 37 QFile dbFile;
38public slots: 38public slots:
39 void doEdit(); 39 void doEdit();
40 40
41protected: 41protected:
42 42
43protected slots: 43protected slots:
44 void fileMenuActivated(int); 44 void fileMenuActivated(int);
45 void editMenuActivated(int); 45 void editMenuActivated(int);
46 void cleanUp(); 46 void cleanUp();
47 void fileNew(); 47 void fileNew();
48 void showDrink( QListViewItem *); 48 void showDrink( QListViewItem *);
49 void showDrink(int, QListViewItem *, const QPoint&, int); 49 void showDrink(int, QListViewItem *, const QPoint&, int);
50 void initDrinkDb(); 50 void initDrinkDb();
51 void doSearchByName(); 51 void doSearchByName();
52 void doSearchByDrink(); 52 void doSearchByDrink();
53 void showSearchResult(QStringList &); 53 void showSearchResult(QStringList &);
54 void doBac(); 54 void doBac();
55 void openCurrentDrink(); 55 void openCurrentDrink();
56 void askSearch(); 56 void askSearch();
57private: 57private:
58 void clearList(); 58 void clearList();
59 void fillList(); 59 void fillList();
60 60
61}; 61};
62 62
63#endif // BARTENDER_H 63#endif // BARTENDER_H
diff --git a/noncore/apps/opie-reader/QTReaderApp.cpp b/noncore/apps/opie-reader/QTReaderApp.cpp
index 8c0d138..f10020a 100644
--- a/noncore/apps/opie-reader/QTReaderApp.cpp
+++ b/noncore/apps/opie-reader/QTReaderApp.cpp
@@ -1,73 +1,73 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. Allrights reserved. 2** Copyright (C) 2000 Trolltech AS. Allrights 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#include "useqpe.h" 20#include "useqpe.h"
21#include <qregexp.h> 21#include <qregexp.h>
22#include <qclipboard.h> 22#include <qclipboard.h>
23#include <qwidgetstack.h> 23#include <qwidgetstack.h>
24#ifdef USEQPE 24#ifdef USEQPE
25#include <qpe/qpemenubar.h> 25#include <qmenubar.h>
26#include <qpe/qpetoolbar.h> 26#include <qpe/qpetoolbar.h>
27#endif 27#endif
28#include <qmenubar.h> 28#include <qmenubar.h>
29#include <qtoolbar.h> 29#include <qtoolbar.h>
30#ifdef USEQPE 30#ifdef USEQPE
31#include <qpe/menubutton.h> 31#include <qpe/menubutton.h>
32#include <qpe/fontdatabase.h> 32#include <qpe/fontdatabase.h>
33#endif 33#endif
34#include <qcombobox.h> 34#include <qcombobox.h>
35#include <qpopupmenu.h> 35#include <qpopupmenu.h>
36#include <qaction.h> 36#include <qaction.h>
37#include <qapplication.h> 37#include <qapplication.h>
38#include <qlineedit.h> 38#include <qlineedit.h>
39#include <qtoolbutton.h> 39#include <qtoolbutton.h>
40#include <qspinbox.h> 40#include <qspinbox.h>
41#include <qobjectlist.h> 41#include <qobjectlist.h>
42#ifdef USEQPE 42#ifdef USEQPE
43#include <qpe/global.h> 43#include <qpe/global.h>
44#include <qpe/applnk.h> 44#include <qpe/applnk.h>
45#endif 45#endif
46#include <qfileinfo.h> 46#include <qfileinfo.h>
47#include <stdlib.h> //getenv 47#include <stdlib.h> //getenv
48#include <qprogressbar.h> 48#include <qprogressbar.h>
49#ifdef USEQPE 49#ifdef USEQPE
50#include <qpe/config.h> 50#include <qpe/config.h>
51#endif 51#endif
52#include <qbuttongroup.h> 52#include <qbuttongroup.h>
53#include <qradiobutton.h> 53#include <qradiobutton.h>
54#ifdef USEQPE 54#ifdef USEQPE
55#include <qpe/qcopenvelope_qws.h> 55#include <qpe/qcopenvelope_qws.h>
56#endif 56#endif
57#include "QTReader.h" 57#include "QTReader.h"
58#include "GraphicWin.h" 58#include "GraphicWin.h"
59#include "Bkmks.h" 59#include "Bkmks.h"
60#include "cbkmkselector.h" 60#include "cbkmkselector.h"
61#include "infowin.h" 61#include "infowin.h"
62#include "ToolbarPrefs.h" 62#include "ToolbarPrefs.h"
63#include "Prefs.h" 63#include "Prefs.h"
64#include "CAnnoEdit.h" 64#include "CAnnoEdit.h"
65#include "QFloatBar.h" 65#include "QFloatBar.h"
66#include "FixedFont.h" 66#include "FixedFont.h"
67#include "URLDialog.h" 67#include "URLDialog.h"
68//#include <qpe/fontdatabase.h> 68//#include <qpe/fontdatabase.h>
69 69
70#ifdef USEQPE 70#ifdef USEQPE
71#include <qpe/resource.h> 71#include <qpe/resource.h>
72#include <qpe/qpeapplication.h> 72#include <qpe/qpeapplication.h>
73#include "fileBrowser.h" 73#include "fileBrowser.h"
@@ -209,98 +209,98 @@ void QTReaderApp::hidetoolbars()
209 209
210QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) 210QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
211 : QMainWindow( parent, name, f ), bFromDocView( FALSE ), m_dontSave(false), 211 : QMainWindow( parent, name, f ), bFromDocView( FALSE ), m_dontSave(false),
212 fileBar(NULL), navBar(NULL), viewBar(NULL), markBar(NULL) 212 fileBar(NULL), navBar(NULL), viewBar(NULL), markBar(NULL)
213{ 213{
214 m_url_clipboard = false; 214 m_url_clipboard = false;
215 m_url_localfile = false; 215 m_url_localfile = false;
216 m_url_globalfile = false; 216 m_url_globalfile = false;
217 ftime(&m_lastkeytime); 217 ftime(&m_lastkeytime);
218//// qDebug("Application directory = %s", (const tchar *)QPEApplication::documentDir()); 218//// qDebug("Application directory = %s", (const tchar *)QPEApplication::documentDir());
219//// qDebug("Application directory = %s", (const tchar *)Global::applicationFileName("uqtreader","bkmks.xml")); 219//// qDebug("Application directory = %s", (const tchar *)Global::applicationFileName("uqtreader","bkmks.xml"));
220 220
221 m_bcloseDisabled = true; 221 m_bcloseDisabled = true;
222 m_disableesckey = false; 222 m_disableesckey = false;
223 pBkmklist = NULL; 223 pBkmklist = NULL;
224 pOpenlist = NULL; 224 pOpenlist = NULL;
225// doc = 0; 225// doc = 0;
226 226
227 m_fBkmksChanged = false; 227 m_fBkmksChanged = false;
228 228
229 QString lang = getenv( "LANG" ); 229 QString lang = getenv( "LANG" );
230 QString rot = getenv( "QWS_DISPLAY" ); 230 QString rot = getenv( "QWS_DISPLAY" );
231 231
232/* 232/*
233 int m_rot = 0; 233 int m_rot = 0;
234 if (rot.contains("Rot90")) 234 if (rot.contains("Rot90"))
235 { 235 {
236 m_rot = 90; 236 m_rot = 90;
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// QToolBar *bar = new QToolBar( this );
258// menubar = new QPEToolBar( this ); 258// menubar = new QToolBar( 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 QMenuBar( 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 );
diff --git a/noncore/apps/opie-reader/QTReaderApp.h b/noncore/apps/opie-reader/QTReaderApp.h
index 86c14b1..ab6f60e 100644
--- a/noncore/apps/opie-reader/QTReaderApp.h
+++ b/noncore/apps/opie-reader/QTReaderApp.h
@@ -1,95 +1,95 @@
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 QToolBar;
48class QMenuBar; 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{
@@ -335,97 +335,97 @@ private slots:
335 void addnavbar(Config* _config, const QString& key, QAction* a); 335 void addnavbar(Config* _config, const QString& key, QAction* a);
336 void addmarkbar(Config* _config, const QString& key, QAction* a); 336 void addmarkbar(Config* _config, const QString& key, QAction* a);
337 bool checkbar(Config* _config, const QString& key); 337 bool checkbar(Config* _config, const QString& key);
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// QToolBar /* *menu,*/ *fileBar;
384 QToolBar *menubar, *fileBar, *navBar, *viewBar, *markBar; 384 QToolBar *menubar, *fileBar, *navBar, *viewBar, *markBar;
385#ifdef USEQPE 385#ifdef USEQPE
386 QMenuBar *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;
diff --git a/noncore/apps/opie-sheet/mainwindow.cpp b/noncore/apps/opie-sheet/mainwindow.cpp
index fb2ca79..78b3073 100644
--- a/noncore/apps/opie-sheet/mainwindow.cpp
+++ b/noncore/apps/opie-sheet/mainwindow.cpp
@@ -418,134 +418,134 @@ void MainWindow::initMenu()
418 submenuSheet=new QPopupMenu; 418 submenuSheet=new QPopupMenu;
419 sheetRename->addTo(submenuSheet); 419 sheetRename->addTo(submenuSheet);
420 sheetRemove->addTo(submenuSheet); 420 sheetRemove->addTo(submenuSheet);
421 menuFormat->insertItem(tr("&Sheet"), submenuSheet); 421 menuFormat->insertItem(tr("&Sheet"), submenuSheet);
422 422
423 submenuFunc=new QPopupMenu; 423 submenuFunc=new QPopupMenu;
424 menuInsert->insertItem(tr("&Function"), submenuFunc); 424 menuInsert->insertItem(tr("&Function"), submenuFunc);
425 425
426 submenuFuncStd=new QPopupMenu; 426 submenuFuncStd=new QPopupMenu;
427 funcPlus->addTo(submenuFuncStd); 427 funcPlus->addTo(submenuFuncStd);
428 funcMinus->addTo(submenuFuncStd); 428 funcMinus->addTo(submenuFuncStd);
429 funcCross->addTo(submenuFuncStd); 429 funcCross->addTo(submenuFuncStd);
430 funcDivide->addTo(submenuFuncStd); 430 funcDivide->addTo(submenuFuncStd);
431 submenuFunc->insertItem(tr("&Standard"), submenuFuncStd); 431 submenuFunc->insertItem(tr("&Standard"), submenuFuncStd);
432 432
433 submenuFuncMath=new QPopupMenu; 433 submenuFuncMath=new QPopupMenu;
434 addFlyAction(tr("Summation"), tr("&Summation"), "SUM(", submenuFuncMath); 434 addFlyAction(tr("Summation"), tr("&Summation"), "SUM(", submenuFuncMath);
435 addFlyAction(tr("Absolute Value"), tr("&Absolute"), "ABS(", submenuFuncMath); 435 addFlyAction(tr("Absolute Value"), tr("&Absolute"), "ABS(", submenuFuncMath);
436 submenuFuncMath->insertSeparator(); 436 submenuFuncMath->insertSeparator();
437 addFlyAction(tr("Sine"), tr("Si&ne"), "SIN(", submenuFuncMath); 437 addFlyAction(tr("Sine"), tr("Si&ne"), "SIN(", submenuFuncMath);
438 addFlyAction(tr("Arc Sine"), tr("A&rc Sine"), "ASIN(", submenuFuncMath); 438 addFlyAction(tr("Arc Sine"), tr("A&rc Sine"), "ASIN(", submenuFuncMath);
439 addFlyAction(tr("Cosine"), tr("&Cosine"), "COS(", submenuFuncMath); 439 addFlyAction(tr("Cosine"), tr("&Cosine"), "COS(", submenuFuncMath);
440 addFlyAction(tr("ArcCosine"), tr("Arc Cos&ine"), "COS(", submenuFuncMath); 440 addFlyAction(tr("ArcCosine"), tr("Arc Cos&ine"), "COS(", submenuFuncMath);
441 addFlyAction(tr("Tangent"), tr("&Tangent"), "TAN(", submenuFuncMath); 441 addFlyAction(tr("Tangent"), tr("&Tangent"), "TAN(", submenuFuncMath);
442 addFlyAction(tr("Arc Tangent"), tr("Arc Tan&gent"), "ATAN(", submenuFuncMath); 442 addFlyAction(tr("Arc Tangent"), tr("Arc Tan&gent"), "ATAN(", submenuFuncMath);
443 addFlyAction(tr("Arc Tangent of Coordinates"), tr("C&oor. Arc Tangent"), "ATAN2(", submenuFuncMath); 443 addFlyAction(tr("Arc Tangent of Coordinates"), tr("C&oor. Arc Tangent"), "ATAN2(", submenuFuncMath);
444 submenuFuncMath->insertSeparator(); 444 submenuFuncMath->insertSeparator();
445 addFlyAction(tr("Exponential"), tr("&Exponential"), "EXP(", submenuFuncMath); 445 addFlyAction(tr("Exponential"), tr("&Exponential"), "EXP(", submenuFuncMath);
446 addFlyAction(tr("Logarithm"), tr("&Logarithm"), "LOG(", submenuFuncMath); 446 addFlyAction(tr("Logarithm"), tr("&Logarithm"), "LOG(", submenuFuncMath);
447 addFlyAction(tr("Power"), tr("&Power"), "POW(", submenuFuncMath); 447 addFlyAction(tr("Power"), tr("&Power"), "POW(", submenuFuncMath);
448 submenuFunc->insertItem(tr("&Mathematical"), submenuFuncMath); 448 submenuFunc->insertItem(tr("&Mathematical"), submenuFuncMath);
449 449
450 submenuFuncStat=new QPopupMenu; 450 submenuFuncStat=new QPopupMenu;
451 addFlyAction(tr("Average"), tr("&Average"), "AVG(", submenuFuncStat); 451 addFlyAction(tr("Average"), tr("&Average"), "AVG(", submenuFuncStat);
452 addFlyAction(tr("Maximum"), tr("Ma&ximum"), "MAX(", submenuFuncStat); 452 addFlyAction(tr("Maximum"), tr("Ma&ximum"), "MAX(", submenuFuncStat);
453 addFlyAction(tr("Minimum"), tr("&Minimum"), "MIN(", submenuFuncStat); 453 addFlyAction(tr("Minimum"), tr("&Minimum"), "MIN(", submenuFuncStat);
454 addFlyAction(tr("Count"), tr("&Count"), "COUNT(", submenuFuncStat); 454 addFlyAction(tr("Count"), tr("&Count"), "COUNT(", submenuFuncStat);
455 submenuFunc->insertItem(tr("&Statistical"), submenuFuncStat); 455 submenuFunc->insertItem(tr("&Statistical"), submenuFuncStat);
456 456
457 menuInsert->insertSeparator(); 457 menuInsert->insertSeparator();
458 insertCells->addTo(menuInsert); 458 insertCells->addTo(menuInsert);
459 insertRows->addTo(menuInsert); 459 insertRows->addTo(menuInsert);
460 insertCols->addTo(menuInsert); 460 insertCols->addTo(menuInsert);
461 insertSheets->addTo(menuInsert); 461 insertSheets->addTo(menuInsert);
462} 462}
463 463
464void MainWindow::initStandardToolbar() 464void MainWindow::initStandardToolbar()
465{ 465{
466 toolbarStandard=new QPEToolBar(this); 466 toolbarStandard=new QToolBar(this);
467 toolbarStandard->setHorizontalStretchable(TRUE); 467 toolbarStandard->setHorizontalStretchable(TRUE);
468 moveToolBar(toolbarStandard, Top); 468 moveToolBar(toolbarStandard, Top);
469 469
470 fileNew->addTo(toolbarStandard); 470 fileNew->addTo(toolbarStandard);
471 fileOpen->addTo(toolbarStandard); 471 fileOpen->addTo(toolbarStandard);
472 fileSave->addTo(toolbarStandard); 472 fileSave->addTo(toolbarStandard);
473 473
474 comboSheets=new QComboBox(toolbarStandard); 474 comboSheets=new QComboBox(toolbarStandard);
475 toolbarStandard->setStretchableWidget(comboSheets); 475 toolbarStandard->setStretchableWidget(comboSheets);
476 connect(comboSheets, SIGNAL(activated(const QString &)), this, SLOT(slotSheetChanged(const QString &))); 476 connect(comboSheets, SIGNAL(activated(const QString &)), this, SLOT(slotSheetChanged(const QString &)));
477} 477}
478 478
479void MainWindow::initFunctionsToolbar() 479void MainWindow::initFunctionsToolbar()
480{ 480{
481 toolbarFunctions=new QPEToolBar(this); 481 toolbarFunctions=new QToolBar(this);
482 toolbarFunctions->setHorizontalStretchable(TRUE); 482 toolbarFunctions->setHorizontalStretchable(TRUE);
483 moveToolBar(toolbarFunctions, Bottom); 483 moveToolBar(toolbarFunctions, Bottom);
484 484
485 funcEqual->addTo(toolbarFunctions); 485 funcEqual->addTo(toolbarFunctions);
486 funcPlus->addTo(toolbarFunctions); 486 funcPlus->addTo(toolbarFunctions);
487 funcMinus->addTo(toolbarFunctions); 487 funcMinus->addTo(toolbarFunctions);
488 funcCross->addTo(toolbarFunctions); 488 funcCross->addTo(toolbarFunctions);
489 funcDivide->addTo(toolbarFunctions); 489 funcDivide->addTo(toolbarFunctions);
490 funcParanOpen->addTo(toolbarFunctions); 490 funcParanOpen->addTo(toolbarFunctions);
491 funcParanClose->addTo(toolbarFunctions); 491 funcParanClose->addTo(toolbarFunctions);
492 funcComma->addTo(toolbarFunctions); 492 funcComma->addTo(toolbarFunctions);
493 493
494 toolFunction=new QToolButton(toolbarFunctions); 494 toolFunction=new QToolButton(toolbarFunctions);
495 toolFunction->setPixmap(func_func_xpm); 495 toolFunction->setPixmap(func_func_xpm);
496 toolFunction->setTextLabel(tr("Functions")); 496 toolFunction->setTextLabel(tr("Functions"));
497 toolFunction->setPopup(submenuFunc); 497 toolFunction->setPopup(submenuFunc);
498 toolFunction->setPopupDelay(0); 498 toolFunction->setPopupDelay(0);
499} 499}
500 500
501void MainWindow::initEditToolbar() 501void MainWindow::initEditToolbar()
502{ 502{
503 toolbarEdit=new QPEToolBar(this); 503 toolbarEdit=new QToolBar(this);
504 toolbarEdit->setHorizontalStretchable(TRUE); 504 toolbarEdit->setHorizontalStretchable(TRUE);
505 moveToolBar(toolbarEdit, Bottom); 505 moveToolBar(toolbarEdit, Bottom);
506 506
507 editAccept->addTo(toolbarEdit); 507 editAccept->addTo(toolbarEdit);
508 editCancel->addTo(toolbarEdit); 508 editCancel->addTo(toolbarEdit);
509 509
510 editData=new QLineEdit(toolbarEdit); 510 editData=new QLineEdit(toolbarEdit);
511 toolbarEdit->setStretchableWidget(editData); 511 toolbarEdit->setStretchableWidget(editData);
512 connect(editData, SIGNAL(returnPressed()), this, SLOT(slotEditAccept())); 512 connect(editData, SIGNAL(returnPressed()), this, SLOT(slotEditAccept()));
513 513
514 editCellSelect->addTo(toolbarEdit); 514 editCellSelect->addTo(toolbarEdit);
515} 515}
516 516
517void MainWindow::slotHelpAbout() 517void MainWindow::slotHelpAbout()
518{ 518{
519 QDialog dialogAbout(this, 0, TRUE); 519 QDialog dialogAbout(this, 0, TRUE);
520 dialogAbout.resize(width()-40, height()-80); 520 dialogAbout.resize(width()-40, height()-80);
521 dialogAbout.setCaption(tr("About Opie Sheet")); 521 dialogAbout.setCaption(tr("About Opie Sheet"));
522 522
523 QLabel label(tr("Opie Sheet\nSpreadsheet Software for Opie\nQWDC Beta Winner (as Sheet/Qt)\n\nDeveloped by: Serdar Ozler\nRelease 1.0.2\nRelease Date: October 08, 2002\n\nThis product is licensed under GPL. It is freely distributable. If you want to get the latest version and also the source code, please visit the web site.\n\nhttp://qtopia.sitebest.com"), &dialogAbout); 523 QLabel label(tr("Opie Sheet\nSpreadsheet Software for Opie\nQWDC Beta Winner (as Sheet/Qt)\n\nDeveloped by: Serdar Ozler\nRelease 1.0.2\nRelease Date: October 08, 2002\n\nThis product is licensed under GPL. It is freely distributable. If you want to get the latest version and also the source code, please visit the web site.\n\nhttp://qtopia.sitebest.com"), &dialogAbout);
524 label.setGeometry(dialogAbout.rect()); 524 label.setGeometry(dialogAbout.rect());
525 label.setAlignment(Qt::AlignCenter | Qt::WordBreak); 525 label.setAlignment(Qt::AlignCenter | Qt::WordBreak);
526 526
527 dialogAbout.exec(); 527 dialogAbout.exec();
528} 528}
529 529
530void MainWindow::initSheet() 530void MainWindow::initSheet()
531{ 531{
532 sheet=new Sheet(DEFAULT_NUM_ROWS, DEFAULT_NUM_COLS, this); 532 sheet=new Sheet(DEFAULT_NUM_ROWS, DEFAULT_NUM_COLS, this);
533 setCentralWidget(sheet); 533 setCentralWidget(sheet);
534 534
535 connect(sheet, SIGNAL(currentDataChanged(const QString &)), editData, SLOT(setText(const QString &))); 535 connect(sheet, SIGNAL(currentDataChanged(const QString &)), editData, SLOT(setText(const QString &)));
536 connect(sheet, SIGNAL(cellClicked(const QString &)), this, SLOT(slotCellClicked(const QString &))); 536 connect(sheet, SIGNAL(cellClicked(const QString &)), this, SLOT(slotCellClicked(const QString &)));
537 connect(sheet, SIGNAL(sheetModified()), this, SLOT(slotDocModified())); 537 connect(sheet, SIGNAL(sheetModified()), this, SLOT(slotDocModified()));
538 538
539 connect(editCut, SIGNAL(activated()), sheet, SLOT(editCut())); 539 connect(editCut, SIGNAL(activated()), sheet, SLOT(editCut()));
540 connect(editCopy, SIGNAL(activated()), sheet, SLOT(editCopy())); 540 connect(editCopy, SIGNAL(activated()), sheet, SLOT(editCopy()));
541 connect(editClear, SIGNAL(activated()), sheet, SLOT(editClear())); 541 connect(editClear, SIGNAL(activated()), sheet, SLOT(editClear()));
542} 542}
543 543
544void MainWindow::slotEditAccept() 544void MainWindow::slotEditAccept()
545{ 545{
546 sheet->setData(editData->text()); 546 sheet->setData(editData->text());
547} 547}
548 548
549void MainWindow::slotEditCancel() 549void MainWindow::slotEditCancel()
550{ 550{
551 editData->setText(sheet->getData()); 551 editData->setText(sheet->getData());
diff --git a/noncore/apps/opie-sheet/mainwindow.h b/noncore/apps/opie-sheet/mainwindow.h
index 4007f88..bd99c36 100644
--- a/noncore/apps/opie-sheet/mainwindow.h
+++ b/noncore/apps/opie-sheet/mainwindow.h
@@ -1,92 +1,92 @@
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 <qmenubar.h> 20#include <qmenubar.h>
21#include <qpe/qpetoolbar.h> 21#include <qtoolbar.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 QMenuBar *menu; 43 QMenuBar *menu;
44 QPEToolBar *toolbarFunctions, *toolbarEdit, *toolbarStandard; 44 QToolBar *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();
92 void slotEditCancel(); 92 void slotEditCancel();
diff --git a/noncore/apps/tableviewer/tableviewer.cpp b/noncore/apps/tableviewer/tableviewer.cpp
index fdf0072..207172d 100644
--- a/noncore/apps/tableviewer/tableviewer.cpp
+++ b/noncore/apps/tableviewer/tableviewer.cpp
@@ -1,143 +1,143 @@
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/* 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 <qmenubar.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 QMenuBar(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 QToolBar(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(
118 QIconSet(Resource::loadPixmap("forward")), "Next Item", 118 QIconSet(Resource::loadPixmap("forward")), "Next Item",
119 QString::null, this, 119 QString::null, this,
120 SLOT(nextItem()), navigation, "Next Item"); 120 SLOT(nextItem()), navigation, "Next Item");
121 QToolButton *lastItemButton = new QToolButton( 121 QToolButton *lastItemButton = new QToolButton(
122 QIconSet(Resource::loadPixmap("fastforward")), "Last Item", 122 QIconSet(Resource::loadPixmap("fastforward")), "Last Item",
123 QString::null, this, 123 QString::null, this,
124 SLOT(lastItem()), navigation, "Last Item"); 124 SLOT(lastItem()), navigation, "Last Item");
125 125
126 navigation->addSeparator(); 126 navigation->addSeparator();
127 QToolButton *browseButton = new QToolButton( 127 QToolButton *browseButton = new QToolButton(
128 QIconSet(Resource::loadPixmap("day")), "View Single Item", 128 QIconSet(Resource::loadPixmap("day")), "View Single Item",
129 QString::null, this, 129 QString::null, this,
130 SLOT(browseViewSlot()), navigation, "View Single Item"); 130 SLOT(browseViewSlot()), navigation, "View Single Item");
131 QToolButton *listButton = new QToolButton( 131 QToolButton *listButton = new QToolButton(
132 QIconSet(Resource::loadPixmap("month")), "View Multiple Items", 132 QIconSet(Resource::loadPixmap("month")), "View Multiple Items",
133 QString::null, this, 133 QString::null, this,
134 SLOT(listViewSlot()), navigation, "View Multiple Items"); 134 SLOT(listViewSlot()), navigation, "View Multiple Items");
135 135
136 setToolBarsMovable(FALSE); 136 setToolBarsMovable(FALSE);
137 setToolBarsMovable(FALSE); 137 setToolBarsMovable(FALSE);
138 setToolBarsMovable(FALSE); 138 setToolBarsMovable(FALSE);
139 139
140/* Build widgets */ 140/* Build widgets */
141 browseView = new TVBrowseView(&ts, this, 0); 141 browseView = new TVBrowseView(&ts, this, 0);
142 listView = new TVListView(&ts, this, 0); 142 listView = new TVListView(&ts, this, 0);
143 filterView = new TVFilterView(&ts, this, 0); 143 filterView = new TVFilterView(&ts, this, 0);
diff --git a/noncore/comm/keypebble/kvnc.cpp b/noncore/comm/keypebble/kvnc.cpp
index c89dec5..25c8919 100644
--- a/noncore/comm/keypebble/kvnc.cpp
+++ b/noncore/comm/keypebble/kvnc.cpp
@@ -1,54 +1,54 @@
1#include <qiconset.h> 1#include <qiconset.h>
2#include <qdialog.h> 2#include <qdialog.h>
3#include <qpixmap.h> 3#include <qpixmap.h>
4#include <qdom.h> 4#include <qdom.h>
5#include <qaction.h> 5#include <qaction.h>
6#include <qpe/qpemenubar.h> 6#include <qmenubar.h>
7#include <qstatusbar.h> 7#include <qstatusbar.h>
8#include <qpopupmenu.h> 8#include <qpopupmenu.h>
9#include <qpushbutton.h> 9#include <qpushbutton.h>
10#include <qpe/qpetoolbar.h> 10#include <qpe/qpetoolbar.h>
11#include <qtimer.h> 11#include <qtimer.h>
12#include <qmessagebox.h> 12#include <qmessagebox.h>
13#include <qspinbox.h> 13#include <qspinbox.h>
14#include <qlistbox.h> 14#include <qlistbox.h>
15#include <qlineedit.h> 15#include <qlineedit.h>
16#include <qpe/qpeapplication.h> 16#include <qpe/qpeapplication.h>
17#include <qpe/global.h> 17#include <qpe/global.h>
18#include <qpe/qpetoolbar.h> 18#include <qpe/qpetoolbar.h>
19#include <qpe/resource.h> 19#include <qpe/resource.h>
20 20
21#include <assert.h> 21#include <assert.h>
22 22
23#include "kvnc.h" 23#include "kvnc.h"
24#include "krfbcanvas.h" 24#include "krfbcanvas.h"
25#include "krfbconnection.h" 25#include "krfbconnection.h"
26#include "kvncconndlg.h" 26#include "kvncconndlg.h"
27#include "krfbserver.h" 27#include "krfbserver.h"
28 28
29static int u_id = 1; 29static int u_id = 1;
30static int get_unique_id() 30static int get_unique_id()
31{ 31{
32 return u_id++; 32 return u_id++;
33} 33}
34 34
35 35
36/* XPM */ 36/* XPM */
37static char * menu_xpm[] = { 37static char * menu_xpm[] = {
38"12 12 5 1", 38"12 12 5 1",
39 " c None", 39 " c None",
40 ".c #000000", 40 ".c #000000",
41 "+c #FFFDAD", 41 "+c #FFFDAD",
42 "@c #FFFF00", 42 "@c #FFFF00",
43 "#c #E5E100", 43 "#c #E5E100",
44" ", 44" ",
45" ", 45" ",
46" ......... ", 46" ......... ",
47" .+++++++. ", 47" .+++++++. ",
48" .+@@@@#. ", 48" .+@@@@#. ",
49" .+@@@#. ", 49" .+@@@#. ",
50" .+@@#. ", 50" .+@@#. ",
51" .+@#. ", 51" .+@#. ",
52" .+#. ", 52" .+#. ",
53" .+. ", 53" .+. ",
54" .. ", 54" .. ",
diff --git a/noncore/games/backgammon/backgammon.cpp b/noncore/games/backgammon/backgammon.cpp
index 755ed10..e9e5467 100644
--- a/noncore/games/backgammon/backgammon.cpp
+++ b/noncore/games/backgammon/backgammon.cpp
@@ -1,66 +1,66 @@
1#include "backgammon.h" 1#include "backgammon.h"
2 2
3#include "aidialog.h" 3#include "aidialog.h"
4#include "filedialog.h" 4#include "filedialog.h"
5#include "playerdialog.h" 5#include "playerdialog.h"
6#include "rulesdialog.h" 6#include "rulesdialog.h"
7#include "themedialog.h" 7#include "themedialog.h"
8 8
9#include <qdatetime.h> 9#include <qdatetime.h>
10#include <qfile.h> 10#include <qfile.h>
11#include <qlayout.h> 11#include <qlayout.h>
12#include <qmessagebox.h> 12#include <qmessagebox.h>
13#include <qstring.h> 13#include <qstring.h>
14#include <qtimer.h> 14#include <qtimer.h>
15#include <qmainwindow.h> 15#include <qmainwindow.h>
16#include <qpe/qpeapplication.h> 16#include <qpe/qpeapplication.h>
17#include <qpe/config.h> 17#include <qpe/config.h>
18#include <qpe/qpemenubar.h> 18#include <qmenubar.h>
19#include <qpe/resource.h> 19#include <qpe/resource.h>
20 20
21#include <stdlib.h> 21#include <stdlib.h>
22 22
23 23
24BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl) 24BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
25 : QMainWindow(parent, name, fl) 25 : QMainWindow(parent, name, fl)
26{ 26{
27 if (!name) setName("BackGammon"); 27 if (!name) setName("BackGammon");
28 setCaption(tr( "Backgammon") ); 28 setCaption(tr( "Backgammon") );
29 setIcon( Resource::loadPixmap( "backgammon" ) ); 29 setIcon( Resource::loadPixmap( "backgammon" ) );
30 //general counter varaible 30 //general counter varaible
31 int a=0; 31 int a=0;
32 //the game engine 32 //the game engine
33 move=new MoveEngine(); 33 move=new MoveEngine();
34 34
35 //load the default theme 35 //load the default theme
36 Config conf("backgammon"); 36 Config conf("backgammon");
37 if(!conf.isValid()) 37 if(!conf.isValid())
38 { 38 {
39 qDebug("config file does not exist"); 39 qDebug("config file does not exist");
40 conf.setGroup("general"); 40 conf.setGroup("general");
41 conf.writeEntry("theme","default"); 41 conf.writeEntry("theme","default");
42 conf.setGroup("rules"); 42 conf.setGroup("rules");
43 conf.writeEntry("move_with_pieces_out",false); 43 conf.writeEntry("move_with_pieces_out",false);
44 conf.writeEntry("nice_dice",false); 44 conf.writeEntry("nice_dice",false);
45 conf.setGroup("display"); 45 conf.setGroup("display");
46 conf.writeEntry("small",false); 46 conf.writeEntry("small",false);
47 conf.writeEntry("warning",true); 47 conf.writeEntry("warning",true);
48 conf.setGroup("ai"); 48 conf.setGroup("ai");
49 conf.writeEntry("rescue",6); 49 conf.writeEntry("rescue",6);
50 conf.writeEntry("eliminate",4); 50 conf.writeEntry("eliminate",4);
51 conf.writeEntry("expose",1); 51 conf.writeEntry("expose",1);
52 conf.writeEntry("protect",5); 52 conf.writeEntry("protect",5);
53 conf.writeEntry("safe",3); 53 conf.writeEntry("safe",3);
54 conf.writeEntry("empty",2); 54 conf.writeEntry("empty",2);
55 55
56 } 56 }
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);
diff --git a/noncore/games/fifteen/fifteen.cpp b/noncore/games/fifteen/fifteen.cpp
index 212f7b1..2e4ed94 100644
--- a/noncore/games/fifteen/fifteen.cpp
+++ b/noncore/games/fifteen/fifteen.cpp
@@ -1,99 +1,99 @@
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#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 <qmenubar.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 QToolBar *toolbar = new QToolBar(this);
52 toolbar->setHorizontalStretchable( TRUE ); 52 toolbar->setHorizontalStretchable( TRUE );
53 addToolBar(toolbar); 53 addToolBar(toolbar);
54 54
55 QMenuBar *menubar = new QMenuBar( 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);
diff --git a/noncore/games/go/gowidget.cpp b/noncore/games/go/gowidget.cpp
index 476f7ce1..6d06f3b 100644
--- a/noncore/games/go/gowidget.cpp
+++ b/noncore/games/go/gowidget.cpp
@@ -1,109 +1,109 @@
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#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 <qmenubar.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 QToolBar(this);
62 toolbar->setHorizontalStretchable( TRUE ); 62 toolbar->setHorizontalStretchable( TRUE );
63 addToolBar(toolbar); 63 addToolBar(toolbar);
64 64
65 QMenuBar *mb = new QMenuBar( 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 /*
diff --git a/noncore/games/mindbreaker/mindbreaker.cpp b/noncore/games/mindbreaker/mindbreaker.cpp
index 1a1d05d..7802e38 100644
--- a/noncore/games/mindbreaker/mindbreaker.cpp
+++ b/noncore/games/mindbreaker/mindbreaker.cpp
@@ -169,97 +169,97 @@ bool Peg::hit( const QPoint &p ) const
169 if (!normalPegs[pegtype]->valid(ix, iy)) 169 if (!normalPegs[pegtype]->valid(ix, iy))
170 return FALSE; 170 return FALSE;
171 QRgb pixel = normalPegs[pegtype]->pixel(ix, iy); 171 QRgb pixel = normalPegs[pegtype]->pixel(ix, iy);
172 return (qAlpha(pixel ) != 0); 172 return (qAlpha(pixel ) != 0);
173} 173}
174 174
175inline bool Peg::placed() const 175inline bool Peg::placed() const
176{ 176{
177 return isplaced; 177 return isplaced;
178} 178}
179 179
180inline int Peg::pegGo() const 180inline int Peg::pegGo() const
181{ 181{
182 return peg_go; 182 return peg_go;
183} 183}
184 184
185inline int Peg::pegPos() const 185inline int Peg::pegPos() const
186{ 186{
187 return peg_pos; 187 return peg_pos;
188} 188}
189 189
190inline void Peg::setPegPos(int p) 190inline void Peg::setPegPos(int p)
191{ 191{
192 peg_pos = p; 192 peg_pos = p;
193} 193}
194 194
195inline void Peg::setPlaced(bool p) 195inline void Peg::setPlaced(bool p)
196{ 196{
197 isplaced = p; 197 isplaced = p;
198} 198}
199 199
200inline int Peg::type() const 200inline int Peg::type() const
201{ 201{
202 return pegtype; 202 return pegtype;
203} 203}
204 204
205/* Load the main image, copy from it the pegs, the board, and the answer image 205/* Load the main image, copy from it the pegs, the board, and the answer image
206 * and use these to create the tray, answer and board 206 * and use these to create the tray, answer and board
207 */ 207 */
208MindBreaker::MindBreaker( QWidget *parent, const char *name, int wFlags ) 208MindBreaker::MindBreaker( QWidget *parent, const char *name, int wFlags )
209: QMainWindow(parent, name, wFlags), 209: QMainWindow(parent, name, wFlags),
210 canvas(board_height, board_width) 210 canvas(board_height, board_width)
211{ 211{
212 MindBreakerBoard *m = new MindBreakerBoard(canvas, this); 212 MindBreakerBoard *m = new MindBreakerBoard(canvas, this);
213 setCentralWidget(m); 213 setCentralWidget(m);
214 214
215 setToolBarsMovable( FALSE ); 215 setToolBarsMovable( FALSE );
216 216
217 QPEToolBar *tb = new QPEToolBar(this); 217 QToolBar *tb = new QToolBar(this);
218 tb->setHorizontalStretchable( TRUE ); 218 tb->setHorizontalStretchable( TRUE );
219 219
220 QPixmap newicon = Resource::loadPixmap("new"); 220 QPixmap newicon = Resource::loadPixmap("new");
221 new QToolButton(newicon, tr("New Game"), 0, 221 new QToolButton(newicon, tr("New Game"), 0,
222 m, SLOT(clear()), tb, "NewGame"); 222 m, SLOT(clear()), tb, "NewGame");
223 223
224 score = new QToolButton(tb); 224 score = new QToolButton(tb);
225 score->setText(""); 225 score->setText("");
226 score->setMaximumHeight(20); 226 score->setMaximumHeight(20);
227 score->setUsesTextLabel(TRUE); 227 score->setUsesTextLabel(TRUE);
228 tb->setStretchableWidget(score); 228 tb->setStretchableWidget(score);
229 229
230 connect(m, SIGNAL(scoreChanged(int, int)), this, SLOT(setScore(int, int))); 230 connect(m, SIGNAL(scoreChanged(int, int)), this, SLOT(setScore(int, int)));
231 connect(score, SIGNAL(clicked()), m, SLOT(resetScore())); 231 connect(score, SIGNAL(clicked()), m, SLOT(resetScore()));
232 232
233 int a, b; 233 int a, b;
234 m->getScore(&a, &b); 234 m->getScore(&a, &b);
235 setScore(a,b); 235 setScore(a,b);
236} 236}
237 237
238void MindBreaker::setScore(int turns, int games) 238void MindBreaker::setScore(int turns, int games)
239{ 239{
240 double average; 240 double average;
241 double total_turns = turns; 241 double total_turns = turns;
242 double total_games = games; 242 double total_games = games;
243 243
244 if(total_games > 0) 244 if(total_games > 0)
245 average = total_turns / total_games; 245 average = total_turns / total_games;
246 else 246 else
247 average = 0.0; 247 average = 0.0;
248 248
249 score->setText(tr("win avg: %1 turns (%2 games)").arg(average).arg(games)); 249 score->setText(tr("win avg: %1 turns (%2 games)").arg(average).arg(games));
250} 250}
251 251
252 252
253MindBreakerBoard::MindBreakerBoard( QCanvas &canv, QWidget *parent, 253MindBreakerBoard::MindBreakerBoard( QCanvas &canv, QWidget *parent,
254 const char *name, int wFlags ) 254 const char *name, int wFlags )
255 : QCanvasView(&canv, parent, name, wFlags) 255 : QCanvasView(&canv, parent, name, wFlags)
256{ 256{
257 int i, x, y; 257 int i, x, y;
258 struct timeval tv; 258 struct timeval tv;
259 259
260 current_go = 0; 260 current_go = 0;
261 gettimeofday(&tv, 0); 261 gettimeofday(&tv, 0);
262 262
263 srand(tv.tv_usec); 263 srand(tv.tv_usec);
264 264
265 canvas()->setAdvancePeriod(500); 265 canvas()->setAdvancePeriod(500);
diff --git a/noncore/games/minesweep/minesweep.cpp b/noncore/games/minesweep/minesweep.cpp
index 814070b..48644b3 100644
--- a/noncore/games/minesweep/minesweep.cpp
+++ b/noncore/games/minesweep/minesweep.cpp
@@ -1,76 +1,76 @@
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#include "minesweep.h" 21#include "minesweep.h"
22#include "minefield.h" 22#include "minefield.h"
23 23
24#include <qpe/resource.h> 24#include <qpe/resource.h>
25#include <qpe/config.h> 25#include <qpe/config.h>
26 26
27#include <qpe/qpetoolbar.h> 27#include <qpe/qpetoolbar.h>
28#include <qpe/qpemenubar.h> 28#include <qmenubar.h>
29#include <qpopupmenu.h> 29#include <qpopupmenu.h>
30#include <qpushbutton.h> 30#include <qpushbutton.h>
31#include <qlcdnumber.h> 31#include <qlcdnumber.h>
32#include <qmessagebox.h> 32#include <qmessagebox.h>
33#include <qtimer.h> 33#include <qtimer.h>
34#include <qpalette.h> 34#include <qpalette.h>
35#include <qapplication.h> 35#include <qapplication.h>
36#include <qlayout.h> 36#include <qlayout.h>
37#include <qlabel.h> 37#include <qlabel.h>
38 38
39#include <stdlib.h> 39#include <stdlib.h>
40#include <time.h> 40#include <time.h>
41 41
42 42
43 43
44 44
45static const char *pix_new[]={ 45static const char *pix_new[]={
46"20 20 3 1", 46"20 20 3 1",
47" c None", 47" c None",
48"# c #00FF00", 48"# c #00FF00",
49". c #000000", 49". c #000000",
50" ", 50" ",
51" ...... ", 51" ...... ",
52" ..######.. ", 52" ..######.. ",
53" .##########. ", 53" .##########. ",
54" .############. ", 54" .############. ",
55" .##############. ", 55" .##############. ",
56" .##############. ", 56" .##############. ",
57" .################. ", 57" .################. ",
58" .################. ", 58" .################. ",
59" .################. ", 59" .################. ",
60" .################. ", 60" .################. ",
61" .################. ", 61" .################. ",
62" .################. ", 62" .################. ",
63" .##############. ", 63" .##############. ",
64" .##############. ", 64" .##############. ",
65" .############. ", 65" .############. ",
66" .##########. ", 66" .##########. ",
67" ..######.. ", 67" ..######.. ",
68" ...... ", 68" ...... ",
69" "}; 69" "};
70 70
71 71
72/* XPM */ 72/* XPM */
73static const char * happy_xpm[] = { 73static const char * happy_xpm[] = {
74"20 20 3 1", 74"20 20 3 1",
75 " c None", 75 " c None",
76 ".c #ffff3f ", 76 ".c #ffff3f ",
@@ -198,97 +198,97 @@ void ResultIndicator::center()
198 QPoint pp = w->mapToGlobal( QPoint(0,0) ); 198 QPoint pp = w->mapToGlobal( QPoint(0,0) );
199 QSize s = sizeHint()*3; 199 QSize s = sizeHint()*3;
200 pp = QPoint( pp.x() + w->width()/2 - s.width()/2, 200 pp = QPoint( pp.x() + w->width()/2 - s.width()/2,
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 QToolBar *toolBar = new QToolBar( this );
247 toolBar->setHorizontalStretchable( TRUE ); 247 toolBar->setHorizontalStretchable( TRUE );
248 248
249 QMenuBar *menuBar = new QMenuBar( 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();
diff --git a/noncore/games/parashoot/interface.cpp b/noncore/games/parashoot/interface.cpp
index 84e5e60..db98720 100644
--- a/noncore/games/parashoot/interface.cpp
+++ b/noncore/games/parashoot/interface.cpp
@@ -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 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#include "interface.h" 21#include "interface.h"
22#include "man.h" 22#include "man.h"
23 23
24#include <qpe/resource.h> 24#include <qpe/resource.h>
25 25
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qmessagebox.h> 27#include <qmessagebox.h>
28#include <qapplication.h> 28#include <qapplication.h>
29#include <qstyle.h> 29#include <qstyle.h>
30#include <qpe/qpetoolbar.h> 30#include <qpe/qpetoolbar.h>
31#include <qtoolbutton.h> 31#include <qtoolbutton.h>
32 32
33ParaShoot::ParaShoot(QWidget* parent, const char* name, WFlags f) : 33ParaShoot::ParaShoot(QWidget* parent, const char* name, WFlags f) :
34 QMainWindow(parent,name,f), 34 QMainWindow(parent,name,f),
35 canvas(232, 258), 35 canvas(232, 258),
36 fanfare("level_up"), 36 fanfare("level_up"),
37 score(0) 37 score(0)
38{ 38{
39 canvas.setAdvancePeriod(80); 39 canvas.setAdvancePeriod(80);
40 QPixmap bg = Resource::loadPixmap("parashoot/sky"); 40 QPixmap bg = Resource::loadPixmap("parashoot/sky");
41 canvas.setBackgroundPixmap(bg); 41 canvas.setBackgroundPixmap(bg);
42 42
43 pb = new QCanvasView(&canvas, this); 43 pb = new QCanvasView(&canvas, this);
44 pb->setFocus(); 44 pb->setFocus();
45 45
46 setToolBarsMovable( FALSE ); 46 setToolBarsMovable( FALSE );
47 47
48 QPEToolBar* toolbar = new QPEToolBar(this); 48 QToolBar* toolbar = new QToolBar(this);
49 toolbar->setHorizontalStretchable( TRUE ); 49 toolbar->setHorizontalStretchable( TRUE );
50 50
51 setCaption( tr("ParaShoot") ); 51 setCaption( tr("ParaShoot") );
52 QPixmap newicon = Resource::loadPixmap("parashoot/manicon"); 52 QPixmap newicon = Resource::loadPixmap("parashoot/manicon");
53 setIcon(newicon); 53 setIcon(newicon);
54 new QToolButton(newicon, tr("New Game"), 0, 54 new QToolButton(newicon, tr("New Game"), 0,
55 this, SLOT(newGame()), toolbar, "New Game"); 55 this, SLOT(newGame()), toolbar, "New Game");
56 56
57 levelscore = new QLabel(toolbar); 57 levelscore = new QLabel(toolbar);
58 levelscore->setBackgroundMode( PaletteButton ); 58 levelscore->setBackgroundMode( PaletteButton );
59 levelscore->setAlignment( AlignRight | AlignVCenter | ExpandTabs ); 59 levelscore->setAlignment( AlignRight | AlignVCenter | ExpandTabs );
60 toolbar->setStretchableWidget( levelscore ); 60 toolbar->setStretchableWidget( levelscore );
61 showScore(0,0); 61 showScore(0,0);
62 62
63 setCentralWidget(pb); 63 setCentralWidget(pb);
64 64
65 autoDropTimer = new QTimer(this); 65 autoDropTimer = new QTimer(this);
66 connect (autoDropTimer, SIGNAL(timeout()), this, SLOT(play()) ); 66 connect (autoDropTimer, SIGNAL(timeout()), this, SLOT(play()) );
67 67
68 pauseTimer = new QTimer(this); 68 pauseTimer = new QTimer(this);
69 connect(pauseTimer, SIGNAL(timeout()), this, SLOT(wait()) ); 69 connect(pauseTimer, SIGNAL(timeout()), this, SLOT(wait()) );
70 70
71 setFocusPolicy(StrongFocus); 71 setFocusPolicy(StrongFocus);
72 72
73 newGame(); 73 newGame();
74} 74}
75 75
76 76
77void ParaShoot::resizeEvent(QResizeEvent *) 77void ParaShoot::resizeEvent(QResizeEvent *)
78{ 78{
79 QSize s = centralWidget()->size(); 79 QSize s = centralWidget()->size();
80 int fw = style().defaultFrameWidth(); 80 int fw = style().defaultFrameWidth();
81 canvas.resize( s.width() - fw - 2, s.height() - fw - 2); 81 canvas.resize( s.width() - fw - 2, s.height() - fw - 2);
82} 82}
83 83
84 84
85void ParaShoot::showScore( int score, int level ) 85void ParaShoot::showScore( int score, int level )
86{ 86{
87 levelscore->setText(tr(" Level: %1 Score: %2 ").arg(score).arg(level) ); 87 levelscore->setText(tr(" Level: %1 Score: %2 ").arg(score).arg(level) );
88} 88}
89 89
90 90
91void ParaShoot::newGame() 91void ParaShoot::newGame()
92{ 92{
93 clear(); 93 clear();
94 if (pauseTimer->isActive()) 94 if (pauseTimer->isActive())
95 pauseTimer->stop(); 95 pauseTimer->stop();
96 clear(); 96 clear();
diff --git a/noncore/games/snake/interface.cpp b/noncore/games/snake/interface.cpp
index 68e0f14..f1227cb 100644
--- a/noncore/games/snake/interface.cpp
+++ b/noncore/games/snake/interface.cpp
@@ -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 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#include "interface.h" 21#include "interface.h"
22 22
23#include <qpe/resource.h> 23#include <qpe/resource.h>
24 24
25#include <qpe/qpetoolbar.h> 25#include <qpe/qpetoolbar.h>
26#include <qtoolbutton.h> 26#include <qtoolbutton.h>
27#include <qstyle.h> 27#include <qstyle.h>
28#include <qapplication.h> 28#include <qapplication.h>
29#include <qmessagebox.h> 29#include <qmessagebox.h>
30 30
31SnakeGame::SnakeGame(QWidget* parent, const char* name, WFlags f) : 31SnakeGame::SnakeGame(QWidget* parent, const char* name, WFlags f) :
32 QMainWindow(parent,name,f), 32 QMainWindow(parent,name,f),
33 canvas(232, 258) 33 canvas(232, 258)
34{ 34{
35 setCaption( tr("Snake") ); 35 setCaption( tr("Snake") );
36 QPixmap bg = Resource::loadPixmap("snake/grass"); 36 QPixmap bg = Resource::loadPixmap("snake/grass");
37 canvas.setBackgroundPixmap(bg); 37 canvas.setBackgroundPixmap(bg);
38 canvas.setUpdatePeriod(100); 38 canvas.setUpdatePeriod(100);
39 snake = 0; 39 snake = 0;
40 40
41 cv = new QCanvasView(&canvas, this); 41 cv = new QCanvasView(&canvas, this);
42 42
43 pauseTimer = new QTimer(this); 43 pauseTimer = new QTimer(this);
44 connect(pauseTimer, SIGNAL(timeout()), this, SLOT(wait()) ); 44 connect(pauseTimer, SIGNAL(timeout()), this, SLOT(wait()) );
45 45
46 setToolBarsMovable( FALSE ); 46 setToolBarsMovable( FALSE );
47 47
48 QPEToolBar* toolbar = new QPEToolBar( this); 48 QToolBar* toolbar = new QToolBar( this);
49 toolbar->setHorizontalStretchable( TRUE ); 49 toolbar->setHorizontalStretchable( TRUE );
50 50
51 QPixmap newicon = Resource::loadPixmap("ksnake"); 51 QPixmap newicon = Resource::loadPixmap("ksnake");
52 setIcon(newicon); 52 setIcon(newicon);
53 (void)new QToolButton(newicon, tr("New Game"), 0, 53 (void)new QToolButton(newicon, tr("New Game"), 0,
54 this, SLOT(newGame()), toolbar, "New Game"); 54 this, SLOT(newGame()), toolbar, "New Game");
55 55
56 scorelabel = new QLabel(toolbar); 56 scorelabel = new QLabel(toolbar);
57 showScore(0); 57 showScore(0);
58 scorelabel->setBackgroundMode( PaletteButton ); 58 scorelabel->setBackgroundMode( PaletteButton );
59 scorelabel->setAlignment( AlignRight | AlignVCenter | ExpandTabs ); 59 scorelabel->setAlignment( AlignRight | AlignVCenter | ExpandTabs );
60 toolbar->setStretchableWidget( scorelabel ); 60 toolbar->setStretchableWidget( scorelabel );
61 61
62 setFocusPolicy(StrongFocus); 62 setFocusPolicy(StrongFocus);
63 63
64 setCentralWidget(cv); 64 setCentralWidget(cv);
65 65
66 QTimer::singleShot( 16, this, SLOT(welcomescreen()) ); 66 QTimer::singleShot( 16, this, SLOT(welcomescreen()) );
67 gamestopped = true; 67 gamestopped = true;
68 waitover = true; 68 waitover = true;
69} 69}
70 70
71SnakeGame::~SnakeGame() 71SnakeGame::~SnakeGame()
72{ 72{
73 delete snake; 73 delete snake;
74} 74}
75 75
76void SnakeGame::resizeEvent(QResizeEvent *) 76void SnakeGame::resizeEvent(QResizeEvent *)
77{ 77{
78 QSize s = centralWidget()->size(); 78 QSize s = centralWidget()->size();
79 int fw = style().defaultFrameWidth(); 79 int fw = style().defaultFrameWidth();
80 canvas.resize( s.width() - fw - 2, s.height() - fw - 2); 80 canvas.resize( s.width() - fw - 2, s.height() - fw - 2);
81} 81}
82 82
83void SnakeGame::welcomescreen() 83void SnakeGame::welcomescreen()
84{ 84{
85 QCanvasText* title = new QCanvasText(tr("SNAKE!"), &canvas); 85 QCanvasText* title = new QCanvasText(tr("SNAKE!"), &canvas);
86 title->setColor(yellow); 86 title->setColor(yellow);
87 title->setFont( QFont("times", 18, QFont::Bold) ); 87 title->setFont( QFont("times", 18, QFont::Bold) );
88 int w = title->boundingRect().width(); 88 int w = title->boundingRect().width();
89 title->move(canvas.width()/2 -w/2, canvas.height()/2-110); 89 title->move(canvas.width()/2 -w/2, canvas.height()/2-110);
90 title->show(); 90 title->show();
91 QCanvasPixmapArray* titlearray = new QCanvasPixmapArray(Resource::findPixmap("snake/title")); 91 QCanvasPixmapArray* titlearray = new QCanvasPixmapArray(Resource::findPixmap("snake/title"));
92 QCanvasSprite* titlepic = new QCanvasSprite(titlearray, &canvas); 92 QCanvasSprite* titlepic = new QCanvasSprite(titlearray, &canvas);
93 titlepic->move(canvas.width()/2 - 33, canvas.height()/2-85); 93 titlepic->move(canvas.width()/2 - 33, canvas.height()/2-85);
94 titlepic->show(); 94 titlepic->show();
95 QCanvasText* instr = new QCanvasText(tr("Use the arrow keys to guide the\n" 95 QCanvasText* instr = new QCanvasText(tr("Use the arrow keys to guide the\n"
96 "snake to eat the mouse. You must not\n" 96 "snake to eat the mouse. You must not\n"
diff --git a/noncore/games/solitaire/canvascardgame.cpp b/noncore/games/solitaire/canvascardgame.cpp
index 8250193..9ae2a23 100644
--- a/noncore/games/solitaire/canvascardgame.cpp
+++ b/noncore/games/solitaire/canvascardgame.cpp
@@ -1,78 +1,78 @@
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#include "cardgame.h" 21#include "cardgame.h"
22#include "canvasshapes.h" 22#include "canvasshapes.h"
23#include "canvascard.h" 23#include "canvascard.h"
24#include "canvascardgame.h" 24#include "canvascardgame.h"
25 25
26#include <qpe/resource.h> 26#include <qpe/resource.h>
27#include <qpe/config.h> 27#include <qpe/config.h>
28 28
29#include <qmainwindow.h> 29#include <qmainwindow.h>
30#include <qpe/qpemenubar.h> 30#include <qmenubar.h>
31#include <qpainter.h> 31#include <qpainter.h>
32#include <qgfx_qws.h> 32#include <qgfx_qws.h>
33 33
34#include <stdlib.h> 34#include <stdlib.h>
35#include <limits.h> 35#include <limits.h>
36#include <time.h> 36#include <time.h>
37#include <math.h> 37#include <math.h>
38 38
39 39
40extern int highestZ; 40extern int highestZ;
41 41
42 42
43class CanvasCardPile : public QCanvasRectangle 43class CanvasCardPile : public QCanvasRectangle
44{ 44{
45public: 45public:
46 CanvasCardPile( CanvasCardGame *ccg, QCanvas *canvas ) : QCanvasRectangle( canvas ), parent( ccg ) { 46 CanvasCardPile( CanvasCardGame *ccg, QCanvas *canvas ) : QCanvasRectangle( canvas ), parent( ccg ) {
47 pile = new QPixmap( 0, 0 ); 47 pile = new QPixmap( 0, 0 );
48 pileHeight = 0; 48 pileHeight = 0;
49 firstCard = NULL; 49 firstCard = NULL;
50 } 50 }
51 51
52 void addCard( CanvasCard *card ); 52 void addCard( CanvasCard *card );
53 void advance(int stage); 53 void advance(int stage);
54 void animatedMove() { animatedMove(savedX, savedY); } 54 void animatedMove() { animatedMove(savedX, savedY); }
55 void savePos(void) { savedX = (int)x(); savedY = (int)y(); } 55 void savePos(void) { savedX = (int)x(); savedY = (int)y(); }
56 void animatedMove(int x2, int y2, int steps = 7 ); 56 void animatedMove(int x2, int y2, int steps = 7 );
57 57
58protected: 58protected:
59 virtual void draw( QPainter& p ); 59 virtual void draw( QPainter& p );
60 60
61private: 61private:
62 CanvasCardGame *parent; 62 CanvasCardGame *parent;
63 QPixmap *pile; 63 QPixmap *pile;
64 QImage tempImage32; 64 QImage tempImage32;
65 CanvasCard *firstCard; 65 CanvasCard *firstCard;
66 int pileHeight; 66 int pileHeight;
67 int destX, destY; 67 int destX, destY;
68 int savedX, savedY; 68 int savedX, savedY;
69 int animSteps; 69 int animSteps;
70}; 70};
71 71
72 72
73void CanvasCardPile::addCard( CanvasCard *card ) 73void CanvasCardPile::addCard( CanvasCard *card )
74{ 74{
75 int offsetDown = ( qt_screen->deviceWidth() < 200 ) ? 9 : 13; 75 int offsetDown = ( qt_screen->deviceWidth() < 200 ) ? 9 : 13;
76 int cardHeight = ( qt_screen->deviceWidth() < 200 ) ? 27 : 36; 76 int cardHeight = ( qt_screen->deviceWidth() < 200 ) ? 27 : 36;
77 int cardWidth = ( qt_screen->deviceWidth() < 200 ) ? 20 : 23; 77 int cardWidth = ( qt_screen->deviceWidth() < 200 ) ? 20 : 23;
78 78
diff --git a/noncore/games/wordgame/wordgame.cpp b/noncore/games/wordgame/wordgame.cpp
index d46e824..c01551d 100644
--- a/noncore/games/wordgame/wordgame.cpp
+++ b/noncore/games/wordgame/wordgame.cpp
@@ -89,97 +89,97 @@ const char* sampleWGR=
89 "1 2 3 66 67 194 100 0\n" 89 "1 2 3 66 67 194 100 0\n"
90 "1 j 8\n" 90 "1 j 8\n"
91 "1 q 7\n" 91 "1 q 7\n"
92 "1 x 6\n" 92 "1 x 6\n"
93 "1 z 6\n" 93 "1 z 6\n"
94 "1 w 4\n" 94 "1 w 4\n"
95 "1 k 4\n" 95 "1 k 4\n"
96 "1 v 3\n" 96 "1 v 3\n"
97 "1 f 3\n" 97 "1 f 3\n"
98 "2 y 3\n" 98 "2 y 3\n"
99 "2 h 2\n" 99 "2 h 2\n"
100 "2 b 2\n" 100 "2 b 2\n"
101 "2 m 2\n" 101 "2 m 2\n"
102 "3 p 2\n" 102 "3 p 2\n"
103 "3 g 2\n" 103 "3 g 2\n"
104 "3 u 2\n" 104 "3 u 2\n"
105 "4 d 2\n" 105 "4 d 2\n"
106 "4 c 2\n" 106 "4 c 2\n"
107 "5 l 1\n" 107 "5 l 1\n"
108 "5 o 1\n" 108 "5 o 1\n"
109 "7 t 1\n" 109 "7 t 1\n"
110 "7 n 1\n" 110 "7 n 1\n"
111 "7 a 1\n" 111 "7 a 1\n"
112 "7 r 1\n" 112 "7 r 1\n"
113 "8 s 1\n" 113 "8 s 1\n"
114 "8 i 1\n" 114 "8 i 1\n"
115 "11 e 1\n" 115 "11 e 1\n"
116 "0\n"; 116 "0\n";
117 117
118WordGame::WordGame( QWidget* parent, const char* name, WFlags fl ) : 118WordGame::WordGame( QWidget* parent, const char* name, WFlags fl ) :
119 QMainWindow(parent, name, fl) 119 QMainWindow(parent, name, fl)
120{ 120{
121 if ( qApp->desktop()->width() < 240 ) { 121 if ( qApp->desktop()->width() < 240 ) {
122 tile_smallw = 10; 122 tile_smallw = 10;
123 tile_smallh = 10; 123 tile_smallh = 10;
124 tile_bigw = 16; 124 tile_bigw = 16;
125 tile_bigh = 16; 125 tile_bigh = 16;
126 tile_stweak = 0; 126 tile_stweak = 0;
127 tile_btweak = 0; 127 tile_btweak = 0;
128 } 128 }
129 129
130 setIcon( Resource::loadPixmap( "wordgame/WordGame.png" ) ); 130 setIcon( Resource::loadPixmap( "wordgame/WordGame.png" ) );
131 setCaption( tr("Word Game") ); 131 setCaption( tr("Word Game") );
132 132
133 setToolBarsMovable( FALSE ); 133 setToolBarsMovable( FALSE );
134 vbox = new QVBox(this); 134 vbox = new QVBox(this);
135 135
136 setCentralWidget(vbox); 136 setCentralWidget(vbox);
137 toolbar = new QPEToolBar(this); 137 toolbar = new QToolBar(this);
138 addToolBar(toolbar, Bottom); 138 addToolBar(toolbar, Bottom);
139 reset = new QToolButton(Resource::loadPixmap("back"), tr("Back"), "", this, SLOT(resetTurn()), toolbar); 139 reset = new QToolButton(Resource::loadPixmap("back"), tr("Back"), "", this, SLOT(resetTurn()), toolbar);
140 done = new QToolButton(Resource::loadPixmap("done"), tr("Done"), "", this, SLOT(endTurn()), toolbar); 140 done = new QToolButton(Resource::loadPixmap("done"), tr("Done"), "", this, SLOT(endTurn()), toolbar);
141 scoreinfo = new ScoreInfo(toolbar); 141 scoreinfo = new ScoreInfo(toolbar);
142 scoreinfo->setFont(QFont("Helvetica",10)); 142 scoreinfo->setFont(QFont("Helvetica",10));
143 new QToolButton(Resource::loadPixmap("finish"), tr("Close"), "", this, SLOT(endGame()), toolbar); 143 new QToolButton(Resource::loadPixmap("finish"), tr("Close"), "", this, SLOT(endGame()), toolbar);
144 toolbar->setStretchableWidget(scoreinfo); 144 toolbar->setStretchableWidget(scoreinfo);
145 145
146 cpu = 0; 146 cpu = 0;
147 board = 0; 147 board = 0;
148 bag = 0; 148 bag = 0;
149 racks = 0; 149 racks = 0;
150 150
151 aiheart = new QTimer(this); 151 aiheart = new QTimer(this);
152 connect(aiheart, SIGNAL(timeout()), this, SLOT(think())); 152 connect(aiheart, SIGNAL(timeout()), this, SLOT(think()));
153 153
154 readConfig(); 154 readConfig();
155} 155}
156 156
157WordGame::~WordGame() 157WordGame::~WordGame()
158{ 158{
159 writeConfig(); 159 writeConfig();
160} 160}
161 161
162void WordGame::writeConfig() 162void WordGame::writeConfig()
163{ 163{
164 Config cfg("WordGame"); 164 Config cfg("WordGame");
165 cfg.setGroup("Game"); 165 cfg.setGroup("Game");
166 cfg.writeEntry("NameList",namelist,';'); 166 cfg.writeEntry("NameList",namelist,';');
167 cfg.writeEntry("CurrentPlayer",gameover ? 0 : player+1); 167 cfg.writeEntry("CurrentPlayer",gameover ? 0 : player+1);
168 if ( !gameover ) { 168 if ( !gameover ) {
169 cfg.writeEntry("Rules",rules); 169 cfg.writeEntry("Rules",rules);
170 bag->writeConfig(cfg); 170 bag->writeConfig(cfg);
171 board->writeConfig(cfg); 171 board->writeConfig(cfg);
172 scoreinfo->writeConfig(cfg); 172 scoreinfo->writeConfig(cfg);
173 } 173 }
174 for (int p=0; p<nplayers; p++) { 174 for (int p=0; p<nplayers; p++) {
175 cfg.setGroup("Player"+QString::number(p+1)); 175 cfg.setGroup("Player"+QString::number(p+1));
176 if ( gameover ) cfg.clearGroup(); else rack(p)->writeConfig(cfg); 176 if ( gameover ) cfg.clearGroup(); else rack(p)->writeConfig(cfg);
177 } 177 }
178} 178}
179 179
180void WordGame::readConfig() 180void WordGame::readConfig()
181{ 181{
182 Config cfg("WordGame"); 182 Config cfg("WordGame");
183 cfg.setGroup("Game"); 183 cfg.setGroup("Game");
184 int currentplayer = cfg.readNumEntry("CurrentPlayer",0); 184 int currentplayer = cfg.readNumEntry("CurrentPlayer",0);
185 QStringList pnames = cfg.readListEntry("NameList",';'); 185 QStringList pnames = cfg.readListEntry("NameList",';');
diff --git a/noncore/graphics/drawpad/drawpad.cpp b/noncore/graphics/drawpad/drawpad.cpp
index feae237..86a10a5 100644
--- a/noncore/graphics/drawpad/drawpad.cpp
+++ b/noncore/graphics/drawpad/drawpad.cpp
@@ -1,293 +1,293 @@
1/*************************************************************************** 1/***************************************************************************
2 * * 2 * *
3 * DrawPad - a drawing program for Opie Environment * 3 * DrawPad - a drawing program for Opie Environment *
4 * * 4 * *
5 * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> * 5 * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> *
6 * * 6 * *
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 ***************************************************************************/ 12 ***************************************************************************/
13 13
14#include "drawpad.h" 14#include "drawpad.h"
15 15
16#include "drawpadcanvas.h" 16#include "drawpadcanvas.h"
17#include "ellipsetool.h" 17#include "ellipsetool.h"
18#include "erasetool.h" 18#include "erasetool.h"
19#include "exportdialog.h" 19#include "exportdialog.h"
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 <qmenubar.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 QToolBar* menuToolBar = new QToolBar(this);
68 QMenuBar* menuBar = new QMenuBar(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 QToolBar* pageToolBar = new QToolBar(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." ) );
117 117
118 QAction* deletePageAction = new QAction(tr("Delete Page"), Resource::loadPixmap("trash"), QString::null, 0, this); 118 QAction* deletePageAction = new QAction(tr("Delete Page"), Resource::loadPixmap("trash"), QString::null, 0, this);
119 connect(deletePageAction, SIGNAL(activated()), this, SLOT(deletePage())); 119 connect(deletePageAction, SIGNAL(activated()), this, SLOT(deletePage()));
120 deletePageAction->addTo(pageToolBar); 120 deletePageAction->addTo(pageToolBar);
121 deletePageAction->setWhatsThis( tr( "Click here to remove the current sheet." ) ); 121 deletePageAction->setWhatsThis( tr( "Click here to remove the current sheet." ) );
122 122
123 QPEToolBar* emptyToolBar = new QPEToolBar(this); 123 QToolBar* emptyToolBar = new QToolBar(this);
124 emptyToolBar->setHorizontalStretchable(true); 124 emptyToolBar->setHorizontalStretchable(true);
125 125
126 // init navigation toolbar 126 // init navigation toolbar
127 127
128 QPEToolBar* navigationToolBar = new QPEToolBar(this); 128 QToolBar* navigationToolBar = new QToolBar(this);
129 129
130 m_pUndoAction = new QAction(tr("Undo"), Resource::loadIconSet("undo"), QString::null, 0, this); 130 m_pUndoAction = new QAction(tr("Undo"), Resource::loadIconSet("undo"), QString::null, 0, this);
131 connect(m_pUndoAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(undo())); 131 connect(m_pUndoAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(undo()));
132 m_pUndoAction->addTo(navigationToolBar); 132 m_pUndoAction->addTo(navigationToolBar);
133 m_pUndoAction->setWhatsThis( tr( "Click here to undo the last action." ) ); 133 m_pUndoAction->setWhatsThis( tr( "Click here to undo the last action." ) );
134 134
135 m_pRedoAction = new QAction(tr("Redo"), Resource::loadIconSet("redo"), QString::null, 0, this); 135 m_pRedoAction = new QAction(tr("Redo"), Resource::loadIconSet("redo"), QString::null, 0, this);
136 connect(m_pRedoAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(redo())); 136 connect(m_pRedoAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(redo()));
137 m_pRedoAction->addTo(navigationToolBar); 137 m_pRedoAction->addTo(navigationToolBar);
138 m_pRedoAction->setWhatsThis( tr( "Click here to re-perform the last action." ) ); 138 m_pRedoAction->setWhatsThis( tr( "Click here to re-perform the last action." ) );
139 139
140 m_pFirstPageAction = new QAction(tr("First Page"), Resource::loadIconSet("fastback"), QString::null, 0, this); 140 m_pFirstPageAction = new QAction(tr("First Page"), Resource::loadIconSet("fastback"), QString::null, 0, this);
141 connect(m_pFirstPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goFirstPage())); 141 connect(m_pFirstPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goFirstPage()));
142 m_pFirstPageAction->addTo(navigationToolBar); 142 m_pFirstPageAction->addTo(navigationToolBar);
143 m_pFirstPageAction->setWhatsThis( tr( "Click here to view the first page." ) ); 143 m_pFirstPageAction->setWhatsThis( tr( "Click here to view the first page." ) );
144 144
145 m_pPreviousPageAction = new QAction(tr("Previous Page"), Resource::loadIconSet("back"), QString::null, 0, this); 145 m_pPreviousPageAction = new QAction(tr("Previous Page"), Resource::loadIconSet("back"), QString::null, 0, this);
146 connect(m_pPreviousPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goPreviousPage())); 146 connect(m_pPreviousPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goPreviousPage()));
147 m_pPreviousPageAction->addTo(navigationToolBar); 147 m_pPreviousPageAction->addTo(navigationToolBar);
148 m_pPreviousPageAction->setWhatsThis( tr( "Click here to view the previous page." ) ); 148 m_pPreviousPageAction->setWhatsThis( tr( "Click here to view the previous page." ) );
149 149
150 m_pNextPageAction = new QAction(tr("Next Page"), Resource::loadIconSet("forward"), QString::null, 0, this); 150 m_pNextPageAction = new QAction(tr("Next Page"), Resource::loadIconSet("forward"), QString::null, 0, this);
151 connect(m_pNextPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goNextPage())); 151 connect(m_pNextPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goNextPage()));
152 m_pNextPageAction->addTo(navigationToolBar); 152 m_pNextPageAction->addTo(navigationToolBar);
153 m_pNextPageAction->setWhatsThis( tr( "Click here to view the next page." ) ); 153 m_pNextPageAction->setWhatsThis( tr( "Click here to view the next page." ) );
154 154
155 m_pLastPageAction = new QAction(tr("Last Page"), Resource::loadIconSet("fastforward"), QString::null, 0, this); 155 m_pLastPageAction = new QAction(tr("Last Page"), Resource::loadIconSet("fastforward"), QString::null, 0, this);
156 connect(m_pLastPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goLastPage())); 156 connect(m_pLastPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goLastPage()));
157 m_pLastPageAction->addTo(navigationToolBar); 157 m_pLastPageAction->addTo(navigationToolBar);
158 m_pLastPageAction->setWhatsThis( tr( "Click here to view the last page." ) ); 158 m_pLastPageAction->setWhatsThis( tr( "Click here to view the last page." ) );
159 159
160 // init draw mode toolbar 160 // init draw mode toolbar
161 161
162 QPEToolBar* drawModeToolBar = new QPEToolBar(this); 162 QToolBar* drawModeToolBar = new QToolBar(this);
163 163
164 m_pLineToolButton = new QToolButton(drawModeToolBar); 164 m_pLineToolButton = new QToolButton(drawModeToolBar);
165 m_pLineToolButton->setToggleButton(true); 165 m_pLineToolButton->setToggleButton(true);
166 QWhatsThis::add( m_pLineToolButton, tr( "Click here to select one of the available tools to draw lines." ) ); 166 QWhatsThis::add( m_pLineToolButton, tr( "Click here to select one of the available tools to draw lines." ) );
167 167
168 168
169 QPopupMenu* linePopupMenu = new QPopupMenu(m_pLineToolButton); 169 QPopupMenu* linePopupMenu = new QPopupMenu(m_pLineToolButton);
170 170
171 m_pPointToolAction = new QAction(tr("Draw Point"), Resource::loadPixmap("drawpad/point"), "", 0, this); 171 m_pPointToolAction = new QAction(tr("Draw Point"), Resource::loadPixmap("drawpad/point"), "", 0, this);
172 connect(m_pPointToolAction, SIGNAL(activated()), this, SLOT(setPointTool())); 172 connect(m_pPointToolAction, SIGNAL(activated()), this, SLOT(setPointTool()));
173 m_pPointToolAction->addTo(linePopupMenu); 173 m_pPointToolAction->addTo(linePopupMenu);
174 174
175 m_pLineToolAction = new QAction(tr("Draw Line"), Resource::loadPixmap("drawpad/line"), "", 0, this); 175 m_pLineToolAction = new QAction(tr("Draw Line"), Resource::loadPixmap("drawpad/line"), "", 0, this);
176 connect(m_pLineToolAction, SIGNAL(activated()), this, SLOT(setLineTool())); 176 connect(m_pLineToolAction, SIGNAL(activated()), this, SLOT(setLineTool()));
177 m_pLineToolAction->addTo(linePopupMenu); 177 m_pLineToolAction->addTo(linePopupMenu);
178 178
179 m_pLineToolButton->setPopup(linePopupMenu); 179 m_pLineToolButton->setPopup(linePopupMenu);
180 m_pLineToolButton->setPopupDelay(0); 180 m_pLineToolButton->setPopupDelay(0);
181 181
182 m_pRectangleToolButton = new QToolButton(drawModeToolBar); 182 m_pRectangleToolButton = new QToolButton(drawModeToolBar);
183 m_pRectangleToolButton->setToggleButton(true); 183 m_pRectangleToolButton->setToggleButton(true);
184 QWhatsThis::add( m_pRectangleToolButton, tr( "Click here to select one of the available tools to draw rectangles." ) ); 184 QWhatsThis::add( m_pRectangleToolButton, tr( "Click here to select one of the available tools to draw rectangles." ) );
185 185
186 QPopupMenu* rectanglePopupMenu = new QPopupMenu(m_pRectangleToolButton); 186 QPopupMenu* rectanglePopupMenu = new QPopupMenu(m_pRectangleToolButton);
187 187
188 m_pRectangleToolAction = new QAction(tr("Draw Rectangle"), Resource::loadPixmap("drawpad/rectangle"), "", 0, this); 188 m_pRectangleToolAction = new QAction(tr("Draw Rectangle"), Resource::loadPixmap("drawpad/rectangle"), "", 0, this);
189 connect(m_pRectangleToolAction, SIGNAL(activated()), this, SLOT(setRectangleTool())); 189 connect(m_pRectangleToolAction, SIGNAL(activated()), this, SLOT(setRectangleTool()));
190 m_pRectangleToolAction->addTo(rectanglePopupMenu); 190 m_pRectangleToolAction->addTo(rectanglePopupMenu);
191 191
192 m_pFilledRectangleToolAction = new QAction(tr("Draw Filled Rectangle"), Resource::loadPixmap("drawpad/filledrectangle"), "", 0, this); 192 m_pFilledRectangleToolAction = new QAction(tr("Draw Filled Rectangle"), Resource::loadPixmap("drawpad/filledrectangle"), "", 0, this);
193 connect(m_pFilledRectangleToolAction, SIGNAL(activated()), this, SLOT(setFilledRectangleTool())); 193 connect(m_pFilledRectangleToolAction, SIGNAL(activated()), this, SLOT(setFilledRectangleTool()));
194 m_pFilledRectangleToolAction->addTo(rectanglePopupMenu); 194 m_pFilledRectangleToolAction->addTo(rectanglePopupMenu);
195 195
196 m_pRectangleToolButton->setPopup(rectanglePopupMenu); 196 m_pRectangleToolButton->setPopup(rectanglePopupMenu);
197 m_pRectangleToolButton->setPopupDelay(0); 197 m_pRectangleToolButton->setPopupDelay(0);
198 198
199 m_pEllipseToolButton = new QToolButton(drawModeToolBar); 199 m_pEllipseToolButton = new QToolButton(drawModeToolBar);
200 m_pEllipseToolButton->setToggleButton(true); 200 m_pEllipseToolButton->setToggleButton(true);
201 QWhatsThis::add( m_pEllipseToolButton, tr( "Click here to select one of the available tools to draw ellipses." ) ); 201 QWhatsThis::add( m_pEllipseToolButton, tr( "Click here to select one of the available tools to draw ellipses." ) );
202 202
203 QPopupMenu* ellipsePopupMenu = new QPopupMenu(m_pEllipseToolButton); 203 QPopupMenu* ellipsePopupMenu = new QPopupMenu(m_pEllipseToolButton);
204 204
205 m_pEllipseToolAction = new QAction(tr("Draw Ellipse"), Resource::loadPixmap("drawpad/ellipse"), "", 0, this); 205 m_pEllipseToolAction = new QAction(tr("Draw Ellipse"), Resource::loadPixmap("drawpad/ellipse"), "", 0, this);
206 connect(m_pEllipseToolAction, SIGNAL(activated()), this, SLOT(setEllipseTool())); 206 connect(m_pEllipseToolAction, SIGNAL(activated()), this, SLOT(setEllipseTool()));
207 m_pEllipseToolAction->addTo(ellipsePopupMenu); 207 m_pEllipseToolAction->addTo(ellipsePopupMenu);
208 208
209 m_pFilledEllipseToolAction = new QAction(tr("Draw Filled Ellipse"), Resource::loadPixmap("drawpad/filledellipse"), "", 0, this); 209 m_pFilledEllipseToolAction = new QAction(tr("Draw Filled Ellipse"), Resource::loadPixmap("drawpad/filledellipse"), "", 0, this);
210 connect(m_pFilledEllipseToolAction, SIGNAL(activated()), this, SLOT(setFilledEllipseTool())); 210 connect(m_pFilledEllipseToolAction, SIGNAL(activated()), this, SLOT(setFilledEllipseTool()));
211 m_pFilledEllipseToolAction->addTo(ellipsePopupMenu); 211 m_pFilledEllipseToolAction->addTo(ellipsePopupMenu);
212 212
213 m_pEllipseToolButton->setPopup(ellipsePopupMenu); 213 m_pEllipseToolButton->setPopup(ellipsePopupMenu);
214 m_pEllipseToolButton->setPopupDelay(0); 214 m_pEllipseToolButton->setPopupDelay(0);
215 215
216 m_pTextToolAction = new QAction(tr("Insert Text"), Resource::loadPixmap("drawpad/text"), QString::null, 0, this); 216 m_pTextToolAction = new QAction(tr("Insert Text"), Resource::loadPixmap("drawpad/text"), QString::null, 0, this);
217 m_pTextToolAction->setToggleAction(true); 217 m_pTextToolAction->setToggleAction(true);
218 connect(m_pTextToolAction, SIGNAL(activated()), this, SLOT(setTextTool())); 218 connect(m_pTextToolAction, SIGNAL(activated()), this, SLOT(setTextTool()));
219 m_pTextToolAction->addTo(drawModeToolBar); 219 m_pTextToolAction->addTo(drawModeToolBar);
220 m_pTextToolAction->setWhatsThis( tr( "Click here to select the text drawing tool." ) ); 220 m_pTextToolAction->setWhatsThis( tr( "Click here to select the text drawing tool." ) );
221 221
222 m_pFillToolAction = new QAction(tr("Fill Region"), Resource::loadPixmap("drawpad/fill"), QString::null, 0, this); 222 m_pFillToolAction = new QAction(tr("Fill Region"), Resource::loadPixmap("drawpad/fill"), QString::null, 0, this);
223 m_pFillToolAction->setToggleAction(true); 223 m_pFillToolAction->setToggleAction(true);
224 connect(m_pFillToolAction, SIGNAL(activated()), this, SLOT(setFillTool())); 224 connect(m_pFillToolAction, SIGNAL(activated()), this, SLOT(setFillTool()));
225 m_pFillToolAction->addTo(drawModeToolBar); 225 m_pFillToolAction->addTo(drawModeToolBar);
226 m_pFillToolAction->setWhatsThis( tr( "Click here to select the fill tool." ) ); 226 m_pFillToolAction->setWhatsThis( tr( "Click here to select the fill tool." ) );
227 227
228 m_pEraseToolAction = new QAction(tr("Erase Point"), Resource::loadPixmap("drawpad/erase"), QString::null, 0, this); 228 m_pEraseToolAction = new QAction(tr("Erase Point"), Resource::loadPixmap("drawpad/erase"), QString::null, 0, this);
229 m_pEraseToolAction->setToggleAction(true); 229 m_pEraseToolAction->setToggleAction(true);
230 connect(m_pEraseToolAction, SIGNAL(activated()), this, SLOT(setEraseTool())); 230 connect(m_pEraseToolAction, SIGNAL(activated()), this, SLOT(setEraseTool()));
231 m_pEraseToolAction->addTo(drawModeToolBar); 231 m_pEraseToolAction->addTo(drawModeToolBar);
232 m_pEraseToolAction->setWhatsThis( tr( "Click here to select the eraser tool." ) ); 232 m_pEraseToolAction->setWhatsThis( tr( "Click here to select the eraser tool." ) );
233 233
234 m_pTool = 0; 234 m_pTool = 0;
235 setRectangleTool(); 235 setRectangleTool();
236 setEllipseTool(); 236 setEllipseTool();
237 setPointTool(); 237 setPointTool();
238 238
239 emptyToolBar = new QPEToolBar(this); 239 emptyToolBar = new QToolBar(this);
240 emptyToolBar->setHorizontalStretchable(true); 240 emptyToolBar->setHorizontalStretchable(true);
241 emptyToolBar->addSeparator(); 241 emptyToolBar->addSeparator();
242 242
243 // init draw parameters toolbar 243 // init draw parameters toolbar
244 244
245 QPEToolBar* drawParametersToolBar = new QPEToolBar(this); 245 QToolBar* drawParametersToolBar = new QToolBar(this);
246 246
247 m_pPenWidthSpinBox = new QSpinBox(1, 9, 1, drawParametersToolBar); 247 m_pPenWidthSpinBox = new QSpinBox(1, 9, 1, drawParametersToolBar);
248 connect(m_pPenWidthSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changePenWidth(int))); 248 connect(m_pPenWidthSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changePenWidth(int)));
249 249
250 QToolTip::add(m_pPenWidthSpinBox, tr("Pen Width")); 250 QToolTip::add(m_pPenWidthSpinBox, tr("Pen Width"));
251 m_pPenWidthSpinBox->setValue(1); 251 m_pPenWidthSpinBox->setValue(1);
252 m_pPenWidthSpinBox->setFocusPolicy(QWidget::NoFocus); 252 m_pPenWidthSpinBox->setFocusPolicy(QWidget::NoFocus);
253 QWhatsThis::add( m_pPenWidthSpinBox, tr( "Click here to select the width of the drawing pen." ) ); 253 QWhatsThis::add( m_pPenWidthSpinBox, tr( "Click here to select the width of the drawing pen." ) );
254 254
255 m_pPenColorToolButton = new QToolButton(drawParametersToolBar); 255 m_pPenColorToolButton = new QToolButton(drawParametersToolBar);
256 m_pPenColorToolButton->setPixmap(Resource::loadPixmap("drawpad/pencolor")); 256 m_pPenColorToolButton->setPixmap(Resource::loadPixmap("drawpad/pencolor"));
257 QWhatsThis::add( m_pPenColorToolButton, tr( "Click here to select the color used when drawing." ) ); 257 QWhatsThis::add( m_pPenColorToolButton, tr( "Click here to select the color used when drawing." ) );
258 258
259 OColorPopupMenu* penColorPopupMenu = new OColorPopupMenu(Qt::black, m_pPenColorToolButton); 259 OColorPopupMenu* penColorPopupMenu = new OColorPopupMenu(Qt::black, m_pPenColorToolButton);
260 connect(penColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, SLOT(changePenColor(const QColor&))); 260 connect(penColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, SLOT(changePenColor(const QColor&)));
261 261
262 QToolTip::add(m_pPenColorToolButton, tr("Pen Color")); 262 QToolTip::add(m_pPenColorToolButton, tr("Pen Color"));
263 m_pPenColorToolButton->setPopup(penColorPopupMenu); 263 m_pPenColorToolButton->setPopup(penColorPopupMenu);
264 m_pPenColorToolButton->setPopupDelay(0); 264 m_pPenColorToolButton->setPopupDelay(0);
265 265
266 changePenColor(Qt::black); 266 changePenColor(Qt::black);
267 267
268 m_pBrushColorToolButton = new QToolButton(drawParametersToolBar); 268 m_pBrushColorToolButton = new QToolButton(drawParametersToolBar);
269 m_pBrushColorToolButton->setPixmap(Resource::loadPixmap("drawpad/brushcolor")); 269 m_pBrushColorToolButton->setPixmap(Resource::loadPixmap("drawpad/brushcolor"));
270 QWhatsThis::add( m_pBrushColorToolButton, tr( "Click here to select the color used when filling in areas." ) ); 270 QWhatsThis::add( m_pBrushColorToolButton, tr( "Click here to select the color used when filling in areas." ) );
271 271
272 OColorPopupMenu* brushColorPopupMenu = new OColorPopupMenu(Qt::white, m_pBrushColorToolButton); 272 OColorPopupMenu* brushColorPopupMenu = new OColorPopupMenu(Qt::white, m_pBrushColorToolButton);
273 connect(brushColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, SLOT(changeBrushColor(const QColor&))); 273 connect(brushColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, SLOT(changeBrushColor(const QColor&)));
274 274
275 QToolTip::add(m_pBrushColorToolButton, tr("Fill Color")); 275 QToolTip::add(m_pBrushColorToolButton, tr("Fill Color"));
276 m_pBrushColorToolButton->setPopup(brushColorPopupMenu); 276 m_pBrushColorToolButton->setPopup(brushColorPopupMenu);
277 m_pBrushColorToolButton->setPopupDelay(0); 277 m_pBrushColorToolButton->setPopupDelay(0);
278 278
279 changeBrushColor(Qt::white); 279 changeBrushColor(Qt::white);
280 280
281 finishStartup(); 281 finishStartup();
282} 282}
283 283
284 284
285void DrawPad::finishStartup() 285void DrawPad::finishStartup()
286{ 286{
287 // init pages 287 // init pages
288 288
289 QFile file(Global::applicationFileName("drawpad", "drawpad.xml")); 289 QFile file(Global::applicationFileName("drawpad", "drawpad.xml"));
290 290
291 if (file.open(IO_ReadOnly)) { 291 if (file.open(IO_ReadOnly)) {
292 m_pDrawPadCanvas->load(&file); 292 m_pDrawPadCanvas->load(&file);
293 file.close(); 293 file.close();
diff --git a/noncore/multimedia/opierec/helpwindow.cpp b/noncore/multimedia/opierec/helpwindow.cpp
index 1ab6510..a3b29fa 100644
--- a/noncore/multimedia/opierec/helpwindow.cpp
+++ b/noncore/multimedia/opierec/helpwindow.cpp
@@ -1,87 +1,87 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$ 2** $Id$
3** 3**
4** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. 4** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
5** 5**
6** This file is part of an example program for Qt. This example 6** This file is part of an example program for Qt. This example
7** program may be used, distributed and modified without limitation. 7** program may be used, distributed and modified without limitation.
8** 8**
9*****************************************************************************/ 9*****************************************************************************/
10 10
11#include "helpwindow.h" 11#include "helpwindow.h"
12#include <qlayout.h> 12#include <qlayout.h>
13 13
14#include <qpe/qpetoolbar.h> 14#include <qpe/qpetoolbar.h>
15#include <qpe/resource.h> 15#include <qpe/resource.h>
16 16
17#include <qaction.h> 17#include <qaction.h>
18#include <qmenubar.h> 18#include <qmenubar.h>
19 19
20#include <ctype.h> 20#include <ctype.h>
21 21
22HelpWindow::HelpWindow( const QString& home_, const QString& _path, QWidget* parent, const char *name ) 22HelpWindow::HelpWindow( const QString& home_, const QString& _path, QWidget* parent, const char *name )
23 : QMainWindow( parent, name, WDestructiveClose ), pathCombo( 0 ), selectedURL() 23 : QMainWindow( parent, name, WDestructiveClose ), pathCombo( 0 ), selectedURL()
24{ 24{
25 QGridLayout *layout = new QGridLayout( this ); 25 QGridLayout *layout = new QGridLayout( this );
26 layout->setSpacing( 2); 26 layout->setSpacing( 2);
27 layout->setMargin( 2); 27 layout->setMargin( 2);
28 qDebug(_path); 28 qDebug(_path);
29 browser = new QTextBrowser( this ); 29 browser = new QTextBrowser( this );
30 QStringList Strlist; 30 QStringList Strlist;
31 Strlist.append( home_); 31 Strlist.append( home_);
32 browser->mimeSourceFactory()->setFilePath( Strlist ); 32 browser->mimeSourceFactory()->setFilePath( Strlist );
33 browser->setFrameStyle( QFrame::Panel | QFrame::Sunken ); 33 browser->setFrameStyle( QFrame::Panel | QFrame::Sunken );
34 34
35 connect( browser, SIGNAL( textChanged() ), this, SLOT( textChanged() ) ); 35 connect( browser, SIGNAL( textChanged() ), this, SLOT( textChanged() ) );
36 36
37 if ( !home_.isEmpty() ) 37 if ( !home_.isEmpty() )
38 browser->setSource( home_ ); 38 browser->setSource( home_ );
39 QPEToolBar *toolbar = new QPEToolBar( this ); 39 QToolBar *toolbar = new QToolBar( this );
40 40
41 QAction *a = new QAction( tr( "Backward" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 ); 41 QAction *a = new QAction( tr( "Backward" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 );
42 connect( a, SIGNAL( activated() ), browser, SLOT( backward() ) ); 42 connect( a, SIGNAL( activated() ), browser, SLOT( backward() ) );
43 a->addTo( toolbar ); 43 a->addTo( toolbar );
44 44
45 a = new QAction( tr( "Forward" ), Resource::loadPixmap( "forward" ), QString::null, 0, this, 0 ); 45 a = new QAction( tr( "Forward" ), Resource::loadPixmap( "forward" ), QString::null, 0, this, 0 );
46 connect( a, SIGNAL( activated() ), browser, SLOT( forward() ) ); 46 connect( a, SIGNAL( activated() ), browser, SLOT( forward() ) );
47 a->addTo( toolbar ); 47 a->addTo( toolbar );
48 48
49 49
50 layout->addMultiCellWidget( toolbar, 0, 0, 0, 0); 50 layout->addMultiCellWidget( toolbar, 0, 0, 0, 0);
51 51
52 layout->addMultiCellWidget( browser, 1, 2, 0, 2); 52 layout->addMultiCellWidget( browser, 1, 2, 0, 2);
53 53
54 browser->setFocus(); 54 browser->setFocus();
55} 55}
56 56
57 57
58void HelpWindow::setBackwardAvailable( bool b) 58void HelpWindow::setBackwardAvailable( bool b)
59{ 59{
60 menuBar()->setItemEnabled( backwardId, b); 60 menuBar()->setItemEnabled( backwardId, b);
61} 61}
62 62
63void HelpWindow::setForwardAvailable( bool b) 63void HelpWindow::setForwardAvailable( bool b)
64{ 64{
65 menuBar()->setItemEnabled( forwardId, b); 65 menuBar()->setItemEnabled( forwardId, b);
66} 66}
67 67
68 68
69void HelpWindow::textChanged() 69void HelpWindow::textChanged()
70{ 70{
71 if ( browser->documentTitle().isNull() ) { 71 if ( browser->documentTitle().isNull() ) {
72 setCaption( "QpeRec - Helpviewer - " + browser->context() ); 72 setCaption( "QpeRec - Helpviewer - " + browser->context() );
73 selectedURL = browser->context(); 73 selectedURL = browser->context();
74 } 74 }
75 else { 75 else {
76 setCaption( "QpeRec - Helpviewer - " + browser->documentTitle() ) ; 76 setCaption( "QpeRec - Helpviewer - " + browser->documentTitle() ) ;
77 selectedURL = browser->documentTitle(); 77 selectedURL = browser->documentTitle();
78 } 78 }
79 79
80// if ( !selectedURL.isEmpty() && pathCombo ) { 80// if ( !selectedURL.isEmpty() && pathCombo ) {
81// bool exists = FALSE; 81// bool exists = FALSE;
82// int i; 82// int i;
83// for ( i = 0; i < pathCombo->count(); ++i ) { 83// for ( i = 0; i < pathCombo->count(); ++i ) {
84// if ( pathCombo->text( i ) == selectedURL ) { 84// if ( pathCombo->text( i ) == selectedURL ) {
85// exists = TRUE; 85// exists = TRUE;
86// break; 86// break;
87// } 87// }
diff --git a/noncore/multimedia/showimg/showimg.cpp b/noncore/multimedia/showimg/showimg.cpp
index b7754f7..ba76e57 100644
--- a/noncore/multimedia/showimg/showimg.cpp
+++ b/noncore/multimedia/showimg/showimg.cpp
@@ -1,87 +1,87 @@
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// Full-screen and rotation options contributed by Robert Wittams <robert@wittams.com> 22// Full-screen and rotation options contributed by Robert Wittams <robert@wittams.com>
23// 23//
24 24
25#include "showimg.h" 25#include "showimg.h"
26#include "ImageFileSelector.h" 26#include "ImageFileSelector.h"
27#include "settingsdialog.h" 27#include "settingsdialog.h"
28 28
29 29
30#include <opie/ofiledialog.h> 30#include <opie/ofiledialog.h>
31 31
32#include <qpe/qpeapplication.h> 32#include <qpe/qpeapplication.h>
33#include <qpe/config.h> 33#include <qpe/config.h>
34#include <qpe/resource.h> 34#include <qpe/resource.h>
35#include <qpe/fileselector.h> 35#include <qpe/fileselector.h>
36#include <qpe/applnk.h> 36#include <qpe/applnk.h>
37#include <qfileinfo.h> 37#include <qfileinfo.h>
38#include <math.h> 38#include <math.h>
39#include <qpe/qpemenubar.h> 39#include <qmenubar.h>
40#include <qwidgetstack.h> 40#include <qwidgetstack.h>
41#include <qpe/qpetoolbar.h> 41#include <qpe/qpetoolbar.h>
42#include <qaction.h> 42#include <qaction.h>
43#include <qfiledialog.h> 43#include <qfiledialog.h>
44#include <qmessagebox.h> 44#include <qmessagebox.h>
45#include <qpopupmenu.h> 45#include <qpopupmenu.h>
46#include <qscrollview.h> 46#include <qscrollview.h>
47#include <qlabel.h> 47#include <qlabel.h>
48#include <qpainter.h> 48#include <qpainter.h>
49#include <qkeycode.h> 49#include <qkeycode.h>
50#include <qapplication.h> 50#include <qapplication.h>
51#include <qclipboard.h> 51#include <qclipboard.h>
52#include <qtimer.h> 52#include <qtimer.h>
53#include <qspinbox.h> 53#include <qspinbox.h>
54 54
55 55
56 56
57ControlsDialog::ControlsDialog(const QString &caption,QImage image,int *brightness,QWidget *parent) 57ControlsDialog::ControlsDialog(const QString &caption,QImage image,int *brightness,QWidget *parent)
58 : QDialog(parent,0,true) 58 : QDialog(parent,0,true)
59{ 59{
60 setCaption(caption); 60 setCaption(caption);
61 61
62 if ( parent ) { 62 if ( parent ) {
63 setPalette(parent->palette()); 63 setPalette(parent->palette());
64 } 64 }
65 65
66 b=brightness; 66 b=brightness;
67 img=image; 67 img=image;
68 68
69 setMinimumSize(140,80); 69 setMinimumSize(140,80);
70 70
71 QGridLayout *gl= new QGridLayout(this,2,2,4,4); 71 QGridLayout *gl= new QGridLayout(this,2,2,4,4);
72 72
73 pixmap =new ImageWidget(this);; 73 pixmap =new ImageWidget(this);;
74 QPixmap pm; 74 QPixmap pm;
75 pm.convertFromImage(img); 75 pm.convertFromImage(img);
76 pixmap->setPixmap(pm); 76 pixmap->setPixmap(pm);
77 pixmap->setMinimumSize(pm.width(),pm.height()); 77 pixmap->setMinimumSize(pm.width(),pm.height());
78 gl->addMultiCellWidget(pixmap,0,0,0,2,AlignCenter); 78 gl->addMultiCellWidget(pixmap,0,0,0,2,AlignCenter);
79 QLabel *l=new QLabel(tr("Brightness")+":",this); 79 QLabel *l=new QLabel(tr("Brightness")+":",this);
80 gl->addWidget(l,1,0,AlignLeft); 80 gl->addWidget(l,1,0,AlignLeft);
81 spb=new QSpinBox(-100,100,2,this); 81 spb=new QSpinBox(-100,100,2,this);
82 gl->addWidget(spb,1,1,AlignRight); 82 gl->addWidget(spb,1,1,AlignRight);
83 83
84 spb->setValue(0); 84 spb->setValue(0);
85 85
86 connect(spb,SIGNAL(valueChanged(int)),this, SLOT(bValueChanged(int))); 86 connect(spb,SIGNAL(valueChanged(int)),this, SLOT(bValueChanged(int)));
87 87
@@ -183,183 +183,183 @@ void ImagePane::setPixmap( const QPixmap &pm )
183} 183}
184 184
185void ImagePane::imageClicked() 185void 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 QToolBar( this );
232 toolBar->setHorizontalStretchable( TRUE ); 232 toolBar->setHorizontalStretchable( TRUE );
233 233
234 menuBar = new QMenuBar( 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);
283 viewMenuView->insertItem(tr("Vertical flip"), this, SLOT(vFlip()), 0); 283 viewMenuView->insertItem(tr("Vertical flip"), this, SLOT(vFlip()), 0);
284 284
285 stack = new QWidgetStack( this ); 285 stack = new QWidgetStack( this );
286 stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); 286 stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
287 setCentralWidget( stack ); 287 setCentralWidget( stack );
288 288
289 289
290 imagePanel = new ImagePane( stack ); 290 imagePanel = new ImagePane( stack );
291 connect(imagePanel, SIGNAL(clicked()), this, SLOT(normalView())); 291 connect(imagePanel, SIGNAL(clicked()), this, SLOT(normalView()));
292 292
293 293
294 ImageFileSelector::CURRENT_VIEW cv; 294 ImageFileSelector::CURRENT_VIEW cv;
295 if(showThumbView) 295 if(showThumbView)
296 cv=ImageFileSelector::THUMBNAIL; 296 cv=ImageFileSelector::THUMBNAIL;
297 else 297 else
298 cv=ImageFileSelector::DETAILED; 298 cv=ImageFileSelector::DETAILED;
299 299
300 qDebug("cv = %d",cv); 300 qDebug("cv = %d",cv);
301 301
302 fileSelector = new ImageFileSelector( cv,stack, "fs"); 302 fileSelector = new ImageFileSelector( cv,stack, "fs");
303 303
304 //switchThumbView(); 304 //switchThumbView();
305 305
306 306
307 //fileSelector = new ImageFileSelector("image/*", stack, "fs"); 307 //fileSelector = new ImageFileSelector("image/*", stack, "fs");
308 //fileSelector->setNewVisible(FALSE); 308 //fileSelector->setNewVisible(FALSE);
309 //fileSelector->setCloseVisible(FALSE); 309 //fileSelector->setCloseVisible(FALSE);
310 connect( fileSelector, SIGNAL( closeMe() ), this, SLOT( closeFileSelector() ) ); 310 connect( fileSelector, SIGNAL( closeMe() ), this, SLOT( closeFileSelector() ) );
311 connect( fileSelector, SIGNAL( fileSelected( const DocLnk &) ), 311 connect( fileSelector, SIGNAL( fileSelected( const DocLnk &) ),
312 this, SLOT( openFile( const DocLnk & ) ) ); 312 this, SLOT( openFile( const DocLnk & ) ) );
313 313
314 imageList = fileSelector->fileList(); 314 imageList = fileSelector->fileList();
315 slideAction->setEnabled( imageList.count() != 0); 315 slideAction->setEnabled( imageList.count() != 0);
316 316
317 iconToolBar = new QPEToolBar(this); 317 iconToolBar = new QToolBar(this);
318 318
319 QAction *a; 319 QAction *a;
320 320
321 a = new QAction( tr( "Open ..." ), Resource::loadPixmap( "fileopen" ), QString::null, 0, this, 0 ); 321 a = new QAction( tr( "Open ..." ), Resource::loadPixmap( "fileopen" ), QString::null, 0, this, 0 );
322 connect( a, SIGNAL( activated() ), this, SLOT( open() ) ); 322 connect( a, SIGNAL( activated() ), this, SLOT( open() ) );
323 a->addTo( fileMenuView); 323 a->addTo( fileMenuView);
324 a->addTo( iconToolBar ); 324 a->addTo( iconToolBar );
325 325
326 326
327 a = new QAction( tr( "Rotate 90"), Resource::loadPixmap( "rotate90" ), QString::null, 0, this, 0); 327 a = new QAction( tr( "Rotate 90"), Resource::loadPixmap( "rotate90" ), QString::null, 0, this, 0);
328 connect( a, SIGNAL( activated() ), this, SLOT( rot90() ) ); 328 connect( a, SIGNAL( activated() ), this, SLOT( rot90() ) );
329 a->addTo( iconToolBar ); 329 a->addTo( iconToolBar );
330 a->addTo( viewMenuView ); 330 a->addTo( viewMenuView );
331 331
332 a = new QAction( tr( "Rotate 180" ), Resource::loadPixmap( "repeat" ), QString::null, 0, this, 0 ); 332 a = new QAction( tr( "Rotate 180" ), Resource::loadPixmap( "repeat" ), QString::null, 0, this, 0 );
333 connect( a, SIGNAL( activated() ), this, SLOT( rot180() ) ); 333 connect( a, SIGNAL( activated() ), this, SLOT( rot180() ) );
334 a->addTo( iconToolBar ); 334 a->addTo( iconToolBar );
335 a->addTo( viewMenuView ); 335 a->addTo( viewMenuView );
336 336
337 337
338 a = new QAction( tr( "Rotate 270"), Resource::loadPixmap( "rotate270" ), QString::null, 0, this, 0); 338 a = new QAction( tr( "Rotate 270"), Resource::loadPixmap( "rotate270" ), QString::null, 0, this, 0);
339 connect( a, SIGNAL( activated() ), this, SLOT( rot270() ) ); 339 connect( a, SIGNAL( activated() ), this, SLOT( rot270() ) );
340 //a->addTo( iconToolBar ); 340 //a->addTo( iconToolBar );
341 a->addTo( viewMenuView ); 341 a->addTo( viewMenuView );
342 342
343 343
344 344
345 viewMenuView->insertSeparator(); 345 viewMenuView->insertSeparator();
346 viewMenuView->insertItem(tr("Brightness ..."), this, SLOT(displayControlsDialog()), 0); 346 viewMenuView->insertItem(tr("Brightness ..."), this, SLOT(displayControlsDialog()), 0);
347 viewMenuView->insertItem(tr("Black And White"), this, SLOT(blackAndWhite()), 0,BLACKANDWHITE); 347 viewMenuView->insertItem(tr("Black And White"), this, SLOT(blackAndWhite()), 0,BLACKANDWHITE);
348 viewMenuView->insertSeparator(); 348 viewMenuView->insertSeparator();
349 349
350 350
351 sss = new QAction( tr( "Scale to Screen"), Resource::loadPixmap( "scale" ), QString::null, 0, this, 0,true); 351 sss = new QAction( tr( "Scale to Screen"), Resource::loadPixmap( "scale" ), QString::null, 0, this, 0,true);
352 connect( sss, SIGNAL( activated() ), this, SLOT( switchSizeToScreen() ) ); 352 connect( sss, SIGNAL( activated() ), this, SLOT( switchSizeToScreen() ) );
353 sss->addTo( iconToolBar ); 353 sss->addTo( iconToolBar );
354 sss->addTo( viewMenuView ); 354 sss->addTo( viewMenuView );
355 355
356 sss->setOn(isSized); 356 sss->setOn(isSized);
357 viewMenuView->insertSeparator(); 357 viewMenuView->insertSeparator();
358 358
359 359
360 a = new QAction( tr( "Fullscreen" ), Resource::loadPixmap( "fullscreen" ), 360 a = new QAction( tr( "Fullscreen" ), Resource::loadPixmap( "fullscreen" ),
361 QString::null, 0, this, 0 ); 361 QString::null, 0, this, 0 );
362 connect( a, SIGNAL( activated() ), this, SLOT( fullScreen() ) ); 362 connect( a, SIGNAL( activated() ), this, SLOT( fullScreen() ) );
363 a->addTo( iconToolBar ); 363 a->addTo( iconToolBar );
364 a->addTo( viewMenuView); 364 a->addTo( viewMenuView);
365 365
diff --git a/noncore/multimedia/showimg/showimg.h b/noncore/multimedia/showimg/showimg.h
index da4c0b6..9cf9bfd 100644
--- a/noncore/multimedia/showimg/showimg.h
+++ b/noncore/multimedia/showimg/showimg.h
@@ -1,85 +1,85 @@
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 QToolBar;
38class QMenuBar; 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
@@ -203,87 +203,87 @@ private:
203 void updateImageInfo(QString &filePath); 203 void updateImageInfo(QString &filePath);
204 void switchToFileSelector(); 204 void switchToFileSelector();
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 QToolBar *toolBar;
252 QPEToolBar *iconToolBar; 252 QToolBar *iconToolBar;
253 QMenuBar *menuBar; 253 QMenuBar *menuBar;
254 QMenuBar *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 48629bf..3250627 100644
--- a/noncore/net/opieftp/opieftp.cpp
+++ b/noncore/net/opieftp/opieftp.cpp
@@ -1,120 +1,120 @@
1/*************************************************************************** 1/***************************************************************************
2 opieftp.cpp 2 opieftp.cpp
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//#define DEVELOPERS_VERSION 12//#define DEVELOPERS_VERSION
13 13
14#include "opieftp.h" 14#include "opieftp.h"
15 15
16extern "C" { 16extern "C" {
17#include "../ftplib/ftplib.h" 17#include "../ftplib/ftplib.h"
18} 18}
19 19
20#include "inputDialog.h" 20#include "inputDialog.h"
21 21
22#include <qpe/qpemenubar.h> 22#include <qmenubar.h>
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 QMenuBar *menuBar = new QMenuBar(this); 71 QMenuBar *menuBar = new QMenuBar(this);
72// QPEToolBar *menuBar = new QPEToolBar(this); 72// QToolBar *menuBar = new QToolBar(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() ));
120 tabMenu->setCheckable(TRUE); 120 tabMenu->setCheckable(TRUE);
diff --git a/noncore/net/opieftp/opieftp.h b/noncore/net/opieftp/opieftp.h
index f58778a..076a906 100644
--- a/noncore/net/opieftp/opieftp.h
+++ b/noncore/net/opieftp/opieftp.h
@@ -1,82 +1,82 @@
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 QToolBar;
35class QMenuBar; 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
diff --git a/noncore/net/opieirc/mainwindow.cpp b/noncore/net/opieirc/mainwindow.cpp
index 95fbdcd..be6f8ed 100644
--- a/noncore/net/opieirc/mainwindow.cpp
+++ b/noncore/net/opieirc/mainwindow.cpp
@@ -1,49 +1,49 @@
1#include <qpe/qpemenubar.h> 1#include <qmenubar.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 QMenuBar *menuBar = new QMenuBar(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
diff --git a/noncore/net/ubrowser/mainview.cpp b/noncore/net/ubrowser/mainview.cpp
index 0d3f171..f299b54 100644
--- a/noncore/net/ubrowser/mainview.cpp
+++ b/noncore/net/ubrowser/mainview.cpp
@@ -1,75 +1,75 @@
1/* 1/*
2Opie-uBrowser. a very small web browser, using on QTextBrowser for html display/parsing 2Opie-uBrowser. a very small web browser, using on QTextBrowser for html display/parsing
3Copyright (C) 2002 Thomas Stephens 3Copyright (C) 2002 Thomas Stephens
4 4
5This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public 5This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
6License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later 6License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later
7version. 7version.
8 8
9This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the 9This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
10implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11Public License for more details. 11Public License for more details.
12 12
13You should have received a copy of the GNU General Public License along with this program; if not, write to the Free 13You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
14Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 14Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15*/ 15*/
16 16
17 17
18#include "mainview.h" 18#include "mainview.h"
19 19
20MainView::MainView(QWidget *parent, const char *name, WFlags fl) : QMainWindow(parent, name, fl) 20MainView::MainView(QWidget *parent, const char *name, WFlags fl) : QMainWindow(parent, name, fl)
21{ 21{
22 setIcon( Resource::loadPixmap( "remote" ) ); 22 setIcon( Resource::loadPixmap( "remote" ) );
23 setCaption(tr("uBrowser")); 23 setCaption(tr("uBrowser"));
24 24
25 setToolBarsMovable( false ); 25 setToolBarsMovable( false );
26 26
27 QPEToolBar *toolbar = new QPEToolBar(this, "toolbar"); 27 QToolBar *toolbar = new QToolBar(this, "toolbar");
28 back = new QToolButton(Resource::loadPixmap("ubrowser/back"), 0, 0, 0, 0, toolbar, "back"); 28 back = new QToolButton(Resource::loadPixmap("ubrowser/back"), 0, 0, 0, 0, toolbar, "back");
29 forward = new QToolButton(Resource::loadPixmap("ubrowser/forward"), 0, 0, 0, 0, toolbar, "forward"); 29 forward = new QToolButton(Resource::loadPixmap("ubrowser/forward"), 0, 0, 0, 0, toolbar, "forward");
30 home = new QToolButton(Resource::loadPixmap("ubrowser/home"), 0, 0, 0, 0, toolbar, "home"); 30 home = new QToolButton(Resource::loadPixmap("ubrowser/home"), 0, 0, 0, 0, toolbar, "home");
31 location = new QComboBox(true, toolbar, "location"); 31 location = new QComboBox(true, toolbar, "location");
32 go = new QToolButton(Resource::loadPixmap("ubrowser/go"), 0, 0, 0, 0, toolbar, "go"); 32 go = new QToolButton(Resource::loadPixmap("ubrowser/go"), 0, 0, 0, 0, toolbar, "go");
33 33
34 toolbar->setStretchableWidget(location); 34 toolbar->setStretchableWidget(location);
35 toolbar->setHorizontalStretchable(true); 35 toolbar->setHorizontalStretchable(true);
36 location->setAutoCompletion( true ); 36 location->setAutoCompletion( true );
37 37
38 addToolBar(toolbar); 38 addToolBar(toolbar);
39 39
40 browser = new QTextBrowser(this, "browser"); 40 browser = new QTextBrowser(this, "browser");
41 setCentralWidget(browser); 41 setCentralWidget(browser);
42 42
43//make the button take you to the location 43//make the button take you to the location
44 connect(go, SIGNAL(clicked()), this, SLOT(goClicked()) ); 44 connect(go, SIGNAL(clicked()), this, SLOT(goClicked()) );
45 connect(location->lineEdit(), SIGNAL(returnPressed()), this, SLOT(goClicked()) ); 45 connect(location->lineEdit(), SIGNAL(returnPressed()), this, SLOT(goClicked()) );
46 46
47//make back, forward and home do their thing (isnt QTextBrowser great?) 47//make back, forward and home do their thing (isnt QTextBrowser great?)
48 connect(back, SIGNAL(clicked()), browser, SLOT(backward()) ); 48 connect(back, SIGNAL(clicked()), browser, SLOT(backward()) );
49 connect(forward, SIGNAL(clicked()), browser, SLOT(forward()) ); 49 connect(forward, SIGNAL(clicked()), browser, SLOT(forward()) );
50 connect(home, SIGNAL(clicked()), browser, SLOT(home()) ); 50 connect(home, SIGNAL(clicked()), browser, SLOT(home()) );
51 51
52//make back and forward buttons be enabled, only when you can go back or forward (again, i love QTextBrowser) 52//make back and forward buttons be enabled, only when you can go back or forward (again, i love QTextBrowser)
53//this doesnt seem to work, but doesnt break anything either... 53//this doesnt seem to work, but doesnt break anything either...
54 connect(browser, SIGNAL(backwardAvailable(bool)), back, SLOT(setOn(bool)) ); 54 connect(browser, SIGNAL(backwardAvailable(bool)), back, SLOT(setOn(bool)) );
55 connect(browser, SIGNAL(forwardAvailable(bool)), forward, SLOT(setOn(bool)) ); 55 connect(browser, SIGNAL(forwardAvailable(bool)), forward, SLOT(setOn(bool)) );
56 56
57//notify me when the text of the browser has changed (like when the user clicks a link) 57//notify me when the text of the browser has changed (like when the user clicks a link)
58 connect(browser, SIGNAL(textChanged()), this, SLOT(textChanged()) ); 58 connect(browser, SIGNAL(textChanged()), this, SLOT(textChanged()) );
59 59
60 http = new HttpFactory(browser); 60 http = new HttpFactory(browser);
61 61
62 if( qApp->argc() > 1 ) 62 if( qApp->argc() > 1 )
63 { 63 {
64 char **argv = qApp->argv(); 64 char **argv = qApp->argv();
65 int i = 0; 65 int i = 0;
66 QString *openfile = new QString( argv[0] ); 66 QString *openfile = new QString( argv[0] );
67 while( openfile->contains( "ubrowser" ) == 0 && i < qApp->argc() ) 67 while( openfile->contains( "ubrowser" ) == 0 && i < qApp->argc() )
68 { 68 {
69 i++; 69 i++;
70 *openfile = argv[i]; 70 *openfile = argv[i];
71 } 71 }
72 *openfile = argv[i+1]; 72 *openfile = argv[i+1];
73 if( !openfile->startsWith( "http://" ) && !openfile->startsWith( "/" ) ) 73 if( !openfile->startsWith( "http://" ) && !openfile->startsWith( "/" ) )
74 { 74 {
75 openfile->insert( 0, QDir::currentDirPath()+"/" ); 75 openfile->insert( 0, QDir::currentDirPath()+"/" );
diff --git a/noncore/net/ubrowser/mainview.h b/noncore/net/ubrowser/mainview.h
index cc63729..7ce890c 100644
--- a/noncore/net/ubrowser/mainview.h
+++ b/noncore/net/ubrowser/mainview.h
@@ -1,53 +1,53 @@
1/* 1/*
2Opie-uBrowser. a very small web browser, using on QTextBrowser for html display/parsing 2Opie-uBrowser. a very small web browser, using on QTextBrowser for html display/parsing
3Copyright (C) 2002 Thomas Stephens 3Copyright (C) 2002 Thomas Stephens
4 4
5This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public 5This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
6License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later 6License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later
7version. 7version.
8 8
9This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the 9This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
10implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11Public License for more details. 11Public License for more details.
12 12
13You should have received a copy of the GNU General Public License along with this program; if not, write to the Free 13You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
14Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 14Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15*/ 15*/
16 16
17#include <qpe/resource.h> 17#include <qpe/resource.h>
18#include <qpe/qpetoolbar.h> 18#include <qtoolbar.h>
19#include <qpe/applnk.h> 19#include <qpe/applnk.h>
20 20
21#include <qapplication.h> 21#include <qapplication.h>
22#include <qmainwindow.h> 22#include <qmainwindow.h>
23#include <qwidget.h> 23#include <qwidget.h>
24#include <qtextbrowser.h> 24#include <qtextbrowser.h>
25#include <qtoolbutton.h> 25#include <qtoolbutton.h>
26#include <qcombobox.h> 26#include <qcombobox.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29#include <qdir.h> 29#include <qdir.h>
30 30
31#include <stdio.h> 31#include <stdio.h>
32 32
33#include "httpfactory.h" 33#include "httpfactory.h"
34 34
35class MainView : public QMainWindow 35class MainView : public QMainWindow
36{ 36{
37 Q_OBJECT 37 Q_OBJECT
38public: 38public:
39 static QString appName() { return QString::fromLatin1("ubrowser"); } 39 static QString appName() { return QString::fromLatin1("ubrowser"); }
40 MainView(QWidget *parent=0, const char *name=0, WFlags fl = 0); 40 MainView(QWidget *parent=0, const char *name=0, WFlags fl = 0);
41public slots: 41public slots:
42 void goClicked(); 42 void goClicked();
43 void textChanged(); 43 void textChanged();
44 void setDocument( const QString& applnk_filename ); 44 void setDocument( const QString& applnk_filename );
45private: 45private:
46 QToolButton *back; 46 QToolButton *back;
47 QToolButton *forward; 47 QToolButton *forward;
48 QToolButton *home; 48 QToolButton *home;
49 QToolButton *go; 49 QToolButton *go;
50 QComboBox *location; 50 QComboBox *location;
51 QTextBrowser *browser; 51 QTextBrowser *browser;
52 HttpFactory *http; 52 HttpFactory *http;
53}; 53};
diff --git a/noncore/settings/usermanager/usermanager.cpp b/noncore/settings/usermanager/usermanager.cpp
index 65bbd8b..5c90525 100644
--- a/noncore/settings/usermanager/usermanager.cpp
+++ b/noncore/settings/usermanager/usermanager.cpp
@@ -1,85 +1,85 @@
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#include "usermanager.h" 10#include "usermanager.h"
11 11
12#include <qlayout.h> 12#include <qlayout.h>
13#include <stdio.h> 13#include <stdio.h>
14 14
15#include <qmessagebox.h> 15#include <qmessagebox.h>
16#include <qfile.h> 16#include <qfile.h>
17#include <qpe/resource.h> 17#include <qpe/resource.h>
18 18
19#include <qregexp.h> 19#include <qregexp.h>
20 20
21/** 21/**
22 * The mainwindow constructor. 22 * The mainwindow constructor.
23 * 23 *
24 * @param QWidget *parent 24 * @param QWidget *parent
25 * @param const char *name 25 * @param const char *name
26 * @ param WFlags fl 26 * @ param WFlags fl
27 * 27 *
28 */ 28 */
29UserConfig::UserConfig(QWidget* parent, const char* name, WFlags fl) : QMainWindow(parent, name, fl) { 29UserConfig::UserConfig(QWidget* parent, const char* name, WFlags fl) : QMainWindow(parent, name, fl) {
30 setCaption(tr("Opie User Manager")); 30 setCaption(tr("Opie User Manager"));
31 31
32 // Create an instance of the global object 'accounts'. This holds all user/group info, and functions to modify them. 32 // Create an instance of the global object 'accounts'. This holds all user/group info, and functions to modify them.
33 accounts=new Passwd(); 33 accounts=new Passwd();
34 accounts->open();// This actually loads the files /etc/passwd & /etc/group into memory. 34 accounts->open();// This actually loads the files /etc/passwd & /etc/group into memory.
35 35
36 // Create the toolbar. 36 // Create the toolbar.
37 QPEToolBar *toolbar = new QPEToolBar(this,"Toolbar"); 37 QToolBar *toolbar = new QToolBar(this,"Toolbar");
38 toolbar->setHorizontalStretchable(1); // Is there any other way to get the toolbar to stretch of the full screen!? 38 toolbar->setHorizontalStretchable(1); // Is there any other way to get the toolbar to stretch of the full screen!?
39 adduserToolButton = new QToolButton(Resource::loadPixmap("usermanager/adduser"),"Add User",0,this,SLOT(addUser()),toolbar,"Add User"); 39 adduserToolButton = new QToolButton(Resource::loadPixmap("usermanager/adduser"),"Add User",0,this,SLOT(addUser()),toolbar,"Add User");
40 edituserToolButton = new QToolButton(Resource::loadPixmap("usermanager/edituser"),"Edit User",0,this,SLOT(editUser()),toolbar,"Edit User"); 40 edituserToolButton = new QToolButton(Resource::loadPixmap("usermanager/edituser"),"Edit User",0,this,SLOT(editUser()),toolbar,"Edit User");
41 deleteuserToolButton = new QToolButton(Resource::loadPixmap("usermanager/deleteuser"),"Delete User",0,this,SLOT(delUser()),toolbar,"Delete User"); 41 deleteuserToolButton = new QToolButton(Resource::loadPixmap("usermanager/deleteuser"),"Delete User",0,this,SLOT(delUser()),toolbar,"Delete User");
42 QToolButton *userstext = new QToolButton(0,"User",0,0,0,toolbar,"User"); 42 QToolButton *userstext = new QToolButton(0,"User",0,0,0,toolbar,"User");
43 userstext->setUsesTextLabel(true); 43 userstext->setUsesTextLabel(true);
44 toolbar->addSeparator(); 44 toolbar->addSeparator();
45 addgroupToolButton = new QToolButton(Resource::loadPixmap("usermanager/addgroup"),"Add Group",0,this,SLOT(addGroup()),toolbar,"Add Group"); 45 addgroupToolButton = new QToolButton(Resource::loadPixmap("usermanager/addgroup"),"Add Group",0,this,SLOT(addGroup()),toolbar,"Add Group");
46 editgroupToolButton = new QToolButton(Resource::loadPixmap("usermanager/editgroup"),"Edit Group",0,this,SLOT(editGroup()),toolbar,"Edit Group"); 46 editgroupToolButton = new QToolButton(Resource::loadPixmap("usermanager/editgroup"),"Edit Group",0,this,SLOT(editGroup()),toolbar,"Edit Group");
47 deletegroupToolButton = new QToolButton(Resource::loadPixmap("usermanager/deletegroup"),"Delete Group",0,this,SLOT(delGroup()),toolbar,"Delete Group"); 47 deletegroupToolButton = new QToolButton(Resource::loadPixmap("usermanager/deletegroup"),"Delete Group",0,this,SLOT(delGroup()),toolbar,"Delete Group");
48 QToolButton *groupstext = new QToolButton(0,"Group",0,0,0,toolbar,"Group"); 48 QToolButton *groupstext = new QToolButton(0,"Group",0,0,0,toolbar,"Group");
49 groupstext->setUsesTextLabel(true); 49 groupstext->setUsesTextLabel(true);
50 addToolBar(toolbar,"myToolBar"); 50 addToolBar(toolbar,"myToolBar");
51 51
52 // Add a tabwidget and all the tabs. 52 // Add a tabwidget and all the tabs.
53 myTabWidget = new QTabWidget(this,"My Tab Widget"); 53 myTabWidget = new QTabWidget(this,"My Tab Widget");
54 setupTabAccounts(); 54 setupTabAccounts();
55 setupTabAllUsers(); 55 setupTabAllUsers();
56 setupTabAllGroups(); 56 setupTabAllGroups();
57 userPopupMenu.insertItem("Copy",0); 57 userPopupMenu.insertItem("Copy",0);
58 58
59 getUsers(); // Fill out the iconview & listview with all users. 59 getUsers(); // Fill out the iconview & listview with all users.
60 getGroups(); // Fill out the group listview with all groups. 60 getGroups(); // Fill out the group listview with all groups.
61 61
62 setCentralWidget(myTabWidget); 62 setCentralWidget(myTabWidget);
63} 63}
64 64
65UserConfig::~UserConfig() { 65UserConfig::~UserConfig() {
66 accounts->close(); 66 accounts->close();
67 delete accounts; 67 delete accounts;
68} 68}
69 69
70void UserConfig::setupTabAccounts() { 70void UserConfig::setupTabAccounts() {
71 QWidget *tabpage = new QWidget(this); 71 QWidget *tabpage = new QWidget(this);
72 QVBoxLayout *layout = new QVBoxLayout(tabpage); 72 QVBoxLayout *layout = new QVBoxLayout(tabpage);
73 layout->setMargin(5); 73 layout->setMargin(5);
74 74
75 usersIconView=new QListView(tabpage,"users"); 75 usersIconView=new QListView(tabpage,"users");
76 usersIconView->addColumn("Icon"); 76 usersIconView->addColumn("Icon");
77 usersIconView->addColumn("Username"); 77 usersIconView->addColumn("Username");
78 usersIconView->setAllColumnsShowFocus(true); 78 usersIconView->setAllColumnsShowFocus(true);
79 layout->addWidget(usersIconView); 79 layout->addWidget(usersIconView);
80 80
81 connect(usersIconView,SIGNAL(returnPressed(QListViewItem *)),this,SLOT(showUserMenu(QListViewItem *))); 81 connect(usersIconView,SIGNAL(returnPressed(QListViewItem *)),this,SLOT(showUserMenu(QListViewItem *)));
82 82
83 myTabWidget->addTab(tabpage,"Users"); 83 myTabWidget->addTab(tabpage,"Users");
84} 84}
85 85
diff --git a/noncore/settings/usermanager/usermanager.h b/noncore/settings/usermanager/usermanager.h
index d7c25b8..678d1f9 100644
--- a/noncore/settings/usermanager/usermanager.h
+++ b/noncore/settings/usermanager/usermanager.h
@@ -1,67 +1,67 @@
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#ifndef USERCONFIG_H 10#ifndef USERCONFIG_H
11#define USERCONFIG_H 11#define USERCONFIG_H
12 12
13#include <qmainwindow.h> 13#include <qmainwindow.h>
14#include <qtabwidget.h> 14#include <qtabwidget.h>
15#include <qlistview.h> 15#include <qlistview.h>
16#include <qpopupmenu.h> 16#include <qpopupmenu.h>
17#include <qtoolbutton.h> 17#include <qtoolbutton.h>
18 18
19#include <qpe/qpetoolbar.h> 19#include <qtoolbar.h>
20 20
21#include "userdialog.h" 21#include "userdialog.h"
22#include "groupdialog.h" 22#include "groupdialog.h"
23#include "passwd.h" 23#include "passwd.h"
24 24
25class UserConfig : public QMainWindow 25class UserConfig : public QMainWindow
26{ 26{
27 Q_OBJECT 27 Q_OBJECT
28 28
29public: 29public:
30 static QString appName() { return QString::fromLatin1("usermanager"); } 30 static QString appName() { return QString::fromLatin1("usermanager"); }
31 UserConfig( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 31 UserConfig( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
32 ~UserConfig(); 32 ~UserConfig();
33 33
34private: 34private:
35 QToolButton *adduserToolButton; 35 QToolButton *adduserToolButton;
36 QToolButton *edituserToolButton; 36 QToolButton *edituserToolButton;
37 QToolButton *deleteuserToolButton; 37 QToolButton *deleteuserToolButton;
38 QToolButton *addgroupToolButton; 38 QToolButton *addgroupToolButton;
39 QToolButton *editgroupToolButton; 39 QToolButton *editgroupToolButton;
40 QToolButton *deletegroupToolButton; 40 QToolButton *deletegroupToolButton;
41 QTabWidget *myTabWidget; 41 QTabWidget *myTabWidget;
42 QListView *usersIconView; 42 QListView *usersIconView;
43 QListView *usersListView; 43 QListView *usersListView;
44 QListView *groupsListView; 44 QListView *groupsListView;
45 QPopupMenu userPopupMenu; 45 QPopupMenu userPopupMenu;
46 QPopupMenu groupPopupMenu; 46 QPopupMenu groupPopupMenu;
47 int availableUID; 47 int availableUID;
48 int availableGID; 48 int availableGID;
49 void setupTabAccounts(); 49 void setupTabAccounts();
50 void setupTabAllUsers(); 50 void setupTabAllUsers();
51 void setupTabAllGroups(); 51 void setupTabAllGroups();
52 void setupTabPrefs(); 52 void setupTabPrefs();
53 void setupTabAbout(); 53 void setupTabAbout();
54 void getUsers(); 54 void getUsers();
55 void getGroups(); 55 void getGroups();
56 56
57private slots: 57private slots:
58 void addUser(); 58 void addUser();
59 void editUser(); 59 void editUser();
60 void delUser(); 60 void delUser();
61 void addGroup(); 61 void addGroup();
62 void editGroup(); 62 void editGroup();
63 void delGroup(); 63 void delGroup();
64 void showUserMenu(QListViewItem *item); 64 void showUserMenu(QListViewItem *item);
65}; 65};
66 66
67#endif // USERCONFIG_H 67#endif // USERCONFIG_H
diff --git a/noncore/tools/formatter/formatter.cpp b/noncore/tools/formatter/formatter.cpp
index a8dd11c..532ee40 100644
--- a/noncore/tools/formatter/formatter.cpp
+++ b/noncore/tools/formatter/formatter.cpp
@@ -1,61 +1,61 @@
1/**************************************************************************** 1/****************************************************************************
2 ** formatter.cpp 2 ** formatter.cpp
3 ** 3 **
4 ** Copyright: Thu Apr 11 11:01:13 2002 4 ** Copyright: Thu Apr 11 11:01:13 2002
5 ** by: L. J. Potter 5 ** by: L. J. Potter
6 ** 6 **
7 ****************************************************************************/ 7 ****************************************************************************/
8 8
9#include "formatter.h" 9#include "formatter.h"
10#include "inputDialog.h" 10#include "inputDialog.h"
11#include "output.h" 11#include "output.h"
12 12
13#include <qpe/qpemenubar.h> 13#include <qmenubar.h>
14#include <qpe/qpetoolbar.h> 14#include <qpe/qpetoolbar.h>
15#include <qpe/qpeapplication.h> 15#include <qpe/qpeapplication.h>
16#include <qpe/resource.h> 16#include <qpe/resource.h>
17#include <qpe/config.h> 17#include <qpe/config.h>
18#include <qpe/mimetype.h> 18#include <qpe/mimetype.h>
19#include <qpe/qcopenvelope_qws.h> 19#include <qpe/qcopenvelope_qws.h>
20#include <qpe/storage.h> 20#include <qpe/storage.h>
21 21
22#include <qmultilineedit.h> 22#include <qmultilineedit.h>
23#include <qstring.h> 23#include <qstring.h>
24#include <qlist.h> 24#include <qlist.h>
25#include <qstringlist.h> 25#include <qstringlist.h>
26#include <qdir.h> 26#include <qdir.h>
27#include <qfile.h> 27#include <qfile.h>
28 28
29#include <qtstream.h> 29#include <qtstream.h>
30 30
31#include <qcombobox.h> 31#include <qcombobox.h>
32#include <qpopupmenu.h> 32#include <qpopupmenu.h>
33#include <qmessagebox.h> 33#include <qmessagebox.h>
34#include <qregexp.h> 34#include <qregexp.h>
35 35
36#include <qlabel.h> 36#include <qlabel.h>
37#include <qlineedit.h> 37#include <qlineedit.h>
38#include <qpushbutton.h> 38#include <qpushbutton.h>
39#include <qtabwidget.h> 39#include <qtabwidget.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 43
44#include <unistd.h> 44#include <unistd.h>
45#include <stdio.h> 45#include <stdio.h>
46#include <stdlib.h> 46#include <stdlib.h>
47#include <sys/vfs.h> 47#include <sys/vfs.h>
48#include <mntent.h> 48#include <mntent.h>
49#include <string.h> 49#include <string.h>
50#include <errno.h> 50#include <errno.h>
51 51
52#define BLANK ' ' 52#define BLANK ' '
53#define DELIMITER '#' 53#define DELIMITER '#'
54 54
55/* 55/*
56 Blah blah blah blah */ 56 Blah blah blah blah */
57FormatterApp::FormatterApp( QWidget* parent, const char* name, WFlags fl, bool modal ) 57FormatterApp::FormatterApp( QWidget* parent, const char* name, WFlags fl, bool modal )
58 : QMainWindow( parent, name, fl ) 58 : QMainWindow( parent, name, fl )
59// : QDialog( parent, name, modal, fl ) 59// : QDialog( parent, name, modal, fl )
60{ 60{
61 if ( !name ) 61 if ( !name )
diff --git a/noncore/unsupported/filebrowser/filebrowser.cpp b/noncore/unsupported/filebrowser/filebrowser.cpp
index 114ebfa..8cf8a60 100644
--- a/noncore/unsupported/filebrowser/filebrowser.cpp
+++ b/noncore/unsupported/filebrowser/filebrowser.cpp
@@ -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 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 <qtoolbar.h>
39#include <qpopupmenu.h> 39#include <qpopupmenu.h>
40#include <qmenubar.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" );
@@ -794,127 +794,127 @@ void FileView::setShowSymlinks(bool symlinks)
794void FileView::setShowThumbnails(bool thumbnails) 794void FileView::setShowThumbnails(bool thumbnails)
795{ 795{
796 showThumbnails=thumbnails; 796 showThumbnails=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 QToolBar* toolBar = new QToolBar( this );
843 toolBar->setHorizontalStretchable( TRUE ); 843 toolBar->setHorizontalStretchable( TRUE );
844 844
845 QMenuBar* menuBar = new QMenuBar( 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 QToolBar( 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 );
894 894
895 a = new QAction( tr("Copy"), Resource::loadPixmap( "copy" ), 895 a = new QAction( tr("Copy"), Resource::loadPixmap( "copy" ),
896 QString::null, 0, this, 0 ); 896 QString::null, 0, this, 0 );
897 connect( a, SIGNAL( activated() ), fileView, SLOT( copy() ) ); 897 connect( a, SIGNAL( activated() ), fileView, SLOT( copy() ) );
898 a->addTo( toolBar ); 898 a->addTo( toolBar );
899 899
900 pasteAction = new QAction( tr("Paste"), Resource::loadPixmap( "paste" ), 900 pasteAction = new QAction( tr("Paste"), Resource::loadPixmap( "paste" ),
901 QString::null, 0, this, 0 ); 901 QString::null, 0, this, 0 );
902 connect( pasteAction, SIGNAL( activated() ), fileView, SLOT( paste() ) ); 902 connect( pasteAction, SIGNAL( activated() ), fileView, SLOT( paste() ) );
903 pasteAction->addTo( toolBar ); 903 pasteAction->addTo( toolBar );
904 904
905// dirLabel = new QLabel(this, "DirLabel"); 905// dirLabel = new QLabel(this, "DirLabel");
906 906
907 connect( fileView, SIGNAL( dirChanged() ), SLOT( updateDirMenu() ) ); 907 connect( fileView, SIGNAL( dirChanged() ), SLOT( updateDirMenu() ) );
908 updateDirMenu(); 908 updateDirMenu();
909 909
910 QCopChannel* pcmciaChannel = new QCopChannel( "QPE/Card", this ); 910 QCopChannel* pcmciaChannel = new QCopChannel( "QPE/Card", this );
911 connect( pcmciaChannel, SIGNAL(received(const QCString &, const QByteArray &)), 911 connect( pcmciaChannel, SIGNAL(received(const QCString &, const QByteArray &)),
912 this, SLOT(pcmciaMessage( const QCString &, const QByteArray &)) ); 912 this, SLOT(pcmciaMessage( const QCString &, const QByteArray &)) );
913} 913}
914 914
915void FileBrowser::pcmciaMessage( const QCString &msg, const QByteArray &) 915void FileBrowser::pcmciaMessage( const QCString &msg, const QByteArray &)
916{ 916{
917 if ( msg == "mtabChanged()" ) { 917 if ( msg == "mtabChanged()" ) {
918 // ## Only really needed if current dir is on a card 918 // ## Only really needed if current dir is on a card
919 fileView->updateDir(); 919 fileView->updateDir();
920 } 920 }
diff --git a/noncore/unsupported/mail2/composerbase.cpp b/noncore/unsupported/mail2/composerbase.cpp
index 34d6eb6..94de15c 100644
--- a/noncore/unsupported/mail2/composerbase.cpp
+++ b/noncore/unsupported/mail2/composerbase.cpp
@@ -1,72 +1,72 @@
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 <qmenubar.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 QToolBar(this);
25 menubar = new QMenuBar( 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);
@@ -80,97 +80,97 @@ ComposerBase::ComposerBase(QWidget *parent, const char *name, WFlags fl)
80 connect(receiversBox, SIGNAL(activated(int)), SLOT(slotReceiverMenuChanged(int))); 80 connect(receiversBox, SIGNAL(activated(int)), SLOT(slotReceiverMenuChanged(int)));
81 81
82 QHBoxLayout *receiverLayout = new QHBoxLayout(); 82 QHBoxLayout *receiverLayout = new QHBoxLayout();
83 layout->addLayout(receiverLayout, 1, 1); 83 layout->addLayout(receiverLayout, 1, 1);
84 84
85 to = new QLineEdit(main); 85 to = new QLineEdit(main);
86 receiverLayout->addWidget(to); 86 receiverLayout->addWidget(to);
87 87
88 cc = new QLineEdit(main); 88 cc = new QLineEdit(main);
89 cc->hide(); 89 cc->hide();
90 receiverLayout->addWidget(cc); 90 receiverLayout->addWidget(cc);
91 91
92 bcc = new QLineEdit(main); 92 bcc = new QLineEdit(main);
93 bcc->hide(); 93 bcc->hide();
94 receiverLayout->addWidget(bcc); 94 receiverLayout->addWidget(bcc);
95 95
96 subjectBox = new QComboBox(main); 96 subjectBox = new QComboBox(main);
97 subjectBox->insertItem(tr("Subj."), POPUP_SUBJ_SUBJECT); 97 subjectBox->insertItem(tr("Subj."), POPUP_SUBJ_SUBJECT);
98 subjectBox->insertItem(tr("Prio."), POPUP_SUBJ_PRIORITY); 98 subjectBox->insertItem(tr("Prio."), POPUP_SUBJ_PRIORITY);
99 layout->addWidget(subjectBox, 2, 0); 99 layout->addWidget(subjectBox, 2, 0);
100 connect(subjectBox, SIGNAL(activated(int)), SLOT(slotSubjectMenuChanged(int))); 100 connect(subjectBox, SIGNAL(activated(int)), SLOT(slotSubjectMenuChanged(int)));
101 101
102 QHBoxLayout *subjectLayout = new QHBoxLayout(); 102 QHBoxLayout *subjectLayout = new QHBoxLayout();
103 layout->addLayout(subjectLayout, 2, 1); 103 layout->addLayout(subjectLayout, 2, 1);
104 104
105 subject = new QLineEdit(main); 105 subject = new QLineEdit(main);
106 subjectLayout->addWidget(subject); 106 subjectLayout->addWidget(subject);
107 107
108 priority = new QComboBox(main); 108 priority = new QComboBox(main);
109 priority->insertItem(tr("Low"), POPUP_PRIO_LOW); 109 priority->insertItem(tr("Low"), POPUP_PRIO_LOW);
110 priority->insertItem(tr("Normal"), POPUP_PRIO_NORMAL); 110 priority->insertItem(tr("Normal"), POPUP_PRIO_NORMAL);
111 priority->insertItem(tr("High"), POPUP_PRIO_HIGH); 111 priority->insertItem(tr("High"), POPUP_PRIO_HIGH);
112 priority->setCurrentItem(POPUP_PRIO_NORMAL); 112 priority->setCurrentItem(POPUP_PRIO_NORMAL);
113 priority->hide(); 113 priority->hide();
114 subjectLayout->addWidget(priority); 114 subjectLayout->addWidget(priority);
115 115
116 QVBox *view = new QVBox(main); 116 QVBox *view = new QVBox(main);
117 layout->addMultiCellWidget(view, 3, 3, 0, 1); 117 layout->addMultiCellWidget(view, 3, 3, 0, 1);
118 118
119 message = new QMultiLineEdit(view); 119 message = new QMultiLineEdit(view);
120 message->setMinimumHeight(30); 120 message->setMinimumHeight(30);
121 121
122 attachWindow = new QMainWindow(view, 0, 0); 122 attachWindow = new QMainWindow(view, 0, 0);
123 attachWindow->setMinimumHeight(80); 123 attachWindow->setMinimumHeight(80);
124 attachWindow->setMaximumHeight(80); 124 attachWindow->setMaximumHeight(80);
125 attachWindow->setToolBarsMovable(false); 125 attachWindow->setToolBarsMovable(false);
126 attachWindow->hide(); 126 attachWindow->hide();
127 127
128 attachToolbar = new QPEToolBar(attachWindow); 128 attachToolbar = new QToolBar(attachWindow);
129 attachToolbar->setVerticalStretchable(true); 129 attachToolbar->setVerticalStretchable(true);
130 130
131 addattach = new QAction(tr("Add an Attachement"), QIconSet(Resource::loadPixmap("mail/newmail")), 0, 0, this); 131 addattach = new QAction(tr("Add an Attachement"), QIconSet(Resource::loadPixmap("mail/newmail")), 0, 0, this);
132 addattach->addTo(attachToolbar); 132 addattach->addTo(attachToolbar);
133 133
134 delattach = new QAction(tr("Remove Attachement"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this); 134 delattach = new QAction(tr("Remove Attachement"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this);
135 delattach->addTo(attachToolbar); 135 delattach->addTo(attachToolbar);
136 136
137 QLabel *attachSpacer = new QLabel(attachToolbar); 137 QLabel *attachSpacer = new QLabel(attachToolbar);
138 attachSpacer->setBackgroundMode(QWidget::PaletteButton); 138 attachSpacer->setBackgroundMode(QWidget::PaletteButton);
139 attachToolbar->setStretchableWidget(attachSpacer); 139 attachToolbar->setStretchableWidget(attachSpacer);
140 140
141 attachWindow->addToolBar(attachToolbar, QMainWindow::Left); 141 attachWindow->addToolBar(attachToolbar, QMainWindow::Left);
142 142
143 attachView = new ListViewPlus(attachWindow); 143 attachView = new ListViewPlus(attachWindow);
144 attachView->addColumn(tr("Name"), 80); 144 attachView->addColumn(tr("Name"), 80);
145 attachView->addColumn(tr("Description"), 110); 145 attachView->addColumn(tr("Description"), 110);
146 attachView->setAllColumnsShowFocus(true); 146 attachView->setAllColumnsShowFocus(true);
147 attachWindow->setCentralWidget(attachView); 147 attachWindow->setCentralWidget(attachView);
148 148
149 attachPopup = new QPopupMenu(attachView); 149 attachPopup = new QPopupMenu(attachView);
150 attachPopup->insertItem(tr("Rename"), POPUP_ATTACH_RENAME); 150 attachPopup->insertItem(tr("Rename"), POPUP_ATTACH_RENAME);
151 attachPopup->insertItem(tr("Change Description"), POPUP_ATTACH_DESC); 151 attachPopup->insertItem(tr("Change Description"), POPUP_ATTACH_DESC);
152 attachPopup->insertSeparator(); 152 attachPopup->insertSeparator();
153 attachPopup->insertItem(tr("Remove"), POPUP_ATTACH_REMOVE); 153 attachPopup->insertItem(tr("Remove"), POPUP_ATTACH_REMOVE);
154 attachView->setPopup(attachPopup); 154 attachView->setPopup(attachPopup);
155 155
156 status = new MailStatusBar(view); 156 status = new MailStatusBar(view);
157} 157}
158 158
159void ComposerBase::slotAttachfileChanged(bool toggled) 159void ComposerBase::slotAttachfileChanged(bool toggled)
160{ 160{
161 if (toggled) { 161 if (toggled) {
162 if (attachWindow->isHidden()) attachWindow->show(); 162 if (attachWindow->isHidden()) attachWindow->show();
163 } else { 163 } else {
164 if (!attachWindow->isHidden()) attachWindow->hide(); 164 if (!attachWindow->isHidden()) attachWindow->hide();
165 } 165 }
166} 166}
167 167
168void ComposerBase::slotFromMenuChanged(int id) 168void ComposerBase::slotFromMenuChanged(int id)
169{ 169{
170 if (POPUP_FROM_FROM == id) { 170 if (POPUP_FROM_FROM == id) {
171 if (from->isHidden()) from->show(); 171 if (from->isHidden()) from->show();
172 if (!replyto->isHidden()) replyto->hide(); 172 if (!replyto->isHidden()) replyto->hide();
173 } else if (POPUP_FROM_REPLYTO == id) { 173 } else if (POPUP_FROM_REPLYTO == id) {
174 if (!from->isHidden()) from->hide(); 174 if (!from->isHidden()) from->hide();
175 if (replyto->isHidden()) replyto->show(); 175 if (replyto->isHidden()) replyto->show();
176 } 176 }
diff --git a/noncore/unsupported/mail2/composerbase.h b/noncore/unsupported/mail2/composerbase.h
index 2c832d6..c14144b 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 QToolBar;
11class QMenuBar; 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 QToolBar *toolbar, *attachToolbar;
46 QMenuBar *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 119acfb..4e804c2 100644
--- a/noncore/unsupported/mail2/mainwindowbase.cpp
+++ b/noncore/unsupported/mail2/mainwindowbase.cpp
@@ -1,70 +1,70 @@
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 <qmenubar.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 QToolBar(this);
23 menubar = new QMenuBar( 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)
diff --git a/noncore/unsupported/mail2/mainwindowbase.h b/noncore/unsupported/mail2/mainwindowbase.h
index b2e1dc5..c1d6371 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 QToolBar;
10class QMenuBar; 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 QToolBar *toolbar;
30 QMenuBar *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 10aa14d..f72026f 100644
--- a/noncore/unsupported/mail2/viewmailbase.cpp
+++ b/noncore/unsupported/mail2/viewmailbase.cpp
@@ -1,69 +1,69 @@
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 <qmenubar.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 QToolBar(this);
22 menubar = new QMenuBar( 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)
diff --git a/noncore/unsupported/mail2/viewmailbase.h b/noncore/unsupported/mail2/viewmailbase.h
index 6e55021..898522e 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 QToolBar;
10class QTextBrowser; 10class QTextBrowser;
11class QMenuBar; 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 QToolBar *toolbar;
25 QTextBrowser *browser; 25 QTextBrowser *browser;
26 OpenDiag *openDiag; 26 OpenDiag *openDiag;
27 QMenuBar *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 6930d60..a09bc30 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -1,265 +1,265 @@
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 <qmenubar.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 <qtoolbar.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 QToolBar *toolBar = new QToolBar( this );
86 QMenuBar *menuBar = new QMenuBar( 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() ) );
135 cfgact->addTo( cfgMenu ); 135 cfgact->addTo( cfgMenu );
136 cfgact = new QAction( tr( "Destinations" ), 136 cfgact = new QAction( tr( "Destinations" ),
137 QString::null, 0, this, 0 ); 137 QString::null, 0, this, 0 );
138 connect( cfgact, SIGNAL( activated() ), 138 connect( cfgact, SIGNAL( activated() ),
139 SLOT( showSettingsDst() ) ); 139 SLOT( showSettingsDst() ) );
140 cfgact->addTo( cfgMenu ); 140 cfgact->addTo( cfgMenu );
141 141
142 QAction *a; 142 QAction *a;
143 143
144 // SECTIONS 144 // SECTIONS
145 sectionBar = new QPEToolBar( this ); 145 sectionBar = new QToolBar( this );
146 addToolBar( sectionBar, "Section", QMainWindow::Top, TRUE ); 146 addToolBar( sectionBar, "Section", QMainWindow::Top, TRUE );
147 sectionBar->setHorizontalStretchable( true ); 147 sectionBar->setHorizontalStretchable( true );
148 QLabel *label = new QLabel( sectionBar, "section" ); 148 QLabel *label = new QLabel( sectionBar, "section" );
149// label->setBackgroundMode( NoBackground ); 149// label->setBackgroundMode( NoBackground );
150 label->font().setPointSize( 8 ); 150 label->font().setPointSize( 8 );
151 label->setText( tr( "Section:" ) ); 151 label->setText( tr( "Section:" ) );
152 sectionBar->setStretchableWidget( label ); 152 sectionBar->setStretchableWidget( label );
153 section = new QComboBox( false, sectionBar ); 153 section = new QComboBox( false, sectionBar );
154 section->font().setPointSize( 8 ); 154 section->font().setPointSize( 8 );
155 label = new QLabel( " / ", sectionBar ); 155 label = new QLabel( " / ", sectionBar );
156 label->font().setPointSize( 8 ); 156 label->font().setPointSize( 8 );
157// label->setBackgroundMode( PaletteForeground ); 157// label->setBackgroundMode( PaletteForeground );
158 subsection = new QComboBox( false, sectionBar ); 158 subsection = new QComboBox( false, sectionBar );
159 subsection->font().setPointSize( 8 ); 159 subsection->font().setPointSize( 8 );
160 a = new QAction( tr( "Close Section" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 160 a = new QAction( tr( "Close Section" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
161 connect( a, SIGNAL( activated() ), this, SLOT( sectionClose() ) ); 161 connect( a, SIGNAL( activated() ), this, SLOT( sectionClose() ) );
162 a->addTo( sectionBar ); 162 a->addTo( sectionBar );
163 setSections(); 163 setSections();
164 setSubSections(); 164 setSubSections();
165 sectionAction = new QAction( tr( "Sections" ), QString::null, 0, this, 0 ); 165 sectionAction = new QAction( tr( "Sections" ), QString::null, 0, this, 0 );
166 connect( sectionAction, SIGNAL( toggled(bool) ), this, SLOT( sectionShow(bool) ) ); 166 connect( sectionAction, SIGNAL( toggled(bool) ), this, SLOT( sectionShow(bool) ) );
167 sectionAction->setToggleAction( true ); 167 sectionAction->setToggleAction( true );
168 sectionAction->addTo( viewMenu ); 168 sectionAction->addTo( viewMenu );
169 // sectionBar->setStretchableWidget( section ); 169 // sectionBar->setStretchableWidget( section );
170 170
171 //FIND 171 //FIND
172 findBar = new QPEToolBar(this); 172 findBar = new QToolBar(this);
173 addToolBar( findBar, "Filter", QMainWindow::Top, TRUE ); 173 addToolBar( findBar, "Filter", QMainWindow::Top, TRUE );
174 label = new QLabel( tr("Filter: "), findBar ); 174 label = new QLabel( tr("Filter: "), findBar );
175// label->setBackgroundMode( PaletteForeground ); 175// label->setBackgroundMode( PaletteForeground );
176 findBar->setHorizontalStretchable( TRUE ); 176 findBar->setHorizontalStretchable( TRUE );
177 findEdit = new QLineEdit( findBar, "findEdit" ); 177 findEdit = new QLineEdit( findBar, "findEdit" );
178 findBar->setStretchableWidget( findEdit ); 178 findBar->setStretchableWidget( findEdit );
179 connect( findEdit, SIGNAL( textChanged( const QString & ) ), 179 connect( findEdit, SIGNAL( textChanged( const QString & ) ),
180 this, SLOT( displayList() ) ); 180 this, SLOT( displayList() ) );
181 a = new QAction( tr( "Clear Find" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 ); 181 a = new QAction( tr( "Clear Find" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 );
182 connect( a, SIGNAL( activated() ), findEdit, SLOT( clear() ) ); 182 connect( a, SIGNAL( activated() ), findEdit, SLOT( clear() ) );
183 a->addTo( findBar ); 183 a->addTo( findBar );
184 a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 184 a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
185 connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) ); 185 connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) );
186 a->addTo( findBar ); 186 a->addTo( findBar );
187 findAction = new QAction( tr( "Filter" ), QString::null, 0, this, 0 ); 187 findAction = new QAction( tr( "Filter" ), QString::null, 0, this, 0 );
188 connect( findAction, SIGNAL( toggled(bool) ), this, SLOT( findShow(bool) ) ); 188 connect( findAction, SIGNAL( toggled(bool) ), this, SLOT( findShow(bool) ) );
189 findAction->setToggleAction( true ); 189 findAction->setToggleAction( true );
190 findAction->addTo( viewMenu ); 190 findAction->addTo( viewMenu );
191 191
192 //SEARCH 192 //SEARCH
193 searchBar = new QPEToolBar(this); 193 searchBar = new QToolBar(this);
194 addToolBar( searchBar, "Search", QMainWindow::Top, TRUE ); 194 addToolBar( searchBar, "Search", QMainWindow::Top, TRUE );
195 label = new QLabel( tr("Search: "), searchBar ); 195 label = new QLabel( tr("Search: "), searchBar );
196// label->setBackgroundMode( PaletteForeground ); 196// label->setBackgroundMode( PaletteForeground );
197 searchBar->setHorizontalStretchable( TRUE ); 197 searchBar->setHorizontalStretchable( TRUE );
198 searchEdit = new QLineEdit( searchBar, "seachEdit" ); 198 searchEdit = new QLineEdit( searchBar, "seachEdit" );
199 searchBar->setStretchableWidget( searchEdit ); 199 searchBar->setStretchableWidget( searchEdit );
200// connect( searchEdit, SIGNAL( textChanged( const QString & ) ), 200// connect( searchEdit, SIGNAL( textChanged( const QString & ) ),
201// this, SLOT( displayList() ) ); 201// this, SLOT( displayList() ) );
202 a = new QAction( tr( "Clear Search" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 ); 202 a = new QAction( tr( "Clear Search" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 );
203 connect( a, SIGNAL( activated() ), searchEdit, SLOT( clear() ) ); 203 connect( a, SIGNAL( activated() ), searchEdit, SLOT( clear() ) );
204 a->addTo( searchBar ); 204 a->addTo( searchBar );
205 searchCommit = new QAction( tr( "Do Search" ), Resource::loadPixmap( "find" ), QString::null, 0, this, 0 ); 205 searchCommit = new QAction( tr( "Do Search" ), Resource::loadPixmap( "find" ), QString::null, 0, this, 0 );
206 connect( searchCommit, SIGNAL( activated() ), SLOT( remotePackageQuery() ) ); 206 connect( searchCommit, SIGNAL( activated() ), SLOT( remotePackageQuery() ) );
207 searchCommit->addTo( searchBar ); 207 searchCommit->addTo( searchBar );
208 a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 208 a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
209 connect( a, SIGNAL( activated() ), this, SLOT( searchClose() ) ); 209 connect( a, SIGNAL( activated() ), this, SLOT( searchClose() ) );
210 a->addTo( searchBar ); 210 a->addTo( searchBar );
211 searchAction = new QAction( tr( "Search" ), QString::null, 0, this, 0 ); 211 searchAction = new QAction( tr( "Search" ), QString::null, 0, this, 0 );
212 connect( searchAction, SIGNAL( toggled(bool) ), this, SLOT( searchShow(bool) ) ); 212 connect( searchAction, SIGNAL( toggled(bool) ), this, SLOT( searchShow(bool) ) );
213 searchAction->setToggleAction( true ); 213 searchAction->setToggleAction( true );
214 searchAction->addTo( viewMenu ); 214 searchAction->addTo( viewMenu );
215 215
216 //DEST 216 //DEST
217 destBar = new QPEToolBar(this); 217 destBar = new QToolBar(this);
218 addToolBar( destBar, "Destination", QMainWindow::Top, TRUE ); 218 addToolBar( destBar, "Destination", QMainWindow::Top, TRUE );
219 label = new QLabel( tr("Destination: "), destBar ); 219 label = new QLabel( tr("Destination: "), destBar );
220// label->setBackgroundMode( PaletteForeground ); 220// label->setBackgroundMode( PaletteForeground );
221 destBar->setHorizontalStretchable( TRUE ); 221 destBar->setHorizontalStretchable( TRUE );
222 destination = new QComboBox( false, destBar ); 222 destination = new QComboBox( false, destBar );
223 destination->insertStringList( settings->getDestinationNames() ); 223 destination->insertStringList( settings->getDestinationNames() );
224 setComboName(destination,settings->getDestinationName()); 224 setComboName(destination,settings->getDestinationName());
225 connect( destination, SIGNAL(activated(int)), 225 connect( destination, SIGNAL(activated(int)),
226 settings, SLOT(activeDestinationChange(int)) ); 226 settings, SLOT(activeDestinationChange(int)) );
227// space->setBackgroundMode( PaletteForeground ); 227// space->setBackgroundMode( PaletteForeground );
228 CheckBoxLink = new QCheckBox( tr("Link"), destBar); 228 CheckBoxLink = new QCheckBox( tr("Link"), destBar);
229// CheckBoxLink->setBackgroundMode( PaletteForeground ); 229// CheckBoxLink->setBackgroundMode( PaletteForeground );
230 CheckBoxLink->setChecked( settings->createLinks() ); 230 CheckBoxLink->setChecked( settings->createLinks() );
231 connect( CheckBoxLink, SIGNAL(toggled(bool)), 231 connect( CheckBoxLink, SIGNAL(toggled(bool)),
232 settings, SLOT(linkEnabled(bool)) ); 232 settings, SLOT(linkEnabled(bool)) );
233 destAction = new QAction( tr( "Destinations" ), QString::null, 0, this, 0 ); 233 destAction = new QAction( tr( "Destinations" ), QString::null, 0, this, 0 );
234 connect( destAction, SIGNAL( toggled(bool) ), SLOT( destShow(bool) ) ); 234 connect( destAction, SIGNAL( toggled(bool) ), SLOT( destShow(bool) ) );
235 a = new QAction( tr( "Close Destinations" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 235 a = new QAction( tr( "Close Destinations" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
236 connect( a, SIGNAL( activated() ), SLOT( destClose() ) ); 236 connect( a, SIGNAL( activated() ), SLOT( destClose() ) );
237 a->addTo( destBar ); 237 a->addTo( destBar );
238 destBar->setStretchableWidget( CheckBoxLink ); 238 destBar->setStretchableWidget( CheckBoxLink );
239 destAction->setToggleAction( true ); 239 destAction->setToggleAction( true );
240 destAction->addTo( viewMenu ); 240 destAction->addTo( viewMenu );
241 241
242// helpMenu 242// helpMenu
243 helpMenu->insertSeparator(); 243 helpMenu->insertSeparator();
244 a = new QAction( tr( "Package Actions" ), QString::null, 0, this, 0 ); 244 a = new QAction( tr( "Package Actions" ), QString::null, 0, this, 0 );
245 a->addTo( helpMenu ); 245 a->addTo( helpMenu );
246 helpMenu->insertSeparator(); 246 helpMenu->insertSeparator();
247 a = new QAction( tr( "Install" ), 247 a = new QAction( tr( "Install" ),
248 Resource::loadPixmap( "oipkg/install" ), QString::null, 0, this, 0 ); 248 Resource::loadPixmap( "oipkg/install" ), QString::null, 0, this, 0 );
249 a->addTo( helpMenu ); 249 a->addTo( helpMenu );
250 a = new QAction( tr( "Remove" ), 250 a = new QAction( tr( "Remove" ),
251 Resource::loadPixmap( "oipkg/uninstall" ), QString::null, 0, this, 0 ); 251 Resource::loadPixmap( "oipkg/uninstall" ), QString::null, 0, this, 0 );
252 a->addTo( helpMenu ); 252 a->addTo( helpMenu );
253 helpMenu->insertSeparator(); 253 helpMenu->insertSeparator();
254 a = new QAction( tr( "Package Status" ), QString::null, 0, this, 0 ); 254 a = new QAction( tr( "Package Status" ), QString::null, 0, this, 0 );
255 a->addTo( helpMenu ); 255 a->addTo( helpMenu );
256 helpMenu->insertSeparator(); 256 helpMenu->insertSeparator();
257 a = new QAction( tr( "New version, installed" ), 257 a = new QAction( tr( "New version, installed" ),
258 Resource::loadPixmap( "oipkg/installed" ), QString::null, 0, this, 0 ); 258 Resource::loadPixmap( "oipkg/installed" ), QString::null, 0, this, 0 );
259 a->addTo( helpMenu ); 259 a->addTo( helpMenu );
260 a = new QAction( tr( "New version, not installed" ), 260 a = new QAction( tr( "New version, not installed" ),
261 Resource::loadPixmap( "oipkg/uninstalled" ), QString::null, 0, this, 0 ); 261 Resource::loadPixmap( "oipkg/uninstalled" ), QString::null, 0, this, 0 );
262 a->addTo( helpMenu ); 262 a->addTo( helpMenu );
263 a = new QAction( tr( "Old version, installed" ), 263 a = new QAction( tr( "Old version, installed" ),
264 Resource::loadPixmap( "oipkg/installedOld" ), QString::null, 0, this, 0 ); 264 Resource::loadPixmap( "oipkg/installedOld" ), QString::null, 0, this, 0 );
265 a->addTo( helpMenu ); 265 a->addTo( helpMenu );
diff --git a/noncore/unsupported/oipkg/mainwindow.h b/noncore/unsupported/oipkg/mainwindow.h
index 7446135..ae9fd0c 100644
--- a/noncore/unsupported/oipkg/mainwindow.h
+++ b/noncore/unsupported/oipkg/mainwindow.h
@@ -1,108 +1,108 @@
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#ifndef MAINWINDOW_H 13#ifndef MAINWINDOW_H
14#define MAINWINDOW_H 14#define MAINWINDOW_H
15 15
16#include <qmainwindow.h> 16#include <qmainwindow.h>
17#include <qaction.h> 17#include <qaction.h>
18#include <qtimer.h> 18#include <qtimer.h>
19#include <qpopupmenu.h> 19#include <qpopupmenu.h>
20 20
21#include "package.h" 21#include "package.h"
22#include "packagelist.h" 22#include "packagelist.h"
23#include "packagelistremote.h" 23#include "packagelistremote.h"
24#include "packagelistlocal.h" 24#include "packagelistlocal.h"
25#include "packagelistdoclnk.h" 25#include "packagelistdoclnk.h"
26#include "pmipkg.h" 26#include "pmipkg.h"
27#include "pksettings.h" 27#include "pksettings.h"
28#include "packagelistview.h" 28#include "packagelistview.h"
29 29
30class QComboBox; 30class QComboBox;
31class QPEToolBar; 31class QToolBar;
32class QLineEdit; 32class QLineEdit;
33class PackageListItem; 33class PackageListItem;
34class QCopChannel; 34class QCopChannel;
35class QMessageBox; 35class QMessageBox;
36class QCheckBox; 36class QCheckBox;
37 37
38class MainWindow : public QMainWindow 38class MainWindow : public QMainWindow
39{ 39{
40 Q_OBJECT 40 Q_OBJECT
41 41
42 42
43public: 43public:
44 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); 44 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
45 ~MainWindow(); 45 ~MainWindow();
46 46
47 QCopChannel *channel; 47 QCopChannel *channel;
48 48
49protected slots: 49protected slots:
50 void runIpkg(); 50 void runIpkg();
51 void updateList(); 51 void updateList();
52 void displayList(); 52 void displayList();
53 void subSectionChanged(); 53 void subSectionChanged();
54 void sectionChanged(); 54 void sectionChanged();
55 void showSettings(int); 55 void showSettings(int);
56 void showSettingsSetup(); 56 void showSettingsSetup();
57 void showSettingsSrv(); 57 void showSettingsSrv();
58 void showSettingsDst(); 58 void showSettingsDst();
59 59
60public slots: 60public slots:
61 void sectionClose(); 61 void sectionClose();
62 void sectionShow(bool); 62 void sectionShow(bool);
63 void findClose(); 63 void findClose();
64 void findShow(bool); 64 void findShow(bool);
65 void searchClose(); 65 void searchClose();
66 void searchShow(bool); 66 void searchShow(bool);
67 void destClose(); 67 void destClose();
68 void destShow(bool); 68 void destShow(bool);
69 void filterList(); 69 void filterList();
70 void createLinks(); 70 void createLinks();
71 void removeLinks(); 71 void removeLinks();
72 void receive (const QCString &, const QByteArray &); 72 void receive (const QCString &, const QByteArray &);
73 void setDocument (const QString &); 73 void setDocument (const QString &);
74 void remotePackageQuery(); 74 void remotePackageQuery();
75 75
76private: 76private:
77 void makeMenu(); 77 void makeMenu();
78 void makeChannel(); 78 void makeChannel();
79 void setSections(); 79 void setSections();
80 void setSubSections(); 80 void setSubSections();
81 bool updateIcon; 81 bool updateIcon;
82 82
83 PmIpkg* ipkg; 83 PmIpkg* ipkg;
84 PackageManagerSettings *settings; 84 PackageManagerSettings *settings;
85 PackageListLocal packageListServers; 85 PackageListLocal packageListServers;
86 PackageListRemote packageListSearch; 86 PackageListRemote packageListSearch;
87 PackageListDocLnk packageListDocLnk; 87 PackageListDocLnk packageListDocLnk;
88 PackageListView *listViewPackages; 88 PackageListView *listViewPackages;
89 QAction *runAction; 89 QAction *runAction;
90 QAction *updateAction; 90 QAction *updateAction;
91 QAction *findAction; 91 QAction *findAction;
92 QPEToolBar *findBar; 92 QToolBar *findBar;
93 QLineEdit *findEdit; 93 QLineEdit *findEdit;
94 QAction *searchAction; 94 QAction *searchAction;
95 QAction *searchCommit; 95 QAction *searchCommit;
96 QPEToolBar *searchBar; 96 QToolBar *searchBar;
97 QLineEdit *searchEdit; 97 QLineEdit *searchEdit;
98 QAction *sectionAction; 98 QAction *sectionAction;
99 QPEToolBar *sectionBar; 99 QToolBar *sectionBar;
100 QComboBox *section; 100 QComboBox *section;
101 QComboBox *subsection; 101 QComboBox *subsection;
102 QAction *destAction; 102 QAction *destAction;
103 QPEToolBar *destBar; 103 QToolBar *destBar;
104 QComboBox *destination; 104 QComboBox *destination;
105 QCheckBox* CheckBoxLink; 105 QCheckBox* CheckBoxLink;
106}; 106};
107 107
108#endif 108#endif
diff --git a/noncore/unsupported/qpdf/qpdf.cpp b/noncore/unsupported/qpdf/qpdf.cpp
index de1dcf3..5cdcccf 100644
--- a/noncore/unsupported/qpdf/qpdf.cpp
+++ b/noncore/unsupported/qpdf/qpdf.cpp
@@ -1,73 +1,73 @@
1//======================================================================== 1//========================================================================
2// 2//
3// qpdf.cc 3// qpdf.cc
4// 4//
5// Copyright 2001 Robert Griebl 5// Copyright 2001 Robert Griebl
6// 6//
7//======================================================================== 7//========================================================================
8 8
9#include "aconf.h" 9#include "aconf.h"
10#include "GString.h" 10#include "GString.h"
11#include "PDFDoc.h" 11#include "PDFDoc.h"
12#include "TextOutputDev.h" 12#include "TextOutputDev.h"
13 13
14#include "QPEOutputDev.h" 14#include "QPEOutputDev.h"
15 15
16#include <qpe/qpeapplication.h> 16#include <qpe/qpeapplication.h>
17#include <qpe/resource.h> 17#include <qpe/resource.h>
18#include <qpe/applnk.h> 18#include <qpe/applnk.h>
19#include <qpe/qcopenvelope_qws.h> 19#include <qpe/qcopenvelope_qws.h>
20 20
21 21
22#include <qclipboard.h> 22#include <qclipboard.h>
23#include <qpe/qpetoolbar.h> 23#include <qpe/qpetoolbar.h>
24#include <qtoolbutton.h> 24#include <qtoolbutton.h>
25#include <qpe/qpemenubar.h> 25#include <qmenubar.h>
26#include <qpopupmenu.h> 26#include <qpopupmenu.h>
27#include <qwidgetstack.h> 27#include <qwidgetstack.h>
28#include <qtimer.h> 28#include <qtimer.h>
29#include <qfileinfo.h> 29#include <qfileinfo.h>
30#include <qstring.h> 30#include <qstring.h>
31#include <qlineedit.h> 31#include <qlineedit.h>
32#include <qspinbox.h> 32#include <qspinbox.h>
33#include <qlayout.h> 33#include <qlayout.h>
34#include <qdialog.h> 34#include <qdialog.h>
35#include <qlabel.h> 35#include <qlabel.h>
36#include <qmessagebox.h> 36#include <qmessagebox.h>
37 37
38#include "qpdf.h" 38#include "qpdf.h"
39 39
40#ifdef QPDF_QPE_ONLY 40#ifdef QPDF_QPE_ONLY
41#include <qpe/fileselector.h> 41#include <qpe/fileselector.h>
42#else 42#else
43#include <opie/ofileselector.h> 43#include <opie/ofileselector.h>
44#endif 44#endif
45 45
46 46
47int main ( int argc, char **argv ) 47int main ( int argc, char **argv )
48{ 48{
49 QPEApplication app ( argc, argv ); 49 QPEApplication app ( argc, argv );
50 50
51 // read config file 51 // read config file
52 globalParams = new GlobalParams ( "" ); 52 globalParams = new GlobalParams ( "" );
53 globalParams-> setErrQuiet ( true ); 53 globalParams-> setErrQuiet ( true );
54 54
55 QPdfDlg *dlg = new QPdfDlg ( ); 55 QPdfDlg *dlg = new QPdfDlg ( );
56 app. showMainDocumentWidget ( dlg ); 56 app. showMainDocumentWidget ( dlg );
57 57
58 if (( app. argc ( ) == 3 ) && ( app. argv ( ) [1] == QCString ( "-f" ))) 58 if (( app. argc ( ) == 3 ) && ( app. argv ( ) [1] == QCString ( "-f" )))
59 dlg-> openFile ( app. argv ( ) [2] ); 59 dlg-> openFile ( app. argv ( ) [2] );
60 60
61 return app. exec ( ); 61 return app. exec ( );
62} 62}
63 63
64 64
65QPdfDlg::QPdfDlg ( ) : QMainWindow ( ) 65QPdfDlg::QPdfDlg ( ) : QMainWindow ( )
66{ 66{
67 setCaption ( tr( "QPdf" )); 67 setCaption ( tr( "QPdf" ));
68 setIcon ( Resource::loadPixmap ( "qpdf_icon" )); 68 setIcon ( Resource::loadPixmap ( "qpdf_icon" ));
69 69
70 m_busy = false; 70 m_busy = false;
71 71
72 m_doc = 0; 72 m_doc = 0;
73 m_pages = 0; 73 m_pages = 0;