kandy

kandy.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 KANDY_H
25#define KANDY_H
26
27#ifdef HAVE_CONFIG_H
28#include <config.h>
29#endif
30
31#include <tdeapplication.h>
32#include <tdemainwindow.h>
33
34#include "kandyview.h"
35
36class TQPrinter;
37
39
48class Kandy : public TDEMainWindow
49{
50 TQ_OBJECT
51
52 public:
56 Kandy(CommandScheduler *);
57
61 virtual ~Kandy();
62
66 void load(const TQString& url);
67 void save(const TQString& url);
68
69 public slots:
70 void setTitle();
71
72 void modemConnect();
73
74 void showErrorMessage( const TQString & );
75
76 signals:
77 void showMobileWin();
78 void connectStateChanged(bool);
79
80 protected:
84 virtual void dragEnterEvent(TQDragEnterEvent *event);
85 virtual void dropEvent(TQDropEvent *event);
86
87 bool queryClose();
88
89 protected:
94 void saveProperties(TDEConfig *);
95
101 void readProperties(TDEConfig *);
102
103
104 private slots:
105 void fileOpen();
106 void fileSave();
107 void fileSaveAs();
108 void filePrint();
109 void optionsConfigureKeys();
110 void optionsConfigureToolbars();
111 void optionsPreferences();
112 void modemDisconnect();
113 void showMobileGui();
114 void newToolbarConfig();
115
116 void changeStatusbar(const TQString& text);
117 void changeCaption(const TQString& text);
118
119
120 private:
121 void setupAccel();
122 void setupActions();
123
124 private:
125 CommandScheduler *mScheduler;
126
127 KandyView *mView;
128
129 TQPrinter *mPrinter;
130
131 TDEAction *mConnectAction;
132 TDEAction *mDisconnectAction;
133
134 TQString mFilename;
135
136 KandyPrefsDialog *mPreferencesDialog;
137};
138
139#endif // KANDY_H
Dialog to change the kandy configuration.
This is the main view class for Kandy.
Definition: kandyview.h:52
This class serves as the main window for Kandy.
Definition: kandy.h:49
virtual ~Kandy()
Default Destructor.
Definition: kandy.cpp:98
void saveProperties(TDEConfig *)
This function is called when it is time for the app to save its properties for session management pur...
Definition: kandy.cpp:151
void load(const TQString &url)
Use this method to load whatever file/URL you have.
Definition: kandy.cpp:102
Kandy(CommandScheduler *)
Default Constructor.
Definition: kandy.cpp:60
void readProperties(TDEConfig *)
This function is called when this app is restored.
Definition: kandy.cpp:158
virtual void dragEnterEvent(TQDragEnterEvent *event)
Overridden virtuals for TQt drag 'n drop (XDND)
Definition: kandy.cpp:166