diff options
Diffstat (limited to 'abs/core/mythinstall/MythVantage-app/mythinstall/vnc.cpp')
-rwxr-xr-x | abs/core/mythinstall/MythVantage-app/mythinstall/vnc.cpp | 108 |
1 files changed, 63 insertions, 45 deletions
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.cpp index 96cb107..11bc371 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.cpp @@ -19,9 +19,10 @@ extern HostParms hostparm; // return gc; // }; //---------x11vnc -static HostLineEdit *HostXVNCpassword() +//static HostLineEdit *HostXVNCpassword() +static HostTextEditSetting *HostXVNCpassword() { - HostLineEdit *gc = new HostLineEdit("HostXVNCpassword"); + HostTextEditSetting *gc = new HostTextEditSetting("HostXVNCpassword"); gc->setLabel(QObject::tr("Password")); gc->setValue(""); gc->SetPasswordEcho(true); @@ -29,82 +30,99 @@ static HostLineEdit *HostXVNCpassword() return gc; }; -static HostCheckBox *HostXVNCEnable() +static HostCheckBoxSetting *HostXVNCEnable() { - HostCheckBox *gc = new HostCheckBox("HostXVNCEnable"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostXVNCEnable"); gc->setLabel(QObject::tr("Enable XVNC")); gc->setValue(false); gc->setHelpText(QObject::tr("This will allow you to remotely see what is currently displayed on the main screen. The session will be available on vnc:2 (port 5902).")); return gc; }; - -class XVNCsettings: public TriggeredConfigurationGroup { +/* +class XVNCsettings: public GroupSetting { public: - XVNCsettings(): - TriggeredConfigurationGroup(false,false,false,false) { + XVNCsettings() +// TriggeredConfigurationGroup(false,false,false,false) { + { setLabel(QObject::tr("XVNC Settings")); - SetVertical(true); - Setting* trigger = HostXVNCEnable() ; +// SetVertical(true); +// Setting* trigger = HostXVNCEnable() ; + HostCheckBoxSetting* trigger = HostXVNCEnable(); addChild(trigger); - setTrigger(trigger); +// setTrigger(trigger); - ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false,false,false); +// ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false,false,false); //settings->addChild(HostXVNClogin()); - settings->addChild(HostXVNCpassword()); - - addTarget("0", new VerticalConfigurationGroup(false, false)); - addTarget("1", settings); - }; +// settings->addChild(HostXVNCpassword()); + HostTextEditSetting* settings = HostXVNCpassword(); +// settings->addTargetedChild("0", new VerticalConfigurationGroup(false, false)); + settings->addTargetedChild("1", settings); + } }; - +*/ //------------------ -static HostLineEdit *HostVNCpassword() +static HostTextEditSetting *HostVNCpassword() { - HostLineEdit *gc = new HostLineEdit("HostVNCpassword"); - gc->setLabel(QObject::tr("Password")); + HostTextEditSetting *gc = new HostTextEditSetting("HostVNCpassword"); + gc->setLabel(QObject::tr("VNC Password")); gc->setValue(""); gc->SetPasswordEcho(true); gc->setHelpText(QObject::tr("Password for VNC account must be at least 5 characters long. Passwords shorter than 5 characters long will silently fail.")); return gc; }; -static HostCheckBox *HostVNCEnable() +static HostCheckBoxSetting *HostVNCEnable() { - HostCheckBox *gc = new HostCheckBox("HostVNCEnable"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostVNCEnable"); gc->setLabel(QObject::tr("Enable VNC")); gc->setValue(false); gc->setHelpText(QObject::tr("This will start a seperate VNC session that can be used for remote administration. The session will be available on vnc:1 (port 5901).")); return gc; }; - -class VNCsettings: public TriggeredConfigurationGroup { +/* +class VNCsettings: public GroupSetting { public: - VNCsettings(): - TriggeredConfigurationGroup(false,false,false,false) { + VNCsettings() +// TriggeredConfigurationGroup(false,false,false,false) { + { setLabel(QObject::tr("VNC Settings")); - SetVertical(true); - Setting* trigger = HostVNCEnable() ; +// SetVertical(true); +// Setting* trigger = HostVNCEnable() ; + HostCheckBoxSetting* trigger = HostVNCEnable(); addChild(trigger); - setTrigger(trigger); +// setTrigger(trigger); - ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false,false,false); +// ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false,false,false); //settings->addChild(HostVNClogin()); - settings->addChild(HostVNCpassword()); + //settings->addChild(HostVNCpassword()); - addTarget("0", new VerticalConfigurationGroup(false, false)); - addTarget("1", settings); - }; + HostTextEditSetting* settings = HostVNCpassword(); +// addTarget("0", new VerticalConfigurationGroup(false, false)); + settings->addTargetedChild("1", settings); +// addTarget("1", settings); + } }; +*/ - -VNChostsettings::VNChostsettings(): - VerticalConfigurationGroup(false,false,false,false) - { - setLabel(QObject::tr("Screen Sharing Settings")); - VNCsettings *vncframe = new VNCsettings(); - XVNCsettings *xvncframe = new XVNCsettings(); - addChild(vncframe); - addChild(xvncframe); - } +VNChostsettings::VNChostsettings() +{ + GroupSetting* SSsettings = new GroupSetting(); + SSsettings->setLabel(QObject::tr("Screen Sharing Settings")); + HostCheckBoxSetting* vnctrigger = HostVNCEnable(); + addChild(vnctrigger); + vnctrigger->addTargetedChild("1", HostVNCpassword()); + //HostTextEditSetting* vncsettings = HostVNCpassword(); + //vncsettings->addTargetedChild("1", vncsettings); + + //SSsettings->addChild(XVNCsettings()); + setLabel(QObject::tr("XVNC Settings")); + HostCheckBoxSetting* xvnctrigger = HostXVNCEnable(); + addChild(xvnctrigger); + HostTextEditSetting* xvncsettings = HostXVNCpassword(); +// settings->addTargetedChild("0", new VerticalConfigurationGroup(false, false)); + xvncsettings->addTargetedChild("1", xvncsettings); + + //addChild(SSsettings); +} |