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

parley

  • sources
  • kde-4.14
  • 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/sessionmanagercontinuous.h"
33 #include "practice/sessionmanagerfixed.h"
34 
35 #include <QPointer>
36 
37 
38 class KRecentFilesAction;
39 
40 
41 class ParleyMainWindow : public KXmlGuiWindow
42 {
43  Q_OBJECT
44 
45 public:
46  static ParleyMainWindow * instance();
47 
48  ~ParleyMainWindow();
49 
51  enum Component {
52  NoComponent,
53  DashboardComponent,
54  EditorComponent,
55  ConfigurePracticeComponent,
56  PracticeComponent,
57  PracticeSummary
58  };
59 
63  void initActions();
64 
66  void addRecentFile(const KUrl &url, const QString &name);
67 
69  void saveOptions();
70 
72  void updateTableFilter();
73 
75  void updateRecentFilesModel();
76 
81  ParleyDocument* parleyDocument();
82 
83  Component currentComponent();
84 
85 public slots:
87  void documentUpdated(KEduVocDocument *doc);
88 
90  void slotFileNew();
91 
93  void slotUpdateWindowCaption();
94 
96  bool queryClose();
97 
99  void removeRecentFile(const KUrl &url);
100 
101  QSize sizeHint() const;
102 
104  void slotGeneralOptions();
105  void slotApplyPreferences();
106 
107  void slotCloseDocument();
108 
109  void configurePractice();
110 
111  void startPractice();
112  void showPracticeSummary();
113  void practiceFinished();
114 
115 
119  void tipOfDay();
120 
124  void startupTipOfDay();
125 
126  void showDashboard();
127  void showEditor();
128  void showPractice();
129  void showPracticeConfiguration();
130 
131  void switchComponent(Component component);
132 
136  void showDocumentActions(bool open, bool edit);
137 
138  void setVisibleToolbar(const QString& name);
139 
140 signals:
141  void recentFilesChanged();
142  void preferencesChanged();
143 
144 private:
145  ParleyMainWindow(const KUrl &filename = KUrl());
146  static ParleyMainWindow *s_instance;
147 
148  Component m_currentComponent;
149  KXmlGuiWindow *m_currentComponentWindow;
150 
151  KRecentFilesAction *m_recentFilesAction;
152 
154  ParleyDocument *m_document;
155 
156  Component m_componentBeforePractice;
157 
158 
159  //Practice::SessionManagerContinuous m_sessionManager;
160  Practice::SessionManagerFixed m_sessionManager;
161 
162  friend int main(int argc, char* argv[]);
163 };
164 
165 #endif // PARLEYMAINWINDOW_H
ParleyMainWindow::saveOptions
void saveOptions()
save the app-specific options on slotAppExit or by an Options dialog
Definition: parleymainwindow.cpp:146
ParleyMainWindow::currentComponent
Component currentComponent()
Definition: parleymainwindow.cpp:418
ParleyMainWindow::removeRecentFile
void removeRecentFile(const KUrl &url)
remove an entry from the list of recent files
Definition: parleymainwindow.cpp:124
ParleyMainWindow::showPractice
void showPractice()
Definition: parleymainwindow.cpp:277
ParleyMainWindow::showEditor
void showEditor()
Definition: parleymainwindow.cpp:267
ParleyMainWindow::queryClose
bool queryClose()
When quitting, ask for confirmation if the doc has not been saved.
Definition: parleymainwindow.cpp:209
sessionmanagerfixed.h
ParleyMainWindow
Definition: parleymainwindow.h:41
ParleyMainWindow::practiceFinished
void practiceFinished()
Definition: parleymainwindow.cpp:204
ParleyMainWindow::DashboardComponent
Definition: parleymainwindow.h:53
ParleyMainWindow::PracticeSummary
Definition: parleymainwindow.h:57
ParleyMainWindow::setVisibleToolbar
void setVisibleToolbar(const QString &name)
Definition: parleymainwindow.cpp:402
ParleyMainWindow::showDocumentActions
void showDocumentActions(bool open, bool edit)
Shows or hides actions that are only relevant when a document is opened.
Definition: parleymainwindow.cpp:384
sessionmanagercontinuous.h
ParleyMainWindow::showPracticeSummary
void showPracticeSummary()
Definition: parleymainwindow.cpp:282
ParleyMainWindow::switchComponent
void switchComponent(Component component)
Definition: parleymainwindow.cpp:287
ParleyMainWindow::EditorComponent
Definition: parleymainwindow.h:54
parleydocument.h
ParleyMainWindow::slotApplyPreferences
void slotApplyPreferences()
Definition: parleymainwindow.cpp:172
ParleyDocument
Definition: parleydocument.h:29
KXmlGuiWindow
ParleyMainWindow::instance
static ParleyMainWindow * instance()
Definition: parleymainwindow.cpp:55
ParleyMainWindow::documentUpdated
void documentUpdated(KEduVocDocument *doc)
Updates connections when the ParleyDocument pointer is changed to doc.
Definition: parleymainwindow.cpp:130
ParleyMainWindow::preferencesChanged
void preferencesChanged()
ParleyMainWindow::showPracticeConfiguration
void showPracticeConfiguration()
Definition: parleymainwindow.cpp:272
ParleyMainWindow::ConfigurePracticeComponent
Definition: parleymainwindow.h:55
QString
ParleyMainWindow::sizeHint
QSize sizeHint() const
Definition: parleymainwindow.cpp:214
ParleyMainWindow::showDashboard
void showDashboard()
Definition: parleymainwindow.cpp:262
ParleyMainWindow::slotGeneralOptions
void slotGeneralOptions()
set up options
Definition: parleymainwindow.cpp:165
ParleyMainWindow::startupTipOfDay
void startupTipOfDay()
Show the tip of the day - the startup version that can be disabled.
Definition: parleymainwindow.cpp:224
QSize
ParleyMainWindow::NoComponent
Definition: parleymainwindow.h:52
ParleyMainWindow::Component
Component
enum for the different components that can be displayed
Definition: parleymainwindow.h:51
ParleyMainWindow::slotCloseDocument
void slotCloseDocument()
Definition: parleymainwindow.cpp:177
ParleyMainWindow::PracticeComponent
Definition: parleymainwindow.h:56
ParleyMainWindow::updateRecentFilesModel
void updateRecentFilesModel()
update the list of recent files in the dashboard
Definition: parleymainwindow.cpp:141
ParleyMainWindow::initActions
void initActions()
setup the action (menus etc)
Definition: parleymainwindow.cpp:235
ParleyMainWindow::addRecentFile
void addRecentFile(const KUrl &url, const QString &name)
add a new entry to the list of recent files
Definition: parleymainwindow.cpp:118
ParleyMainWindow::recentFilesChanged
void recentFilesChanged()
ParleyMainWindow::~ParleyMainWindow
~ParleyMainWindow()
Definition: parleymainwindow.cpp:110
ParleyMainWindow::tipOfDay
void tipOfDay()
Show the tip of the day (force it to be shown)
Definition: parleymainwindow.cpp:219
ParleyMainWindow::configurePractice
void configurePractice()
Definition: parleymainwindow.cpp:186
ParleyMainWindow::parleyDocument
ParleyDocument * parleyDocument()
Return the ParleyDocument member object.
Definition: parleymainwindow.cpp:413
Practice::SessionManagerFixed
This class handles a session of a fixed size.
Definition: sessionmanagerfixed.h:33
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:192
ParleyMainWindow::main
friend int main(int argc, char *argv[])
Definition: src/main.cpp:33
ParleyMainWindow::slotUpdateWindowCaption
void slotUpdateWindowCaption()
Update the title bar of the main window with the current document.
Definition: parleymainwindow.cpp:151
ParleyMainWindow::slotFileNew
void slotFileNew()
Opens a dialog for a new collection.
Definition: parleymainwindow.cpp:229
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:56 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
  • 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