Diffstat (limited to 'microkde/kdeui/kactionclasses.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kdeui/kactionclasses.cpp | 111 |
1 files changed, 56 insertions, 55 deletions
diff --git a/microkde/kdeui/kactionclasses.cpp b/microkde/kdeui/kactionclasses.cpp index 82e6c8b..c611865 100644 --- a/microkde/kdeui/kactionclasses.cpp +++ b/microkde/kdeui/kactionclasses.cpp | |||
@@ -28,9 +28,11 @@ | |||
28 | #include <assert.h> | 28 | #include <assert.h> |
29 | 29 | ||
30 | #include <qfontdatabase.h> | 30 | #include <qfontdatabase.h> |
31 | #include <qobjectlist.h> | 31 | #include <qobject.h> |
32 | //US#include <qwhatsthis.h> | 32 | //US#include <qwhatsthis.h> |
33 | #include <qtimer.h> | 33 | #include <qtimer.h> |
34 | //Added by qt3to4: | ||
35 | #include <Q3ValueList> | ||
34 | 36 | ||
35 | //US#include <kaccel.h> | 37 | //US#include <kaccel.h> |
36 | //US#include <kapplication.h> | 38 | //US#include <kapplication.h> |
@@ -48,13 +50,13 @@ | |||
48 | //US added the following includefiles | 50 | //US added the following includefiles |
49 | #include <kconfigbase.h> | 51 | #include <kconfigbase.h> |
50 | #include <qwidget.h> | 52 | #include <qwidget.h> |
51 | #include <qpopupmenu.h> | 53 | #include <q3popupmenu.h> |
52 | #include <qmenubar.h> | 54 | #include <qmenubar.h> |
53 | #include <qmainwindow.h> | 55 | #include <q3mainwindow.h> |
54 | #include <qtoolbar.h> | 56 | #include <q3toolbar.h> |
55 | #include <qcombobox.h> | 57 | #include <qcombobox.h> |
56 | #include <qmainwindow.h> | 58 | #include <q3mainwindow.h> |
57 | 59 | #include <qcoreapplication.h> | |
58 | 60 | ||
59 | static QFontDatabase *fontDataBase = 0; | 61 | static QFontDatabase *fontDataBase = 0; |
60 | 62 | ||
@@ -83,7 +85,7 @@ static void get_fonts( QStringList &lst ) | |||
83 | lst.sort(); | 85 | lst.sort(); |
84 | } | 86 | } |
85 | 87 | ||
86 | static QValueList<int> get_standard_font_sizes() | 88 | static Q3ValueList<int> get_standard_font_sizes() |
87 | { | 89 | { |
88 | if ( !fontDataBase ) { | 90 | if ( !fontDataBase ) { |
89 | fontDataBase = new QFontDatabase(); | 91 | fontDataBase = new QFontDatabase(); |
@@ -120,7 +122,7 @@ KToggleAction::KToggleAction( const QString& text, const KShortcut& cut, | |||
120 | d = new KToggleActionPrivate; | 122 | d = new KToggleActionPrivate; |
121 | } | 123 | } |
122 | 124 | ||
123 | KToggleAction::KToggleAction( const QString& text, const QIconSet& pix, | 125 | KToggleAction::KToggleAction( const QString& text, const QIcon& pix, |
124 | const KShortcut& cut, | 126 | const KShortcut& cut, |
125 | QObject* parent, const char* name ) | 127 | QObject* parent, const char* name ) |
126 | : KAction( text, pix, cut, parent, name ) | 128 | : KAction( text, pix, cut, parent, name ) |
@@ -136,7 +138,7 @@ KToggleAction::KToggleAction( const QString& text, const QString& pix, | |||
136 | d = new KToggleActionPrivate; | 138 | d = new KToggleActionPrivate; |
137 | } | 139 | } |
138 | 140 | ||
139 | KToggleAction::KToggleAction( const QString& text, const QIconSet& pix, | 141 | KToggleAction::KToggleAction( const QString& text, const QIcon& pix, |
140 | const KShortcut& cut, | 142 | const KShortcut& cut, |
141 | const QObject* receiver, | 143 | const QObject* receiver, |
142 | const char* slot, QObject* parent, | 144 | const char* slot, QObject* parent, |
@@ -169,7 +171,7 @@ KToggleAction::~KToggleAction() | |||
169 | 171 | ||
170 | int KToggleAction::plug( QWidget* widget, int index ) | 172 | int KToggleAction::plug( QWidget* widget, int index ) |
171 | { | 173 | { |
172 | if ( !widget->inherits("QPopupMenu") && !widget->inherits("KToolBar") ) | 174 | if ( !widget->inherits("Q3PopupMenu") && !widget->inherits("KToolBar") ) |
173 | { | 175 | { |
174 | kdWarning() << "Can not plug KToggleAction in " << widget->className() << endl; | 176 | kdWarning() << "Can not plug KToggleAction in " << widget->className() << endl; |
175 | return -1; | 177 | return -1; |
@@ -184,11 +186,11 @@ int KToggleAction::plug( QWidget* widget, int index ) | |||
184 | if ( _index == -1 ) | 186 | if ( _index == -1 ) |
185 | return _index; | 187 | return _index; |
186 | 188 | ||
187 | if ( widget->inherits("QPopupMenu") ) | 189 | if ( widget->inherits("Q3PopupMenu") ) |
188 | { | 190 | { |
189 | int id = itemId( _index ); | 191 | int id = itemId( _index ); |
190 | 192 | ||
191 | static_cast<QPopupMenu*>(widget)->setItemChecked( id, d->m_checked ); | 193 | static_cast<Q3PopupMenu*>(widget)->setItemChecked( id, d->m_checked ); |
192 | } else if ( widget->inherits( "KToolBar" ) ) { | 194 | } else if ( widget->inherits( "KToolBar" ) ) { |
193 | 195 | ||
194 | KToolBar *bar = static_cast<KToolBar *>( widget ); | 196 | KToolBar *bar = static_cast<KToolBar *>( widget ); |
@@ -214,13 +216,12 @@ void KToggleAction::setChecked( bool c ) | |||
214 | updateChecked( i ); | 216 | updateChecked( i ); |
215 | 217 | ||
216 | if ( c && parent() && !exclusiveGroup().isEmpty() ) { | 218 | if ( c && parent() && !exclusiveGroup().isEmpty() ) { |
217 | const QObjectList *list = parent()->children(); | 219 | const QObjectList list = parent()->children(); |
218 | if ( list ) { | 220 | if ( !list.empty() ) { |
219 | QObjectListIt it( *list ); | 221 | for(QObjectList::const_iterator it=list.begin();it!=list.end();++it) { |
220 | for( ; it.current(); ++it ) { | 222 | if ( (*it)->inherits( "KToggleAction" ) && (*it) != this && |
221 | if ( it.current()->inherits( "KToggleAction" ) && it.current() != this && | 223 | static_cast<KToggleAction*>((*it))->exclusiveGroup() == exclusiveGroup() ) { |
222 | static_cast<KToggleAction*>(it.current())->exclusiveGroup() == exclusiveGroup() ) { | 224 | KToggleAction *a = static_cast<KToggleAction*>(*it); |
223 | KToggleAction *a = static_cast<KToggleAction*>(it.current()); | ||
224 | if( a->isChecked() ) { | 225 | if( a->isChecked() ) { |
225 | a->setChecked( false ); | 226 | a->setChecked( false ); |
226 | emit a->toggled( false ); | 227 | emit a->toggled( false ); |
@@ -235,8 +236,8 @@ void KToggleAction::updateChecked( int id ) | |||
235 | { | 236 | { |
236 | QWidget *w = container( id ); | 237 | QWidget *w = container( id ); |
237 | 238 | ||
238 | if ( w->inherits( "QPopupMenu" ) ) | 239 | if ( w->inherits( "Q3PopupMenu" ) ) |
239 | static_cast<QPopupMenu*>(w)->setItemChecked( itemId( id ), d->m_checked ); | 240 | static_cast<Q3PopupMenu*>(w)->setItemChecked( itemId( id ), d->m_checked ); |
240 | else if ( w->inherits( "QMenuBar" ) ) | 241 | else if ( w->inherits( "QMenuBar" ) ) |
241 | static_cast<QMenuBar*>(w)->setItemChecked( itemId( id ), d->m_checked ); | 242 | static_cast<QMenuBar*>(w)->setItemChecked( itemId( id ), d->m_checked ); |
242 | else if ( w->inherits( "KToolBar" ) ) | 243 | else if ( w->inherits( "KToolBar" ) ) |
@@ -283,7 +284,7 @@ KRadioAction::KRadioAction( const QString& text, const KShortcut& cut, | |||
283 | { | 284 | { |
284 | } | 285 | } |
285 | 286 | ||
286 | KRadioAction::KRadioAction( const QString& text, const QIconSet& pix, | 287 | KRadioAction::KRadioAction( const QString& text, const QIcon& pix, |
287 | const KShortcut& cut, | 288 | const KShortcut& cut, |
288 | QObject* parent, const char* name ) | 289 | QObject* parent, const char* name ) |
289 | : KToggleAction( text, pix, cut, parent, name ) | 290 | : KToggleAction( text, pix, cut, parent, name ) |
@@ -297,7 +298,7 @@ KRadioAction::KRadioAction( const QString& text, const QString& pix, | |||
297 | { | 298 | { |
298 | } | 299 | } |
299 | 300 | ||
300 | KRadioAction::KRadioAction( const QString& text, const QIconSet& pix, | 301 | KRadioAction::KRadioAction( const QString& text, const QIcon& pix, |
301 | const KShortcut& cut, | 302 | const KShortcut& cut, |
302 | const QObject* receiver, const char* slot, | 303 | const QObject* receiver, const char* slot, |
303 | QObject* parent, const char* name ) | 304 | QObject* parent, const char* name ) |
@@ -349,7 +350,7 @@ public: | |||
349 | } | 350 | } |
350 | bool m_edit; | 351 | bool m_edit; |
351 | bool m_menuAccelsEnabled; | 352 | bool m_menuAccelsEnabled; |
352 | QPopupMenu *m_menu; | 353 | Q3PopupMenu *m_menu; |
353 | int m_current; | 354 | int m_current; |
354 | int m_comboWidth; | 355 | int m_comboWidth; |
355 | QStringList m_list; | 356 | QStringList m_list; |
@@ -387,7 +388,7 @@ KSelectAction::KSelectAction( const QString& text, const KShortcut& cut, | |||
387 | d = new KSelectActionPrivate; | 388 | d = new KSelectActionPrivate; |
388 | } | 389 | } |
389 | 390 | ||
390 | KSelectAction::KSelectAction( const QString& text, const QIconSet& pix, | 391 | KSelectAction::KSelectAction( const QString& text, const QIcon& pix, |
391 | const KShortcut& cut, | 392 | const KShortcut& cut, |
392 | QObject* parent, const char* name ) | 393 | QObject* parent, const char* name ) |
393 | : KAction( text, pix, cut, parent, name ) | 394 | : KAction( text, pix, cut, parent, name ) |
@@ -403,7 +404,7 @@ KSelectAction::KSelectAction( const QString& text, const QString& pix, | |||
403 | d = new KSelectActionPrivate; | 404 | d = new KSelectActionPrivate; |
404 | } | 405 | } |
405 | 406 | ||
406 | KSelectAction::KSelectAction( const QString& text, const QIconSet& pix, | 407 | KSelectAction::KSelectAction( const QString& text, const QIcon& pix, |
407 | const KShortcut& cut, | 408 | const KShortcut& cut, |
408 | const QObject* receiver, | 409 | const QObject* receiver, |
409 | const char* slot, QObject* parent, | 410 | const char* slot, QObject* parent, |
@@ -439,7 +440,7 @@ KSelectAction::~KSelectAction() | |||
439 | void KSelectAction::setCurrentItem( int id ) | 440 | void KSelectAction::setCurrentItem( int id ) |
440 | { | 441 | { |
441 | if ( id >= (int)d->m_list.count() ) { | 442 | if ( id >= (int)d->m_list.count() ) { |
442 | ASSERT(id < (int)d->m_list.count()); | 443 | Q_ASSERT(id < (int)d->m_list.count()); |
443 | return; | 444 | return; |
444 | } | 445 | } |
445 | 446 | ||
@@ -479,13 +480,13 @@ void KSelectAction::setComboWidth( int width ) | |||
479 | updateComboWidth( i ); | 480 | updateComboWidth( i ); |
480 | 481 | ||
481 | } | 482 | } |
482 | QPopupMenu* KSelectAction::popupMenu() const | 483 | Q3PopupMenu* KSelectAction::popupMenu() const |
483 | { | 484 | { |
484 | kdDebug(129) << "KSelectAction::popupMenu()" << endl; // remove -- ellis | 485 | kdDebug(129) << "KSelectAction::popupMenu()" << endl; // remove -- ellis |
485 | if ( !d->m_menu ) | 486 | if ( !d->m_menu ) |
486 | { | 487 | { |
487 | //US d->m_menu = new KPopupMenu(0L, "KSelectAction::popupMenu()"); | 488 | //US d->m_menu = new KPopupMenu(0L, "KSelectAction::popupMenu()"); |
488 | d->m_menu = new QPopupMenu(0L, "QSelectAction::popupMenu()"); | 489 | d->m_menu = new Q3PopupMenu(0L, "QSelectAction::popupMenu()"); |
489 | setupMenu(); | 490 | setupMenu(); |
490 | if ( d->m_current >= 0 ) | 491 | if ( d->m_current >= 0 ) |
491 | d->m_menu->setItemChecked( d->m_current, true ); | 492 | d->m_menu->setItemChecked( d->m_current, true ); |
@@ -643,12 +644,12 @@ int KSelectAction::plug( QWidget *widget, int index ) | |||
643 | //US return -1; | 644 | //US return -1; |
644 | 645 | ||
645 | kdDebug(129) << "KAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis | 646 | kdDebug(129) << "KAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis |
646 | if ( widget->inherits("QPopupMenu") ) | 647 | if ( widget->inherits("Q3PopupMenu") ) |
647 | { | 648 | { |
648 | // Create the PopupMenu and store it in m_menu | 649 | // Create the PopupMenu and store it in m_menu |
649 | (void)popupMenu(); | 650 | (void)popupMenu(); |
650 | 651 | ||
651 | QPopupMenu* menu = static_cast<QPopupMenu*>( widget ); | 652 | Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( widget ); |
652 | int id; | 653 | int id; |
653 | 654 | ||
654 | if ( hasIconSet() ) | 655 | if ( hasIconSet() ) |
@@ -682,7 +683,7 @@ int KSelectAction::plug( QWidget *widget, int index ) | |||
682 | if ( cb ) | 683 | if ( cb ) |
683 | { | 684 | { |
684 | cb->setMaximumHeight( 34 ); | 685 | cb->setMaximumHeight( 34 ); |
685 | if (!isEditable()) cb->setFocusPolicy(QWidget::NoFocus); | 686 | if (!isEditable()) cb->setFocusPolicy(Qt::NoFocus); |
686 | cb->setMinimumWidth( cb->sizeHint().width() ); | 687 | cb->setMinimumWidth( cb->sizeHint().width() ); |
687 | if ( d->m_comboWidth > 0 ) | 688 | if ( d->m_comboWidth > 0 ) |
688 | { | 689 | { |
@@ -852,7 +853,7 @@ KListAction::KListAction( const QString& text, const KShortcut& cut, | |||
852 | connect( this, SIGNAL( activated( int ) ), receiver, slot ); | 853 | connect( this, SIGNAL( activated( int ) ), receiver, slot ); |
853 | } | 854 | } |
854 | 855 | ||
855 | KListAction::KListAction( const QString& text, const QIconSet& pix, | 856 | KListAction::KListAction( const QString& text, const QIcon& pix, |
856 | const KShortcut& cut, | 857 | const KShortcut& cut, |
857 | QObject* parent, const char* name ) | 858 | QObject* parent, const char* name ) |
858 | : KSelectAction( text, pix, cut, parent, name ) | 859 | : KSelectAction( text, pix, cut, parent, name ) |
@@ -868,7 +869,7 @@ KListAction::KListAction( const QString& text, const QString& pix, | |||
868 | d = new KListActionPrivate; | 869 | d = new KListActionPrivate; |
869 | } | 870 | } |
870 | 871 | ||
871 | KListAction::KListAction( const QString& text, const QIconSet& pix, | 872 | KListAction::KListAction( const QString& text, const QIcon& pix, |
872 | const KShortcut& cut, const QObject* receiver, | 873 | const KShortcut& cut, const QObject* receiver, |
873 | const char* slot, QObject* parent, | 874 | const char* slot, QObject* parent, |
874 | const char* name ) | 875 | const char* name ) |
@@ -965,7 +966,7 @@ KRecentFilesAction::KRecentFilesAction( const QString& text, | |||
965 | } | 966 | } |
966 | 967 | ||
967 | KRecentFilesAction::KRecentFilesAction( const QString& text, | 968 | KRecentFilesAction::KRecentFilesAction( const QString& text, |
968 | const QIconSet& pix, | 969 | const QIcon& pix, |
969 | const KShortcut& cut, | 970 | const KShortcut& cut, |
970 | QObject* parent, const char* name, | 971 | QObject* parent, const char* name, |
971 | uint maxItems ) | 972 | uint maxItems ) |
@@ -991,7 +992,7 @@ KRecentFilesAction::KRecentFilesAction( const QString& text, | |||
991 | } | 992 | } |
992 | 993 | ||
993 | KRecentFilesAction::KRecentFilesAction( const QString& text, | 994 | KRecentFilesAction::KRecentFilesAction( const QString& text, |
994 | const QIconSet& pix, | 995 | const QIcon& pix, |
995 | const KShortcut& cut, | 996 | const KShortcut& cut, |
996 | const QObject* receiver, | 997 | const QObject* receiver, |
997 | const char* slot, | 998 | const char* slot, |
@@ -1201,7 +1202,7 @@ KFontAction::KFontAction( const QString& text, const KShortcut& cut, | |||
1201 | setEditable( true ); | 1202 | setEditable( true ); |
1202 | } | 1203 | } |
1203 | 1204 | ||
1204 | KFontAction::KFontAction( const QString& text, const QIconSet& pix, | 1205 | KFontAction::KFontAction( const QString& text, const QIcon& pix, |
1205 | const KShortcut& cut, | 1206 | const KShortcut& cut, |
1206 | QObject* parent, const char* name ) | 1207 | QObject* parent, const char* name ) |
1207 | : KSelectAction( text, pix, cut, parent, name ) | 1208 | : KSelectAction( text, pix, cut, parent, name ) |
@@ -1223,7 +1224,7 @@ KFontAction::KFontAction( const QString& text, const QString& pix, | |||
1223 | setEditable( true ); | 1224 | setEditable( true ); |
1224 | } | 1225 | } |
1225 | 1226 | ||
1226 | KFontAction::KFontAction( const QString& text, const QIconSet& pix, | 1227 | KFontAction::KFontAction( const QString& text, const QIcon& pix, |
1227 | const KShortcut& cut, | 1228 | const KShortcut& cut, |
1228 | const QObject* receiver, const char* slot, | 1229 | const QObject* receiver, const char* slot, |
1229 | QObject* parent, const char* name ) | 1230 | QObject* parent, const char* name ) |
@@ -1361,7 +1362,7 @@ KFontSizeAction::KFontSizeAction( const QString& text, | |||
1361 | init(); | 1362 | init(); |
1362 | } | 1363 | } |
1363 | 1364 | ||
1364 | KFontSizeAction::KFontSizeAction( const QString& text, const QIconSet& pix, | 1365 | KFontSizeAction::KFontSizeAction( const QString& text, const QIcon& pix, |
1365 | const KShortcut& cut, | 1366 | const KShortcut& cut, |
1366 | QObject* parent, const char* name ) | 1367 | QObject* parent, const char* name ) |
1367 | : KSelectAction( text, pix, cut, parent, name ) | 1368 | : KSelectAction( text, pix, cut, parent, name ) |
@@ -1377,7 +1378,7 @@ KFontSizeAction::KFontSizeAction( const QString& text, const QString& pix, | |||
1377 | init(); | 1378 | init(); |
1378 | } | 1379 | } |
1379 | 1380 | ||
1380 | KFontSizeAction::KFontSizeAction( const QString& text, const QIconSet& pix, | 1381 | KFontSizeAction::KFontSizeAction( const QString& text, const QIcon& pix, |
1381 | const KShortcut& cut, | 1382 | const KShortcut& cut, |
1382 | const QObject* receiver, | 1383 | const QObject* receiver, |
1383 | const char* slot, QObject* parent, | 1384 | const char* slot, QObject* parent, |
@@ -1414,9 +1415,9 @@ void KFontSizeAction::init() | |||
1414 | d = new KFontSizeActionPrivate; | 1415 | d = new KFontSizeActionPrivate; |
1415 | 1416 | ||
1416 | setEditable( true ); | 1417 | setEditable( true ); |
1417 | QValueList<int> sizes = get_standard_font_sizes(); | 1418 | Q3ValueList<int> sizes = get_standard_font_sizes(); |
1418 | QStringList lst; | 1419 | QStringList lst; |
1419 | for ( QValueList<int>::Iterator it = sizes.begin(); it != sizes.end(); ++it ) | 1420 | for ( Q3ValueList<int>::Iterator it = sizes.begin(); it != sizes.end(); ++it ) |
1420 | lst.append( QString::number( *it ) ); | 1421 | lst.append( QString::number( *it ) ); |
1421 | 1422 | ||
1422 | setItems( lst ); | 1423 | setItems( lst ); |
@@ -1437,7 +1438,7 @@ void KFontSizeAction::setFontSize( int size ) | |||
1437 | int index = items().findIndex( QString::number( size ) ); | 1438 | int index = items().findIndex( QString::number( size ) ); |
1438 | if ( index == -1 ) { | 1439 | if ( index == -1 ) { |
1439 | // Insert at the correct position in the list (to keep sorting) | 1440 | // Insert at the correct position in the list (to keep sorting) |
1440 | QValueList<int> lst; | 1441 | Q3ValueList<int> lst; |
1441 | // Convert to list of ints | 1442 | // Convert to list of ints |
1442 | QStringList itemsList = items(); | 1443 | QStringList itemsList = items(); |
1443 | for (QStringList::Iterator it = itemsList.begin() ; it != itemsList.end() ; ++it) | 1444 | for (QStringList::Iterator it = itemsList.begin() ; it != itemsList.end() ; ++it) |
@@ -1450,7 +1451,7 @@ qDebug("KFontSizeAction::setFontSize heapsort not found."); | |||
1450 | //US qHeapSort( lst ); | 1451 | //US qHeapSort( lst ); |
1451 | // Convert back to string list | 1452 | // Convert back to string list |
1452 | QStringList strLst; | 1453 | QStringList strLst; |
1453 | for (QValueList<int>::Iterator it = lst.begin() ; it != lst.end() ; ++it) | 1454 | for (Q3ValueList<int>::Iterator it = lst.begin() ; it != lst.end() ; ++it) |
1454 | strLst.append( QString::number(*it) ); | 1455 | strLst.append( QString::number(*it) ); |
1455 | KSelectAction::setItems( strLst ); | 1456 | KSelectAction::setItems( strLst ); |
1456 | // Find new current item | 1457 | // Find new current item |
@@ -1492,7 +1493,7 @@ public: | |||
1492 | KActionMenuPrivate() | 1493 | KActionMenuPrivate() |
1493 | { | 1494 | { |
1494 | //US m_popup = new KPopupMenu(0L,"KActionMenu::KActionMenuPrivate"); | 1495 | //US m_popup = new KPopupMenu(0L,"KActionMenu::KActionMenuPrivate"); |
1495 | m_popup = new QPopupMenu(0L,"KActionMenu::KActionMenuPrivate"); | 1496 | m_popup = new Q3PopupMenu(0L,"KActionMenu::KActionMenuPrivate"); |
1496 | m_delayed = true; | 1497 | m_delayed = true; |
1497 | m_stickyMenu = true; | 1498 | m_stickyMenu = true; |
1498 | } | 1499 | } |
@@ -1502,7 +1503,7 @@ public: | |||
1502 | } | 1503 | } |
1503 | 1504 | ||
1504 | //US KPopupMenu *m_popup; | 1505 | //US KPopupMenu *m_popup; |
1505 | QPopupMenu *m_popup; | 1506 | Q3PopupMenu *m_popup; |
1506 | bool m_delayed; | 1507 | bool m_delayed; |
1507 | bool m_stickyMenu; | 1508 | bool m_stickyMenu; |
1508 | }; | 1509 | }; |
@@ -1522,7 +1523,7 @@ KActionMenu::KActionMenu( const QString& text, QObject* parent, | |||
1522 | setShortcutConfigurable( false ); | 1523 | setShortcutConfigurable( false ); |
1523 | } | 1524 | } |
1524 | 1525 | ||
1525 | KActionMenu::KActionMenu( const QString& text, const QIconSet& icon, | 1526 | KActionMenu::KActionMenu( const QString& text, const QIcon& icon, |
1526 | QObject* parent, const char* name ) | 1527 | QObject* parent, const char* name ) |
1527 | : KAction( text, icon, 0, parent, name ) | 1528 | : KAction( text, icon, 0, parent, name ) |
1528 | { | 1529 | { |
@@ -1552,7 +1553,7 @@ void KActionMenu::popup( const QPoint& global ) | |||
1552 | 1553 | ||
1553 | 1554 | ||
1554 | //US KPopupMenu* KActionMenu::popupMenu() const | 1555 | //US KPopupMenu* KActionMenu::popupMenu() const |
1555 | QPopupMenu* KActionMenu::popupMenu() const | 1556 | Q3PopupMenu* KActionMenu::popupMenu() const |
1556 | { | 1557 | { |
1557 | return d->m_popup; | 1558 | return d->m_popup; |
1558 | } | 1559 | } |
@@ -1592,9 +1593,9 @@ int KActionMenu::plug( QWidget* widget, int index ) | |||
1592 | return -1; | 1593 | return -1; |
1593 | */ | 1594 | */ |
1594 | kdDebug(129) << "KAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis | 1595 | kdDebug(129) << "KAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis |
1595 | if ( widget->inherits("QPopupMenu") ) | 1596 | if ( widget->inherits("Q3PopupMenu") ) |
1596 | { | 1597 | { |
1597 | QPopupMenu* menu = static_cast<QPopupMenu*>( widget ); | 1598 | Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( widget ); |
1598 | int id; | 1599 | int id; |
1599 | if ( hasIconSet() ) | 1600 | if ( hasIconSet() ) |
1600 | id = menu->insertItem( iconSet(), text(), d->m_popup, -1, index ); | 1601 | id = menu->insertItem( iconSet(), text(), d->m_popup, -1, index ); |
@@ -1781,12 +1782,12 @@ int KToolBarPopupAction::plug( QWidget *widget, int index ) | |||
1781 | } | 1782 | } |
1782 | 1783 | ||
1783 | //US KPopupMenu *KToolBarPopupAction::popupMenu() const | 1784 | //US KPopupMenu *KToolBarPopupAction::popupMenu() const |
1784 | QPopupMenu *KToolBarPopupAction::popupMenu() const | 1785 | Q3PopupMenu *KToolBarPopupAction::popupMenu() const |
1785 | { | 1786 | { |
1786 | if ( !m_popup ) { | 1787 | if ( !m_popup ) { |
1787 | KToolBarPopupAction *that = const_cast<KToolBarPopupAction*>(this); | 1788 | KToolBarPopupAction *that = const_cast<KToolBarPopupAction*>(this); |
1788 | //US that->m_popup = new KPopupMenu; | 1789 | //US that->m_popup = new KPopupMenu; |
1789 | that->m_popup = new QPopupMenu; | 1790 | that->m_popup = new Q3PopupMenu; |
1790 | } | 1791 | } |
1791 | return m_popup; | 1792 | return m_popup; |
1792 | } | 1793 | } |
@@ -1953,7 +1954,7 @@ void KWidgetAction::slotToolbarDestroyed() | |||
1953 | { | 1954 | { |
1954 | //Q_ASSERT( m_widget ); // When exiting the app the widget could be destroyed before the toolbar. | 1955 | //Q_ASSERT( m_widget ); // When exiting the app the widget could be destroyed before the toolbar. |
1955 | 1956 | ||
1956 | ASSERT( isPlugged() ); | 1957 | Q_ASSERT( isPlugged() ); |
1957 | if( !m_widget || !isPlugged() ) | 1958 | if( !m_widget || !isPlugged() ) |
1958 | return; | 1959 | return; |
1959 | 1960 | ||
@@ -1974,9 +1975,9 @@ KActionSeparator::~KActionSeparator() | |||
1974 | 1975 | ||
1975 | int KActionSeparator::plug( QWidget *widget, int index ) | 1976 | int KActionSeparator::plug( QWidget *widget, int index ) |
1976 | { | 1977 | { |
1977 | if ( widget->inherits("QPopupMenu") ) | 1978 | if ( widget->inherits("Q3PopupMenu") ) |
1978 | { | 1979 | { |
1979 | QPopupMenu* menu = static_cast<QPopupMenu*>( widget ); | 1980 | Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( widget ); |
1980 | 1981 | ||
1981 | int id = menu->insertSeparator( index ); | 1982 | int id = menu->insertSeparator( index ); |
1982 | 1983 | ||