Preference: Replace the name LazyLoaded by Workbenches.
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
#include "BitmapFactory.h"
|
||||
#include "Command.h"
|
||||
#include "DlgUndoRedo.h"
|
||||
#include "DlgSettingsLazyLoadedImp.h"
|
||||
#include "DlgSettingsWorkbenchesImp.h"
|
||||
#include "Document.h"
|
||||
#include "EditorView.h"
|
||||
#include "FileDialog.h"
|
||||
@@ -801,8 +801,8 @@ void WorkbenchGroup::setWorkbenchData(int index, const QString& wb)
|
||||
void WorkbenchGroup::refreshWorkbenchList()
|
||||
{
|
||||
QStringList items = Application::Instance->workbenches();
|
||||
QStringList enabled_wbs_list = DlgSettingsLazyLoadedImp::getEnabledWorkbenches();
|
||||
QStringList disabled_wbs_list = DlgSettingsLazyLoadedImp::getDisabledWorkbenches();
|
||||
QStringList enabled_wbs_list = DlgSettingsWorkbenchesImp::getEnabledWorkbenches();
|
||||
QStringList disabled_wbs_list = DlgSettingsWorkbenchesImp::getDisabledWorkbenches();
|
||||
QStringList enable_wbs;
|
||||
|
||||
// Go through the list of enabled workbenches and verify that they really exist because
|
||||
|
||||
@@ -325,7 +325,7 @@ SET(Gui_UIC_SRCS
|
||||
DlgSettingsColorGradient.ui
|
||||
DlgSettingsDocument.ui
|
||||
DlgSettingsImage.ui
|
||||
DlgSettingsLazyLoaded.ui
|
||||
DlgSettingsWorkbenches.ui
|
||||
DlgSettingsMacro.ui
|
||||
DlgSettingsNotificationArea.ui
|
||||
DlgSettingsPythonConsole.ui
|
||||
@@ -567,7 +567,7 @@ SET(Dialog_Settings_CPP_SRCS
|
||||
DlgSettingsColorGradientImp.cpp
|
||||
DlgSettingsDocumentImp.cpp
|
||||
DlgSettingsImageImp.cpp
|
||||
DlgSettingsLazyLoadedImp.cpp
|
||||
DlgSettingsWorkbenchesImp.cpp
|
||||
DlgSettingsMacroImp.cpp
|
||||
DlgSettingsNotificationArea.cpp
|
||||
DlgSettingsPythonConsole.cpp
|
||||
@@ -587,7 +587,7 @@ SET(Dialog_Settings_HPP_SRCS
|
||||
DlgSettingsColorGradientImp.h
|
||||
DlgSettingsDocumentImp.h
|
||||
DlgSettingsImageImp.h
|
||||
DlgSettingsLazyLoadedImp.h
|
||||
DlgSettingsWorkbenchesImp.h
|
||||
DlgSettingsMacroImp.h
|
||||
DlgSettingsNotificationArea.h
|
||||
DlgSettingsPythonConsole.h
|
||||
@@ -609,7 +609,7 @@ SET(Dialog_Settings_SRCS
|
||||
DlgSettingsColorGradient.ui
|
||||
DlgSettingsDocument.ui
|
||||
DlgSettingsImage.ui
|
||||
DlgSettingsLazyLoaded.ui
|
||||
DlgSettingsWorkbenches.ui
|
||||
DlgSettingsMacro.ui
|
||||
DlgSettingsNotificationArea.ui
|
||||
DlgSettingsPythonConsole.ui
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Gui::Dialog::DlgSettingsLazyLoaded</class>
|
||||
<widget class="QWidget" name="Gui::Dialog::DlgSettingsLazyLoaded">
|
||||
<class>Gui::Dialog::DlgSettingsWorkbenches</class>
|
||||
<widget class="QWidget" name="Gui::Dialog::DlgSettingsWorkbenches">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@@ -27,8 +27,8 @@
|
||||
#include <sstream>
|
||||
#endif
|
||||
|
||||
#include "DlgSettingsLazyLoadedImp.h"
|
||||
#include "ui_DlgSettingsLazyLoaded.h"
|
||||
#include "DlgSettingsWorkbenchesImp.h"
|
||||
#include "ui_DlgSettingsWorkbenches.h"
|
||||
#include "Application.h"
|
||||
#include "Workbench.h"
|
||||
#include "WorkbenchManager.h"
|
||||
@@ -36,21 +36,21 @@
|
||||
|
||||
using namespace Gui::Dialog;
|
||||
|
||||
const QString DlgSettingsLazyLoadedImp::iconLabelStr = QString::fromLatin1("iconLabel");
|
||||
const QString DlgSettingsLazyLoadedImp::nameLabelStr = QString::fromLatin1("nameLabel");
|
||||
const QString DlgSettingsLazyLoadedImp::loadLabelStr = QString::fromLatin1("loadLabel");
|
||||
const QString DlgSettingsLazyLoadedImp::loadButtonStr = QString::fromLatin1("loadButton");
|
||||
const QString DlgSettingsLazyLoadedImp::enableCheckboxStr = QString::fromLatin1("enableCheckbox");
|
||||
const QString DlgSettingsLazyLoadedImp::autoloadCheckboxStr = QString::fromLatin1("autoloadCheckbox");
|
||||
const QString DlgSettingsWorkbenchesImp::iconLabelStr = QString::fromLatin1("iconLabel");
|
||||
const QString DlgSettingsWorkbenchesImp::nameLabelStr = QString::fromLatin1("nameLabel");
|
||||
const QString DlgSettingsWorkbenchesImp::loadLabelStr = QString::fromLatin1("loadLabel");
|
||||
const QString DlgSettingsWorkbenchesImp::loadButtonStr = QString::fromLatin1("loadButton");
|
||||
const QString DlgSettingsWorkbenchesImp::enableCheckboxStr = QString::fromLatin1("enableCheckbox");
|
||||
const QString DlgSettingsWorkbenchesImp::autoloadCheckboxStr = QString::fromLatin1("autoloadCheckbox");
|
||||
|
||||
/* TRANSLATOR Gui::Dialog::DlgSettingsLazyLoadedImp */
|
||||
/* TRANSLATOR Gui::Dialog::DlgSettingsWorkbenchesImp */
|
||||
|
||||
/**
|
||||
* Constructs a DlgSettingsLazyLoadedImp
|
||||
* Constructs a DlgSettingsWorkbenchesImp
|
||||
*/
|
||||
DlgSettingsLazyLoadedImp::DlgSettingsLazyLoadedImp( QWidget* parent )
|
||||
DlgSettingsWorkbenchesImp::DlgSettingsWorkbenchesImp( QWidget* parent )
|
||||
: PreferencePage( parent )
|
||||
, ui(new Ui_DlgSettingsLazyLoaded)
|
||||
, ui(new Ui_DlgSettingsWorkbenches)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
@@ -58,12 +58,12 @@ DlgSettingsLazyLoadedImp::DlgSettingsLazyLoadedImp( QWidget* parent )
|
||||
/**
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
DlgSettingsLazyLoadedImp::~DlgSettingsLazyLoadedImp()
|
||||
DlgSettingsWorkbenchesImp::~DlgSettingsWorkbenchesImp()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void DlgSettingsLazyLoadedImp::saveSettings()
|
||||
void DlgSettingsWorkbenchesImp::saveSettings()
|
||||
{
|
||||
std::ostringstream enabledStr, disabledStr, autoloadStr;
|
||||
|
||||
@@ -113,7 +113,7 @@ void DlgSettingsLazyLoadedImp::saveSettings()
|
||||
SetASCII("BackgroundAutoloadModules", autoloadStr.str().c_str());
|
||||
}
|
||||
|
||||
void DlgSettingsLazyLoadedImp::loadSettings()
|
||||
void DlgSettingsWorkbenchesImp::loadSettings()
|
||||
{
|
||||
// There are two different "autoload" settings: the first, in FreeCAD since 2004,
|
||||
// controls the module the user sees first when starting FreeCAD, and defaults to the Start workbench
|
||||
@@ -136,7 +136,7 @@ void DlgSettingsLazyLoadedImp::loadSettings()
|
||||
buildWorkbenchList();
|
||||
}
|
||||
|
||||
void DlgSettingsLazyLoadedImp::onLoadClicked(const QString &wbName)
|
||||
void DlgSettingsWorkbenchesImp::onLoadClicked(const QString &wbName)
|
||||
{
|
||||
// activate selected workbench
|
||||
Workbench* originalActiveWB = WorkbenchManager::instance()->active();
|
||||
@@ -156,7 +156,7 @@ void DlgSettingsLazyLoadedImp::onLoadClicked(const QString &wbName)
|
||||
}
|
||||
}
|
||||
|
||||
void DlgSettingsLazyLoadedImp::onWbActivated(const QString &wbName, bool checked)
|
||||
void DlgSettingsWorkbenchesImp::onWbActivated(const QString &wbName, bool checked)
|
||||
{
|
||||
// activate/deactivate the widgets
|
||||
for (int i = 0; i < ui->wbList->count(); i++) {
|
||||
@@ -184,7 +184,7 @@ void DlgSettingsLazyLoadedImp::onWbActivated(const QString &wbName, bool checked
|
||||
/**
|
||||
Build the list of unloaded workbenches.
|
||||
*/
|
||||
void DlgSettingsLazyLoadedImp::buildWorkbenchList()
|
||||
void DlgSettingsWorkbenchesImp::buildWorkbenchList()
|
||||
{
|
||||
QStringList workbenches = Application::Instance->workbenches();
|
||||
QStringList enabledWbs = getEnabledWorkbenches();
|
||||
@@ -218,7 +218,7 @@ void DlgSettingsLazyLoadedImp::buildWorkbenchList()
|
||||
}
|
||||
}
|
||||
|
||||
void DlgSettingsLazyLoadedImp::addWorkbench(const QString& wbName, bool enabled)
|
||||
void DlgSettingsWorkbenchesImp::addWorkbench(const QString& wbName, bool enabled)
|
||||
{
|
||||
if (wbName.toStdString() == "NoneWorkbench")
|
||||
return; // Do not list the default empty Workbench
|
||||
@@ -230,7 +230,7 @@ void DlgSettingsLazyLoadedImp::addWorkbench(const QString& wbName, bool enabled)
|
||||
ui->wbList->setItemWidget(wItem, widget);
|
||||
}
|
||||
|
||||
QWidget* DlgSettingsLazyLoadedImp::createWorkbenchWidget(const QString& wbName, bool enabled)
|
||||
QWidget* DlgSettingsWorkbenchesImp::createWorkbenchWidget(const QString& wbName, bool enabled)
|
||||
{
|
||||
auto wbTooltip = Application::Instance->workbenchToolTip(wbName);
|
||||
auto wbDisplayName = Application::Instance->workbenchMenuText(wbName);
|
||||
@@ -316,7 +316,7 @@ QWidget* DlgSettingsLazyLoadedImp::createWorkbenchWidget(const QString& wbName,
|
||||
}
|
||||
|
||||
|
||||
QStringList DlgSettingsLazyLoadedImp::getEnabledWorkbenches()
|
||||
QStringList DlgSettingsWorkbenchesImp::getEnabledWorkbenches()
|
||||
{
|
||||
QString enabled_wbs;
|
||||
QStringList enabled_wbs_list;
|
||||
@@ -342,7 +342,7 @@ QStringList DlgSettingsLazyLoadedImp::getEnabledWorkbenches()
|
||||
return enabled_wbs_list;
|
||||
}
|
||||
|
||||
QStringList DlgSettingsLazyLoadedImp::getDisabledWorkbenches()
|
||||
QStringList DlgSettingsWorkbenchesImp::getDisabledWorkbenches()
|
||||
{
|
||||
QString disabled_wbs;
|
||||
QStringList disabled_wbs_list;
|
||||
@@ -362,7 +362,7 @@ QStringList DlgSettingsLazyLoadedImp::getDisabledWorkbenches()
|
||||
/**
|
||||
* Sets the strings of the subwidgets using the current language.
|
||||
*/
|
||||
void DlgSettingsLazyLoadedImp::changeEvent(QEvent *e)
|
||||
void DlgSettingsWorkbenchesImp::changeEvent(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
ui->retranslateUi(this);
|
||||
@@ -372,4 +372,4 @@ void DlgSettingsLazyLoadedImp::changeEvent(QEvent *e)
|
||||
}
|
||||
}
|
||||
|
||||
#include "moc_DlgSettingsLazyLoadedImp.cpp"
|
||||
#include "moc_DlgSettingsWorkbenchesImp.cpp"
|
||||
@@ -21,8 +21,8 @@
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef GUI_DIALOG_DLGSETTINGSLAZYLOADED_IMP_H
|
||||
#define GUI_DIALOG_DLGSETTINGSLAZYLOADED_IMP_H
|
||||
#ifndef GUI_DIALOG_DLGSETTINGSWORKBENCHES_IMP_H
|
||||
#define GUI_DIALOG_DLGSETTINGSWORKBENCHES_IMP_H
|
||||
|
||||
#include "PropertyPage.h"
|
||||
#include <memory>
|
||||
@@ -31,21 +31,21 @@ class QCheckBox;
|
||||
|
||||
namespace Gui {
|
||||
namespace Dialog {
|
||||
class Ui_DlgSettingsLazyLoaded;
|
||||
class Ui_DlgSettingsWorkbenches;
|
||||
|
||||
|
||||
/**
|
||||
* The DlgSettingsLazyLoadedImp class implements a pseudo-preference page explain why
|
||||
* The DlgSettingsWorkbenchesImp class implements a pseudo-preference page explain why
|
||||
* the remaining preference pages aren't loaded yet, and to help the user do so on demand.
|
||||
* \author Jürgen Riegel
|
||||
*/
|
||||
class DlgSettingsLazyLoadedImp : public PreferencePage
|
||||
class DlgSettingsWorkbenchesImp : public PreferencePage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DlgSettingsLazyLoadedImp( QWidget* parent = nullptr );
|
||||
~DlgSettingsLazyLoadedImp() override;
|
||||
explicit DlgSettingsWorkbenchesImp( QWidget* parent = nullptr );
|
||||
~DlgSettingsWorkbenchesImp() override;
|
||||
|
||||
void saveSettings() override;
|
||||
void loadSettings() override;
|
||||
@@ -65,7 +65,7 @@ private:
|
||||
void addWorkbench(const QString& it, bool enabled);
|
||||
QWidget* createWorkbenchWidget(const QString& it, bool enabled);
|
||||
|
||||
std::unique_ptr<Ui_DlgSettingsLazyLoaded> ui;
|
||||
std::unique_ptr<Ui_DlgSettingsWorkbenches> ui;
|
||||
static const QString iconLabelStr;
|
||||
static const QString nameLabelStr;
|
||||
static const QString loadLabelStr;
|
||||
@@ -80,4 +80,4 @@ private:
|
||||
} // namespace Dialog
|
||||
} // namespace Gui
|
||||
|
||||
#endif // GUI_DIALOG_DLGSETTINGSLAZYLOADED_IMP_H
|
||||
#endif // GUI_DIALOG_DLGSETTINGSWORKBENCHES_IMP_H
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "DlgSettingsUnitsImp.h"
|
||||
#include "DlgSettingsDocumentImp.h"
|
||||
#include "DlgReportViewImp.h"
|
||||
#include "DlgSettingsLazyLoadedImp.h"
|
||||
#include "DlgSettingsWorkbenchesImp.h"
|
||||
|
||||
#include "DlgToolbarsImp.h"
|
||||
#include "DlgActionsImp.h"
|
||||
@@ -79,7 +79,7 @@ WidgetFactorySupplier::WidgetFactorySupplier()
|
||||
new PrefPageProducer<DlgSettings3DViewImp> ( QT_TRANSLATE_NOOP("QObject","Display") );
|
||||
new PrefPageProducer<DlgSettingsNavigation> ( QT_TRANSLATE_NOOP("QObject","Display") );
|
||||
new PrefPageProducer<DlgSettingsViewColor> ( QT_TRANSLATE_NOOP("QObject","Display") );
|
||||
new PrefPageProducer<DlgSettingsLazyLoadedImp> ( QT_TRANSLATE_NOOP("QObject","Workbenches") );
|
||||
new PrefPageProducer<DlgSettingsWorkbenchesImp> ( QT_TRANSLATE_NOOP("QObject","Workbenches") );
|
||||
|
||||
// ADD YOUR CUSTOMIZE PAGES HERE
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user