kandy

kandyview.h
1 /*
2  This file is part of Kandy.
3 
4  Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 
20  As a special exception, permission is given to link this program
21  with any edition of TQt, and distribute the resulting executable,
22  without including the source code for TQt in the source distribution.
23 */
24 #ifndef KANDYVIEW_H
25 #define KANDYVIEW_H
26 
27 #include <tqwidget.h>
28 
29 class TQPainter;
30 class TQTextStream;
31 class TQDataStream;
32 class TQDomDocument;
33 class TQDomElement;
34 class TQTextEdit;
35 class TQListView;
36 
37 class KURL;
38 
39 class Modem;
40 class ATCommand;
41 class MobileGui;
42 class CommandScheduler;
43 class CmdPropertiesDialog;
44 
51 class KandyView : public TQWidget
52 {
53  TQ_OBJECT
54 
55  public:
59  KandyView(CommandScheduler *,TQWidget *parent);
60 
64  virtual ~KandyView();
65 
70  void importPhonebook();
71 
75  void print(TQPainter *, int height, int width);
76 
77  bool loadFile(const TQString& filename);
78  bool saveFile(const TQString& filename);
79 
80  void setModified(bool modified=true);
81  bool isModified();
82 
83  public slots:
84  void addCommand();
85  void executeCommand();
86  void deleteCommand();
87  void editCommand();
88 
89  signals:
93  void signalChangeStatusbar(const TQString& text);
94 
98  void signalChangeCaption(const TQString& text);
99 
100  void modifiedChanged(bool);
101 
102  protected slots:
103  void appendOutput(const char *line);
104 
105  void setResult(ATCommand *);
106 
107  private slots:
108  void slotSetTitle(const TQString& title);
109  void processLastLine();
110 
111  private:
112  TQString mLastInput;
113 
114  CommandScheduler *mScheduler;
115 
116  bool mModified;
117 
118  TQListView *mCommandList;
119 
120  TQTextEdit *mInput;
121  TQTextEdit *mOutput;
122  TQTextEdit *mResultView;
123 };
124 
125 #endif // KANDYVIEW_H
This class provides an abstraction of an AT command.
Definition: atcommand.h:54
This is the main view class for Kandy.
Definition: kandyview.h:52
void signalChangeStatusbar(const TQString &text)
Use this signal to change the content of the statusbar.
void signalChangeCaption(const TQString &text)
Use this signal to change the content of the caption.
void print(TQPainter *, int height, int width)
Print this view to any medium – paper or not.
Definition: kandyview.cpp:151
void importPhonebook()
Import phonebook from mobile phone and save it to Kab.
Definition: kandyview.cpp:157
virtual ~KandyView()
Destructor.
Definition: kandyview.cpp:146
KandyView(CommandScheduler *, TQWidget *parent)
Default constructor.
Definition: kandyview.cpp:60