Preferences: Reorganize UI and Theme pages in Display group
This changes current "Display/UI" pages to "Display/Advenced" as most of settings there were pretty technical. These settings are not removed as it is hard to decide which one should be removed and which one should stay and we are too close to UI freeze. Settings that should be obviously kept were moved to new "Display/UI" section which now includes also options from previous "Display/Theme". Fixes: #14412
This commit is contained in:
committed by
Chris Hennes
parent
53dde493a9
commit
05aaf0ed48
@@ -353,7 +353,7 @@ SET(Gui_UIC_SRCS
|
||||
PreferencePages/DlgSettingsPythonConsole.ui
|
||||
PreferencePages/DlgSettingsReportView.ui
|
||||
PreferencePages/DlgSettingsSelection.ui
|
||||
PreferencePages/DlgSettingsTheme.ui
|
||||
PreferencePages/DlgSettingsUI.ui
|
||||
PreferencePages/DlgSettingsViewColor.ui
|
||||
PreferencePages/DlgSettingsWorkbenches.ui
|
||||
DlgCheckableMessageBox.ui
|
||||
@@ -610,10 +610,10 @@ SET(Dialog_Settings_CPP_SRCS
|
||||
PreferencePages/DlgSettingsPythonConsole.cpp
|
||||
PreferencePages/DlgSettingsReportView.cpp
|
||||
PreferencePages/DlgSettingsSelection.cpp
|
||||
PreferencePages/DlgSettingsTheme.cpp
|
||||
PreferencePages/DlgSettingsUI.cpp
|
||||
PreferencePages/DlgSettingsViewColor.cpp
|
||||
PreferencePages/DlgSettingsWorkbenchesImp.cpp
|
||||
PreferencePages/DlgSettingsUI.cpp
|
||||
PreferencePages/DlgSettingsAdvanced.cpp
|
||||
)
|
||||
SET(Dialog_Settings_HPP_SRCS
|
||||
DlgOnlineHelpImp.h
|
||||
@@ -632,10 +632,10 @@ SET(Dialog_Settings_HPP_SRCS
|
||||
PreferencePages/DlgSettingsPythonConsole.h
|
||||
PreferencePages/DlgSettingsReportView.h
|
||||
PreferencePages/DlgSettingsSelection.h
|
||||
PreferencePages/DlgSettingsTheme.h
|
||||
PreferencePages/DlgSettingsUI.h
|
||||
PreferencePages/DlgSettingsViewColor.h
|
||||
PreferencePages/DlgSettingsWorkbenchesImp.h
|
||||
PreferencePages/DlgSettingsUI.h
|
||||
PreferencePages/DlgSettingsAdvanced.h
|
||||
)
|
||||
SET(Dialog_Settings_SRCS
|
||||
${Dialog_Settings_CPP_SRCS}
|
||||
@@ -656,7 +656,7 @@ SET(Dialog_Settings_SRCS
|
||||
PreferencePages/DlgSettingsPythonConsole.ui
|
||||
PreferencePages/DlgSettingsReportView.ui
|
||||
PreferencePages/DlgSettingsSelection.ui
|
||||
PreferencePages/DlgSettingsTheme.ui
|
||||
PreferencePages/DlgSettingsUI.ui
|
||||
PreferencePages/DlgSettingsViewColor.ui
|
||||
PreferencePages/DlgSettingsWorkbenches.ui
|
||||
)
|
||||
|
||||
545
src/Gui/PreferencePages/DlgSettingsAdvanced.cpp
Normal file
545
src/Gui/PreferencePages/DlgSettingsAdvanced.cpp
Normal file
@@ -0,0 +1,545 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 2020 Zheng Lei (realthunder) <realthunder.dev@gmail.com> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include <QPropertyAnimation>
|
||||
#include <QTimer>
|
||||
|
||||
/*[[[cog
|
||||
import DlgSettingsAdvanced
|
||||
DlgSettingsAdvanced.define()
|
||||
]]]*/
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:567)
|
||||
#ifndef _PreComp_
|
||||
# include <QApplication>
|
||||
# include <QLabel>
|
||||
# include <QGroupBox>
|
||||
# include <QGridLayout>
|
||||
# include <QVBoxLayout>
|
||||
# include <QHBoxLayout>
|
||||
#endif
|
||||
#include <Gui/TreeParams.h>
|
||||
#include <Gui/OverlayParams.h>
|
||||
// Auto generated code (Tools/params_utils.py:589)
|
||||
#include "Gui/PreferencePages/DlgSettingsAdvanced.h"
|
||||
using namespace Gui::Dialog;
|
||||
/* TRANSLATOR Gui::Dialog::DlgSettingsAdvanced */
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:598)
|
||||
DlgSettingsAdvanced::DlgSettingsAdvanced(QWidget* parent)
|
||||
: PreferencePage( parent )
|
||||
{
|
||||
|
||||
auto layout = new QVBoxLayout(this);
|
||||
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:420)
|
||||
groupTreeview = new QGroupBox(this);
|
||||
layout->addWidget(groupTreeview);
|
||||
auto layoutHorizTreeview = new QHBoxLayout(groupTreeview);
|
||||
auto layoutTreeview = new QGridLayout();
|
||||
layoutHorizTreeview->addLayout(layoutTreeview);
|
||||
layoutHorizTreeview->addStretch();
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelItemBackgroundPadding = new QLabel(this);
|
||||
layoutTreeview->addWidget(labelItemBackgroundPadding, 0, 0);
|
||||
ItemBackgroundPadding = new Gui::PrefSpinBox(this);
|
||||
layoutTreeview->addWidget(ItemBackgroundPadding, 0, 1);
|
||||
ItemBackgroundPadding->setValue(Gui::TreeParams::defaultItemBackgroundPadding());
|
||||
ItemBackgroundPadding->setEntryName("ItemBackgroundPadding");
|
||||
ItemBackgroundPadding->setParamGrpPath("TreeView");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
ItemBackgroundPadding->setMinimum(0);
|
||||
ItemBackgroundPadding->setMaximum(100);
|
||||
ItemBackgroundPadding->setSingleStep(1);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelFontSize = new QLabel(this);
|
||||
layoutTreeview->addWidget(labelFontSize, 1, 0);
|
||||
FontSize = new Gui::PrefSpinBox(this);
|
||||
layoutTreeview->addWidget(FontSize, 1, 1);
|
||||
FontSize->setValue(Gui::TreeParams::defaultFontSize());
|
||||
FontSize->setEntryName("FontSize");
|
||||
FontSize->setParamGrpPath("TreeView");
|
||||
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:420)
|
||||
groupOverlay = new QGroupBox(this);
|
||||
layout->addWidget(groupOverlay);
|
||||
auto layoutHorizOverlay = new QHBoxLayout(groupOverlay);
|
||||
auto layoutOverlay = new QGridLayout();
|
||||
layoutHorizOverlay->addLayout(layoutOverlay);
|
||||
layoutHorizOverlay->addStretch();
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayWheelDelay = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayWheelDelay, 0, 0);
|
||||
DockOverlayWheelDelay = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayWheelDelay, 0, 1);
|
||||
DockOverlayWheelDelay->setValue(Gui::OverlayParams::defaultDockOverlayWheelDelay());
|
||||
DockOverlayWheelDelay->setEntryName("DockOverlayWheelDelay");
|
||||
DockOverlayWheelDelay->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayWheelDelay->setMinimum(0);
|
||||
DockOverlayWheelDelay->setMaximum(99999);
|
||||
DockOverlayWheelDelay->setSingleStep(1);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayAlphaRadius = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayAlphaRadius, 1, 0);
|
||||
DockOverlayAlphaRadius = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayAlphaRadius, 1, 1);
|
||||
DockOverlayAlphaRadius->setValue(Gui::OverlayParams::defaultDockOverlayAlphaRadius());
|
||||
DockOverlayAlphaRadius->setEntryName("DockOverlayAlphaRadius");
|
||||
DockOverlayAlphaRadius->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayAlphaRadius->setMinimum(1);
|
||||
DockOverlayAlphaRadius->setMaximum(100);
|
||||
DockOverlayAlphaRadius->setSingleStep(1);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
DockOverlayCheckNaviCube = new Gui::PrefCheckBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayCheckNaviCube, 2, 0);
|
||||
DockOverlayCheckNaviCube->setChecked(Gui::OverlayParams::defaultDockOverlayCheckNaviCube());
|
||||
DockOverlayCheckNaviCube->setEntryName("DockOverlayCheckNaviCube");
|
||||
DockOverlayCheckNaviCube->setParamGrpPath("View");
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintTriggerSize = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintTriggerSize, 3, 0);
|
||||
DockOverlayHintTriggerSize = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintTriggerSize, 3, 1);
|
||||
DockOverlayHintTriggerSize->setValue(Gui::OverlayParams::defaultDockOverlayHintTriggerSize());
|
||||
DockOverlayHintTriggerSize->setEntryName("DockOverlayHintTriggerSize");
|
||||
DockOverlayHintTriggerSize->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintTriggerSize->setMinimum(1);
|
||||
DockOverlayHintTriggerSize->setMaximum(100);
|
||||
DockOverlayHintTriggerSize->setSingleStep(1);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintSize = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintSize, 4, 0);
|
||||
DockOverlayHintSize = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintSize, 4, 1);
|
||||
DockOverlayHintSize->setValue(Gui::OverlayParams::defaultDockOverlayHintSize());
|
||||
DockOverlayHintSize->setEntryName("DockOverlayHintSize");
|
||||
DockOverlayHintSize->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintSize->setMinimum(1);
|
||||
DockOverlayHintSize->setMaximum(100);
|
||||
DockOverlayHintSize->setSingleStep(1);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintLeftOffset = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintLeftOffset, 5, 0);
|
||||
DockOverlayHintLeftOffset = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintLeftOffset, 5, 1);
|
||||
DockOverlayHintLeftOffset->setValue(Gui::OverlayParams::defaultDockOverlayHintLeftOffset());
|
||||
DockOverlayHintLeftOffset->setEntryName("DockOverlayHintLeftOffset");
|
||||
DockOverlayHintLeftOffset->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintLeftOffset->setMinimum(0);
|
||||
DockOverlayHintLeftOffset->setMaximum(10000);
|
||||
DockOverlayHintLeftOffset->setSingleStep(10);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintLeftLength = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintLeftLength, 6, 0);
|
||||
DockOverlayHintLeftLength = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintLeftLength, 6, 1);
|
||||
DockOverlayHintLeftLength->setValue(Gui::OverlayParams::defaultDockOverlayHintLeftLength());
|
||||
DockOverlayHintLeftLength->setEntryName("DockOverlayHintLeftLength");
|
||||
DockOverlayHintLeftLength->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintLeftLength->setMinimum(0);
|
||||
DockOverlayHintLeftLength->setMaximum(10000);
|
||||
DockOverlayHintLeftLength->setSingleStep(10);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintRightOffset = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintRightOffset, 7, 0);
|
||||
DockOverlayHintRightOffset = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintRightOffset, 7, 1);
|
||||
DockOverlayHintRightOffset->setValue(Gui::OverlayParams::defaultDockOverlayHintRightOffset());
|
||||
DockOverlayHintRightOffset->setEntryName("DockOverlayHintRightOffset");
|
||||
DockOverlayHintRightOffset->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintRightOffset->setMinimum(0);
|
||||
DockOverlayHintRightOffset->setMaximum(10000);
|
||||
DockOverlayHintRightOffset->setSingleStep(10);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintRightLength = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintRightLength, 8, 0);
|
||||
DockOverlayHintRightLength = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintRightLength, 8, 1);
|
||||
DockOverlayHintRightLength->setValue(Gui::OverlayParams::defaultDockOverlayHintRightLength());
|
||||
DockOverlayHintRightLength->setEntryName("DockOverlayHintRightLength");
|
||||
DockOverlayHintRightLength->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintRightLength->setMinimum(0);
|
||||
DockOverlayHintRightLength->setMaximum(10000);
|
||||
DockOverlayHintRightLength->setSingleStep(10);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintTopOffset = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintTopOffset, 9, 0);
|
||||
DockOverlayHintTopOffset = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintTopOffset, 9, 1);
|
||||
DockOverlayHintTopOffset->setValue(Gui::OverlayParams::defaultDockOverlayHintTopOffset());
|
||||
DockOverlayHintTopOffset->setEntryName("DockOverlayHintTopOffset");
|
||||
DockOverlayHintTopOffset->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintTopOffset->setMinimum(0);
|
||||
DockOverlayHintTopOffset->setMaximum(10000);
|
||||
DockOverlayHintTopOffset->setSingleStep(10);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintTopLength = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintTopLength, 10, 0);
|
||||
DockOverlayHintTopLength = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintTopLength, 10, 1);
|
||||
DockOverlayHintTopLength->setValue(Gui::OverlayParams::defaultDockOverlayHintTopLength());
|
||||
DockOverlayHintTopLength->setEntryName("DockOverlayHintTopLength");
|
||||
DockOverlayHintTopLength->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintTopLength->setMinimum(0);
|
||||
DockOverlayHintTopLength->setMaximum(10000);
|
||||
DockOverlayHintTopLength->setSingleStep(10);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintBottomOffset = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintBottomOffset, 11, 0);
|
||||
DockOverlayHintBottomOffset = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintBottomOffset, 11, 1);
|
||||
DockOverlayHintBottomOffset->setValue(Gui::OverlayParams::defaultDockOverlayHintBottomOffset());
|
||||
DockOverlayHintBottomOffset->setEntryName("DockOverlayHintBottomOffset");
|
||||
DockOverlayHintBottomOffset->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintBottomOffset->setMinimum(0);
|
||||
DockOverlayHintBottomOffset->setMaximum(10000);
|
||||
DockOverlayHintBottomOffset->setSingleStep(10);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintBottomLength = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintBottomLength, 12, 0);
|
||||
DockOverlayHintBottomLength = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintBottomLength, 12, 1);
|
||||
DockOverlayHintBottomLength->setValue(Gui::OverlayParams::defaultDockOverlayHintBottomLength());
|
||||
DockOverlayHintBottomLength->setEntryName("DockOverlayHintBottomLength");
|
||||
DockOverlayHintBottomLength->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintBottomLength->setMinimum(0);
|
||||
DockOverlayHintBottomLength->setMaximum(10000);
|
||||
DockOverlayHintBottomLength->setSingleStep(10);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
DockOverlayHintTabBar = new Gui::PrefCheckBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintTabBar, 13, 0);
|
||||
DockOverlayHintTabBar->setChecked(Gui::OverlayParams::defaultDockOverlayHintTabBar());
|
||||
DockOverlayHintTabBar->setEntryName("DockOverlayHintTabBar");
|
||||
DockOverlayHintTabBar->setParamGrpPath("View");
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintDelay = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintDelay, 14, 0);
|
||||
DockOverlayHintDelay = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintDelay, 14, 1);
|
||||
DockOverlayHintDelay->setValue(Gui::OverlayParams::defaultDockOverlayHintDelay());
|
||||
DockOverlayHintDelay->setEntryName("DockOverlayHintDelay");
|
||||
DockOverlayHintDelay->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintDelay->setMinimum(0);
|
||||
DockOverlayHintDelay->setMaximum(1000);
|
||||
DockOverlayHintDelay->setSingleStep(100);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlaySplitterHandleTimeout = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlaySplitterHandleTimeout, 15, 0);
|
||||
DockOverlaySplitterHandleTimeout = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlaySplitterHandleTimeout, 15, 1);
|
||||
DockOverlaySplitterHandleTimeout->setValue(Gui::OverlayParams::defaultDockOverlaySplitterHandleTimeout());
|
||||
DockOverlaySplitterHandleTimeout->setEntryName("DockOverlaySplitterHandleTimeout");
|
||||
DockOverlaySplitterHandleTimeout->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlaySplitterHandleTimeout->setMinimum(0);
|
||||
DockOverlaySplitterHandleTimeout->setMaximum(99999);
|
||||
DockOverlaySplitterHandleTimeout->setSingleStep(100);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
DockOverlayActivateOnHover = new Gui::PrefCheckBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayActivateOnHover, 16, 0);
|
||||
DockOverlayActivateOnHover->setChecked(Gui::OverlayParams::defaultDockOverlayActivateOnHover());
|
||||
DockOverlayActivateOnHover->setEntryName("DockOverlayActivateOnHover");
|
||||
DockOverlayActivateOnHover->setParamGrpPath("View");
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayDelay = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayDelay, 17, 0);
|
||||
DockOverlayDelay = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayDelay, 17, 1);
|
||||
DockOverlayDelay->setValue(Gui::OverlayParams::defaultDockOverlayDelay());
|
||||
DockOverlayDelay->setEntryName("DockOverlayDelay");
|
||||
DockOverlayDelay->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayDelay->setMinimum(0);
|
||||
DockOverlayDelay->setMaximum(5000);
|
||||
DockOverlayDelay->setSingleStep(100);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayAnimationDuration = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayAnimationDuration, 18, 0);
|
||||
DockOverlayAnimationDuration = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayAnimationDuration, 18, 1);
|
||||
DockOverlayAnimationDuration->setValue(Gui::OverlayParams::defaultDockOverlayAnimationDuration());
|
||||
DockOverlayAnimationDuration->setEntryName("DockOverlayAnimationDuration");
|
||||
DockOverlayAnimationDuration->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayAnimationDuration->setMinimum(0);
|
||||
DockOverlayAnimationDuration->setMaximum(5000);
|
||||
DockOverlayAnimationDuration->setSingleStep(100);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayAnimationCurve = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayAnimationCurve, 19, 0);
|
||||
DockOverlayAnimationCurve = new Gui::PrefComboBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayAnimationCurve, 19, 1);
|
||||
DockOverlayAnimationCurve->setEntryName("DockOverlayAnimationCurve");
|
||||
DockOverlayAnimationCurve->setParamGrpPath("View");
|
||||
// Auto generated code (Gui/OverlayParams.py:94)
|
||||
for (const auto &item : OverlayParams::AnimationCurveTypes)
|
||||
DockOverlayAnimationCurve->addItem(item);
|
||||
DockOverlayAnimationCurve->setCurrentIndex(Gui::OverlayParams::defaultDockOverlayAnimationCurve());
|
||||
layout->addItem(new QSpacerItem(40, 20, QSizePolicy::Fixed, QSizePolicy::Expanding));
|
||||
retranslateUi();
|
||||
// Auto generated code (Tools/params_utils.py:607)
|
||||
init();
|
||||
}
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:614)
|
||||
DlgSettingsAdvanced::~DlgSettingsAdvanced()
|
||||
{
|
||||
}
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:622)
|
||||
void DlgSettingsAdvanced::saveSettings()
|
||||
{
|
||||
// Auto generated code (Tools/params_utils.py:461)
|
||||
ItemBackgroundPadding->onSave();
|
||||
FontSize->onSave();
|
||||
DockOverlayWheelDelay->onSave();
|
||||
DockOverlayAlphaRadius->onSave();
|
||||
DockOverlayCheckNaviCube->onSave();
|
||||
DockOverlayHintTriggerSize->onSave();
|
||||
DockOverlayHintSize->onSave();
|
||||
DockOverlayHintLeftOffset->onSave();
|
||||
DockOverlayHintLeftLength->onSave();
|
||||
DockOverlayHintRightOffset->onSave();
|
||||
DockOverlayHintRightLength->onSave();
|
||||
DockOverlayHintTopOffset->onSave();
|
||||
DockOverlayHintTopLength->onSave();
|
||||
DockOverlayHintBottomOffset->onSave();
|
||||
DockOverlayHintBottomLength->onSave();
|
||||
DockOverlayHintTabBar->onSave();
|
||||
DockOverlayHintDelay->onSave();
|
||||
DockOverlaySplitterHandleTimeout->onSave();
|
||||
DockOverlayActivateOnHover->onSave();
|
||||
DockOverlayDelay->onSave();
|
||||
DockOverlayAnimationDuration->onSave();
|
||||
DockOverlayAnimationCurve->onSave();
|
||||
}
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:631)
|
||||
void DlgSettingsAdvanced::loadSettings()
|
||||
{
|
||||
// Auto generated code (Tools/params_utils.py:449)
|
||||
ItemBackgroundPadding->onRestore();
|
||||
FontSize->onRestore();
|
||||
DockOverlayWheelDelay->onRestore();
|
||||
DockOverlayAlphaRadius->onRestore();
|
||||
DockOverlayCheckNaviCube->onRestore();
|
||||
DockOverlayHintTriggerSize->onRestore();
|
||||
DockOverlayHintSize->onRestore();
|
||||
DockOverlayHintLeftOffset->onRestore();
|
||||
DockOverlayHintLeftLength->onRestore();
|
||||
DockOverlayHintRightOffset->onRestore();
|
||||
DockOverlayHintRightLength->onRestore();
|
||||
DockOverlayHintTopOffset->onRestore();
|
||||
DockOverlayHintTopLength->onRestore();
|
||||
DockOverlayHintBottomOffset->onRestore();
|
||||
DockOverlayHintBottomLength->onRestore();
|
||||
DockOverlayHintTabBar->onRestore();
|
||||
DockOverlayHintDelay->onRestore();
|
||||
DockOverlaySplitterHandleTimeout->onRestore();
|
||||
DockOverlayActivateOnHover->onRestore();
|
||||
DockOverlayDelay->onRestore();
|
||||
DockOverlayAnimationDuration->onRestore();
|
||||
DockOverlayAnimationCurve->onRestore();
|
||||
}
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:640)
|
||||
void DlgSettingsAdvanced::retranslateUi()
|
||||
{
|
||||
setWindowTitle(QObject::tr("Advanced"));
|
||||
groupTreeview->setTitle(QObject::tr("Tree view"));
|
||||
ItemBackgroundPadding->setToolTip(QApplication::translate("TreeParams", Gui::TreeParams::docItemBackgroundPadding()));
|
||||
labelItemBackgroundPadding->setText(QObject::tr("Item background padding"));
|
||||
labelItemBackgroundPadding->setToolTip(ItemBackgroundPadding->toolTip());
|
||||
FontSize->setToolTip(QApplication::translate("TreeParams", Gui::TreeParams::docFontSize()));
|
||||
labelFontSize->setText(QObject::tr("FontSize"));
|
||||
labelFontSize->setToolTip(FontSize->toolTip());
|
||||
groupOverlay->setTitle(QObject::tr("Overlay"));
|
||||
DockOverlayWheelDelay->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayWheelDelay()));
|
||||
labelDockOverlayWheelDelay->setText(QObject::tr("Delay mouse wheel pass through (ms)"));
|
||||
labelDockOverlayWheelDelay->setToolTip(DockOverlayWheelDelay->toolTip());
|
||||
DockOverlayAlphaRadius->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayAlphaRadius()));
|
||||
labelDockOverlayAlphaRadius->setText(QObject::tr("Alpha test radius"));
|
||||
labelDockOverlayAlphaRadius->setToolTip(DockOverlayAlphaRadius->toolTip());
|
||||
DockOverlayCheckNaviCube->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayCheckNaviCube()));
|
||||
DockOverlayCheckNaviCube->setText(QObject::tr("Check Navigation Cube"));
|
||||
DockOverlayHintTriggerSize->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintTriggerSize()));
|
||||
labelDockOverlayHintTriggerSize->setText(QObject::tr("Hint trigger size"));
|
||||
labelDockOverlayHintTriggerSize->setToolTip(DockOverlayHintTriggerSize->toolTip());
|
||||
DockOverlayHintSize->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintSize()));
|
||||
labelDockOverlayHintSize->setText(QObject::tr("Hint width"));
|
||||
labelDockOverlayHintSize->setToolTip(DockOverlayHintSize->toolTip());
|
||||
DockOverlayHintLeftOffset->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintLeftOffset()));
|
||||
labelDockOverlayHintLeftOffset->setText(QObject::tr("Left panel hint offset"));
|
||||
labelDockOverlayHintLeftOffset->setToolTip(DockOverlayHintLeftOffset->toolTip());
|
||||
DockOverlayHintLeftLength->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintLeftLength()));
|
||||
labelDockOverlayHintLeftLength->setText(QObject::tr("Left panel hint length"));
|
||||
labelDockOverlayHintLeftLength->setToolTip(DockOverlayHintLeftLength->toolTip());
|
||||
DockOverlayHintRightOffset->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintRightOffset()));
|
||||
labelDockOverlayHintRightOffset->setText(QObject::tr("Right panel hint offset"));
|
||||
labelDockOverlayHintRightOffset->setToolTip(DockOverlayHintRightOffset->toolTip());
|
||||
DockOverlayHintRightLength->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintRightLength()));
|
||||
labelDockOverlayHintRightLength->setText(QObject::tr("Right panel hint length"));
|
||||
labelDockOverlayHintRightLength->setToolTip(DockOverlayHintRightLength->toolTip());
|
||||
DockOverlayHintTopOffset->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintTopOffset()));
|
||||
labelDockOverlayHintTopOffset->setText(QObject::tr("Top panel hint offset"));
|
||||
labelDockOverlayHintTopOffset->setToolTip(DockOverlayHintTopOffset->toolTip());
|
||||
DockOverlayHintTopLength->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintTopLength()));
|
||||
labelDockOverlayHintTopLength->setText(QObject::tr("Top panel hint length"));
|
||||
labelDockOverlayHintTopLength->setToolTip(DockOverlayHintTopLength->toolTip());
|
||||
DockOverlayHintBottomOffset->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintBottomOffset()));
|
||||
labelDockOverlayHintBottomOffset->setText(QObject::tr("Bottom panel hint offset"));
|
||||
labelDockOverlayHintBottomOffset->setToolTip(DockOverlayHintBottomOffset->toolTip());
|
||||
DockOverlayHintBottomLength->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintBottomLength()));
|
||||
labelDockOverlayHintBottomLength->setText(QObject::tr("Bottom panel hint length"));
|
||||
labelDockOverlayHintBottomLength->setToolTip(DockOverlayHintBottomLength->toolTip());
|
||||
DockOverlayHintTabBar->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintTabBar()));
|
||||
DockOverlayHintTabBar->setText(QObject::tr("Hint show tab bar"));
|
||||
DockOverlayHintDelay->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintDelay()));
|
||||
labelDockOverlayHintDelay->setText(QObject::tr("Hint delay (ms)"));
|
||||
labelDockOverlayHintDelay->setToolTip(DockOverlayHintDelay->toolTip());
|
||||
DockOverlaySplitterHandleTimeout->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlaySplitterHandleTimeout()));
|
||||
labelDockOverlaySplitterHandleTimeout->setText(QObject::tr("Splitter auto hide delay (ms)"));
|
||||
labelDockOverlaySplitterHandleTimeout->setToolTip(DockOverlaySplitterHandleTimeout->toolTip());
|
||||
DockOverlayActivateOnHover->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayActivateOnHover()));
|
||||
DockOverlayActivateOnHover->setText(QObject::tr("Activate on hover"));
|
||||
DockOverlayDelay->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayDelay()));
|
||||
labelDockOverlayDelay->setText(QObject::tr("Layout delay (ms)"));
|
||||
labelDockOverlayDelay->setToolTip(DockOverlayDelay->toolTip());
|
||||
DockOverlayAnimationDuration->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayAnimationDuration()));
|
||||
labelDockOverlayAnimationDuration->setText(QObject::tr("Animation duration (ms)"));
|
||||
labelDockOverlayAnimationDuration->setToolTip(DockOverlayAnimationDuration->toolTip());
|
||||
DockOverlayAnimationCurve->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayAnimationCurve()));
|
||||
labelDockOverlayAnimationCurve->setText(QObject::tr("Animation curve type"));
|
||||
labelDockOverlayAnimationCurve->setToolTip(DockOverlayAnimationCurve->toolTip());
|
||||
}
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:657)
|
||||
void DlgSettingsAdvanced::changeEvent(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
retranslateUi();
|
||||
}
|
||||
QWidget::changeEvent(e);
|
||||
}
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:670)
|
||||
#include "moc_DlgSettingsAdvanced.cpp"
|
||||
//[[[end]]]
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// user code start
|
||||
|
||||
void DlgSettingsAdvanced::init()
|
||||
{
|
||||
timer = new QTimer(this);
|
||||
timer->setSingleShot(true);
|
||||
|
||||
animator1 = new QPropertyAnimation(this, "offset1", this);
|
||||
QObject::connect(animator1, &QPropertyAnimation::stateChanged, [this]() {
|
||||
if (animator1->state() != QAbstractAnimation::Running)
|
||||
timer->start(1000);
|
||||
});
|
||||
|
||||
QObject::connect(DockOverlayAnimationCurve, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DlgSettingsAdvanced::onCurveChange);
|
||||
|
||||
QObject::connect(timer, &QTimer::timeout, [this]() {
|
||||
if (animator1->state() != QAbstractAnimation::Running) {
|
||||
this->setOffset1(1);
|
||||
this->a1 = this->b1 = 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
qreal DlgSettingsAdvanced::offset1() const
|
||||
{
|
||||
return this->t1;
|
||||
}
|
||||
|
||||
void DlgSettingsAdvanced::setOffset1(qreal t)
|
||||
{
|
||||
if (t == this->t1)
|
||||
return;
|
||||
this->t1 = t;
|
||||
QLabel *label = this->labelDockOverlayAnimationCurve;
|
||||
if (this->a1 == this->b1) {
|
||||
this->a1 = label->x();
|
||||
QPoint pos(width(), 0);
|
||||
this->b1 = width() - label->fontMetrics().boundingRect(label->text()).width() - 5;
|
||||
}
|
||||
label->move(this->a1 * (1-t) + this->b1 * t, label->y());
|
||||
}
|
||||
|
||||
void DlgSettingsAdvanced::onCurveChange(int index)
|
||||
{
|
||||
if (sender() != DockOverlayAnimationCurve)
|
||||
return;
|
||||
double value = DockOverlayAnimationDuration->value()*2;
|
||||
auto animator = animator1;
|
||||
animator->setStartValue(0.0);
|
||||
animator->setEndValue(1.0);
|
||||
animator->setEasingCurve((QEasingCurve::Type)index);
|
||||
animator->setDuration(value);
|
||||
animator->start();
|
||||
}
|
||||
|
||||
// user code end
|
||||
// -----------------------------------------------------------------------------------
|
||||
152
src/Gui/PreferencePages/DlgSettingsAdvanced.h
Normal file
152
src/Gui/PreferencePages/DlgSettingsAdvanced.h
Normal file
@@ -0,0 +1,152 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 2020 Zheng Lei (realthunder) <realthunder.dev@gmail.com> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef GUI_DIALOG_DLGSETTINGSADVANCED_H
|
||||
#define GUI_DIALOG_DLGSETTINGSADVANCED_H
|
||||
|
||||
class QTimer;
|
||||
class QPropertyAnimation;
|
||||
|
||||
/*[[[cog
|
||||
import DlgSettingsAdvanced
|
||||
DlgSettingsAdvanced.declare_begin()
|
||||
]]]*/
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:482)
|
||||
#include <Gui/PropertyPage.h>
|
||||
#include <Gui/PrefWidgets.h>
|
||||
// Auto generated code (Tools/params_utils.py:489)
|
||||
class QLabel;
|
||||
class QGroupBox;
|
||||
|
||||
namespace Gui {
|
||||
namespace Dialog {
|
||||
/** Preference dialog for various advanced UI settings
|
||||
|
||||
* This class is auto generated by Gui/PreferencePages/DlgSettingsAdvanced.py. Modify that file
|
||||
* instead of this one, if you want to make any change. You need
|
||||
* to install Cog Python package for code generation:
|
||||
* @code
|
||||
* pip install cogapp
|
||||
* @endcode
|
||||
*
|
||||
* Once modified, you can regenerate the header and the source file,
|
||||
* @code
|
||||
* python3 -m cogapp -r Gui/PreferencePages/DlgSettingsAdvanced.h Gui/PreferencePages/DlgSettingsAdvanced.cpp
|
||||
* @endcode
|
||||
*/
|
||||
class DlgSettingsAdvanced : public Gui::Dialog::PreferencePage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DlgSettingsAdvanced( QWidget* parent = 0 );
|
||||
~DlgSettingsAdvanced();
|
||||
|
||||
void saveSettings();
|
||||
void loadSettings();
|
||||
void retranslateUi();
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
|
||||
private:
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:400)
|
||||
QGroupBox * groupTreeview = nullptr;
|
||||
QLabel *labelItemBackgroundPadding = nullptr;
|
||||
Gui::PrefSpinBox *ItemBackgroundPadding = nullptr;
|
||||
QLabel *labelFontSize = nullptr;
|
||||
Gui::PrefSpinBox *FontSize = nullptr;
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:400)
|
||||
QGroupBox * groupOverlay = nullptr;
|
||||
QLabel *labelDockOverlayWheelDelay = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayWheelDelay = nullptr;
|
||||
QLabel *labelDockOverlayAlphaRadius = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayAlphaRadius = nullptr;
|
||||
Gui::PrefCheckBox *DockOverlayCheckNaviCube = nullptr;
|
||||
QLabel *labelDockOverlayHintTriggerSize = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintTriggerSize = nullptr;
|
||||
QLabel *labelDockOverlayHintSize = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintSize = nullptr;
|
||||
QLabel *labelDockOverlayHintLeftOffset = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintLeftOffset = nullptr;
|
||||
QLabel *labelDockOverlayHintLeftLength = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintLeftLength = nullptr;
|
||||
QLabel *labelDockOverlayHintRightOffset = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintRightOffset = nullptr;
|
||||
QLabel *labelDockOverlayHintRightLength = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintRightLength = nullptr;
|
||||
QLabel *labelDockOverlayHintTopOffset = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintTopOffset = nullptr;
|
||||
QLabel *labelDockOverlayHintTopLength = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintTopLength = nullptr;
|
||||
QLabel *labelDockOverlayHintBottomOffset = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintBottomOffset = nullptr;
|
||||
QLabel *labelDockOverlayHintBottomLength = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintBottomLength = nullptr;
|
||||
Gui::PrefCheckBox *DockOverlayHintTabBar = nullptr;
|
||||
QLabel *labelDockOverlayHintDelay = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintDelay = nullptr;
|
||||
QLabel *labelDockOverlaySplitterHandleTimeout = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlaySplitterHandleTimeout = nullptr;
|
||||
Gui::PrefCheckBox *DockOverlayActivateOnHover = nullptr;
|
||||
QLabel *labelDockOverlayDelay = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayDelay = nullptr;
|
||||
QLabel *labelDockOverlayAnimationDuration = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayAnimationDuration = nullptr;
|
||||
QLabel *labelDockOverlayAnimationCurve = nullptr;
|
||||
Gui::PrefComboBox *DockOverlayAnimationCurve = nullptr;
|
||||
//[[[end]]]
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// user code start
|
||||
|
||||
Q_PROPERTY(qreal offset1 READ offset1 WRITE setOffset1 DESIGNABLE true SCRIPTABLE true)
|
||||
qreal offset1() const;
|
||||
void setOffset1(qreal);
|
||||
|
||||
private:
|
||||
void init();
|
||||
void onCurveChange(int index);
|
||||
|
||||
private:
|
||||
QTimer *timer;
|
||||
QPropertyAnimation *animator1;
|
||||
qreal t1 = 0;
|
||||
qreal a1 = 0, b1 = 0;
|
||||
|
||||
// user code end
|
||||
// -----------------------------------------------------------------------------------
|
||||
|
||||
/*[[[cog
|
||||
import DlgSettingsAdvanced
|
||||
DlgSettingsAdvanced.declare_end()
|
||||
]]]*/
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:536)
|
||||
};
|
||||
} // namespace Dialog
|
||||
} // namespace Gui
|
||||
//[[[end]]]
|
||||
#endif // GUI_DIALOG_DLGSETTINGSADVANCED_H
|
||||
@@ -34,10 +34,10 @@ sys.path.append(path.join(path.dirname(
|
||||
path.dirname(path.dirname(path.abspath(__file__)))), 'Gui'))
|
||||
import OverlayParams, TreeParams
|
||||
|
||||
Title = 'UI'
|
||||
Title = 'Advanced'
|
||||
NameSpace = 'Gui'
|
||||
ClassName = 'DlgSettingsUI'
|
||||
ClassDoc = 'Preference dialog for various UI related settings'
|
||||
ClassName = 'DlgSettingsAdvanced'
|
||||
ClassDoc = 'Preference dialog for various advanced UI settings'
|
||||
UserInit = 'init();'
|
||||
|
||||
_OverlayParams = { param.name : param for param in OverlayParams.Params }
|
||||
@@ -45,25 +45,11 @@ _TreeParams = { param.name : param for param in TreeParams.Params }
|
||||
|
||||
ParamGroup = (
|
||||
('Tree view', [_TreeParams[name] for name in (
|
||||
'ItemBackground',
|
||||
'ItemBackgroundPadding',
|
||||
'ResizableColumn',
|
||||
'VisibilityIcon',
|
||||
'HideColumn',
|
||||
'HideInternalNames',
|
||||
'HideScrollBar',
|
||||
'HideHeaderView',
|
||||
'IconSize',
|
||||
'FontSize',
|
||||
'ItemSpacing',
|
||||
)]),
|
||||
|
||||
('Overlay', [_OverlayParams[name] for name in (
|
||||
'DockOverlayHideTabBar',
|
||||
'DockOverlayHidePropertyViewScrollBar',
|
||||
'DockOverlayAutoView',
|
||||
'DockOverlayAutoMouseThrough',
|
||||
'DockOverlayWheelPassThrough',
|
||||
'DockOverlayWheelDelay',
|
||||
'DockOverlayAlphaRadius',
|
||||
'DockOverlayCheckNaviCube',
|
||||
@@ -77,7 +63,6 @@ ParamGroup = (
|
||||
'DockOverlayHintTopLength',
|
||||
'DockOverlayHintBottomOffset',
|
||||
'DockOverlayHintBottomLength',
|
||||
'DockOverlayHintTabBar',
|
||||
'DockOverlayHintDelay',
|
||||
'DockOverlaySplitterHandleTimeout',
|
||||
'DockOverlayActivateOnHover',
|
||||
@@ -1,175 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2009 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <QPushButton>
|
||||
#endif
|
||||
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/ParamHandler.h>
|
||||
|
||||
#include "DlgSettingsTheme.h"
|
||||
#include "ui_DlgSettingsTheme.h"
|
||||
|
||||
|
||||
using namespace Gui::Dialog;
|
||||
|
||||
/* TRANSLATOR Gui::Dialog::DlgSettingsTheme */
|
||||
|
||||
/**
|
||||
* Constructs a DlgSettingsTheme which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'
|
||||
*/
|
||||
DlgSettingsTheme::DlgSettingsTheme(QWidget* parent)
|
||||
: PreferencePage(parent)
|
||||
, ui(new Ui_DlgSettingsTheme)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
DlgSettingsTheme::~DlgSettingsTheme() = default;
|
||||
|
||||
void DlgSettingsTheme::saveSettings()
|
||||
{
|
||||
ui->ThemeAccentColor1->onSave();
|
||||
ui->ThemeAccentColor2->onSave();
|
||||
ui->ThemeAccentColor3->onSave();
|
||||
ui->StyleSheets->onSave();
|
||||
ui->OverlayStyleSheets->onSave();
|
||||
}
|
||||
|
||||
void DlgSettingsTheme::loadSettings()
|
||||
{
|
||||
ui->ThemeAccentColor1->onRestore();
|
||||
ui->ThemeAccentColor2->onRestore();
|
||||
ui->ThemeAccentColor3->onRestore();
|
||||
|
||||
loadStyleSheet();
|
||||
}
|
||||
|
||||
void DlgSettingsTheme::loadStyleSheet()
|
||||
{
|
||||
populateStylesheets("StyleSheet", "qss", ui->StyleSheets, "No style sheet");
|
||||
populateStylesheets("OverlayActiveStyleSheet", "overlay", ui->OverlayStyleSheets, "Auto");
|
||||
}
|
||||
|
||||
void DlgSettingsTheme::populateStylesheets(const char *key,
|
||||
const char *path,
|
||||
PrefComboBox *combo,
|
||||
const char *def,
|
||||
QStringList filter)
|
||||
{
|
||||
auto hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/MainWindow");
|
||||
// List all .qss/.css files
|
||||
QMap<QString, QString> cssFiles;
|
||||
QDir dir;
|
||||
if (filter.isEmpty()) {
|
||||
filter << QStringLiteral("*.qss");
|
||||
filter << QStringLiteral("*.css");
|
||||
}
|
||||
QFileInfoList fileNames;
|
||||
|
||||
// read from user, resource and built-in directory
|
||||
QStringList qssPaths = QDir::searchPaths(QString::fromUtf8(path));
|
||||
for (QStringList::iterator it = qssPaths.begin(); it != qssPaths.end(); ++it) {
|
||||
dir.setPath(*it);
|
||||
fileNames = dir.entryInfoList(filter, QDir::Files, QDir::Name);
|
||||
for (QFileInfoList::iterator jt = fileNames.begin(); jt != fileNames.end(); ++jt) {
|
||||
if (cssFiles.find(jt->baseName()) == cssFiles.end()) {
|
||||
cssFiles[jt->baseName()] = jt->fileName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
combo->clear();
|
||||
|
||||
// now add all unique items
|
||||
combo->addItem(tr(def), QStringLiteral(""));
|
||||
for (QMap<QString, QString>::iterator it = cssFiles.begin(); it != cssFiles.end(); ++it) {
|
||||
combo->addItem(it.key(), it.value());
|
||||
}
|
||||
|
||||
QString selectedStyleSheet = QString::fromUtf8(hGrp->GetASCII(key).c_str());
|
||||
int index = combo->findData(selectedStyleSheet);
|
||||
|
||||
// might be an absolute path name
|
||||
if (index < 0 && !selectedStyleSheet.isEmpty()) {
|
||||
QFileInfo fi(selectedStyleSheet);
|
||||
if (fi.isAbsolute()) {
|
||||
QString path = fi.absolutePath();
|
||||
if (qssPaths.indexOf(path) >= 0) {
|
||||
selectedStyleSheet = fi.fileName();
|
||||
}
|
||||
else {
|
||||
selectedStyleSheet = fi.absoluteFilePath();
|
||||
combo->addItem(fi.baseName(), selectedStyleSheet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
combo->setCurrentIndex(index);
|
||||
combo->onRestore();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the strings of the subwidgets using the current language.
|
||||
*/
|
||||
void DlgSettingsTheme::changeEvent(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
ui->retranslateUi(this);
|
||||
loadStyleSheet();
|
||||
}
|
||||
else {
|
||||
QWidget::changeEvent(e);
|
||||
}
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
void applyStyleSheet(ParameterGrp *hGrp)
|
||||
{
|
||||
auto sheet = hGrp->GetASCII("StyleSheet");
|
||||
bool tiledBG = hGrp->GetBool("TiledBackground", false);
|
||||
Gui::Application::Instance->setStyleSheet(QString::fromUtf8(sheet.c_str()), tiledBG);
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
void DlgSettingsTheme::attachObserver()
|
||||
{
|
||||
static ParamHandlers handlers;
|
||||
|
||||
auto handler = handlers.addDelayedHandler("BaseApp/Preferences/MainWindow",
|
||||
{"StyleSheet", "TiledBackground"},
|
||||
applyStyleSheet);
|
||||
handlers.addHandler("BaseApp/Preferences/Themes",
|
||||
{"ThemeAccentColor1", "ThemeAccentColor2", "ThemeAccentColor2"},
|
||||
handler);
|
||||
}
|
||||
|
||||
#include "moc_DlgSettingsTheme.cpp"
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2009 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef GUI_DIALOG_DLGSETTINGSTHEME_H
|
||||
#define GUI_DIALOG_DLGSETTINGSTHEME_H
|
||||
|
||||
#include <Gui/PropertyPage.h>
|
||||
#include <memory>
|
||||
|
||||
namespace Gui {
|
||||
|
||||
class PrefComboBox;
|
||||
|
||||
namespace Dialog {
|
||||
class Ui_DlgSettingsTheme;
|
||||
|
||||
/**
|
||||
* The DlgSettingsTheme class implements a preference page to change theme settings.
|
||||
* @author Pierre-Louis Boyer
|
||||
*/
|
||||
class DlgSettingsTheme : public PreferencePage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DlgSettingsTheme(QWidget* parent = nullptr);
|
||||
~DlgSettingsTheme() override;
|
||||
|
||||
void saveSettings() override;
|
||||
void loadSettings() override;
|
||||
|
||||
void loadStyleSheet();
|
||||
|
||||
static void attachObserver();
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *e) override;
|
||||
|
||||
void populateStylesheets(const char *key,
|
||||
const char *path,
|
||||
PrefComboBox *combo,
|
||||
const char *def,
|
||||
QStringList filter = QStringList());
|
||||
|
||||
private:
|
||||
std::unique_ptr<Ui_DlgSettingsTheme> ui;
|
||||
};
|
||||
|
||||
} // namespace Dialog
|
||||
} // namespace Gui
|
||||
|
||||
#endif // GUI_DIALOG_DLGSETTINGSTHEME_H
|
||||
@@ -1,224 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Gui::Dialog::DlgSettingsTheme</class>
|
||||
<widget class="QWidget" name="Gui::Dialog::DlgSettingsTheme">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>405</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Theme</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>This page let you customize your current theme. The offered settings are optional for theme developers so they may or may not have an effect in your current theme.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label1">
|
||||
<property name="text">
|
||||
<string>Accent color 1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::PrefColorButton" name="ThemeAccentColor1">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>This color might be used by your theme to let you customize it.</string>
|
||||
</property>
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>85</red>
|
||||
<green>123</green>
|
||||
<blue>182</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ThemeAccentColor1</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Themes</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label2">
|
||||
<property name="text">
|
||||
<string>Accent color 2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="Gui::PrefColorButton" name="ThemeAccentColor2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>This color might be used by your theme to let you customize it.</string>
|
||||
</property>
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>85</red>
|
||||
<green>123</green>
|
||||
<blue>182</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ThemeAccentColor2</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Themes</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label3">
|
||||
<property name="text">
|
||||
<string>Accent color 3</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="Gui::PrefColorButton" name="ThemeAccentColor3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>This color might be used by your theme to let you customize it.</string>
|
||||
</property>
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>85</red>
|
||||
<green>123</green>
|
||||
<blue>182</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ThemeAccentColor3</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Themes</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="styleSheetLabel">
|
||||
<property name="text">
|
||||
<string>Style sheet (advanced):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="Gui::PrefComboBox" name="StyleSheets">
|
||||
<property name="toolTip">
|
||||
<string>Style sheet how user interface will look like</string>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>MainWindow</cstring>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>StyleSheet</cstring>
|
||||
</property>
|
||||
<property name="prefType" stdset="0">
|
||||
<cstring></cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Overlay style sheet:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="Gui::PrefComboBox" name="OverlayStyleSheets">
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>MainWindow</cstring>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>OverlayActiveStyleSheet</cstring>
|
||||
</property>
|
||||
<property name="prefType" stdset="0">
|
||||
<cstring></cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="spacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>183</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Gui::ColorButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>Gui/Widgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefColorButton</class>
|
||||
<extends>Gui::ColorButton</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -1,709 +1,213 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 2020 Zheng Lei (realthunder) <realthunder.dev@gmail.com> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
****************************************************************************/
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2009 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include <QPropertyAnimation>
|
||||
#include <QTimer>
|
||||
|
||||
/*[[[cog
|
||||
import DlgSettingsUI
|
||||
DlgSettingsUI.define()
|
||||
]]]*/
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:567)
|
||||
#ifndef _PreComp_
|
||||
# include <QApplication>
|
||||
# include <QLabel>
|
||||
# include <QGroupBox>
|
||||
# include <QGridLayout>
|
||||
# include <QVBoxLayout>
|
||||
# include <QHBoxLayout>
|
||||
# include <QPushButton>
|
||||
#endif
|
||||
#include <Gui/TreeParams.h>
|
||||
#include <Gui/OverlayParams.h>
|
||||
// Auto generated code (Tools/params_utils.py:589)
|
||||
#include "Gui/PreferencePages/DlgSettingsUI.h"
|
||||
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/ParamHandler.h>
|
||||
|
||||
#include "DlgSettingsUI.h"
|
||||
#include "ui_DlgSettingsUI.h"
|
||||
|
||||
|
||||
using namespace Gui::Dialog;
|
||||
|
||||
/* TRANSLATOR Gui::Dialog::DlgSettingsUI */
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:598)
|
||||
/**
|
||||
* Constructs a DlgSettingsUI which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'
|
||||
*/
|
||||
DlgSettingsUI::DlgSettingsUI(QWidget* parent)
|
||||
: PreferencePage( parent )
|
||||
: PreferencePage(parent)
|
||||
, ui(new Ui_DlgSettingsUI)
|
||||
{
|
||||
|
||||
auto layout = new QVBoxLayout(this);
|
||||
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:420)
|
||||
groupTreeview = new QGroupBox(this);
|
||||
layout->addWidget(groupTreeview);
|
||||
auto layoutHorizTreeview = new QHBoxLayout(groupTreeview);
|
||||
auto layoutTreeview = new QGridLayout();
|
||||
layoutHorizTreeview->addLayout(layoutTreeview);
|
||||
layoutHorizTreeview->addStretch();
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelItemBackground = new QLabel(this);
|
||||
layoutTreeview->addWidget(labelItemBackground, 0, 0);
|
||||
ItemBackground = new Gui::PrefColorButton(this);
|
||||
layoutTreeview->addWidget(ItemBackground, 0, 1);
|
||||
ItemBackground->setPackedColor(Gui::TreeParams::defaultItemBackground());
|
||||
ItemBackground->setEntryName("ItemBackground");
|
||||
ItemBackground->setParamGrpPath("TreeView");
|
||||
ItemBackground->setAllowTransparency(true);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelItemBackgroundPadding = new QLabel(this);
|
||||
layoutTreeview->addWidget(labelItemBackgroundPadding, 1, 0);
|
||||
ItemBackgroundPadding = new Gui::PrefSpinBox(this);
|
||||
layoutTreeview->addWidget(ItemBackgroundPadding, 1, 1);
|
||||
ItemBackgroundPadding->setValue(Gui::TreeParams::defaultItemBackgroundPadding());
|
||||
ItemBackgroundPadding->setEntryName("ItemBackgroundPadding");
|
||||
ItemBackgroundPadding->setParamGrpPath("TreeView");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
ItemBackgroundPadding->setMinimum(0);
|
||||
ItemBackgroundPadding->setMaximum(100);
|
||||
ItemBackgroundPadding->setSingleStep(1);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
ResizableColumn = new Gui::PrefCheckBox(this);
|
||||
layoutTreeview->addWidget(ResizableColumn, 2, 0);
|
||||
ResizableColumn->setChecked(Gui::TreeParams::defaultResizableColumn());
|
||||
ResizableColumn->setEntryName("ResizableColumn");
|
||||
ResizableColumn->setParamGrpPath("TreeView");
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
VisibilityIcon = new Gui::PrefCheckBox(this);
|
||||
layoutTreeview->addWidget(VisibilityIcon, 3, 0);
|
||||
VisibilityIcon->setChecked(Gui::TreeParams::defaultVisibilityIcon());
|
||||
VisibilityIcon->setEntryName("VisibilityIcon");
|
||||
VisibilityIcon->setParamGrpPath("TreeView");
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
HideColumn = new Gui::PrefCheckBox(this);
|
||||
layoutTreeview->addWidget(HideColumn, 4, 0);
|
||||
HideColumn->setChecked(Gui::TreeParams::defaultHideColumn());
|
||||
HideColumn->setEntryName("HideColumn");
|
||||
HideColumn->setParamGrpPath("TreeView");
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
HideInternalNames = new Gui::PrefCheckBox(this);
|
||||
layoutTreeview->addWidget(HideInternalNames, 5, 0);
|
||||
HideInternalNames->setChecked(Gui::TreeParams::defaultHideInternalNames());
|
||||
HideInternalNames->setEntryName("HideInternalNames");
|
||||
HideInternalNames->setParamGrpPath("TreeView");
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
HideScrollBar = new Gui::PrefCheckBox(this);
|
||||
layoutTreeview->addWidget(HideScrollBar, 6, 0);
|
||||
HideScrollBar->setChecked(Gui::TreeParams::defaultHideScrollBar());
|
||||
HideScrollBar->setEntryName("HideScrollBar");
|
||||
HideScrollBar->setParamGrpPath("TreeView");
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
HideHeaderView = new Gui::PrefCheckBox(this);
|
||||
layoutTreeview->addWidget(HideHeaderView, 7, 0);
|
||||
HideHeaderView->setChecked(Gui::TreeParams::defaultHideHeaderView());
|
||||
HideHeaderView->setEntryName("HideHeaderView");
|
||||
HideHeaderView->setParamGrpPath("TreeView");
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelIconSize = new QLabel(this);
|
||||
layoutTreeview->addWidget(labelIconSize, 8, 0);
|
||||
IconSize = new Gui::PrefSpinBox(this);
|
||||
layoutTreeview->addWidget(IconSize, 8, 1);
|
||||
IconSize->setValue(Gui::TreeParams::defaultIconSize());
|
||||
IconSize->setEntryName("IconSize");
|
||||
IconSize->setParamGrpPath("TreeView");
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelFontSize = new QLabel(this);
|
||||
layoutTreeview->addWidget(labelFontSize, 9, 0);
|
||||
FontSize = new Gui::PrefSpinBox(this);
|
||||
layoutTreeview->addWidget(FontSize, 9, 1);
|
||||
FontSize->setValue(Gui::TreeParams::defaultFontSize());
|
||||
FontSize->setEntryName("FontSize");
|
||||
FontSize->setParamGrpPath("TreeView");
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelItemSpacing = new QLabel(this);
|
||||
layoutTreeview->addWidget(labelItemSpacing, 10, 0);
|
||||
ItemSpacing = new Gui::PrefSpinBox(this);
|
||||
layoutTreeview->addWidget(ItemSpacing, 10, 1);
|
||||
ItemSpacing->setValue(Gui::TreeParams::defaultItemSpacing());
|
||||
ItemSpacing->setEntryName("ItemSpacing");
|
||||
ItemSpacing->setParamGrpPath("TreeView");
|
||||
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:420)
|
||||
groupOverlay = new QGroupBox(this);
|
||||
layout->addWidget(groupOverlay);
|
||||
auto layoutHorizOverlay = new QHBoxLayout(groupOverlay);
|
||||
auto layoutOverlay = new QGridLayout();
|
||||
layoutHorizOverlay->addLayout(layoutOverlay);
|
||||
layoutHorizOverlay->addStretch();
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
DockOverlayHideTabBar = new Gui::PrefCheckBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHideTabBar, 0, 0);
|
||||
DockOverlayHideTabBar->setChecked(Gui::OverlayParams::defaultDockOverlayHideTabBar());
|
||||
DockOverlayHideTabBar->setEntryName("DockOverlayHideTabBar");
|
||||
DockOverlayHideTabBar->setParamGrpPath("View");
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
DockOverlayHidePropertyViewScrollBar = new Gui::PrefCheckBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHidePropertyViewScrollBar, 1, 0);
|
||||
DockOverlayHidePropertyViewScrollBar->setChecked(Gui::OverlayParams::defaultDockOverlayHidePropertyViewScrollBar());
|
||||
DockOverlayHidePropertyViewScrollBar->setEntryName("DockOverlayHidePropertyViewScrollBar");
|
||||
DockOverlayHidePropertyViewScrollBar->setParamGrpPath("View");
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
DockOverlayAutoView = new Gui::PrefCheckBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayAutoView, 2, 0);
|
||||
DockOverlayAutoView->setChecked(Gui::OverlayParams::defaultDockOverlayAutoView());
|
||||
DockOverlayAutoView->setEntryName("DockOverlayAutoView");
|
||||
DockOverlayAutoView->setParamGrpPath("View");
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
DockOverlayAutoMouseThrough = new Gui::PrefCheckBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayAutoMouseThrough, 3, 0);
|
||||
DockOverlayAutoMouseThrough->setChecked(Gui::OverlayParams::defaultDockOverlayAutoMouseThrough());
|
||||
DockOverlayAutoMouseThrough->setEntryName("DockOverlayAutoMouseThrough");
|
||||
DockOverlayAutoMouseThrough->setParamGrpPath("View");
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
DockOverlayWheelPassThrough = new Gui::PrefCheckBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayWheelPassThrough, 4, 0);
|
||||
DockOverlayWheelPassThrough->setChecked(Gui::OverlayParams::defaultDockOverlayWheelPassThrough());
|
||||
DockOverlayWheelPassThrough->setEntryName("DockOverlayWheelPassThrough");
|
||||
DockOverlayWheelPassThrough->setParamGrpPath("View");
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayWheelDelay = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayWheelDelay, 5, 0);
|
||||
DockOverlayWheelDelay = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayWheelDelay, 5, 1);
|
||||
DockOverlayWheelDelay->setValue(Gui::OverlayParams::defaultDockOverlayWheelDelay());
|
||||
DockOverlayWheelDelay->setEntryName("DockOverlayWheelDelay");
|
||||
DockOverlayWheelDelay->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayWheelDelay->setMinimum(0);
|
||||
DockOverlayWheelDelay->setMaximum(99999);
|
||||
DockOverlayWheelDelay->setSingleStep(1);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayAlphaRadius = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayAlphaRadius, 6, 0);
|
||||
DockOverlayAlphaRadius = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayAlphaRadius, 6, 1);
|
||||
DockOverlayAlphaRadius->setValue(Gui::OverlayParams::defaultDockOverlayAlphaRadius());
|
||||
DockOverlayAlphaRadius->setEntryName("DockOverlayAlphaRadius");
|
||||
DockOverlayAlphaRadius->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayAlphaRadius->setMinimum(1);
|
||||
DockOverlayAlphaRadius->setMaximum(100);
|
||||
DockOverlayAlphaRadius->setSingleStep(1);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
DockOverlayCheckNaviCube = new Gui::PrefCheckBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayCheckNaviCube, 7, 0);
|
||||
DockOverlayCheckNaviCube->setChecked(Gui::OverlayParams::defaultDockOverlayCheckNaviCube());
|
||||
DockOverlayCheckNaviCube->setEntryName("DockOverlayCheckNaviCube");
|
||||
DockOverlayCheckNaviCube->setParamGrpPath("View");
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintTriggerSize = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintTriggerSize, 8, 0);
|
||||
DockOverlayHintTriggerSize = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintTriggerSize, 8, 1);
|
||||
DockOverlayHintTriggerSize->setValue(Gui::OverlayParams::defaultDockOverlayHintTriggerSize());
|
||||
DockOverlayHintTriggerSize->setEntryName("DockOverlayHintTriggerSize");
|
||||
DockOverlayHintTriggerSize->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintTriggerSize->setMinimum(1);
|
||||
DockOverlayHintTriggerSize->setMaximum(100);
|
||||
DockOverlayHintTriggerSize->setSingleStep(1);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintSize = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintSize, 9, 0);
|
||||
DockOverlayHintSize = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintSize, 9, 1);
|
||||
DockOverlayHintSize->setValue(Gui::OverlayParams::defaultDockOverlayHintSize());
|
||||
DockOverlayHintSize->setEntryName("DockOverlayHintSize");
|
||||
DockOverlayHintSize->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintSize->setMinimum(1);
|
||||
DockOverlayHintSize->setMaximum(100);
|
||||
DockOverlayHintSize->setSingleStep(1);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintLeftOffset = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintLeftOffset, 10, 0);
|
||||
DockOverlayHintLeftOffset = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintLeftOffset, 10, 1);
|
||||
DockOverlayHintLeftOffset->setValue(Gui::OverlayParams::defaultDockOverlayHintLeftOffset());
|
||||
DockOverlayHintLeftOffset->setEntryName("DockOverlayHintLeftOffset");
|
||||
DockOverlayHintLeftOffset->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintLeftOffset->setMinimum(0);
|
||||
DockOverlayHintLeftOffset->setMaximum(10000);
|
||||
DockOverlayHintLeftOffset->setSingleStep(10);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintLeftLength = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintLeftLength, 11, 0);
|
||||
DockOverlayHintLeftLength = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintLeftLength, 11, 1);
|
||||
DockOverlayHintLeftLength->setValue(Gui::OverlayParams::defaultDockOverlayHintLeftLength());
|
||||
DockOverlayHintLeftLength->setEntryName("DockOverlayHintLeftLength");
|
||||
DockOverlayHintLeftLength->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintLeftLength->setMinimum(0);
|
||||
DockOverlayHintLeftLength->setMaximum(10000);
|
||||
DockOverlayHintLeftLength->setSingleStep(10);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintRightOffset = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintRightOffset, 12, 0);
|
||||
DockOverlayHintRightOffset = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintRightOffset, 12, 1);
|
||||
DockOverlayHintRightOffset->setValue(Gui::OverlayParams::defaultDockOverlayHintRightOffset());
|
||||
DockOverlayHintRightOffset->setEntryName("DockOverlayHintRightOffset");
|
||||
DockOverlayHintRightOffset->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintRightOffset->setMinimum(0);
|
||||
DockOverlayHintRightOffset->setMaximum(10000);
|
||||
DockOverlayHintRightOffset->setSingleStep(10);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintRightLength = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintRightLength, 13, 0);
|
||||
DockOverlayHintRightLength = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintRightLength, 13, 1);
|
||||
DockOverlayHintRightLength->setValue(Gui::OverlayParams::defaultDockOverlayHintRightLength());
|
||||
DockOverlayHintRightLength->setEntryName("DockOverlayHintRightLength");
|
||||
DockOverlayHintRightLength->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintRightLength->setMinimum(0);
|
||||
DockOverlayHintRightLength->setMaximum(10000);
|
||||
DockOverlayHintRightLength->setSingleStep(10);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintTopOffset = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintTopOffset, 14, 0);
|
||||
DockOverlayHintTopOffset = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintTopOffset, 14, 1);
|
||||
DockOverlayHintTopOffset->setValue(Gui::OverlayParams::defaultDockOverlayHintTopOffset());
|
||||
DockOverlayHintTopOffset->setEntryName("DockOverlayHintTopOffset");
|
||||
DockOverlayHintTopOffset->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintTopOffset->setMinimum(0);
|
||||
DockOverlayHintTopOffset->setMaximum(10000);
|
||||
DockOverlayHintTopOffset->setSingleStep(10);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintTopLength = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintTopLength, 15, 0);
|
||||
DockOverlayHintTopLength = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintTopLength, 15, 1);
|
||||
DockOverlayHintTopLength->setValue(Gui::OverlayParams::defaultDockOverlayHintTopLength());
|
||||
DockOverlayHintTopLength->setEntryName("DockOverlayHintTopLength");
|
||||
DockOverlayHintTopLength->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintTopLength->setMinimum(0);
|
||||
DockOverlayHintTopLength->setMaximum(10000);
|
||||
DockOverlayHintTopLength->setSingleStep(10);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintBottomOffset = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintBottomOffset, 16, 0);
|
||||
DockOverlayHintBottomOffset = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintBottomOffset, 16, 1);
|
||||
DockOverlayHintBottomOffset->setValue(Gui::OverlayParams::defaultDockOverlayHintBottomOffset());
|
||||
DockOverlayHintBottomOffset->setEntryName("DockOverlayHintBottomOffset");
|
||||
DockOverlayHintBottomOffset->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintBottomOffset->setMinimum(0);
|
||||
DockOverlayHintBottomOffset->setMaximum(10000);
|
||||
DockOverlayHintBottomOffset->setSingleStep(10);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintBottomLength = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintBottomLength, 17, 0);
|
||||
DockOverlayHintBottomLength = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintBottomLength, 17, 1);
|
||||
DockOverlayHintBottomLength->setValue(Gui::OverlayParams::defaultDockOverlayHintBottomLength());
|
||||
DockOverlayHintBottomLength->setEntryName("DockOverlayHintBottomLength");
|
||||
DockOverlayHintBottomLength->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintBottomLength->setMinimum(0);
|
||||
DockOverlayHintBottomLength->setMaximum(10000);
|
||||
DockOverlayHintBottomLength->setSingleStep(10);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
DockOverlayHintTabBar = new Gui::PrefCheckBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintTabBar, 18, 0);
|
||||
DockOverlayHintTabBar->setChecked(Gui::OverlayParams::defaultDockOverlayHintTabBar());
|
||||
DockOverlayHintTabBar->setEntryName("DockOverlayHintTabBar");
|
||||
DockOverlayHintTabBar->setParamGrpPath("View");
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayHintDelay = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayHintDelay, 19, 0);
|
||||
DockOverlayHintDelay = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayHintDelay, 19, 1);
|
||||
DockOverlayHintDelay->setValue(Gui::OverlayParams::defaultDockOverlayHintDelay());
|
||||
DockOverlayHintDelay->setEntryName("DockOverlayHintDelay");
|
||||
DockOverlayHintDelay->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayHintDelay->setMinimum(0);
|
||||
DockOverlayHintDelay->setMaximum(1000);
|
||||
DockOverlayHintDelay->setSingleStep(100);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlaySplitterHandleTimeout = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlaySplitterHandleTimeout, 20, 0);
|
||||
DockOverlaySplitterHandleTimeout = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlaySplitterHandleTimeout, 20, 1);
|
||||
DockOverlaySplitterHandleTimeout->setValue(Gui::OverlayParams::defaultDockOverlaySplitterHandleTimeout());
|
||||
DockOverlaySplitterHandleTimeout->setEntryName("DockOverlaySplitterHandleTimeout");
|
||||
DockOverlaySplitterHandleTimeout->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlaySplitterHandleTimeout->setMinimum(0);
|
||||
DockOverlaySplitterHandleTimeout->setMaximum(99999);
|
||||
DockOverlaySplitterHandleTimeout->setSingleStep(100);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
DockOverlayActivateOnHover = new Gui::PrefCheckBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayActivateOnHover, 21, 0);
|
||||
DockOverlayActivateOnHover->setChecked(Gui::OverlayParams::defaultDockOverlayActivateOnHover());
|
||||
DockOverlayActivateOnHover->setEntryName("DockOverlayActivateOnHover");
|
||||
DockOverlayActivateOnHover->setParamGrpPath("View");
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayDelay = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayDelay, 22, 0);
|
||||
DockOverlayDelay = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayDelay, 22, 1);
|
||||
DockOverlayDelay->setValue(Gui::OverlayParams::defaultDockOverlayDelay());
|
||||
DockOverlayDelay->setEntryName("DockOverlayDelay");
|
||||
DockOverlayDelay->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayDelay->setMinimum(0);
|
||||
DockOverlayDelay->setMaximum(5000);
|
||||
DockOverlayDelay->setSingleStep(100);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayAnimationDuration = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayAnimationDuration, 23, 0);
|
||||
DockOverlayAnimationDuration = new Gui::PrefSpinBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayAnimationDuration, 23, 1);
|
||||
DockOverlayAnimationDuration->setValue(Gui::OverlayParams::defaultDockOverlayAnimationDuration());
|
||||
DockOverlayAnimationDuration->setEntryName("DockOverlayAnimationDuration");
|
||||
DockOverlayAnimationDuration->setParamGrpPath("View");
|
||||
// Auto generated code (Tools/params_utils.py:1134)
|
||||
DockOverlayAnimationDuration->setMinimum(0);
|
||||
DockOverlayAnimationDuration->setMaximum(5000);
|
||||
DockOverlayAnimationDuration->setSingleStep(100);
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:433)
|
||||
labelDockOverlayAnimationCurve = new QLabel(this);
|
||||
layoutOverlay->addWidget(labelDockOverlayAnimationCurve, 24, 0);
|
||||
DockOverlayAnimationCurve = new Gui::PrefComboBox(this);
|
||||
layoutOverlay->addWidget(DockOverlayAnimationCurve, 24, 1);
|
||||
DockOverlayAnimationCurve->setEntryName("DockOverlayAnimationCurve");
|
||||
DockOverlayAnimationCurve->setParamGrpPath("View");
|
||||
// Auto generated code (Gui/OverlayParams.py:94)
|
||||
for (const auto &item : OverlayParams::AnimationCurveTypes)
|
||||
DockOverlayAnimationCurve->addItem(item);
|
||||
DockOverlayAnimationCurve->setCurrentIndex(Gui::OverlayParams::defaultDockOverlayAnimationCurve());
|
||||
layout->addItem(new QSpacerItem(40, 20, QSizePolicy::Fixed, QSizePolicy::Expanding));
|
||||
retranslateUi();
|
||||
// Auto generated code (Tools/params_utils.py:607)
|
||||
init();
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:614)
|
||||
DlgSettingsUI::~DlgSettingsUI()
|
||||
{
|
||||
}
|
||||
/**
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
DlgSettingsUI::~DlgSettingsUI() = default;
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:622)
|
||||
void DlgSettingsUI::saveSettings()
|
||||
{
|
||||
// Auto generated code (Tools/params_utils.py:461)
|
||||
ItemBackground->onSave();
|
||||
ItemBackgroundPadding->onSave();
|
||||
ResizableColumn->onSave();
|
||||
VisibilityIcon->onSave();
|
||||
HideColumn->onSave();
|
||||
HideInternalNames->onSave();
|
||||
HideScrollBar->onSave();
|
||||
HideHeaderView->onSave();
|
||||
IconSize->onSave();
|
||||
FontSize->onSave();
|
||||
ItemSpacing->onSave();
|
||||
DockOverlayHideTabBar->onSave();
|
||||
DockOverlayHidePropertyViewScrollBar->onSave();
|
||||
DockOverlayAutoView->onSave();
|
||||
DockOverlayAutoMouseThrough->onSave();
|
||||
DockOverlayWheelPassThrough->onSave();
|
||||
DockOverlayWheelDelay->onSave();
|
||||
DockOverlayAlphaRadius->onSave();
|
||||
DockOverlayCheckNaviCube->onSave();
|
||||
DockOverlayHintTriggerSize->onSave();
|
||||
DockOverlayHintSize->onSave();
|
||||
DockOverlayHintLeftOffset->onSave();
|
||||
DockOverlayHintLeftLength->onSave();
|
||||
DockOverlayHintRightOffset->onSave();
|
||||
DockOverlayHintRightLength->onSave();
|
||||
DockOverlayHintTopOffset->onSave();
|
||||
DockOverlayHintTopLength->onSave();
|
||||
DockOverlayHintBottomOffset->onSave();
|
||||
DockOverlayHintBottomLength->onSave();
|
||||
DockOverlayHintTabBar->onSave();
|
||||
DockOverlayHintDelay->onSave();
|
||||
DockOverlaySplitterHandleTimeout->onSave();
|
||||
DockOverlayActivateOnHover->onSave();
|
||||
DockOverlayDelay->onSave();
|
||||
DockOverlayAnimationDuration->onSave();
|
||||
DockOverlayAnimationCurve->onSave();
|
||||
// Theme
|
||||
ui->ThemeAccentColor1->onSave();
|
||||
ui->ThemeAccentColor2->onSave();
|
||||
ui->ThemeAccentColor3->onSave();
|
||||
ui->StyleSheets->onSave();
|
||||
ui->OverlayStyleSheets->onSave();
|
||||
|
||||
// Tree View
|
||||
ui->iconSizeSpinBox->onSave();
|
||||
ui->rowSpacingSpinBox->onSave();
|
||||
ui->resizableColumnsCheckBox->onSave();
|
||||
ui->showVisibilityIconCheckBox->onSave();
|
||||
ui->hideDescriptionCheckBox->onSave();
|
||||
ui->hideInternalNamesCheckBox->onSave();
|
||||
ui->hideTreeViewScrollBarCheckBox->onSave();
|
||||
ui->hideHeaderCheckBox->onSave();
|
||||
|
||||
// Overlay
|
||||
ui->hideTabBarCheckBox->onSave();
|
||||
ui->hintShowTabBarCheckBox->onSave();
|
||||
ui->hidePropertyViewScrollBarCheckBox->onSave();
|
||||
ui->overlayAutoHideCheckBox->onSave();
|
||||
ui->mouseClickPassThroughCheckBox->onSave();
|
||||
ui->mouseWheelPassThroughCheckBox->onSave();
|
||||
}
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:631)
|
||||
void DlgSettingsUI::loadSettings()
|
||||
{
|
||||
// Auto generated code (Tools/params_utils.py:449)
|
||||
ItemBackground->onRestore();
|
||||
ItemBackgroundPadding->onRestore();
|
||||
ResizableColumn->onRestore();
|
||||
VisibilityIcon->onRestore();
|
||||
HideColumn->onRestore();
|
||||
HideInternalNames->onRestore();
|
||||
HideScrollBar->onRestore();
|
||||
HideHeaderView->onRestore();
|
||||
IconSize->onRestore();
|
||||
FontSize->onRestore();
|
||||
ItemSpacing->onRestore();
|
||||
DockOverlayHideTabBar->onRestore();
|
||||
DockOverlayHidePropertyViewScrollBar->onRestore();
|
||||
DockOverlayAutoView->onRestore();
|
||||
DockOverlayAutoMouseThrough->onRestore();
|
||||
DockOverlayWheelPassThrough->onRestore();
|
||||
DockOverlayWheelDelay->onRestore();
|
||||
DockOverlayAlphaRadius->onRestore();
|
||||
DockOverlayCheckNaviCube->onRestore();
|
||||
DockOverlayHintTriggerSize->onRestore();
|
||||
DockOverlayHintSize->onRestore();
|
||||
DockOverlayHintLeftOffset->onRestore();
|
||||
DockOverlayHintLeftLength->onRestore();
|
||||
DockOverlayHintRightOffset->onRestore();
|
||||
DockOverlayHintRightLength->onRestore();
|
||||
DockOverlayHintTopOffset->onRestore();
|
||||
DockOverlayHintTopLength->onRestore();
|
||||
DockOverlayHintBottomOffset->onRestore();
|
||||
DockOverlayHintBottomLength->onRestore();
|
||||
DockOverlayHintTabBar->onRestore();
|
||||
DockOverlayHintDelay->onRestore();
|
||||
DockOverlaySplitterHandleTimeout->onRestore();
|
||||
DockOverlayActivateOnHover->onRestore();
|
||||
DockOverlayDelay->onRestore();
|
||||
DockOverlayAnimationDuration->onRestore();
|
||||
DockOverlayAnimationCurve->onRestore();
|
||||
// Theme
|
||||
ui->ThemeAccentColor1->onRestore();
|
||||
ui->ThemeAccentColor2->onRestore();
|
||||
ui->ThemeAccentColor3->onRestore();
|
||||
|
||||
// Tree View
|
||||
ui->iconSizeSpinBox->onRestore();
|
||||
ui->rowSpacingSpinBox->onRestore();
|
||||
ui->resizableColumnsCheckBox->onRestore();
|
||||
ui->showVisibilityIconCheckBox->onRestore();
|
||||
ui->hideDescriptionCheckBox->onRestore();
|
||||
ui->hideInternalNamesCheckBox->onRestore();
|
||||
ui->hideTreeViewScrollBarCheckBox->onRestore();
|
||||
ui->hideHeaderCheckBox->onRestore();
|
||||
|
||||
// Overlay
|
||||
ui->hideTabBarCheckBox->onRestore();
|
||||
ui->hintShowTabBarCheckBox->onRestore();
|
||||
ui->hidePropertyViewScrollBarCheckBox->onRestore();
|
||||
ui->overlayAutoHideCheckBox->onRestore();
|
||||
ui->mouseClickPassThroughCheckBox->onRestore();
|
||||
ui->mouseWheelPassThroughCheckBox->onRestore();
|
||||
|
||||
loadStyleSheet();
|
||||
}
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:640)
|
||||
void DlgSettingsUI::retranslateUi()
|
||||
void DlgSettingsUI::loadStyleSheet()
|
||||
{
|
||||
setWindowTitle(QObject::tr("UI"));
|
||||
groupTreeview->setTitle(QObject::tr("Tree view"));
|
||||
ItemBackground->setToolTip(QApplication::translate("TreeParams", Gui::TreeParams::docItemBackground()));
|
||||
labelItemBackground->setText(QObject::tr("Item background color"));
|
||||
labelItemBackground->setToolTip(ItemBackground->toolTip());
|
||||
ItemBackgroundPadding->setToolTip(QApplication::translate("TreeParams", Gui::TreeParams::docItemBackgroundPadding()));
|
||||
labelItemBackgroundPadding->setText(QObject::tr("Item background padding"));
|
||||
labelItemBackgroundPadding->setToolTip(ItemBackgroundPadding->toolTip());
|
||||
ResizableColumn->setToolTip(QApplication::translate("TreeParams", Gui::TreeParams::docResizableColumn()));
|
||||
ResizableColumn->setText(QObject::tr("Resizable columns"));
|
||||
VisibilityIcon->setToolTip(QApplication::translate("TreeParams", Gui::TreeParams::docVisibilityIcon()));
|
||||
VisibilityIcon->setText(QObject::tr("Show visibility icon"));
|
||||
HideColumn->setToolTip(QApplication::translate("TreeParams", Gui::TreeParams::docHideColumn()));
|
||||
HideColumn->setText(QObject::tr("Hide Description"));
|
||||
HideInternalNames->setToolTip(QApplication::translate("TreeParams", Gui::TreeParams::docHideInternalNames()));
|
||||
HideInternalNames->setText(QObject::tr("Hide Internal Names"));
|
||||
HideScrollBar->setToolTip(QApplication::translate("TreeParams", Gui::TreeParams::docHideScrollBar()));
|
||||
HideScrollBar->setText(QObject::tr("Hide scroll bar"));
|
||||
HideHeaderView->setToolTip(QApplication::translate("TreeParams", Gui::TreeParams::docHideHeaderView()));
|
||||
HideHeaderView->setText(QObject::tr("Hide header"));
|
||||
IconSize->setToolTip(QApplication::translate("TreeParams", Gui::TreeParams::docIconSize()));
|
||||
labelIconSize->setText(QObject::tr("IconSize"));
|
||||
labelIconSize->setToolTip(IconSize->toolTip());
|
||||
FontSize->setToolTip(QApplication::translate("TreeParams", Gui::TreeParams::docFontSize()));
|
||||
labelFontSize->setText(QObject::tr("FontSize"));
|
||||
labelFontSize->setToolTip(FontSize->toolTip());
|
||||
ItemSpacing->setToolTip(QApplication::translate("TreeParams", Gui::TreeParams::docItemSpacing()));
|
||||
labelItemSpacing->setText(QObject::tr("ItemSpacing"));
|
||||
labelItemSpacing->setToolTip(ItemSpacing->toolTip());
|
||||
groupOverlay->setTitle(QObject::tr("Overlay"));
|
||||
DockOverlayHideTabBar->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHideTabBar()));
|
||||
DockOverlayHideTabBar->setText(QObject::tr("Hide tab bar"));
|
||||
DockOverlayHidePropertyViewScrollBar->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHidePropertyViewScrollBar()));
|
||||
DockOverlayHidePropertyViewScrollBar->setText(QObject::tr("Hide property view scroll bar"));
|
||||
DockOverlayAutoView->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayAutoView()));
|
||||
DockOverlayAutoView->setText(QObject::tr("Auto hide in non 3D view"));
|
||||
DockOverlayAutoMouseThrough->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayAutoMouseThrough()));
|
||||
DockOverlayAutoMouseThrough->setText(QObject::tr("Auto mouse pass through"));
|
||||
DockOverlayWheelPassThrough->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayWheelPassThrough()));
|
||||
DockOverlayWheelPassThrough->setText(QObject::tr("Auto mouse wheel pass through"));
|
||||
DockOverlayWheelDelay->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayWheelDelay()));
|
||||
labelDockOverlayWheelDelay->setText(QObject::tr("Delay mouse wheel pass through (ms)"));
|
||||
labelDockOverlayWheelDelay->setToolTip(DockOverlayWheelDelay->toolTip());
|
||||
DockOverlayAlphaRadius->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayAlphaRadius()));
|
||||
labelDockOverlayAlphaRadius->setText(QObject::tr("Alpha test radius"));
|
||||
labelDockOverlayAlphaRadius->setToolTip(DockOverlayAlphaRadius->toolTip());
|
||||
DockOverlayCheckNaviCube->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayCheckNaviCube()));
|
||||
DockOverlayCheckNaviCube->setText(QObject::tr("Check Navigation Cube"));
|
||||
DockOverlayHintTriggerSize->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintTriggerSize()));
|
||||
labelDockOverlayHintTriggerSize->setText(QObject::tr("Hint trigger size"));
|
||||
labelDockOverlayHintTriggerSize->setToolTip(DockOverlayHintTriggerSize->toolTip());
|
||||
DockOverlayHintSize->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintSize()));
|
||||
labelDockOverlayHintSize->setText(QObject::tr("Hint width"));
|
||||
labelDockOverlayHintSize->setToolTip(DockOverlayHintSize->toolTip());
|
||||
DockOverlayHintLeftOffset->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintLeftOffset()));
|
||||
labelDockOverlayHintLeftOffset->setText(QObject::tr("Left panel hint offset"));
|
||||
labelDockOverlayHintLeftOffset->setToolTip(DockOverlayHintLeftOffset->toolTip());
|
||||
DockOverlayHintLeftLength->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintLeftLength()));
|
||||
labelDockOverlayHintLeftLength->setText(QObject::tr("Left panel hint length"));
|
||||
labelDockOverlayHintLeftLength->setToolTip(DockOverlayHintLeftLength->toolTip());
|
||||
DockOverlayHintRightOffset->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintRightOffset()));
|
||||
labelDockOverlayHintRightOffset->setText(QObject::tr("Right panel hint offset"));
|
||||
labelDockOverlayHintRightOffset->setToolTip(DockOverlayHintRightOffset->toolTip());
|
||||
DockOverlayHintRightLength->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintRightLength()));
|
||||
labelDockOverlayHintRightLength->setText(QObject::tr("Right panel hint length"));
|
||||
labelDockOverlayHintRightLength->setToolTip(DockOverlayHintRightLength->toolTip());
|
||||
DockOverlayHintTopOffset->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintTopOffset()));
|
||||
labelDockOverlayHintTopOffset->setText(QObject::tr("Top panel hint offset"));
|
||||
labelDockOverlayHintTopOffset->setToolTip(DockOverlayHintTopOffset->toolTip());
|
||||
DockOverlayHintTopLength->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintTopLength()));
|
||||
labelDockOverlayHintTopLength->setText(QObject::tr("Top panel hint length"));
|
||||
labelDockOverlayHintTopLength->setToolTip(DockOverlayHintTopLength->toolTip());
|
||||
DockOverlayHintBottomOffset->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintBottomOffset()));
|
||||
labelDockOverlayHintBottomOffset->setText(QObject::tr("Bottom panel hint offset"));
|
||||
labelDockOverlayHintBottomOffset->setToolTip(DockOverlayHintBottomOffset->toolTip());
|
||||
DockOverlayHintBottomLength->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintBottomLength()));
|
||||
labelDockOverlayHintBottomLength->setText(QObject::tr("Bottom panel hint length"));
|
||||
labelDockOverlayHintBottomLength->setToolTip(DockOverlayHintBottomLength->toolTip());
|
||||
DockOverlayHintTabBar->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintTabBar()));
|
||||
DockOverlayHintTabBar->setText(QObject::tr("Hint show tab bar"));
|
||||
DockOverlayHintDelay->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayHintDelay()));
|
||||
labelDockOverlayHintDelay->setText(QObject::tr("Hint delay (ms)"));
|
||||
labelDockOverlayHintDelay->setToolTip(DockOverlayHintDelay->toolTip());
|
||||
DockOverlaySplitterHandleTimeout->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlaySplitterHandleTimeout()));
|
||||
labelDockOverlaySplitterHandleTimeout->setText(QObject::tr("Splitter auto hide delay (ms)"));
|
||||
labelDockOverlaySplitterHandleTimeout->setToolTip(DockOverlaySplitterHandleTimeout->toolTip());
|
||||
DockOverlayActivateOnHover->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayActivateOnHover()));
|
||||
DockOverlayActivateOnHover->setText(QObject::tr("Activate on hover"));
|
||||
DockOverlayDelay->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayDelay()));
|
||||
labelDockOverlayDelay->setText(QObject::tr("Layout delay (ms)"));
|
||||
labelDockOverlayDelay->setToolTip(DockOverlayDelay->toolTip());
|
||||
DockOverlayAnimationDuration->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayAnimationDuration()));
|
||||
labelDockOverlayAnimationDuration->setText(QObject::tr("Animation duration (ms)"));
|
||||
labelDockOverlayAnimationDuration->setToolTip(DockOverlayAnimationDuration->toolTip());
|
||||
DockOverlayAnimationCurve->setToolTip(QApplication::translate("OverlayParams", Gui::OverlayParams::docDockOverlayAnimationCurve()));
|
||||
labelDockOverlayAnimationCurve->setText(QObject::tr("Animation curve type"));
|
||||
labelDockOverlayAnimationCurve->setToolTip(DockOverlayAnimationCurve->toolTip());
|
||||
populateStylesheets("StyleSheet", "qss", ui->StyleSheets, "No style sheet");
|
||||
populateStylesheets("OverlayActiveStyleSheet", "overlay", ui->OverlayStyleSheets, "Auto");
|
||||
}
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:657)
|
||||
void DlgSettingsUI::populateStylesheets(const char *key,
|
||||
const char *path,
|
||||
PrefComboBox *combo,
|
||||
const char *def,
|
||||
QStringList filter)
|
||||
{
|
||||
auto hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/MainWindow");
|
||||
// List all .qss/.css files
|
||||
QMap<QString, QString> cssFiles;
|
||||
QDir dir;
|
||||
if (filter.isEmpty()) {
|
||||
filter << QStringLiteral("*.qss");
|
||||
filter << QStringLiteral("*.css");
|
||||
}
|
||||
QFileInfoList fileNames;
|
||||
|
||||
// read from user, resource and built-in directory
|
||||
QStringList qssPaths = QDir::searchPaths(QString::fromUtf8(path));
|
||||
for (QStringList::iterator it = qssPaths.begin(); it != qssPaths.end(); ++it) {
|
||||
dir.setPath(*it);
|
||||
fileNames = dir.entryInfoList(filter, QDir::Files, QDir::Name);
|
||||
for (QFileInfoList::iterator jt = fileNames.begin(); jt != fileNames.end(); ++jt) {
|
||||
if (cssFiles.find(jt->baseName()) == cssFiles.end()) {
|
||||
cssFiles[jt->baseName()] = jt->fileName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
combo->clear();
|
||||
|
||||
// now add all unique items
|
||||
combo->addItem(tr(def), QStringLiteral(""));
|
||||
for (QMap<QString, QString>::iterator it = cssFiles.begin(); it != cssFiles.end(); ++it) {
|
||||
combo->addItem(it.key(), it.value());
|
||||
}
|
||||
|
||||
QString selectedStyleSheet = QString::fromUtf8(hGrp->GetASCII(key).c_str());
|
||||
int index = combo->findData(selectedStyleSheet);
|
||||
|
||||
// might be an absolute path name
|
||||
if (index < 0 && !selectedStyleSheet.isEmpty()) {
|
||||
QFileInfo fi(selectedStyleSheet);
|
||||
if (fi.isAbsolute()) {
|
||||
QString path = fi.absolutePath();
|
||||
if (qssPaths.indexOf(path) >= 0) {
|
||||
selectedStyleSheet = fi.fileName();
|
||||
}
|
||||
else {
|
||||
selectedStyleSheet = fi.absoluteFilePath();
|
||||
combo->addItem(fi.baseName(), selectedStyleSheet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
combo->setCurrentIndex(index);
|
||||
combo->onRestore();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the strings of the subwidgets using the current language.
|
||||
*/
|
||||
void DlgSettingsUI::changeEvent(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
retranslateUi();
|
||||
ui->retranslateUi(this);
|
||||
loadStyleSheet();
|
||||
}
|
||||
else {
|
||||
QWidget::changeEvent(e);
|
||||
}
|
||||
QWidget::changeEvent(e);
|
||||
}
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:670)
|
||||
namespace {
|
||||
|
||||
void applyStyleSheet(ParameterGrp *hGrp)
|
||||
{
|
||||
auto sheet = hGrp->GetASCII("StyleSheet");
|
||||
bool tiledBG = hGrp->GetBool("TiledBackground", false);
|
||||
Gui::Application::Instance->setStyleSheet(QString::fromUtf8(sheet.c_str()), tiledBG);
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
void DlgSettingsUI::attachObserver()
|
||||
{
|
||||
static ParamHandlers handlers;
|
||||
|
||||
auto handler = handlers.addDelayedHandler("BaseApp/Preferences/MainWindow",
|
||||
{"StyleSheet", "TiledBackground"},
|
||||
applyStyleSheet);
|
||||
handlers.addHandler("BaseApp/Preferences/Themes",
|
||||
{"ThemeAccentColor1", "ThemeAccentColor2", "ThemeAccentColor2"},
|
||||
handler);
|
||||
}
|
||||
|
||||
#include "moc_DlgSettingsUI.cpp"
|
||||
//[[[end]]]
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// user code start
|
||||
|
||||
void DlgSettingsUI::init()
|
||||
{
|
||||
timer = new QTimer(this);
|
||||
timer->setSingleShot(true);
|
||||
|
||||
animator1 = new QPropertyAnimation(this, "offset1", this);
|
||||
QObject::connect(animator1, &QPropertyAnimation::stateChanged, [this]() {
|
||||
if (animator1->state() != QAbstractAnimation::Running)
|
||||
timer->start(1000);
|
||||
});
|
||||
|
||||
QObject::connect(DockOverlayAnimationCurve, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DlgSettingsUI::onCurveChange);
|
||||
|
||||
QObject::connect(timer, &QTimer::timeout, [this]() {
|
||||
if (animator1->state() != QAbstractAnimation::Running) {
|
||||
this->setOffset1(1);
|
||||
this->a1 = this->b1 = 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
qreal DlgSettingsUI::offset1() const
|
||||
{
|
||||
return this->t1;
|
||||
}
|
||||
|
||||
void DlgSettingsUI::setOffset1(qreal t)
|
||||
{
|
||||
if (t == this->t1)
|
||||
return;
|
||||
this->t1 = t;
|
||||
QLabel *label = this->labelDockOverlayAnimationCurve;
|
||||
if (this->a1 == this->b1) {
|
||||
this->a1 = label->x();
|
||||
QPoint pos(width(), 0);
|
||||
this->b1 = width() - label->fontMetrics().boundingRect(label->text()).width() - 5;
|
||||
}
|
||||
label->move(this->a1 * (1-t) + this->b1 * t, label->y());
|
||||
}
|
||||
|
||||
void DlgSettingsUI::onCurveChange(int index)
|
||||
{
|
||||
if (sender() != DockOverlayAnimationCurve)
|
||||
return;
|
||||
double value = DockOverlayAnimationDuration->value()*2;
|
||||
auto animator = animator1;
|
||||
animator->setStartValue(0.0);
|
||||
animator->setEndValue(1.0);
|
||||
animator->setEasingCurve((QEasingCurve::Type)index);
|
||||
animator->setDuration(value);
|
||||
animator->start();
|
||||
}
|
||||
|
||||
// user code end
|
||||
// -----------------------------------------------------------------------------------
|
||||
|
||||
@@ -1,169 +1,72 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 2020 Zheng Lei (realthunder) <realthunder.dev@gmail.com> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
****************************************************************************/
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2009 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef GUI_DIALOG_DLGSETTINGSUI_H
|
||||
#define GUI_DIALOG_DLGSETTINGSUI_H
|
||||
|
||||
class QTimer;
|
||||
class QPropertyAnimation;
|
||||
#ifndef GUI_DIALOG_DlgSettingsUI_H
|
||||
#define GUI_DIALOG_DlgSettingsUI_H
|
||||
|
||||
/*[[[cog
|
||||
import DlgSettingsUI
|
||||
DlgSettingsUI.declare_begin()
|
||||
]]]*/
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:482)
|
||||
#include <Gui/PropertyPage.h>
|
||||
#include <Gui/PrefWidgets.h>
|
||||
// Auto generated code (Tools/params_utils.py:489)
|
||||
class QLabel;
|
||||
class QGroupBox;
|
||||
#include <memory>
|
||||
|
||||
namespace Gui {
|
||||
namespace Dialog {
|
||||
/** Preference dialog for various UI related settings
|
||||
|
||||
* This class is auto generated by Gui/PreferencePages/DlgSettingsUI.py. Modify that file
|
||||
* instead of this one, if you want to make any change. You need
|
||||
* to install Cog Python package for code generation:
|
||||
* @code
|
||||
* pip install cogapp
|
||||
* @endcode
|
||||
*
|
||||
* Once modified, you can regenerate the header and the source file,
|
||||
* @code
|
||||
* python3 -m cogapp -r Gui/PreferencePages/DlgSettingsUI.h Gui/PreferencePages/DlgSettingsUI.cpp
|
||||
* @endcode
|
||||
class PrefComboBox;
|
||||
|
||||
namespace Dialog {
|
||||
class Ui_DlgSettingsUI;
|
||||
|
||||
/**
|
||||
* The DlgSettingsUI class implements a preference page to change theme settings.
|
||||
* @author Pierre-Louis Boyer
|
||||
*/
|
||||
class DlgSettingsUI : public Gui::Dialog::PreferencePage
|
||||
class DlgSettingsUI : public PreferencePage
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DlgSettingsUI( QWidget* parent = 0 );
|
||||
~DlgSettingsUI();
|
||||
explicit DlgSettingsUI(QWidget* parent = nullptr);
|
||||
~DlgSettingsUI() override;
|
||||
|
||||
void saveSettings();
|
||||
void loadSettings();
|
||||
void retranslateUi();
|
||||
void saveSettings() override;
|
||||
void loadSettings() override;
|
||||
|
||||
void loadStyleSheet();
|
||||
|
||||
static void attachObserver();
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
void changeEvent(QEvent *e) override;
|
||||
|
||||
void populateStylesheets(const char *key,
|
||||
const char *path,
|
||||
PrefComboBox *combo,
|
||||
const char *def,
|
||||
QStringList filter = QStringList());
|
||||
|
||||
private:
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:400)
|
||||
QGroupBox * groupTreeview = nullptr;
|
||||
QLabel *labelItemBackground = nullptr;
|
||||
Gui::PrefColorButton *ItemBackground = nullptr;
|
||||
QLabel *labelItemBackgroundPadding = nullptr;
|
||||
Gui::PrefSpinBox *ItemBackgroundPadding = nullptr;
|
||||
Gui::PrefCheckBox *ResizableColumn = nullptr;
|
||||
Gui::PrefCheckBox *VisibilityIcon = nullptr;
|
||||
Gui::PrefCheckBox *HideColumn = nullptr;
|
||||
Gui::PrefCheckBox *HideInternalNames = nullptr;
|
||||
Gui::PrefCheckBox *HideScrollBar = nullptr;
|
||||
Gui::PrefCheckBox *HideHeaderView = nullptr;
|
||||
QLabel *labelIconSize = nullptr;
|
||||
Gui::PrefSpinBox *IconSize = nullptr;
|
||||
QLabel *labelFontSize = nullptr;
|
||||
Gui::PrefSpinBox *FontSize = nullptr;
|
||||
QLabel *labelItemSpacing = nullptr;
|
||||
Gui::PrefSpinBox *ItemSpacing = nullptr;
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:400)
|
||||
QGroupBox * groupOverlay = nullptr;
|
||||
Gui::PrefCheckBox *DockOverlayHideTabBar = nullptr;
|
||||
Gui::PrefCheckBox *DockOverlayHidePropertyViewScrollBar = nullptr;
|
||||
Gui::PrefCheckBox *DockOverlayAutoView = nullptr;
|
||||
Gui::PrefCheckBox *DockOverlayAutoMouseThrough = nullptr;
|
||||
Gui::PrefCheckBox *DockOverlayWheelPassThrough = nullptr;
|
||||
QLabel *labelDockOverlayWheelDelay = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayWheelDelay = nullptr;
|
||||
QLabel *labelDockOverlayAlphaRadius = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayAlphaRadius = nullptr;
|
||||
Gui::PrefCheckBox *DockOverlayCheckNaviCube = nullptr;
|
||||
QLabel *labelDockOverlayHintTriggerSize = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintTriggerSize = nullptr;
|
||||
QLabel *labelDockOverlayHintSize = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintSize = nullptr;
|
||||
QLabel *labelDockOverlayHintLeftOffset = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintLeftOffset = nullptr;
|
||||
QLabel *labelDockOverlayHintLeftLength = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintLeftLength = nullptr;
|
||||
QLabel *labelDockOverlayHintRightOffset = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintRightOffset = nullptr;
|
||||
QLabel *labelDockOverlayHintRightLength = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintRightLength = nullptr;
|
||||
QLabel *labelDockOverlayHintTopOffset = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintTopOffset = nullptr;
|
||||
QLabel *labelDockOverlayHintTopLength = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintTopLength = nullptr;
|
||||
QLabel *labelDockOverlayHintBottomOffset = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintBottomOffset = nullptr;
|
||||
QLabel *labelDockOverlayHintBottomLength = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintBottomLength = nullptr;
|
||||
Gui::PrefCheckBox *DockOverlayHintTabBar = nullptr;
|
||||
QLabel *labelDockOverlayHintDelay = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayHintDelay = nullptr;
|
||||
QLabel *labelDockOverlaySplitterHandleTimeout = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlaySplitterHandleTimeout = nullptr;
|
||||
Gui::PrefCheckBox *DockOverlayActivateOnHover = nullptr;
|
||||
QLabel *labelDockOverlayDelay = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayDelay = nullptr;
|
||||
QLabel *labelDockOverlayAnimationDuration = nullptr;
|
||||
Gui::PrefSpinBox *DockOverlayAnimationDuration = nullptr;
|
||||
QLabel *labelDockOverlayAnimationCurve = nullptr;
|
||||
Gui::PrefComboBox *DockOverlayAnimationCurve = nullptr;
|
||||
//[[[end]]]
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// user code start
|
||||
|
||||
Q_PROPERTY(qreal offset1 READ offset1 WRITE setOffset1 DESIGNABLE true SCRIPTABLE true)
|
||||
qreal offset1() const;
|
||||
void setOffset1(qreal);
|
||||
|
||||
private:
|
||||
void init();
|
||||
void onCurveChange(int index);
|
||||
|
||||
private:
|
||||
QTimer *timer;
|
||||
QPropertyAnimation *animator1;
|
||||
qreal t1 = 0;
|
||||
qreal a1 = 0, b1 = 0;
|
||||
|
||||
// user code end
|
||||
// -----------------------------------------------------------------------------------
|
||||
|
||||
/*[[[cog
|
||||
import DlgSettingsUI
|
||||
DlgSettingsUI.declare_end()
|
||||
]]]*/
|
||||
|
||||
// Auto generated code (Tools/params_utils.py:536)
|
||||
std::unique_ptr<Ui_DlgSettingsUI> ui;
|
||||
};
|
||||
|
||||
} // namespace Dialog
|
||||
} // namespace Gui
|
||||
//[[[end]]]
|
||||
#endif // GUI_DIALOG_DLGSETTINGSUI_H
|
||||
|
||||
#endif // GUI_DIALOG_DlgSettingsUI_H
|
||||
|
||||
530
src/Gui/PreferencePages/DlgSettingsUI.ui
Normal file
530
src/Gui/PreferencePages/DlgSettingsUI.ui
Normal file
@@ -0,0 +1,530 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Gui::Dialog::DlgSettingsUI</class>
|
||||
<widget class="QWidget" name="Gui::Dialog::DlgSettingsUI">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>405</width>
|
||||
<height>1065</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>UI</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Theme customization</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>This section let you customize your current theme. The offered settings are optional for theme developers so they may or may not have an effect in your current theme.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" columnstretch="2,1,0">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label1">
|
||||
<property name="text">
|
||||
<string>Accent color 1</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>ThemeAccentColor1</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::PrefColorButton" name="ThemeAccentColor1">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>This color might be used by your theme to let you customize it.</string>
|
||||
</property>
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>85</red>
|
||||
<green>123</green>
|
||||
<blue>182</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ThemeAccentColor1</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Themes</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label2">
|
||||
<property name="text">
|
||||
<string>Accent color 2</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>ThemeAccentColor2</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label3">
|
||||
<property name="text">
|
||||
<string>Accent color 3</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>ThemeAccentColor3</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="styleSheetLabel">
|
||||
<property name="text">
|
||||
<string>Style sheet (advanced):</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>StyleSheets</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Overlay style sheet:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>OverlayStyleSheets</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="Gui::PrefColorButton" name="ThemeAccentColor2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>This color might be used by your theme to let you customize it.</string>
|
||||
</property>
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>85</red>
|
||||
<green>123</green>
|
||||
<blue>182</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ThemeAccentColor2</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Themes</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="Gui::PrefColorButton" name="ThemeAccentColor3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>This color might be used by your theme to let you customize it.</string>
|
||||
</property>
|
||||
<property name="color" stdset="0">
|
||||
<color>
|
||||
<red>85</red>
|
||||
<green>123</green>
|
||||
<blue>182</blue>
|
||||
</color>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ThemeAccentColor3</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Themes</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="Gui::PrefComboBox" name="StyleSheets">
|
||||
<property name="toolTip">
|
||||
<string>Style sheet how user interface will look like</string>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>MainWindow</cstring>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>StyleSheet</cstring>
|
||||
</property>
|
||||
<property name="prefType" stdset="0">
|
||||
<cstring></cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="Gui::PrefComboBox" name="OverlayStyleSheets">
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>MainWindow</cstring>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>OverlayActiveStyleSheet</cstring>
|
||||
</property>
|
||||
<property name="prefType" stdset="0">
|
||||
<cstring></cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Tree view</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" columnstretch="2,1">
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="Gui::PrefCheckBox" name="hideInternalNamesCheckBox">
|
||||
<property name="toolTip">
|
||||
<string>Hide extra tree view column - Internal Names.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide Internal Names</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>HideInternalNames</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>TreeView</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::PrefSpinBox" name="iconSizeSpinBox">
|
||||
<property name="toolTip">
|
||||
<string>Icon size override, set to 0 for the default value.</string>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>16</number>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>TreeView</cstring>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>IconSize</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="rowSpacingLabel">
|
||||
<property name="text">
|
||||
<string>Additional row spacing</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>rowSpacingSpinBox</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="Gui::PrefCheckBox" name="resizableColumnsCheckBox">
|
||||
<property name="toolTip">
|
||||
<string>Allow tree view columns to be manually resized.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Resizable columns</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ResizableColumn</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>TreeView</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="iconSizeLabel">
|
||||
<property name="text">
|
||||
<string>Icon size</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>iconSizeSpinBox</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="Gui::PrefSpinBox" name="rowSpacingSpinBox">
|
||||
<property name="toolTip">
|
||||
<string>Additional spacing for tree view rows. Bigger values will increase row item heights.</string>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>TreeView</cstring>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ItemSpacing</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="Gui::PrefCheckBox" name="showVisibilityIconCheckBox">
|
||||
<property name="toolTip">
|
||||
<string>If enabled, show an eye icon before the tree view items, showing the items visibility status. When clicked the visibility is toggled.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show visibility icon</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>VisibilityIcon</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>TreeView</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="Gui::PrefCheckBox" name="hideHeaderCheckBox">
|
||||
<property name="toolTip">
|
||||
<string>Hide header with column names from the tree view.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide header</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>HideHeaderView</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>TreeView</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<widget class="Gui::PrefCheckBox" name="hideTreeViewScrollBarCheckBox">
|
||||
<property name="toolTip">
|
||||
<string>Hide scroll bar from the tree view, scrolling will still be possible using mouse wheel.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide scroll bar</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>HideScrollBar</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>TreeView</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="Gui::PrefCheckBox" name="hideDescriptionCheckBox">
|
||||
<property name="toolTip">
|
||||
<string>Hide column with object description in tree view.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide description</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>HideColumn</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>TreeView</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Overlay</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="Gui::PrefCheckBox" name="hideTabBarCheckBox">
|
||||
<property name="toolTip">
|
||||
<string>Hide tab bar in dock overlay</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide tab bar</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>DockOverlayHideTabBar</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>View</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="Gui::PrefCheckBox" name="hintShowTabBarCheckBox">
|
||||
<property name="toolTip">
|
||||
<string>Show tab bar on mouse over when auto hide</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hint show tab bar</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>DockOverlayHintTabBar</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>View</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="Gui::PrefCheckBox" name="hidePropertyViewScrollBarCheckBox">
|
||||
<property name="toolTip">
|
||||
<string>Hide property view scroll bar in dock overlay</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide property view scroll bar</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>DockOverlayHidePropertyViewScrollBar</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>View</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="Gui::PrefCheckBox" name="overlayAutoHideCheckBox">
|
||||
<property name="toolTip">
|
||||
<string>Automatically hide overlayed dock panels when in non 3D view (like TechDraw or Spreadsheet).</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto hide in non 3D view</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>DockOverlayAutoView</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>View</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="Gui::PrefCheckBox" name="mouseClickPassThroughCheckBox">
|
||||
<property name="toolTip">
|
||||
<string>Auto mouse click through transparent part of dock overlay.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto mouse pass through</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>DockOverlayAutoMouseThrough</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>View</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="Gui::PrefCheckBox" name="mouseWheelPassThroughCheckBox">
|
||||
<property name="toolTip">
|
||||
<string>Auto pass through mouse wheel event on transparent dock overlay.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto mouse wheel pass through</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>DockOverlayWheelPassThrough</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>View</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Gui::ColorButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>Gui/Widgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefColorButton</class>
|
||||
<extends>Gui::ColorButton</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefSpinBox</class>
|
||||
<extends>QSpinBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefCheckBox</class>
|
||||
<extends>QCheckBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>ThemeAccentColor1</tabstop>
|
||||
<tabstop>ThemeAccentColor2</tabstop>
|
||||
<tabstop>ThemeAccentColor3</tabstop>
|
||||
<tabstop>StyleSheets</tabstop>
|
||||
<tabstop>OverlayStyleSheets</tabstop>
|
||||
<tabstop>iconSizeSpinBox</tabstop>
|
||||
<tabstop>rowSpacingSpinBox</tabstop>
|
||||
<tabstop>resizableColumnsCheckBox</tabstop>
|
||||
<tabstop>showVisibilityIconCheckBox</tabstop>
|
||||
<tabstop>hideDescriptionCheckBox</tabstop>
|
||||
<tabstop>hideInternalNamesCheckBox</tabstop>
|
||||
<tabstop>hideTreeViewScrollBarCheckBox</tabstop>
|
||||
<tabstop>hideHeaderCheckBox</tabstop>
|
||||
<tabstop>hideTabBarCheckBox</tabstop>
|
||||
<tabstop>hintShowTabBarCheckBox</tabstop>
|
||||
<tabstop>hidePropertyViewScrollBarCheckBox</tabstop>
|
||||
<tabstop>overlayAutoHideCheckBox</tabstop>
|
||||
<tabstop>mouseClickPassThroughCheckBox</tabstop>
|
||||
<tabstop>mouseWheelPassThroughCheckBox</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -63,7 +63,7 @@ Params = [
|
||||
ParamInt('Indentation', 0, on_change=True),
|
||||
ParamBool('LabelExpression', False),
|
||||
ParamInt('IconSize', 0, on_change=True),
|
||||
ParamInt('FontSize', 0, on_change=True),
|
||||
ParamInt('FontSize', 0, on_change=True, title='Font size'),
|
||||
ParamInt('ItemSpacing', 0, on_change=True),
|
||||
ParamHex('ItemBackground', 0, on_change=True, title='Item background color', proxy=ParamColor(),
|
||||
doc = "Tree view item background. Only effective in overlay."),
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
#include "PreferencePages/DlgSettingsPythonConsole.h"
|
||||
#include "PreferencePages/DlgSettingsReportView.h"
|
||||
#include "PreferencePages/DlgSettingsSelection.h"
|
||||
#include "PreferencePages/DlgSettingsTheme.h"
|
||||
#include "PreferencePages/DlgSettingsUI.h"
|
||||
#include "PreferencePages/DlgSettingsViewColor.h"
|
||||
#include "PreferencePages/DlgSettingsWorkbenchesImp.h"
|
||||
#include "PreferencePages/DlgSettingsUI.h"
|
||||
#include "PreferencePages/DlgSettingsAdvanced.h"
|
||||
|
||||
#include "DlgToolbarsImp.h"
|
||||
#include "DlgActionsImp.h"
|
||||
@@ -81,11 +81,11 @@ WidgetFactorySupplier::WidgetFactorySupplier()
|
||||
new PrefPageProducer<DlgSettingsReportView> ( QT_TRANSLATE_NOOP("QObject","General") );
|
||||
new PrefPageProducer<DlgSettings3DViewImp> ( QT_TRANSLATE_NOOP("QObject","Display") );
|
||||
new PrefPageProducer<DlgSettingsLightSources> ( QT_TRANSLATE_NOOP("QObject","Display") );
|
||||
new PrefPageProducer<DlgSettingsUI> ( QT_TRANSLATE_NOOP("QObject","Display") );
|
||||
new PrefPageProducer<DlgSettingsUI> ( QT_TRANSLATE_NOOP("QObject","Display") );
|
||||
new PrefPageProducer<DlgSettingsNavigation> ( QT_TRANSLATE_NOOP("QObject","Display") );
|
||||
new PrefPageProducer<DlgSettingsViewColor> ( QT_TRANSLATE_NOOP("QObject","Display") );
|
||||
new PrefPageProducer<DlgSettingsTheme> ( QT_TRANSLATE_NOOP("QObject","Display") );
|
||||
DlgSettingsTheme::attachObserver();
|
||||
new PrefPageProducer<DlgSettingsAdvanced> ( QT_TRANSLATE_NOOP("QObject","Display") );
|
||||
DlgSettingsUI::attachObserver();
|
||||
new PrefPageProducer<DlgSettingsWorkbenchesImp> ( QT_TRANSLATE_NOOP("QObject","Workbenches") );
|
||||
new PrefPageProducer<DlgSettingsMacroImp> ( QT_TRANSLATE_NOOP("QObject", "Python"));
|
||||
new PrefPageProducer<DlgSettingsPythonConsole> ( QT_TRANSLATE_NOOP("QObject", "Python"));
|
||||
|
||||
Reference in New Issue
Block a user