summaryrefslogtreecommitdiff
path: root/core
Unidiff
Diffstat (limited to 'core') (more/less context) (show 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
16 files changed, 38 insertions, 38 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