| 1 |
/*************************************************************************** |
| 2 |
* Copyright (c) 2004 Werner Mayer <wmayer[at]users.sourceforge.net> * |
| 3 |
* * |
| 4 |
* This file is part of the FreeCAD CAx development system. * |
| 5 |
* * |
| 6 |
* This library is free software; you can redistribute it and/or * |
| 7 |
* modify it under the terms of the GNU Library General Public * |
| 8 |
* License as published by the Free Software Foundation; either * |
| 9 |
* version 2 of the License, or (at your option) any later version. * |
| 10 |
* * |
| 11 |
* This library is distributed in the hope that it will be useful, * |
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
| 14 |
* GNU Library General Public License for more details. * |
| 15 |
* * |
| 16 |
* You should have received a copy of the GNU Library General Public * |
| 17 |
* License along with this library; see the file COPYING.LIB. If not, * |
| 18 |
* write to the Free Software Foundation, Inc., 59 Temple Place, * |
| 19 |
* Suite 330, Boston, MA 02111-1307, USA * |
| 20 |
* * |
| 21 |
***************************************************************************/ |
| 22 |
|
| 23 |
|
| 24 |
#include "BitmapFactory.h" |
| 25 |
#include "WidgetFactory.h" |
| 26 |
#include "Workbench.h" |
| 27 |
|
| 28 |
// INCLUDE YOUR PREFERENCE PAGES HERE |
| 29 |
// |
| 30 |
#include "Dialogs/DlgPreferencesImp.h" |
| 31 |
#include "PreferencePages/DlgSettings3DViewImp.h" |
| 32 |
#include "PreferencePages/DlgSettingsCacheDirectory.h" |
| 33 |
#include "PreferencePages/DlgSettingsDocumentImp.h" |
| 34 |
#include "PreferencePages/DlgSettingsEditor.h" |
| 35 |
#include "PreferencePages/DlgSettingsGeneral.h" |
| 36 |
#include "PreferencePages/DlgSettingsMacroImp.h" |
| 37 |
#include "PreferencePages/DlgSettingsLightSources.h" |
| 38 |
#include "PreferencePages/DlgSettingsNavigation.h" |
| 39 |
#include "PreferencePages/DlgSettingsNotificationArea.h" |
| 40 |
#include "PreferencePages/DlgSettingsPythonConsole.h" |
| 41 |
#include "PreferencePages/DlgSettingsReportView.h" |
| 42 |
#include "PreferencePages/DlgSettingsSelection.h" |
| 43 |
#include "PreferencePages/DlgSettingsUI.h" |
| 44 |
#include "PreferencePages/DlgSettingsViewColor.h" |
| 45 |
#include "PreferencePages/DlgSettingsWorkbenchesImp.h" |
| 46 |
#include "PreferencePages/DlgSettingsAdvanced.h" |
| 47 |
#include "PreferencePages/DlgSettingsPDF.h" |
| 48 |
|
| 49 |
#include "Dialogs/DlgToolbarsImp.h" |
| 50 |
#include "Dialogs/DlgActionsImp.h" |
| 51 |
#include "Dialogs/DlgKeyboardImp.h" |
| 52 |
|
| 53 |
#if defined(_USE_3DCONNEXION_SDK) || defined(SPNAV_FOUND) |
| 54 |
# include "Dialogs/DlgCustomizeSpaceball.h" |
| 55 |
# include "Dialogs/DlgCustomizeSpNavSettings.h" |
| 56 |
#endif |
| 57 |
|
| 58 |
#include "InputField.h" |
| 59 |
#include "QuantitySpinBox.h" |
| 60 |
#include "PrefWidgets.h" |
| 61 |
#include "ToolBarManager.h" |
| 62 |
|
| 63 |
using namespace Gui; |
| 64 |
using namespace Gui::Dialog; |
| 65 |
|
| 66 |
// clang-format off |
| 67 |
/** |
| 68 |
* Registers all preference pages or widgets to create them dynamically at any later time. |
| 69 |
*/ |
| 70 |
WidgetFactorySupplier::WidgetFactorySupplier() |
| 71 |
{ |
| 72 |
// ADD YOUR PREFERENCE PAGES HERE |
| 73 |
// |
| 74 |
// |
| 75 |
new PrefPageProducer<DlgSettingsGeneral> ( QT_TRANSLATE_NOOP("QObject","General") ); |
| 76 |
DlgSettingsGeneral::attachObserver(); |
| 77 |
new PrefPageProducer<DlgSettingsDocumentImp> ( QT_TRANSLATE_NOOP("QObject","General") ); |
| 78 |
new PrefPageProducer<DlgSettingsSelection> ( QT_TRANSLATE_NOOP("QObject","General") ); |
| 79 |
new PrefPageProducer<DlgSettingsCacheDirectory> ( QT_TRANSLATE_NOOP("QObject","General") ); |
| 80 |
new PrefPageProducer<DlgSettingsNotificationArea> ( QT_TRANSLATE_NOOP("QObject","General") ); |
| 81 |
new PrefPageProducer<DlgSettingsReportView> ( QT_TRANSLATE_NOOP("QObject","General") ); |
| 82 |
new PrefPageProducer<DlgSettings3DViewImp> ( QT_TRANSLATE_NOOP("QObject","Display") ); |
| 83 |
new PrefPageProducer<DlgSettingsLightSources> ( QT_TRANSLATE_NOOP("QObject","Display") ); |
| 84 |
new PrefPageProducer<DlgSettingsUI> ( QT_TRANSLATE_NOOP("QObject","Display") ); |
| 85 |
new PrefPageProducer<DlgSettingsNavigation> ( QT_TRANSLATE_NOOP("QObject","Display") ); |
| 86 |
new PrefPageProducer<DlgSettingsViewColor> ( QT_TRANSLATE_NOOP("QObject","Display") ); |
| 87 |
new PrefPageProducer<DlgSettingsAdvanced> ( QT_TRANSLATE_NOOP("QObject","Display") ); |
| 88 |
new PrefPageProducer<DlgSettingsWorkbenchesImp> ( QT_TRANSLATE_NOOP("QObject","Workbenches") ); |
| 89 |
new PrefPageProducer<DlgSettingsPDF> ( QT_TRANSLATE_NOOP("QObject","Import-Export") ); |
| 90 |
new PrefPageProducer<DlgSettingsMacroImp> ( QT_TRANSLATE_NOOP("QObject", "Python")); |
| 91 |
new PrefPageProducer<DlgSettingsPythonConsole> ( QT_TRANSLATE_NOOP("QObject", "Python")); |
| 92 |
new PrefPageProducer<DlgSettingsEditor> ( QT_TRANSLATE_NOOP("QObject", "Python")); |
| 93 |
|
| 94 |
// ADD YOUR CUSTOMIZE PAGES HERE |
| 95 |
// |
| 96 |
// |
| 97 |
new CustomPageProducer<DlgCustomKeyboardImp>; |
| 98 |
new CustomPageProducer<DlgCustomToolbarsImp>; |
| 99 |
new CustomPageProducer<DlgCustomActionsImp>; |
| 100 |
#if defined(_USE_3DCONNEXION_SDK) || defined(SPNAV_FOUND) |
| 101 |
new CustomPageProducer<DlgCustomizeSpNavSettings>; |
| 102 |
new CustomPageProducer<DlgCustomizeSpaceball>; |
| 103 |
#endif |
| 104 |
// ADD YOUR PREFERENCE WIDGETS HERE |
| 105 |
// |
| 106 |
// |
| 107 |
new WidgetProducer<Gui::InputField>; |
| 108 |
new WidgetProducer<Gui::PrefSpinBox>; |
| 109 |
new WidgetProducer<Gui::PrefDoubleSpinBox>; |
| 110 |
new WidgetProducer<Gui::PrefLineEdit>; |
| 111 |
new WidgetProducer<Gui::PrefTextEdit>; |
| 112 |
new WidgetProducer<Gui::PrefComboBox>; |
| 113 |
new WidgetProducer<Gui::PrefFontBox>; |
| 114 |
new WidgetProducer<Gui::PrefCheckBox>; |
| 115 |
new WidgetProducer<Gui::PrefCheckableGroupBox>; |
| 116 |
new WidgetProducer<Gui::PrefRadioButton>; |
| 117 |
new WidgetProducer<Gui::PrefSlider>; |
| 118 |
new WidgetProducer<Gui::PrefFileChooser>; |
| 119 |
new WidgetProducer<Gui::PrefColorButton>; |
| 120 |
new WidgetProducer<Gui::PrefUnitSpinBox>; |
| 121 |
new WidgetProducer<Gui::PrefQuantitySpinBox>; |
| 122 |
new WidgetProducer<Gui::CommandIconView>; |
| 123 |
new WidgetProducer<Gui::AccelLineEdit>; |
| 124 |
new WidgetProducer<Gui::ActionSelector>; |
| 125 |
new WidgetProducer<Gui::ColorButton>; |
| 126 |
new WidgetProducer<Gui::UrlLabel>; |
| 127 |
new WidgetProducer<Gui::StatefulLabel>; |
| 128 |
new WidgetProducer<Gui::FileChooser>; |
| 129 |
new WidgetProducer<Gui::UIntSpinBox>; |
| 130 |
new WidgetProducer<Gui::IntSpinBox>; |
| 131 |
new WidgetProducer<Gui::DoubleSpinBox>; |
| 132 |
new WidgetProducer<Gui::QuantitySpinBox>; |
| 133 |
new WidgetProducer<Gui::ExpLineEdit>; |
| 134 |
} |
| 135 |
// clang-format on |