1
/****************************************************************************
3
** Copyright (C) 1992-2005 Trolltech AS. All rights reserved.
5
** This file is part of the designer application of the Qt Toolkit.
7
** This file may be distributed under the terms of the Q Public License
8
** as defined by Trolltech AS of Norway and appearing in the file
9
** LICENSE.QPL included in the packaging of this file.
11
** This file may be distributed and/or modified under the terms of the
12
** GNU General Public License version 2 as published by the Free Software
13
** Foundation and appearing in the file LICENSE.GPL included in the
14
** packaging of this file.
16
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
17
** information about Qt Commercial License Agreements.
18
** See http://www.trolltech.com/qpl/ for QPL licensing information.
19
** See http://www.trolltech.com/gpl/ for GPL licensing information.
21
** Contact info@trolltech.com if any conditions of this licensing are
24
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
25
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27
****************************************************************************/
29
#ifndef RESOURCEEDITOR_H
30
#define RESOURCEEDITOR_H
32
#include <QtGui/QWidget>
34
#include "resourceeditor_global.h"
36
class QDesignerFormEditorInterface;
37
class QDesignerFormWindowInterface;
47
namespace qdesigner_internal {
49
class QT_RESOURCEEDITOR_EXPORT ResourceEditor : public QWidget
54
ResourceEditor(QDesignerFormEditorInterface *core, QWidget *parent = 0);
56
QDesignerFormWindowInterface *form() const { return m_form; }
60
void saveCurrentView();
61
void removeCurrentView();
62
void reloadCurrentView();
66
void setActiveForm(QDesignerFormWindowInterface *form);
69
void updateQrcPaths();
70
void updateQrcStack();
75
void setCurrentIndex(int i);
76
void addView(const QString &file_name);
79
QDesignerFormWindowInterface *m_form;
81
void getCurrentItem(QString &prefix, QString &file);
82
QTreeView *currentView() const;
83
ResourceModel *currentModel() const;
84
QTreeView *view(int i) const;
85
ResourceModel *model(int i) const;
86
int indexOfView(QTreeView *view);
87
QString qrcName(const QString &path) const;
88
int currentIndex() const;
90
void insertEmptyComboItem();
91
void removeEmptyComboItem();
94
QComboBox *m_qrc_combo;
95
QStackedWidget *m_qrc_stack;
96
QToolButton *m_add_button;
97
QToolButton *m_remove_button;
98
QPushButton *m_add_files_button;
99
QToolButton *m_remove_qrc_button;
102
} // namespace qdesigner_internal
104
#endif // RESOURCEEDITOR_H