forked from qt-creator/qt-creator
QmlJSEditor: Improving ComponentFromObjectDef
Now the use can choose which properties are defined inside the component and which properties are kept in the original file. To make the concept clear the dialog contains a snippet of the generated code. Change-Id: I92f9f241c9780345dd03b991232c4a811356c266 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -40,7 +40,16 @@ public:
|
||||
explicit ComponentNameDialog(QWidget *parent = 0);
|
||||
~ComponentNameDialog();
|
||||
|
||||
static bool go(QString *proposedName, QString *proposedPath, QWidget *parent = 0);
|
||||
static bool go(QString *proposedName, QString *proposedPath,
|
||||
const QStringList &properties, const QStringList &sourcePreview, const QString &oldFileName,
|
||||
QStringList *result,
|
||||
QWidget *parent = 0);
|
||||
|
||||
void setProperties(const QStringList &properties);
|
||||
|
||||
QStringList propertiesToKeep() const;
|
||||
|
||||
void generateCodePreview();
|
||||
|
||||
public slots:
|
||||
void choosePath();
|
||||
@@ -51,6 +60,7 @@ protected:
|
||||
|
||||
private:
|
||||
Ui::ComponentNameDialog *ui;
|
||||
QStringList m_sourcePreview;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user