BIM: Reworked preferences and setup screens
* Reworded welcome screen, removed "update" section * Removed Webtools and Start option from setup dialog - fixes #14179 * Renamed Arch preferecnes to BIM - fixes #14121 * Moved NativeIFC preferences to BIM - fixes #14137
This commit is contained in:
committed by
Yorik van Havre
parent
85be479fd6
commit
da86d4b81a
@@ -439,10 +439,11 @@ class BIMWorkbench(Workbench):
|
|||||||
def QT_TRANSLATE_NOOP(context, text):
|
def QT_TRANSLATE_NOOP(context, text):
|
||||||
return text
|
return text
|
||||||
|
|
||||||
t1 = QT_TRANSLATE_NOOP("QObject", "Arch")
|
t1 = QT_TRANSLATE_NOOP("QObject", "BIM")
|
||||||
t2 = QT_TRANSLATE_NOOP("QObject", "Draft")
|
t2 = QT_TRANSLATE_NOOP("QObject", "Draft")
|
||||||
FreeCADGui.addPreferencePage(":/ui/preferences-arch.ui", t1)
|
FreeCADGui.addPreferencePage(":/ui/preferences-arch.ui", t1)
|
||||||
FreeCADGui.addPreferencePage(":/ui/preferences-archdefaults.ui", t1)
|
FreeCADGui.addPreferencePage(":/ui/preferences-archdefaults.ui", t1)
|
||||||
|
FreeCADGui.addPreferencePage(":/ui/preferencesNativeIFC.ui", t1)
|
||||||
if hasattr(FreeCADGui, "draftToolBar"):
|
if hasattr(FreeCADGui, "draftToolBar"):
|
||||||
if hasattr(FreeCADGui.draftToolBar, "loadedPreferences"):
|
if hasattr(FreeCADGui.draftToolBar, "loadedPreferences"):
|
||||||
return
|
return
|
||||||
@@ -667,7 +668,6 @@ t = QT_TRANSLATE_NOOP("QObject", "Import-Export")
|
|||||||
FreeCADGui.addPreferencePage(":/ui/preferences-ifc.ui", t)
|
FreeCADGui.addPreferencePage(":/ui/preferences-ifc.ui", t)
|
||||||
FreeCADGui.addPreferencePage(":/ui/preferences-ifc-export.ui", t)
|
FreeCADGui.addPreferencePage(":/ui/preferences-ifc-export.ui", t)
|
||||||
FreeCADGui.addPreferencePage(":/ui/preferences-dae.ui", t)
|
FreeCADGui.addPreferencePage(":/ui/preferences-dae.ui", t)
|
||||||
FreeCADGui.addPreferencePage(":/ui/preferencesNativeIFC.ui", t)
|
|
||||||
|
|
||||||
# Add unit tests
|
# Add unit tests
|
||||||
FreeCAD.__unit_test__ += ["TestArch"]
|
FreeCAD.__unit_test__ += ["TestArch"]
|
||||||
|
|||||||
@@ -154,6 +154,7 @@
|
|||||||
<file>icons/Tree_Part.svg</file>
|
<file>icons/Tree_Part.svg</file>
|
||||||
<file>icons/banner.png</file>
|
<file>icons/banner.png</file>
|
||||||
<file>icons/preferences-arch.svg</file>
|
<file>icons/preferences-arch.svg</file>
|
||||||
|
<file>icons/preferences-bim.svg</file>
|
||||||
<file>icons/techdraw-ArchView.svg</file>
|
<file>icons/techdraw-ArchView.svg</file>
|
||||||
<file>icons/techdraw-PageDefault.svg</file>
|
<file>icons/techdraw-PageDefault.svg</file>
|
||||||
<file>icons/warning.svg</file>
|
<file>icons/warning.svg</file>
|
||||||
|
|||||||
100
src/Mod/BIM/Resources/icons/preferences-bim.svg
Normal file
100
src/Mod/BIM/Resources/icons/preferences-bim.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 11 KiB |
File diff suppressed because one or more lines are too long
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>427</width>
|
<width>412</width>
|
||||||
<height>688</height>
|
<height>789</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -16,15 +16,33 @@
|
|||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="image">
|
<widget class="QLabel" name="image">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>400</width>
|
<width>400</width>
|
||||||
<height>178</height>
|
<height>178</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="baseSize">
|
||||||
|
<size>
|
||||||
|
<width>400</width>
|
||||||
|
<height>178</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="pixmap">
|
||||||
|
<pixmap resource="../Arch.qrc">:/icons/banner.png</pixmap>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@@ -92,9 +110,9 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_6">
|
<widget class="QLabel" name="label_8">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><html><head/><body><p>You might also want to start from an existing floor plan or 3D model made in another application. Under menu <span style=" font-weight:600;">File -&gt; Import</span>, you will find a wide range of file formats that can be imported into FreeCAD.</p></body></html></string>
|
<string>There is no mandatory behaviour here though, and you can also start creating walls and columns directly, and care about organizing things in levels later.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@@ -102,14 +120,12 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_8">
|
<widget class="QLabel" name="label_6">
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>16</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Keep updated!</string>
|
<string><html><head/><body><p>You might also want to start from an existing floor plan or 3D model made in another application. Under menu <span style=" font-weight:600;">File -&gt; Import</span>, you will find a wide range of file formats that can be imported into FreeCAD.</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -125,7 +141,9 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources>
|
||||||
|
<include location="../Arch.qrc"/>
|
||||||
|
</resources>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
<sender>buttonBox</sender>
|
<sender>buttonBox</sender>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>534</width>
|
<width>534</width>
|
||||||
<height>691</height>
|
<height>718</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -369,6 +369,13 @@ unit to work with when opening the file.</string>
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Check also NativeIFC-specific preferences under BIM -> NativeIFC</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>555</width>
|
<width>555</width>
|
||||||
<height>689</height>
|
<height>729</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -476,6 +476,13 @@ are placed in a 'Group' instead.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Check also NativeIFC-specific preferences under BIM -> NativeIFC</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -79,10 +79,11 @@ class BIM_Setup:
|
|||||||
import RebarTools
|
import RebarTools
|
||||||
except ImportError:
|
except ImportError:
|
||||||
m.append("Reinforcement")
|
m.append("Reinforcement")
|
||||||
try:
|
# disabled as WebTools can currentyl not be installed because of WebGui dependency
|
||||||
import BIMServer
|
#try:
|
||||||
except ImportError:
|
# import BIMServer
|
||||||
m.append("WebTools")
|
#except ImportError:
|
||||||
|
# m.append("WebTools")
|
||||||
if sys.version_info.major < 3:
|
if sys.version_info.major < 3:
|
||||||
try:
|
try:
|
||||||
import CommandsFrame
|
import CommandsFrame
|
||||||
@@ -253,18 +254,6 @@ class BIM_Setup:
|
|||||||
FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Document").SetString(
|
FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Document").SetString(
|
||||||
"prefLicenseUrl", ""
|
"prefLicenseUrl", ""
|
||||||
) # TODO - set correct license URL
|
) # TODO - set correct license URL
|
||||||
bimdefault = self.form.settingWorkbench.currentIndex()
|
|
||||||
if bimdefault == 1:
|
|
||||||
FreeCAD.ParamGet("User parameter:BaseApp/Preferences/General").SetString(
|
|
||||||
"AutoloadModule", "BIMWorkbench"
|
|
||||||
)
|
|
||||||
elif bimdefault == 2:
|
|
||||||
FreeCAD.ParamGet("User parameter:BaseApp/Preferences/General").SetString(
|
|
||||||
"AutoloadModule", "StartWorkbench"
|
|
||||||
)
|
|
||||||
FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").SetString(
|
|
||||||
"AutoloadModule", "BIMWorkbench"
|
|
||||||
)
|
|
||||||
newdoc = self.form.settingNewdocument.isChecked()
|
newdoc = self.form.settingNewdocument.isChecked()
|
||||||
FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Document").SetBool(
|
FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Document").SetBool(
|
||||||
"CreateNewDoc", newdoc
|
"CreateNewDoc", newdoc
|
||||||
@@ -531,21 +520,6 @@ class BIM_Setup:
|
|||||||
lic = [0, 1, 2, 1, 3, 4, 1, 0, 0, 0][
|
lic = [0, 1, 2, 1, 3, 4, 1, 0, 0, 0][
|
||||||
lic
|
lic
|
||||||
] # less choices in our simplified dialog
|
] # less choices in our simplified dialog
|
||||||
bimdefault = FreeCAD.ParamGet(
|
|
||||||
"User parameter:BaseApp/Preferences/General"
|
|
||||||
).GetString("AutoloadModule", "")
|
|
||||||
if bimdefault == "BIMWorkbench":
|
|
||||||
bimdefault = 1
|
|
||||||
elif (
|
|
||||||
bimdefault == "StartWorkbench"
|
|
||||||
and FreeCAD.ParamGet(
|
|
||||||
"User parameter:BaseApp/Preferences/Mod/Start"
|
|
||||||
).GetString("AutoloadModule", "")
|
|
||||||
== "BIMWorkbench"
|
|
||||||
):
|
|
||||||
bimdefault = 2
|
|
||||||
else:
|
|
||||||
bimdefault = 0
|
|
||||||
newdoc = FreeCAD.ParamGet(
|
newdoc = FreeCAD.ParamGet(
|
||||||
"User parameter:BaseApp/Preferences/Document"
|
"User parameter:BaseApp/Preferences/Document"
|
||||||
).GetBool("CreateNewDoc", False)
|
).GetBool("CreateNewDoc", False)
|
||||||
@@ -604,8 +578,6 @@ class BIM_Setup:
|
|||||||
self.form.settingAuthor.setText(author)
|
self.form.settingAuthor.setText(author)
|
||||||
if lic != None:
|
if lic != None:
|
||||||
self.form.settingLicense.setCurrentIndex(lic)
|
self.form.settingLicense.setCurrentIndex(lic)
|
||||||
if bimdefault != None:
|
|
||||||
self.form.settingWorkbench.setCurrentIndex(bimdefault)
|
|
||||||
if newdoc != None:
|
if newdoc != None:
|
||||||
self.form.settingNewdocument.setChecked(newdoc)
|
self.form.settingNewdocument.setChecked(newdoc)
|
||||||
if bkp != None:
|
if bkp != None:
|
||||||
|
|||||||
Reference in New Issue
Block a user