kandy

mobilemain.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 MOBILEMAIN_H
00025 #define MOBILEMAIN_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 "kandyprefs.h"
00035 
00036 class CommandScheduler;
00037 
00046 class MobileMain : public KMainWindow
00047 {
00048     Q_OBJECT
00049   TQ_OBJECT
00050   public:
00054     MobileMain(CommandScheduler *, KandyPrefs *prefs);
00055 
00059     virtual ~MobileMain();
00060 
00061     MobileGui *view() { return mView; };
00062 
00063   signals:
00064     void showTerminalWin();
00065     void showPreferencesWin();
00066 
00067   protected:
00071     virtual void dragEnterEvent(TQDragEnterEvent *event);
00072     virtual void dropEvent(TQDropEvent *event);
00073 
00074     bool queryClose();
00075 
00076   protected:
00081     void saveProperties(KConfig *);
00082 
00088     void readProperties(KConfig *);
00089 
00090 
00091   private slots:
00092     void showTerminal();
00093     void optionsConfigureKeys();
00094     void optionsConfigureToolbars();
00095     void optionsPreferences();
00096     void newToolbarConfig();
00097 
00098     void showStatusMessage(const TQString& text);
00099     void showTransienStatusMessage(const TQString& text);
00100     void changeCaption(const TQString& text);
00101 
00102 
00103   private:
00104     void setupActions();
00105 
00106   private:
00107     MobileGui *mView;
00108 };
00109 
00110 #endif // MOBILEMAIN_H