summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-08-23 20:09:28 (UTC)
committer zautrix <zautrix>2005-08-23 20:09:28 (UTC)
commit6f5464760f5fb1e4c13027464cfe4943b85d29a0 (patch) (unidiff)
tree3c074b7e313d965516b60b9ba97fe27a7ee774a1
parent13a736b71dec27ef7ffef06b91f34d220d89cce6 (diff)
downloadkdepimpi-6f5464760f5fb1e4c13027464cfe4943b85d29a0.zip
kdepimpi-6f5464760f5fb1e4c13027464cfe4943b85d29a0.tar.gz
kdepimpi-6f5464760f5fb1e4c13027464cfe4943b85d29a0.tar.bz2
fixx
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp6
-rw-r--r--kaddressbook/kaddressbookmain.cpp2
-rw-r--r--kmicromail/accountview.cpp2
-rw-r--r--microkde/kdeui/kmainwindow.cpp9
-rw-r--r--microkde/kdeui/kmainwindow.h2
5 files changed, 11 insertions, 10 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 77321aa..af12f2b 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -363,115 +363,115 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
363 SLOT( setModified() ) ); 363 SLOT( setModified() ) );
364 364
365 connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ), 365 connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ),
366 SLOT( incrementalSearchJump( const QString& ) ) ); 366 SLOT( incrementalSearchJump( const QString& ) ) );
367 connect( mIncSearchWidget, SIGNAL( fieldChanged() ), 367 connect( mIncSearchWidget, SIGNAL( fieldChanged() ),
368 mJumpButtonBar, SLOT( recreateButtons() ) ); 368 mJumpButtonBar, SLOT( recreateButtons() ) );
369 369
370 connect( mDetails, SIGNAL( sendEmail( const QString& ) ), 370 connect( mDetails, SIGNAL( sendEmail( const QString& ) ),
371 SLOT( sendMail( const QString& ) ) ); 371 SLOT( sendMail( const QString& ) ) );
372 372
373 373
374 connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); 374 connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&)));
375 connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); 375 connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)));
376 connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); 376 connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&)));
377 connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle())); 377 connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle()));
378 connect( ExternalAppHandler::instance(), SIGNAL (doRingSync()),this, SLOT( doRingSync())); 378 connect( ExternalAppHandler::instance(), SIGNAL (doRingSync()),this, SLOT( doRingSync()));
379 connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog())); 379 connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog()));
380 380
381 381
382#ifndef KAB_EMBEDDED 382#ifndef KAB_EMBEDDED
383 connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), 383 connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ),
384 mXXPortManager, SLOT( importVCard( const KURL& ) ) ); 384 mXXPortManager, SLOT( importVCard( const KURL& ) ) );
385 385
386 connect( mDetails, SIGNAL( browse( const QString& ) ), 386 connect( mDetails, SIGNAL( browse( const QString& ) ),
387 SLOT( browse( const QString& ) ) ); 387 SLOT( browse( const QString& ) ) );
388 388
389 389
390 mAddressBookService = new KAddressBookService( this ); 390 mAddressBookService = new KAddressBookService( this );
391 391
392#endif //KAB_EMBEDDED 392#endif //KAB_EMBEDDED
393 393
394 mMessageTimer = new QTimer( this ); 394 mMessageTimer = new QTimer( this );
395 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); 395 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) );
396 mEditorDialog = 0; 396 mEditorDialog = 0;
397 createAddresseeEditorDialog( this ); 397 createAddresseeEditorDialog( this );
398 setModified( false ); 398 setModified( false );
399 mBRdisabled = false; 399 mBRdisabled = false;
400#ifndef DESKTOP_VERSION 400#ifndef DESKTOP_VERSION
401 infrared = 0; 401 infrared = 0;
402#endif 402#endif
403 //toggleBeamReceive( ); 403 //toggleBeamReceive( );
404 mMainWindow->toolBar()->show(); 404 mMainWindow->toolBar()->show();
405 // we have a toolbar repainting error on the Zaurus when starting KA/Pi 405 // we have a toolbar repainting error on the Zaurus when starting KA/Pi
406 //QTimer::singleShot( 10, this , SLOT ( updateToolBar())); 406 //QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
407 QTimer::singleShot( 100, this, SLOT ( loadDataAfterStart() )); 407 QTimer::singleShot( 100, this, SLOT ( loadDataAfterStart() ));
408} 408}
409void KABCore::receiveStart( const QCString& cmsg, const QByteArray& data ) 409void KABCore::receiveStart( const QCString& cmsg, const QByteArray& data )
410{ 410{
411 qDebug("KO: QCOP start message received: %s ", cmsg.data() ); 411 //qDebug("KO: QCOP start message received: %s ", cmsg.data() );
412 mCStringMess = cmsg; 412 mCStringMess = cmsg;
413 mByteData = data; 413 mByteData = data;
414} 414}
415 415
416void KABCore::loadDataAfterStart() 416void KABCore::loadDataAfterStart()
417{ 417{
418 qDebug("KABCore::loadDataAfterStart() "); 418 //qDebug("KABCore::loadDataAfterStart() ");
419 ((StdAddressBook*)mAddressBook)->init( true ); 419 ((StdAddressBook*)mAddressBook)->init( true );
420 mViewManager->refreshView(); 420 mViewManager->refreshView();
421 421
422#ifndef DESKTOP_VERSION 422#ifndef DESKTOP_VERSION
423 disconnect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT (receiveStart ( const QCString &, const QByteArray & ))); 423 disconnect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT (receiveStart ( const QCString &, const QByteArray & )));
424 424
425 QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 425 QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
426 if ( !mCStringMess.isEmpty() ) 426 if ( !mCStringMess.isEmpty() )
427 ExternalAppHandler::instance()->appMessage( mCStringMess, mByteData ); 427 ExternalAppHandler::instance()->appMessage( mCStringMess, mByteData );
428#endif 428#endif
429 QTimer::singleShot( 10, this , SLOT ( updateToolBar())); 429 // QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
430 setCaptionBack(); 430 setCaptionBack();
431} 431}
432void KABCore::updateToolBar() 432void KABCore::updateToolBar()
433{ 433{
434 static int iii = 0; 434 static int iii = 0;
435 ++iii; 435 ++iii;
436 mMainWindow->toolBar()->repaintMe(); 436 mMainWindow->toolBar()->repaintMe();
437 if ( iii < 4 ) 437 if ( iii < 4 )
438 QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar())); 438 QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar()));
439} 439}
440KABCore::~KABCore() 440KABCore::~KABCore()
441{ 441{
442 // save(); 442 // save();
443 //saveSettings(); 443 //saveSettings();
444 //KABPrefs::instance()->writeConfig(); 444 //KABPrefs::instance()->writeConfig();
445 delete AddresseeConfig::instance(); 445 delete AddresseeConfig::instance();
446 mAddressBook = 0; 446 mAddressBook = 0;
447 KABC::StdAddressBook::close(); 447 KABC::StdAddressBook::close();
448 448
449 delete syncManager; 449 delete syncManager;
450#ifndef DESKTOP_VERSION 450#ifndef DESKTOP_VERSION
451 if ( infrared ) 451 if ( infrared )
452 delete infrared; 452 delete infrared;
453#endif 453#endif
454} 454}
455void KABCore::receive( const QCString& cmsg, const QByteArray& data ) 455void KABCore::receive( const QCString& cmsg, const QByteArray& data )
456{ 456{
457 //qDebug("KA: QCOP message received: %s ", cmsg.data() ); 457 //qDebug("KA: QCOP message received: %s ", cmsg.data() );
458 if ( cmsg == "setDocument(QString)" ) { 458 if ( cmsg == "setDocument(QString)" ) {
459 QDataStream stream( data, IO_ReadOnly ); 459 QDataStream stream( data, IO_ReadOnly );
460 QString fileName; 460 QString fileName;
461 stream >> fileName; 461 stream >> fileName;
462 recieve( fileName ); 462 recieve( fileName );
463 return; 463 return;
464 } 464 }
465} 465}
466void KABCore::toggleBeamReceive( ) 466void KABCore::toggleBeamReceive( )
467{ 467{
468 if ( mBRdisabled ) 468 if ( mBRdisabled )
469 return; 469 return;
470#ifndef DESKTOP_VERSION 470#ifndef DESKTOP_VERSION
471 if ( infrared ) { 471 if ( infrared ) {
472 qDebug("KA: AB disable BeamReceive "); 472 qDebug("KA: AB disable BeamReceive ");
473 delete infrared; 473 delete infrared;
474 infrared = 0; 474 infrared = 0;
475 mActionBR->setChecked(false); 475 mActionBR->setChecked(false);
476 return; 476 return;
477 } 477 }
diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp
index 8fe3ee0..c417226 100644
--- a/kaddressbook/kaddressbookmain.cpp
+++ b/kaddressbook/kaddressbookmain.cpp
@@ -1,91 +1,91 @@
1/* 1/*
2 This file is part of KAddressbook. 2 This file is part of KAddressbook.
3 Copyright (c) 1999 Don Sanders <dsanders@kde.org> 3 Copyright (c) 1999 Don Sanders <dsanders@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#ifdef KAB_EMBEDDED 24#ifdef KAB_EMBEDDED
25#include "kabprefs.h" 25#include "kabprefs.h"
26#include <kglobal.h> 26#include <kglobal.h>
27#include <qmessagebox.h> 27#include <qmessagebox.h>
28#include <qtoolbar.h> 28#include <qtoolbar.h>
29#include <qapplication.h> 29#include <qapplication.h>
30#else //KAB_EMBEDDED 30#else //KAB_EMBEDDED
31#include <kedittoolbar.h> 31#include <kedittoolbar.h>
32#include <kkeydialog.h> 32#include <kkeydialog.h>
33#include <kmessagebox.h> 33#include <kmessagebox.h>
34#include <kstatusbar.h> 34#include <kstatusbar.h>
35#endif //KAB_EMBEDDED 35#endif //KAB_EMBEDDED
36#include <klocale.h> 36#include <klocale.h>
37 37
38#include "kabcore.h" 38#include "kabcore.h"
39#include "kaddressbookmain.h" 39#include "kaddressbookmain.h"
40#include "kactioncollection.h" 40#include "kactioncollection.h"
41 41
42#ifdef KAB_EMBEDDED 42#ifdef KAB_EMBEDDED
43KAddressBookMain::KAddressBookMain() : KMainWindow( 0, "adrressbook" ) 43KAddressBookMain::KAddressBookMain() : KMainWindow( 0, "abmain" )
44#else //KAB_EMBEDDED 44#else //KAB_EMBEDDED
45//MOC_SKIP_BEGIN 45//MOC_SKIP_BEGIN
46KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainWindow( 0 ) 46KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainWindow( 0 )
47//MOC_SKIP_END 47//MOC_SKIP_END
48#endif //KAB_EMBEDDED 48#endif //KAB_EMBEDDED
49{ 49{
50 setIcon(SmallIcon( "ka24" ) ); 50 setIcon(SmallIcon( "ka24" ) );
51#if 0 51#if 0
52 //US for embedded systems, create the toolbar before we initiate KABCore. 52 //US for embedded systems, create the toolbar before we initiate KABCore.
53 // KABCore will fill the toolbar with menues and icons 53 // KABCore will fill the toolbar with menues and icons
54 QMainWindow::ToolBarDock tbd; 54 QMainWindow::ToolBarDock tbd;
55 tbd = Top; 55 tbd = Top;
56 iconToolBar = new QToolBar( this ); 56 iconToolBar = new QToolBar( this );
57 addToolBar (iconToolBar , tbd ); 57 addToolBar (iconToolBar , tbd );
58 iconToolBar->setHorizontalStretchable(true); 58 iconToolBar->setHorizontalStretchable(true);
59//US iconToolBar->setWidth(300); 59//US iconToolBar->setWidth(300);
60#endif // 0 60#endif // 0
61 61
62 mCore = new KABCore( this, true, this ); 62 mCore = new KABCore( this, true, this );
63 63
64#ifdef KAB_EMBEDDED 64#ifdef KAB_EMBEDDED
65 setCaption( i18n( "KAddressbook/Pi" ) ); 65 setCaption( i18n( "KAddressbook/Pi" ) );
66#else //KAB_EMBEDDED 66#else //KAB_EMBEDDED
67 setCaption( i18n( "Address Book Browser" ) ); 67 setCaption( i18n( "Address Book Browser" ) );
68#endif //KAB_EMBEDDED 68#endif //KAB_EMBEDDED
69 69
70 //mCore->restoreSettings(); 70 //mCore->restoreSettings();
71 71
72 initActions(); 72 initActions();
73 73
74 setCentralWidget( mCore ); 74 setCentralWidget( mCore );
75 75
76//US statusBar()->show(); 76//US statusBar()->show();
77 77
78#ifndef KAB_EMBEDDED 78#ifndef KAB_EMBEDDED
79 setStandardToolBarMenuEnabled(true); 79 setStandardToolBarMenuEnabled(true);
80 80
81 createGUI( "kaddressbookui.rc", false ); 81 createGUI( "kaddressbookui.rc", false );
82 82
83 83
84#endif //KAB_EMBEDDED 84#endif //KAB_EMBEDDED
85 setAutoSaveSettings(); 85 setAutoSaveSettings();
86 mCore->restoreSettings(); 86 mCore->restoreSettings();
87#ifndef DESKTOP_VERSION 87#ifndef DESKTOP_VERSION
88 QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), mCore, SLOT (receiveStart ( const QCString &, const QByteArray & ))); 88 QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), mCore, SLOT (receiveStart ( const QCString &, const QByteArray & )));
89#endif 89#endif
90} 90}
91 91
diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp
index 4879d57..d1d4f7e 100644
--- a/kmicromail/accountview.cpp
+++ b/kmicromail/accountview.cpp
@@ -53,97 +53,97 @@ void AccountView::slotHold(int button, QListViewItem * item,const QPoint&,int)
53 if (button==1) {return;} 53 if (button==1) {return;}
54 if (!item) return; 54 if (!item) return;
55 AccountViewItem *view = static_cast<AccountViewItem *>(item); 55 AccountViewItem *view = static_cast<AccountViewItem *>(item);
56 QPopupMenu*m = view->getContextMenu(); 56 QPopupMenu*m = view->getContextMenu();
57 if (!m) return; 57 if (!m) return;
58 connect(m,SIGNAL(activated(int)),this,SLOT(slotContextMenu(int))); 58 connect(m,SIGNAL(activated(int)),this,SLOT(slotContextMenu(int)));
59 m->setFocus(); 59 m->setFocus();
60 m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); 60 m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) );
61 delete m; 61 delete m;
62} 62}
63 63
64void AccountView::populate( QList<Account> list ) 64void AccountView::populate( QList<Account> list )
65{ 65{
66 clear(); 66 clear();
67 67
68 imapAccounts.clear(); 68 imapAccounts.clear();
69 mhAccounts.clear(); 69 mhAccounts.clear();
70 70
71 mhAccounts.append(new MHviewItem(AbstractMail::defaultLocalfolder(),this)); 71 mhAccounts.append(new MHviewItem(AbstractMail::defaultLocalfolder(),this));
72 72
73 Account *it; 73 Account *it;
74 for ( it = list.first(); it; it = list.next() ) 74 for ( it = list.first(); it; it = list.next() )
75 { 75 {
76 if ( it->getType() == MAILLIB::A_IMAP ) 76 if ( it->getType() == MAILLIB::A_IMAP )
77 { 77 {
78 IMAPaccount *imap = static_cast<IMAPaccount *>(it); 78 IMAPaccount *imap = static_cast<IMAPaccount *>(it);
79 imapAccounts.append(new IMAPviewItem( imap, this )); 79 imapAccounts.append(new IMAPviewItem( imap, this ));
80 } 80 }
81 else if ( it->getType() == MAILLIB::A_POP3 ) 81 else if ( it->getType() == MAILLIB::A_POP3 )
82 { 82 {
83 POP3account *pop3 = static_cast<POP3account *>(it); 83 POP3account *pop3 = static_cast<POP3account *>(it);
84 /* must not be hold 'cause it isn't required */ 84 /* must not be hold 'cause it isn't required */
85 (void) new POP3viewItem( pop3, this ); 85 (void) new POP3viewItem( pop3, this );
86 } 86 }
87 else if ( it->getType() == MAILLIB::A_NNTP ) 87 else if ( it->getType() == MAILLIB::A_NNTP )
88 { 88 {
89 NNTPaccount *nntp = static_cast<NNTPaccount *>(it); 89 NNTPaccount *nntp = static_cast<NNTPaccount *>(it);
90 /* must not be hold 'cause it isn't required */ 90 /* must not be hold 'cause it isn't required */
91 (void) new NNTPviewItem( nntp, this ); 91 (void) new NNTPviewItem( nntp, this );
92 } 92 }
93 } 93 }
94} 94}
95 95
96void AccountView::refresh(QListViewItem *item) 96void AccountView::refresh(QListViewItem *item)
97{ 97{
98 if ( item ) 98 if ( item )
99 { 99 {
100 bool ask = true; 100 bool ask = true;
101 qDebug("text -%s- ",item->text( 0 ).latin1() ); 101 //qDebug("text -%s- ",item->text( 0 ).latin1() );
102 if ( item->text( 0 ) == i18n (" Local Mailfolders") ) 102 if ( item->text( 0 ) == i18n (" Local Mailfolders") )
103 ask = false; 103 ask = false;
104 else { 104 else {
105 if ( item->parent() ) 105 if ( item->parent() )
106 if ( item->parent()->text( 0 ) == i18n (" Local Mailfolders") ) 106 if ( item->parent()->text( 0 ) == i18n (" Local Mailfolders") )
107 ask = false; 107 ask = false;
108 } 108 }
109 if ( ask ) { 109 if ( ask ) {
110 int result = KMessageBox::warningContinueCancel(this, 110 int result = KMessageBox::warningContinueCancel(this,
111 i18n("Refresh\n%1\n?").arg( item->text(0) ), 111 i18n("Refresh\n%1\n?").arg( item->text(0) ),
112 i18n("Refresh"),i18n("Refresh"),i18n("Cancel"), 112 i18n("Refresh"),i18n("Refresh"),i18n("Cancel"),
113 true); 113 true);
114 if (result != KMessageBox::Continue) return; 114 if (result != KMessageBox::Continue) return;
115 } 115 }
116 m_currentItem = item; 116 m_currentItem = item;
117 topLevelWidget()->setCaption( i18n ( "Refreshing %1 ... please wait" ). arg ( m_currentItem->text( 0 ) ) ) ; 117 topLevelWidget()->setCaption( i18n ( "Refreshing %1 ... please wait" ). arg ( m_currentItem->text( 0 ) ) ) ;
118 QTimer::singleShot( 500, this, SLOT ( refreshCurrentSelected() ) ); 118 QTimer::singleShot( 500, this, SLOT ( refreshCurrentSelected() ) );
119 119
120 } 120 }
121} 121}
122void AccountView::refreshOutgoing() 122void AccountView::refreshOutgoing()
123{ 123{
124 m_currentItem = currentItem(); 124 m_currentItem = currentItem();
125 if ( !m_currentItem ) return; 125 if ( !m_currentItem ) return;
126 AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); 126 AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem);
127 if ( !view->getFolder() ) 127 if ( !view->getFolder() )
128 return; 128 return;
129 QString bName = view->getFolder()->getDisplayName(); 129 QString bName = view->getFolder()->getDisplayName();
130 if (bName.startsWith("/")&&bName.length()>1) 130 if (bName.startsWith("/")&&bName.length()>1)
131 { 131 {
132 bName.replace(0,1,""); 132 bName.replace(0,1,"");
133 } 133 }
134 int pos = bName.findRev("/"); 134 int pos = bName.findRev("/");
135 if (pos > 0) 135 if (pos > 0)
136 { 136 {
137 bName.replace(0,pos+1,""); 137 bName.replace(0,pos+1,"");
138 } 138 }
139 //qDebug("name *%s* ",bName.lower().latin1() ); 139 //qDebug("name *%s* ",bName.lower().latin1() );
140 if ( bName.lower() == "outgoing" || bName.lower() == "sent" || bName.lower() == "sendfailed" ) { 140 if ( bName.lower() == "outgoing" || bName.lower() == "sent" || bName.lower() == "sendfailed" ) {
141 refreshCurrent(); 141 refreshCurrent();
142 // qDebug("refresh "); 142 // qDebug("refresh ");
143 } 143 }
144} 144}
145void AccountView::refreshCurrentSelected() 145void AccountView::refreshCurrentSelected()
146{ 146{
147 if ( !m_currentItem ) return; 147 if ( !m_currentItem ) return;
148 QValueList<RecMailP> headerlist; 148 QValueList<RecMailP> headerlist;
149 AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); 149 AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem);
diff --git a/microkde/kdeui/kmainwindow.cpp b/microkde/kdeui/kmainwindow.cpp
index 3ae4c87..fa678f2 100644
--- a/microkde/kdeui/kmainwindow.cpp
+++ b/microkde/kdeui/kmainwindow.cpp
@@ -8,97 +8,97 @@
8 (C) 2002 Joseph Wenninger (jowenn@kde.org) 8 (C) 2002 Joseph Wenninger (jowenn@kde.org)
9 9
10 This library is free software; you can redistribute it and/or 10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Library General Public 11 modify it under the terms of the GNU Library General Public
12 License version 2 as published by the Free Software Foundation. 12 License version 2 as published by the Free Software Foundation.
13 13
14 This library is distributed in the hope that it will be useful, 14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Library General Public License for more details. 17 Library General Public License for more details.
18 18
19 You should have received a copy of the GNU Library General Public License 19 You should have received a copy of the GNU Library General Public License
20 along with this library; see the file COPYING.LIB. If not, write to 20 along with this library; see the file COPYING.LIB. If not, write to
21 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. 22 Boston, MA 02111-1307, USA.
23 */ 23 */
24#include <qobjectlist.h> 24#include <qobjectlist.h>
25#include <qstringlist.h> 25#include <qstringlist.h>
26#include <qtimer.h> 26#include <qtimer.h>
27#include <qmenubar.h> 27#include <qmenubar.h>
28#include <qstatusbar.h> 28#include <qstatusbar.h>
29#include <qapplication.h> 29#include <qapplication.h>
30 30
31 31
32#include "kdebug.h" 32#include "kdebug.h"
33#include "kmainwindow.h" 33#include "kmainwindow.h"
34#include "kglobalsettings.h" 34#include "kglobalsettings.h"
35#include "kactioncollection.h" 35#include "kactioncollection.h"
36 36
37class KMainWindowPrivate { 37class KMainWindowPrivate {
38public: 38public:
39//US bool showHelpMenu:1; 39//US bool showHelpMenu:1;
40 40
41 bool autoSaveSettings:1; 41 bool autoSaveSettings:1;
42 bool settingsDirty:1; 42 bool settingsDirty:1;
43 bool autoSaveWindowSize:1; 43 bool autoSaveWindowSize:1;
44 bool care_about_geometry:1; 44 bool care_about_geometry:1;
45 QString autoSaveGroup; 45 QString autoSaveGroup;
46//US KAccel * kaccel; 46//US KAccel * kaccel;
47//US KMainWindowInterface *m_interface; 47//US KMainWindowInterface *m_interface;
48 KDEPrivate::ToolBarHandler *toolBarHandler; 48 KDEPrivate::ToolBarHandler *toolBarHandler;
49 QTimer* settingsTimer; 49 QTimer* settingsTimer;
50 KToggleAction *showStatusBarAction; 50 KToggleAction *showStatusBarAction;
51 QRect defaultWindowSize; 51 QRect defaultWindowSize;
52}; 52};
53 53
54static bool no_query_exit = false; 54static bool no_query_exit = false;
55 55
56KMainWindow::KMainWindow( QWidget* parent, const char *name, WFlags f ) 56KMainWindow::KMainWindow( QWidget* parent, const char *name )
57 : QMainWindow( parent, name ) /*LR, f ) with the default widget flag we cannot have fastload */ /*US, KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )*/ 57 : QMainWindow( parent, name ) /*LR, f ) with the default widget flag we cannot have fastload */ /*US, KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )*/
58{ 58{
59 mQToolBar = 0; 59 mQToolBar = 0;
60 initKMainWindow(name); 60 initKMainWindow(name);
61} 61}
62 62
63void KMainWindow::parseGeometry(bool parsewidth) 63void KMainWindow::parseGeometry(bool parsewidth)
64{ 64{
65//US the following code is not getting used in the embedded version !! So disable it for now 65//US the following code is not getting used in the embedded version !! So disable it for now
66/*US 66/*US
67 67
68 assert ( !kapp->geometryArgument().isNull() ); 68 assert ( !kapp->geometryArgument().isNull() );
69 assert ( d->care_about_geometry ); 69 assert ( d->care_about_geometry );
70 70
71#ifndef Q_WS_QWS 71#ifndef Q_WS_QWS
72 // FIXME: (E) Implement something similar for Qt Embedded (or decide we don't need it) 72 // FIXME: (E) Implement something similar for Qt Embedded (or decide we don't need it)
73 int x, y; 73 int x, y;
74 int w, h; 74 int w, h;
75 int m = XParseGeometry( kapp->geometryArgument().latin1(), &x, &y, (unsigned int*)&w, (unsigned int*)&h); 75 int m = XParseGeometry( kapp->geometryArgument().latin1(), &x, &y, (unsigned int*)&w, (unsigned int*)&h);
76 if (parsewidth) { 76 if (parsewidth) {
77 QSize minSize = minimumSize(); 77 QSize minSize = minimumSize();
78 QSize maxSize = maximumSize(); 78 QSize maxSize = maximumSize();
79 if ( (m & WidthValue) == 0 ) 79 if ( (m & WidthValue) == 0 )
80 w = width(); 80 w = width();
81 if ( (m & HeightValue) == 0 ) 81 if ( (m & HeightValue) == 0 )
82 h = height(); 82 h = height();
83 w = QMIN(w,maxSize.width()); 83 w = QMIN(w,maxSize.width());
84 h = QMIN(h,maxSize.height()); 84 h = QMIN(h,maxSize.height());
85 w = QMAX(w,minSize.width()); 85 w = QMAX(w,minSize.width());
86 h = QMAX(h,minSize.height()); 86 h = QMAX(h,minSize.height());
87 resize(w, h); 87 resize(w, h);
88 } else { 88 } else {
89 if ( parsewidth && (m & XValue) == 0 ) 89 if ( parsewidth && (m & XValue) == 0 )
90 x = geometry().x(); 90 x = geometry().x();
91 if ( parsewidth && (m & YValue) == 0 ) 91 if ( parsewidth && (m & YValue) == 0 )
92 y = geometry().y(); 92 y = geometry().y();
93 if ( (m & XNegative) ) 93 if ( (m & XNegative) )
94 x = KApplication::desktop()->width() + x - w; 94 x = KApplication::desktop()->width() + x - w;
95 if ( (m & YNegative) ) 95 if ( (m & YNegative) )
96 y = KApplication::desktop()->height() + y - h; 96 y = KApplication::desktop()->height() + y - h;
97 move(x, y); 97 move(x, y);
98 } 98 }
99#endif 99#endif
100*/ 100*/
101} 101}
102 102
103KMainWindow::~KMainWindow() 103KMainWindow::~KMainWindow()
104{ 104{
@@ -802,192 +802,193 @@ void KMainWindow::restoreWindowSize( KConfig * config )
802 if (!size.isEmpty()) { 802 if (!size.isEmpty()) {
803 // make sure the other resolutions don't get old settings 803 // make sure the other resolutions don't get old settings
804 config->writeEntry( QString::fromLatin1("Width"), 0 ); 804 config->writeEntry( QString::fromLatin1("Width"), 0 );
805 config->writeEntry( QString::fromLatin1("Height"), 0 ); 805 config->writeEntry( QString::fromLatin1("Height"), 0 );
806 } 806 }
807 } 807 }
808 if ( !size.isEmpty() ) 808 if ( !size.isEmpty() )
809 resize( size ); 809 resize( size );
810 } 810 }
811} 811}
812 812
813bool KMainWindow::initialGeometrySet() const 813bool KMainWindow::initialGeometrySet() const
814{ 814{
815 return d->care_about_geometry; 815 return d->care_about_geometry;
816} 816}
817 817
818void KMainWindow::ignoreInitialGeometry() 818void KMainWindow::ignoreInitialGeometry()
819{ 819{
820 d->care_about_geometry = false; 820 d->care_about_geometry = false;
821} 821}
822 822
823void KMainWindow::setSettingsDirty() 823void KMainWindow::setSettingsDirty()
824{ 824{
825 //kdDebug(200) << "KMainWindow::setSettingsDirty" << endl; 825 //kdDebug(200) << "KMainWindow::setSettingsDirty" << endl;
826 d->settingsDirty = true; 826 d->settingsDirty = true;
827 if ( d->autoSaveSettings ) 827 if ( d->autoSaveSettings )
828 { 828 {
829 // Use a timer to save "immediately" user-wise, but not too immediately 829 // Use a timer to save "immediately" user-wise, but not too immediately
830 // (to compress calls and save only once, in case of multiple changes) 830 // (to compress calls and save only once, in case of multiple changes)
831 if ( !d->settingsTimer ) 831 if ( !d->settingsTimer )
832 { 832 {
833 d->settingsTimer = new QTimer( this ); 833 d->settingsTimer = new QTimer( this );
834 connect( d->settingsTimer, SIGNAL( timeout() ), SLOT( saveAutoSaveSettings() ) ); 834 connect( d->settingsTimer, SIGNAL( timeout() ), SLOT( saveAutoSaveSettings() ) );
835 } 835 }
836 d->settingsTimer->start( 500, true ); 836 d->settingsTimer->start( 500, true );
837 } 837 }
838} 838}
839 839
840bool KMainWindow::settingsDirty() const 840bool KMainWindow::settingsDirty() const
841{ 841{
842 return d->settingsDirty; 842 return d->settingsDirty;
843} 843}
844 844
845QString KMainWindow::settingsGroup() const 845QString KMainWindow::settingsGroup() const
846{ 846{
847 return d->autoSaveGroup; 847 return d->autoSaveGroup;
848} 848}
849 849
850void KMainWindow::resizeEvent( QResizeEvent * ) 850void KMainWindow::resizeEvent( QResizeEvent * e)
851{ 851{
852 if ( d->autoSaveWindowSize ) 852 if ( d->autoSaveWindowSize )
853 setSettingsDirty(); 853 setSettingsDirty();
854 QMainWindow::resizeEvent( e );
854} 855}
855 856
856bool KMainWindow::hasMenuBar() 857bool KMainWindow::hasMenuBar()
857{ 858{
858 return (internalMenuBar()); 859 return (internalMenuBar());
859} 860}
860 861
861//US KMenuBar *KMainWindow::menuBar() 862//US KMenuBar *KMainWindow::menuBar()
862QMenuBar *KMainWindow::menuBar() 863QMenuBar *KMainWindow::menuBar()
863{ 864{
864//US KMenuBar * mb = internalMenuBar(); 865//US KMenuBar * mb = internalMenuBar();
865 QMenuBar * mb = internalMenuBar(); 866 QMenuBar * mb = internalMenuBar();
866 if ( !mb ) { 867 if ( !mb ) {
867//US mb = new KMenuBar( this ); 868//US mb = new KMenuBar( this );
868 mb = new QMenuBar( this ); 869 mb = new QMenuBar( this );
869 // trigger a re-layout and trigger a call to the private 870 // trigger a re-layout and trigger a call to the private
870 // setMenuBar method. 871 // setMenuBar method.
871 QMainWindow::menuBar(); 872 QMainWindow::menuBar();
872 } 873 }
873 return mb; 874 return mb;
874} 875}
875 876
876//US KStatusBar *KMainWindow::statusBar() 877//US KStatusBar *KMainWindow::statusBar()
877QStatusBar *KMainWindow::statusBar() 878QStatusBar *KMainWindow::statusBar()
878{ 879{
879//US KStatusBar * sb = internalStatusBar(); 880//US KStatusBar * sb = internalStatusBar();
880 QStatusBar * sb = internalStatusBar(); 881 QStatusBar * sb = internalStatusBar();
881 if ( !sb ) { 882 if ( !sb ) {
882//US sb = new KStatusBar( this ); 883//US sb = new KStatusBar( this );
883 sb = new QStatusBar( this ); 884 sb = new QStatusBar( this );
884 // trigger a re-layout and trigger a call to the private 885 // trigger a re-layout and trigger a call to the private
885 // setStatusBar method. 886 // setStatusBar method.
886 QMainWindow::statusBar(); 887 QMainWindow::statusBar();
887 } 888 }
888 return sb; 889 return sb;
889} 890}
890 891
891void KMainWindow::shuttingDown() 892void KMainWindow::shuttingDown()
892{ 893{
893 // Needed for Qt <= 3.0.3 at least to prevent reentrancy 894 // Needed for Qt <= 3.0.3 at least to prevent reentrancy
894 // when queryExit() shows a dialog. Check before removing! 895 // when queryExit() shows a dialog. Check before removing!
895 static bool reentrancy_protection = false; 896 static bool reentrancy_protection = false;
896 if (!reentrancy_protection) 897 if (!reentrancy_protection)
897 { 898 {
898 reentrancy_protection = true; 899 reentrancy_protection = true;
899 // call the virtual queryExit 900 // call the virtual queryExit
900 queryExit(); 901 queryExit();
901 reentrancy_protection = false; 902 reentrancy_protection = false;
902 } 903 }
903 904
904} 905}
905 906
906//US KMenuBar *KMainWindow::internalMenuBar() 907//US KMenuBar *KMainWindow::internalMenuBar()
907QMenuBar *KMainWindow::internalMenuBar() 908QMenuBar *KMainWindow::internalMenuBar()
908{ 909{
909//US QObjectList *l = queryList( "KMenuBar", 0, false, false ); 910//US QObjectList *l = queryList( "KMenuBar", 0, false, false );
910 QObjectList *l = queryList( "QMenuBar", 0, false, false ); 911 QObjectList *l = queryList( "QMenuBar", 0, false, false );
911 if ( !l || !l->first() ) { 912 if ( !l || !l->first() ) {
912 delete l; 913 delete l;
913 return 0; 914 return 0;
914 } 915 }
915 916
916//US KMenuBar *m = (KMenuBar*)l->first(); 917//US KMenuBar *m = (KMenuBar*)l->first();
917 QMenuBar *m = (QMenuBar*)l->first(); 918 QMenuBar *m = (QMenuBar*)l->first();
918 delete l; 919 delete l;
919 return m; 920 return m;
920} 921}
921 922
922//US KStatusBar *KMainWindow::internalStatusBar() 923//US KStatusBar *KMainWindow::internalStatusBar()
923QStatusBar *KMainWindow::internalStatusBar() 924QStatusBar *KMainWindow::internalStatusBar()
924{ 925{
925//US QObjectList *l = queryList( "KStatusBar", 0, false, false ); 926//US QObjectList *l = queryList( "KStatusBar", 0, false, false );
926 QObjectList *l = queryList( "QStatusBar", 0, false, false ); 927 QObjectList *l = queryList( "QStatusBar", 0, false, false );
927 if ( !l || !l->first() ) { 928 if ( !l || !l->first() ) {
928 delete l; 929 delete l;
929 return 0; 930 return 0;
930 } 931 }
931 932
932//US KStatusBar *s = (KStatusBar*)l->first(); 933//US KStatusBar *s = (KStatusBar*)l->first();
933 QStatusBar *s = (QStatusBar*)l->first(); 934 QStatusBar *s = (QStatusBar*)l->first();
934 delete l; 935 delete l;
935 return s; 936 return s;
936} 937}
937 938
938void KMainWindow::childEvent( QChildEvent* e) 939void KMainWindow::childEvent( QChildEvent* e)
939{ 940{
940 QMainWindow::childEvent( e ); 941 QMainWindow::childEvent( e );
941} 942}
942 943
943void KMainWindow::paintEvent( QPaintEvent * ) 944void KMainWindow::paintEvent( QPaintEvent * e)
944{ 945{
945 // do nothing 946 QMainWindow::paintEvent( e );
946} 947}
947 948
948QSize KMainWindow::sizeForCentralWidgetSize(QSize size) 949QSize KMainWindow::sizeForCentralWidgetSize(QSize size)
949{ 950{
950 KToolBar *tb = (KToolBar*)child( "mainToolBar", "KToolBar" ); 951 KToolBar *tb = (KToolBar*)child( "mainToolBar", "KToolBar" );
951 if (tb && !tb->isHidden()) { 952 if (tb && !tb->isHidden()) {
952 switch( tb->barPos() ) 953 switch( tb->barPos() )
953 { 954 {
954 case KToolBar::Top: 955 case KToolBar::Top:
955 case KToolBar::Bottom: 956 case KToolBar::Bottom:
956 size += QSize(0, tb->sizeHint().height()); 957 size += QSize(0, tb->sizeHint().height());
957 break; 958 break;
958 959
959 case KToolBar::Left: 960 case KToolBar::Left:
960 case KToolBar::Right: 961 case KToolBar::Right:
961 size += QSize(toolBar()->sizeHint().width(), 0); 962 size += QSize(toolBar()->sizeHint().width(), 0);
962 break; 963 break;
963 964
964 case KToolBar::Flat: 965 case KToolBar::Flat:
965//US size += QSize(0, 3+kapp->style().pixelMetric( QStyle::PM_DockWindowHandleExtent )); 966//US size += QSize(0, 3+kapp->style().pixelMetric( QStyle::PM_DockWindowHandleExtent ));
966 size += QSize(0, tb->sizeHint().height()); 967 size += QSize(0, tb->sizeHint().height());
967 break; 968 break;
968 969
969 default: 970 default:
970 break; 971 break;
971 } 972 }
972 } 973 }
973//US KMenuBar *mb = menuBar(); 974//US KMenuBar *mb = menuBar();
974 QMenuBar *mb = menuBar(); 975 QMenuBar *mb = menuBar();
975 if (!mb->isHidden()) { 976 if (!mb->isHidden()) {
976 size += QSize(0,mb->heightForWidth(size.width())); 977 size += QSize(0,mb->heightForWidth(size.width()));
977/*US if (style().styleHint(QStyle::SH_MainWindow_SpaceBelowMenuBar, this)) 978/*US if (style().styleHint(QStyle::SH_MainWindow_SpaceBelowMenuBar, this))
978 size += QSize( 0, dockWindowsMovable() ? 1 : 2); 979 size += QSize( 0, dockWindowsMovable() ? 1 : 2);
979*/ 980*/
980 size += QSize( 0, 2); 981 size += QSize( 0, 2);
981 } 982 }
982 QStatusBar *sb = internalStatusBar(); 983 QStatusBar *sb = internalStatusBar();
983 if( sb && !sb->isHidden() ) 984 if( sb && !sb->isHidden() )
984 size += QSize(0, sb->sizeHint().height()); 985 size += QSize(0, sb->sizeHint().height());
985 986
986 return size; 987 return size;
987} 988}
988 989
989// why do we support old gcc versions? using KXMLGUIBuilder::finalizeGUI; 990// why do we support old gcc versions? using KXMLGUIBuilder::finalizeGUI;
990void KMainWindow::finalizeGUI( KXMLGUIClient *client ) 991void KMainWindow::finalizeGUI( KXMLGUIClient *client )
991{ /*US KXMLGUIBuilder::finalizeGUI( client );*/ } 992{ /*US KXMLGUIBuilder::finalizeGUI( client );*/ }
992 993
993void KMainWindow::virtual_hook( int id, void* data ) 994void KMainWindow::virtual_hook( int id, void* data )
diff --git a/microkde/kdeui/kmainwindow.h b/microkde/kdeui/kmainwindow.h
index 2aafb9d..2dc8033 100644
--- a/microkde/kdeui/kmainwindow.h
+++ b/microkde/kdeui/kmainwindow.h
@@ -49,97 +49,97 @@ class KAction;
49 49
50#include <ktoolbar.h> 50#include <ktoolbar.h>
51#include <ktoolbarhandler.h> 51#include <ktoolbarhandler.h>
52#include <kxmlguiclient.h> 52#include <kxmlguiclient.h>
53#include <qmainwindow.h> 53#include <qmainwindow.h>
54#include <qptrlist.h> 54#include <qptrlist.h>
55 55
56class KActionCollection; 56class KActionCollection;
57 57
58class KMainWindow : public QMainWindow, virtual public KXMLGUIClient 58class KMainWindow : public QMainWindow, virtual public KXMLGUIClient
59{ 59{
60 Q_OBJECT 60 Q_OBJECT
61 61
62private: 62private:
63//US create private defaultconstructor 63//US create private defaultconstructor
64 KMainWindow() {;}; 64 KMainWindow() {;};
65 65
66 66
67public: 67public:
68 /** 68 /**
69 * Construct a main window. 69 * Construct a main window.
70 * 70 *
71 * @param parent The widget parent. This is usually 0 but it may also be the window 71 * @param parent The widget parent. This is usually 0 but it may also be the window
72 * group leader. In that case, the KMainWindow becomes sort of a 72 * group leader. In that case, the KMainWindow becomes sort of a
73 * secondary window. 73 * secondary window.
74 * 74 *
75 * @param name The object name. For session management and window management to work 75 * @param name The object name. For session management and window management to work
76 * properly, all main windows in the application should have a 76 * properly, all main windows in the application should have a
77 * different name. When passing 0 (the default), KMainWindow will create 77 * different name. When passing 0 (the default), KMainWindow will create
78 * a unique name, but it's recommended to explicitly pass a window name that will 78 * a unique name, but it's recommended to explicitly pass a window name that will
79 * also describe the type of the window. If there can be several windows of the same 79 * also describe the type of the window. If there can be several windows of the same
80 * type, append '#' (hash) to the name, and KMainWindow will append numbers to make 80 * type, append '#' (hash) to the name, and KMainWindow will append numbers to make
81 * the names unique. For example, for a mail client which has one main window showing 81 * the names unique. For example, for a mail client which has one main window showing
82 * the mails and folders, and which can also have one or more windows for composing 82 * the mails and folders, and which can also have one or more windows for composing
83 * mails, the name for the folders window should be e.g. "mainwindow" and 83 * mails, the name for the folders window should be e.g. "mainwindow" and
84 * for the composer windows "composer#". 84 * for the composer windows "composer#".
85 * 85 *
86 * @param f Specify the widget flags. The default is 86 * @param f Specify the widget flags. The default is
87 * WType_TopLevel and WDestructiveClose. TopLevel indicates that a 87 * WType_TopLevel and WDestructiveClose. TopLevel indicates that a
88 * main window is a toplevel window, regardless of whether it has a 88 * main window is a toplevel window, regardless of whether it has a
89 * parent or not. DestructiveClose indicates that a main window is 89 * parent or not. DestructiveClose indicates that a main window is
90 * automatically destroyed when its window is closed. Pass 0 if 90 * automatically destroyed when its window is closed. Pass 0 if
91 * you do not want this behavior. 91 * you do not want this behavior.
92 * 92 *
93 * KMainWindows must be created on the heap with 'new', like: 93 * KMainWindows must be created on the heap with 'new', like:
94 * <pre> KMainWindow *kmw = new KMainWindow (...</pre> 94 * <pre> KMainWindow *kmw = new KMainWindow (...</pre>
95 **/ 95 **/
96 //LR remove WDestructiveClose 96 //LR remove WDestructiveClose
97 KMainWindow( QWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel /*| WDestructiveClose*/ ); 97 KMainWindow( QWidget* parent = 0, const char *name = 0 ); //, WFlags f = WType_TopLevel /*| WDestructiveClose*/ ;
98 98
99 99
100 /** 100 /**
101 * Destructor. 101 * Destructor.
102 * 102 *
103 * Will also destroy the toolbars, and menubar if 103 * Will also destroy the toolbars, and menubar if
104 * needed. 104 * needed.
105 */ 105 */
106 virtual ~KMainWindow(); 106 virtual ~KMainWindow();
107 107
108 /** 108 /**
109 * Retrieve the standard help menu. 109 * Retrieve the standard help menu.
110 * 110 *
111 * It contains entires for the 111 * It contains entires for the
112 * help system (activated by F1), an optional "What's This?" entry 112 * help system (activated by F1), an optional "What's This?" entry
113 * (activated by Shift F1), an application specific dialog box, 113 * (activated by Shift F1), an application specific dialog box,
114 * and an "About KDE" dialog box. 114 * and an "About KDE" dialog box.
115 * 115 *
116 * Example (adding a standard help menu to your application): 116 * Example (adding a standard help menu to your application):
117 * <pre> 117 * <pre>
118 * KPopupMenu *help = helpMenu( <myTextString> ); 118 * KPopupMenu *help = helpMenu( <myTextString> );
119 * menuBar()->insertItem( i18n("&Help"), help ); 119 * menuBar()->insertItem( i18n("&Help"), help );
120 * </pre> 120 * </pre>
121 * 121 *
122 * @param aboutAppText The string that is used in the application 122 * @param aboutAppText The string that is used in the application
123 * specific dialog box. If you leave this string empty the 123 * specific dialog box. If you leave this string empty the
124 * information in the global @ref KAboutData of the 124 * information in the global @ref KAboutData of the
125 * application will be used to make a standard dialog box. 125 * application will be used to make a standard dialog box.
126 * 126 *
127 * @param showWhatsThis Set this to false if you do not want to include 127 * @param showWhatsThis Set this to false if you do not want to include
128 * the "What's This" menu entry. 128 * the "What's This" menu entry.
129 * 129 *
130 * @return A standard help menu. 130 * @return A standard help menu.
131 */ 131 */
132//US KPopupMenu* helpMenu( const QString &aboutAppText = QString::null, 132//US KPopupMenu* helpMenu( const QString &aboutAppText = QString::null,
133//US bool showWhatsThis = TRUE ); 133//US bool showWhatsThis = TRUE );
134 134
135 /** 135 /**
136 * Returns the help menu. Creates a standard help menu if none exists yet. 136 * Returns the help menu. Creates a standard help menu if none exists yet.
137 * 137 *
138 * It contains entries for the 138 * It contains entries for the
139 * help system (activated by F1), an optional "What's This?" entry 139 * help system (activated by F1), an optional "What's This?" entry
140 * (activated by Shift F1), an application specific dialog box, 140 * (activated by Shift F1), an application specific dialog box,
141 * and an "About KDE" dialog box. You must create the application 141 * and an "About KDE" dialog box. You must create the application
142 * specific dialog box yourself. When the "About application" 142 * specific dialog box yourself. When the "About application"
143 * menu entry is activated, a signal will trigger the 143 * menu entry is activated, a signal will trigger the
144 * @ref showAboutApplication slot. See @ref showAboutApplication for more 144 * @ref showAboutApplication slot. See @ref showAboutApplication for more
145 * information. 145 * information.