kandy.h
00001 /* 00002 This file is part of Kandy. 00003 00004 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 00020 As a special exception, permission is given to link this program 00021 with any edition of TQt, and distribute the resulting executable, 00022 without including the source code for TQt in the source distribution. 00023 */ 00024 #ifndef KANDY_H 00025 #define KANDY_H 00026 00027 #ifdef HAVE_CONFIG_H 00028 #include <config.h> 00029 #endif 00030 00031 #include <kapplication.h> 00032 #include <kmainwindow.h> 00033 00034 #include "kandyview.h" 00035 00036 class TQPrinter; 00037 00038 class KandyPrefsDialog; 00039 00048 class Kandy : public KMainWindow 00049 { 00050 Q_OBJECT 00051 TQ_OBJECT 00052 public: 00056 Kandy(CommandScheduler *); 00057 00061 virtual ~Kandy(); 00062 00066 void load(const TQString& url); 00067 void save(const TQString& url); 00068 00069 public slots: 00070 void setTitle(); 00071 00072 void modemConnect(); 00073 00074 void showErrorMessage( const TQString & ); 00075 00076 signals: 00077 void showMobileWin(); 00078 void connectStateChanged(bool); 00079 00080 protected: 00084 virtual void dragEnterEvent(TQDragEnterEvent *event); 00085 virtual void dropEvent(TQDropEvent *event); 00086 00087 bool queryClose(); 00088 00089 protected: 00094 void saveProperties(KConfig *); 00095 00101 void readProperties(KConfig *); 00102 00103 00104 private slots: 00105 void fileOpen(); 00106 void fileSave(); 00107 void fileSaveAs(); 00108 void filePrint(); 00109 void optionsConfigureKeys(); 00110 void optionsConfigureToolbars(); 00111 void optionsPreferences(); 00112 void modemDisconnect(); 00113 void showMobileGui(); 00114 void newToolbarConfig(); 00115 00116 void changeStatusbar(const TQString& text); 00117 void changeCaption(const TQString& text); 00118 00119 00120 private: 00121 void setupAccel(); 00122 void setupActions(); 00123 00124 private: 00125 CommandScheduler *mScheduler; 00126 00127 KandyView *mView; 00128 00129 TQPrinter *mPrinter; 00130 00131 KAction *mConnectAction; 00132 KAction *mDisconnectAction; 00133 00134 TQString mFilename; 00135 00136 KandyPrefsDialog *mPreferencesDialog; 00137 }; 00138 00139 #endif // KANDY_H