joachim99@8
|
1 /***************************************************************************
|
joachim99@8
|
2 kreplacements.h - description
|
joachim99@8
|
3 -------------------
|
joachim99@8
|
4 begin : Sat Aug 3 2002
|
joachim99@8
|
5 copyright : (C) 2002 by Joachim Eibl
|
joachim99@8
|
6 email : joachim.eibl@gmx.de
|
joachim99@8
|
7 ***************************************************************************/
|
joachim99@8
|
8
|
joachim99@8
|
9 /***************************************************************************
|
joachim99@8
|
10 * *
|
joachim99@8
|
11 * This program is free software; you can redistribute it and/or modify *
|
joachim99@8
|
12 * it under the terms of the GNU General Public License as published by *
|
joachim99@8
|
13 * the Free Software Foundation; either version 2 of the License, or *
|
joachim99@8
|
14 * (at your option) any later version. *
|
joachim99@8
|
15 * *
|
joachim99@8
|
16 ***************************************************************************/
|
joachim99@8
|
17
|
joachim99@8
|
18 #ifndef KREPLACEMENTS_H
|
joachim99@8
|
19 #define KREPLACEMENTS_H
|
joachim99@8
|
20
|
joachim99@8
|
21 #include <qobject.h>
|
joachim99@8
|
22 #include <qtabdialog.h>
|
joachim99@8
|
23 #include <qmainwindow.h>
|
joachim99@8
|
24 #include <qaction.h>
|
joachim99@8
|
25 #include <qfiledialog.h>
|
joachim99@8
|
26 #include <qapplication.h>
|
joachim99@8
|
27 #include <qvbox.h>
|
joachim99@8
|
28 #include <qpushbutton.h>
|
joachim99@8
|
29 #include <qstatusbar.h>
|
joachim99@8
|
30 #include <qtoolbar.h>
|
joachim99@8
|
31 #include <qprogressbar.h>
|
joachim99@8
|
32 #include <qpopupmenu.h>
|
joachim99@8
|
33 #include <qstringlist.h>
|
joachim99@8
|
34
|
joachim99@8
|
35 #include <map>
|
joachim99@66
|
36 #include <list>
|
joachim99@8
|
37
|
joachim99@53
|
38 QString getTranslationDir();
|
joachim99@53
|
39
|
joachim99@8
|
40 class KMainWindow;
|
joachim99@8
|
41
|
joachim99@8
|
42 class KURL
|
joachim99@8
|
43 {
|
joachim99@8
|
44 public:
|
joachim99@8
|
45 KURL(){}
|
joachim99@8
|
46 KURL(const QString& s){ m_s = s; }
|
joachim99@8
|
47 static KURL fromPathOrURL( const QString& s ){ return KURL(s); }
|
joachim99@8
|
48 QString url() const { return m_s; }
|
joachim99@8
|
49 bool isEmpty() const { return m_s.isEmpty(); }
|
joachim99@8
|
50 QString prettyURL() const { return m_s; }
|
joachim99@8
|
51 bool isLocalFile() const { return true; }
|
joachim99@8
|
52 bool isValid() const { return true; }
|
joachim99@8
|
53 QString path() const { return m_s; }
|
joachim99@8
|
54 void setPath( const QString& s ){ m_s=s; }
|
joachim99@8
|
55 QString fileName() const { return m_s; } // not really needed
|
joachim99@8
|
56 void addPath( const QString& s ){ m_s += "/" + s; }
|
joachim99@8
|
57 private:
|
joachim99@8
|
58 QString m_s;
|
joachim99@8
|
59 };
|
joachim99@8
|
60
|
joachim99@8
|
61 class KMessageBox
|
joachim99@8
|
62 {
|
joachim99@8
|
63 public:
|
joachim99@8
|
64 static void error( QWidget* parent, const QString& text, const QString& caption=QString() );
|
joachim99@8
|
65 static int warningContinueCancel( QWidget* parent, const QString& text, const QString& caption=QString(),
|
joachim99@8
|
66 const QString& button1=QString("Continue") );
|
joachim99@8
|
67 static void sorry( QWidget* parent, const QString& text, const QString& caption=QString() );
|
joachim99@8
|
68 static void information( QWidget* parent, const QString& text, const QString& caption=QString() );
|
joachim99@8
|
69 static int warningYesNo( QWidget* parent, const QString& text, const QString& caption,
|
joachim99@8
|
70 const QString& button1, const QString& button2 );
|
joachim99@8
|
71 static int warningYesNoCancel(
|
joachim99@8
|
72 QWidget* parent, const QString& text, const QString& caption,
|
joachim99@8
|
73 const QString& button1, const QString& button2 );
|
joachim99@8
|
74
|
joachim99@8
|
75 enum {Cancel=-1, No=0, Yes=1, Continue=1};
|
joachim99@8
|
76 };
|
joachim99@8
|
77
|
joachim99@8
|
78 #define i18n(x) QObject::tr(x)
|
joachim99@8
|
79 #define I18N_NOOP(x) x
|
joachim99@8
|
80 #define RESTORE(x)
|
joachim99@8
|
81 #define _UNLOAD(x)
|
joachim99@8
|
82
|
joachim99@8
|
83 typedef QPopupMenu KPopupMenu;
|
joachim99@8
|
84
|
joachim99@8
|
85 class KDialogBase : public QTabDialog
|
joachim99@8
|
86 {
|
joachim99@8
|
87 Q_OBJECT
|
joachim99@8
|
88 public:
|
joachim99@68
|
89 KDialogBase( int, const QString& caption, int, int, QWidget* parent, const char* name,
|
joachim99@8
|
90 bool /*modal*/, bool );
|
joachim99@8
|
91 ~KDialogBase();
|
joachim99@8
|
92
|
joachim99@8
|
93 void incInitialSize ( const QSize& );
|
joachim99@8
|
94 void setHelp(const QString& helpfilename, const QString& );
|
joachim99@8
|
95 enum {IconList, Help, Default, Apply, Ok, Cancel };
|
joachim99@8
|
96
|
joachim99@8
|
97 int BarIcon(const QString& iconName, int );
|
joachim99@8
|
98
|
joachim99@8
|
99 QVBox* addVBoxPage( const QString& name, const QString& info, int );
|
joachim99@8
|
100 QFrame* addPage( const QString& name, const QString& info, int );
|
joachim99@8
|
101 int spacingHint();
|
joachim99@8
|
102
|
joachim99@8
|
103 virtual void accept();
|
joachim99@8
|
104 signals:
|
joachim99@8
|
105 void applyClicked();
|
joachim99@8
|
106
|
joachim99@8
|
107 protected slots:
|
joachim99@8
|
108 virtual void slotOk( void );
|
joachim99@8
|
109 virtual void slotApply( void );
|
joachim99@8
|
110 virtual void slotHelp( void );
|
joachim99@8
|
111 virtual void slotCancel( void );
|
joachim99@8
|
112 virtual void slotDefault( void );
|
joachim99@8
|
113 };
|
joachim99@8
|
114
|
joachim99@8
|
115 class KFileDialog : public QFileDialog
|
joachim99@8
|
116 {
|
joachim99@8
|
117 public:
|
joachim99@8
|
118 static KURL getSaveURL( const QString &startDir=QString::null,
|
joachim99@8
|
119 const QString &filter=QString::null,
|
joachim99@8
|
120 QWidget *parent=0, const QString &caption=QString::null);
|
joachim99@8
|
121 static KURL getOpenURL( const QString & startDir = QString::null,
|
joachim99@8
|
122 const QString & filter = QString::null,
|
joachim99@8
|
123 QWidget * parent = 0,
|
joachim99@8
|
124 const QString & caption = QString::null );
|
joachim99@8
|
125 static KURL getExistingURL( const QString & startDir = QString::null,
|
joachim99@8
|
126 QWidget * parent = 0,
|
joachim99@8
|
127 const QString & caption = QString::null );
|
joachim99@8
|
128 };
|
joachim99@8
|
129
|
joachim99@8
|
130 typedef QStatusBar KStatusBar;
|
joachim99@8
|
131
|
joachim99@8
|
132 class KToolBar : public QToolBar
|
joachim99@8
|
133 {
|
joachim99@8
|
134 public:
|
joachim99@8
|
135 KToolBar(QMainWindow* parent);
|
joachim99@8
|
136
|
joachim99@66
|
137 enum BarPosition {Top, Bottom, Left, Right};
|
joachim99@8
|
138 BarPosition barPos();
|
joachim99@8
|
139 void setBarPos(BarPosition);
|
joachim99@66
|
140 private:
|
joachim99@66
|
141 QMainWindow* m_pMainWindow;
|
joachim99@8
|
142 };
|
joachim99@8
|
143
|
joachim99@8
|
144 class KActionCollection
|
joachim99@8
|
145 {
|
joachim99@8
|
146 public:
|
joachim99@8
|
147 KMainWindow* m_pMainWindow;
|
joachim99@8
|
148 KActionCollection( KMainWindow* p){ m_pMainWindow=p; }
|
joachim99@8
|
149 };
|
joachim99@8
|
150
|
joachim99@8
|
151 class KKeyDialog
|
joachim99@8
|
152 {
|
joachim99@8
|
153 public:
|
joachim99@8
|
154 static void configure(void*, QWidget*){}
|
joachim99@8
|
155 static void configureKeys(KActionCollection*, const QString&){}
|
joachim99@8
|
156 static void configure(KActionCollection*, const QString&){}
|
joachim99@8
|
157 };
|
joachim99@8
|
158
|
joachim99@8
|
159 namespace KParts
|
joachim99@8
|
160 {
|
joachim99@8
|
161 class ReadWritePart;
|
joachim99@8
|
162 }
|
joachim99@8
|
163
|
joachim99@8
|
164 class KMainWindow : public QMainWindow
|
joachim99@8
|
165 {
|
joachim99@8
|
166 Q_OBJECT
|
joachim99@8
|
167 private:
|
joachim99@8
|
168 KStatusBar m_statusBar;
|
joachim99@8
|
169 KActionCollection m_actionCollection;
|
joachim99@8
|
170 protected:
|
joachim99@8
|
171 void closeEvent(QCloseEvent* e);
|
joachim99@8
|
172 virtual bool queryClose() = 0;
|
joachim99@8
|
173 virtual bool queryExit() = 0;
|
joachim99@8
|
174 bool event( QEvent* e );
|
joachim99@8
|
175 public:
|
joachim99@8
|
176 QPopupMenu* fileMenu;
|
joachim99@8
|
177 QPopupMenu* editMenu;
|
joachim99@8
|
178 QPopupMenu* directoryMenu;
|
joachim99@51
|
179 QPopupMenu* dirCurrentItemMenu;
|
joachim99@51
|
180 QPopupMenu* dirCurrentSyncItemMenu;
|
joachim99@8
|
181 QPopupMenu* movementMenu;
|
joachim99@8
|
182 QPopupMenu* mergeMenu;
|
joachim99@66
|
183 QPopupMenu* diffMenu;
|
joachim99@8
|
184 QPopupMenu* windowsMenu;
|
joachim99@8
|
185 QPopupMenu* settingsMenu;
|
joachim99@8
|
186 QPopupMenu* helpMenu;
|
joachim99@8
|
187
|
joachim99@8
|
188 KToolBar* m_pToolBar;
|
joachim99@8
|
189
|
joachim99@68
|
190 KMainWindow( QWidget* parent, const char* name );
|
joachim99@8
|
191 KToolBar* toolBar(const QString& s = QString::null);
|
joachim99@8
|
192 KActionCollection* actionCollection();
|
joachim99@8
|
193 void createGUI();
|
joachim99@8
|
194 void createGUI(KParts::ReadWritePart*){createGUI();}
|
joachim99@8
|
195
|
joachim99@8
|
196 QList<KMainWindow>* memberList;
|
joachim99@8
|
197 public slots:
|
joachim99@8
|
198 void quit();
|
joachim99@8
|
199 void slotHelp();
|
joachim99@8
|
200 void slotAbout();
|
joachim99@8
|
201 };
|
joachim99@8
|
202
|
joachim99@8
|
203 class KConfig
|
joachim99@8
|
204 {
|
joachim99@8
|
205 QString m_fileName;
|
joachim99@8
|
206 std::map<QString,QString> m_map;
|
joachim99@8
|
207 public:
|
joachim99@8
|
208 KConfig();
|
joachim99@8
|
209 ~KConfig();
|
joachim99@8
|
210
|
joachim99@8
|
211 void setGroup(const QString&);
|
joachim99@8
|
212
|
joachim99@8
|
213 void writeEntry(const QString&, const QFont& );
|
joachim99@8
|
214 void writeEntry(const QString&, const QColor& );
|
joachim99@8
|
215 void writeEntry(const QString&, const QSize& );
|
joachim99@8
|
216 void writeEntry(const QString&, const QPoint& );
|
joachim99@8
|
217 void writeEntry(const QString&, int );
|
joachim99@8
|
218 void writeEntry(const QString&, bool );
|
joachim99@8
|
219 void writeEntry(const QString&, const QStringList&, char separator );
|
joachim99@8
|
220 void writeEntry(const QString&, const QString& );
|
joachim99@8
|
221
|
joachim99@8
|
222 QFont readFontEntry(const QString&, QFont* defaultVal );
|
joachim99@8
|
223 QColor readColorEntry(const QString&, QColor* defaultVal );
|
joachim99@8
|
224 QSize readSizeEntry(const QString& );
|
joachim99@8
|
225 QPoint readPointEntry(const QString& );
|
joachim99@8
|
226 bool readBoolEntry(const QString&, bool bDefault );
|
joachim99@8
|
227 int readNumEntry(const QString&, int iDefault );
|
joachim99@8
|
228 QStringList readListEntry(const QString&, char separator );
|
joachim99@8
|
229 QString readEntry(const QString&, const QString& );
|
joachim99@8
|
230 };
|
joachim99@8
|
231
|
joachim99@8
|
232 class KAction : public QAction
|
joachim99@8
|
233 {
|
joachim99@53
|
234 Q_OBJECT
|
joachim99@8
|
235 public:
|
joachim99@68
|
236 KAction(const QString& text, const QIconSet& icon, int accel, QObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bToggle=false, bool bMenu=true);
|
joachim99@68
|
237 KAction(const QString& text, int accel, QObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bToggle=false, bool bMenu=true);
|
joachim99@68
|
238 void init(QObject* receiver, const char* slot, KActionCollection* actionCollection,
|
joachim99@68
|
239 const char* name, bool bToggle, bool bMenu);
|
joachim99@8
|
240 void setStatusText(const QString&);
|
joachim99@8
|
241 void plug(QPopupMenu*);
|
joachim99@8
|
242 };
|
joachim99@8
|
243
|
joachim99@8
|
244 class KToggleAction : public KAction
|
joachim99@8
|
245 {
|
joachim99@8
|
246 public:
|
joachim99@68
|
247 KToggleAction(const QString& text, const QIconSet& icon, int accel, QObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bMenu=true);
|
joachim99@68
|
248 KToggleAction(const QString& text, int accel, QObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bMenu=true);
|
joachim99@68
|
249 KToggleAction(const QString& text, const QIconSet& icon, int accel, KActionCollection* actionCollection, const char* name, bool bMenu=true);
|
joachim99@8
|
250 void setChecked(bool);
|
joachim99@8
|
251 bool isChecked();
|
joachim99@8
|
252 };
|
joachim99@8
|
253
|
joachim99@8
|
254
|
joachim99@8
|
255 class KStdAction
|
joachim99@8
|
256 {
|
joachim99@8
|
257 public:
|
joachim99@8
|
258 static KAction* open( QWidget* parent, const char* slot, KActionCollection* );
|
joachim99@8
|
259 static KAction* save( QWidget* parent, const char* slot, KActionCollection* );
|
joachim99@8
|
260 static KAction* saveAs( QWidget* parent, const char* slot, KActionCollection* );
|
joachim99@8
|
261 static KAction* quit( QWidget* parent, const char* slot, KActionCollection* );
|
joachim99@8
|
262 static KAction* cut( QWidget* parent, const char* slot, KActionCollection* );
|
joachim99@8
|
263 static KAction* copy( QWidget* parent, const char* slot, KActionCollection* );
|
joachim99@8
|
264 static KAction* paste( QWidget* parent, const char* slot, KActionCollection* );
|
joachim99@8
|
265 static KToggleAction* showToolbar( QWidget* parent, const char* slot, KActionCollection* );
|
joachim99@8
|
266 static KToggleAction* showStatusbar( QWidget* parent, const char* slot, KActionCollection* );
|
joachim99@8
|
267 static KAction* preferences( QWidget* parent, const char* slot, KActionCollection* );
|
joachim99@8
|
268 static KAction* about( QWidget* parent, const char* slot, KActionCollection* );
|
joachim99@8
|
269 static KAction* help( QWidget* parent, const char* slot, KActionCollection* );
|
joachim99@8
|
270 static KAction* find( QWidget* parent, const char* slot, KActionCollection* );
|
joachim99@8
|
271 static KAction* findNext( QWidget* parent, const char* slot, KActionCollection* );
|
joachim99@8
|
272 static KAction* keyBindings( QWidget* parent, const char* slot, KActionCollection* );
|
joachim99@8
|
273 };
|
joachim99@8
|
274
|
joachim99@8
|
275 class KIcon
|
joachim99@8
|
276 {
|
joachim99@8
|
277 public:
|
joachim99@8
|
278 enum {SizeMedium,Small};
|
joachim99@8
|
279 };
|
joachim99@8
|
280
|
joachim99@8
|
281 class KFontChooser : public QWidget
|
joachim99@8
|
282 {
|
joachim99@8
|
283 Q_OBJECT
|
joachim99@8
|
284 QFont m_font;
|
joachim99@8
|
285 QPushButton* m_pSelectFont;
|
joachim99@8
|
286 QLabel* m_pLabel;
|
joachim99@8
|
287 QWidget* m_pParent;
|
joachim99@8
|
288 public:
|
joachim99@8
|
289 KFontChooser( QWidget* pParent, const QString& name, bool, const QStringList&, bool, int );
|
joachim99@8
|
290 QFont font();
|
joachim99@8
|
291 void setFont( const QFont&, bool );
|
joachim99@8
|
292 private slots:
|
joachim99@8
|
293 void slotSelectFont();
|
joachim99@8
|
294 };
|
joachim99@8
|
295
|
joachim99@8
|
296 class KColorButton : public QPushButton
|
joachim99@8
|
297 {
|
joachim99@8
|
298 Q_OBJECT
|
joachim99@8
|
299 QColor m_color;
|
joachim99@8
|
300 public:
|
joachim99@8
|
301 KColorButton(QWidget* parent);
|
joachim99@8
|
302 QColor color();
|
joachim99@8
|
303 void setColor(const QColor&);
|
joachim99@8
|
304 virtual void paintEvent(QPaintEvent* e);
|
joachim99@8
|
305 public slots:
|
joachim99@8
|
306 void slotClicked();
|
joachim99@8
|
307 };
|
joachim99@8
|
308
|
joachim99@8
|
309 struct KCmdLineOptions
|
joachim99@8
|
310 {
|
joachim99@8
|
311 const char* shortName;
|
joachim99@8
|
312 const char* longName;
|
joachim99@8
|
313 int whatever;
|
joachim99@8
|
314 };
|
joachim99@8
|
315
|
joachim99@8
|
316
|
joachim99@8
|
317 class KAboutData
|
joachim99@8
|
318 {
|
joachim99@8
|
319 public:
|
joachim99@8
|
320 KAboutData( const QString& name, const QString& appName, const QString& version,
|
joachim99@8
|
321 const QString& description, int licence,
|
joachim99@8
|
322 const QString& copyright, int w, const QString& homepage, const QString& email);
|
joachim99@8
|
323 KAboutData( const QString& name, const QString& appName, const QString& version );
|
joachim99@66
|
324 void addAuthor(const char* name=0, const char* task=0, const char* email=0, const char* weblink=0);
|
joachim99@66
|
325 void addCredit(const char* name=0, const char* task=0, const char* email=0, const char* weblink=0);
|
joachim99@8
|
326 enum { License_GPL };
|
joachim99@66
|
327
|
joachim99@66
|
328 struct AboutDataEntry
|
joachim99@66
|
329 {
|
joachim99@66
|
330 AboutDataEntry(const QString& name, const QString& task, const QString& email, const QString& weblink)
|
joachim99@66
|
331 : m_name(name), m_task(task), m_email(email), m_weblink(weblink)
|
joachim99@66
|
332 {}
|
joachim99@66
|
333 QString m_name;
|
joachim99@66
|
334 QString m_task;
|
joachim99@66
|
335 QString m_email;
|
joachim99@66
|
336 QString m_weblink;
|
joachim99@66
|
337 };
|
joachim99@66
|
338
|
joachim99@66
|
339 std::list<AboutDataEntry> m_authorList;
|
joachim99@66
|
340 std::list<AboutDataEntry> m_creditList;
|
joachim99@8
|
341 };
|
joachim99@8
|
342
|
joachim99@8
|
343 typedef QValueList<QCString> QCStringList;
|
joachim99@8
|
344
|
joachim99@8
|
345 class KCmdLineArgs
|
joachim99@8
|
346 {
|
joachim99@8
|
347 public:
|
joachim99@8
|
348 static KCmdLineArgs* parsedArgs();
|
joachim99@8
|
349 static void init( int argc, char**argv, KAboutData* );
|
joachim99@8
|
350 static void addCmdLineOptions( KCmdLineOptions* options ); // Add our own options.
|
joachim99@8
|
351
|
joachim99@8
|
352 int count();
|
joachim99@8
|
353 QString arg(int);
|
joachim99@51
|
354 KURL url(int i){ return KURL(arg(i)); }
|
joachim99@8
|
355 void clear();
|
joachim99@8
|
356 QString getOption(const QString&);
|
joachim99@8
|
357 QCStringList getOptionList( const QString& );
|
joachim99@8
|
358 bool isSet(const QString&);
|
joachim99@8
|
359 };
|
joachim99@8
|
360
|
joachim99@8
|
361 class KIconLoader
|
joachim99@8
|
362 {
|
joachim99@8
|
363 public:
|
joachim99@8
|
364 QPixmap loadIcon(const QString& name, int);
|
joachim99@8
|
365 };
|
joachim99@8
|
366
|
joachim99@8
|
367 class KApplication : public QApplication
|
joachim99@8
|
368 {
|
joachim99@8
|
369 KConfig m_config;
|
joachim99@8
|
370 KIconLoader m_iconLoader;
|
joachim99@8
|
371 public:
|
joachim99@8
|
372 KApplication();
|
joachim99@8
|
373 static KApplication* kApplication();
|
joachim99@8
|
374 KIconLoader* iconLoader();
|
joachim99@8
|
375 KConfig* config();
|
joachim99@8
|
376 bool isRestored();
|
joachim99@8
|
377 };
|
joachim99@8
|
378
|
joachim99@8
|
379 extern KApplication* kapp;
|
joachim99@8
|
380
|
joachim99@8
|
381 class KLibFactory : public QObject
|
joachim99@8
|
382 {
|
joachim99@8
|
383 Q_OBJECT
|
joachim99@8
|
384 public:
|
joachim99@8
|
385 QObject* create(QObject*,const QString&,const QString&);
|
joachim99@8
|
386 };
|
joachim99@8
|
387
|
joachim99@8
|
388 class KLibLoader
|
joachim99@8
|
389 {
|
joachim99@8
|
390 public:
|
joachim99@8
|
391 static KLibLoader* self();
|
joachim99@8
|
392 KLibFactory* factory(const QString&);
|
joachim99@8
|
393 };
|
joachim99@8
|
394
|
joachim99@8
|
395 class KEditToolbar : public QDialog
|
joachim99@8
|
396 {
|
joachim99@8
|
397 public:
|
joachim99@8
|
398 KEditToolbar( int ){}
|
joachim99@8
|
399 };
|
joachim99@8
|
400
|
joachim99@8
|
401 class KGlobal
|
joachim99@8
|
402 {
|
joachim99@8
|
403 public:
|
joachim99@8
|
404 static KConfig* config() { return 0; }
|
joachim99@8
|
405 };
|
joachim99@8
|
406
|
joachim99@8
|
407 namespace KIO
|
joachim99@8
|
408 {
|
joachim99@8
|
409 enum UDSEntry {};
|
joachim99@8
|
410 typedef QValueList<UDSEntry> UDSEntryList;
|
joachim99@8
|
411 class Job : public QObject
|
joachim99@8
|
412 {
|
joachim99@8
|
413 public:
|
joachim99@51
|
414 void kill(bool){}
|
joachim99@8
|
415 bool error() {return false;}
|
joachim99@8
|
416 void showErrorDialog( QWidget* ) {}
|
joachim99@8
|
417 };
|
joachim99@8
|
418 class SimpleJob : public Job {};
|
joachim99@8
|
419 SimpleJob* mkdir( KURL );
|
joachim99@8
|
420 SimpleJob* rmdir( KURL );
|
joachim99@8
|
421 SimpleJob* file_delete( KURL, bool );
|
joachim99@8
|
422 class FileCopyJob : public Job {};
|
joachim99@8
|
423 FileCopyJob* file_move( KURL, KURL, int, bool, bool, bool );
|
joachim99@8
|
424 FileCopyJob* file_copy( KURL, KURL, int, bool, bool, bool );
|
joachim99@8
|
425 class CopyJob : public Job {};
|
joachim99@8
|
426 CopyJob* link( KURL, KURL, bool );
|
joachim99@8
|
427 class ListJob : public Job {};
|
joachim99@8
|
428 ListJob* listRecursive( KURL, bool, bool );
|
joachim99@8
|
429 ListJob* listDir( KURL, bool, bool );
|
joachim99@8
|
430 class StatJob : public Job {
|
joachim99@8
|
431 public: UDSEntry statResult(){ return (UDSEntry)0; }
|
joachim99@8
|
432 };
|
joachim99@8
|
433 StatJob* stat( KURL, bool, int, bool );
|
joachim99@8
|
434 class TransferJob : public Job {};
|
joachim99@8
|
435 TransferJob* get( KURL, bool, bool );
|
joachim99@8
|
436 TransferJob* put( KURL, int, bool, bool, bool );
|
joachim99@8
|
437 };
|
joachim99@8
|
438
|
joachim99@8
|
439 typedef QProgressBar KProgress;
|
joachim99@8
|
440
|
joachim99@8
|
441 class KInstance : public QObject
|
joachim99@8
|
442 {
|
joachim99@8
|
443 public:
|
joachim99@8
|
444 KInstance(KAboutData*){}
|
joachim99@8
|
445 };
|
joachim99@8
|
446
|
joachim99@8
|
447 namespace KParts
|
joachim99@8
|
448 {
|
joachim99@8
|
449 class MainWindow : public KMainWindow
|
joachim99@8
|
450 {
|
joachim99@8
|
451 public:
|
joachim99@68
|
452 MainWindow( QWidget* parent, const char* name ) : KMainWindow(parent,name) {}
|
joachim99@8
|
453 void setXMLFile(const QString&){}
|
joachim99@8
|
454 void setAutoSaveSettings(){}
|
joachim99@8
|
455 void saveMainWindowSettings(KConfig*){}
|
joachim99@8
|
456 void applyMainWindowSettings(KConfig*){}
|
joachim99@8
|
457 int factory(){return 0;}
|
joachim99@8
|
458 };
|
joachim99@8
|
459
|
joachim99@8
|
460 class Part : public QObject
|
joachim99@8
|
461 {
|
joachim99@8
|
462 public:
|
joachim99@8
|
463 KActionCollection* actionCollection();
|
joachim99@8
|
464 KApplication* instance();
|
joachim99@8
|
465 void setWidget( QWidget* w ){ m_pWidget=w; }
|
joachim99@8
|
466 QWidget* widget(){return m_pWidget;}
|
joachim99@8
|
467 void setXMLFile(const QString&){}
|
joachim99@8
|
468 private:
|
joachim99@8
|
469 QWidget* m_pWidget;
|
joachim99@8
|
470 };
|
joachim99@8
|
471
|
joachim99@8
|
472 class ReadOnlyPart : public Part
|
joachim99@8
|
473 {
|
joachim99@8
|
474 public:
|
joachim99@8
|
475 ReadOnlyPart(){}
|
joachim99@8
|
476 ReadOnlyPart(QObject*,const QCString&){}
|
joachim99@8
|
477 void setInstance( KInstance* ){}
|
joachim99@8
|
478 QString m_file;
|
joachim99@8
|
479 };
|
joachim99@8
|
480
|
joachim99@8
|
481 class ReadWritePart : public ReadOnlyPart
|
joachim99@8
|
482 {
|
joachim99@8
|
483 public:
|
joachim99@8
|
484 ReadWritePart(QObject*,const QCString&){}
|
joachim99@8
|
485 void setReadWrite(bool){}
|
joachim99@8
|
486 };
|
joachim99@8
|
487
|
joachim99@8
|
488 class Factory : public KLibFactory
|
joachim99@8
|
489 {
|
joachim99@8
|
490 Q_OBJECT
|
joachim99@8
|
491 public:
|
joachim99@8
|
492 virtual KParts::Part* createPartObject( QWidget *parentWidget, const char *widgetName,
|
joachim99@8
|
493 QObject *parent, const char *name,
|
joachim99@8
|
494 const char *classname, const QStringList &args )=0;
|
joachim99@8
|
495 };
|
joachim99@8
|
496 };
|
joachim99@8
|
497 #endif
|
joachim99@8
|
498
|
joachim99@8
|
499
|