mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 23:05:01 -06:00
CURA-4870 Modify printer menu visibility of the items. Show local or network submenu only when there is local or network printers respectively
This commit is contained in:
parent
dead2122dd
commit
6e35fc5035
1 changed files with 29 additions and 6 deletions
|
@ -3,35 +3,58 @@
|
|||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
|
||||
import UM 1.2 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
Menu
|
||||
{
|
||||
id: menu;
|
||||
id: menu
|
||||
// TODO Enable custom style to the menu
|
||||
// style: MenuStyle
|
||||
// {
|
||||
// frame: Rectangle
|
||||
// {
|
||||
// color: "white"
|
||||
// }
|
||||
// }
|
||||
|
||||
MenuItem
|
||||
{
|
||||
text: catalog.i18nc("@label:category menu label", "Network printers")
|
||||
text: catalog.i18nc("@label:category menu label", "Network enabled printers")
|
||||
enabled: false
|
||||
visible: networkPrinterMenu.count > 0
|
||||
}
|
||||
|
||||
NetworkPrinterMenu { }
|
||||
NetworkPrinterMenu
|
||||
{
|
||||
id: networkPrinterMenu
|
||||
}
|
||||
|
||||
MenuSeparator { }
|
||||
MenuSeparator
|
||||
{
|
||||
visible: networkPrinterMenu.count > 0
|
||||
}
|
||||
|
||||
MenuItem
|
||||
{
|
||||
text: catalog.i18nc("@label:category menu label", "Local printers")
|
||||
enabled: false
|
||||
visible: localPrinterMenu.count > 0
|
||||
}
|
||||
|
||||
LocalPrinterMenu { }
|
||||
LocalPrinterMenu
|
||||
{
|
||||
id: localPrinterMenu
|
||||
}
|
||||
|
||||
ExclusiveGroup { id: group; }
|
||||
|
||||
MenuSeparator { }
|
||||
MenuSeparator
|
||||
{
|
||||
visible: localPrinterMenu.count > 0
|
||||
}
|
||||
|
||||
MenuItem { action: Cura.Actions.addMachine; }
|
||||
MenuItem { action: Cura.Actions.configureMachines; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue