15#ifndef QTRESOURCEMODEL_H
16#define QTRESOURCEMODEL_H
19#include <QtCore/qmap.h>
20#include <QtCore/qobject.h>
21#include <QtCore/qscopedpointer.h>
30 QStringList activeResourceFilePaths()
const;
43 void activateResourceFilePaths(
const QStringList &paths,
int *errorCount =
nullptr, QString *errorMessages =
nullptr);
45 bool isModified(
const QString &path)
const;
46 void setModified(
const QString &path);
49 QtResourceSet(QtResourceModel *model);
51 friend class QtResourceModel;
53 QScopedPointer<
class QtResourceSetPrivate> d_ptr;
54 Q_DECLARE_PRIVATE(QtResourceSet)
55 Q_DISABLE_COPY_MOVE(QtResourceSet)
62 QtResourceModel(QObject *parent =
nullptr);
65 QStringList loadedQrcFiles()
const;
66 bool isModified(
const QString &path)
const;
67 void setModified(
const QString &path);
69 QList<QtResourceSet *> resourceSets()
const;
71 QtResourceSet *currentResourceSet()
const;
72 void setCurrentResourceSet(QtResourceSet *resourceSet,
int *errorCount =
nullptr, QString *errorMessages =
nullptr);
74 QtResourceSet *addResourceSet(
const QStringList &paths);
75 void removeResourceSet(QtResourceSet *resourceSet);
77 void reload(
const QString &path,
int *errorCount =
nullptr, QString *errorMessages =
nullptr);
78 void reload(
int *errorCount =
nullptr, QString *errorMessages =
nullptr);
81 QMap<QString, QString> contents()
const;
83 QString qrcPath(
const QString &file)
const;
85 void setWatcherEnabled(
bool enable);
86 bool isWatcherEnabled()
const;
88 void setWatcherEnabled(
const QString &path,
bool enable);
89 bool isWatcherEnabled(
const QString &path);
92 void resourceSetActivated(QtResourceSet *resourceSet,
bool resourceSetChanged);
93 void qrcFileModifiedExternally(
const QString &path);
96 friend class QtResourceSet;
98 QScopedPointer<
class QtResourceModelPrivate> d_ptr;
99 Q_DECLARE_PRIVATE(QtResourceModel)
100 Q_DISABLE_COPY_MOVE(QtResourceModel)
virtual bool dynamicPropertiesAllowed() const =0
virtual bool isDynamicProperty(int index) const =0
virtual int addDynamicProperty(const QString &propertyName, const QVariant &value)=0
virtual bool canAddDynamicProperty(const QString &propertyName) const =0
virtual bool removeDynamicProperty(int index)=0
virtual ~QDesignerDynamicPropertySheetExtension()=default
QDesignerPropertySheetFactory(QExtensionManager *parent=nullptr)
static void registerExtension(QExtensionManager *mgr)
FormEditorOptionsPage(QDesignerFormEditorInterface *core)
QString name() const override
QWidget * createPage(QWidget *parent) override
bool reset(int index) override
~LayoutPropertySheet() override
void setProperty(int index, const QVariant &value) override
static void markChangedStretchProperties(QDesignerFormEditorInterface *core, QLayout *lt, const DomLayout *domLayout)
static void stretchAttributesToDom(QDesignerFormEditorInterface *core, QLayout *lt, DomLayout *domLayout)
void setChanged(int index, bool changed) override
QVariant property(int index) const override
QString propertyGroup(int index) const override
~LinePropertySheet() override
bool isVisible(int index) const override
void setProperty(int index, const QVariant &value) override
void remove(int index) override
QWidget * widget(int index) const override
void insertWidget(int index, QWidget *widget) override
void addWidget(QWidget *widget) override
int count() const override
bool canAddWidget() const override
int currentIndex() const override
bool canRemove(int) const override
void setCurrentIndex(int index) override
bool canRemove(int) const override
void addWidget(QWidget *widget) override
bool canAddWidget() const override
int count() const override
void remove(int index) override
static void positionNewMdiChild(const QWidget *area, QWidget *mdiChild)
int currentIndex() const override
QWidget * widget(int index) const override
void insertWidget(int index, QWidget *widget) override
void setCurrentIndex(int index) override
bool isChanged(int index) const override
void setProperty(int index, const QVariant &value) override
static bool checkProperty(const QString &propertyName)
bool isEnabled(int index) const override
bool reset(int index) override
QVariant property(int index) const override
int currentIndex() const override
void addWidget(QWidget *widget) override
int count() const override
QWidget * widget(int index) const override
void remove(int index) override
bool canRemove(int) const override
bool canAddWidget() const override
void insertWidget(int index, QWidget *widget) override
void setCurrentIndex(int index) override
static const char * pageIdProperty
bool reset(int index) override
bool isVisible(int index) const override
void setProperty(int index, const QVariant &value) override
~SpacerPropertySheet() override
bool dynamicPropertiesAllowed() const override
bool isVisible(int index) const override
QString name() const override
QWidget * createPage(QWidget *parent) override
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.
#define QDESIGNER_SHARED_EXPORT