• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

parley

  • sources
  • kde-4.12
  • kdeedu
  • parley
  • src
parleymainwindow.h
Go to the documentation of this file.
1 /***************************************************************************
2 
3  main part of Parley
4 
5  -----------------------------------------------------------------------
6 
7  begin : Thu Mar 11 20:50:53 MET 1999
8 
9  copyright : (C) 1999-2001 Ewald Arnold <kvoctrain@ewald-arnold.de>
10  (C) 2004-2007 Peter Hedlund <peter.hedlund@kdemail.net>
11  (C) 2007-2008 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
12  (C) 2008 Daniel Laidig <d.laidig@gmx.de>
13  -----------------------------------------------------------------------
14 
15  ***************************************************************************/
16 
17 /***************************************************************************
18  * *
19  * This program is free software; you can redistribute it and/or modify *
20  * it under the terms of the GNU General Public License as published by *
21  * the Free Software Foundation; either version 2 of the License, or *
22  * (at your option) any later version. *
23  * *
24  ***************************************************************************/
25 
26 #ifndef PARLEYMAINWINDOW_H
27 #define PARLEYMAINWINDOW_H
28 
29 #include "parleydocument.h"
30 
31 #include <KXmlGuiWindow>
32 #include "practice/testentrymanager.h"
33 
34 #include <QPointer>
35 
36 namespace Practice {
37  class GuiFrontend;
38  class DefaultBackend;
39  class PracticeSummaryComponent;
40 }
41 
42 namespace Editor {
43  class VocabularyView;
44  class VocabularyModel;
45  class VocabularyFilter;
46  class LessonView;
47  class WordTypeView;
48  class LeitnerView;
49  class LessonModel;
50  class WordTypeModel;
51  class LeitnerModel;
52  class ConjugationWidget;
53  class SummaryWordWidget;
54  class EditorWindow;
55 }
56 
57 class KRecentFilesAction;
58 class KActionMenu;
59 class KAction;
60 class QLabel;
61 class QDockWidget;
62 
63 class WelcomeScreen;
64 class StatisticsMainWindow;
65 class ScriptManager;
66 class ParleyPracticeMainWindow;
67 
68 class ParleyMainWindow : public KXmlGuiWindow
69 {
70  Q_OBJECT
71 
72 public:
73  static ParleyMainWindow * instance();
74 
75  ~ParleyMainWindow();
76 
78  enum Component {
79  NoComponent,
80  WelcomeComponent,
81  EditorComponent,
82  ConfigurePracticeComponent,
83  PracticeComponent,
84  PracticeSummary
85  };
86 
90  void initActions();
91 
93  void addRecentFile(const KUrl &url, const QString &name);
94 
96  void saveOptions();
97 
99  void updateTableFilter();
100 
102  void updateRecentFilesModel();
103 
108  ParleyDocument* parleyDocument();
109 
110  Component currentComponent();
111 
112 public slots:
114  void slotUpdateWindowCaption();
115 
117  bool queryClose();
119  bool queryExit();
120 
121  QSize sizeHint() const;
122 
124  void slotGeneralOptions();
125  void slotApplyPreferences();
126 
127  void slotCloseDocument();
128 
129  void configurePractice();
130 
131  void startPractice();
132  void showPracticeSummary();
133  void practiceFinished();
134 
135 
139  void tipOfDay();
140 
144  void startupTipOfDay();
145 
146  void showWelcomeScreen();
147  void showEditor();
148  void showPractice();
149  void showPracticeConfiguration();
150 
151  void switchComponent(Component component);
152 
156  void showDocumentActions(bool open, bool edit);
157 
158  void setVisibleToolbar(const QString& name);
159 
160 signals:
161  void recentFilesChanged();
162  void preferencesChanged();
163 
164 private:
165  ParleyMainWindow(const KUrl& filename = KUrl());
166  static ParleyMainWindow *s_instance;
167 
168  Component m_currentComponent;
169 
170  /*
171  WelcomeScreen *m_welcomeScreen;
172  Editor::EditorWindow *m_editor;
173  Practice::GuiFrontend *m_practiceFrontend;
174  Practice::DefaultBackend *m_practiceBackend;
175  StatisticsMainWindow *m_statisticsWidget;
176  Practice::PracticeSummaryComponent *m_practiceSummary;
177  */
178  KXmlGuiWindow* m_currentComponentWindow;
179 
180  KRecentFilesAction* m_recentFilesAction;
181 
183  ParleyDocument *m_document;
184 
186  QString m_appName;
187  Component m_componentBeforePractice;
188  Practice::TestEntryManager m_testEntryManager;
189 
190  friend int main(int argc, char* argv[]);
191 };
192 
193 #endif // PARLEYMAINWINDOW_H
ParleyMainWindow::saveOptions
void saveOptions()
save the app-specific options on slotAppExit or by an Options dialog
Definition: parleymainwindow.cpp:127
ParleyMainWindow::currentComponent
Component currentComponent()
Definition: parleymainwindow.cpp:417
ParleyMainWindow::showPractice
void showPractice()
Definition: parleymainwindow.cpp:276
ParleyMainWindow::showEditor
void showEditor()
Definition: parleymainwindow.cpp:266
ParleyMainWindow::queryClose
bool queryClose()
When quitting, ask for confirmation if the doc has not been saved.
Definition: parleymainwindow.cpp:183
testentrymanager.h
ParleyMainWindow
Definition: parleymainwindow.h:68
ParleyMainWindow::practiceFinished
void practiceFinished()
Definition: parleymainwindow.cpp:178
ParleyMainWindow::showWelcomeScreen
void showWelcomeScreen()
Definition: parleymainwindow.cpp:261
ParleyMainWindow::PracticeSummary
Definition: parleymainwindow.h:84
ParleyMainWindow::setVisibleToolbar
void setVisibleToolbar(const QString &name)
Definition: parleymainwindow.cpp:400
ParleyMainWindow::showDocumentActions
void showDocumentActions(bool open, bool edit)
Shows or hides actions that are only relevant when a document is opened.
Definition: parleymainwindow.cpp:382
Practice::TestEntryManager
Definition: testentrymanager.h:31
ParleyMainWindow::showPracticeSummary
void showPracticeSummary()
Definition: parleymainwindow.cpp:281
ParleyMainWindow::switchComponent
void switchComponent(Component component)
Definition: parleymainwindow.cpp:286
ParleyMainWindow::EditorComponent
Definition: parleymainwindow.h:81
parleydocument.h
ParleyMainWindow::slotApplyPreferences
void slotApplyPreferences()
Definition: parleymainwindow.cpp:153
ParleyDocument
Definition: parleydocument.h:29
KXmlGuiWindow
ParleyMainWindow::instance
static ParleyMainWindow * instance()
Definition: parleymainwindow.cpp:56
ParleyMainWindow::queryExit
bool queryExit()
overloaded for Message box on last window exit
Definition: parleymainwindow.cpp:192
ParleyMainWindow::preferencesChanged
void preferencesChanged()
ParleyMainWindow::showPracticeConfiguration
void showPracticeConfiguration()
Definition: parleymainwindow.cpp:271
ParleyMainWindow::ConfigurePracticeComponent
Definition: parleymainwindow.h:82
StatisticsMainWindow
Definition: statisticsmainwindow.h:30
ParleyMainWindow::sizeHint
QSize sizeHint() const
Definition: parleymainwindow.cpp:219
ParleyMainWindow::slotGeneralOptions
void slotGeneralOptions()
set up options
Definition: parleymainwindow.cpp:146
ParleyMainWindow::startupTipOfDay
void startupTipOfDay()
Show the tip of the day - the startup version that can be disabled.
Definition: parleymainwindow.cpp:229
ParleyMainWindow::NoComponent
Definition: parleymainwindow.h:79
ParleyMainWindow::Component
Component
enum for the different components that can be displayed
Definition: parleymainwindow.h:78
ParleyMainWindow::slotCloseDocument
void slotCloseDocument()
Definition: parleymainwindow.cpp:158
ParleyMainWindow::PracticeComponent
Definition: parleymainwindow.h:83
WelcomeScreen
Definition: welcomescreen.h:30
ParleyMainWindow::updateRecentFilesModel
void updateRecentFilesModel()
update the list of recent files in the welcome screen
Definition: parleymainwindow.cpp:122
ParleyMainWindow::initActions
void initActions()
setup the action (menus etc)
Definition: parleymainwindow.cpp:234
ParleyMainWindow::WelcomeComponent
Definition: parleymainwindow.h:80
ScriptManager
This class finds the scripts installed in the application directory and manages loading and unloading...
Definition: scriptmanager.h:30
ParleyMainWindow::addRecentFile
void addRecentFile(const KUrl &url, const QString &name)
add a new entry to the list of recent files
Definition: parleymainwindow.cpp:116
ParleyMainWindow::recentFilesChanged
void recentFilesChanged()
ParleyMainWindow::~ParleyMainWindow
~ParleyMainWindow()
Definition: parleymainwindow.cpp:108
ParleyMainWindow::tipOfDay
void tipOfDay()
Show the tip of the day (force it to be shown)
Definition: parleymainwindow.cpp:224
ParleyMainWindow::configurePractice
void configurePractice()
Definition: parleymainwindow.cpp:167
ParleyMainWindow::parleyDocument
ParleyDocument * parleyDocument()
Return the ParleyDocument member object.
Definition: parleymainwindow.cpp:412
ParleyMainWindow::updateTableFilter
void updateTableFilter()
This will look at the lesson list and also the combo box to determine what should be displayed in the...
ParleyMainWindow::startPractice
void startPractice()
Definition: parleymainwindow.cpp:173
ParleyMainWindow::main
friend int main(int argc, char *argv[])
Definition: src/main.cpp:34
ParleyMainWindow::slotUpdateWindowCaption
void slotUpdateWindowCaption()
Update the title bar of the main window with the current document.
Definition: parleymainwindow.cpp:132
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:42:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

parley

Skip menu "parley"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal