00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
#ifndef __KATE_DIALOGS_H__
00025
#define __KATE_DIALOGS_H__
00026
00027
#include "katehighlight.h"
00028
#include "kateattribute.h"
00029
00030
#include "../interfaces/document.h"
00031
00032
#include <klistview.h>
00033
#include <kdialogbase.h>
00034
#include <kmimetype.h>
00035
00036
#include <qstringlist.h>
00037
#include <qcolor.h>
00038
#include <qintdict.h>
00039
#include <qvbox.h>
00040
#include <qtabwidget.h>
00041
00042
class KatePartPluginListItem;
00043
00044
struct syntaxContextData;
00045
00046
class KateDocument;
00047
class KateView;
00048
00049
namespace KIO
00050 {
00051
class Job;
00052
class TransferJob;
00053 }
00054
00055
class KAccel;
00056
class KColorButton;
00057
class KComboBox;
00058
class KIntNumInput;
00059
class KKeyButton;
00060
class KKeyChooser;
00061
class KMainWindow;
00062
class KPushButton;
00063
class KRegExpDialog;
00064
class KIntNumInput;
00065
class KSpellConfig;
00066
00067
class QButtonGroup;
00068
class QCheckBox;
00069
class QHBoxLayout;
00070
class QLabel;
00071
class QLineEdit;
00072
class QPushButton;
00073
class QRadioButton;
00074
class QSpinBox;
00075
class QListBoxItem;
00076
class QWidgetStack;
00077
class QVBox;
00078
class QListViewItem;
00079
class QCheckBox;
00080
00081
class KateConfigPage :
public Kate::ConfigPage
00082 {
00083 Q_OBJECT
00084
00085
public:
00086 KateConfigPage (
QWidget *parent=0,
const char *name=0 );
00087
virtual ~KateConfigPage ();
00088
00089
public:
00090
bool changed () {
return m_changed; }
00091
00092
private slots:
00093
void somethingHasChanged ();
00094
00095
private:
00096
bool m_changed;
00097 };
00098
00099
class KateSpellConfigPage :
public KateConfigPage
00100 {
00101 Q_OBJECT
00102
00103
public:
00104 KateSpellConfigPage(
QWidget* parent );
00105 ~KateSpellConfigPage() {};
00106
00107
void apply();
00108
void reset () { ; };
00109
void defaults () { ; };
00110
00111
private:
00112
KSpellConfig *cPage;
00113 };
00114
00115
class KateGotoLineDialog :
public KDialogBase
00116 {
00117 Q_OBJECT
00118
00119
public:
00120
00121 KateGotoLineDialog(
QWidget *parent,
int line,
int max);
00122
int getLine();
00123
00124
protected:
00125
00126
KIntNumInput *e1;
00127
QPushButton *btnOK;
00128 };
00129
00130
class KateIndentConfigTab :
public KateConfigPage
00131 {
00132 Q_OBJECT
00133
00134
public:
00135 KateIndentConfigTab(
QWidget *parent);
00136
00137
protected slots:
00138
void somethingToggled();
00139
void indenterSelected (
int);
00140
00141
protected:
00142
enum { numFlags = 7 };
00143
static const int flags[numFlags];
00144
QCheckBox *opt[numFlags];
00145
KIntNumInput *indentationWidth;
00146
QButtonGroup *m_tabs;
00147
KComboBox *m_indentMode;
00148
00149
public slots:
00150
void apply ();
00151
void reload ();
00152
void reset () {};
00153
void defaults () {};
00154 };
00155
00156
class KateSelectConfigTab :
public KateConfigPage
00157 {
00158 Q_OBJECT
00159
00160
public:
00161 KateSelectConfigTab(
QWidget *parent);
00162
00163
protected:
00164
QButtonGroup *m_tabs;
00165
00166
public slots:
00167
void apply ();
00168
void reload ();
00169
void reset () {};
00170
void defaults () {};
00171 };
00172
00173
class KateEditConfigTab :
public KateConfigPage
00174 {
00175 Q_OBJECT
00176
00177
public:
00178 KateEditConfigTab(
QWidget *parent);
00179
00180
protected:
00181
enum { numFlags = 7 };
00182
static const int flags[numFlags];
00183
QCheckBox *opt[numFlags];
00184
00185
KIntNumInput *e1;
00186
KIntNumInput *e2;
00187
KIntNumInput *e3;
00188
KIntNumInput *e4;
00189
KComboBox *e5;
00190
QCheckBox *e6;
00191
00192
public slots:
00193
void apply ();
00194
void reload ();
00195
void reset () {};
00196
void defaults () {};
00197 };
00198
00199
class KateViewDefaultsConfig :
public KateConfigPage
00200 {
00201 Q_OBJECT
00202
00203
public:
00204 KateViewDefaultsConfig(
QWidget *parent );
00205 ~KateViewDefaultsConfig();
00206
00207
private:
00208
QCheckBox *m_line;
00209
QCheckBox *m_folding;
00210
QCheckBox *m_collapseTopLevel;
00211
QCheckBox *m_icons;
00212
QCheckBox *m_scrollBarMarks;
00213
QCheckBox *m_dynwrap;
00214
KIntNumInput *m_dynwrapAlignLevel;
00215
QCheckBox *m_wwmarker;
00216
QLabel *m_dynwrapIndicatorsLabel;
00217
KComboBox *m_dynwrapIndicatorsCombo;
00218
QButtonGroup *m_bmSort;
00219
00220
public slots:
00221
void apply ();
00222
void reload ();
00223
void reset ();
00224
void defaults ();
00225 };
00226
00227
class KateEditKeyConfiguration:
public KateConfigPage
00228 {
00229 Q_OBJECT
00230
00231
public:
00232 KateEditKeyConfiguration(
QWidget* parent, KateDocument* doc );
00233
00234
public slots:
00235
void apply();
00236
void reload() {};
00237
void reset() {};
00238
void defaults() {};
00239
00240
protected:
00241
void showEvent (
QShowEvent * );
00242
00243
private:
00244
bool m_ready;
00245
class KateDocument *m_doc;
00246
KKeyChooser* m_keyChooser;
00247
class KActionCollection *m_ac;
00248 };
00249
00250
class KateSaveConfigTab :
public KateConfigPage
00251 {
00252 Q_OBJECT
00253
public:
00254 KateSaveConfigTab(
QWidget *parent );
00255
00256
public slots:
00257
void apply();
00258
void reload();
00259
void reset();
00260
void defaults();
00261
00262
private slots:
00263
void blockCountChanged (
int value);
00264
00265
protected:
00266
KComboBox *m_encoding, *m_eol;
00267
QCheckBox *cbLocalFiles, *cbRemoteFiles;
00268
QCheckBox *replaceTabs, *removeSpaces;
00269
QLineEdit *leBuPrefix;
00270
QLineEdit *leBuSuffix;
00271
class QSlider *blockCount;
00272
class QLabel *blockCountLabel;
00273 };
00274
00275
class KatePartPluginListItem;
00276
00277
class KatePartPluginListView :
public KListView
00278 {
00279 Q_OBJECT
00280
00281
friend class KatePartPluginListItem;
00282
00283
public:
00284 KatePartPluginListView (
QWidget *parent = 0,
const char *name = 0);
00285
00286 signals:
00287
void stateChange(KatePartPluginListItem *,
bool);
00288
00289
private:
00290
void stateChanged(KatePartPluginListItem *,
bool);
00291 };
00292
00293
class QListViewItem;
00294
class KatePartPluginConfigPage :
public KateConfigPage
00295 {
00296 Q_OBJECT
00297
00298
public:
00299 KatePartPluginConfigPage (
QWidget *parent);
00300 ~KatePartPluginConfigPage ();
00301
00302
public slots:
00303
void apply ();
00304
void reload () {};
00305
void reset () {};
00306
void defaults () {};
00307
00308
private slots:
00309
void slotCurrentChanged(
QListViewItem * );
00310
void slotConfigure();
00311
void slotStateChanged( KatePartPluginListItem *,
bool );
00312
00313
private:
00314 KatePartPluginListView *listView;
00315
QPtrList<KatePartPluginListItem> m_items;
00316
class QPushButton *btnConfigure;
00317 };
00318
00319
class KateHlConfigPage :
public KateConfigPage
00320 {
00321 Q_OBJECT
00322
00323
public:
00324 KateHlConfigPage (
QWidget *parent);
00325 ~KateHlConfigPage ();
00326
00327
public slots:
00328
void apply ();
00329
void reload ();
00330
void reset () {};
00331
void defaults () {};
00332
00333
protected slots:
00334
void hlChanged(
int);
00335
void hlDownload();
00336
void showMTDlg();
00337
00338
private:
00339
void writeback ();
00340
00341
QComboBox *hlCombo;
00342
QLineEdit *wildcards;
00343
QLineEdit *mimetypes;
00344
class KIntNumInput *priority;
00345
class QLabel *author, *license;
00346
00347
QIntDict<KateHlData> hlDataDict;
00348 KateHlData *hlData;
00349 };
00350
00351
class KateHlDownloadDialog:
public KDialogBase
00352 {
00353 Q_OBJECT
00354
00355
public:
00356 KateHlDownloadDialog(
QWidget *parent,
const char *name,
bool modal);
00357 ~KateHlDownloadDialog();
00358
00359
private:
00360
class QListView *list;
00361
class QString listData;
00362
KIO::TransferJob *transferJob;
00363
00364
private slots:
00365
void listDataReceived(
KIO::Job *,
const QByteArray &data);
00366
00367
public slots:
00368
void slotUser1();
00369 };
00370
00371
#endif