summaryrefslogtreecommitdiffabout
path: root/microkde/kdeui/ktoolbar.h
authorzautrix <zautrix>2004-12-05 12:12:10 (UTC)
committer zautrix <zautrix>2004-12-05 12:12:10 (UTC)
commit5ab47964d8b52897bb0662ef4a5fcf9604acaf6c (patch) (side-by-side diff)
tree0f80433206ddd6b4ef901cb346d0f06caf76b20f /microkde/kdeui/ktoolbar.h
parent196365e533c6fd1a8f47aa9579763ef5afcebcda (diff)
downloadkdepimpi-5ab47964d8b52897bb0662ef4a5fcf9604acaf6c.zip
kdepimpi-5ab47964d8b52897bb0662ef4a5fcf9604acaf6c.tar.gz
kdepimpi-5ab47964d8b52897bb0662ef4a5fcf9604acaf6c.tar.bz2
fixed kapi toolbar repaint problem
Diffstat (limited to 'microkde/kdeui/ktoolbar.h') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdeui/ktoolbar.h3
1 files changed, 2 insertions, 1 deletions
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
@@ -856,252 +856,253 @@ public:
/**
* This allows you to enable or disable the context menu.
*
* @param enable If false, then the context menu will be disabled
*/
void setEnableContextMenu(bool enable = true);
/**
* Returns whether or not the context menu is disabled
*
* @return The context menu state
*/
bool contextMenuEnabled() const;
/**
* This will inform a toolbar button to ignore certain style
* changes. Specifically, it will ignore IconText (always IconOnly)
* and will not allow image effects to apply.
*
* @param id The button to exclude from styles
* @param no_style If true, then it is excluded (default: true).
*/
void setItemNoStyle(int id, bool no_style = true);
void setFlat (bool flag);
/**
* @return the number of items in the toolbar
*/
int count() const;
/**
* Instruct the toolbar to save it's current state to either the app
* config file or to the XML-GUI resource file (whichever has
* precedence).
*/
void saveState();
/**
* Save the toolbar settings to group @p configGroup in @p config.
*/
void saveSettings(KConfig *config, const QString &configGroup);
/**
* Read the toolbar settings from group @p configGroup in @p config
* and apply them.
*/
void applySettings(KConfig *config, const QString &configGroup);
/**
* Tell the toolbar what XML-GUI resource file it should use to save
* it's state. The state of the toolbar (position, size, etc) is
* saved in KConfig files if the application does not use XML-GUI..
* but if the app does, then it's saved the XML file. This function
* allows this to happen.
*
* @param xmlfile The XML-GUI resource file to write to
* @param xml The DOM document for the XML-GUI building
*/
// void setXML(const QString& xmlfile, const QDomDocument& xml);
/* @internal */
void setXMLGUIClient( KXMLGUIClient *client );
/**
* Assign a (translated) text to this toolbar. This is used
* for the tooltip on the handle, and when listing the toolbars.
*/
void setText( const QString & txt );
/**
* @return the toolbar's text.
*/
QString text() const;
void setStretchableWidget( QWidget *w );
QSizePolicy sizePolicy() const;
bool highlight() const;
QSize sizeHint() const;
QSize minimumSizeHint() const;
QSize minimumSize() const;
void hide();
void show();
void updateRects( bool = FALSE ) {}
//US void loadState( const QDomElement &e );
//US void saveState( QDomElement &e );
/**
* @internal
*/
void positionYourself( bool force = false);
signals:
/**
* Emitted when button @p id is clicked.
*/
void clicked(int id);
/**
* Emitted when button @p id is double-clicked.
*
* Note: you will always
* recive two @ref clicked() , @ref pressed() and @ref released() signals.
* There is no way to avoid it - at least no easy way.
* If you need to resolve this all you can do is set up timers
* which wait for @ref QApplication::doubleClickInterval() to expire.
* If in that time you don't get this signal, you may belive that
* button was only clicked and not double-clicked.
* And please note that butons with popup menus do not emit this signal,
* but those with delayed popup do.
*/
void doubleClicked (int id);
/**
* Emitted when button @p id is pressed.
*/
void pressed(int);
/**
* Emits when button @p id is released.
*/
void released(int);
/**
* Emitted when a toggle button changes state.
*
* Emitted also if you change state
* with @ref setButton() or @ref toggleButton()
* If you make a button normal again, with
* setToggle(false), this signal won't
* be emitted.
*/
void toggled(int);
/**
* This signal is emitted when item id gets highlighted/unhighlighted
* (i.e when mouse enters/exits).
*
* Note that this signal is emitted from
* all buttons (normal, disabled and toggle) even when there is no visible
* change in buttons (i.e., buttons do not raise when mouse enters).
* The parameter @p isHighlighted is @p true when mouse enters and @p false when
* mouse exits.
*/
void highlighted(int id, bool isHighlighted);
/**
* This signal is emitted when item id gets highlighted/unhighlighted
* (i.e when mouse enters/exits).
*
* Note that this signal is emitted from
* all buttons (normal, disabled and toggle) even when there is no visible
* change in buttons (i.e., buttons do not raise when mouse enters).
*/
void highlighted(int id );
/**
* Emitted when toolbar changes position, or when
* an item is removed from toolbar.
*
* If you subclass @ref KMainWindow and reimplement
* @ref KMainWindow::resizeEvent() be sure to connect to
* this signal. Note: You can connect this signal to a slot that
* doesn't take parameter.
*/
void moved( BarPosition );
/**
* @internal
* This signal is emitted when toolbar detects changing of
* following parameters:
* highlighting, button-size, button-mode. This signal is
* internal, aimed to buttons.
*/
void modechange ();
/**
* This signal is emitted when the toolbar is getting deleted,
* and before ~KToolbar finishes (so it's still time to remove
* widgets from the toolbar).
* Used by KWidgetAction.
* @since 3.2
*/
void toolbarDestroyed();
public:
/**
* @return global setting for "Highlight buttons under mouse"
*/
+ void repaintMe();
static bool highlightSetting();
/**
* @return global setting for "Toolbars transparent when moving"
*/
static bool transparentSetting();
/**
* @return global setting for "Icon Text"
*/
static IconText iconTextSetting();
public slots:
virtual void setIconText( const QString &txt )
{ QToolBar::setIconText( txt ); }
+ void slotRepaint();
protected:
void mousePressEvent( QMouseEvent * );
void childEvent( QChildEvent *e );
void showEvent( QShowEvent *e );
void resizeEvent( QResizeEvent *e );
bool event( QEvent *e );
void applyAppearanceSettings(KConfig *config, const QString &_configGroup, bool forceGlobal = false);
QString settingsGroup();
private slots:
void rebuildLayout();
void slotReadConfig ();
void slotAppearanceChanged();
void slotIconChanged(int);
- void slotRepaint();
void toolBarPosChanged( QToolBar *tb );
void slotContextAboutToShow();
void widgetDestroyed();
private:
void init( bool readConfig = true, bool honorStyle = false );
void doConnections( KToolBarButton *button );
void insertWidgetInternal( QWidget *w, int &index, int id );
void removeWidgetInternal( QWidget *w );
void getAttributes( QString &position, QString &icontext, int &index );
//US KPopupMenu *contextMenu();
QPopupMenu *contextMenu();
QMap<QWidget*, int > widget2id;
typedef QMap<int, QWidget* > Id2WidgetMap;
Id2WidgetMap id2widget;
//US KPopupMenu *context;
QPopupMenu *context;
QPtrList<QWidget> widgets;
QTimer *layoutTimer;
QGuardedPtr<QWidget> stretchableWidget, rightAligned;
protected:
virtual void virtual_hook( int id, void* data );
private:
KToolBarPrivate *d;
bool inshutdownprocess;
};
#endif