SpinSlider and ScrollSpinBox read-only support
PIVariantEdit - support for read-only for all types PIValueTreeEdit - drop Parent grouping, default now Groups, full grouping control, global read-only support, fix new label error
This commit is contained in:
@@ -23,11 +23,10 @@ MainWindow::MainWindow(QWidget * parent): EMainWindow(parent), Ui::MainWindow()
|
||||
auto mo = PIValueTreeEdit::staticMetaObject;
|
||||
auto me = mo.enumerator(mo.indexOfEnumerator("Grouping"));
|
||||
for (int i = 0; i < me.keyCount(); ++i) {
|
||||
if (me.value(i) == PIValueTreeEdit::Parent) continue;
|
||||
auto * a = ag->addAction(me.key(i));
|
||||
a->setCheckable(true);
|
||||
a->setData(me.value(i));
|
||||
if (me.value(i) == PIValueTreeEdit::Indent) a->setChecked(true);
|
||||
if (me.value(i) == PIValueTreeEdit::Groups) a->setChecked(true);
|
||||
}
|
||||
menuView->addActions(ag->actions());
|
||||
widget->setFullEditMode(actionFull_edit_mode->isChecked());
|
||||
@@ -100,3 +99,8 @@ QString MainWindow::loadFilter() {
|
||||
void MainWindow::on_actionFull_edit_mode_toggled(bool on) {
|
||||
widget->setFullEditMode(on);
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_actionRead_only_toggled(bool on) {
|
||||
widget->setReadOnly(on);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ protected:
|
||||
|
||||
private slots:
|
||||
void on_actionFull_edit_mode_toggled(bool on);
|
||||
void on_actionRead_only_toggled(bool on);
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
|
||||
@@ -56,6 +56,12 @@
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -102,6 +108,7 @@
|
||||
<string>View</string>
|
||||
</property>
|
||||
<addaction name="actionFull_edit_mode"/>
|
||||
<addaction name="actionRead_only"/>
|
||||
<addaction name="separator"/>
|
||||
</widget>
|
||||
<addaction name="menuFile"/>
|
||||
@@ -145,7 +152,7 @@
|
||||
</action>
|
||||
<action name="actionNew">
|
||||
<property name="icon">
|
||||
<iconset resource="../../libs/qglview/qglview.qrc">
|
||||
<iconset resource="../../libs/widgets/qad_widgets.qrc">
|
||||
<normaloff>:/icons/document-new.png</normaloff>:/icons/document-new.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@@ -175,6 +182,14 @@
|
||||
<string>Full edit mode</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRead_only">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Read only</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
@@ -188,7 +203,6 @@
|
||||
<resources>
|
||||
<include location="../../../cd/utils/pult/cdpult.qrc"/>
|
||||
<include location="../../libs/blockview/qad_blockview.qrc"/>
|
||||
<include location="../../libs/qglview/qglview.qrc"/>
|
||||
<include location="../../libs/widgets/qad_widgets.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
|
||||
Reference in New Issue
Block a user