1 /*****************************************************************************************
2     begin                : Sat Apr 26 2003
3     copyright            : (C) 2003 by Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)
4                                2007-2008 by Michel Ludwig (michel.ludwig@kdemail.net)
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 
16 #ifndef NEWFILEWIZARD_H
17 #define NEWFILEWIZARD_H
18 
19 #include <QString>
20 #include <QCheckBox>
21 
22 
23 #include <QDialog>
24 #include <KLocalizedString>
25 
26 #include "kileconstants.h"
27 #include "templates.h"
28 
29 class NewDocumentWidget;
30 
31 class NewFileWizard : public QDialog
32 {
33     Q_OBJECT
34 public:
35     explicit NewFileWizard(KileTemplate::Manager *manager, KileDocument::Type startType = KileDocument::LaTeX,
36                            QWidget *parent = Q_NULLPTR, const char *name = Q_NULLPTR);
37     ~NewFileWizard();
38 
39 public:
40     TemplateItem* getSelection() const;
41     bool useWizard();
42 
43 protected Q_SLOTS:
44     void okButtonClicked();
45 
46     void slotActivated(int index);
47 
48     void restoreSelectedIcon();
49 
50 protected:
51     KileTemplate::Manager *m_templateManager;
52     NewDocumentWidget* m_newDocumentWidget;
53     int m_currentlyDisplayedType; // not a document type, only a local type!
54 
55     QString getConfigKey(int index);
56 
57     void storeSelectedIcon();
58     void displayType(int index);
59 };
60 
61 #endif
62