Core: Add VarSet support to expression dialog
This allows users to directly add properties to variable sets from within the expression input dialog improving a workflow for parameterized design.
This commit is contained in:
committed by
Chris Hennes
parent
f331c91b89
commit
bfec0992f4
@@ -24,7 +24,9 @@
|
||||
#define GUI_DIALOG_DLGEXPRESSIONINPUT_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QTreeWidget>
|
||||
#include <App/ObjectIdentifier.h>
|
||||
#include <Base/Type.h>
|
||||
#include <Base/Unit.h>
|
||||
#include <memory>
|
||||
|
||||
@@ -78,14 +80,33 @@ public:
|
||||
|
||||
public Q_SLOTS:
|
||||
void show();
|
||||
void accept() override;
|
||||
|
||||
protected:
|
||||
void mouseReleaseEvent(QMouseEvent*) override;
|
||||
void mousePressEvent(QMouseEvent*) override;
|
||||
|
||||
private:
|
||||
Base::Type getTypePath();
|
||||
Base::Type determineTypeVarSet();
|
||||
bool typeOkForVarSet();
|
||||
void initializeVarSets();
|
||||
void checkExpression(const QString& text);
|
||||
void setupVarSets();
|
||||
std::string getType();
|
||||
void reportVarSetInfo(const char* message);
|
||||
bool reportName(QTreeWidgetItem* item);
|
||||
bool reportGroup(QString& nameGroup);
|
||||
void updateVarSetInfo(bool checkExpr = true);
|
||||
void acceptWithVarSet();
|
||||
|
||||
private Q_SLOTS:
|
||||
void textChanged(const QString & text);
|
||||
void setDiscarded();
|
||||
void onCheckVarSets(int state);
|
||||
void onVarSetSelected(int);
|
||||
void onTextChangedGroup(const QString&);
|
||||
void namePropChanged(const QString&);
|
||||
|
||||
private:
|
||||
::Ui::DlgExpressionInput *ui;
|
||||
@@ -96,6 +117,9 @@ private:
|
||||
NumberRange numberRange;
|
||||
|
||||
int minimumWidth;
|
||||
|
||||
static bool varSetsVisible;
|
||||
std::unique_ptr<QTreeWidget> treeWidget;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user