• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.8.3 API Reference
  • KDE Home
  • 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 #ifndef KDE_NO_DEPRECATED
00137     KDE_DEPRECATED void setContextMenuEnabled( bool enable = true );
00138 #endif
00139 
00145 #ifndef KDE_NO_DEPRECATED
00146     KDE_DEPRECATED bool contextMenuEnabled() const;
00147 #endif
00148 
00152     void saveSettings( KConfigGroup &cg );
00153 
00162     void applySettings( const KConfigGroup &cg, bool forceGlobal = false );
00163 
00168 #ifndef KDE_NO_DEPRECATED
00169     KDE_DEPRECATED void setXMLGUIClient( KXMLGUIClient *client );
00170 #endif
00171 
00176     void addXMLGUIClient( KXMLGUIClient *client );
00177 
00181     void loadState( const QDomElement &element );
00182 
00186     void saveState( QDomElement &element ) const;
00187 
00191     bool eventFilter( QObject* watched, QEvent* event );
00192 
00197     static Qt::ToolButtonStyle toolButtonStyleSetting(); // KDE5: make private and file-static, nobody is calling this
00198 
00202     static bool toolBarsEditable();
00203 
00209     static void setToolBarsEditable( bool editable );
00210 
00214     static bool toolBarsLocked();
00215 
00219     static void setToolBarsLocked( bool locked );
00220 
00221   protected Q_SLOTS:
00222     virtual void slotMovableChanged(bool movable);
00223 
00224   protected:
00225     virtual void contextMenuEvent( QContextMenuEvent* );
00226     virtual void actionEvent( QActionEvent* );
00227 
00228     // Draggable toolbar configuration
00229     virtual void dragEnterEvent( QDragEnterEvent* );
00230     virtual void dragMoveEvent( QDragMoveEvent* );
00231     virtual void dragLeaveEvent( QDragLeaveEvent* );
00232     virtual void dropEvent( QDropEvent* );
00233     virtual void mousePressEvent( QMouseEvent* );
00234     virtual void mouseMoveEvent( QMouseEvent* );
00235     virtual void mouseReleaseEvent( QMouseEvent* );
00236 
00237   private:
00238     class Private;
00239     Private* const d;
00240 
00241     Q_PRIVATE_SLOT( d, void slotAppearanceChanged() )
00242     Q_PRIVATE_SLOT( d, void slotContextAboutToShow() )
00243     Q_PRIVATE_SLOT( d, void slotContextAboutToHide() )
00244     Q_PRIVATE_SLOT( d, void slotContextLeft() )
00245     Q_PRIVATE_SLOT( d, void slotContextRight() )
00246     Q_PRIVATE_SLOT( d, void slotContextShowText() )
00247     Q_PRIVATE_SLOT( d, void slotContextTop() )
00248     Q_PRIVATE_SLOT( d, void slotContextBottom() )
00249     Q_PRIVATE_SLOT( d, void slotContextIcons() )
00250     Q_PRIVATE_SLOT( d, void slotContextText() )
00251     Q_PRIVATE_SLOT( d, void slotContextTextRight() )
00252     Q_PRIVATE_SLOT( d, void slotContextTextUnder() )
00253     Q_PRIVATE_SLOT( d, void slotContextIconSize() )
00254     Q_PRIVATE_SLOT( d, void slotLockToolBars( bool ) )
00255 };
00256 
00257 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu May 10 2012 20:53:07 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs-4.8.3 API Reference

Skip menu "kdelibs-4.8.3 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal