• Skip to content
  • Skip to link menu
KDE 4.3 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:
00072     explicit KToolBar(QWidget *parent, bool isMainToolBar = false, bool readConfig = true);
00073     // KDE5: remove. The one below is preferred so that all debug output from init() shows the right objectName already,
00074     // and so that isMainToolBar() and iconSizeDefault() return correct values during loading too.
00075 
00091     explicit KToolBar(const QString& objectName, QWidget* parent, bool readConfig = true);
00092 
00105     KToolBar(const QString& objectName, QMainWindow* parentWindow, Qt::ToolBarArea area, bool newLine = false,
00106              bool isMainToolBar = false, bool readConfig = true); // KDE5: remove, I don't think anyone is using this.
00107 
00111     virtual ~KToolBar();
00112 
00116     KMainWindow* mainWindow() const;
00117 
00121     void setIconDimensions( int size );
00122 
00128     int iconSizeDefault() const; // KDE5: hide from public API. Doesn't make sense to export this, and it isn't used.
00129 
00136     KDE_DEPRECATED void setContextMenuEnabled( bool enable = true );
00137 
00143     KDE_DEPRECATED bool contextMenuEnabled() const;
00144 
00148     void saveSettings( KConfigGroup &cg );
00149 
00158     void applySettings( const KConfigGroup &cg, bool forceGlobal = false );
00159 
00163     void setXMLGUIClient( KXMLGUIClient *client );
00164 
00168     void loadState( const QDomElement &element );
00169 
00173     void saveState( QDomElement &element ) const;
00174 
00178     bool eventFilter( QObject* watched, QEvent* event );
00179 
00184     static Qt::ToolButtonStyle toolButtonStyleSetting(); // KDE5: make private and file-static, nobody is calling this
00185 
00189     static bool toolBarsEditable();
00190 
00196     static void setToolBarsEditable( bool editable );
00197 
00201     static bool toolBarsLocked();
00202 
00206     static void setToolBarsLocked( bool locked );
00207 
00208   protected Q_SLOTS:
00209     virtual void slotMovableChanged(bool movable);
00210 
00211   protected:
00212     virtual void contextMenuEvent( QContextMenuEvent* );
00213     virtual void actionEvent( QActionEvent* );
00214 
00215     // Draggable toolbar configuration
00216     virtual void dragEnterEvent( QDragEnterEvent* );
00217     virtual void dragMoveEvent( QDragMoveEvent* );
00218     virtual void dragLeaveEvent( QDragLeaveEvent* );
00219     virtual void dropEvent( QDropEvent* );
00220     virtual void mousePressEvent( QMouseEvent* );
00221     virtual void mouseMoveEvent( QMouseEvent* );
00222     virtual void mouseReleaseEvent( QMouseEvent* );
00223 
00224   private:
00225     class Private;
00226     Private* const d;
00227 
00228     Q_PRIVATE_SLOT( d, void slotAppearanceChanged() )
00229     Q_PRIVATE_SLOT( d, void slotContextAboutToShow() )
00230     Q_PRIVATE_SLOT( d, void slotContextAboutToHide() )
00231     Q_PRIVATE_SLOT( d, void slotContextLeft() )
00232     Q_PRIVATE_SLOT( d, void slotContextRight() )
00233     Q_PRIVATE_SLOT( d, void slotContextTop() )
00234     Q_PRIVATE_SLOT( d, void slotContextBottom() )
00235     Q_PRIVATE_SLOT( d, void slotContextIcons() )
00236     Q_PRIVATE_SLOT( d, void slotContextText() )
00237     Q_PRIVATE_SLOT( d, void slotContextTextRight() )
00238     Q_PRIVATE_SLOT( d, void slotContextTextUnder() )
00239     Q_PRIVATE_SLOT( d, void slotContextIconSize() )
00240     Q_PRIVATE_SLOT( d, void slotLockToolBars( bool ) )
00241 };
00242 
00243 #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
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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