Kate
katedialogs.h
Go to the documentation of this file.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
00066 class QButtonGroup;
00067 class QCheckBox;
00068 class QHBoxLayout;
00069 class QLabel;
00070 class QLineEdit;
00071 class QPushButton;
00072 class QRadioButton;
00073 class QSpinBox;
00074 class QListBoxItem;
00075 class QWidgetStack;
00076 class QVBox;
00077 class QListViewItem;
00078 class QCheckBox;
00079
00080 class KateConfigPage : public Kate::ConfigPage
00081 {
00082 Q_OBJECT
00083
00084 public:
00085 KateConfigPage ( QWidget *parent=0, const char *name=0 );
00086 virtual ~KateConfigPage ();
00087
00088 public:
00089 bool changed () { return m_changed; }
00090
00091 private slots:
00092 void somethingHasChanged ();
00093
00094 protected:
00095 bool m_changed;
00096 };
00097
00098 class KateGotoLineDialog : public KDialogBase
00099 {
00100 Q_OBJECT
00101
00102 public:
00103
00104 KateGotoLineDialog(QWidget *parent, int line, int max);
00105 int getLine();
00106
00107 protected:
00108
00109 KIntNumInput *e1;
00110 QPushButton *btnOK;
00111 };
00112
00113 class KateIndentConfigTab : public KateConfigPage
00114 {
00115 Q_OBJECT
00116
00117 public:
00118 KateIndentConfigTab(QWidget *parent);
00119
00120 protected slots:
00121 void somethingToggled();
00122 void indenterSelected (int);
00123
00124 protected:
00125 enum { numFlags = 8 };
00126 static const int flags[numFlags];
00127 QCheckBox *opt[numFlags];
00128 KIntNumInput *indentationWidth;
00129 QButtonGroup *m_tabs;
00130 KComboBox *m_indentMode;
00131 QPushButton *m_configPage;
00132
00133 public slots:
00134 void configPage();
00135
00136 void apply ();
00137 void reload ();
00138 void reset () {};
00139 void defaults () {};
00140 };
00141
00142 class KateSelectConfigTab : public KateConfigPage
00143 {
00144 Q_OBJECT
00145
00146 public:
00147 KateSelectConfigTab(QWidget *parent);
00148
00149 protected:
00150 enum { numFlags = 2 };
00151 static const int flags[numFlags];
00152 QCheckBox *opt[numFlags];
00153
00154 QButtonGroup *m_tabs;
00155 KIntNumInput *e4;
00156 QCheckBox *e6;
00157
00158 public slots:
00159 void apply ();
00160 void reload ();
00161 void reset () {};
00162 void defaults () {};
00163 };
00164
00165 class KateEditConfigTab : public KateConfigPage
00166 {
00167 Q_OBJECT
00168
00169 public:
00170 KateEditConfigTab(QWidget *parent);
00171
00172 protected:
00173 enum { numFlags = 5 };
00174 static const int flags[numFlags];
00175 QCheckBox *opt[numFlags];
00176
00177 KIntNumInput *e1;
00178 KIntNumInput *e2;
00179 KIntNumInput *e3;
00180 KComboBox *e5;
00181 QCheckBox *m_wwmarker;
00182
00183 public slots:
00184 void apply ();
00185 void reload ();
00186 void reset () {};
00187 void defaults () {};
00188 };
00189
00190 class KateViewDefaultsConfig : public KateConfigPage
00191 {
00192 Q_OBJECT
00193
00194 public:
00195 KateViewDefaultsConfig( QWidget *parent );
00196 ~KateViewDefaultsConfig();
00197
00198 private:
00199 QCheckBox *m_line;
00200 QCheckBox *m_folding;
00201 QCheckBox *m_collapseTopLevel;
00202 QCheckBox *m_icons;
00203 QCheckBox *m_scrollBarMarks;
00204 QCheckBox *m_dynwrap;
00205 QCheckBox *m_showIndentLines;
00206 KIntNumInput *m_dynwrapAlignLevel;
00207 QLabel *m_dynwrapIndicatorsLabel;
00208 KComboBox *m_dynwrapIndicatorsCombo;
00209 QButtonGroup *m_bmSort;
00210
00211 public slots:
00212 void apply ();
00213 void reload ();
00214 void reset ();
00215 void defaults ();
00216 };
00217
00218 class KateEditKeyConfiguration: public KateConfigPage
00219 {
00220 Q_OBJECT
00221
00222 public:
00223 KateEditKeyConfiguration( QWidget* parent, KateDocument* doc );
00224
00225 public slots:
00226 void apply();
00227 void reload() {};
00228 void reset() {};
00229 void defaults() {};
00230
00231 protected:
00232 void showEvent ( QShowEvent * );
00233
00234 private:
00235 bool m_ready;
00236 class KateDocument *m_doc;
00237 KKeyChooser* m_keyChooser;
00238 class KActionCollection *m_ac;
00239 };
00240
00241 class KateSaveConfigTab : public KateConfigPage
00242 {
00243 Q_OBJECT
00244 public:
00245 KateSaveConfigTab( QWidget *parent );
00246
00247 public slots:
00248 void apply();
00249 void reload();
00250 void reset();
00251 void defaults();
00252
00253 protected:
00254 KComboBox *m_encoding, *m_eol;
00255 QCheckBox *cbLocalFiles, *cbRemoteFiles;
00256 QCheckBox *replaceTabs, *removeSpaces, *allowEolDetection;
00257 QLineEdit *leBuPrefix;
00258 QLineEdit *leBuSuffix;
00259 KIntNumInput *dirSearchDepth;
00260 class QSpinBox *blockCount;
00261 class QLabel *blockCountLabel;
00262 };
00263
00264 class KatePartPluginListItem;
00265
00266 class KatePartPluginListView : public KListView
00267 {
00268 Q_OBJECT
00269
00270 friend class KatePartPluginListItem;
00271
00272 public:
00273 KatePartPluginListView (QWidget *parent = 0, const char *name = 0);
00274
00275 signals:
00276 void stateChange(KatePartPluginListItem *, bool);
00277
00278 private:
00279 void stateChanged(KatePartPluginListItem *, bool);
00280 };
00281
00282 class QListViewItem;
00283 class KatePartPluginConfigPage : public KateConfigPage
00284 {
00285 Q_OBJECT
00286
00287 public:
00288 KatePartPluginConfigPage (QWidget *parent);
00289 ~KatePartPluginConfigPage ();
00290
00291 public slots:
00292 void apply ();
00293 void reload () {};
00294 void reset () {};
00295 void defaults () {};
00296
00297 private slots:
00298 void slotCurrentChanged( QListViewItem * );
00299 void slotConfigure();
00300 void slotStateChanged( KatePartPluginListItem *, bool );
00301
00302 private:
00303 KatePartPluginListView *listView;
00304 QPtrList<KatePartPluginListItem> m_items;
00305 class QPushButton *btnConfigure;
00306 };
00307
00308 class KateHlConfigPage : public KateConfigPage
00309 {
00310 Q_OBJECT
00311
00312 public:
00313 KateHlConfigPage (QWidget *parent, KateDocument *doc);
00314 ~KateHlConfigPage ();
00315
00316 public slots:
00317 void apply ();
00318 void reload ();
00319 void reset () {};
00320 void defaults () {};
00321
00322 protected slots:
00323 void hlChanged(int);
00324 void hlDownload();
00325 void showMTDlg();
00326
00327 private:
00328 void writeback ();
00329
00330 QComboBox *hlCombo;
00331 QLineEdit *wildcards;
00332 QLineEdit *mimetypes;
00333 class KIntNumInput *priority;
00334 class QLabel *author, *license;
00335
00336 QIntDict<KateHlData> hlDataDict;
00337 KateHlData *hlData;
00338
00339 KateDocument *m_doc;
00340 };
00341
00342 class KateHlDownloadDialog: public KDialogBase
00343 {
00344 Q_OBJECT
00345
00346 public:
00347 KateHlDownloadDialog(QWidget *parent, const char *name, bool modal);
00348 ~KateHlDownloadDialog();
00349
00350 private:
00351 class QListView *list;
00352 class QString listData;
00353 KIO::TransferJob *transferJob;
00354
00355 private slots:
00356 void listDataReceived(KIO::Job *, const QByteArray &data);
00357
00358 public slots:
00359 void slotUser1();
00360 };
00361
00362 class KProcIO;
00363 class KProcess;
00370 class KateModOnHdPrompt : public KDialogBase
00371 {
00372 Q_OBJECT
00373 public:
00374 enum Status {
00375 Reload=1,
00376 Save,
00377 Overwrite,
00378 Ignore
00379 };
00380 KateModOnHdPrompt( KateDocument *doc, int modtype, const QString &reason, QWidget *parent );
00381 ~KateModOnHdPrompt();
00382
00383 public slots:
00389 void slotDiff();
00390
00391 void slotOk();
00392 void slotApply();
00393 void slotUser1();
00394
00395 private slots:
00396 void slotPRead(KProcIO*);
00397 void slotPDone(KProcess*);
00398
00399 private:
00400 KateDocument *m_doc;
00401 int m_modtype;
00402 class KTempFile *m_tmpfile;
00403
00404 };
00405
00406 #endif