1 /***************************************************************************
2 keducabuilder.h - description
4 begin : Sat May 26 2001
5 copyright : (C) 2001 by Javier Campos
6 email : javi@asyris.org
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
18 #ifndef KEDUCABUILDER_H
19 #define KEDUCABUILDER_H
21 #include "../libkeduca/fileread.h"
23 #include <kmainwindow.h>
28 #include <qtextview.h>
29 #include <qsplitter.h>
31 /**Main control documents
32 * The Editor. This is the new main window of KEduca.
33 * You can edit a KEduca Document (i.e. Test/Examen) here.
34 *@author Javier Campos
37 class KEducaBuilder
: public KMainWindow
{
41 KEducaBuilder(QWidget
* parent
=0, const char *name
=0, WFlags f
= WType_TopLevel
| WDestructiveClose
);
43 /** start a dialog that asks the user what he wants to do to start*/
45 /** Init Internet Gallery Servers */
46 void initGallery(const KURL
&urlFile
= KURL());
52 /** Init graphical interface */
54 /** Init menu bar settings */
58 /** Read config data */
60 /** Check if the current document can save */
63 /** Save the file, return false if save failed for any reason */
65 /** Save the file under a user-chosen filename, return false if save as
66 failed for any reason */
69 /** Ask the user if he wants to save the file if it has been changed.
70 Returns true if the file may be replaced (that is when he successfully saved it or said "Discard") */
71 bool currentFileMayBeReplaced();
76 FileRead
*_keducaFile
;
78 KRecentFilesAction
*_recentFiles
;
79 /** List of answers */
80 KListBox
*_listAnswer
;
87 QString _nativeFormat
;
91 void slotFileOpenURL( const KURL
&url
);
92 /** Delete current document and start new */
93 void slotFileOpenNew();
96 /** Open new document. */
99 void slotPreview( QListBoxItem
*item
);
100 /** Close the window */
106 /** Remove question */
113 void slotFileSaveAs();
117 void slotFilePrint();
122 /** Double click in list, edit question */
123 void slotEditbyList(QListBoxItem
*item
);