• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

ktoolbar.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002     Copyright (C) 2000 Reginald Stadlbauer (reggie@kde.org)
00003     (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
00004     (C) 1997, 1998 Sven Radej (radej@kde.org)
00005     (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
00006     (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
00007     (C) 1999, 2000 Kurt Granroth (granroth@kde.org)
00008     (C) 2005-2006 Hamish Rodda (rodda@kde.org)
00009 
00010     This library is free software; you can redistribute it and/or
00011     modify it under the terms of the GNU Library General Public
00012     License version 2 as published by the Free Software Foundation.
00013 
00014     This library is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017     Library General Public License for more details.
00018 
00019     You should have received a copy of the GNU Library General Public License
00020     along with this library; see the file COPYING.LIB.  If not, write to
00021     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00022     Boston, MA 02110-1301, USA.
00023     */
00024 
00025 #ifndef KTOOLBAR_H
00026 #define KTOOLBAR_H
00027 
00028 #include <kdeui_export.h>
00029 
00030 #include <QtGui/QToolBar>
00031 
00032 class QDomElement;
00033 
00034 class KConfigGroup;
00035 class KConfig;
00036 class KMainWindow;
00037 class KXMLGUIClient;
00038 
00053 class KDEUI_EXPORT KToolBar : public QToolBar
00054 {
00055   Q_OBJECT
00056 
00057   public:
00073     explicit KToolBar( QWidget *parent, bool honorStyle = false, bool readConfig = true );
00074 
00090     KToolBar( const QString& objectName, QMainWindow* parentWindow, Qt::ToolBarArea area, bool newLine = false,
00091               bool honorStyle = false, bool readConfig = true );
00092 
00096     virtual ~KToolBar();
00097 
00101     KMainWindow* mainWindow() const;
00102 
00106     void setIconDimensions( int size );
00107 
00113     int iconSizeDefault() const;
00114 
00121     KDE_DEPRECATED void setContextMenuEnabled( bool enable = true );
00122 
00128     KDE_DEPRECATED bool contextMenuEnabled() const;
00129 
00133     void saveSettings( KConfigGroup &cg );
00134 
00139     void applySettings( const KConfigGroup &cg, bool force = false );
00140 
00144     void setXMLGUIClient( KXMLGUIClient *client );
00145 
00149     void loadState( const QDomElement &element );
00150 
00154     void saveState( QDomElement &element ) const;
00155 
00159     bool eventFilter( QObject* watched, QEvent* event );
00160 
00165     static Qt::ToolButtonStyle toolButtonStyleSetting();
00166 
00170     static bool toolBarsEditable();
00171 
00177     static void setToolBarsEditable( bool editable );
00178 
00182     static bool toolBarsLocked();
00183 
00187     static void setToolBarsLocked( bool locked );
00188 
00189   protected Q_SLOTS:
00190     virtual void slotMovableChanged(bool movable);
00191 
00192   protected:
00193     virtual void contextMenuEvent( QContextMenuEvent* );
00194     virtual void actionEvent( QActionEvent* );
00195 
00196     // Draggable toolbar configuration
00197     virtual void dragEnterEvent( QDragEnterEvent* );
00198     virtual void dragMoveEvent( QDragMoveEvent* );
00199     virtual void dragLeaveEvent( QDragLeaveEvent* );
00200     virtual void dropEvent( QDropEvent* );
00201     virtual void mousePressEvent( QMouseEvent* );
00202     virtual void mouseMoveEvent( QMouseEvent* );
00203     virtual void mouseReleaseEvent( QMouseEvent* );
00204 
00205   private:
00206     void applyAppearanceSettings( const KConfigGroup &cg, bool forceGlobal = false );
00207 
00208     class Private;
00209     Private* const d;
00210 
00211     Q_PRIVATE_SLOT( d, void slotReadConfig() )
00212     Q_PRIVATE_SLOT( d, void slotAppearanceChanged() )
00213     Q_PRIVATE_SLOT( d, void slotContextAboutToShow() )
00214     Q_PRIVATE_SLOT( d, void slotContextAboutToHide() )
00215     Q_PRIVATE_SLOT( d, void slotContextLeft() )
00216     Q_PRIVATE_SLOT( d, void slotContextRight() )
00217     Q_PRIVATE_SLOT( d, void slotContextTop() )
00218     Q_PRIVATE_SLOT( d, void slotContextBottom() )
00219     Q_PRIVATE_SLOT( d, void slotContextIcons() )
00220     Q_PRIVATE_SLOT( d, void slotContextText() )
00221     Q_PRIVATE_SLOT( d, void slotContextTextRight() )
00222     Q_PRIVATE_SLOT( d, void slotContextTextUnder() )
00223     Q_PRIVATE_SLOT( d, void slotContextIconSize() )
00224     Q_PRIVATE_SLOT( d, void slotLockToolBars( bool ) )
00225 };
00226 
00227 #endif

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal