• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.11.5 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • kdeui
  • xmlgui
kxmlguiwindow.h
Go to the documentation of this file.
1 /*
2  This file is part of the KDE libraries
3  Copyright
4  (C) 2000 Reginald Stadlbauer (reggie@kde.org)
5  (C) 1997 Stephan Kulow (coolo@kde.org)
6  (C) 1997-2000 Sven Radej (radej@kde.org)
7  (C) 1997-2000 Matthias Ettrich (ettrich@kde.org)
8  (C) 1999 Chris Schlaeger (cs@kde.org)
9  (C) 2002 Joseph Wenninger (jowenn@kde.org)
10  (C) 2005-2006 Hamish Rodda (rodda@kde.org)
11 
12  This library is free software; you can redistribute it and/or
13  modify it under the terms of the GNU Library General Public
14  License version 2 as published by the Free Software Foundation.
15 
16  This library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  Library General Public License for more details.
20 
21  You should have received a copy of the GNU Library General Public License
22  along with this library; see the file COPYING.LIB. If not, write to
23  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24  Boston, MA 02110-1301, USA.
25 
26 
27 */
28 
29 #ifndef KXMLGUIWINDOW_H
30 #define KXMLGUIWINDOW_H
31 
32 #include "kxmlguiclient.h"
33 #include "kxmlguibuilder.h"
34 #include <kmainwindow.h>
35 #include <QtCore/QMetaClassInfo>
36 
37 class KMenu;
38 class KXMLGUIFactory;
39 class KConfig;
40 class KConfigGroup;
41 class KToolBar;
42 class KXmlGuiWindowPrivate;
43 
44 #define KDE_DEFAULT_WINDOWFLAGS 0
45 
61 class KDEUI_EXPORT KXmlGuiWindow : public KMainWindow, public KXMLGUIBuilder, virtual public KXMLGUIClient
62 {
63  KDEUI_DECLARE_PRIVATE(KXmlGuiWindow)
64  Q_OBJECT
65  Q_PROPERTY( bool hasMenuBar READ hasMenuBar )
66  Q_PROPERTY( bool autoSaveSettings READ autoSaveSettings )
67  Q_PROPERTY( QString autoSaveGroup READ autoSaveGroup )
68  Q_PROPERTY( bool standardToolBarMenuEnabled READ isStandardToolBarMenuEnabled WRITE setStandardToolBarMenuEnabled )
69  Q_FLAGS( StandardWindowOption )
70  Q_PROPERTY( bool initialGeometrySet READ initialGeometrySet )
71 
72 public:
107  explicit KXmlGuiWindow( QWidget* parent = 0, Qt::WindowFlags f = KDE_DEFAULT_WINDOWFLAGS );
108 
115  virtual ~KXmlGuiWindow();
116 
123  void setHelpMenuEnabled(bool showHelpMenu = true);
124 
128  bool isHelpMenuEnabled() const;
129 
130  virtual KXMLGUIFactory *guiFactory();
131 
143  void createGUI( const QString &xmlfile = QString() );
144 
145 
162  void setStandardToolBarMenuEnabled( bool enable );
163  bool isStandardToolBarMenuEnabled() const;
164 
165 
185  void createStandardStatusBarAction();
186 
190  enum StandardWindowOption
191  {
197  ToolBar = 1,
198 
202  Keys = 2,
203 
208  StatusBar = 4,
209 
220  Save = 8,
221 
232  Create = 16,
233 
238  Default = ToolBar | Keys | StatusBar | Save | Create
239  };
240  Q_DECLARE_FLAGS(StandardWindowOptions, StandardWindowOption)
241 
242 
258  void setupGUI( StandardWindowOptions options = Default, const QString& xmlfile = QString() );
259 
277  void setupGUI( const QSize& defaultSize, StandardWindowOptions options = Default, const QString& xmlfile = QString() );
278 
282  QAction *toolBarMenuAction();
283 
287  void setupToolbarMenuActions();
288 
289  // KDE5 TODO: change it to "using KXMLGUIBuilder::finalizeGUI;"
290  virtual void finalizeGUI( KXMLGUIClient *client );
291 
295  void finalizeGUI( bool force );
296 
297  // reimplemented for internal reasons
298  virtual void applyMainWindowSettings(const KConfigGroup &config, bool force = false);
299 
300 public Q_SLOTS:
311  virtual void configureToolbars();
312 
318  virtual void slotStateChanged(const QString &newstate);
319 
327  void slotStateChanged(const QString &newstate,
328  bool reverse);
329 
330 protected:
336  virtual bool event( QEvent * event );
337 
338 protected Q_SLOTS:
343  virtual void saveNewToolbarConfig();
344 
345 private:
346  Q_PRIVATE_SLOT(k_func(), void _k_slotFactoryMakingChanges(bool))
347 };
348 
349 Q_DECLARE_OPERATORS_FOR_FLAGS(KXmlGuiWindow::StandardWindowOptions)
350 
351 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Thu Sep 25 2014 04:19:53 by doxygen 1.8.3.1 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.11.5 API Reference

Skip menu "kdelibs-4.11.5 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