summaryrefslogtreecommitdiffabout
path: root/microkde/kdeui/kmainwindow.h
Side-by-side diff
Diffstat (limited to 'microkde/kdeui/kmainwindow.h') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdeui/kmainwindow.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/microkde/kdeui/kmainwindow.h b/microkde/kdeui/kmainwindow.h
index 2dc8033..a3ac82f 100644
--- a/microkde/kdeui/kmainwindow.h
+++ b/microkde/kdeui/kmainwindow.h
@@ -1,122 +1,127 @@
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QChildEvent>
+#include <QCloseEvent>
+#include <QPaintEvent>
/*
This file is part of the KDE libraries
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
$Id$
*/
#ifndef KMAINWINDOW_H
#define KMAINWINDOW_H
/*US
#include "kxmlguifactory.h"
#include "kxmlguiclient.h"
#include "kxmlguibuilder.h"
#include <qmetaobject.h>
class KPopupMenu;
class KXMLGUIFactory;
class KConfig;
class KHelpMenu;
class KStatusBar;
class QStatusBar;
class KMenuBar;
class KMWSessionManaged;
class KAccel;
class KToolBarMenuAction;
*/
class QMenuBar;
class QStatusBar;
class KMainWindowPrivate;
class KAction;
#include <ktoolbar.h>
#include <ktoolbarhandler.h>
#include <kxmlguiclient.h>
-#include <qmainwindow.h>
-#include <qptrlist.h>
+#include <q3mainwindow.h>
+#include <q3ptrlist.h>
class KActionCollection;
-class KMainWindow : public QMainWindow, virtual public KXMLGUIClient
+class KMainWindow : public Q3MainWindow, virtual public KXMLGUIClient
{
Q_OBJECT
private:
//US create private defaultconstructor
KMainWindow() {;};
public:
/**
* Construct a main window.
*
* @param parent The widget parent. This is usually 0 but it may also be the window
* group leader. In that case, the KMainWindow becomes sort of a
* secondary window.
*
* @param name The object name. For session management and window management to work
* properly, all main windows in the application should have a
* different name. When passing 0 (the default), KMainWindow will create
* a unique name, but it's recommended to explicitly pass a window name that will
* also describe the type of the window. If there can be several windows of the same
* type, append '#' (hash) to the name, and KMainWindow will append numbers to make
* the names unique. For example, for a mail client which has one main window showing
* the mails and folders, and which can also have one or more windows for composing
* mails, the name for the folders window should be e.g. "mainwindow" and
* for the composer windows "composer#".
*
* @param f Specify the widget flags. The default is
* WType_TopLevel and WDestructiveClose. TopLevel indicates that a
* main window is a toplevel window, regardless of whether it has a
* parent or not. DestructiveClose indicates that a main window is
* automatically destroyed when its window is closed. Pass 0 if
* you do not want this behavior.
*
* KMainWindows must be created on the heap with 'new', like:
* <pre> KMainWindow *kmw = new KMainWindow (...</pre>
**/
//LR remove WDestructiveClose
KMainWindow( QWidget* parent = 0, const char *name = 0 ); //, WFlags f = WType_TopLevel /*| WDestructiveClose*/ ;
/**
* Destructor.
*
* Will also destroy the toolbars, and menubar if
* needed.
*/
virtual ~KMainWindow();
/**
* Retrieve the standard help menu.
*
* It contains entires for the
* help system (activated by F1), an optional "What's This?" entry
* (activated by Shift F1), an application specific dialog box,
* and an "About KDE" dialog box.
*
* Example (adding a standard help menu to your application):
* <pre>
* KPopupMenu *help = helpMenu( <myTextString> );
* menuBar()->insertItem( i18n("&Help"), help );
* </pre>
*
* @param aboutAppText The string that is used in the application
@@ -259,134 +264,134 @@ public:
* Also retrieving references to containers like popup menus or toolbars using
* the container method will not work.
*
* @param xmlfile The local xmlfile (relative or absolute)
* @param _conserveMemory Specify whether createGUI() should call
* @ref KXMLGuiClient::conserveMemory() to free all memory
* allocated by the @ref QDomDocument and by the KXMLGUIFactory.
*/
void createGUI( const QString &xmlfile = QString::null, bool _conserveMemory = TRUE );
/**
* Enables the build of a standard help menu when calling createGUI().
*
* The default behavior is to build one, you must call this function
* to disable it
*/
void setHelpMenuEnabled(bool showHelpMenu = true);
/**
* Return @p true when the help menu is enabled
*/
bool isHelpMenuEnabled();
/**
* Returns true, if there is a menubar
* @since 3.1
*/
bool hasMenuBar();
/**
* Returns a pointer to the menu bar.
*
* If there is no menu bar yet one will be created.
**/
//US KMenuBar *menuBar();
QMenuBar *menuBar();
/**
* Returns a pointer to the status bar.
*
* If there is no
* status bar yet one will be created.
*/
//US KStatusBar *statusBar();
QStatusBar *statusBar();
/**
* List of members of KMainWindow class.
*/
//US static QPtrList<KMainWindow>* memberList;
/**
* Returns a pointer to the toolbar with the specified name.
* This refers to toolbars created dynamically from the XML UI
* framework. If the toolbar does not exist one will be created.
*
* @param name The internal name of the toolbar. If no name is
* specified "mainToolBar" is assumed.
*
* @return A pointer to the toolbar
**/
KToolBar *toolBar( const char *name=0 );
// method for getting rid of KDE-Crap
- QToolBar *tBar( );
+ Q3ToolBar *tBar( );
/**
* @return An iterator over the list of all toolbars for this window.
*/
- QPtrListIterator<KToolBar> toolBarIterator();
+ Q3PtrListIterator<KToolBar> toolBarIterator();
/**
* @return A KAccel instance bound to this mainwindow. Used automatically
* by KAction to make keybindings work in all cases.
*/
KAccel *accel();
void setFrameBorderWidth( int ) {}
/**
* Call this to enable "auto-save" of toolbar/menubar/statusbar settings
* (and optionally window size).
* If the *bars were moved around/shown/hidden when the window is closed,
* saveMainWindowSettings( KGlobal::config(), groupName ) will be called.
*
* @param groupName a name that identifies this "type of window".
* You can have several types of window in the same application.
*
* @param saveWindowSize set it to true to include the window size
* when saving.
*
* Typically, you will call setAutoSaveSettings() in your
* KMainWindow-inherited class constructor, and it will take care
* of restoring and saving automatically. Make sure you call this
* _after all_ your *bars have been created.
*/
void setAutoSaveSettings( const QString & groupName = QString::fromLatin1("MainWindow"),
bool saveWindowSize = true );
/**
* Disable the auto-save-settings feature.
* You don't normally need to call this, ever.
*/
void resetAutoSaveSettings();
/**
* @return the current autosave setting, i.e. true if setAutoSaveSettings() was called,
* false by default or if resetAutoSaveSettings() was called.
* @since 3.1
*/
bool autoSaveSettings() const;
/**
* @return the group used for setting-autosaving.
* Only meaningful if setAutoSaveSettings() was called.
* This can be useful for forcing a save or an apply, e.g. before and after
* using KEditToolbar.
* @since 3.1
*/
QString autoSaveGroup() const;
/**
* Read settings for statusbar, menubar and toolbar from their respective
* groups in the config file and apply them.
*
* @param config Config file to read the settings from.
* @param groupName Group name to use. If not specified, the last used
* group name is used.
*/
void applyMainWindowSettings(KConfig *config, const QString &groupName = QString::null);
/**
* Save settings for statusbar, menubar and toolbar to their respective
* groups in the config file @p config.
@@ -697,81 +702,81 @@ protected:
virtual void readGlobalProperties( KConfig* sessionConfig );
void savePropertiesInternal( KConfig*, int );
bool readPropertiesInternal( KConfig*, int );
/**
* For inherited classes
*/
bool settingsDirty() const;
/**
* For inherited classes
*/
QString settingsGroup() const;
/**
* For inherited classes
* Note that the group must be set before calling
*/
void saveWindowSize( KConfig * config ) const;
/**
* For inherited classes
* Note that the group must be set before calling, and that
* a -geometry on the command line has priority.
*/
void restoreWindowSize( KConfig * config );
/// parse the geometry from the geometry command line argument
void parseGeometry(bool parsewidth);
protected slots:
/**
* This slot does nothing.
*
* It must be reimplemented if you want
* to use a custom About Application dialog box. This slot is
* connected to the About Application entry in the menu returned
* by @ref customHelpMenu.
*
* Example:
* <pre>
*
* void MyMainLevel::setupInterface()
* {
* ..
* menuBar()->insertItem( i18n("&Help"), customHelpMenu() );
* ..
* }
*
* void MyMainLevel::showAboutApplication()
* {
* <activate your custom dialog>
* }
* </pre>
*/
//US virtual void showAboutApplication();
private slots:
/**
* Called when the app is shutting down.
*/
void shuttingDown();
void saveAutoSaveSettings();
private:
- QToolBar * mQToolBar;
+ Q3ToolBar * mQToolBar;
//US KMenuBar *internalMenuBar();
QMenuBar *internalMenuBar();
//US KStatusBar *internalStatusBar();
QStatusBar *internalStatusBar();
KMainWindowPrivate *d;
void initKMainWindow(const char *name);
- QPtrList<KToolBar> toolbarList;
+ Q3PtrList<KToolBar> toolbarList;
protected:
virtual void virtual_hook( int id, void* data );
};
#endif