parley
editor.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 Copyright 1999-2001 Ewald Arnold <kvoctrain@ewald-arnold.de> 00003 Copyright 2004-2007 Peter Hedlund <peter.hedlund@kdemail.net> 00004 Copyright 2007-2009 Frederik Gladhorn <gladhorn@kde.org> 00005 Copyright 2008 Daniel Laidig <d.laidig@gmx.de> 00006 ***************************************************************************/ 00007 00008 /*************************************************************************** 00009 * * 00010 * This program is free software; you can redistribute it and/or modify * 00011 * it under the terms of the GNU General Public License as published by * 00012 * the Free Software Foundation; either version 2 of the License, or * 00013 * (at your option) any later version. * 00014 * * 00015 ***************************************************************************/ 00016 00017 #ifndef EDITOR_H 00018 #define EDITOR_H 00019 00020 #include "parleydocument.h" 00021 00022 #include "scripts/scripting/parley.h" 00023 00024 #include <KXmlGuiWindow> 00025 00026 class KLineEdit; 00027 class KActionMenu; 00028 class VocabularyView; 00029 class VocabularyModel; 00030 class VocabularyFilter; 00031 class LessonView; 00032 class WordTypeView; 00033 class LeitnerView; 00034 class LessonModel; 00035 class WordTypeModel; 00036 class LeitnerModel; 00037 class ConjugationWidget; 00038 class SummaryWordWidget; 00039 class ScriptManager; 00040 00041 class Editor : public KXmlGuiWindow 00042 { 00043 Q_OBJECT 00044 00045 public: 00046 Editor(ParleyMainWindow* parent); 00047 ~Editor(); 00048 00052 void initActions(); 00053 00055 void initModel(); 00056 00058 void initView(); 00059 00060 void initDockWidgets(); 00061 00063 void updateTableFilter(); 00064 00068 void initScripts(); 00069 00071 void saveState(); 00072 00073 public slots: 00079 void slotLanguageProperties(); 00080 00082 void slotDocumentProperties(); 00083 00084 void slotConfigShowSearch(); 00085 00089 void slotShowScriptManager(); 00090 00091 void setTableFont(const QFont& font); 00092 00096 void removeGrades(); 00097 00098 private slots: 00102 void updateDocument(); 00103 00104 signals: 00105 void signalSetData( const QList<int>& entries, int currentTranslation); 00106 00107 private: 00108 ParleyMainWindow* m_mainWindow; 00109 00110 KAction* m_vocabShowSearchBarAction; 00111 00112 VocabularyModel *m_vocabularyModel; 00113 VocabularyView *m_vocabularyView; 00114 VocabularyFilter *m_vocabularyFilter; 00115 00116 KLineEdit *m_searchLine; 00117 QWidget *m_searchWidget; 00118 00120 ConjugationWidget *m_conjugationWidget; 00121 SummaryWordWidget *m_summaryWordWidget; 00122 00124 LessonView *m_lessonView; 00125 LessonModel *m_lessonModel; 00126 00127 WordTypeView *m_wordTypeView; 00128 WordTypeModel *m_wordTypeModel; 00129 00130 LeitnerView *m_leitnerView; 00131 LeitnerModel *m_leitnerModel; 00132 00133 friend class ParleyDocument; 00134 friend class Scripting::Parley; 00135 friend class ScriptManager; 00136 00137 ScriptManager* m_scriptManager; 00138 00140 Translator* m_translator; 00141 00142 QList<QDockWidget*> m_dockWidgets; 00143 QList<bool> m_dockWidgetVisibility; 00144 }; 00145 00146 #endif // EDITOR_H 00147
KDE 4.4 API Reference