File indexing completed on 2024-11-03 04:02:05
0001 /*************************************************************************** 0002 kimeshell.h - description 0003 ------------------- 0004 begin : Mon Aug 5 2002 0005 copyright : (C) 2002 by Jan Schäfer 0006 email : janschaefer@users.sourceforge.net 0007 ***************************************************************************/ 0008 0009 /*************************************************************************** 0010 * * 0011 * This program is free software; you can redistribute it and/or modify * 0012 * it under the terms of the GNU General Public License as published by * 0013 * the Free Software Foundation; either version 2 of the License, or * 0014 * (at your option) any later version. * 0015 * * 0016 ***************************************************************************/ 0017 0018 #ifndef KIMESHELL_H 0019 #define KIMESHELL_H 0020 0021 #include <KParts/MainWindow> 0022 #include <KConfigGroup> 0023 #include <QUrl> 0024 0025 namespace KParts { 0026 class ReadWritePart; 0027 } 0028 class KImageMapEditorInterface; 0029 0030 class KimeShell : public KParts::MainWindow 0031 { 0032 Q_OBJECT 0033 0034 public: 0035 explicit KimeShell( const char *name=nullptr ); 0036 ~KimeShell() override; 0037 0038 void setStdout(bool b); 0039 void openFile(const QUrl & url); 0040 0041 /** 0042 * Opens the last open file, if the 0043 * user has configured to open the last 0044 * file. Otherwise does nothing 0045 */ 0046 void openLastFile(); 0047 void readConfig(); 0048 void writeConfig(); 0049 0050 protected: 0051 void setupActions(); 0052 void readConfig(const KConfigGroup&); 0053 void writeConfig(KConfigGroup&); 0054 0055 // virtual bool queryClose(); 0056 void readProperties(const KConfigGroup &config) override; 0057 void saveProperties(KConfigGroup &config) override; 0058 0059 bool queryClose() override; 0060 virtual bool queryExit(); 0061 0062 0063 private slots: 0064 void fileNew(); 0065 void fileOpen(); 0066 void optionsShowToolbar(); 0067 void optionsShowStatusbar(); 0068 void optionsConfigureKeys(); 0069 void optionsConfigureToolbars(); 0070 0071 void applyNewToolbarConfig(); 0072 0073 private: 0074 KParts::ReadWritePart *m_part; 0075 KImageMapEditorInterface *m_editorInterface; 0076 0077 bool _stdout; // write HTML-Code to stdout on exit ? 0078 0079 0080 0081 }; 0082 0083 inline void KimeShell::setStdout(bool b) { 0084 _stdout=b; 0085 } 0086 0087 0088 #endif