• 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
parleydocument.h
Go to the documentation of this file.
1 /***************************************************************************
2 
3  Copyright 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
4 
5  ***************************************************************************/
6 
7 /***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 #ifndef PARLEYDOCUMENT_H
16 #define PARLEYDOCUMENT_H
17 
18 #include <keduvocdocument.h>
19 #include <QObject>
20 
21 #include "../config-parley.h"
22 
23 class ParleyMainWindow;
24 class QTimer;
25 
29 class ParleyDocument : public QObject
30 {
31  Q_OBJECT
32 public:
33  ParleyDocument(ParleyMainWindow* parleyMainWindow);
34  ~ParleyDocument();
35 
36 
37  KEduVocDocument *document();
38 
39  void setTitle(const QString& title);
40 
44  void enableAutoBackup(bool enable);
45  //void fetchGrammar(int languageIndex);
46 
47 public slots:
49  void slotFileNew();
50 
52  void slotFileOpen();
53 
55  void slotFileOpenRecent(const KUrl& url);
57  void openGHNS();
59  void slotGHNS();
61  void uploadFile();
62 
64  bool open(const KUrl &);
65 
67  void close();
69  bool queryClose();
70 
71 
73  void slotFileMerge();
75  void save();
76  void saveAs(KUrl file = KUrl());
77 
78  void exportDialog();
79 
80  void newDocument(bool wizard);
81 
83  void documentProperties();
84  void languageProperties();
85 
86 signals:
89  void documentChanged(KEduVocDocument *newDocument);
90  void languagesChanged();
91  void statesNeedSaving();
92 
93 private:
94  void initializeDefaultGrammar(KEduVocDocument *doc);
95  void setDefaultDocumentProperties(KEduVocDocument *doc);
96 
97  private:
98  ParleyMainWindow *m_parleyApp; // Pointer to the owner of this document
99  QTimer *m_backupTimer; // Timer for next autosave
100 
101  // The contents of the document
102  KEduVocDocument *m_doc;
103 };
104 
105 #endif
ParleyDocument::ParleyDocument
ParleyDocument(ParleyMainWindow *parleyMainWindow)
Definition: parleydocument.cpp:80
ParleyDocument::documentChanged
void documentChanged(KEduVocDocument *newDocument)
Emitted when the document pointer is changed.
ParleyDocument::statesNeedSaving
void statesNeedSaving()
ParleyDocument::languageProperties
void languageProperties()
Definition: parleydocument.cpp:580
ParleyDocument::setTitle
void setTitle(const QString &title)
Definition: parleydocument.cpp:107
ParleyDocument::documentProperties
void documentProperties()
General doc properties like title, author etc.
Definition: parleydocument.cpp:564
ParleyDocument::slotFileMerge
void slotFileMerge()
merge a document
Definition: parleydocument.cpp:627
ParleyDocument::exportDialog
void exportDialog()
Definition: parleydocument.cpp:619
ParleyMainWindow
Definition: parleymainwindow.h:41
ParleyDocument::slotFileOpenRecent
void slotFileOpenRecent(const KUrl &url)
opens a file from the recent files menu
Definition: parleydocument.cpp:184
ParleyDocument::document
KEduVocDocument * document()
Definition: parleydocument.cpp:97
ParleyDocument::queryClose
bool queryClose()
When quitting, ask for confirmation if the doc has not been saved.
Definition: parleydocument.cpp:264
ParleyDocument::slotFileOpen
void slotFileOpen()
open a document
Definition: parleydocument.cpp:164
ParleyDocument::save
void save()
save a document
Definition: parleydocument.cpp:315
ParleyDocument
Definition: parleydocument.h:29
ParleyDocument::newDocument
void newDocument(bool wizard)
Definition: parleydocument.cpp:119
QTimer
QObject
QString
ParleyDocument::enableAutoBackup
void enableAutoBackup(bool enable)
Enable/disable the timed auto backup.
Definition: parleydocument.cpp:653
ParleyDocument::openGHNS
void openGHNS()
open a downloaded (knewstuff/get hot new stuff) document
Definition: parleydocument.cpp:300
ParleyDocument::~ParleyDocument
~ParleyDocument()
Definition: parleydocument.cpp:88
ParleyDocument::uploadFile
void uploadFile()
upload the current file
Definition: parleydocument.cpp:588
ParleyDocument::slotGHNS
void slotGHNS()
download new vocabularies
Definition: parleydocument.cpp:532
ParleyDocument::open
bool open(const KUrl &)
Opens the given url, displays an error message and returns false on failure.
Definition: parleydocument.cpp:191
ParleyDocument::close
void close()
close the document
Definition: parleydocument.cpp:254
ParleyDocument::saveAs
void saveAs(KUrl file=KUrl())
Definition: parleydocument.cpp:381
ParleyDocument::slotFileNew
void slotFileNew()
open a new application window
Definition: parleydocument.cpp:112
ParleyDocument::languagesChanged
void languagesChanged()
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