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):
|
||||
return text
|
||||
|
||||
t1 = QT_TRANSLATE_NOOP("QObject", "Arch")
|
||||
t1 = QT_TRANSLATE_NOOP("QObject", "BIM")
|
||||
t2 = QT_TRANSLATE_NOOP("QObject", "Draft")
|
||||
FreeCADGui.addPreferencePage(":/ui/preferences-arch.ui", t1)
|
||||
FreeCADGui.addPreferencePage(":/ui/preferences-archdefaults.ui", t1)
|
||||
FreeCADGui.addPreferencePage(":/ui/preferencesNativeIFC.ui", t1)
|
||||
if hasattr(FreeCADGui, "draftToolBar"):
|
||||
if hasattr(FreeCADGui.draftToolBar, "loadedPreferences"):
|
||||
return
|
||||
@@ -667,7 +668,6 @@ t = QT_TRANSLATE_NOOP("QObject", "Import-Export")
|
||||
FreeCADGui.addPreferencePage(":/ui/preferences-ifc.ui", t)
|
||||
FreeCADGui.addPreferencePage(":/ui/preferences-ifc-export.ui", t)
|
||||
FreeCADGui.addPreferencePage(":/ui/preferences-dae.ui", t)
|
||||
FreeCADGui.addPreferencePage(":/ui/preferencesNativeIFC.ui", t)
|
||||
|
||||
# Add unit tests
|
||||
FreeCAD.__unit_test__ += ["TestArch"]
|
||||
|
||||
@@ -154,6 +154,7 @@
|
||||
<file>icons/Tree_Part.svg</file>
|
||||
<file>icons/banner.png</file>
|
||||
<file>icons/preferences-arch.svg</file>
|
||||
<file>icons/preferences-bim.svg</file>
|
||||
<file>icons/techdraw-ArchView.svg</file>
|
||||
<file>icons/techdraw-PageDefault.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>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>427</width>
|
||||
<height>688</height>
|
||||
<width>412</width>
|
||||
<height>789</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -16,15 +16,33 @@
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="image">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>178</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>178</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../Arch.qrc">:/icons/banner.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@@ -92,9 +110,9 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<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 name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@@ -102,14 +120,12 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>16</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<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>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -125,7 +141,9 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="../Arch.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>534</width>
|
||||
<height>691</height>
|
||||
<height>718</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -369,6 +369,13 @@ unit to work with when opening the file.</string>
|
||||
</item>
|
||||
</layout>
|
||||
</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>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>555</width>
|
||||
<height>689</height>
|
||||
<height>729</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -476,6 +476,13 @@ are placed in a 'Group' instead.
|
||||
</property>
|
||||
</widget>
|
||||
</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>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -79,10 +79,11 @@ class BIM_Setup:
|
||||
import RebarTools
|
||||
except ImportError:
|
||||
m.append("Reinforcement")
|
||||
try:
|
||||
import BIMServer
|
||||
except ImportError:
|
||||
m.append("WebTools")
|
||||
# disabled as WebTools can currentyl not be installed because of WebGui dependency
|
||||
#try:
|
||||
# import BIMServer
|
||||
#except ImportError:
|
||||
# m.append("WebTools")
|
||||
if sys.version_info.major < 3:
|
||||
try:
|
||||
import CommandsFrame
|
||||
@@ -253,18 +254,6 @@ class BIM_Setup:
|
||||
FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Document").SetString(
|
||||
"prefLicenseUrl", ""
|
||||
) # 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()
|
||||
FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Document").SetBool(
|
||||
"CreateNewDoc", newdoc
|
||||
@@ -531,21 +520,6 @@ class BIM_Setup:
|
||||
lic = [0, 1, 2, 1, 3, 4, 1, 0, 0, 0][
|
||||
lic
|
||||
] # 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(
|
||||
"User parameter:BaseApp/Preferences/Document"
|
||||
).GetBool("CreateNewDoc", False)
|
||||
@@ -604,8 +578,6 @@ class BIM_Setup:
|
||||
self.form.settingAuthor.setText(author)
|
||||
if lic != None:
|
||||
self.form.settingLicense.setCurrentIndex(lic)
|
||||
if bimdefault != None:
|
||||
self.form.settingWorkbench.setCurrentIndex(bimdefault)
|
||||
if newdoc != None:
|
||||
self.form.settingNewdocument.setChecked(newdoc)
|
||||
if bkp != None:
|
||||
|
||||
Reference in New Issue
Block a user