Skip to content

Commit

Permalink
Cleaning up preferences dialog box & removing qsTr strings. Removing …
Browse files Browse the repository at this point in the history
…option to uninstall plugin files from preferences dialog as this could cause some issues. Updating version number to 0.5.6 in preparation of release
  • Loading branch information
timmeh committed Jan 12, 2019
1 parent 8de0696 commit 43412a9
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 76 deletions.
14 changes: 1 addition & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ This is a plugin for [Cura version 3.x and onward](https://ultimaker.com/en/prod
# <a name="Table_Of_Contents"></a>Table Of Contents
- [Introduction](#Introduction)
- [Installation Instructions](#Installation)
- [Uninstallation Instructions](#Uninstallation)
- [Using the Plugin](#Using_the_Plugin)
- [Preview Image Options](#Preview_Image_Options)
- [Note](#Note)
Expand Down Expand Up @@ -40,7 +39,7 @@ This plugin is now available within the Cura marketplace. Users are encouraged

| Cura Version | Last version of the plugin that works with the version of Cura |
|--------------|------------------------------------------------------------------------|
4.0 | [version 0.5.5](https://github.com/timmehtimmeh/Cura-Dremel-3D20-Plugin/releases/latest)
4.0 | [version 0.5.6](https://github.com/timmehtimmeh/Cura-Dremel-3D20-Plugin/releases/latest)
3.5 or 3.6 | [version 0.5.3](https://github.com/timmehtimmeh/Cura-Dremel-3D20-Plugin/releases/tag/0.5.3)
3.4 or 3.4.1 | [version 0.4.8](https://github.com/timmehtimmeh/Cura-Dremel-3D20-Plugin/releases/tag/0.4.8)
3.3 or 3.3.1 | [version 0.4.3](https://github.com/timmehtimmeh/Cura-Dremel-3D20-Plugin/releases/tag/0.4.3)
Expand All @@ -66,17 +65,6 @@ To install the plugins, follow the instructions below:

4. Upon restart you should have an option to add a Dremel3D20 printer (see "Using the Plugin" section below) - Congratulations, the plugin is now installed!

**Note:** If any errors occurred the Dremel printer files contained within the plugin can be uninstalled and re-installed by going to the Extensions menu->Dremel3D20 Printer Plugin->preferences and uchecking and/or checking the checkbox next to "Dremel 3D Printer File Installed?" text

![Install Printer Files](./docs/preferences.png)

---
# <a name="Uninstallation"></a>Uninstallation
To uninstall the Dremel printer files, open the Extensions menu->Dremel3D20 Printer Plugin->preferences and uncheck the box next to "Dremel 3D Printer File Installed?".

To uninstall the plugin itself, navigate to Cura's Marketplace menu, select "Browse Packages" then click the installed button. Then find the "Dremel 3D20" plugin, and click the uninstall button.
![Uninstall](./docs/uninstall.png)

---
# <a name="Using_the_Plugin"></a>Using the Plugin
Once the plugin has been installed you can use it by following the steps outlined below:
Expand Down
Binary file modified README.pdf
Binary file not shown.
Binary file modified docs/preferences.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions plugins/Dremel3D20/Dremel3D20.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Dremel3D20(QObject, MeshWriter, Extension):
# 1) here
# 2) plugin.json
# 3) package.json
version = "0.5.5"
version = "0.5.6"

## Dictionary that defines how characters are escaped when embedded in
# g-code.
Expand Down Expand Up @@ -274,7 +274,7 @@ def changePluginInstallStatus(self, bInstallFiles):
self.uninstallPluginFiles()


# Install the plugin files.
# Install the plugin files from the included zip file.
def installPluginFiles(self):
Logger.log("i", "Dremel 3D20 Plugin installing printer files")

Expand Down
88 changes: 29 additions & 59 deletions plugins/Dremel3D20/Dremel3D20prefs.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ UM.Dialog
id: base
property string installStatusText

minimumWidth: Math.max(380 * screenScaleFactor,360)
minimumHeight: Math.max(200 * screenScaleFactor,180)
title: catalog.i18nc("@label", "Dremel 3D20 Plugin Preferences")
minimumWidth: Math.floor(UM.Theme.getSize("toolbox_action_button").width * 2.5+3*UM.Theme.getSize("default_margin").width)
minimumHeight: Math.floor(Math.max(120 * screenScaleFactor,120))
title: "Dremel 3D20 Plugin Preferences"

function checkBooleanVals(val) {
if(val == "True") {
Expand All @@ -37,77 +37,47 @@ UM.Dialog


ColumnLayout {
id: col1
anchors.fill: parent
anchors.margins: margin
id: colLayout
anchors.fill: parent
anchors.margins: margin

ColumnLayout {
id: rowLayout
Layout.fillWidth: true

width: Math.round(parent.width)
height: Math.round(parent.height)
CheckBox {
id: screenshotCB
property int renderType: Text.NativeRendering
text: "Select Screenshot Manually"
checked: checkBooleanVals(UM.Preferences.getValue("Dremel3D20/select_screenshot"))
onClicked: manager.setSelectScreenshot(checked)
ToolTip.timeout: 5000
ToolTip.visible: hovered
ToolTip.text: "Check this box to allow you when saving a g3drem file to\nmanually select a screenshot from an image stored on your\nhard drive"
} //end CheckBox

CheckBox {
id: installCB
property int renderType: Text.NativeRendering
text: "Are Dremel 3D20 Printer File Installed? "
CheckBox {
id: screenshotCB
height: UM.Theme.getSize("checkbox").height
width: UM.Theme.getSize("checkbox").width
text: "Select Screenshot Manually"
checked: checkBooleanVals(UM.Preferences.getValue("Dremel3D20/select_screenshot"))
onClicked: manager.setSelectScreenshot(checked)
ToolTip.timeout: 5000
ToolTip.visible: hovered
ToolTip.text: "Uncheck this checkbox to uninstall the Dremel 3D20 printer files\nCheck it to install the files."
checked: checkInstallStatus(UM.Preferences.getValue("Dremel3D20/install_status"))
onClicked: manager.changePluginInstallStatus(checked)
} //end CheckBox
} // end columnlayout
ToolTip.text: "Check this box to allow you when saving a\ng3drem file to manually select a screenshot\nfrom an image stored on your hard drive"
} //end CheckBox

RowLayout {
Row {
id: buttonRow
spacing: UM.Theme.getSize("default_margin").width
width: Math.round(parent.width)
anchors.bottom: parent.bottom

Button
{
id: button1
width: Math.floor(UM.Theme.getSize("toolbox_action_button").width * 1.25)
property int renderType: Text.NativeRendering
text: qsTr("Open plugin website")
text: "Open plugin website"
onClicked: manager.openPluginWebsite()
}

Button
{
id: button
UM.I18nCatalog
{
id: catalog1
name: "cura"
}
property int renderType: Text.NativeRendering
text: catalog1.i18nc("@action:button", "Report Issue")
onClicked: manager.reportIssue()
}
} // end Button

Button
{
id: helpButton
UM.I18nCatalog
{
id: catalog
name: "cura"
}
width: Math.floor(UM.Theme.getSize("toolbox_action_button").width * 1.25)
property int renderType: Text.NativeRendering
text: catalog.i18nc("@action:button", "Help")
text: "Help"
ToolTip.timeout: 1000
ToolTip.visible: hovered
ToolTip.text: "Open documentation"
onClicked: manager.showHelp()
}
} // end RowLayout

} // end Button
} // end Row
} // end ColumnLayout
}
} // end UM.Dialog
2 changes: 1 addition & 1 deletion plugins/Dremel3D20/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Dremel 3D20 Printer Plugin",
"author": "Tim Schoenmackers",
"version": "0.5.5",
"version": "0.5.6",
"description": "Enables the user to add the Dremel Ideabuilder 3D20 printer to Cura and export the proprietary .g3drem files.",
"api": "6.0",
"i18n-catalog": "cura"
Expand Down
2 changes: 1 addition & 1 deletion resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"display_name": "Dremel 3D20",
"package_id": "Dremel3D20",
"package_type": "plugin",
"package_version": "0.5.5",
"package_version": "0.5.6",
"sdk_version": 6,
"tags": [
"Dremel",
Expand Down

0 comments on commit 43412a9

Please sign in to comment.