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 Qt, and distribute the resulting executable,
00022     without including the source code for Qt in the source distribution.
00023 */
00024 #ifndef KANDYVIEW_H
00025 #define KANDYVIEW_H
00026 
00027 #include <qwidget.h>
00028 
00029 class QPainter;
00030 class QTextStream;
00031 class QDataStream;
00032 class QDomDocument;
00033 class QDomElement;
00034 class QTextEdit;
00035 class QListView;
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 QWidget
00052 {
00053     Q_OBJECT
00054   public:
00058     KandyView(CommandScheduler *,QWidget *parent);
00059 
00063     virtual ~KandyView();
00064 
00069     void importPhonebook();
00070 
00074     void print(QPainter *, int height, int width);
00075 
00076     bool loadFile(const QString& filename);
00077     bool saveFile(const QString& filename);
00078 
00079     void setModified(bool modified=true);
00080     bool isModified();
00081 
00082   public slots:
00083     void addCommand();
00084     void executeCommand();
00085     void deleteCommand();
00086     void editCommand();
00087 
00088   signals:
00092     void signalChangeStatusbar(const QString& text);
00093 
00097     void signalChangeCaption(const QString& text);
00098 
00099     void modifiedChanged(bool);
00100 
00101   protected slots:
00102     void appendOutput(const char *line);
00103 
00104     void setResult(ATCommand *);
00105 
00106   private slots:
00107     void slotSetTitle(const QString& title);
00108     void processLastLine();
00109 
00110   private:
00111     QString mLastInput;
00112 
00113     CommandScheduler *mScheduler;
00114 
00115     bool mModified;
00116 
00117     QListView *mCommandList;
00118 
00119     QTextEdit *mInput;
00120     QTextEdit *mOutput;
00121     QTextEdit *mResultView;
00122 };
00123 
00124 #endif // KANDYVIEW_H
KDE Home | KDE Accessibility Home | Description of Access Keys