kate Library API Documentation

katedialogs.h

00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2002, 2003 Anders Lund <anders.lund@lund.tdcadsl.dk> 00003 Copyright (C) 2003 Christoph Cullmann <cullmann@kde.org> 00004 Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org> 00005 00006 Based on work of: 00007 Copyright (C) 1999 Jochen Wilhelmy <digisnap@cs.tu-berlin.de> 00008 00009 This library is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU Library General Public 00011 License version 2 as published by the Free Software Foundation. 00012 00013 This library is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Library General Public License for more details. 00017 00018 You should have received a copy of the GNU Library General Public License 00019 along with this library; see the file COPYING.LIB. If not, write to 00020 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00021 Boston, MA 02111-1307, USA. 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 protected: 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 protected: 00263 KComboBox *m_encoding, *m_eol; 00264 QCheckBox *cbLocalFiles, *cbRemoteFiles; 00265 QCheckBox *replaceTabs, *removeSpaces; 00266 QLineEdit *leBuPrefix; 00267 QLineEdit *leBuSuffix; 00268 KIntNumInput *dirSearchDepth; 00269 class QSpinBox *blockCount; 00270 class QLabel *blockCountLabel; 00271 }; 00272 00273 class KatePartPluginListItem; 00274 00275 class KatePartPluginListView : public KListView 00276 { 00277 Q_OBJECT 00278 00279 friend class KatePartPluginListItem; 00280 00281 public: 00282 KatePartPluginListView (QWidget *parent = 0, const char *name = 0); 00283 00284 signals: 00285 void stateChange(KatePartPluginListItem *, bool); 00286 00287 private: 00288 void stateChanged(KatePartPluginListItem *, bool); 00289 }; 00290 00291 class QListViewItem; 00292 class KatePartPluginConfigPage : public KateConfigPage 00293 { 00294 Q_OBJECT 00295 00296 public: 00297 KatePartPluginConfigPage (QWidget *parent); 00298 ~KatePartPluginConfigPage (); 00299 00300 public slots: 00301 void apply (); 00302 void reload () {}; 00303 void reset () {}; 00304 void defaults () {}; 00305 00306 private slots: 00307 void slotCurrentChanged( QListViewItem * ); 00308 void slotConfigure(); 00309 void slotStateChanged( KatePartPluginListItem *, bool ); 00310 00311 private: 00312 KatePartPluginListView *listView; 00313 QPtrList<KatePartPluginListItem> m_items; 00314 class QPushButton *btnConfigure; 00315 }; 00316 00317 class KateHlConfigPage : public KateConfigPage 00318 { 00319 Q_OBJECT 00320 00321 public: 00322 KateHlConfigPage (QWidget *parent); 00323 ~KateHlConfigPage (); 00324 00325 public slots: 00326 void apply (); 00327 void reload (); 00328 void reset () {}; 00329 void defaults () {}; 00330 00331 protected slots: 00332 void hlChanged(int); 00333 void hlDownload(); 00334 void showMTDlg(); 00335 00336 private: 00337 void writeback (); 00338 00339 QComboBox *hlCombo; 00340 QLineEdit *wildcards; 00341 QLineEdit *mimetypes; 00342 class KIntNumInput *priority; 00343 class QLabel *author, *license; 00344 00345 QIntDict<KateHlData> hlDataDict; 00346 KateHlData *hlData; 00347 }; 00348 00349 class KateHlDownloadDialog: public KDialogBase 00350 { 00351 Q_OBJECT 00352 00353 public: 00354 KateHlDownloadDialog(QWidget *parent, const char *name, bool modal); 00355 ~KateHlDownloadDialog(); 00356 00357 private: 00358 class QListView *list; 00359 class QString listData; 00360 KIO::TransferJob *transferJob; 00361 00362 private slots: 00363 void listDataReceived(KIO::Job *, const QByteArray &data); 00364 00365 public slots: 00366 void slotUser1(); 00367 }; 00368 00369 class KProcIO; 00370 class KProcess; 00377 class KateModOnHdPrompt : public KDialogBase 00378 { 00379 Q_OBJECT 00380 public: 00381 enum Status { 00382 Reload=1, // 0 is KDialogBase::Cancel 00383 Save, 00384 Overwrite, 00385 Ignore 00386 }; 00387 KateModOnHdPrompt( KateDocument *doc, int modtype, const QString &reason, QWidget *parent ); 00388 ~KateModOnHdPrompt(); 00389 00390 public slots: 00396 void slotDiff(); 00397 00398 void slotOk(); 00399 void slotApply(); 00400 void slotUser1(); 00401 00402 private slots: 00403 void slotPRead(KProcIO*); 00404 void slotPDone(KProcess*); 00405 00406 private: 00407 KateDocument *m_doc; 00408 int m_modtype; 00409 class KTempFile *m_tmpfile; 00410 00411 }; 00412 00413 #endif
KDE Logo
This file is part of the documentation for kate Library Version 3.4.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Apr 14 00:46:04 2005 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003