-rw-r--r-- | microkde/kdeui/ktoolbar.cpp | 6 | ||||
-rw-r--r-- | microkde/kdeui/ktoolbar.h | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/microkde/kdeui/ktoolbar.cpp b/microkde/kdeui/ktoolbar.cpp index 79b0f9d..e9226c0 100644 --- a/microkde/kdeui/ktoolbar.cpp +++ b/microkde/kdeui/ktoolbar.cpp | |||
@@ -1401,24 +1401,30 @@ void KToolBar::insertWidgetInternal( QWidget *w, int &index, int id ) | |||
1401 | this, SLOT( widgetDestroyed() ) ); | 1401 | this, SLOT( widgetDestroyed() ) ); |
1402 | if ( index == -1 || index > (int)widgets.count() ) { | 1402 | if ( index == -1 || index > (int)widgets.count() ) { |
1403 | widgets.append( w ); | 1403 | widgets.append( w ); |
1404 | index = (int)widgets.count(); | 1404 | index = (int)widgets.count(); |
1405 | } | 1405 | } |
1406 | else | 1406 | else |
1407 | widgets.insert( index, w ); | 1407 | widgets.insert( index, w ); |
1408 | if ( id == -1 ) | 1408 | if ( id == -1 ) |
1409 | id = id2widget.count(); | 1409 | id = id2widget.count(); |
1410 | id2widget.insert( id, w ); | 1410 | id2widget.insert( id, w ); |
1411 | widget2id.insert( w, id ); | 1411 | widget2id.insert( w, id ); |
1412 | } | 1412 | } |
1413 | void KToolBar::repaintMe() | ||
1414 | { | ||
1415 | setUpdatesEnabled( true ); | ||
1416 | QToolBar::repaint( true ); | ||
1417 | qDebug(" KToolBar::repaintMe() "); | ||
1418 | } | ||
1413 | 1419 | ||
1414 | void KToolBar::showEvent( QShowEvent *e ) | 1420 | void KToolBar::showEvent( QShowEvent *e ) |
1415 | { | 1421 | { |
1416 | QToolBar::showEvent( e ); | 1422 | QToolBar::showEvent( e ); |
1417 | rebuildLayout(); | 1423 | rebuildLayout(); |
1418 | } | 1424 | } |
1419 | 1425 | ||
1420 | void KToolBar::setStretchableWidget( QWidget *w ) | 1426 | void KToolBar::setStretchableWidget( QWidget *w ) |
1421 | { | 1427 | { |
1422 | QToolBar::setStretchableWidget( w ); | 1428 | QToolBar::setStretchableWidget( w ); |
1423 | stretchableWidget = w; | 1429 | stretchableWidget = w; |
1424 | } | 1430 | } |
diff --git a/microkde/kdeui/ktoolbar.h b/microkde/kdeui/ktoolbar.h index 2c061b5..61b5ea3 100644 --- a/microkde/kdeui/ktoolbar.h +++ b/microkde/kdeui/ktoolbar.h | |||
@@ -1036,55 +1036,56 @@ signals: | |||
1036 | * This signal is emitted when the toolbar is getting deleted, | 1036 | * This signal is emitted when the toolbar is getting deleted, |
1037 | * and before ~KToolbar finishes (so it's still time to remove | 1037 | * and before ~KToolbar finishes (so it's still time to remove |
1038 | * widgets from the toolbar). | 1038 | * widgets from the toolbar). |
1039 | * Used by KWidgetAction. | 1039 | * Used by KWidgetAction. |
1040 | * @since 3.2 | 1040 | * @since 3.2 |
1041 | */ | 1041 | */ |
1042 | void toolbarDestroyed(); | 1042 | void toolbarDestroyed(); |
1043 | 1043 | ||
1044 | public: | 1044 | public: |
1045 | /** | 1045 | /** |
1046 | * @return global setting for "Highlight buttons under mouse" | 1046 | * @return global setting for "Highlight buttons under mouse" |
1047 | */ | 1047 | */ |
1048 | void repaintMe(); | ||
1048 | static bool highlightSetting(); | 1049 | static bool highlightSetting(); |
1049 | 1050 | ||
1050 | /** | 1051 | /** |
1051 | * @return global setting for "Toolbars transparent when moving" | 1052 | * @return global setting for "Toolbars transparent when moving" |
1052 | */ | 1053 | */ |
1053 | static bool transparentSetting(); | 1054 | static bool transparentSetting(); |
1054 | 1055 | ||
1055 | /** | 1056 | /** |
1056 | * @return global setting for "Icon Text" | 1057 | * @return global setting for "Icon Text" |
1057 | */ | 1058 | */ |
1058 | static IconText iconTextSetting(); | 1059 | static IconText iconTextSetting(); |
1059 | 1060 | ||
1060 | public slots: | 1061 | public slots: |
1061 | virtual void setIconText( const QString &txt ) | 1062 | virtual void setIconText( const QString &txt ) |
1062 | { QToolBar::setIconText( txt ); } | 1063 | { QToolBar::setIconText( txt ); } |
1064 | void slotRepaint(); | ||
1063 | 1065 | ||
1064 | protected: | 1066 | protected: |
1065 | void mousePressEvent( QMouseEvent * ); | 1067 | void mousePressEvent( QMouseEvent * ); |
1066 | void childEvent( QChildEvent *e ); | 1068 | void childEvent( QChildEvent *e ); |
1067 | void showEvent( QShowEvent *e ); | 1069 | void showEvent( QShowEvent *e ); |
1068 | void resizeEvent( QResizeEvent *e ); | 1070 | void resizeEvent( QResizeEvent *e ); |
1069 | bool event( QEvent *e ); | 1071 | bool event( QEvent *e ); |
1070 | void applyAppearanceSettings(KConfig *config, const QString &_configGroup, bool forceGlobal = false); | 1072 | void applyAppearanceSettings(KConfig *config, const QString &_configGroup, bool forceGlobal = false); |
1071 | QString settingsGroup(); | 1073 | QString settingsGroup(); |
1072 | 1074 | ||
1073 | private slots: | 1075 | private slots: |
1074 | void rebuildLayout(); | 1076 | void rebuildLayout(); |
1075 | void slotReadConfig (); | 1077 | void slotReadConfig (); |
1076 | void slotAppearanceChanged(); | 1078 | void slotAppearanceChanged(); |
1077 | void slotIconChanged(int); | 1079 | void slotIconChanged(int); |
1078 | void slotRepaint(); | ||
1079 | void toolBarPosChanged( QToolBar *tb ); | 1080 | void toolBarPosChanged( QToolBar *tb ); |
1080 | void slotContextAboutToShow(); | 1081 | void slotContextAboutToShow(); |
1081 | void widgetDestroyed(); | 1082 | void widgetDestroyed(); |
1082 | 1083 | ||
1083 | private: | 1084 | private: |
1084 | void init( bool readConfig = true, bool honorStyle = false ); | 1085 | void init( bool readConfig = true, bool honorStyle = false ); |
1085 | void doConnections( KToolBarButton *button ); | 1086 | void doConnections( KToolBarButton *button ); |
1086 | void insertWidgetInternal( QWidget *w, int &index, int id ); | 1087 | void insertWidgetInternal( QWidget *w, int &index, int id ); |
1087 | void removeWidgetInternal( QWidget *w ); | 1088 | void removeWidgetInternal( QWidget *w ); |
1088 | void getAttributes( QString &position, QString &icontext, int &index ); | 1089 | void getAttributes( QString &position, QString &icontext, int &index ); |
1089 | //US KPopupMenu *contextMenu(); | 1090 | //US KPopupMenu *contextMenu(); |
1090 | QPopupMenu *contextMenu(); | 1091 | QPopupMenu *contextMenu(); |