KTextEditor
editorchooser.h
Go to the documentation of this file.
00001 /* This file is part of the KDE libraries 00002 * Copyright (C) 2005 Joseph Wenninger <jowenn@kde.org> 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Library General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Library General Public License 00015 * along with this library; see the file COPYING.LIB. If not, write to 00016 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 * Boston, MA 02110-1301, USA. 00018 */ 00019 #ifndef _EDITOR_CHOOSER_H_ 00020 #define _EDITOR_CHOOSER_H_ 00021 00022 #include <ktexteditor/ktexteditor_export.h> 00023 #include <ktexteditor/document.h> 00024 #include <ktexteditor/editor.h> 00025 00026 #include <QtGui/QWidget> 00027 00028 class KConfig; 00029 class QString; 00030 00031 namespace KTextEditor 00032 { 00033 00088 class KTEXTEDITOR_EXPORT EditorChooser: public QWidget 00089 { 00090 friend class PrivateEditorChooser; 00091 00092 Q_OBJECT 00093 00094 public: 00101 EditorChooser(QWidget *parent=0); 00105 virtual ~EditorChooser(); 00106 00107 /* void writeSysDefault();*/ 00108 00116 void readAppSetting(const QString& postfix=QString()); 00122 void writeAppSetting(const QString& postfix=QString()); 00123 00137 static KTextEditor::Editor *editor (const QString& postfix=QString(), bool fallBackToKatePart = true); 00138 00139 Q_SIGNALS: 00144 void changed(); 00145 private: 00146 class PrivateEditorChooser *d; 00147 }; 00148 00149 /* 00150 class EditorChooserBackEnd: public ComponentChooserPlugin { 00151 00152 Q_OBJECT 00153 public: 00154 EditorChooserBackEnd(QObject *parent=0, const char *name=0); 00155 virtual ~EditorChooserBackEnd(); 00156 00157 virtual QWidget *widget(QWidget *); 00158 virtual const QStringList &choices(); 00159 virtual void saveSettings(); 00160 00161 void readAppSetting(KConfig *cfg,const QString& postfix); 00162 void writeAppSetting(KConfig *cfg,const QString& postfix); 00163 00164 public Q_SLOTS: 00165 virtual void madeChoice(int pos,const QString &choice); 00166 00167 }; 00168 */ 00169 00170 } 00171 #endif 00172 00173 // kate: space-indent on; indent-width 2; replace-tabs on;
KDE 4.6 API Reference