Preferences "Drawing" -> "TechDraw"
This commit is contained in:
parent
a46fd856d4
commit
05c730f38d
|
@ -54,7 +54,7 @@ DrawHatch::DrawHatch(void)
|
|||
ADD_PROPERTY_TYPE(HatchColor,(0.0f,0.0f,0.0f),vgroup,App::Prop_None,"The color of the hatch area");
|
||||
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Drawing");
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw");
|
||||
|
||||
std::string defaultDir = App::Application::getResourceDir() + "Mod/Drawing/patterns";
|
||||
QString patternDir = QString::fromStdString(hGrp->GetASCII("PatternDir", defaultDir.c_str()));
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include "Workbench.h"
|
||||
|
||||
#include "DlgPrefsDrawingImp.h"
|
||||
#include "DlgPrefsTechDrawImp.h"
|
||||
#include "ViewProviderPage.h"
|
||||
#include "ViewProviderDrawingView.h"
|
||||
#include "ViewProviderDimension.h"
|
||||
|
@ -105,7 +105,7 @@ void TechDrawGuiExport initTechDrawGui()
|
|||
TechDrawGui::ViewProviderHatch::init();
|
||||
|
||||
// register preferences pages
|
||||
new Gui::PrefPageProducer<TechDrawGui::DlgPrefsDrawingImp> ("Drawing");
|
||||
new Gui::PrefPageProducer<TechDrawGui::DlgPrefsTechDrawImp> ("TechDraw");
|
||||
|
||||
// add resources and reloads the translators
|
||||
loadTechDrawResource();
|
||||
|
|
|
@ -41,7 +41,7 @@ set(TechDrawGui_MOC_HDRS
|
|||
QGIViewSymbol.h
|
||||
QGIViewClip.h
|
||||
TaskProjGroup.h
|
||||
DlgPrefsDrawingImp.h
|
||||
DlgPrefsTechDrawImp.h
|
||||
)
|
||||
|
||||
fc_wrap_cpp(TechDrawGui_MOC_SRCS ${TechDrawGui_MOC_HDRS})
|
||||
|
@ -50,7 +50,7 @@ SOURCE_GROUP("Moc" FILES ${TechDrawGui_MOC_SRCS})
|
|||
qt4_add_resources(TechDrawGui_SRCS Resources/TechDraw.qrc)
|
||||
|
||||
set(TechDrawGui_UIC_SRCS
|
||||
DlgPrefsDrawing.ui
|
||||
DlgPrefsTechDrawImp.ui
|
||||
TaskProjGroup.ui
|
||||
)
|
||||
|
||||
|
@ -71,9 +71,9 @@ SET(TechDrawGui_SRCS
|
|||
TaskProjGroup.ui
|
||||
TaskProjGroup.cpp
|
||||
TaskProjGroup.h
|
||||
DlgPrefsDrawing.ui
|
||||
DlgPrefsDrawingImp.cpp
|
||||
DlgPrefsDrawingImp.h
|
||||
DlgPrefsTechDraw.ui
|
||||
DlgPrefsTechDrawImp.cpp
|
||||
DlgPrefsTechDrawImp.h
|
||||
|
||||
)
|
||||
SET(TechDrawGuiView_SRCS
|
||||
|
@ -177,7 +177,7 @@ fc_target_copy_resource(TechDrawGui
|
|||
InitGui.py)
|
||||
|
||||
SET(TechDrawGuiIcon_SVG
|
||||
Resources/icons/preferences-drawing.svg
|
||||
Resources/icons/preferences-techdraw.svg
|
||||
)
|
||||
|
||||
fc_copy_sources(TechDrawGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/TechDraw" ${TechDrawGuiIcon_SVG})
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>TechDrawGui::DlgPrefsDrawingImp</class>
|
||||
<widget class="QWidget" name="TechDrawGui::DlgPrefsDrawingImp">
|
||||
<class>TechDrawGui::DlgPrefsTechDrawImp</class>
|
||||
<widget class="QWidget" name="TechDrawGui::DlgPrefsTechDrawImp">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
@ -11,7 +11,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Drawing</string>
|
||||
<string>TechDraw</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="verticalLayoutWidget">
|
||||
<property name="geometry">
|
||||
|
@ -51,7 +51,7 @@
|
|||
<cstring>SelectColor</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Drawing/Colors</cstring>
|
||||
<cstring>Mod/TechDraw/Colors</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -61,7 +61,7 @@
|
|||
<cstring>HiddenColor</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Drawing/Colors</cstring>
|
||||
<cstring>Mod/TechDraw/Colors</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -78,7 +78,7 @@
|
|||
<cstring>NormalColor</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Drawing/Colors</cstring>
|
||||
<cstring>Mod/TechDraw/Colors</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -123,7 +123,7 @@
|
|||
<cstring>PreSelectColor</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Drawing/Colors</cstring>
|
||||
<cstring>Mod/TechDraw/Colors</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -178,7 +178,7 @@
|
|||
<cstring>LabelFont</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Drawing</cstring>
|
||||
<cstring>Mod/TechDraw</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -226,7 +226,7 @@
|
|||
<cstring>TemplateDir</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>/Mod/Drawing</cstring>
|
||||
<cstring>/Mod/TechDraw</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -266,7 +266,7 @@
|
|||
<cstring>TemplateFile</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Drawing</cstring>
|
||||
<cstring>Mod/TechDraw</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
|
@ -25,23 +25,23 @@
|
|||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include "DlgPrefsDrawingImp.h"
|
||||
#include "DlgPrefsTechDrawImp.h"
|
||||
#include <Gui/PrefWidgets.h>
|
||||
|
||||
using namespace TechDrawGui;
|
||||
|
||||
DlgPrefsDrawingImp::DlgPrefsDrawingImp( QWidget* parent )
|
||||
DlgPrefsTechDrawImp::DlgPrefsTechDrawImp( QWidget* parent )
|
||||
: PreferencePage( parent )
|
||||
{
|
||||
this->setupUi(this);
|
||||
}
|
||||
|
||||
DlgPrefsDrawingImp::~DlgPrefsDrawingImp()
|
||||
DlgPrefsTechDrawImp::~DlgPrefsTechDrawImp()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
|
||||
void DlgPrefsDrawingImp::saveSettings()
|
||||
void DlgPrefsTechDrawImp::saveSettings()
|
||||
{
|
||||
pcb_Normal->onSave();
|
||||
pcb_Select->onSave();
|
||||
|
@ -52,7 +52,7 @@ void DlgPrefsDrawingImp::saveSettings()
|
|||
pfc_DefDir->onSave();
|
||||
}
|
||||
|
||||
void DlgPrefsDrawingImp::loadSettings()
|
||||
void DlgPrefsTechDrawImp::loadSettings()
|
||||
{
|
||||
pcb_Normal->onRestore();
|
||||
pcb_Select->onRestore();
|
||||
|
@ -66,7 +66,7 @@ void DlgPrefsDrawingImp::loadSettings()
|
|||
/**
|
||||
* Sets the strings of the subwidgets using the current language.
|
||||
*/
|
||||
void DlgPrefsDrawingImp::changeEvent(QEvent *e)
|
||||
void DlgPrefsTechDrawImp::changeEvent(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
retranslateUi(this);
|
||||
|
@ -76,4 +76,4 @@ void DlgPrefsDrawingImp::changeEvent(QEvent *e)
|
|||
}
|
||||
}
|
||||
|
||||
#include "moc_DlgPrefsDrawingImp.cpp"
|
||||
#include "moc_DlgPrefsTechDrawImp.cpp"
|
|
@ -1,7 +1,7 @@
|
|||
/**************************************************************************
|
||||
* Copyright (c) 2015 FreeCAD Developers *
|
||||
* Author: WandererFan <wandererfan@gmail.com> *
|
||||
* Based on src/Mod/FEM/Gui/DlgPrefsDrawingImp.cpp *
|
||||
* Based on src/Mod/FEM/Gui/DlgPrefsTechDrawImp.cpp *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
|
@ -23,21 +23,21 @@
|
|||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef DRAWINGGUI_DLGPREFSDRAWINGIMP_H
|
||||
#define DRAWINGGUI_DLGPREFSDRAWINGIMP_H
|
||||
#ifndef DRAWINGGUI_DLGPREFSTECHDRAWIMP_H
|
||||
#define DRAWINGGUI_DLGPREFSTECHDRAWIMP_H
|
||||
|
||||
#include "ui_DlgPrefsDrawing.h"
|
||||
#include "ui_DlgPrefsTechDraw.h"
|
||||
#include <Gui/PropertyPage.h>
|
||||
|
||||
namespace TechDrawGui {
|
||||
|
||||
class DlgPrefsDrawingImp : public Gui::Dialog::PreferencePage, public Ui_DlgPrefsDrawingImp
|
||||
class DlgPrefsTechDrawImp : public Gui::Dialog::PreferencePage, public Ui_DlgPrefsTechDrawImp
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DlgPrefsDrawingImp( QWidget* parent = 0 );
|
||||
~DlgPrefsDrawingImp();
|
||||
DlgPrefsTechDrawImp( QWidget* parent = 0 );
|
||||
~DlgPrefsTechDrawImp();
|
||||
|
||||
protected:
|
||||
void saveSettings();
|
||||
|
@ -47,4 +47,4 @@ protected:
|
|||
|
||||
} // namespace TechDrawGui
|
||||
|
||||
#endif // DRAWINGGUI_DLGPREFSDRAWINGIMP_H
|
||||
#endif // DRAWINGGUI_DLGPREFSTECHDRAWIMP_H
|
|
@ -15,7 +15,7 @@
|
|||
<file>icons/View.svg</file>
|
||||
<file>icons/Section.svg</file>
|
||||
<file>icons/PageTemplate.svg</file>
|
||||
<file>icons/preferences-drawing.svg</file>
|
||||
<file>icons/preferences-techdraw.svg</file>
|
||||
<file>icons/actions/document-new.png</file>
|
||||
<file>icons/actions/document-new.svg</file>
|
||||
<file>icons/actions/techdraw-new-default.svg</file>
|
||||
|
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Loading…
Reference in New Issue
Block a user