2 This file is part of Kig, a KDE program for Interactive Geometry...
3 Copyright (C) 2002 Dominique Devriese <devriese@kde.org>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
29 #include <kdeversion.h>
32 #if KDE_IS_VERSION( 3, 1, 90 )
33 #undef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES
35 #define KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES
38 #define KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES
41 #include <kapplication.h>
42 #include <kparts/mainwindow.h>
43 #include <dcopclient.h>
46 class KRecentFilesAction
;
49 * This is the application "Shell". It has a menubar, toolbar, and
50 * statusbar but relies on the "Part" to do all the real work.
52 class Kig
: public KParts::MainWindow
68 * Open file in this window
69 * @param file file to open
71 void load (const KURL
& file
);
74 * this opens the file specified in s in a new window
78 void openURL (const QString
& s
) { openURL(KURL(s
)); };
79 void openURL (const KURL
& s
);
84 * The user started dragging something onto us...
88 void dragEnterEvent(QDragEnterEvent
* e
);
91 * The user dropped something onto us...
95 void dropEvent (QDropEvent
* e
);
98 * this is called by the framework before closing the window, to
99 * allow the user to save his changes... returning false cancels the
105 * This method is called when it is time for the app to save its
106 * properties for session management purposes.
108 void saveProperties(KConfig
*);
111 * This method is called when this app is restored. The KConfig
112 * object points to the session management config file that was saved
113 * with @ref saveProperties
115 void readProperties(KConfig
*);
120 // Qt moc doesn't handle ifdef's, so i'm disabling it..
121 // #ifdef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES
122 void optionsShowToolbar();
123 void optionsShowStatusbar();
125 // #if KDE_IS_VERSION( 3, 2, 90 )
126 void optionsConfigureKeys();
128 void optionsConfigureToolbars();
130 void applyNewToolbarConfig();
133 void startupTipOfDay();
138 KParts::ReadWritePart
*m_part
;
140 //#ifdef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES
141 KToggleAction
*m_toolbarAction
;
142 KToggleAction
*m_statusbarAction
;
144 KRecentFilesAction
*m_recentFilesAction
;
148 static bool kimageioRegistered
;