blob: 52acd29cea0e0a17ab4018ba39534bad15bb322f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
/***************************************************************************
* Copyright (C) 2003 by Alexander Dymo *
* [email protected] *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#ifndef FCCONFIGWIDGET_H
#define FCCONFIGWIDGET_H
#include <qwidget.h>
#include <qvaluelist.h>
#include <kurl.h>
#include "fcconfigwidgetbase.h"
class FileCreatePart;
class QListView;
class QDomDocument;
class QDomElement;
namespace FileCreate{
class FileType;
}
class FCConfigWidget : public FCConfigWidgetBase
{
Q_OBJECT
public:
FCConfigWidget(FileCreatePart * part, bool global, QWidget *parent, const char *name);
~FCConfigWidget();
public slots:
void accept();
void removetemplate_button_clicked();
void copyToProject_button_clicked();
void newtype_button_clicked();
void newsubtype_button_clicked();
void remove_button_clicked();
void moveup_button_clicked();
void movedown_button_clicked();
void edittype_button_clicked();
void newtemplate_button_clicked();
void edittemplate_button_clicked();
void edit_template_content_button_clicked();
void edit_type_content_button_clicked();
protected:
void loadGlobalConfig(QListView *view, bool checkmarks = false);
void loadProjectConfig(QListView *view);
void loadProjectTemplates(QListView *view);
void saveGlobalConfig();
void saveProjectConfig();
void loadFileTypes(QPtrList<FileCreate::FileType> list, QListView *view, bool checkmarks = false);
void copyTemplate(QString templateUrl, QString dest, QString destName);
void saveConfiguration(QDomDocument &dom, QDomElement &element, bool global);
private:
FileCreatePart * m_part;
QPtrList<FileCreate::FileType> m_globalfiletypes;
QPtrList<FileCreate::FileType> m_projectfiletypes;
QPtrList<FileCreate::FileType> m_projectfiletemplates;
bool m_global;
QValueList<KURL> urlsToEdit;
};
#endif
|