kandy

kandyview.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 KANDYVIEW_H
00025 #define KANDYVIEW_H
00026 
00027 #include <tqwidget.h>
00028 
00029 class TQPainter;
00030 class TQTextStream;
00031 class TQDataStream;
00032 class TQDomDocument;
00033 class TQDomElement;
00034 class TQTextEdit;
00035 class TQListView;
00036 
00037 class KURL;
00038 
00039 class Modem;
00040 class ATCommand;
00041 class MobileGui;
00042 class CommandScheduler;
00043 class CmdPropertiesDialog;
00044 
00051 class KandyView : public TQWidget
00052 {
00053     Q_OBJECT
00054   
00055   public:
00059     KandyView(CommandScheduler *,TQWidget *parent);
00060 
00064     virtual ~KandyView();
00065 
00070     void importPhonebook();
00071 
00075     void print(TQPainter *, int height, int width);
00076 
00077     bool loadFile(const TQString& filename);
00078     bool saveFile(const TQString& filename);
00079 
00080     void setModified(bool modified=true);
00081     bool isModified();
00082 
00083   public slots:
00084     void addCommand();
00085     void executeCommand();
00086     void deleteCommand();
00087     void editCommand();
00088 
00089   signals:
00093     void signalChangeStatusbar(const TQString& text);
00094 
00098     void signalChangeCaption(const TQString& text);
00099 
00100     void modifiedChanged(bool);
00101 
00102   protected slots:
00103     void appendOutput(const char *line);
00104 
00105     void setResult(ATCommand *);
00106 
00107   private slots:
00108     void slotSetTitle(const TQString& title);
00109     void processLastLine();
00110 
00111   private:
00112     TQString mLastInput;
00113 
00114     CommandScheduler *mScheduler;
00115 
00116     bool mModified;
00117 
00118     TQListView *mCommandList;
00119 
00120     TQTextEdit *mInput;
00121     TQTextEdit *mOutput;
00122     TQTextEdit *mResultView;
00123 };
00124 
00125 #endif // KANDYVIEW_H