1 | /*************************************************************************** |
---|---|
2 | kimeshell.h - description |
3 | ------------------- |
4 | begin : Mon Aug 5 2002 |
5 | copyright : (C) 2002 by Jan Schäfer |
6 | email : janschaefer@users.sourceforge.net |
7 | ***************************************************************************/ |
8 | |
9 | /*************************************************************************** |
10 | * * |
11 | * This program is free software; you can redistribute it and/or modify * |
12 | * it under the terms of the GNU General Public License as published by * |
13 | * the Free Software Foundation; either version 2 of the License, or * |
14 | * (at your option) any later version. * |
15 | * * |
16 | ***************************************************************************/ |
17 | |
18 | #ifndef KIMESHELL_H |
19 | #define KIMESHELL_H |
20 | |
21 | #include <kparts/mainwindow.h> |
22 | |
23 | class KImageMapEditor; |
24 | |
25 | class KimeShell : public KParts::MainWindow |
26 | { |
27 | Q_OBJECT |
28 | |
29 | public: |
30 | KimeShell( const char *name=0 ); |
31 | virtual ~KimeShell(); |
32 | |
33 | void setStdout(bool b); |
34 | void openFile(const KUrl & url); |
35 | |
36 | /** |
37 | * Opens the last open file, if the |
38 | * user has configured to open the last |
39 | * file. Otherwise does nothing |
40 | */ |
41 | void openLastFile(); |
42 | void readConfig(); |
43 | void writeConfig(); |
44 | |
45 | protected: |
46 | void setupActions(); |
47 | void readConfig(const KConfigGroup&); |
48 | void writeConfig(KConfigGroup&); |
49 | |
50 | // virtual bool queryClose(); |
51 | virtual void readProperties(const KConfigGroup &config); |
52 | virtual void saveProperties(KConfigGroup &config); |
53 | |
54 | virtual bool queryClose(); |
55 | virtual bool queryExit(); |
56 | |
57 | |
58 | private slots: |
59 | void fileNew(); |
60 | void fileOpen(); |
61 | void optionsShowToolbar(); |
62 | void optionsShowStatusbar(); |
63 | void optionsConfigureKeys(); |
64 | void optionsConfigureToolbars(); |
65 | |
66 | void applyNewToolbarConfig(); |
67 | private: |
68 | KImageMapEditor *m_part; |
69 | |
70 | bool _stdout; // write HTML-Code to stdout on exit ? |
71 | |
72 | |
73 | |
74 | }; |
75 | |
76 | inline void KimeShell::setStdout(bool b) { |
77 | _stdout=b; |
78 | } |
79 | |
80 | |
81 | #endif |
82 |