diff options
author | Britney Fransen <brfransen@gmail.com> | 2022-10-18 17:05:29 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2022-10-18 17:05:29 (GMT) |
commit | 05fcbd3195c30dfcfb40f4e7e409ff3698a1d099 (patch) | |
tree | 3f8850ad545deb867954e4b162cd85b7ea767edf /abs/core | |
parent | f9787a14c7931ef20421a4f34c3c3361c164092e (diff) | |
download | linhes_pkgbuild-05fcbd3195c30dfcfb40f4e7e409ff3698a1d099.zip linhes_pkgbuild-05fcbd3195c30dfcfb40f4e7e409ff3698a1d099.tar.gz linhes_pkgbuild-05fcbd3195c30dfcfb40f4e7e409ff3698a1d099.tar.bz2 |
mythinstall: initial work to update to mythui
DOES NOT BUILD
Diffstat (limited to 'abs/core')
22 files changed, 1371 insertions, 1506 deletions
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/autocard.h b/abs/core/mythinstall/MythVantage-app/mythinstall/autocard.h index 4948842..a396932 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/autocard.h +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/autocard.h @@ -2,7 +2,7 @@ #define AUTOCARD_H #include <mythtv/mythdbcon.h> #include "qstringlist.h" -#include "libmyth/settings.h" +//#include "libmyth/settings.h" #include "libmyth/mythwidgets.h" class MPUBLIC AutoCard : public QObject, public ConfigurationDialog diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.cpp index 22d784f..2e63ba9 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.cpp @@ -1,5 +1,5 @@ #include "mythuihelper.h" -#include "settings.h" +//#include "settings.h" #include "compat-mv.h" diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.h b/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.h index 5f6825f..f5717f9 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.h +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.h @@ -1,4 +1,4 @@ -#include "settings.h" +//#include "settings.h" #include "mythstorage.h" class MPUBLIC ImageSelectSetting: public SelectSetting { diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.h b/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.h index 68be528..644898d 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.h +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.h @@ -3,7 +3,7 @@ #include <iostream> #include <fstream> #include <stdio.h> -#include "settings.h" +//#include "settings.h" #include "installsettings.h" #include <qsqldatabase.h> #include <qsqlquery.h> @@ -18,28 +18,21 @@ -class FileShareMainFrameClient: public VerticalConfigurationGroup { +class FileShareMainFrameClient: public GroupSetting { public: FileShareMainFrameClient(); }; -class FileShareMainFrameServer: public VerticalConfigurationGroup { +class FileShareMainFrameServer: public GroupSetting { public: FileShareMainFrameServer(); }; - - - - - -class ClientNFSSettings: public -TriggeredConfigurationGroup { +class ClientNFSSettings: public GroupSetting { public: ClientNFSSettings(); - }; diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/infrared.h b/abs/core/mythinstall/MythVantage-app/mythinstall/infrared.h index e11c49d..8994d18 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/infrared.h +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/infrared.h @@ -3,7 +3,7 @@ #include <iostream> #include <fstream> #include <stdio.h> -#include "settings.h" +//#include "settings.h" #include "installsettings.h" #include <qsqldatabase.h> #include <qsqlquery.h> @@ -15,12 +15,12 @@ #include <qapplication.h> #include "mythmiscutil.h" -class IRFrame: public VerticalConfigurationGroup { +class IRFrame: public GroupSetting { public: IRFrame(); }; - +/* class HostRemoteTypeIR_favorites: public HostImageSelect { public: HostRemoteTypeIR_favorites(); @@ -46,22 +46,16 @@ class HostRemoteTypeIR_user: public HostImageSelect { public: HostRemoteTypeIR_user(); }; +*/ - -class IR_TransmitFrame: public VerticalConfigurationGroup { +class IR_TransmitFrame: public GroupSetting { public: IR_TransmitFrame(); }; -class LCDFrame: public VerticalConfigurationGroup { +class LCDFrame: public GroupSetting { public: LCDFrame(); }; - - - - - - diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp index cb2e918..93d45ae 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp @@ -31,8 +31,18 @@ int mythinstalltype (QString tmp_install_drive) setting.Load(); setting.Save(); - if ( setting.exec() == QDialog::Accepted ) - { + MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); + StandardSettingDialog *ssd = + new StandardSettingDialog(mainStack, "mythinstalltypesettings", + new Mythinstalltype()); + + if (ssd->Create()) + mainStack->AddScreen(ssd); + else + delete ssd; + + //if ( setting.exec() == QDialog::Accepted ) + //{ //get users sizes rootsize = gCoreContext->GetSetting("HOSTOSsize"); homesize = gCoreContext->GetSetting("HOSTHOMEsize"); @@ -74,7 +84,7 @@ int mythinstalltype (QString tmp_install_drive) file.close(); //convert to MB and match calulation in installdialog.cpp disksizeMB = qRound(disksize.toFloat() * 1024 / 1000000); - +/* FIXME change to mythui if (neededsize > disksizeMB) { DialogCode val = MythPopupBox::Show2ButtonPopup( @@ -96,79 +106,65 @@ int mythinstalltype (QString tmp_install_drive) { retc = 0; } - } - else - { - retc = 0; - } +*/ } return retc; - }; -static HostComboBox *HOSTinstallationtype() +static HostComboBoxSetting *HOSTinstallationtype() { - HostComboBox *gc = new HostComboBox("HOSTinstallationtype"); + HostComboBoxSetting *gc = new HostComboBoxSetting("HOSTinstallationtype"); gc->setLabel(QObject::tr("Installation Type")); gc->addSelection("Full/Auto") ; - gc->addSelection("Upgrade"); - //gc->setValue("Full/Auto"); gc->setHelpText(QObject::tr("Full install will erase the entire drive and repartition. Upgrade will format only the first parition of the drive. Only LinHES R8.0 or newer can use Upgrade.")); - return gc; } -static HostSpinBox *HOSTOSsize() +static HostSpinBoxSetting *HOSTOSsize() { #ifdef __MVAPP__ - HostSpinBox *gc = new HostSpinBox("HOSTOSsize", 2, 15, 1, true); + HostSpinBoxSetting *gc = new HostSpinBoxSetting("HOSTOSsize", 2, 15, 1, true); #else - HostSpinBox *gc = new HostSpinBox("HOSTOSsize", 3, 25, 1, true); + HostSpinBoxSetting *gc = new HostSpinBoxSetting("HOSTOSsize", 3, 25, 1, true); #endif - gc->setLabel(QObject::tr("OS size (GB)")); + gc->setLabel(QObject::tr("OS Size (GB)")); gc->setValue(2); - gc->setHelpText(QObject::tr("Amount of space allocated for the root OS." )); - + gc->setHelpText(QObject::tr("Amount of space allocated for the root OS partition.")); return gc; } -static HostSpinBox *HOSTDATAsize() +static HostSpinBoxSetting *HOSTDATAsize() { - HostSpinBox *gc = new HostSpinBox("HOSTDATAsize", 2, 1500, 1, true); - gc->setLabel(QObject::tr("Data size (GB)")); + HostSpinBoxSetting *gc = new HostSpinBoxSetting("HOSTDATAsize", 2, 1500, 1, true); + gc->setLabel(QObject::tr("Data Size (GB)")); gc->setValue(3); - gc->setHelpText(QObject::tr("" )); - + gc->setHelpText(QObject::tr("Amount of space allocated for the data partiton.")); return gc; } -static HostSpinBox *HOSTHOMEsize() +static HostSpinBoxSetting *HOSTHOMEsize() { - HostSpinBox *gc = new HostSpinBox("HOSTHOMEsize", 1, 1500, 1, true); - gc->setLabel(QObject::tr("Home dir size (GB)")); + HostSpinBoxSetting *gc = new HostSpinBoxSetting("HOSTHOMEsize", 1, 1500, 1, true); + gc->setLabel(QObject::tr("Home Size (GB)")); gc->setValue(3); gc->setHelpText(QObject::tr("Amount of space allocated for the home directories partition. Three to five GB will be sufficient for most people. The home partition will be the same filesystem as the root OS." )); - return gc; } -static HostSpinBox *HOSTDatabasesize() +static HostSpinBoxSetting *HOSTDatabasesize() { - HostSpinBox *gc = new HostSpinBox("HOSTDatabasesize", 1, 20, 1, true); - gc->setLabel(QObject::tr("Database partition size (GB)")); + HostSpinBoxSetting *gc = new HostSpinBoxSetting("HOSTDatabasesize", 1, 20, 1, true); + gc->setLabel(QObject::tr("Database Size (GB)")); gc->setValue(4); - gc->setHelpText(QObject::tr("Amount of space allocated for the database partition. Two GB is more then enough for most people. The database partition space will be formatted with the ext3 filesystem." )); - + gc->setHelpText(QObject::tr("Amount of space allocated for the database partition. Two GB is more then enough for most people. The database partition space will be formatted with the ext3 filesystem.")); return gc; } - - -static HostSpinBox *HOSTSWAPsize() +static HostSpinBoxSetting *HOSTSWAPsize() { QString currentitem; QString line; @@ -193,26 +189,25 @@ static HostSpinBox *HOSTSWAPsize() if ( ! ok ) mem = 257 ; //QTextStream(stdout) << mem << endl; - HostSpinBox *gc = new HostSpinBox("HOSTSWAPsize", 256, 256000, 256, true); - gc->setLabel(QObject::tr("Swapspace size (MB)")); + HostSpinBoxSetting *gc = new HostSpinBoxSetting("HOSTSWAPsize", 256, 256000, 256, true); + gc->setLabel(QObject::tr("Swap Size (MB)")); gc->setValue(mem); gc->setHelpText(QObject::tr("Amount of space allocated for the swap partition." )); - return gc; } -static HostCheckBox *HostUseSWAP() +static HostCheckBoxSetting *HostUseSWAP() { - HostCheckBox *gc = new HostCheckBox("HostUseSWAP"); - gc->setLabel(QObject::tr("Use swap partition")); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostUseSWAP"); + gc->setLabel(QObject::tr("Use Swap")); gc->setValue(true); gc->setHelpText(QObject::tr("Enable or disable the swap partition.")); return gc; }; -static HostCheckBox *HostUseALLdata() +static HostCheckBoxSetting *HostUseALLdata() { - HostCheckBox *gc = new HostCheckBox("HostUseALLdata"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostUseALLdata"); gc->setLabel(QObject::tr("Use all remaining space for data")); gc->setValue(true); gc->setHelpText(QObject::tr("If checked the remaining space on the drive will be used for storage. Otherwise you can set the size of the partition.")); @@ -220,26 +215,24 @@ static HostCheckBox *HostUseALLdata() }; -static HostComboBox *HOSTdatafstype() +static HostComboBoxSetting *HOSTdatafstype() { - HostComboBox *gc = new HostComboBox("HOSTdatafstype"); - gc->setLabel(QObject::tr("Data filesystem")); + HostComboBoxSetting *gc = new HostComboBoxSetting("HOSTdatafstype"); + gc->setLabel(QObject::tr("Data File System")); gc->addSelection("ext3") ; gc->addSelection("ext4") ; // gc->addSelection("reiserfs"); gc->addSelection("jfs"); gc->addSelection("xfs"); //gc->addSelection("btrfs"); - - gc->setHelpText(QObject::tr("Filesystem type for data storage.")); - + gc->setHelpText(QObject::tr("File system type for data storage.")); return gc; } -static HostComboBox *HOSTuprootfstype() +static HostComboBoxSetting *HOSTuprootfstype() { - HostComboBox *gc = new HostComboBox("HOSTuprootfstype"); - gc->setLabel(QObject::tr("OS file system")); + HostComboBoxSetting *gc = new HostComboBoxSetting("HOSTuprootfstype"); + gc->setLabel(QObject::tr("OS File System")); gc->addSelection("ext3") ; gc->addSelection("ext4") ; gc->addSelection("reiserfs"); @@ -247,101 +240,109 @@ static HostComboBox *HOSTuprootfstype() //gc->addSelection("xfs"); //gc->addSelection("btrfs"); gc->addSelection("Do_not_format"); - - gc->setHelpText(QObject::tr("Filesystem type for OS. ")); - + gc->setHelpText(QObject::tr("File system type for OS. ")); return gc; } -static HostComboBox *HOSTrootfstype() +static HostComboBoxSetting *HOSTrootfstype() { - HostComboBox *gc = new HostComboBox("HOSTrootfstype"); - gc->setLabel(QObject::tr("Root filesystem format")); + HostComboBoxSetting *gc = new HostComboBoxSetting("HOSTrootfstype"); + gc->setLabel(QObject::tr("Root File System")); gc->addSelection("ext3") ; gc->addSelection("ext4") ; gc->addSelection("reiserfs"); gc->addSelection("jfs"); //gc->addSelection("btrfs"); //gc->addSelection("xfs"); - - gc->setHelpText(QObject::tr("Filesystem type for root OS.")); - + gc->setHelpText(QObject::tr("File system type for root OS.")); return gc; } -class USESwap: - public TriggeredConfigurationGroup { -public: - USESwap(): - TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { - SetVertical(false); - Setting* useswap = HostUseSWAP(); +class USESwap : public GroupSetting +{ + public: + USESwap() + { +// TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { +// SetVertical(false); + HostCheckBoxSetting* useswap = HostUseSWAP(); addChild(useswap); - setTrigger(useswap); - +// setTrigger(useswap); - ConfigurationGroup* swapyes = new VerticalConfigurationGroup(false); - swapyes->addChild(HOSTSWAPsize()); - addTarget("1", swapyes ); - addTarget("0", new VerticalConfigurationGroup(true)); - }; +// ConfigurationGroup* swapyes = new VerticalConfigurationGroup(false); +// swapyes->addChild(HOSTSWAPsize()); +// addTarget("1", swapyes ); +// addTarget("0", new VerticalConfigurationGroup(true)); + useswap->addTargetedChild("1", HOSTSWAPsize()); + } }; -class DATAsize: - public TriggeredConfigurationGroup { -public: - DATAsize(): - TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { - SetVertical(false); - Setting* datasize = HostUseALLdata(); +class DATAsize : public GroupSetting +{ + public: + DATAsize() + { +// TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { +// SetVertical(false); +// Setting* datasize = HostUseALLdata(); + HostCheckBoxSetting* datasize = HostUseALLdata(); addChild(datasize); - setTrigger(datasize); +// setTrigger(datasize); - ConfigurationGroup* alldatano = new VerticalConfigurationGroup(false); - alldatano->addChild(HOSTDATAsize()); - alldatano->addChild(HOSTdatafstype()); +// ConfigurationGroup* alldatano = new VerticalConfigurationGroup(false); +// alldatano->addChild(HOSTDATAsize()); +// alldatano->addChild(HOSTdatafstype()); + datasize->addTargetedChild("1", HOSTDATAsize()); + datasize->addTargetedChild("1", HOSTdatafstype()); + datasize->addTargetedChild("0", HOSTdatafstype()); +// ConfigurationGroup* alldatayes = new VerticalConfigurationGroup(false); +// alldatayes->addChild(HOSTdatafstype()); - ConfigurationGroup* alldatayes = new VerticalConfigurationGroup(false); - alldatayes->addChild(HOSTdatafstype()); - - addTarget("1", alldatayes); - addTarget("0", alldatano); - }; +// addTarget("1", alldatayes); +// addTarget("0", alldatano); + } }; - -class Installationtype: - public TriggeredConfigurationGroup { -public: - Installationtype(): - TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { +class Installationtype : public GroupSetting +{ + public: + Installationtype() + { +// TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { setLabel(QObject::tr("LinHES Install")); - Setting *Mtemplate = HOSTinstallationtype(); +// Setting *Mtemplate = HOSTinstallationtype(); + HostComboBoxSetting *Mtemplate = HOSTinstallationtype(); addChild(Mtemplate); - setTrigger(Mtemplate); +// setTrigger(Mtemplate); - ConfigurationGroup *ospartition = new GridConfigurationGroup(2,false); - ospartition->addChild(HOSTOSsize()); - ospartition->addChild(HOSTrootfstype()); - ospartition->addChild(HOSTHOMEsize()); - ospartition->addChild(HOSTDatabasesize()); +// ConfigurationGroup *ospartition = new GridConfigurationGroup(2,false); +// ospartition->addChild(HOSTOSsize()); +// ospartition->addChild(HOSTrootfstype()); +// ospartition->addChild(HOSTHOMEsize()); +// ospartition->addChild(HOSTDatabasesize()); + Mtemplate->addTargetedChild("1", HOSTOSsize()); + Mtemplate->addTargetedChild("1", HOSTrootfstype()); + Mtemplate->addTargetedChild("1", HOSTHOMEsize()); + Mtemplate->addTargetedChild("1", HOSTDatabasesize()); + Mtemplate->addTargetedChild("0", HOSTuprootfstype()); - ConfigurationGroup *tupgrade = new VerticalConfigurationGroup(false); - tupgrade->addChild(HOSTuprootfstype()); - ConfigurationGroup *tfull = new VerticalConfigurationGroup(false); +// ConfigurationGroup *tupgrade = new VerticalConfigurationGroup(false); +// tupgrade->addChild(HOSTuprootfstype()); + +// ConfigurationGroup *tfull = new VerticalConfigurationGroup(false); // tfull->addChild(HOSTOSsize()); // tfull->addChild(HOSTrootfstype()); - tfull->addChild(ospartition); - tfull->addChild(new USESwap); - tfull->addChild(new DATAsize); +// tfull->addChild(ospartition); +// tfull->addChild(new USESwap); +// tfull->addChild(new DATAsize); - addTarget("Upgrade",tupgrade ); - addTarget("Full/Auto", tfull); - }; +// addTarget("Upgrade",tupgrade ); +// addTarget("Full/Auto", tfull); + } }; Mythinstalltype::Mythinstalltype() @@ -352,6 +353,3 @@ Mythinstalltype::Mythinstalltype() Installationtype *installationtype = new Installationtype(); addChild(installationtype); }; - - - diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.h b/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.h index e043f0a..75f322a 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.h +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.h @@ -1,11 +1,11 @@ -#include <settings.h> -#include "mythdialogs.h" +//#include <settings.h> +//#include "mythdialogs.h" +#include "standardsettings.h" -class Mythinstalltype: public ConfigurationWizard { +class Mythinstalltype : public GroupSetting { public: Mythinstalltype(); }; int mythinstalltype(QString); - diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp index 5eb8717..462aaf9 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp @@ -18,14 +18,10 @@ #include "vnc.h" #include "fileshare.h" - - int timezone_unknown = false; extern HostParms hostparm; //extern DDCinfo ddcinfo; - - bool displaymysqlonly = false ; bool displayshownetwork =false ; bool displayshowhostype = false ; @@ -49,30 +45,28 @@ bool displayvnc = false; bool displayfileshare = false; -static HostComboBox *ThemePainter() +static HostComboBoxSetting *ThemePainter() { - HostComboBox *gc = new HostComboBox("ThemePainter"); + HostComboBoxSetting *gc = new HostComboBoxSetting("ThemePainter"); gc->setLabel(QObject::tr("Paint Engine")); gc->addSelection(QObject::tr("Qt"), "qt"); gc->addSelection(QObject::tr("OpenGL"), "opengl"); gc->setHelpText(QObject::tr("This selects what Myth uses to draw. If you have decent hardware, select OpenGL. Changing this requires a restart.")); return gc; - } - -static HostLineEdit *HostDDnslogin() +static HostTextEditSetting *HostDDnslogin() { - HostLineEdit *gc = new HostLineEdit("HostDDnslogin"); + HostTextEditSetting *gc = new HostTextEditSetting("HostDDnslogin"); gc->setLabel(QObject::tr("Login")); gc->setValue(""); gc->setHelpText(QObject::tr("Login for DDNS account.")); return gc; }; -static HostLineEdit *HostDDnspassword() +static HostTextEditSetting *HostDDnspassword() { - HostLineEdit *gc = new HostLineEdit("HostDDnspassword"); + HostTextEditSetting *gc = new HostTextEditSetting("HostDDnspassword"); gc->setLabel(QObject::tr("Password")); gc->setValue(""); gc->SetPasswordEcho(true); @@ -80,28 +74,29 @@ static HostLineEdit *HostDDnspassword() return gc; }; -static HostLineEdit *HostDDnshostname() +static HostTextEditSetting *HostDDnshostname() { - HostLineEdit *gc = new HostLineEdit("HostDDnshostname"); + HostTextEditSetting *gc = new HostTextEditSetting("HostDDnshostname"); gc->setLabel(QObject::tr("DDNS hostname")); gc->setValue(""); gc->setHelpText(QObject::tr("Hostname used for DDNS.")); return gc; }; -static HostCheckBox *HostDDnsEnable() +static HostCheckBoxSetting *HostDDnsEnable() { - HostCheckBox *gc = new HostCheckBox("HostDDnsEnable"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostDDnsEnable"); gc->setLabel(QObject::tr("Enable DDNS")); gc->setValue(false); gc->setHelpText(QObject::tr("Update DDNS records at dyndns.com. Visit http://dyndns.com to setup your account.")); return gc; }; -class DDnssettings: public TriggeredConfigurationGroup { +/* +class DDnssettings: public GroupSetting { public: DDnssettings(): - TriggeredConfigurationGroup(false,false,false,false) { + GroupSetting(false,false,false,false) { setLabel(QObject::tr("DDNS Settings")); SetVertical(true); Setting* trigger = HostDDnsEnable() ; @@ -117,7 +112,7 @@ public: addTarget("1", settings); }; }; - +*/ QString findnet() @@ -186,9 +181,9 @@ QString findnet_wireless() return netdev; } -static HostComboBox *HostNetDevice() +static HostComboBoxSetting *HostNetDevice() { - HostComboBox *gc = new HostComboBox("HostNetDevice"); + HostComboBoxSetting *gc = new HostComboBoxSetting("HostNetDevice"); gc->setLabel(QObject::tr("Device")); QString foundnet=findnet(); @@ -214,37 +209,36 @@ static HostComboBox *HostNetDevice() if (foundnet.contains("ath0")) gc->addSelection("ath0"); - int findoldnetdevice=gc->findSelection(hostparm.ThisHostnetOLD); + //int findoldnetdevice=gc->findSelection(hostparm.ThisHostnetOLD); + QString findoldnetdevice = gCoreContext->GetSetting("ThisHostnetOLD"); gc->setValue(findoldnetdevice); - - gc->setHelpText(QObject::tr("Network interface")); return gc; }; /* -static HostCheckBox *HostActiveonboot() +static HostCheckBoxSetting *HostActiveonboot() { - HostCheckBox *gc = new HostCheckBox("HostActiveonboot"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostActiveonboot"); gc->setLabel(QObject::tr("Device is active on boot")); gc->setValue(false); gc->setHelpText(QObject::tr("Network is started on boot")); return gc; }; -static HostCheckBox *HostServiceSamba() +static HostCheckBoxSetting *HostServiceSamba() { - HostCheckBox *gc = new HostCheckBox("HostServiceSamba"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostServiceSamba"); gc->setLabel(QObject::tr("Windows sharing")); gc->setValue(false); gc->setHelpText(QObject::tr("Allow window machines to access recorded files")); return gc; }; -static HostCheckBox *HostServiceSamba_write() +static HostCheckBoxSetting *HostServiceSamba_write() { - HostCheckBox *gc = new HostCheckBox("HostServiceSamba_write"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostServiceSamba_write"); gc->setLabel(QObject::tr("Readonly")); gc->setValue(false); gc->setHelpText(QObject::tr("If checked, all remote connections will be read only. If not checked then remote clients will have write and delete abilites. ")); @@ -252,27 +246,27 @@ static HostCheckBox *HostServiceSamba_write() }; -static HostCheckBox *HostServiceSamba_writehome() +static HostCheckBoxSetting *HostServiceSamba_writehome() { - HostCheckBox *gc = new HostCheckBox("HostServiceSamba_writehome"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostServiceSamba_writehome"); gc->setLabel(QObject::tr("Readonly")); gc->setValue(false); gc->setHelpText(QObject::tr("If checked, all remote connections will be read only. If not checked then remote clients will have write and delete abilites. ")); return gc; }; -static HostCheckBox *HostServiceSamba_media() +static HostCheckBoxSetting *HostServiceSamba_media() { - HostCheckBox *gc = new HostCheckBox("HostServiceSamba_media"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostServiceSamba_media"); gc->setLabel(QObject::tr("share media")); gc->setValue(true); gc->setHelpText(QObject::tr(" ")); return gc; }; -static HostCheckBox *HostServiceSamba_home() +static HostCheckBoxSetting *HostServiceSamba_home() { - HostCheckBox *gc = new HostCheckBox("HostServiceSamba_home"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostServiceSamba_home"); gc->setLabel(QObject::tr("share home")); gc->setValue(true); gc->setHelpText(QObject::tr(" ")); @@ -281,9 +275,9 @@ static HostCheckBox *HostServiceSamba_home() -static HostComboBox *HostServiceSamba_domain() +static HostComboBoxSetting *HostServiceSamba_domain() { - HostComboBox *gc = new HostComboBox("HostServiceSamba_domain",true); + HostComboBoxSetting *gc = new HostComboBoxSetting("HostServiceSamba_domain",true); gc->setLabel(QObject::tr("Workgroup")); gc->setHelpText(QObject::tr("Workgroup for smb share")); gc->addSelection("WORKGROUP"); @@ -309,18 +303,18 @@ static HostComboBox *HostServiceSamba_domain() return gc; }; -static HostCheckBox *HostLircWait() +static HostCheckBoxSetting *HostLircWait() { - HostCheckBox *gc = new HostCheckBox("HostLircWait"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostLircWait"); gc->setLabel(QObject::tr("Wait for lirc")); gc->setValue(false); gc->setHelpText(QObject::tr("System will wait for lirc before starting the UI ")); return gc; }; */ -static HostCheckBox *HostBEWait() +static HostCheckBoxSetting *HostBEWait() { - HostCheckBox *gc = new HostCheckBox("HostBEWait"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostBEWait"); gc->setLabel(QObject::tr("Delay starting mythfrontend until mythbackend is running")); gc->setValue(true); gc->setHelpText(QObject::tr("The system will check if mythbackend is online before starting mythfrontend. This will avoid connection errors and configuration screens.")); @@ -329,9 +323,9 @@ static HostCheckBox *HostBEWait() -// static HostComboBox *HostEvrouterConfig() +// static HostComboBoxSetting *HostEvrouterConfig() // { -// HostComboBox *gc = new HostComboBox("HostEvrouterConfig",true); +// HostComboBoxSetting *gc = new HostComboBoxSetting("HostEvrouterConfig",true); // gc->setLabel(QObject::tr("Key Configuration")); // gc->setHelpText(QObject::tr("Choose the key definations that will be used by the event router")); // QString dirtxt; @@ -357,9 +351,9 @@ static HostCheckBox *HostBEWait() // }; -// static HostCheckBox *HostServiceNFS() +// static HostCheckBoxSetting *HostServiceNFS() // { -// HostCheckBox *gc = new HostCheckBox("HostServiceNFS"); +// HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostServiceNFS"); // gc->setLabel(QObject::tr("Standard file sharing")); // gc->setValue(true); // gc->setHelpText(QObject::tr("Allow all machines to access recorded files with nfs")); @@ -367,18 +361,18 @@ static HostCheckBox *HostBEWait() // }; -static HostCheckBox *HostServiceMythWEB() +static HostCheckBoxSetting *HostServiceMythWEB() { - HostCheckBox *gc = new HostCheckBox("HostServiceMythWEB"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostServiceMythWEB"); gc->setLabel(QObject::tr("Enable MythWeb")); gc->setValue(false); gc->setHelpText(QObject::tr("Allow MythTV scheduling using a web browser.")); return gc; }; - -static HostCheckBox *HostServiceHobbitclient() +/* +static HostCheckBoxSetting *HostServiceHobbitclient() { - HostCheckBox *gc = new HostCheckBox("HostServiceHobbitclient"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostServiceHobbitclient"); gc->setLabel(QObject::tr("Hobbit-client")); gc->setValue(false); gc->setHelpText(QObject::tr("Report stats and other stuff to the master backend")); @@ -394,54 +388,54 @@ static GlobalCheckBox *GlobalServiceHobbitserver() return gc; }; -static HostCheckBox *HostServiceRRD() +static HostCheckBoxSetting *HostServiceRRD() { - HostCheckBox *gc = new HostCheckBox("HostServiceRRD"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostServiceRRD"); gc->setLabel(QObject::tr("rrd_stats")); gc->setValue(false); gc->setHelpText(QObject::tr("Collect stats and create graphs of various system resources.")); return gc; }; - -static HostCheckBox *HostUseDHCP() +*/ +static HostCheckBoxSetting *HostUseDHCP() { - HostCheckBox *gc = new HostCheckBox("HostUseDHCP"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostUseDHCP"); gc->setLabel(QObject::tr("Static ip address")); gc->setValue(false); gc->setHelpText(QObject::tr("Enable to use a static ip address, otherwise dhcp will be used.")); return gc; }; -static HostCheckBox *HostRunDHCP() +static HostCheckBoxSetting *HostRunDHCP() { - HostCheckBox *gc = new HostCheckBox("HostRunDHCP"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostRunDHCP"); gc->setLabel(QObject::tr("DHCP Server")); gc->setValue(false); gc->setHelpText(QObject::tr("Only one DHCP server should run on a network. Leave this unchecked if you are not sure.")); return gc; }; -// static HostCheckBox *HostRunEvrouter() +// static HostCheckBoxSetting *HostRunEvrouter() // { -// HostCheckBox *gc = new HostCheckBox("HostRunEvrouter"); +// HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostRunEvrouter"); // gc->setLabel(QObject::tr("Use evrouter")); // gc->setValue(false); // gc->setHelpText(QObject::tr("Evrouter will run custom actions, based on the user defined events.")); // return gc; // }; -static HostCheckBox *HostUsemythfrontend() +static HostCheckBoxSetting *HostUsemythfrontend() { - HostCheckBox *gc = new HostCheckBox("HostUseMythWelcome"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostUseMythWelcome"); gc->setLabel(QObject::tr("Run MythWelcome")); gc->setValue(false); gc->setHelpText(QObject::tr("If checked mythwelcome will be started instead of mythfrontend.")); return gc; }; -static HostCheckBox *HostRunFrontend() +static HostCheckBoxSetting *HostRunFrontend() { - HostCheckBox *gc = new HostCheckBox("HostRunFrontend"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostRunFrontend"); gc->setLabel(QObject::tr("Run Frontend")); gc->setValue(true); gc->setHelpText(QObject::tr("If checked the frontend X windows GUI will start. Most people will want this checked. Disable the frontend if you want the system to run without a display connected.")); @@ -449,9 +443,9 @@ static HostCheckBox *HostRunFrontend() }; -static HostComboBox *HostMysqlserverip_listbox() +static HostComboBoxSetting *HostMysqlserverip_listbox() { - HostComboBox *gc = new HostComboBox("HostMysqlServer",true); + HostComboBoxSetting *gc = new HostComboBoxSetting("HostMysqlServer",true); gc->setLabel(QObject::tr("MySQL Server")); myth_system("avahi-browse -l -r -t _mysql._tcp > /tmp/mysqllist"); @@ -495,9 +489,9 @@ static HostComboBox *HostMysqlserverip_listbox() -static HostCheckBox *HostRemoteBackup() +static HostCheckBoxSetting *HostRemoteBackup() { - HostCheckBox *gc = new HostCheckBox("HostRemoteBackup"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostRemoteBackup"); gc->setLabel(QObject::tr("Remote Backup")); gc->setValue(false); gc->setHelpText(QObject::tr("Copy the system backup file to another directory or host.")); @@ -505,11 +499,11 @@ static HostCheckBox *HostRemoteBackup() }; -static HostComboBox *HostRemoteBackupDir() +static HostComboBoxSetting *HostRemoteBackupDir() { QString tempItem; - HostComboBox *gc = new HostComboBox("HostRemoteBackupDir",true); - gc->setLabel(QObject::tr(" Dir or Host" )); + HostComboBoxSetting *gc = new HostComboBoxSetting("HostRemoteBackupDir",true); + gc->setLabel(QObject::tr("Dir or Host" )); gc->addSelection("dir:/data/storage/disk0"); MSqlQuery query(MSqlQuery::InitCon()); @@ -530,29 +524,26 @@ static HostComboBox *HostRemoteBackupDir() return gc; }; -class Backupsettings: public TriggeredConfigurationGroup { +class Backupsettings: public GroupSetting { public: - Backupsettings(): - TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) { - SetVertical(false); + Backupsettings(): GroupSetting() + { +// SetVertical(false); setLabel(QObject::tr("Backup Settings")); - Setting* trigger = HostRemoteBackup(); - addChild(trigger); - setTrigger(trigger); - ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false); - settings->addChild(HostRemoteBackupDir()); - - addTarget("0", new VerticalConfigurationGroup(false, false)); - addTarget("1", settings); - +// Setting* trigger = HostRemoteBackup(); + addChild(HostRemoteBackup()); +// setTrigger(trigger); +// ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false); +// addTargetedChild(HostRemoteBackupDir(),true); +// addTarget("0", new VerticalConfigurationGroup(false, false)); +// addTarget("1", settings); }; }; - -// static HostCheckBox *HostPKG_MIRROR() +// static HostCheckBoxSetting *HostPKG_MIRROR() // { -// HostCheckBox *gc = new HostCheckBox("HostPKG_MIRROR"); +// HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostPKG_MIRROR"); // gc->setLabel(QObject::tr("Use Local mirror")); // gc->setValue(false); // gc->setHelpText(QObject::tr("Master Backend will be used as the repo source.")); @@ -570,27 +561,27 @@ public: -static HostCheckBox *HostncidClient() +static HostCheckBoxSetting *HostncidClient() { - HostCheckBox *gc = new HostCheckBox("HostncidClient"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostncidClient"); gc->setLabel(QObject::tr("Show CallerID")); gc->setValue(false); gc->setHelpText(QObject::tr("Show CallerID popup. The backend must be running the CallerID program.")); return gc; }; -static HostCheckBox *HostncidDaemon() +static HostCheckBoxSetting *HostncidDaemon() { - HostCheckBox *gc = new HostCheckBox("HostncidDaemon"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostncidDaemon"); gc->setLabel(QObject::tr("Run CallerID")); gc->setValue(false); gc->setHelpText(QObject::tr("Run daemon to collect CallerID information.")); return gc; }; -static HostComboBox *HostSerialPortncid() +static HostComboBoxSetting *HostSerialPortncid() { - HostComboBox *gc = new HostComboBox("HostSerialPortncid",false); + HostComboBoxSetting *gc = new HostComboBoxSetting("HostSerialPortncid",false); gc->setLabel(QObject::tr("Serial Port")); gc->addSelection("ttyS0"); gc->addSelection("ttyS1"); @@ -601,9 +592,9 @@ static HostComboBox *HostSerialPortncid() return gc; } -static HostCheckBox *HostNcidDeviceNetCallerID() +static HostCheckBoxSetting *HostNcidDeviceNetCallerID() { - HostCheckBox *gc = new HostCheckBox("HostNcidDeviceNetCallerID"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostNcidDeviceNetCallerID"); gc->setLabel(QObject::tr("Using a NetCallerID")); gc->setValue(false); gc->setHelpText(QObject::tr("Instead of a typical modem, the serial device is a NetCallerID")); @@ -611,9 +602,9 @@ static HostCheckBox *HostNcidDeviceNetCallerID() }; -static HostCheckBox *Hostbootsplash() +static HostCheckBoxSetting *Hostbootsplash() { - HostCheckBox *gc = new HostCheckBox("Hostbootsplash"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostbootsplash"); gc->setLabel(QObject::tr("Enable Boot Splash")); gc->setValue(false); gc->setHelpText(QObject::tr("Covers up boot messages with LinHES logo.")); @@ -621,10 +612,10 @@ static HostCheckBox *Hostbootsplash() }; //-------------------------------------screensaver settings------------------- - -static HostComboBox *HostScreensaverType() +/* +static HostComboBoxSetting *HostScreensaverType() { - HostComboBox *gc = new HostComboBox("HostScreensaverType"); + HostComboBoxSetting *gc = new HostComboBoxSetting("HostScreensaverType"); gc->setLabel(QObject::tr("Screensaver Program")); gc->addSelection("xscreensaver"); //gc->addSelection("gscreensaver"); @@ -635,7 +626,7 @@ static HostComboBox *HostScreensaverType() return gc; }; -static HostSpinBox *HostScreensaverIdle() +static HostSpinBoxSetting *HostScreensaverIdle() { HostSpinBox *gc = new HostSpinBox("HostScreensaverIdle", 5, 60, 1, true); gc->setLabel(QObject::tr("Idle Time")); @@ -644,18 +635,18 @@ static HostSpinBox *HostScreensaverIdle() return gc; } -static HostCheckBox *HostScreensaverBlank() +static HostCheckBoxSetting *HostScreensaverBlank() { - HostCheckBox *gc = new HostCheckBox("HostScreensaverBlank"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostScreensaverBlank"); gc->setLabel(QObject::tr("Blank")); gc->setValue(false); gc->setHelpText(QObject::tr("Blank the screen instead of using a screensaver")); return gc; }; -static HostCheckBox *HostScreensaverRandom() +static HostCheckBoxSetting *HostScreensaverRandom() { - HostCheckBox *gc = new HostCheckBox("HostScreensaverRandom"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostScreensaverRandom"); gc->setLabel(QObject::tr("Random")); gc->setValue(false); gc->setHelpText(QObject::tr("Use a random screensaver.")); @@ -664,9 +655,9 @@ static HostCheckBox *HostScreensaverRandom() -static HostComboBox *HostGScreensaverTheme() +static HostComboBoxSetting *HostGScreensaverTheme() { - HostComboBox *gc = new HostComboBox("HostGScreensaverTheme"); + HostComboBoxSetting *gc = new HostComboBoxSetting("HostGScreensaverTheme"); gc->setLabel(QObject::tr("Screensaver")); gc->setHelpText(QObject::tr("Screen saver program to use.")); QString line; @@ -686,9 +677,9 @@ static HostComboBox *HostGScreensaverTheme() return gc; }; -static HostComboBox *HostXScreensaverTheme() +static HostComboBoxSetting *HostXScreensaverTheme() { - HostComboBox *gc = new HostComboBox("HostXScreensaverTheme"); + HostComboBoxSetting *gc = new HostComboBoxSetting("HostXScreensaverTheme"); gc->setLabel(QObject::tr("Screensaver")); gc->setHelpText(QObject::tr("Screensaver to display.")); QString dirtxt; @@ -710,11 +701,11 @@ static HostComboBox *HostXScreensaverTheme() return gc; }; -class Screensaverhostsettings: public TriggeredConfigurationGroup { +class Screensaverhostsettings: public GroupSetting { public: Screensaverhostsettings(): - TriggeredConfigurationGroup() { + GroupSetting() { SetVertical(true); setLabel(QObject::tr("Screensaver Settings")); Setting* trigger = HostScreensaverType() ; @@ -735,8 +726,6 @@ public: gscreensaversettings->addChild(HostScreensaverIdle()); gscreensaversettings->addChild(HostGScreensaverTheme()); - - addTarget("tinker", new VerticalConfigurationGroup(false, false)); addTarget("none", new VerticalConfigurationGroup(false, false)); addTarget("gscreensaver", gscreensaversettings); @@ -744,139 +733,139 @@ public: }; }; - +*/ //-------------------------------------access setting---------------------- -static HostCheckBox *Hostaccessnetwork() +static HostCheckBoxSetting *Hostaccessnetwork() { - HostCheckBox *gc = new HostCheckBox("Hostaccessnetwork"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccessnetwork"); gc->setLabel(QObject::tr("Network")); gc->setValue(false); gc->setHelpText(QObject::tr("Control access to Network Settings. Checked means the screen is enabled.")); return gc; }; -static HostCheckBox *Hostaccesshostype() +static HostCheckBoxSetting *Hostaccesshostype() { - HostCheckBox *gc = new HostCheckBox("Hostaccesshostype"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccesshostype"); gc->setLabel(QObject::tr("Host")); gc->setValue(true); gc->setHelpText(QObject::tr("Control access to Host Settings. Checked means the screen is enabled.")); return gc; }; -static HostCheckBox *HostaccesshostypeSystemtype() +static HostCheckBoxSetting *HostaccesshostypeSystemtype() { - HostCheckBox *gc = new HostCheckBox("HostaccesshostypeSystemtype"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostaccesshostypeSystemtype"); gc->setLabel(QObject::tr("Change System Type")); gc->setValue(false); gc->setHelpText(QObject::tr("Ability to change the System Type in Host Settings. Checked means the screen is enabled.")); return gc; }; -static HostCheckBox *Hostaccessmisc() +static HostCheckBoxSetting *Hostaccessmisc() { - HostCheckBox *gc = new HostCheckBox("Hostaccessmisc"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccessmisc"); gc->setLabel(QObject::tr("Miscellanous")); gc->setValue(true); gc->setHelpText(QObject::tr("Control access to Miscellanous Settings. Checked means the screen is enabled.")); return gc; }; -static HostCheckBox *Hostaccesssleep() +static HostCheckBoxSetting *Hostaccesssleep() { - HostCheckBox *gc = new HostCheckBox("Hostaccesssleep"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccesssleep"); gc->setLabel(QObject::tr("Shutdown")); gc->setValue(true); gc->setHelpText(QObject::tr("Control access to Shutdown Settings. Checked means the screen is enabled.")); return gc; }; -static HostCheckBox *Hostaccessadvanced() +static HostCheckBoxSetting *Hostaccessadvanced() { - HostCheckBox *gc = new HostCheckBox("Hostaccessadvanced"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccessadvanced"); gc->setLabel(QObject::tr("Advanced")); gc->setValue(true); gc->setHelpText(QObject::tr("Control access to Advanced Settings. Checked means the screen is enabled. ")); return gc; }; -static HostCheckBox *HostaccessadvancedX() +static HostCheckBoxSetting *HostaccessadvancedX() { - HostCheckBox *gc = new HostCheckBox("HostaccessadvancedX"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostaccessadvancedX"); gc->setLabel(QObject::tr("Display")); gc->setValue(true); gc->setHelpText(QObject::tr("Control access to Display Settings. Checked means the screen is enabled. ")); return gc; }; -static HostCheckBox *Hostaccessddns() +static HostCheckBoxSetting *Hostaccessddns() { - HostCheckBox *gc = new HostCheckBox("Hostaccessddns"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccessddns"); gc->setLabel(QObject::tr("Dynamic DNS")); gc->setValue(true); gc->setHelpText(QObject::tr("Control access to DDNS Settings. Checked means the screen is enabled. ")); return gc; }; -static HostCheckBox *Hostaccesssound() +static HostCheckBoxSetting *Hostaccesssound() { - HostCheckBox *gc = new HostCheckBox("Hostaccesssound"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccesssound"); gc->setLabel(QObject::tr("Audio")); gc->setValue(true); gc->setHelpText(QObject::tr("Control access to Audio Settings. Checked means the screen is enabled.")); return gc; }; - -static HostCheckBox *Hostaccessscreensaver() +/* +static HostCheckBoxSetting *Hostaccessscreensaver() { - HostCheckBox *gc = new HostCheckBox("Hostaccessscreensaver"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccessscreensaver"); gc->setLabel(QObject::tr("Screensaver")); gc->setValue(true); gc->setHelpText(QObject::tr("Control access to Screensaver Settings. Checked means the screen is enabled.")); return gc; }; - -static HostCheckBox *Hostaccessir() +*/ +static HostCheckBoxSetting *Hostaccessir() { - HostCheckBox *gc = new HostCheckBox("Hostaccessir"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccessir"); gc->setLabel(QObject::tr("Remotes")); gc->setValue(true); gc->setHelpText(QObject::tr("Control access to Remotes Settings. Checked means the screen is enabled.")); return gc; }; -static HostCheckBox *Hostaccessplugins() +static HostCheckBoxSetting *Hostaccessplugins() { - HostCheckBox *gc = new HostCheckBox("Hostaccessplugins"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccessplugins"); gc->setLabel(QObject::tr("Programs")); gc->setValue(true); gc->setHelpText(QObject::tr("Control access to Programs. Checked means the screen is enabled.")); return gc; }; -static HostCheckBox *Hostaccessuser() +static HostCheckBoxSetting *Hostaccessuser() { - HostCheckBox *gc = new HostCheckBox("Hostaccessuser"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccessuser"); gc->setLabel(QObject::tr("User Accounts")); gc->setValue(false); gc->setHelpText(QObject::tr("Control access to User Accounts. Checked means the screen is enabled.")); return gc; }; -static HostCheckBox *Hostaccesswebuser() +static HostCheckBoxSetting *Hostaccesswebuser() { - HostCheckBox *gc = new HostCheckBox("Hostaccesswebuser"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccesswebuser"); gc->setLabel(QObject::tr("Web Security")); gc->setValue(true); gc->setHelpText(QObject::tr("Control access to Web Security Settings. Checked means the screen is enabled.")); return gc; }; -static HostCheckBox *Hostaccessvnc() +static HostCheckBoxSetting *Hostaccessvnc() { - HostCheckBox *gc = new HostCheckBox("Hostaccessvnc"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccessvnc"); gc->setLabel(QObject::tr("Screen Sharing")); gc->setValue(true); gc->setHelpText(QObject::tr("Control access to Screen Sharing Settings. Checked means the screen is enabled.")); @@ -884,20 +873,20 @@ static HostCheckBox *Hostaccessvnc() }; -static HostCheckBox *Hostaccessfileshare() +static HostCheckBoxSetting *Hostaccessfileshare() { - HostCheckBox *gc = new HostCheckBox("Hostaccessfileshare"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostaccessfileshare"); gc->setLabel(QObject::tr("File Sharing")); gc->setValue(true); gc->setHelpText(QObject::tr("Control access to File Sharing Settings. Checked means the screen is enabled.")); return gc; }; - -class ACCESShostsettings: public TriggeredConfigurationGroup { +/* +class ACCESShostsettings: public GroupSetting { public: ACCESShostsettings(): - TriggeredConfigurationGroup(false,false,false,false) { + GroupSetting(false,false,false,false) { SetVertical(false); Setting* trigger = Hostaccesshostype () ; addChild(trigger); @@ -912,13 +901,13 @@ public: addTarget("1", settings); }; }; - +*/ //---------------------------------- PLUGINS ---------------------- -static HostCheckBox *Hostpluginmytharchive() +static HostCheckBoxSetting *Hostpluginmytharchive() { - HostCheckBox *gc = new HostCheckBox("Hostpluginmytharchive"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmytharchive"); gc->setLabel(QObject::tr("MythArchive")); gc->setValue(false); gc->setHelpText(QObject::tr("Check to enable MythArchive.")); @@ -926,9 +915,9 @@ static HostCheckBox *Hostpluginmytharchive() }; -static HostCheckBox *Hostpluginmythbrowser() +static HostCheckBoxSetting *Hostpluginmythbrowser() { - HostCheckBox *gc = new HostCheckBox("Hostpluginmythbrowser"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythbrowser"); gc->setLabel(QObject::tr("MythBrowser")); gc->setValue(false); gc->setHelpText(QObject::tr("Check to enable MythBrowser.")); @@ -936,9 +925,9 @@ static HostCheckBox *Hostpluginmythbrowser() }; -static HostCheckBox *Hostpluginmythnetvision() +static HostCheckBoxSetting *Hostpluginmythnetvision() { - HostCheckBox *gc = new HostCheckBox("Hostpluginmythnetvision"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythnetvision"); gc->setLabel(QObject::tr("MythNetvision")); gc->setValue(true); gc->setHelpText(QObject::tr("Check to enable MythNetvision.")); @@ -946,9 +935,9 @@ static HostCheckBox *Hostpluginmythnetvision() }; -static HostCheckBox *Hostpluginmythgallery() +static HostCheckBoxSetting *Hostpluginmythgallery() { - HostCheckBox *gc = new HostCheckBox("Hostpluginmythgallery"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythgallery"); gc->setLabel(QObject::tr("MythGallery")); gc->setValue(true); gc->setHelpText(QObject::tr("Check to enable MythGallery.")); @@ -956,81 +945,81 @@ static HostCheckBox *Hostpluginmythgallery() }; -static HostCheckBox *Hostpluginmythgame() +static HostCheckBoxSetting *Hostpluginmythgame() { - HostCheckBox *gc = new HostCheckBox("Hostpluginmythgame"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythgame"); gc->setLabel(QObject::tr("MythGame")); gc->setValue(false); gc->setHelpText(QObject::tr("Check to enable MythGame.")); return gc; }; -static HostCheckBox *Hostpluginmythgamesnes9x() +static HostCheckBoxSetting *Hostpluginmythgamesnes9x() { - HostCheckBox *gc = new HostCheckBox("Hostpluginmythgamesnes9x"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythgamesnes9x"); gc->setLabel(QObject::tr("snes9x")); gc->setValue(false); gc->setHelpText(QObject::tr("Super Nintendo emulator")); return gc; }; -static HostCheckBox *Hostpluginmythgamefceux() +static HostCheckBoxSetting *Hostpluginmythgamefceux() { - HostCheckBox *gc = new HostCheckBox("Hostpluginmythgamefceux"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythgamefceux"); gc->setLabel(QObject::tr("fceux")); gc->setValue(false); gc->setHelpText(QObject::tr("NES emulator")); return gc; }; -static HostCheckBox *HostpluginmythgameMame() +static HostCheckBoxSetting *HostpluginmythgameMame() { - HostCheckBox *gc = new HostCheckBox("HostpluginmythgameMame"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostpluginmythgameMame"); gc->setLabel(QObject::tr("mame")); gc->setValue(false); gc->setHelpText(QObject::tr("Mame, Multiple Arcade Machine Emulator")); return gc; }; -static HostCheckBox *HostpluginmythgameMednafen() +static HostCheckBoxSetting *HostpluginmythgameMednafen() { - HostCheckBox *gc = new HostCheckBox("HostpluginmythgameMednafen"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostpluginmythgameMednafen"); gc->setLabel(QObject::tr("Mednafen")); gc->setValue(false); gc->setHelpText(QObject::tr("Mednafen is a portable, utilizing OpenGL and SDL, command-line driven multi-system emulator with many advanced features.")); return gc; }; -static HostCheckBox *HostpluginmythgameROMDB() +static HostCheckBoxSetting *HostpluginmythgameROMDB() { - HostCheckBox *gc = new HostCheckBox("HostpluginmythgameROMDB"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostpluginmythgameROMDB"); gc->setLabel(QObject::tr("RomDB")); gc->setValue(true); gc->setHelpText(QObject::tr("Table used my MythGame to store information about games. If you are into games, this is recommended.")); return gc; }; -static HostCheckBox *Hostpluginmythgamemupen64() +static HostCheckBoxSetting *Hostpluginmythgamemupen64() { - HostCheckBox *gc = new HostCheckBox("Hostpluginmythgamemupen64"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythgamemupen64"); gc->setLabel(QObject::tr("mupen64")); gc->setValue(false); gc->setHelpText(QObject::tr("n64 emulator")); return gc; }; -static HostCheckBox *HostpluginmythgameDolphin() +static HostCheckBoxSetting *HostpluginmythgameDolphin() { - HostCheckBox *gc = new HostCheckBox("HostpluginmythgameDolphin"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostpluginmythgameDolphin"); gc->setLabel(QObject::tr("Dolphin")); gc->setValue(false); gc->setHelpText(QObject::tr("Nintendo Wii emulator")); return gc; }; -static HostCheckBox *HostpluginmythgameXe() +static HostCheckBoxSetting *HostpluginmythgameXe() { - HostCheckBox *gc = new HostCheckBox("HostpluginmythgameXe"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostpluginmythgameXe"); gc->setLabel(QObject::tr("Xe")); gc->setValue(false); gc->setHelpText(QObject::tr("Xe is a multisystem emulator. http://www.xe-emulator.com/ for the complete list.")); @@ -1038,9 +1027,9 @@ static HostCheckBox *HostpluginmythgameXe() }; -static HostCheckBox *Hostpluginmythmusic() +static HostCheckBoxSetting *Hostpluginmythmusic() { - HostCheckBox *gc = new HostCheckBox("Hostpluginmythmusic"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythmusic"); gc->setLabel(QObject::tr("MythMusic")); gc->setValue(true); gc->setHelpText(QObject::tr("Check to enable MythMusic.")); @@ -1048,9 +1037,9 @@ static HostCheckBox *Hostpluginmythmusic() }; -static HostCheckBox *Hostpluginmythnews() +static HostCheckBoxSetting *Hostpluginmythnews() { - HostCheckBox *gc = new HostCheckBox("Hostpluginmythnews"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythnews"); gc->setLabel(QObject::tr("MythNews")); gc->setValue(false); gc->setHelpText(QObject::tr("Check to enable MythNews.")); @@ -1058,9 +1047,9 @@ static HostCheckBox *Hostpluginmythnews() }; -static HostCheckBox *Hostpluginmythvideo_dvdcss() +static HostCheckBoxSetting *Hostpluginmythvideo_dvdcss() { - HostCheckBox *gc = new HostCheckBox("Hostpluginmythvideo_dvdcss"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythvideo_dvdcss"); gc->setLabel(QObject::tr("dvdcss")); gc->setValue(false); gc->setHelpText(QObject::tr("libdvdcss is a simple library designed for accessing DVDs like a block device without having to bother about the decryption.")); @@ -1069,9 +1058,9 @@ static HostCheckBox *Hostpluginmythvideo_dvdcss() -static HostCheckBox *Hostpluginmythappletrailers() +static HostCheckBoxSetting *Hostpluginmythappletrailers() { - HostCheckBox *gc = new HostCheckBox("Hostpluginmythappletrailers"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythappletrailers"); gc->setLabel(QObject::tr("MythAppleTrailers")); gc->setValue(false); gc->setHelpText(QObject::tr("Stream trailer's from Apple's website.")); @@ -1079,9 +1068,9 @@ static HostCheckBox *Hostpluginmythappletrailers() }; -static HostCheckBox *Hostpluginmythweather() +static HostCheckBoxSetting *Hostpluginmythweather() { - HostCheckBox *gc = new HostCheckBox("Hostpluginmythweather"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythweather"); gc->setLabel(QObject::tr("MythWeather")); gc->setValue(false); gc->setHelpText(QObject::tr("Check to enable MythWeather.")); @@ -1089,9 +1078,9 @@ static HostCheckBox *Hostpluginmythweather() }; -static HostCheckBox *Hostwebmin() +static HostCheckBoxSetting *Hostwebmin() { - HostCheckBox *gc = new HostCheckBox("Hostwebmin"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostwebmin"); gc->setLabel(QObject::tr("Webmin")); gc->setValue(false); gc->setHelpText(QObject::tr("Webmin is a web-based interface for system administration. Once installed, access it at https://ip.of.back.end:10000 using your root password.")); @@ -1099,9 +1088,9 @@ static HostCheckBox *Hostwebmin() }; -static HostCheckBox *Hostfoldingathome() +static HostCheckBoxSetting *Hostfoldingathome() { - HostCheckBox *gc = new HostCheckBox("Hostfoldingathome"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostfoldingathome"); gc->setLabel(QObject::tr("Folding@home")); gc->setValue(false); gc->setHelpText(QObject::tr("A distributed computing project which studies protein folding, misfolding, aggregation, and related diseases.")); @@ -1110,52 +1099,43 @@ static HostCheckBox *Hostfoldingathome() -static HostCheckBox *Hostwebonlinhes() +static HostCheckBoxSetting *Hostwebonlinhes() { - HostCheckBox *gc = new HostCheckBox("Hostwebonlinhes"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostwebonlinhes"); gc->setLabel(QObject::tr("Web On LinHES")); gc->setValue(false); gc->setHelpText(QObject::tr("Includes Google Chrome and multiple websites with 10' UIs in Media Library --> Online Content.")); return gc; }; -static HostCheckBox *HostHuluDesktop() +static HostCheckBoxSetting *HostXBMC() { - HostCheckBox *gc = new HostCheckBox("HostHuluDesktop"); - gc->setLabel(QObject::tr("Hulu Desktop")); - gc->setValue(false); - gc->setHelpText(QObject::tr("Hulu Desktop for Linux.")); - return gc; -}; - -static HostCheckBox *HostXBMC() -{ - HostCheckBox *gc = new HostCheckBox("HostXBMC"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostXBMC"); gc->setLabel(QObject::tr("Kodi")); gc->setValue(false); gc->setHelpText(QObject::tr("Kodi (formerly known as XBMC) is an award-winning free and open source (GPL) software media player and entertainment hub, featuring a 10-foot user interface for use with televisions and remote controls.")); return gc; }; -static HostCheckBox *HostPLEXHT() +static HostCheckBoxSetting *HostPLEXHT() { - HostCheckBox *gc = new HostCheckBox("HostPLEXHT"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostPLEXHT"); gc->setLabel(QObject::tr("OpenPHT")); gc->setValue(false); gc->setHelpText(QObject::tr("OpenPHT is a community driven fork of Plex Home Theater. OpenPHT is a full-featured, powerful App that connects to Plex Media Server and is designed to be used in the living room from the comfort of your lounge.")); return gc; }; -static HostCheckBox *HostPLEXMS() +static HostCheckBoxSetting *HostPLEXMS() { - HostCheckBox *gc = new HostCheckBox("HostPLEXMS"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostPLEXMS"); gc->setLabel(QObject::tr("Plex Media Server")); gc->setValue(false); gc->setHelpText(QObject::tr("Plex is a centralized home media playback system with a powerful central server - the Plex Media Server - that streams its media to many Plex player Apps.")); return gc; }; -static HostComboBox *Hostfoldingusername() +static HostComboBoxSetting *Hostfoldingusername() { // If there is an old R5.5 style folding directory /myth/folding@home, attempt // to retrieve the old username. @@ -1184,7 +1164,7 @@ static HostComboBox *Hostfoldingusername() pclose (username_pipe); } - HostComboBox *gc = new HostComboBox("Hostfoldingusername",true); + HostComboBoxSetting *gc = new HostComboBoxSetting("Hostfoldingusername",true); gc->setLabel(QObject::tr("Folding Username")); gc->setValue(""); @@ -1192,9 +1172,9 @@ static HostComboBox *Hostfoldingusername() return gc; }; -static HostComboBox *Hostfoldingworksize() +static HostComboBoxSetting *Hostfoldingworksize() { - HostComboBox *gc = new HostComboBox("Hostfoldingworksize"); + HostComboBoxSetting *gc = new HostComboBoxSetting("Hostfoldingworksize"); gc->setLabel(QObject::tr("Work Packet Size")); gc->addSelection("Big", "big"); gc->addSelection("Normal", "normal"); @@ -1203,9 +1183,9 @@ static HostComboBox *Hostfoldingworksize() return gc; }; -// static HostCheckBox *HostXscreensaver() +// static HostCheckBoxSetting *HostXscreensaver() // { -// HostCheckBox *gc = new HostCheckBox("HostXscreensaver"); +// HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostXscreensaver"); // gc->setLabel(QObject::tr("Screensaver")); // gc->setValue(false); // gc->setHelpText(QObject::tr("Run screensaver after 10 minutes of inactivity.")); @@ -1213,9 +1193,9 @@ static HostComboBox *Hostfoldingworksize() // }; -static HostCheckBox *Hostpluginmythzoneminder() +static HostCheckBoxSetting *Hostpluginmythzoneminder() { - HostCheckBox *gc = new HostCheckBox("Hostpluginmythzoneminder"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("Hostpluginmythzoneminder"); gc->setLabel(QObject::tr("MythZoneMinder")); gc->setValue(false); gc->setHelpText(QObject::tr("Check to enable MythZoneMinder.")); @@ -1226,11 +1206,11 @@ static HostCheckBox *Hostpluginmythzoneminder() // -------------End plugins-------------------------------- - -class NCIDsettings: public TriggeredConfigurationGroup { +/* +class NCIDsettings: public GroupSetting { public: NCIDsettings(): - TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) { + GroupSetting(false, false, true, true,false, false, true, true) { SetVertical(true); Setting* trigger = HostncidDaemon() ; addChild(trigger); @@ -1242,11 +1222,11 @@ public: addTarget("1", settings); }; }; - -// class SAMBAsettings: public TriggeredConfigurationGroup { +*/ +// class SAMBAsettings: public GroupSetting { // public: // SAMBAsettings(): -// TriggeredConfigurationGroup(false, true, true, true,false, false, true, true) { +// GroupSetting(false, true, true, true,false, false, true, true) { // SetVertical(false); // Setting* trigger = HostServiceSamba() ; // addChild(trigger); @@ -1266,10 +1246,10 @@ public: // }; -// class Evroutersettings: public TriggeredConfigurationGroup { +// class Evroutersettings: public GroupSetting { // public: // Evroutersettings(): -// TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) { +// GroupSetting(false, false, true, true,false, false, true, true) { // setLabel(QObject::tr("Evrouter config")); // Setting* trigger = HostRunEvrouter() ; // addChild(trigger); @@ -1283,39 +1263,30 @@ public: // }; // }; -class MythGamesettings: public TriggeredConfigurationGroup { +class MythGamesettings: public GroupSetting { public: - MythGamesettings(): - TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) { - setLabel(QObject::tr("Programs - Games")); - Setting* trigger = Hostpluginmythgame() ; + MythGamesettings(): GroupSetting() + { + //setLabel(QObject::tr("Programs - Games")); + HostCheckBoxSetting* trigger = Hostpluginmythgame(); addChild(trigger); - setTrigger(trigger); - - ConfigurationGroup* settings = new GridConfigurationGroup(3,true,true); - settings->addChild(HostpluginmythgameROMDB()); - settings->addChild(Hostpluginmythgamesnes9x()); - settings->addChild(Hostpluginmythgamefceux()); - settings->addChild(HostpluginmythgameMame()); - settings->addChild(HostpluginmythgameMednafen()); - settings->addChild(Hostpluginmythgamemupen64()); - settings->addChild(HostpluginmythgameDolphin()); - settings->addChild(HostpluginmythgameXe()); - - - addTarget("0", new VerticalConfigurationGroup(false, false)); - addTarget("1", settings); + trigger->addTargetedChild("1", HostpluginmythgameROMDB()); + trigger->addTargetedChild("1", Hostpluginmythgamesnes9x()); + trigger->addTargetedChild("1", Hostpluginmythgamefceux()); + trigger->addTargetedChild("1", HostpluginmythgameMame()); + trigger->addTargetedChild("1", HostpluginmythgameMednafen()); + trigger->addTargetedChild("1", Hostpluginmythgamemupen64()); + trigger->addTargetedChild("1", HostpluginmythgameDolphin()); + trigger->addTargetedChild("1", HostpluginmythgameXe()); }; }; - //____________________________________________________________________________ -class eth0_settings: public TriggeredConfigurationGroup { +class eth0_settings: public GroupSetting { public: - eth0_settings(): - TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { - - HostComboBox *HOSTESSIDeth0 = new HostComboBox("HOSTESSIDeth0",true); + eth0_settings(): GroupSetting() + { + HostComboBoxSetting *HOSTESSIDeth0 = new HostComboBoxSetting("HOSTESSIDeth0"); HOSTESSIDeth0->setLabel(QObject::tr("ESSID")); HOSTESSIDeth0->addSelection("MythVantage"); HOSTESSIDeth0->addSelection("home_lan"); @@ -1323,39 +1294,33 @@ public: HOSTESSIDeth0->setHelpText(QObject::tr("ESSID")); addChild(HOSTESSIDeth0); - HostComboBox *HostUseEncryptioneth0 = new HostComboBox("HostUseEncryptioneth0"); +// HostCheckBoxSetting* HostUseEncryption = HostUseEncryptioneth0; +// addChild(HostUseEncryption); + + HostComboBoxSetting *HostUseEncryptioneth0 = new HostComboBoxSetting("HostUseEncryptioneth0"); HostUseEncryptioneth0->setLabel(QObject::tr("Encryption")); HostUseEncryptioneth0->setHelpText(QObject::tr("WPA uses a shared key phrase this is the most secure. For WEP use the generated key, this type of encryption is not recommended.")); - HostUseEncryptioneth0->addSelection("none"); + HostUseEncryptioneth0->addSelection("None"); HostUseEncryptioneth0->addSelection("WPA"); HostUseEncryptioneth0->addSelection("WEP"); - Setting* HostUseEncryption = HostUseEncryptioneth0; - addChild(HostUseEncryption); - setTrigger(HostUseEncryption); - - HostLineEdit *Hostkeyeth0 = new HostLineEdit("Hostkeyeth0"); - Hostkeyeth0->setLabel(QObject::tr("key")); + HostTextEditSetting *Hostkeyeth0 = new HostTextEditSetting("Hostkeyeth0"); + Hostkeyeth0->setLabel(QObject::tr("Encryption Key")); Hostkeyeth0->setHelpText(QObject::tr("Key to use for encryption.")); - - ConfigurationGroup* settings = new GridConfigurationGroup(1,false); - settings->addChild(Hostkeyeth0); - addTarget("none", new GridConfigurationGroup(1,false)); - addTarget("WPA", settings); - addTarget("WEP", settings); + addChild(Hostkeyeth0); }; }; -NetworkSettingseth0::NetworkSettingseth0(): - TriggeredConfigurationGroup(false,false,false,false) { +NetworkSettingseth0::NetworkSettingseth0() +{ setLabel(QObject::tr("Network Settings")); - HostLineEdit *HostIPeth0 = new HostLineEdit("HostIPeth0"); + HostTextEditSetting *HostIPeth0 = new HostTextEditSetting("HostIPeth0"); HostIPeth0->setLabel(QObject::tr("IP Address")); HostIPeth0->setValue("192.168.1.12"); HostIPeth0->setHelpText(QObject::tr("IP address of the new installation.")); - HostComboBox *HostNETMASKeth0 = new HostComboBox("HostNETMASKeth0"); + HostComboBoxSetting *HostNETMASKeth0 = new HostComboBoxSetting("HostNETMASKeth0"); HostNETMASKeth0->setLabel(QObject::tr("Netmask")); HostNETMASKeth0->addSelection("/0 0.0.0.0"); HostNETMASKeth0->addSelection("/1 128.0.0.0"); @@ -1393,65 +1358,67 @@ NetworkSettingseth0::NetworkSettingseth0(): HostNETMASKeth0->setHelpText(QObject::tr("Netmask")); HostNETMASKeth0->setValue(24); - HostLineEdit *HostGWeth0 = new HostLineEdit("HostGWeth0"); + HostTextEditSetting *HostGWeth0 = new HostTextEditSetting("HostGWeth0"); HostGWeth0->setLabel(QObject::tr("Gateway")); HostGWeth0->setValue("192.168.1.1"); HostGWeth0->setHelpText(QObject::tr("This is the default route.")); - - HostLineEdit *HostDNSeth0 = new HostLineEdit("HostDNSeth0"); + HostTextEditSetting *HostDNSeth0 = new HostTextEditSetting("HostDNSeth0"); HostDNSeth0->setLabel(QObject::tr("Name Server")); HostDNSeth0->setValue("192.168.1.1"); HostDNSeth0->setHelpText(QObject::tr("Name server")); - - HostCheckBox *HostActiveonbooteth0 = new HostCheckBox("HostActiveonbooteth0"); + HostCheckBoxSetting *HostActiveonbooteth0 = new HostCheckBoxSetting("HostActiveonbooteth0"); HostActiveonbooteth0->setLabel(QObject::tr("Active")); HostActiveonbooteth0->setValue(true); HostActiveonbooteth0->setHelpText(QObject::tr("Network is started on boot.")); - HostDefaulteth0 = new HostCheckBox("HostDefaulteth0"); + HostDefaulteth0 = new HostCheckBoxSetting("HostDefaulteth0"); HostDefaulteth0->setLabel(QObject::tr("Default")); HostDefaulteth0->setValue(true); HostDefaulteth0->setHelpText(QObject::tr("Will be used as the primary interface.")); - connect(HostDefaulteth0, SIGNAL(valueChanged(bool)), this, SLOT(eth0_disable_others())); + connect(HostDefaulteth0, SIGNAL(valueChanged(bool)), this, + SLOT(eth0_disable_others())); - HostCheckBox *HostUseDHCPeth0 = new HostCheckBox("HostUseDHCPeth0"); - HostUseDHCPeth0 ->setLabel(QObject::tr("Static IP Address")); - HostUseDHCPeth0 ->setValue(false); - HostUseDHCPeth0 ->setHelpText(QObject::tr("Enable to use a static IP address, otherwise DHCP will be used.")); + HostCheckBoxSetting *HostUseDHCPeth0 = new HostCheckBoxSetting("HostUseDHCPeth0"); + HostUseDHCPeth0->setLabel(QObject::tr("Static IP Address")); + HostUseDHCPeth0->setValue(false); + HostUseDHCPeth0->setHelpText(QObject::tr("Enable to use a static IP address, otherwise DHCP will be used.")); - wirelessbuttoneth0 = new TransButtonSetting(); - wirelessbuttoneth0->setLabel(tr("Wireless Settings")); - connect(wirelessbuttoneth0, SIGNAL(pressed()), this, SLOT(eth0_wireless_settings())); + wirelessbuttoneth0 = new ButtonStandardSetting("Wireless Settings"); + connect(wirelessbuttoneth0, SIGNAL(pressed()), this, + SLOT(eth0_wireless_settings())); - ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, true, true); - settings1->addChild(HostActiveonbooteth0); - settings1->addChild(HostDefaulteth0); - settings1-> addChild(wirelessbuttoneth0); - addChild(settings1); + HostDNSeth0->setLabel(QObject::tr("Name Server")); + HostDNSeth0->setValue("192.168.1.1"); + HostDNSeth0->setHelpText(QObject::tr("Name server")); +// ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, true, true); + addChild(HostActiveonbooteth0); + addChild(HostDefaulteth0); + addChild(wirelessbuttoneth0); +// addChild(settings1); - Setting* dhcpEnabled = HostUseDHCPeth0; - addChild(dhcpEnabled); - setTrigger(dhcpEnabled); +// Setting* dhcpEnabled = HostUseDHCPeth0; + addChild(HostUseDHCPeth0); +// setTrigger(dhcpEnabled); - ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false, false, false); - settings->addChild(HostIPeth0); - settings->addChild(HostNETMASKeth0); - settings->addChild(HostGWeth0); - settings->addChild(HostDNSeth0); +// ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false, false, false); + HostUseDHCPeth0->addTargetedChild("1", HostIPeth0); + HostUseDHCPeth0->addTargetedChild("1", HostNETMASKeth0); + HostUseDHCPeth0->addTargetedChild("1", HostGWeth0); + HostUseDHCPeth0->addTargetedChild("1", HostDNSeth0); - addTarget("0", new VerticalConfigurationGroup(false,false,false,false)); - addTarget("1", settings); +// addTarget("0", new VerticalConfigurationGroup(false,false,false,false)); +// addTarget("1", settings); }; eth0options::eth0options() { - - VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false); - rec->setLabel(QObject::tr("Wireless configuration for eth0")); +// VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false); + GroupSetting* rec = new GroupSetting; + rec->setLabel(QObject::tr("Wireless Configuration for eth0")); //rec->setUseLabel(true); rec->addChild(new eth0_settings); addChild(rec); @@ -1467,14 +1434,16 @@ void NetworkSettingseth0::eth0_disable_others() emit eth0_is_default(); } } + void NetworkSettingseth0::eth0_disabled() { HostDefaulteth0->setValue(0); } + void NetworkSettingseth0::eth0_wireless_settings(void) { eth0options eth0screen; - eth0screen.exec(); +// eth0screen.exec(); } void NetworkSettingseth0::eth0_wireless_disable() @@ -1482,51 +1451,42 @@ void NetworkSettingseth0::eth0_wireless_disable() wirelessbuttoneth0->setEnabled(false); } -class eth1_settings: public TriggeredConfigurationGroup { +class eth1_settings: public GroupSetting { public: - eth1_settings(): - TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { - - HostComboBox *HOSTESSIDeth1 = new HostComboBox("HOSTESSIDeth1",true); + eth1_settings(): GroupSetting() + { + HostComboBoxSetting *HOSTESSIDeth1 = new HostComboBoxSetting("HOSTESSIDeth1"); HOSTESSIDeth1->setLabel(QObject::tr("ESSID")); HOSTESSIDeth1->addSelection("MythVantage"); HOSTESSIDeth1->addSelection("home_lan"); HOSTESSIDeth1->addSelection("type_it_here"); HOSTESSIDeth1->setHelpText(QObject::tr("ESSID")); addChild(HOSTESSIDeth1); - HostComboBox *HostUseEncryptioneth0 = new HostComboBox("HostUseEncryptioneth0"); - HostUseEncryptioneth0->setLabel(QObject::tr("Encryption")); - HostUseEncryptioneth0->setHelpText(QObject::tr("WPA, WEP, none")); - HostUseEncryptioneth0->addSelection("none"); - HostUseEncryptioneth0->addSelection("WPA"); - HostUseEncryptioneth0->addSelection("WEP"); - - Setting* HostUseEncryption = HostUseEncryptioneth0; - addChild(HostUseEncryption); - setTrigger(HostUseEncryption); - - HostLineEdit *Hostkeyeth0 = new HostLineEdit("Hostkeyeth0"); - Hostkeyeth0->setLabel(QObject::tr("key")); - Hostkeyeth0->setHelpText(QObject::tr("Key to use for encryption")); - - ConfigurationGroup* settings = new GridConfigurationGroup(1,false); - settings->addChild(Hostkeyeth0); - addTarget("none", new GridConfigurationGroup(1,false)); - addTarget("WPA", settings); - addTarget("WEP", settings); +// HostComboBoxSetting *HostUseEncryptioneth0 = new HostComboBoxSetting("HostUseEncryptioneth0"); + + HostComboBoxSetting *HostUseEncryptioneth1 = new HostComboBoxSetting("HostUseEncryptioneth1"); + HostUseEncryptioneth1->setLabel(QObject::tr("Encryption")); + HostUseEncryptioneth1->setHelpText(QObject::tr("WPA, WEP, none")); + HostUseEncryptioneth1->addSelection("none"); + HostUseEncryptioneth1->addSelection("WPA"); + HostUseEncryptioneth1->addSelection("WEP"); + + HostTextEditSetting *Hostkeyeth1 = new HostTextEditSetting("Hostkeyeth1"); + Hostkeyeth1->setLabel(QObject::tr("Encryption Key")); + Hostkeyeth1->setHelpText(QObject::tr("Key to use for encryption.")); + addChild(Hostkeyeth1); }; }; - -NetworkSettingseth1::NetworkSettingseth1(): - TriggeredConfigurationGroup(false,false,false,false) { +NetworkSettingseth1::NetworkSettingseth1() +{ setLabel(QObject::tr("Network Settings")); - HostLineEdit *HostIPeth1 = new HostLineEdit("HostIPeth1"); - HostIPeth1->setLabel(QObject::tr("Ip address")); + HostTextEditSetting *HostIPeth1 = new HostTextEditSetting("HostIPeth1"); + HostIPeth1->setLabel(QObject::tr("IP Address")); HostIPeth1->setValue("192.168.1.12"); HostIPeth1->setHelpText(QObject::tr("IP address of the new installation")); - HostComboBox *HostNETMASKeth1 = new HostComboBox("HostNETMASKeth1"); + HostComboBoxSetting *HostNETMASKeth1 = new HostComboBoxSetting("HostNETMASKeth1"); HostNETMASKeth1->setLabel(QObject::tr("Netmask")); HostNETMASKeth1->addSelection("/0 0.0.0.0"); HostNETMASKeth1->addSelection("/1 128.0.0.0"); @@ -1564,62 +1524,63 @@ NetworkSettingseth1::NetworkSettingseth1(): HostNETMASKeth1->setHelpText(QObject::tr("Netmask")); HostNETMASKeth1->setValue(24); - HostLineEdit *HostGWeth1 = new HostLineEdit("HostGWeth1"); + HostTextEditSetting *HostGWeth1 = new HostTextEditSetting("HostGWeth1"); HostGWeth1->setLabel(QObject::tr("Gateway")); HostGWeth1->setValue("192.168.1.1"); HostGWeth1->setHelpText(QObject::tr("This is the default route")); - - HostLineEdit *HostDNSeth1 = new HostLineEdit("HostDNSeth1"); - HostDNSeth1->setLabel(QObject::tr("Name server")); + HostTextEditSetting *HostDNSeth1 = new HostTextEditSetting("HostDNSeth1"); + HostDNSeth1->setLabel(QObject::tr("Name Server")); HostDNSeth1->setValue("192.168.1.1"); HostDNSeth1->setHelpText(QObject::tr("Name server")); - - HostCheckBox *HostActiveonbooteth1 = new HostCheckBox("HostActiveonbooteth1"); + HostCheckBoxSetting *HostActiveonbooteth1 = new HostCheckBoxSetting("HostActiveonbooteth1"); HostActiveonbooteth1->setLabel(QObject::tr("Active")); HostActiveonbooteth1->setValue(false); HostActiveonbooteth1->setHelpText(QObject::tr("Network is started on boot")); - HostDefaulteth1 = new HostCheckBox("HostDefaulteth1"); + HostDefaulteth1 = new HostCheckBoxSetting("HostDefaulteth1"); HostDefaulteth1->setLabel(QObject::tr("Default")); HostDefaulteth1->setValue(false); HostDefaulteth1->setHelpText(QObject::tr("Will be used as the primary interface")); - connect(HostDefaulteth1, SIGNAL(valueChanged(bool)), this, SLOT(eth1_disable_others())); - HostCheckBox *HostUseDHCPeth1 = new HostCheckBox("HostUseDHCPeth1"); - HostUseDHCPeth1 ->setLabel(QObject::tr("Static ip address")); + connect(HostDefaulteth1, SIGNAL(valueChanged(bool)), this, + SLOT(eth1_disable_others())); + + HostCheckBoxSetting *HostUseDHCPeth1 = new HostCheckBoxSetting("HostUseDHCPeth1"); + HostUseDHCPeth1 ->setLabel(QObject::tr("Static IP Address")); HostUseDHCPeth1 ->setValue(false); HostUseDHCPeth1 ->setHelpText(QObject::tr("Enable to use a static ip address, otherwise dhcp will be used.")); - wirelessbuttoneth1 = new TransButtonSetting(); - wirelessbuttoneth1->setLabel(tr("Wireless Settings")); - connect(wirelessbuttoneth1, SIGNAL(pressed()), this, SLOT(eth1_wireless_settings())); - - ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false,false); - settings1->addChild(HostActiveonbooteth1); - settings1->addChild(HostDefaulteth1); - settings1-> addChild(wirelessbuttoneth1); + wirelessbuttoneth1 = new ButtonStandardSetting("Wireless Settings"); + connect(wirelessbuttoneth1, SIGNAL(pressed()), this, + SLOT(eth1_wireless_settings())); - addChild(settings1); +// ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false,false); + addChild(HostActiveonbooteth1); + addChild(HostDefaulteth1); + addChild(wirelessbuttoneth1); +// addChild(settings1); - Setting* dhcpEnabled = HostUseDHCPeth1; - addChild(dhcpEnabled); - setTrigger(dhcpEnabled); +// Setting* dhcpEnabled = HostUseDHCPeth1; + addChild(HostUseDHCPeth1); +// setTrigger(dhcpEnabled); - ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false); - settings->addChild(HostIPeth1); - settings->addChild(HostNETMASKeth1); - settings->addChild(HostGWeth1); - settings->addChild(HostDNSeth1); +// ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false); + HostUseDHCPeth1->addTargetedChild("1", HostIPeth1); + HostUseDHCPeth1->addTargetedChild("1", HostNETMASKeth1); + HostUseDHCPeth1->addTargetedChild("1", HostGWeth1); + HostUseDHCPeth1->addTargetedChild("1", HostDNSeth1); - addTarget("0", new VerticalConfigurationGroup(false,false,false,false)); - addTarget("1", settings); +// addTarget("0", new VerticalConfigurationGroup(false,false,false,false)); +// addTarget("1", settings); }; eth1options::eth1options() { - VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false); - rec->setLabel(QObject::tr("Wireless configuration for eth1")); +// VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false); + GroupSetting* rec = new GroupSetting; + rec->setLabel(QObject::tr("Wireless Configuration for eth1")); + //rec->setUseLabel(true); rec->addChild(new eth1_settings); addChild(rec); } @@ -1634,6 +1595,7 @@ void NetworkSettingseth1::eth1_disable_others() emit eth1_is_default(); } } + void NetworkSettingseth1::eth1_disabled() { HostDefaulteth1->setValue(0); @@ -1642,7 +1604,7 @@ void NetworkSettingseth1::eth1_disabled() void NetworkSettingseth1::eth1_wireless_settings(void) { eth1options eth1screen; - eth1screen.exec(); +// eth1screen.exec(); } void NetworkSettingseth1::eth1_wireless_disable() @@ -1651,51 +1613,45 @@ void NetworkSettingseth1::eth1_wireless_disable() } -class wlan0_settings: public TriggeredConfigurationGroup { +class wlan0_settings: public GroupSetting { public: - wlan0_settings(): - TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { - - HostComboBox *HOSTESSIDwlan0 = new HostComboBox("HOSTESSIDwlan0",true); + wlan0_settings(): GroupSetting() + { + HostComboBoxSetting *HOSTESSIDwlan0 = new HostComboBoxSetting("HOSTESSIDwlan0",true); HOSTESSIDwlan0->setLabel(QObject::tr("ESSID")); HOSTESSIDwlan0->addSelection("MythVantage"); HOSTESSIDwlan0->addSelection("home_lan"); HOSTESSIDwlan0->addSelection("type_it_here"); HOSTESSIDwlan0->setHelpText(QObject::tr("ESSID")); addChild(HOSTESSIDwlan0); - HostComboBox *HostUseEncryptionwlan0 = new HostComboBox("HostUseEncryptionwlan0"); + HostComboBoxSetting *HostUseEncryptionwlan0 = new HostComboBoxSetting("HostUseEncryptionwlan0"); HostUseEncryptionwlan0->setLabel(QObject::tr("Encryption")); HostUseEncryptionwlan0->setHelpText(QObject::tr("WPA, WEP, none")); HostUseEncryptionwlan0->addSelection("none"); HostUseEncryptionwlan0->addSelection("WPA"); HostUseEncryptionwlan0->addSelection("WEP"); - Setting* HostUseEncryption = HostUseEncryptionwlan0; - addChild(HostUseEncryption); - setTrigger(HostUseEncryption); +// Setting* HostUseEncryption = HostUseEncryptionwlan0; +// addChild(HostUseEncryption); +// setTrigger(HostUseEncryption); - HostLineEdit *Hostkeywlan0 = new HostLineEdit("Hostkeywlan0"); - Hostkeywlan0->setLabel(QObject::tr("key")); + HostTextEditSetting *Hostkeywlan0 = new HostTextEditSetting("Hostkeywlan0"); + Hostkeywlan0->setLabel(QObject::tr("Encryption Key")); Hostkeywlan0->setHelpText(QObject::tr("Key to use for encryption")); - - ConfigurationGroup* settings = new GridConfigurationGroup(1,false); - settings->addChild(Hostkeywlan0); - addTarget("none", new GridConfigurationGroup(1,false)); - addTarget("WPA", settings); - addTarget("WEP", settings); + addChild(Hostkeywlan0); }; }; -NetworkSettingswlan0::NetworkSettingswlan0(): - TriggeredConfigurationGroup(false,false,false,false) { +NetworkSettingswlan0::NetworkSettingswlan0() +{ setLabel(QObject::tr("Network Settings")); - HostIPwlan0 = new HostLineEdit("HostIPwlan0"); - HostIPwlan0->setLabel(QObject::tr("Ip address")); + HostIPwlan0 = new HostTextEditSetting("HostIPwlan0"); + HostIPwlan0->setLabel(QObject::tr("IP Address")); HostIPwlan0->setValue("192.168.1.12"); HostIPwlan0->setHelpText(QObject::tr("IP address of the new installation")); - HostNETMASKwlan0 = new HostComboBox("HostNETMASKwlan0"); + HostNETMASKwlan0 = new HostComboBoxSetting("HostNETMASKwlan0"); HostNETMASKwlan0->setLabel(QObject::tr("Netmask")); HostNETMASKwlan0->addSelection("/0 0.0.0.0"); HostNETMASKwlan0->addSelection("/1 128.0.0.0"); @@ -1733,64 +1689,65 @@ NetworkSettingswlan0::NetworkSettingswlan0(): HostNETMASKwlan0->setHelpText(QObject::tr("Netmask")); HostNETMASKwlan0->setValue(24); - HostGWwlan0 = new HostLineEdit("HostGWwlan0"); + HostGWwlan0 = new HostTextEditSetting("HostGWwlan0"); HostGWwlan0->setLabel(QObject::tr("Gateway")); HostGWwlan0->setValue("192.168.1.1"); HostGWwlan0->setHelpText(QObject::tr("This is the default route")); - - HostDNSwlan0 = new HostLineEdit("HostDNSwlan0"); + HostDNSwlan0 = new HostTextEditSetting("HostDNSwlan0"); HostDNSwlan0->setLabel(QObject::tr("Name server")); HostDNSwlan0->setValue("192.168.1.1"); HostDNSwlan0->setHelpText(QObject::tr("Name server")); - - HostActiveonbootwlan0 = new HostCheckBox("HostActiveonbootwlan0"); + HostActiveonbootwlan0 = new HostCheckBoxSetting("HostActiveonbootwlan0"); HostActiveonbootwlan0->setLabel(QObject::tr("Active")); HostActiveonbootwlan0->setValue(false); HostActiveonbootwlan0->setHelpText(QObject::tr("Network is started on boot")); - HostDefaultwlan0 = new HostCheckBox("HostDefaultwlan0"); + HostDefaultwlan0 = new HostCheckBoxSetting("HostDefaultwlan0"); HostDefaultwlan0->setLabel(QObject::tr("Default")); HostDefaultwlan0->setValue(false); HostDefaultwlan0->setHelpText(QObject::tr("Will be used as the primary interface")); - connect(HostDefaultwlan0, SIGNAL(valueChanged(bool)), this, SLOT(wlan0_disable_others())); + connect(HostDefaultwlan0, SIGNAL(valueChanged(bool)), this, + SLOT(wlan0_disable_others())); - HostUseDHCPwlan0 = new HostCheckBox("HostUseDHCPwlan0"); - HostUseDHCPwlan0 ->setLabel(QObject::tr("Static ip address")); + HostUseDHCPwlan0 = new HostCheckBoxSetting("HostUseDHCPwlan0"); + HostUseDHCPwlan0 ->setLabel(QObject::tr("Static IP Address")); HostUseDHCPwlan0 ->setValue(false); HostUseDHCPwlan0 ->setHelpText(QObject::tr("Enable to use a static ip address, otherwise dhcp will be used.")); - wirelessbuttonwlan0 = new TransButtonSetting(); - wirelessbuttonwlan0->setLabel(tr("Wireless Settings")); - connect(wirelessbuttonwlan0, SIGNAL(pressed()), this, SLOT(wlan0_wireless_settings())); + wirelessbuttonwlan0 = new ButtonStandardSetting("Wireless Settings"); + connect(wirelessbuttonwlan0, SIGNAL(pressed()), this, + SLOT(wlan0_wireless_settings())); - ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false,false); - settings1->addChild(HostActiveonbootwlan0); - settings1->addChild(HostDefaultwlan0); - settings1-> addChild(wirelessbuttonwlan0); - addChild(settings1); +// ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false,false) + addChild(HostActiveonbootwlan0); + addChild(HostDefaultwlan0); + addChild(wirelessbuttonwlan0); +// addChild(settings1); - Setting* dhcpEnabled = HostUseDHCPwlan0; - addChild(dhcpEnabled); - setTrigger(dhcpEnabled); +// Setting* dhcpEnabled = HostUseDHCPwlan0; + addChild(HostUseDHCPwlan0); +// setTrigger(dhcpEnabled); - ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false); - settings->addChild(HostIPwlan0); - settings->addChild(HostNETMASKwlan0); - settings->addChild(HostGWwlan0); - settings->addChild(HostDNSwlan0); +// ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false); + HostUseDHCPwlan0->addTargetedChild("1", HostIPwlan0); + HostUseDHCPwlan0->addTargetedChild("1", HostNETMASKwlan0); + HostUseDHCPwlan0->addTargetedChild("1", HostGWwlan0); + HostUseDHCPwlan0->addTargetedChild("1", HostDNSwlan0); - addTarget("0", new VerticalConfigurationGroup(false,false,false,false)); - addTarget("1", settings); +// addTarget("0", new VerticalConfigurationGroup(false,false,false,false)); +// addTarget("1", settings); }; Wlan0options::Wlan0options() { - VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false); - rec->setLabel(QObject::tr("Wireless configuration for wlan0")); +// VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false); + GroupSetting* rec = new GroupSetting; + rec->setLabel(QObject::tr("Wireless Configuration for wlan0")); + //rec->setUseLabel(true); rec->addChild(new wlan0_settings); addChild(rec); } @@ -1804,75 +1761,63 @@ void NetworkSettingswlan0::wlan0_disable_others() hostparm.ThisHostDefaultInterface="wlan0"; emit wlan0_is_default(); } - - - } + void NetworkSettingswlan0::wlan0_disabled() { HostDefaultwlan0->setValue(0); } - void NetworkSettingswlan0::wlan0_wireless_settings(void) { Wlan0options wlan0screen; - wlan0screen.exec(); +// wlan0screen.exec(); } + void NetworkSettingswlan0::wlan0_wireless_disable() { wirelessbuttonwlan0->setEnabled(false); } - -class wlan1_settings: public TriggeredConfigurationGroup { +class wlan1_settings: public GroupSetting { public: - wlan1_settings(): - TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { - - HostComboBox *HOSTESSIDwlan1 = new HostComboBox("HOSTESSIDwlan1",true); + wlan1_settings(): GroupSetting() + { + HostComboBoxSetting *HOSTESSIDwlan1 = new HostComboBoxSetting("HOSTESSIDwlan1"); HOSTESSIDwlan1->setLabel(QObject::tr("ESSID")); HOSTESSIDwlan1->addSelection("MythVantage"); HOSTESSIDwlan1->addSelection("home_lan"); HOSTESSIDwlan1->addSelection("type_it_here"); HOSTESSIDwlan1->setHelpText(QObject::tr("ESSID")); addChild(HOSTESSIDwlan1); - - - HostComboBox *HostUseEncryptionwlan1 = new HostComboBox("HostUseEncryptionwlan1"); + HostComboBoxSetting *HostUseEncryptionwlan1 = new HostComboBoxSetting("HostUseEncryptionwlan1"); HostUseEncryptionwlan1->setLabel(QObject::tr("Encryption")); HostUseEncryptionwlan1->setHelpText(QObject::tr("WPA, WEP, none")); HostUseEncryptionwlan1->addSelection("none"); HostUseEncryptionwlan1->addSelection("WPA"); HostUseEncryptionwlan1->addSelection("WEP"); - Setting* HostUseEncryption = HostUseEncryptionwlan1; - addChild(HostUseEncryption); - setTrigger(HostUseEncryption); +// Setting* HostUseEncryption = HostUseEncryptionwlan1; +// addChild(HostUseEncryption); +// setTrigger(HostUseEncryption); - HostLineEdit *Hostkeywlan1 = new HostLineEdit("Hostkeywlan1"); - Hostkeywlan1->setLabel(QObject::tr("key")); + HostTextEditSetting *Hostkeywlan1 = new HostTextEditSetting("Hostkeywlan1"); + Hostkeywlan1->setLabel(QObject::tr("Encryption Key")); Hostkeywlan1->setHelpText(QObject::tr("Key to use for encryption")); - - ConfigurationGroup* settings = new GridConfigurationGroup(1,false); - settings->addChild(Hostkeywlan1); - addTarget("none", new GridConfigurationGroup(1,false)); - addTarget("WPA", settings); - addTarget("WEP", settings); - + addChild(Hostkeywlan1); }; }; -NetworkSettingswlan1::NetworkSettingswlan1(): - TriggeredConfigurationGroup(false,false,false,false) { +NetworkSettingswlan1::NetworkSettingswlan1() +{ setLabel(QObject::tr("Network Settings")); - HostIPwlan1 = new HostLineEdit("HostIPwlan1"); - HostIPwlan1->setLabel(QObject::tr("Ip address")); + HostIPwlan1 = new HostTextEditSetting("HostIPwlan1"); + HostIPwlan1->setLabel(QObject::tr("IP Address")); HostIPwlan1->setValue("192.168.1.12"); HostIPwlan1->setHelpText(QObject::tr("IP address of the new installation")); - HostNETMASKwlan1 = new HostComboBox("HostNETMASKwlan1"); + HostNETMASKwlan1 = new HostComboBoxSetting("HostNETMASKwlan1"); HostNETMASKwlan1->setLabel(QObject::tr("Netmask")); HostNETMASKwlan1->addSelection("/0 0.0.0.0"); HostNETMASKwlan1->addSelection("/1 128.0.0.0"); @@ -1910,64 +1855,64 @@ NetworkSettingswlan1::NetworkSettingswlan1(): HostNETMASKwlan1->setHelpText(QObject::tr("Netmask")); HostNETMASKwlan1->setValue(24); - HostGWwlan1 = new HostLineEdit("HostGWwlan1"); + HostGWwlan1 = new HostTextEditSetting("HostGWwlan1"); HostGWwlan1->setLabel(QObject::tr("Gateway")); HostGWwlan1->setValue("192.168.1.1"); HostGWwlan1->setHelpText(QObject::tr("This is the default route")); - - HostDNSwlan1 = new HostLineEdit("HostDNSwlan1"); + HostDNSwlan1 = new HostTextEditSetting("HostDNSwlan1"); HostDNSwlan1->setLabel(QObject::tr("Name server")); HostDNSwlan1->setValue("192.168.1.1"); HostDNSwlan1->setHelpText(QObject::tr("Name server")); - - HostActiveonbootwlan1 = new HostCheckBox("HostActiveonbootwlan1"); + HostActiveonbootwlan1 = new HostCheckBoxSetting("HostActiveonbootwlan1"); HostActiveonbootwlan1->setLabel(QObject::tr("Active")); HostActiveonbootwlan1->setValue(false); HostActiveonbootwlan1->setHelpText(QObject::tr("Network is started on boot")); - HostUseDHCPwlan1 = new HostCheckBox("HostUseDHCPwlan1"); + HostUseDHCPwlan1 = new HostCheckBoxSetting("HostUseDHCPwlan1"); HostUseDHCPwlan1 ->setLabel(QObject::tr("Static ip address")); HostUseDHCPwlan1 ->setValue(false); HostUseDHCPwlan1 ->setHelpText(QObject::tr("Enable to use a static ip address, otherwise dhcp will be used.")); - wirelessbuttonwlan1 = new TransButtonSetting(); - wirelessbuttonwlan1->setLabel(tr("Wireless Settings")); - connect(wirelessbuttonwlan1, SIGNAL(pressed()), this, SLOT(wlan1_wireless_settings())); + wirelessbuttonwlan1 = new ButtonStandardSetting("Wireless Settings"); + connect(wirelessbuttonwlan1, SIGNAL(pressed()), this, + SLOT(wlan1_wireless_settings())); - HostDefaultwlan1 = new HostCheckBox("HostDefaultwlan1"); + HostDefaultwlan1 = new HostCheckBoxSetting("HostDefaultwlan1"); HostDefaultwlan1->setLabel(QObject::tr("Default")); HostDefaultwlan1->setValue(false); HostDefaultwlan1->setHelpText(QObject::tr("Will be used as the primary interface")); - connect(HostDefaultwlan1, SIGNAL(valueChanged(bool)), this, SLOT(wlan1_disable_others())); - + connect(HostDefaultwlan1, SIGNAL(valueChanged(bool)), this, + SLOT(wlan1_disable_others())); - ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false, false); - settings1->addChild(HostActiveonbootwlan1); - settings1->addChild(HostDefaultwlan1); - settings1-> addChild(wirelessbuttonwlan1); +// ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false, false); + addChild(HostActiveonbootwlan1); + addChild(HostDefaultwlan1); + addChild(wirelessbuttonwlan1); - addChild(settings1); +// addChild(settings1); - Setting* dhcpEnabled = HostUseDHCPwlan1; - addChild(dhcpEnabled); - setTrigger(dhcpEnabled); +// Setting* dhcpEnabled = HostUseDHCPwlan1; + addChild(HostDefaultwlan1); +// setTrigger(dhcpEnabled); - ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false); - settings->addChild(HostIPwlan1); - settings->addChild(HostNETMASKwlan1); - settings->addChild(HostGWwlan1); - settings->addChild(HostDNSwlan1); +// ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false); + HostDefaultwlan1->addTargetedChild("1", HostIPwlan1); + HostDefaultwlan1->addTargetedChild("1", HostNETMASKwlan1); + HostDefaultwlan1->addTargetedChild("1", HostGWwlan1); + HostDefaultwlan1->addTargetedChild("1", HostDNSwlan1); - addTarget("0", new VerticalConfigurationGroup(true)); - addTarget("1", settings); +// addTarget("0", new VerticalConfigurationGroup(true)); +// addTarget("1", settings); }; wlan1options::wlan1options() { - VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false); - rec->setLabel(QObject::tr("Wireless configuration for wlan1")); +// VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false); + GroupSetting* rec = new GroupSetting; + rec->setLabel(QObject::tr("Wireless Configuration for wlan1")); + //rec->setUseLabel(true); rec->addChild(new wlan1_settings); addChild(rec); } @@ -1986,6 +1931,7 @@ void NetworkSettingswlan1::wlan1_disabled() { HostDefaultwlan1->setValue(0); } + void NetworkSettingswlan1::wlan1_wireless_disable() { wirelessbuttonwlan1->setEnabled(false); @@ -1994,17 +1940,16 @@ void NetworkSettingswlan1::wlan1_wireless_disable() void NetworkSettingswlan1::wlan1_wireless_settings(void) { wlan1options wlan1screen; - wlan1screen.exec(); +// wlan1screen.exec(); } //--- -class ath0_settings: public TriggeredConfigurationGroup { +class ath0_settings: public GroupSetting { public: - ath0_settings(): - TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { - - HostComboBox *HOSTESSIDath0 = new HostComboBox("HOSTESSIDath0",true); + ath0_settings(): GroupSetting() + { + HostComboBoxSetting *HOSTESSIDath0 = new HostComboBoxSetting("HOSTESSIDath0",true); HOSTESSIDath0->setLabel(QObject::tr("ESSID")); HOSTESSIDath0->addSelection("MythVantage"); HOSTESSIDath0->addSelection("home_lan"); @@ -2012,41 +1957,34 @@ public: HOSTESSIDath0->setHelpText(QObject::tr("ESSID")); addChild(HOSTESSIDath0); - HostComboBox *HostUseEncryptionath0 = new HostComboBox("HostUseEncryptionath0"); + HostComboBoxSetting *HostUseEncryptionath0 = new HostComboBoxSetting("HostUseEncryptionath0"); HostUseEncryptionath0->setLabel(QObject::tr("Encryption")); HostUseEncryptionath0->setHelpText(QObject::tr("WPA, WEP, none")); HostUseEncryptionath0->addSelection("none"); HostUseEncryptionath0->addSelection("WPA"); HostUseEncryptionath0->addSelection("WEP"); - Setting* HostUseEncryption = HostUseEncryptionath0; - addChild(HostUseEncryption); - setTrigger(HostUseEncryption); +// Setting* HostUseEncryption = HostUseEncryptionath0; +// addChild(HostUseEncryption); +// setTrigger(HostUseEncryption); - HostLineEdit *Hostkeyath0 = new HostLineEdit("Hostkeyath0"); - Hostkeyath0->setLabel(QObject::tr("key")); + HostTextEditSetting *Hostkeyath0 = new HostTextEditSetting("Hostkeyath0"); + Hostkeyath0->setLabel(QObject::tr("Encryption Key")); Hostkeyath0->setHelpText(QObject::tr("Key to use for encryption")); - - ConfigurationGroup* settings = new GridConfigurationGroup(1,false); - settings->addChild(Hostkeyath0); - addTarget("none", new GridConfigurationGroup(1,false)); - addTarget("WPA", settings); - addTarget("WEP", settings); - //- - + addChild(Hostkeyath0); }; }; -NetworkSettingsath0::NetworkSettingsath0(): - TriggeredConfigurationGroup(false,false,false,false) { +NetworkSettingsath0::NetworkSettingsath0() +{ setLabel(QObject::tr("Network Settings")); - HostLineEdit *HostIPath0 = new HostLineEdit("HostIPath0"); - HostIPath0->setLabel(QObject::tr("Ip address")); + HostTextEditSetting *HostIPath0 = new HostTextEditSetting("HostIPath0"); + HostIPath0->setLabel(QObject::tr("IP Address")); HostIPath0->setValue("192.168.1.12"); HostIPath0->setHelpText(QObject::tr("IP address of the new installation")); - HostComboBox *HostNETMASKath0 = new HostComboBox("HostNETMASKath0"); + HostComboBoxSetting *HostNETMASKath0 = new HostComboBoxSetting("HostNETMASKath0"); HostNETMASKath0->setLabel(QObject::tr("Netmask")); HostNETMASKath0->addSelection("/0 0.0.0.0"); HostNETMASKath0->addSelection("/1 128.0.0.0"); @@ -2084,63 +2022,65 @@ NetworkSettingsath0::NetworkSettingsath0(): HostNETMASKath0->setHelpText(QObject::tr("Netmask")); HostNETMASKath0->setValue(24); - HostLineEdit *HostGWath0 = new HostLineEdit("HostGWath0"); + HostTextEditSetting *HostGWath0 = new HostTextEditSetting("HostGWath0"); HostGWath0->setLabel(QObject::tr("Gateway")); HostGWath0->setValue("192.168.1.1"); HostGWath0->setHelpText(QObject::tr("This is the default route")); - HostLineEdit *HostDNSath0 = new HostLineEdit("HostDNSath0"); + HostTextEditSetting *HostDNSath0 = new HostTextEditSetting("HostDNSath0"); HostDNSath0->setLabel(QObject::tr("Name server")); HostDNSath0->setValue("192.168.1.1"); HostDNSath0->setHelpText(QObject::tr("Name server")); - HostCheckBox *HostActiveonbootath0 = new HostCheckBox("HostActiveonbootath0"); + HostCheckBoxSetting *HostActiveonbootath0 = new HostCheckBoxSetting("HostActiveonbootath0"); HostActiveonbootath0->setLabel(QObject::tr("Active")); HostActiveonbootath0->setValue(false); HostActiveonbootath0->setHelpText(QObject::tr("Network is started on boot")); - HostDefaultath0 = new HostCheckBox("HostDefaultath0"); + HostDefaultath0 = new HostCheckBoxSetting("HostDefaultath0"); HostDefaultath0->setLabel(QObject::tr("Default")); HostDefaultath0->setValue(false); HostDefaultath0->setHelpText(QObject::tr("Will be used as the primary interface")); - connect(HostDefaultath0, SIGNAL(valueChanged(bool)), this, SLOT(ath0_disable_others())); + connect(HostDefaultath0, SIGNAL(valueChanged(bool)), this, + SLOT(ath0_disable_others())); - HostCheckBox *HostUseDHCPath0 = new HostCheckBox("HostUseDHCPath0"); + HostCheckBoxSetting *HostUseDHCPath0 = new HostCheckBoxSetting("HostUseDHCPath0"); HostUseDHCPath0 ->setLabel(QObject::tr("Static ip address")); HostUseDHCPath0 ->setValue(false); HostUseDHCPath0 ->setHelpText(QObject::tr("Enable to use a static ip address, otherwise dhcp will be used.")); - wirelessbuttonath0 = new TransButtonSetting(); - wirelessbuttonath0->setLabel(tr("Wireless Settings")); - connect(wirelessbuttonath0, SIGNAL(pressed()), this, SLOT(ath0_wireless_settings())); + wirelessbuttonath0 = new ButtonStandardSetting("Wireless Settings"); + connect(wirelessbuttonath0, SIGNAL(pressed()), this, + SLOT(ath0_wireless_settings())); - ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false,false); - settings1->addChild(HostActiveonbootath0); - settings1->addChild(HostDefaultath0); - settings1-> addChild(wirelessbuttonath0); +// ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false,false); + addChild(HostActiveonbootath0); + addChild(HostDefaultath0); + addChild(wirelessbuttonath0); - addChild(settings1); +// addChild(settings1); - Setting* dhcpEnabled = HostUseDHCPath0; - addChild(dhcpEnabled); - setTrigger(dhcpEnabled); +// Setting* dhcpEnabled = HostUseDHCPath0; + addChild(HostUseDHCPath0); +// setTrigger(dhcpEnabled); - ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false); - settings->addChild(HostIPath0); - settings->addChild(HostNETMASKath0); - settings->addChild(HostGWath0); - settings->addChild(HostDNSath0); +// ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false); + HostUseDHCPath0->addTargetedChild("1", HostIPath0); + HostUseDHCPath0->addTargetedChild("1", HostNETMASKath0); + HostUseDHCPath0->addTargetedChild("1", HostGWath0); + HostUseDHCPath0->addTargetedChild("1", HostDNSath0); - addTarget("0", new VerticalConfigurationGroup(false,false,false,false)); - addTarget("1", settings); +// addTarget("0", new VerticalConfigurationGroup(false,false,false,false)); +// addTarget("1", settings); }; ath0options::ath0options() { - - VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false); - rec->setLabel(QObject::tr("Wireless configuration for ath0")); +// VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false); + GroupSetting* rec = new GroupSetting; + rec->setLabel(QObject::tr("Wireless Configuration for ath0")); + //rec->setUseLabel(true); rec->addChild(new ath0_settings); addChild(rec); } @@ -2155,6 +2095,7 @@ void NetworkSettingsath0::ath0_disable_others() emit ath0_is_default(); } } + void NetworkSettingsath0::ath0_disabled() { HostDefaultath0->setValue(0); @@ -2163,7 +2104,7 @@ void NetworkSettingsath0::ath0_disabled() void NetworkSettingsath0::ath0_wireless_settings(void) { ath0options ath0screen; - ath0screen.exec(); +// ath0screen.exec(); } void NetworkSettingsath0::ath0_wireless_disable() @@ -2175,14 +2116,15 @@ void NetworkSettingsath0::ath0_wireless_disable() //-- class NetworkSettingsFrame: - public TriggeredConfigurationGroup { + public GroupSetting { public: - NetworkSettingsFrame(): - TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) { - setLabel(QObject::tr("Network Settings (1/2)")); - Setting* netdevice = HostNetDevice(); + NetworkSettingsFrame(): GroupSetting() + { + setLabel(QObject::tr("Network Settings")); +// Setting* netdevice = HostNetDevice(); + HostComboBoxSetting* netdevice = HostNetDevice(); addChild(netdevice); - setTrigger(netdevice); +// setTrigger(netdevice); NetworkSettingswlan0 *Nwlan0 = new NetworkSettingswlan0 ; NetworkSettingswlan1 *Nwlan1 = new NetworkSettingswlan1 ; @@ -2267,67 +2209,67 @@ public: connect(Nath0, SIGNAL(ath0_is_default(void)), Neth0, SLOT(eth0_disabled())); - HostLineEdit *HostMTUeth0 = new HostLineEdit("HostMTUeth0"); + HostTextEditSetting *HostMTUeth0 = new HostTextEditSetting("HostMTUeth0"); HostMTUeth0->setLabel(QObject::tr("MTU")); HostMTUeth0->setValue(""); HostMTUeth0->setHelpText(QObject::tr("Leave this blank for default values. Changing this setting can have adverse affects, use with caution. Not all values will be supported by the device.")); - ConfigurationGroup* settingseth0 = new GridConfigurationGroup(1,false, false, false, false); - settingseth0->addChild(Neth0); - settingseth0->addChild(HostMTUeth0); +// ConfigurationGroup* settingseth0 = new GridConfigurationGroup(1,false, false, false, false); + addChild(Neth0); + addChild(HostMTUeth0); - HostLineEdit *HostMTUeth1 = new HostLineEdit("HostMTUeth1"); + HostTextEditSetting *HostMTUeth1 = new HostTextEditSetting("HostMTUeth1"); HostMTUeth1->setLabel(QObject::tr("MTU")); HostMTUeth1->setValue(""); HostMTUeth1->setHelpText(QObject::tr("Leave this blank for default values. Changing this setting can have adverse affects, use with caution. Not all values will be supported by the device.")); - ConfigurationGroup* settingseth1 = new GridConfigurationGroup(1,false, false, true, true); - settingseth1->addChild(Neth1); - settingseth1->addChild(HostMTUeth1); +// ConfigurationGroup* settingseth1 = new GridConfigurationGroup(1,false, false, true, true); + addChild(Neth1); + addChild(HostMTUeth1); - HostLineEdit *HostMTUwlan0 = new HostLineEdit("HostMTUwlan0"); + HostTextEditSetting *HostMTUwlan0 = new HostTextEditSetting("HostMTUwlan0"); HostMTUwlan0->setLabel(QObject::tr("MTU")); HostMTUwlan0->setValue(""); HostMTUwlan0->setHelpText(QObject::tr("Leave this blank for default values. Changing this setting can have adverse affects, use with caution. Not all values will be supported by the device.")); - ConfigurationGroup* settingswlan0 = new GridConfigurationGroup(1,false, false, false, false); - settingswlan0->addChild(Nwlan0); - settingswlan0->addChild(HostMTUwlan0); +// ConfigurationGroup* settingswlan0 = new GridConfigurationGroup(1,false, false, false, false); + addChild(Nwlan0); + addChild(HostMTUwlan0); - HostLineEdit *HostMTUwlan1 = new HostLineEdit("HostMTUwlan1"); + HostTextEditSetting *HostMTUwlan1 = new HostTextEditSetting("HostMTUwlan1"); HostMTUwlan1->setLabel(QObject::tr("MTU")); HostMTUwlan1->setValue(""); HostMTUwlan1->setHelpText(QObject::tr("Leave this blank for default values. Changing this setting can have adverse affects, use with caution. Not all values will be supported by the device.")); - ConfigurationGroup* settingswlan1 = new GridConfigurationGroup(1,false, false, false, false); - settingswlan1->addChild(Nwlan1); - settingswlan1->addChild(HostMTUwlan1); +// ConfigurationGroup* settingswlan1 = new GridConfigurationGroup(1,false, false, false, false); + addChild(Nwlan1); + addChild(HostMTUwlan1); - HostLineEdit *HostMTUath0 = new HostLineEdit("HostMTUath0"); + HostTextEditSetting *HostMTUath0 = new HostTextEditSetting("HostMTUath0"); HostMTUath0->setLabel(QObject::tr("MTU")); HostMTUath0->setValue(""); HostMTUath0->setHelpText(QObject::tr("Leave this blank for default values. Changing this setting can have adverse affects, use with caution. Not all values will be supported by the device.")); - ConfigurationGroup* settingsath0 = new GridConfigurationGroup(1,false, false, false, false); - settingsath0->addChild(Nath0); - settingsath0->addChild(HostMTUath0); - +// ConfigurationGroup* settingsath0 = new GridConfigurationGroup(1,false, false, false, false); + addChild(Nath0); + addChild(HostMTUath0); +/* addTarget("wlan0", settingswlan0); addTarget("wlan1", settingswlan1); addTarget("eth0", settingseth0); addTarget("eth1", settingseth1); addTarget("ath0", settingsath0); +*/ }; }; -NetworkOptionsFrame::NetworkOptionsFrame(): - VerticalConfigurationGroup(false,false,false,false) +NetworkOptionsFrame::NetworkOptionsFrame(): GroupSetting() { setLabel(QObject::tr("Network Settings (2/2)")); - HostMyhostname = new HostComboBox("HostMyhostname",true); + HostMyhostname = new HostComboBoxSetting("HostMyhostname",true); HostMyhostname->setLabel(QObject::tr("Hostname")); HostMyhostname->addSelection("Envy"); HostMyhostname->addSelection("Greed"); @@ -2346,22 +2288,19 @@ NetworkOptionsFrame::NetworkOptionsFrame(): HostMyhostname->addSelection("type_hostname_here"); HostMyhostname->setHelpText(QObject::tr("The hostname must resolve via DNS. If DNS is not available then append .local to the end of the hostname. When using .local, names must not include an additional .")); - FetchDhcpHostnameButton = new TransButtonSetting(); - FetchDhcpHostnameButton ->setLabel(tr("Ask DHCP server for hostname")); - connect(FetchDhcpHostnameButton, SIGNAL(pressed()), this, SLOT(fetch_hostname())); + FetchDhcpHostnameButton = new ButtonStandardSetting("Ask DHCP Server for Hostname"); + connect(FetchDhcpHostnameButton, SIGNAL(pressed()), this, + SLOT(fetch_hostname())); - networklabel = new TransLabelSetting(); QString labelstring; - labelstring = "Will use " + hostparm.ThisHostDefaultInterface + " to check for hostname"; - networklabel->setValue(labelstring); + labelstring = "Will use " + hostparm.ThisHostDefaultInterface + " to check for hostname."; + FetchDhcpHostnameButton->setHelpText(labelstring); - ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false); - settings->addChild(HostMyhostname); - settings->addChild(networklabel); - settings->addChild(FetchDhcpHostnameButton); - - addChild(settings); +// ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false); + addChild(HostMyhostname); + addChild(FetchDhcpHostnameButton); +// addChild(settings); } QString NetworkOptionsFrame::find_hostname() @@ -2402,23 +2341,25 @@ void NetworkOptionsFrame::fetch_hostname() new_host=find_hostname(); if ( new_host != "null" ) { - networklabel->setValue("Updated the hostname."); +// networklabel->setValue("Updated the hostname."); +// FIXME Need dialog ok box HostMyhostname->addSelection(new_host); HostMyhostname->setValue(new_host); } - else - networklabel->setValue("DHCP server did not return a hostname."); +// else +// FIXME Need dialog ok box +// networklabel->setValue("DHCP server did not return a hostname."); } - -static HostCheckBox *HostAutodown() +/* +static HostCheckBoxSetting *HostAutodown() { - HostCheckBox *gc = new HostCheckBox("HostAutodown"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostAutodown"); gc->setLabel(QObject::tr("Turn off machine at a specified time")); gc->setValue(false); gc->setHelpText(QObject::tr("Will turn off this system.")); return gc; }; - +*/ //static HostSpinBox *HostWakeupTime() //{ // HostSpinBox *gc = new HostSpinBox("HostWakeupTime", -1, 23, 1, true); @@ -2427,7 +2368,7 @@ static HostCheckBox *HostAutodown() // gc->setHelpText(QObject::tr("Select the hour to auto poweron this system. Use -1 to disable" )); // return gc; //} - +/* static HostSpinBox *HostShutdownTime() { HostSpinBox *gc = new HostSpinBox("HostShutdownTime", -1, 23, 1, true); @@ -2437,29 +2378,29 @@ static HostSpinBox *HostShutdownTime() return gc; } -static HostSpinBox *HostShutdownTime2() +static HostSpinBoxSetting *HostShutdownTime2() { - HostSpinBox *gc = new HostSpinBox("HostShutdownTime2", -1, 23, 1, true); + HostSpinBoxSetting *gc = new HostSpinBoxSetting("HostShutdownTime2", -1, 23, 1, true); gc->setLabel(QObject::tr("2nd auto Shutdown time")); gc->setValue(2); gc->setHelpText(QObject::tr("Select the hour to poweroff this syste. Times are in 24hour format. Use -1 to disable" )); return gc; } +*/ - -//static HostCheckBox *HostUseWOL() +//static HostCheckBoxSetting *HostUseWOL() //{ -// HostCheckBox *gc = new HostCheckBox("HostUseWOL"); +// HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostUseWOL"); // gc->setLabel(QObject::tr("Use Wake on Lan to turn on system")); // gc->setValue(true); // gc->setHelpText(QObject::tr("Unless you know what your doing leave it checked")); // return gc; //}; -//static HostCheckBox *HostUseNVRAM() +//static HostCheckBoxSetting *HostUseNVRAM() //{ -// HostCheckBox *gc = new HostCheckBox("HostUseNVRAM"); +// HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostUseNVRAM"); // gc->setLabel(QObject::tr("Use nvram to turn on system")); // gc->setValue(true); // gc->setHelpText(QObject::tr("Leaved checked unless nvram causes problems.")); @@ -2467,9 +2408,9 @@ static HostSpinBox *HostShutdownTime2() //}; -static HostCheckBox *HostUseXLargeMouse() +static HostCheckBoxSetting *HostUseXLargeMouse() { - HostCheckBox *gc = new HostCheckBox("HostUseXLargeMouse"); + HostCheckBoxSetting *gc = new HostCheckBoxSetting("HostUseXLargeMouse"); gc->setLabel(QObject::tr("Large Mouse Pointer")); gc->setValue(true); gc->setHelpText(QObject::tr("Use an extra large mouse pointer. This takes effect the next time the frontend is started.")); @@ -2477,12 +2418,12 @@ static HostCheckBox *HostUseXLargeMouse() }; - -class WakeSettings: public TriggeredConfigurationGroup { +/* +class WakeSettings: public GroupSetting { public: WakeSettings(): - TriggeredConfigurationGroup(true) { + GroupSetting(true) { setLabel(QObject::tr("Shutdown Settings")); Setting* Autodown = HostAutodown(); addChild(Autodown); @@ -2497,78 +2438,78 @@ public: addTarget("1", settings); }; }; +*/ -class Frontend_settings_group: public TriggeredConfigurationGroup { +class Frontend_settings_group: public GroupSetting { public: - Frontend_settings_group(): - TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { - Setting* fe = HostRunFrontend(); + Frontend_settings_group(): GroupSetting() +{ + HostCheckBoxSetting* fe = HostRunFrontend(); addChild(fe); - setTrigger(fe); - ConfigurationGroup* setting1 = new GridConfigurationGroup(2,false); +// ConfigurationGroup* setting1 = new GridConfigurationGroup(2,false); - setting1->addChild(HostUseXLargeMouse()); - setting1->addChild(HostUsemythfrontend()); + fe->addTargetedChild("1", HostUseXLargeMouse()); + fe->addTargetedChild("1", HostUsemythfrontend()); // setting1->addChild(HostXres()); - ConfigurationGroup* settings = new VerticalConfigurationGroup(false); - settings->addChild(setting1); +// ConfigurationGroup* settings = new VerticalConfigurationGroup(false); +// settings->addChild(setting1); // settings->addChild(new HostRemoteType); - addTarget("0", new VerticalConfigurationGroup(false)); - addTarget("1", settings); +// addTarget("0", new VerticalConfigurationGroup(false)); +// addTarget("1", settings); }; }; -SystemtypeGroup::SystemtypeGroup(): TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) { +SystemtypeGroup::SystemtypeGroup() +{ setLabel(QObject::tr("System Type")); - HostSystemType = new HostComboBox("HostSystemType"); + HostSystemType = new HostComboBoxSetting("HostSystemType"); HostSystemType->setLabel(QObject::tr("System Type")); HostSystemType->addSelection("Master_backend"); HostSystemType->addSelection("Frontend_only"); // HostSystemType->addSelection("Standalone"); HostSystemType->addSelection("Slave_backend"); - if ( ((gCoreContext->GetSetting("HostaccesshostypeSystemtype")) == "0" )) + if ( ((gCoreContext->GetSetting("HostaccesshostypeSystemtype")) == "0" ) ) HostSystemType->setEnabled(false); addChild(HostSystemType); - setTrigger(HostSystemType); - ConfigurationGroup* fe1 = new GridConfigurationGroup(2,false,false,true,true); - fe1->addChild(HostUseXLargeMouse()); - fe1->addChild(HostUsemythfrontend()); +// ConfigurationGroup* fe1 = new GridConfigurationGroup(2,false,false,true,true); + HostSystemType->addTargetedChild("Master_backend", HostUseXLargeMouse()); + HostSystemType->addTargetedChild("Master_backend", HostUsemythfrontend()); - ConfigurationGroup* standalone = new VerticalConfigurationGroup(false,false,true,true); +// ConfigurationGroup* standalone = new VerticalConfigurationGroup(false,false,true,true); // standalone->addChild(HostXres()); //FIXME // standalone->addChild(new HostRemoteType); - standalone->addChild(fe1); - ConfigurationGroup* frontend = new VerticalConfigurationGroup(false,false,true,true); - frontend->addChild(HostMysqlserverip_listbox()); +// ConfigurationGroup* frontend = new VerticalConfigurationGroup(false,false,true,true); + HostSystemType->addTargetedChild("Frontend_only", HostMysqlserverip_listbox()); // frontend->addChild(HostXres()); //FIXME // frontend->addChild(new HostRemoteType); - frontend->addChild(fe1); + HostSystemType->addTargetedChild("Frontend_only", HostUseXLargeMouse()); + HostSystemType->addTargetedChild("Frontend_only", HostUsemythfrontend()); - ConfigurationGroup* backend = new VerticalConfigurationGroup(false,false,false,false); - backend->addChild( new Frontend_settings_group); +// ConfigurationGroup* backend = new VerticalConfigurationGroup(false,false,false,false); + HostSystemType->addTargetedChild("Slave_backend", new Frontend_settings_group); - ConfigurationGroup* slave = new VerticalConfigurationGroup(false,false,true,true); - slave->addChild(HostMysqlserverip_listbox()); - slave->addChild( new Frontend_settings_group); +// ConfigurationGroup* slave = new VerticalConfigurationGroup(false,false,true,true); + HostSystemType->addTargetedChild("Slave_backend", HostMysqlserverip_listbox()); + HostSystemType->addTargetedChild("Slave_backend", new Frontend_settings_group); - addTarget("Standalone", standalone); - addTarget("Frontend_only", frontend); - addTarget("Master_backend", backend); - addTarget("Slave_backend", slave); - connect(HostSystemType, SIGNAL(valueChanged(const QString&)), - this, SLOT(SystemtypeHelp())); +// addTarget("Standalone", standalone); +// addTarget("Frontend_only", frontend); +// addTarget("Master_backend", backend); +// addTarget("Slave_backend", slave); +// connect(HostSystemType, SIGNAL(valueChanged(const QString&)), this, +// SLOT(SystemtypeHelp())); }; @@ -2639,70 +2580,70 @@ void SystemtypeGroup::SystemtypeHelp(void) // // } -class AdvancedSettings: public TriggeredConfigurationGroup { +class AdvancedSettings: public GroupSetting { public: - AdvancedSettings(): - TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) + AdvancedSettings(): GroupSetting() { - setLabel(QObject::tr("Advanced Settings (1/2)")); - Setting* Autodown = HostAutodown(); - setTrigger(Autodown); - hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType"); - ConfigurationGroup *checkbox = new GridConfigurationGroup(2,false); - checkbox->addChild(HostServiceMythWEB()); +// Setting* Autodown = HostAutodown(); +// setTrigger(Autodown); + hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType"); +// ConfigurationGroup *checkbox = new GridConfigurationGroup(2,false); + // addChild(HostServiceMythWEB()); // checkbox->addChild(HostServiceNFS()); - checkbox->addChild(Hostbootsplash()); - checkbox->addChild(HostncidClient()); + // addChild(Hostbootsplash()); + //addChild(HostncidClient()); - ConfigurationGroup* settings = new VerticalConfigurationGroup(false); - if ( hostparm.ThisSystemType == "Standalone" ) - { +// ConfigurationGroup* settings = new VerticalConfigurationGroup(false); +// if ( hostparm.ThisSystemType == "Standalone" ) +// { // smb_busy_box(); - settings->addChild(new NCIDsettings); +// settings->addChild(new NCIDsettings); // settings->addChild(new SAMBAsettings); // checkbox->addChild(HostServiceRRD() ); - settings->addChild(checkbox) ; - } - else if (hostparm.ThisSystemType == "Master_backend" ) +// settings->addChild(checkbox) ; +// } + if ( hostparm.ThisSystemType == "Master_backend" ) { // smb_busy_box(); // checkbox->addChild(GlobalPKG_MIRROR()); - settings->addChild(new NCIDsettings); + //settings->addChild(new NCIDsettings); // settings->addChild(new SAMBAsettings); // checkbox->addChild(HostServiceRRD() ); - settings->addChild(checkbox) ; + addChild(HostServiceMythWEB()); + addChild(Hostbootsplash()); +// addChild(checkbox) ; } - else if (hostparm.ThisSystemType == "Frontend_only" ) + else if ( hostparm.ThisSystemType == "Frontend_only" ) { - settings->addChild(Hostbootsplash()); - settings->addChild(HostncidClient()); + addChild(Hostbootsplash()); + //settings->addChild(HostncidClient()); // settings->addChild(HostServiceRRD() ); } - else if (hostparm.ThisSystemType == "Slave_backend" ) + else if ( hostparm.ThisSystemType == "Slave_backend" ) { - settings->addChild(Hostbootsplash()); - settings->addChild(HostncidClient()); + addChild(Hostbootsplash()); + //settings->addChild(HostncidClient()); // settings->addChild(HostServiceRRD() ); // if ( (gCoreContext->GetSetting("GlobalPKG_MIRROR")) == "1") // settings->addChild(HostPKG_MIRROR()); }; - addTarget("", settings); + //addTarget("", settings); }; }; -class AdvancedSettings_2: public TriggeredConfigurationGroup { +class AdvancedSettings_2: public GroupSetting { public: - AdvancedSettings_2(): - TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) { + AdvancedSettings_2(): GroupSetting() + { setLabel(QObject::tr("Advanced Settings (2/2)")); - Setting* Autodown = HostAutodown(); - setTrigger(Autodown); - hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType"); +// Setting* Autodown = HostAutodown(); +// setTrigger(Autodown); + hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType"); /* ConfigurationGroup *checkbox = new GridConfigurationGroup(2,false); checkbox->addChild(HostServiceMythWEB()); @@ -2710,76 +2651,76 @@ public: checkbox->addChild(Hostbootsplash()); checkbox->addChild(HostncidClient());*/ - ConfigurationGroup* settings = new VerticalConfigurationGroup(false); +// ConfigurationGroup* settings = new VerticalConfigurationGroup(false); if ( hostparm.ThisSystemType == "Standalone" ) { - settings->addChild(HostRunDHCP()); - settings->addChild(HostBEWait()); + addChild(HostRunDHCP()); + addChild(HostBEWait()); //settings->addChild(new Evroutersettings); } else if (hostparm.ThisSystemType == "Master_backend" ) { - settings->addChild(new Backupsettings); - settings->addChild(HostRunDHCP()); - settings->addChild(HostBEWait()); + addChild(new Backupsettings); + addChild(HostRunDHCP()); + addChild(HostBEWait()); //settings->addChild(new Evroutersettings); } else if (hostparm.ThisSystemType == "Frontend_only" ) { //settings->addChild(new Evroutersettings); - settings->addChild(HostBEWait()); + addChild(HostBEWait()); } else if (hostparm.ThisSystemType == "Slave_backend" ) { //settings->addChild(new Evroutersettings); - settings->addChild(HostBEWait()); + addChild(HostBEWait()); }; - addTarget("", settings); + //addTarget("", settings); }; }; /*_______________________________Sound settings ____________________*/ -SoundSettings::SoundSettings(): - TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) { +SoundSettings::SoundSettings(): GroupSetting() + { setLabel(QObject::tr("Audio Settings")); - HostAudiotype = new HostComboBox("HostAudiotype",false); - HostAudiotype->setLabel(QObject::tr("Sound Card Driver")); - HostAudiotype->addSelection("OSS"); - HostAudiotype->addSelection("ALSA"); +// HostAudiotype = new HostComboBoxSetting("HostAudiotype",false); +// HostAudiotype->setLabel(QObject::tr("Sound Card Driver")); +// HostAudiotype->addSelection("OSS"); +// HostAudiotype->addSelection("ALSA"); - HostAudiotype->setHelpText(QObject::tr("Select the sound driver, ALSA or OSS." ) ); - addChild(HostAudiotype); - setTrigger(HostAudiotype); +// HostAudiotype->setHelpText(QObject::tr("Select the sound driver, ALSA or OSS." ) ); +// addChild(HostAudiotype); +// setTrigger(HostAudiotype); - HorizontalConfigurationGroup *lp = new HorizontalConfigurationGroup(false, false, true, true); - HorizontalConfigurationGroup *lpalsa = new HorizontalConfigurationGroup(false, false, true, true); +// HorizontalConfigurationGroup *lp = new HorizontalConfigurationGroup(false, false, true, true); +// HorizontalConfigurationGroup *lpalsa = new HorizontalConfigurationGroup(false, false, true, true); - TransButtonSetting *LoadOSSbutton = new TransButtonSetting(); - LoadOSSbutton->setLabel(tr("Load OSS Driver")); - TransButtonSetting *LoadALSAbutton = new TransButtonSetting(); - LoadALSAbutton->setLabel(tr("Load ALSA Driver")); +// TransButtonSetting *LoadOSSbutton = new TransButtonSetting(); +// LoadOSSbutton->setLabel(tr("Load OSS Driver")); + ButtonStandardSetting *LoadALSAbutton = new ButtonStandardSetting("Load ALSA Driver"); +// LoadALSAbutton->setLabel(tr("Load ALSA Driver")); - TransButtonSetting *TestAudiobutton = new TransButtonSetting(); - TestAudiobutton->setLabel(tr("Test Device")); - TestAudiobutton->setHelpText(QObject::tr("Play a sound using the selected default device.")); - lp->addChild(TestAudiobutton); - lp->addChild(LoadOSSbutton); +// ButtonStandardSetting *TestAudiobutton = new TransButtonSetting(); +// TestAudiobutton->setLabel(tr("Test Device")); +// TestAudiobutton->setHelpText(QObject::tr("Play a sound using the selected default device.")); +// addChild(TestAudiobutton); +// lp->addChild(LoadOSSbutton); - TransButtonSetting *TestALSAAudiobutton = new TransButtonSetting(); - TestALSAAudiobutton->setLabel(tr("Test Device")); + ButtonStandardSetting *TestALSAAudiobutton = new ButtonStandardSetting(tr("Test Device")); +// TestALSAAudiobutton->setLabel(tr("Test Device")); TestALSAAudiobutton->setHelpText(QObject::tr("Play a sound using the selected default device.")); - lpalsa->addChild(TestALSAAudiobutton); - lpalsa->addChild(LoadALSAbutton); - - TransLabelSetting *osslabel = new TransLabelSetting(); - osslabel->setValue("OSS- Open Sound System\nhttp://opensound.com\n\nTo configure sound for MythTV go to:\nService Menu --> MythTV Settings --> Setup --> Audio\n"); + addChild(TestALSAAudiobutton); + addChild(LoadALSAbutton); - TransLabelSetting *AlsaLabel = new TransLabelSetting(); - AlsaLabel->setValue("ALSA - Advanced Linux Sound Architecture\nhttp://alsa-project.org\n\nTo configure sound for MythTV go to:\nService Menu --> MythTV Settings --> Setup --> Audio\n"); +// TransLabelSetting *osslabel = new TransLabelSetting(); +// osslabel->setValue("OSS- Open Sound System\nhttp://opensound.com\n\nTo configure sound for MythTV go to:\nService Menu --> MythTV Settings --> Setup --> Audio\n"); +// TransLabelSetting *AlsaLabel = new TransLabelSetting(); +// AlsaLabel->setValue("ALSA - Advanced Linux Sound Architecture\nhttp://alsa-project.org\n\nTo configure sound for MythTV go to:\nService Menu --> MythTV Settings --> Setup --> Audio\n"); +/* // OSS GROUP SoundOSSsettings *OSS = new SoundOSSsettings ; ConfigurationGroup* osssettings = new VerticalConfigurationGroup(false); @@ -2792,13 +2733,13 @@ SoundSettings::SoundSettings(): this, SLOT(soundossgathersettings_1())); connect(LoadOSSbutton, SIGNAL(pressed()), OSS, SLOT(loadossdriver())); - +*/ // ALSA GROUP - SoundALSAsettings *ALSA = new SoundALSAsettings ; - ConfigurationGroup* alsasettings = new VerticalConfigurationGroup(false); - alsasettings->addChild(AlsaLabel); - alsasettings->addChild(ALSA); - alsasettings->addChild(lpalsa); + SoundALSAsettings *ALSA = new SoundALSAsettings ; +// ConfigurationGroup* alsasettings = new VerticalConfigurationGroup(false); +// addChild(AlsaLabel); + addChild(ALSA); +// alsasettings->addChild(lpalsa); connect(this, SIGNAL(alsa_sig()), ALSA, SLOT(soundalsagathersettings())); @@ -2806,16 +2747,15 @@ SoundSettings::SoundSettings(): this, SLOT(soundalsagathersettings_1())); connect(LoadALSAbutton, SIGNAL(pressed()), ALSA, SLOT(loadalsadriver())); - addTarget("ALSA", alsasettings); - addTarget("OSS", osssettings); +// addTarget("ALSA", alsasettings); +// addTarget("OSS", osssettings); }; - -SoundOSSsettings::SoundOSSsettings(): - TriggeredConfigurationGroup(true,false,true,true,true,true,true,true) +/* +SoundOSSsettings::SoundOSSsettings(): GroupSetting() { SetVertical(true); - HostSoundOssAll = new HostComboBox("HostSoundOssAll"); + HostSoundOssAll = new HostComboBoxSetting("HostSoundOssAll"); HostSoundOssAll->setLabel(QObject::tr("Default Device")); HostSoundOssAll->setHelpText(QObject::tr("Select the default audio output device for the system.")); fillossselection(); @@ -2823,20 +2763,19 @@ SoundOSSsettings::SoundOSSsettings(): HostSoundOssAll->setValue(findossall); addTarget("All", HostSoundOssAll); }; - -SoundALSAsettings::SoundALSAsettings(): - TriggeredConfigurationGroup(true,false,true,true,true,true,true,true) +*/ +SoundALSAsettings::SoundALSAsettings(): GroupSetting() { - SetVertical(true); - HostSoundALSAAll = new HostComboBox("HostSoundALSAAll"); +// SetVertical(true); + HostSoundALSAAll = new HostComboBoxSetting("HostSoundALSAAll"); HostSoundALSAAll->setLabel(QObject::tr("Default Device")); HostSoundALSAAll->setHelpText(QObject::tr("Select the default audio output device for the system. Chrome, aplay and other programs that use the default system device for audio will use this device. Mplayer will be set to use this device.")); fillALSAselection(); - int findalsaall=HostSoundALSAAll->findSelection(hostparm.OLDHostSoundALSAAll ); - HostSoundALSAAll->setValue(findalsaall); - addTarget("All", HostSoundALSAAll); +// int findalsaall=HostSoundALSAAll->findSelection(hostparm.OLDHostSoundALSAAll ); +// HostSoundALSAAll->setValue(findalsaall); + addChild( HostSoundALSAAll); }; - +/* void SoundOSSsettings::loadossdriver() { // Add info popup right here @@ -2901,6 +2840,7 @@ void SoundOSSsettings::loadossdriver() fillossselection(); } + void SoundALSAsettings::loadalsadriver() { QString cmdtxt; @@ -3005,7 +2945,7 @@ void SoundOSSsettings::fillossselection() } return ; }; - +*/ void SoundALSAsettings::fillALSAselection() { @@ -3075,13 +3015,14 @@ void SoundALSAsettings::fillALSAselection() } return ; } - +/* void SoundSettings::soundossgathersettings_1 (void) { hostparm.ThisHostAudiotype = HostAudiotype->getValue(); // emit the signal to call soundossgathersetting. emit oss_sig(); }; +*/ void SoundSettings::soundalsagathersettings_1 (void) { hostparm.ThisHostAudiotype = HostAudiotype->getValue(); @@ -3089,7 +3030,7 @@ void SoundSettings::soundalsagathersettings_1 (void) emit alsa_sig(); }; - +/* void SoundOSSsettings::soundossgathersettings(void) { hostparm.ThisHostSoundOSSAll = HostSoundOssAll->getValue(); @@ -3155,7 +3096,7 @@ void SoundOSSsettings::soundossgathersettings(void) } }; - +*/ void SoundALSAsettings::soundalsagathersettings(void) { @@ -3186,7 +3127,7 @@ void SoundALSAsettings::soundalsagathersettings(void) delete busyPopup; busyPopup = NULL; } - +/* int progressbar=1; MythProgressDialog *popupProgress = NULL; popupProgress = new MythProgressDialog(msgtext, 50); @@ -3194,14 +3135,14 @@ void SoundALSAsettings::soundalsagathersettings(void) { popupProgress->setProgress(progressbar); } - +*/ while ( return_code == 0 ) { - progressbar++; - popupProgress->setProgress(progressbar); - if (progressbar > 50 ) - progressbar = 10; +// progressbar++; +// popupProgress->setProgress(progressbar); +// if (progressbar > 50 ) +// progressbar = 10; return_code = myth_system("ps -ef|grep soundconfig.sh|grep -v grep > /dev/null"); @@ -3214,13 +3155,13 @@ void SoundALSAsettings::soundalsagathersettings(void) busyPopup->Close(); busyPopup = NULL; } - +/* if (popupProgress) { popupProgress->Close(); popupProgress->deleteLater(); } - +*/ }; @@ -3395,9 +3336,9 @@ void run_systemconfig(QString modulelist, bool restart, QString dbcommand) cmdtxt.append("bin/systemconfig.sh " + modulelist + " &"); myth_system(cmdtxt); int return_code = 0; - QString msgtext = "Please wait while " ; + QString msgtext = "Configuring " ; msgtext.append(gCoreContext->GetSetting("HostMyhostname")); - msgtext.append(" is configured"); + msgtext.append("..."); MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy"); if (busyPopup->Create()) @@ -3409,7 +3350,7 @@ void run_systemconfig(QString modulelist, bool restart, QString dbcommand) delete busyPopup; busyPopup = NULL; } - while ( return_code == 0 ) + while ( return_code == 0 ) { return_code = myth_system("ps -ef|grep systemconfig.sh|grep -v grep > /dev/null"); qApp->processEvents (); @@ -3422,17 +3363,16 @@ void run_systemconfig(QString modulelist, bool restart, QString dbcommand) busyPopup = NULL; } - - if (restart) { return_code = 1; int loopnumber=0 ; bool doloop = true; - QString msgtext = "Transferring database settings" ; + QString msgtext = "Transferring Database Settings..." ; MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); - MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy"); + MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack, + "installbusy"); if (busyPopup->Create()) { popupStack->AddScreen(busyPopup, false); @@ -3443,9 +3383,6 @@ void run_systemconfig(QString modulelist, bool restart, QString dbcommand) busyPopup = NULL; } - - - while ( doloop ) { return_code = myth_system(dbcommand); @@ -3463,10 +3400,19 @@ void run_systemconfig(QString modulelist, bool restart, QString dbcommand) }; - - } +void settingsWait() +{ + MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); + //mainStack->AddScreen(ssd); + // Block by running an event loop until last screen is removed + QEventLoop block; + QObject::connect(mainStack, &MythScreenStack::topScreenChanged, + &block, [&](MythScreenType* screen) + { if (!screen) block.quit(); }); + block.exec(); +} int runsettings (bool mysqlonly , bool shownetwork , bool showhostype, @@ -3478,16 +3424,16 @@ int runsettings (bool mysqlonly , bool shownetwork , bool showhostype, bool showremotesonly, bool showvnc, bool showfileshare) { displaymysqlonly = false ; - displayshownetwork =false ; + displayshownetwork = false ; displayshowhostype = false ; - displayshowmisc =false ; - displayshowshutdown =false ; + displayshowmisc = false ; + displayshowshutdown = false ; displayshowadvanced = false; displayshowsound = false ; displayshowadvancedX = false; - displayaccesscontrol= false; - displayplugins= false; - displaysoftware= false; + displayaccesscontrol = false; + displayplugins = false; + displaysoftware = false; displayuser = false; displaywebuser = false; displayddns = false; @@ -3495,47 +3441,47 @@ int runsettings (bool mysqlonly , bool shownetwork , bool showhostype, displayscreensaver = false; displaysupplemental = false; displayremotesonly = false; - displayvnc = false; + displayvnc = false; displayfileshare = false; //gCoreContext->ActivateSettingsCache(true); //gCoreContext->ClearSettingsCache(); - bool runothers=false; - bool continuerun=true; + bool runothers = false; + bool continuerun = true; int retc = 0 ; displaymysqlonly = mysqlonly; - if (displaymysqlonly) + if ( displaymysqlonly ) { MythInstallSettings mysqlsettings; - mysqlsettings.Load(); - mysqlsettings.Save(); - if ( mysqlsettings.exec() == QDialog::Accepted ) - { - retc = 1; - } - else - { - retc=2; - }; +// mysqlsettings.Load(); +// mysqlsettings.Save(); +// if ( mysqlsettings.exec() == QDialog::Accepted ) +// { +// retc = 1; +// } +// else +// { +// retc = 2; +// }; }; if ( shownetwork ) { displayshownetwork = shownetwork; MythInstallSettings settings; - settings.Load(); - settings.Save(); - if ( settings.exec() == QDialog::Accepted ) - { - retc = 1; - } - else - { - continuerun=false; - retc=2; - }; - displayshownetwork = false; +// settings.Load(); +// settings.Save(); +// if ( settings.exec() == QDialog::Accepted ) +// { +// retc = 1; +// } +// else +// { +// continuerun=false; +// retc = 2; +// }; +// displayshownetwork = false; }; if ( showhostype && continuerun ) @@ -3545,21 +3491,24 @@ int runsettings (bool mysqlonly , bool shownetwork , bool showhostype, if (sysRet < 0) LOG(VB_GENERAL, LOG_ERR, "Error running avahi-browse"); MythInstallSettings settings1; - settings1.Load(); - settings1.Save(); - if ( settings1.exec() == QDialog::Accepted ) - { - retc = 1; - } - else - { - continuerun=false; - retc=2; - }; +// settings1.Load(); +// settings1.Save(); +// if ( settings1.exec() == QDialog::Accepted ) +// { +// retc = 1; +// } +// else +// { +// continuerun=false; +// retc = 2; +// }; displayshowhostype=false; } - if ( showmisc || showshutdown || showsound || showadvancedX || showadvanced || showaccesscontrol || showplugins || showsoftware || showuser || showwebuser || showddns || showinfrared || showscreensaver || showsupplemental || showremotesonly || showvnc || showfileshare) + if ( showmisc || showshutdown || showsound || showadvancedX || showadvanced || + showaccesscontrol || showplugins || showsoftware || showuser || showwebuser || + showddns || showinfrared || showscreensaver || showsupplemental || + showremotesonly || showvnc || showfileshare) { runothers=true; displayshowmisc = showmisc; @@ -3593,7 +3542,7 @@ int runsettings (bool mysqlonly , bool shownetwork , bool showhostype, pre_writesettings(); //FINDME DatabaseParams params = gContext->GetDatabaseParams(); - QString cmdtxt=MV_ROOT ; + QString cmdtxt=MV_ROOT; cmdtxt.append("bin/timezip.py -m "); QString zipcommand=cmdtxt; zipcommand.append(hostparm.ThisDBhost); @@ -3602,31 +3551,31 @@ int runsettings (bool mysqlonly , bool shownetwork , bool showhostype, //cout << zipcommand << endl; myth_system(zipcommand); //hostparm.ThisHostZipcode = gCoreContext->GetSetting("HostZipcode"); - hostparm.ThisTimeZone = gCoreContext->GetSetting("HostTimeZone"); + hostparm.ThisTimeZone = gCoreContext->GetSetting("HostTimeZone"); // hostparm.ThisHostServiceHobbit = gCoreContext->GetSetting("HostServiceHobbitclient"); // if ( hostparm.ThisHostServiceHobbit == "1" ) // install_hobbit = true; MythInstallSettings settings2; - settings2.Load(); - settings2.Save(); -// gCoreContext->SaveSetting("HostServiceHobbitclient", hostparm.ThisHostServiceHobbit ); - if ( settings2.exec() == QDialog::Accepted ) - { - retc = 1; - } - else - { - continuerun=false; - retc=2; - }; +// settings2.Load(); +// settings2.Save(); + // gCoreContext->SaveSetting("HostServiceHobbitclient", hostparm.ThisHostServiceHobbit ); +// if ( settings2.exec() == QDialog::Accepted ) +// { +// retc = 1; +// } +// else +// { +// continuerun=false; +// retc = 2; +// }; }; pre_writesettings(); if ( mysqlonly ) { QString cmdtxt; cmdtxt=MV_ROOT ; - cmdtxt.append("bin/systemconfig.sh Mysql_only " + hostparm.ThisDBhost); + cmdtxt.append("bin/systemconfig.sh Mysql_only " + hostparm.ThisDBhost); myth_system(cmdtxt); } else @@ -3639,33 +3588,33 @@ int runsettings (bool mysqlonly , bool shownetwork , bool showhostype, -void writesettings () +void writesettings() { // ofstream myfile; - gCoreContext->ClearSettingsCache(); + //gCoreContext->ClearSettingsCache(); //gCoreContext->ActivateSettingsCache(false); - hostparm.language = gCoreContext->GetSetting("language"); + hostparm.language = gCoreContext->GetSetting("language"); hostparm.ThisHostName = gCoreContext->GetSetting("HostMyhostname").toLower(); hostparm.ThisTimeZone = gCoreContext->GetSetting("HostTimeZone"); - hostparm.ThisHostIPeth0 = gCoreContext->GetSetting("HostIPeth0"); - hostparm.ThisHostNETMASKeth0 = gCoreContext->GetSetting("HostNETMASKeth0"); - hostparm.ThisHostDNSeth0 = gCoreContext->GetSetting("HostDNSeth0"); - hostparm.ThisHostUSEDHCPeth0 = gCoreContext->GetSetting("HostUseDHCPeth0"); - hostparm.ThisHostGWeth0 = gCoreContext->GetSetting("HostGWeth0"); - hostparm.ThisHostActiveonbooteth0 = gCoreContext->GetSetting("HostActiveonbooteth0"); - hostparm.ThisHOSTESSIDeth0 = gCoreContext->GetSetting("HOSTESSIDeth0"); + hostparm.ThisHostIPeth0 = gCoreContext->GetSetting("HostIPeth0"); + hostparm.ThisHostNETMASKeth0 = gCoreContext->GetSetting("HostNETMASKeth0"); + hostparm.ThisHostDNSeth0 = gCoreContext->GetSetting("HostDNSeth0"); + hostparm.ThisHostUSEDHCPeth0 = gCoreContext->GetSetting("HostUseDHCPeth0"); + hostparm.ThisHostGWeth0 = gCoreContext->GetSetting("HostGWeth0"); + hostparm.ThisHostActiveonbooteth0 = gCoreContext->GetSetting("HostActiveonbooteth0"); + hostparm.ThisHOSTESSIDeth0 = gCoreContext->GetSetting("HOSTESSIDeth0"); hostparm.ThisHostUseEncryptioneth0 = gCoreContext->GetSetting("HostUseEncryptioneth0"); hostparm.ThisHostkeyeth0 = gCoreContext->GetSetting("Hostkeyeth0"); hostparm.ThisHostMTUeth0 = gCoreContext->GetSetting("HostMTUeth0"); - hostparm.ThisHostIPeth1 = gCoreContext->GetSetting("HostIPeth1"); - hostparm.ThisHostNETMASKeth1 = gCoreContext->GetSetting("HostNETMASKeth1"); - hostparm.ThisHostDNSeth1 = gCoreContext->GetSetting("HostDNSeth1"); - hostparm.ThisHostUSEDHCPeth1 = gCoreContext->GetSetting("HostUseDHCPeth1"); - hostparm.ThisHostGWeth1 = gCoreContext->GetSetting("HostGWeth1"); - hostparm.ThisHostActiveonbooteth1 = gCoreContext->GetSetting("HostActiveonbooteth1"); - hostparm.ThisHOSTESSIDeth1 = gCoreContext->GetSetting("HOSTESSIDeth1"); + hostparm.ThisHostIPeth1 = gCoreContext->GetSetting("HostIPeth1"); + hostparm.ThisHostNETMASKeth1 = gCoreContext->GetSetting("HostNETMASKeth1"); + hostparm.ThisHostDNSeth1 = gCoreContext->GetSetting("HostDNSeth1"); + hostparm.ThisHostUSEDHCPeth1 = gCoreContext->GetSetting("HostUseDHCPeth1"); + hostparm.ThisHostGWeth1 = gCoreContext->GetSetting("HostGWeth1"); + hostparm.ThisHostActiveonbooteth1 = gCoreContext->GetSetting("HostActiveonbooteth1"); + hostparm.ThisHOSTESSIDeth1 = gCoreContext->GetSetting("HOSTESSIDeth1"); hostparm.ThisHostUseEncryptioneth1 = gCoreContext->GetSetting("HostUseEncryptioneth1"); hostparm.ThisHostkeyeth1 = gCoreContext->GetSetting("Hostkeyeth1"); hostparm.ThisHostMTUeth1 = gCoreContext->GetSetting("HostMTUeth1"); @@ -3703,7 +3652,6 @@ void writesettings () hostparm.ThisHostkeyath0 = gCoreContext->GetSetting("Hostkeyath0"); hostparm.ThisHostMTUath0 = gCoreContext->GetSetting("HostMTUath0"); - // hostparm.ThisHostServiceRRD = gCoreContext->GetSetting("HostServiceRRD"); hostparm.ThisSamba = gCoreContext->GetSetting("HostServiceSamba"); hostparm.ThisHostServiceSamba_media = gCoreContext->GetSetting("HostServiceSamba_media"); @@ -3808,9 +3756,9 @@ void writesettings () } -//********************************************************************************************* +//-------------------------------------------------------------------------------- // AUDIO SETTINGS -//****************************************************************************************** +//-------------------------------------------------------------------------------- hostparm.ThisHostAudiotype = gCoreContext->GetSetting("HostAudiotype"); hostparm.ThisHostSoundOSSAll = gCoreContext->GetSetting("HostSoundOssAll"); hostparm.ThisHostSoundALSAAll = gCoreContext->GetSetting("HostSoundALSAAll"); @@ -3873,7 +3821,6 @@ void writesettings () hostparm.ThisHostpluginmythgameROMDB= gCoreContext->GetSetting("HostpluginmythgameROMDB"); hostparm.ThisHostpluginmythgameMupen64= gCoreContext->GetSetting("HostpluginmythgameMupen64"); hostparm.ThisHostwebmin = gCoreContext->GetSetting("Hostwebmin"); - hostparm.ThisHostHuluDesktop = gCoreContext->GetSetting("HostHuluDesktop"); hostparm.ThisHostwebonlinhes = gCoreContext->GetSetting("HostWebonlinhes"); hostparm.ThisHostXBMC = gCoreContext->GetSetting("HostXBMC"); hostparm.ThisHostPLEXHT = gCoreContext->GetSetting("HostPLEXHT"); @@ -3939,11 +3886,8 @@ void writesettings () hostparm.ThisHostTransmitSend_after_4 = gCoreContext->GetSetting("HostTransmitSend_after_4"); - hostparm.ThisHOSTrootSSH = gCoreContext->GetSetting("HOSTrootSSH"); - - hostparm.ThisHostSupplemental = gCoreContext->GetSetting("HostSupplemental"); hostparm.ThisHostWindowManager = gCoreContext->GetSetting("HostWindowManager"); hostparm.ThisHostEnhancedWMStyle = gCoreContext->GetSetting("HostEnhancedWMStyle"); @@ -3954,9 +3898,6 @@ void writesettings () hostparm.ThisHostXVNCpassword = gCoreContext->GetSetting("HostXVNCpassword"); - - - //______________________WRITE OUT THE FILE__________________________ QString systemheader; QString divider; @@ -4203,7 +4144,6 @@ void writesettings () myfile << "mythappletrailers=\"" + hostparm.ThisHostpluginmythappletrailers + "\"\n"; myfile << "webonlinhes=\"" + hostparm.ThisHostwebonlinhes + "\"\n"; - myfile << "huludesktop=\"" + hostparm.ThisHostHuluDesktop + "\"\n"; myfile << "kodi=\"" + hostparm.ThisHostXBMC + "\"\n"; myfile << "plexhometheater=\"" + hostparm.ThisHostPLEXHT + "\"\n"; myfile << "plexmediaserver=\"" + hostparm.ThisHostPLEXMS + "\"\n"; @@ -4212,7 +4152,6 @@ void writesettings () myfile << "foldingworksize=\"" + hostparm.ThisHostfoldingworksize + "\"\n"; myfile << "webmin=\"" + hostparm.ThisHostwebmin + "\"\n"; - systemheader="\n# ddns settings\n" ; myfile << systemheader ; myfile << divider ; @@ -4258,7 +4197,6 @@ void writesettings () myfile << "Hostnumblaster=\"" + hostparm.ThisHostnumblaster + "\"\n"; myfile << "LCDtype=\"" + hostparm.ThisHostLCDType + "\"\n"; - systemheader="\n# user settings\n" ; myfile << systemheader ; myfile << divider ; @@ -4285,25 +4223,23 @@ void writesettings () myfile << "UseMythWEB_auth=\"" + hostparm.ThisHostwebauth + "\"\n"; - f.close(); - } -MythInstallSettings::MythInstallSettings() +MythInstallSettings::MythInstallSettings() : GroupSetting() { - VerticalConfigurationGroup* vcg = new VerticalConfigurationGroup(false,false,true,true); - VerticalConfigurationGroup* denied = new VerticalConfigurationGroup(false,false,true,true); - TransLabelSetting *deniedlabel = new TransLabelSetting(); - deniedlabel->setValue(" Access to these settings is disabled.\n Access can be enabled in Access Settings." ); - denied->addChild(deniedlabel); +// VerticalConfigurationGroup* vcg = new VerticalConfigurationGroup(false,false,true,true); +// VerticalConfigurationGroup* denied = new VerticalConfigurationGroup(false,false,true,true); +// TransLabelSetting *deniedlabel = new TransLabelSetting(); +// deniedlabel->setValue(" Access to these settings is disabled.\n Access can be enabled in Access Settings." ); +// denied->addChild(deniedlabel); if ( displaymysqlonly ) { - vcg->setLabel(QObject::tr("Run MythFrontend Settings")); - vcg->addChild(HostMysqlserverip_listbox()); - vcg->addChild(ThemePainter()); - addChild(vcg); + //vcg->setLabel(QObject::tr("Run MythFrontend Settings")); + //vcg->addChild(HostMysqlserverip_listbox()); + //vcg->addChild(ThemePainter()); + //addChild(vcg); } else { @@ -4331,15 +4267,15 @@ MythInstallSettings::MythInstallSettings() - vcg->setLabel(QObject::tr("Host Settings")); + //vcg->setLabel(QObject::tr("Host Settings")); // Check to see if screen should appear if ( displayshownetwork ) { //Check to see if screen is allowed to appear if ( ((gCoreContext->GetSetting("Hostaccessnetwork")) == "0" ) ) { - denied ->setLabel(QObject::tr("Network Settings")); - addChild(denied); + //denied ->setLabel(QObject::tr("Network Settings")); + //addChild(denied); } else { @@ -4379,8 +4315,8 @@ MythInstallSettings::MythInstallSettings() NetworkOptionsFrame *networkoptionsframe = new NetworkOptionsFrame(); NetworkSettingsFrame *netsettingsframe = new NetworkSettingsFrame(); - addChild(netsettingsframe); - addChild(networkoptionsframe); +// addChild(netsettingsframe); +// addChild(networkoptionsframe); }; } @@ -4389,14 +4325,14 @@ MythInstallSettings::MythInstallSettings() { if ( ((gCoreContext->GetSetting("Hostaccesshostype")) =="0" )) { - denied ->setLabel(QObject::tr("Host Settings")); - addChild(denied); + //denied ->setLabel(QObject::tr("Host Settings")); + //addChild(denied); } else { SystemtypeGroup *systemtypegroup = new SystemtypeGroup(); - vcg->addChild(systemtypegroup); - addChild(vcg); + //vcg->addChild(systemtypegroup); + //addChild(vcg); } } @@ -4404,13 +4340,13 @@ MythInstallSettings::MythInstallSettings() { if ( ((gCoreContext->GetSetting("Hostaccessir")) =="0" )) { - denied ->setLabel(QObject::tr("Remotes Settings")); - addChild(denied); + //denied ->setLabel(QObject::tr("Remotes Settings")); + //addChild(denied); } else { IRFrame *irframe = new IRFrame(); - addChild(irframe); +// addChild(irframe); } } @@ -4418,13 +4354,13 @@ MythInstallSettings::MythInstallSettings() { if ( ((gCoreContext->GetSetting("HostaccessadvancedX")) == "0" )) { - denied ->setLabel(QObject::tr("Display Settings")); - addChild(denied); + //denied ->setLabel(QObject::tr("Display Settings")); + //addChild(denied); } else { AdvancedXSettings *advancedXsettings = new AdvancedXSettings(); - addChild(advancedXsettings); +// addChild(advancedXsettings); } } @@ -4432,13 +4368,31 @@ MythInstallSettings::MythInstallSettings() { if ( ((gCoreContext->GetSetting("Hostaccessvnc")) == "0" )) { - denied ->setLabel(QObject::tr("VNC Settings")); - addChild(denied); + //denied ->setLabel(QObject::tr("VNC Settings")); + //addChild(denied); } else { - VNChostsettings* vnchostsettings= new VNChostsettings(); - addChild(vnchostsettings); + //VNChostsettings* vnchostsettings= new VNChostsettings(); + //addChild(vnchostsettings); + + MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); + StandardSettingDialog *ssd = + new StandardSettingDialog(mainStack, "vncsettings", + new VNChostsettings()); + if (ssd->Create()) + { + mainStack->AddScreen(ssd); + settingsWait(); + // Block by running an event loop until last screen is removed + //QEventLoop block; + //QObject::connect(mainStack, &MythScreenStack::topScreenChanged, + // &block, [&](MythScreenType* screen) + //{ if (!screen) block.quit(); }); + // block.exec(); + } + else + delete ssd; } } @@ -4446,16 +4400,16 @@ MythInstallSettings::MythInstallSettings() { if ( ((gCoreContext->GetSetting("Hostaccessfileshare")) == "0" )) { - denied ->setLabel(QObject::tr("File Sharing Settings")); - addChild(denied); + //denied ->setLabel(QObject::tr("File Sharing Settings")); + //addChild(denied); } else { FileShareMainFrameClient *nfsclient = new FileShareMainFrameClient(); - addChild(nfsclient); +// addChild(nfsclient); FileShareMainFrameServer *fileserver = new FileShareMainFrameServer(); - addChild(fileserver); +// addChild(fileserver); } } @@ -4463,14 +4417,14 @@ MythInstallSettings::MythInstallSettings() { if ( ((gCoreContext->GetSetting("Hostaccessmisc")) == "0" )) { - denied ->setLabel(QObject::tr("Miscellanous")); - addChild(denied); + //denied ->setLabel(QObject::tr("Miscellanous")); + //addChild(denied); } else { MiscMainFrame *miscsettings = new MiscMainFrame(); // MiscMainFrame2 *miscsettings2 = new MiscMainFrame2(); - addChild(miscsettings); +// addChild(miscsettings); // addChild(miscsettings2); } } @@ -4479,20 +4433,20 @@ MythInstallSettings::MythInstallSettings() { //JM VERBOSE(VB_IMPORTANT, "screensaver"); Supplementalhostsettings *supplemental = new Supplementalhostsettings(); - addChild(supplemental); +// addChild(supplemental); } if ( displayshowshutdown ) { if ( ((gCoreContext->GetSetting("Hostaccesssleep")) == "0" )) { - denied ->setLabel(QObject::tr("Shutdown Settings")); - addChild(denied); + //denied ->setLabel(QObject::tr("Shutdown Settings")); + //addChild(denied); } else { - WakeSettings *wakesettings = new WakeSettings(); - addChild(wakesettings); +// WakeSettings *wakesettings = new WakeSettings(); +// addChild(wakesettings); } } @@ -4500,16 +4454,16 @@ MythInstallSettings::MythInstallSettings() { if ( ((gCoreContext->GetSetting("Hostaccessadvanced")) == "0" ) ) { - denied ->setLabel(QObject::tr("Advanced Settings")); - addChild(denied); + //denied ->setLabel(QObject::tr("Advanced Settings")); + //addChild(denied); } else { AdvancedSettings *advancedsettings = new AdvancedSettings(); AdvancedSettings_2 *advancedsettings_2 = new AdvancedSettings_2(); - addChild(advancedsettings); - addChild(advancedsettings_2); +// addChild(advancedsettings); +// addChild(advancedsettings_2); } } @@ -4517,8 +4471,8 @@ MythInstallSettings::MythInstallSettings() { if ( ((gCoreContext->GetSetting("Hostaccesssound")) =="0") ) { - denied ->setLabel(QObject::tr("Audio Settings")); - addChild(denied); + //denied ->setLabel(QObject::tr("Audio Settings")); + //addChild(denied); } else { @@ -4556,71 +4510,71 @@ MythInstallSettings::MythInstallSettings() SoundSettings *soundsettings = new SoundSettings(); - addChild(soundsettings); + // addChild(soundsettings); } } if ( displayaccesscontrol ) { - VerticalConfigurationGroup* accessettings = - new VerticalConfigurationGroup(false,true,false,false); - ConfigurationGroup *GridAccess = - new GridConfigurationGroup(2,false,false,false,false); - - GridAccess->addChild(Hostaccessadvanced()); - GridAccess->addChild(Hostaccesssound()); - GridAccess->addChild(HostaccessadvancedX()); - GridAccess->addChild(Hostaccessddns()); - GridAccess->addChild(Hostaccessfileshare()); - GridAccess->addChild(Hostaccessmisc()); - GridAccess->addChild(Hostaccessnetwork()); - GridAccess->addChild(Hostaccessplugins()); - GridAccess->addChild(Hostaccessir()); - GridAccess->addChild(Hostaccessscreensaver()); +// VerticalConfigurationGroup* accessettings = +// new VerticalConfigurationGroup(false,true,false,false); +// ConfigurationGroup *GridAccess = +// new GridConfigurationGroup(2,false,false,false,false); + + addChild(Hostaccessadvanced()); + addChild(Hostaccesssound()); + addChild(HostaccessadvancedX()); + addChild(Hostaccessddns()); + addChild(Hostaccessfileshare()); + addChild(Hostaccessmisc()); + addChild(Hostaccessnetwork()); + addChild(Hostaccessplugins()); + addChild(Hostaccessir()); +// addChild(Hostaccessscreensaver()); //screensaver - GridAccess->addChild(Hostaccessvnc()); - GridAccess->addChild(Hostaccesssleep()); + addChild(Hostaccessvnc()); + addChild(Hostaccesssleep()); // GridAccess->addChild(Hostaccessuser()); - GridAccess->addChild(Hostaccesswebuser()); + addChild(Hostaccesswebuser()); // accessettings->addChild(Hostaccessnetwork()); - accessettings->addChild(new ACCESShostsettings); - accessettings->addChild(GridAccess); - accessettings ->setLabel(QObject::tr("Access Settings")); - addChild(accessettings); +// addChild(new ACCESShostsettings); +// addChild(GridAccess); +// accessettings ->setLabel(QObject::tr("Access Settings")); +// addChild(accessettings); } if ( displayplugins ) { if ( ((gCoreContext->GetSetting("Hostaccessplugins")) == "0" )) { - denied ->setLabel(QObject::tr("Programs")); - addChild(denied); + //denied ->setLabel(QObject::tr("Programs")); + //addChild(denied); } else { - ConfigurationGroup *GridShowPlugin = new GridConfigurationGroup(2,false); - GridShowPlugin->setLabel(QObject::tr("Programs (1/4)")); - GridShowPlugin->addChild(Hostpluginmytharchive()); - GridShowPlugin->addChild(Hostpluginmythbrowser()); - GridShowPlugin->addChild(Hostpluginmythnetvision()); - GridShowPlugin->addChild(Hostpluginmythgallery()); +// ConfigurationGroup *GridShowPlugin = new GridConfigurationGroup(2,false); + setLabel(QObject::tr("Programs (1/4)")); + addChild(Hostpluginmytharchive()); + addChild(Hostpluginmythbrowser()); + addChild(Hostpluginmythnetvision()); + addChild(Hostpluginmythgallery()); //ConfigurationGroup *GridShowPlugin2 = new GridConfigurationGroup(2); - GridShowPlugin->addChild(Hostpluginmythmusic()); - GridShowPlugin->addChild(Hostpluginmythnews()); - GridShowPlugin->addChild(Hostpluginmythweather()); - GridShowPlugin->addChild(Hostpluginmythzoneminder()); + addChild(Hostpluginmythmusic()); + addChild(Hostpluginmythnews()); + addChild(Hostpluginmythweather()); + addChild(Hostpluginmythzoneminder()); - ConfigurationGroup *GridShowPlugin3 = new VerticalConfigurationGroup(false,true); - GridShowPlugin3->setLabel(QObject::tr("Programs (2/4)")); - GridShowPlugin3->addChild(new MythGamesettings); - GridShowPlugin3->addChild(Hostpluginmythvideo_dvdcss()); + //ConfigurationGroup *GridShowPlugin3 = new VerticalConfigurationGroup(false,true); + setLabel(QObject::tr("Programs (2/4)")); + addChild(new MythGamesettings); + addChild(Hostpluginmythvideo_dvdcss()); - addChild(GridShowPlugin); +// addChild(GridShowPlugin); // addChild(GridShowPlugin2); - addChild(GridShowPlugin3); +// addChild(GridShowPlugin3); } } @@ -4628,45 +4582,44 @@ MythInstallSettings::MythInstallSettings() { if ( ((gCoreContext->GetSetting("Hostaccessplugins")) == "0" )) { - denied ->setLabel(QObject::tr("Programs")); - addChild(denied); + //denied ->setLabel(QObject::tr("Programs")); + //addChild(denied); } else { - ConfigurationGroup *GridShowPlugin4 = new GridConfigurationGroup(2,false); - GridShowPlugin4->setLabel(QObject::tr("Programs (3/4)")); - GridShowPlugin4->addChild(Hostpluginmythappletrailers()); - GridShowPlugin4->addChild(HostHuluDesktop()); - GridShowPlugin4->addChild(HostPLEXHT()); - GridShowPlugin4->addChild(HostPLEXMS()); - GridShowPlugin4->addChild(Hostwebmin()); - GridShowPlugin4->addChild(Hostwebonlinhes()); - GridShowPlugin4->addChild(HostXBMC()); + //ConfigurationGroup *GridShowPlugin4 = new GridConfigurationGroup(2,false); + setLabel(QObject::tr("Programs (3/4)")); + addChild(Hostpluginmythappletrailers()); + addChild(HostPLEXHT()); + addChild(HostPLEXMS()); + addChild(Hostwebmin()); + addChild(Hostwebonlinhes()); + addChild(HostXBMC()); //ConfigurationGroup *GridShowPlugin5 = new GridConfigurationGroup(2); - ConfigurationGroup *GridShowPlugin6 = new VerticalConfigurationGroup(false,true); - GridShowPlugin6->setLabel(QObject::tr("Programs (4/4)")); - GridShowPlugin6->addChild(Hostfoldingathome()); - GridShowPlugin6->addChild(Hostfoldingusername()); - GridShowPlugin6->addChild(Hostfoldingworksize()); + //ConfigurationGroup *GridShowPlugin6 = new VerticalConfigurationGroup(false,true); + //GridShowPlugin6->setLabel(QObject::tr("Programs (4/4)")); + //addChild(Hostfoldingathome()); + //addChild(Hostfoldingusername()); + //addChild(Hostfoldingworksize()); - addChild(GridShowPlugin4); +// addChild(GridShowPlugin4); //addChild(GridShowPlugin5); - addChild(GridShowPlugin6); +// addChild(GridShowPlugin6); } } if ( displayuser ) { if ( ((gCoreContext->GetSetting("Hostaccessuser")) == "0" )) { - denied ->setLabel(QObject::tr("User Accounts")); - addChild(denied); + //denied ->setLabel(QObject::tr("User Accounts")); + //addChild(denied); } else { UserManagement *usermanagement = new UserManagement(); - addChild(usermanagement); +// addChild(usermanagement); } } @@ -4674,46 +4627,46 @@ MythInstallSettings::MythInstallSettings() { if ( ((gCoreContext->GetSetting("Hostaccesswebuser")) == "0" )) { - denied ->setLabel(QObject::tr("Web Security Settings")); - addChild(denied); + //denied ->setLabel(QObject::tr("Web Security Settings")); + //addChild(denied); } else { WebPasswordFrame *webpasswordframe = new WebPasswordFrame(); - addChild(webpasswordframe); +// addChild(webpasswordframe); } } - +/* if ( displayddns ) { if ( ((gCoreContext->GetSetting("Hostaccessddns")) == "0" )) { - denied ->setLabel(QObject::tr("DDNS Settings")); - addChild(denied); + //denied ->setLabel(QObject::tr("DDNS Settings")); + //addChild(denied); } else { DDnssettings *ddnsframe = new DDnssettings(); - addChild(ddnsframe); +// addChild(ddnsframe); } } - +*/ if ( displayinfrared ) { if ( ((gCoreContext->GetSetting("Hostaccessir")) =="0" )) { - denied ->setLabel(QObject::tr("Remotes Settings")); - addChild(denied); + //denied ->setLabel(QObject::tr("Remotes Settings")); + //addChild(denied); } else { IRFrame *irframe = new IRFrame(); IR_TransmitFrame *transmitframe = new IR_TransmitFrame(); LCDFrame *lcdframe = new LCDFrame(); - addChild(irframe); - addChild(transmitframe); - addChild(lcdframe); +// addChild(irframe); +// addChild(transmitframe); +// addChild(lcdframe); } } @@ -4721,14 +4674,14 @@ MythInstallSettings::MythInstallSettings() { if ( ((gCoreContext->GetSetting("Hostaccessscreensaver")) =="0" )) { - denied ->setLabel(QObject::tr("Screensaver Settings")); - addChild(denied); + //denied ->setLabel(QObject::tr("Screensaver Settings")); + //addChild(denied); } else { //JM VERBOSE(VB_IMPORTANT, "screensaver"); - Screensaverhostsettings *screensaver = new Screensaverhostsettings(); - addChild(screensaver); +// Screensaverhostsettings *screensaver = new Screensaverhostsettings(); +// addChild(screensaver); } } diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.h b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.h index 3a53048..fa9908e 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.h +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.h @@ -1,37 +1,38 @@ #ifndef WELCOMESETTINGS_H #define WELCOMESETTINGS_H -#include <settings.h> +//#include <settings.h> +#include <standardsettings.h> #include "mythdialogs.h" #include "libmyth/mythdialogs.h" #include "libmyth/mythwidgets.h" -#include "compat-mv.h" +//#include "compat-mv.h" -class SystemtypeGroup: public TriggeredConfigurationGroup { +class SystemtypeGroup: public GroupSetting { Q_OBJECT public: SystemtypeGroup(); - HostComboBox *HostSystemType; + HostComboBoxSetting *HostSystemType; public slots: void SystemtypeHelp(); }; //------------------------------------------- -class NetworkSettingseth0: - public TriggeredConfigurationGroup { +class NetworkSettingseth0: public GroupSetting { Q_OBJECT public: NetworkSettingseth0(); - HostLineEdit *HostIPeth0; - HostComboBox *HostNETMASKeth0; - HostLineEdit *HostGWeth0; - HostLineEdit *HostDNSeth0; - HostCheckBox *HostActiveonbooteth0; - HostCheckBox *HostUseDHCPeth0 ; - HostCheckBox *HostDefaulteth0; - TransButtonSetting *wirelessbuttoneth0; - + HostTextEditSetting *HostIPeth0; + HostComboBoxSetting *HostNETMASKeth0; + HostTextEditSetting *HostGWeth0; + HostTextEditSetting *HostDNSeth0; + HostCheckBoxSetting *HostActiveonbooteth0; + HostCheckBoxSetting *HostUseDHCPeth0; + HostCheckBoxSetting *HostDefaulteth0; + ButtonStandardSetting *wirelessbuttoneth0; + HostComboBoxSetting *HOSTESSIDeth0(); + HostTextEditSetting *Hostkeyeth0(); signals: void eth0_is_default(void); public slots: @@ -41,27 +42,27 @@ public slots: void eth0_wireless_disable(); }; -class eth0options : public ConfigurationWizard -{ +class eth0options: public GroupSetting { public: eth0options(); }; -class NetworkSettingseth1: - public TriggeredConfigurationGroup { +class NetworkSettingseth1: public GroupSetting { Q_OBJECT public: NetworkSettingseth1(); - HostLineEdit *HostIPeth1; - HostComboBox *HostNETMASKeth1; - HostLineEdit *HostGWeth1; - HostLineEdit *HostDNSeth1; - HostCheckBox *HostActiveonbooteth1; - HostCheckBox *HostUseDHCPeth1 ; - HostCheckBox *HostDefaulteth1; - TransButtonSetting *wirelessbuttoneth1; + HostTextEditSetting *HostIPeth1; + HostComboBoxSetting *HostNETMASKeth1; + HostTextEditSetting *HostGWeth1; + HostTextEditSetting *HostDNSeth1; + HostCheckBoxSetting *HostActiveonbooteth1; + HostCheckBoxSetting *HostUseDHCPeth1 ; + HostCheckBoxSetting *HostDefaulteth1; + ButtonStandardSetting *wirelessbuttoneth1; + HostComboBoxSetting *HOSTESSIDeth1(); + HostTextEditSetting *Hostkeyeth1(); signals: void eth1_is_default(void); public slots: @@ -71,28 +72,27 @@ public slots: void eth1_wireless_disable(); }; -class eth1options : public ConfigurationWizard -{ +class eth1options: public GroupSetting { public: eth1options(); }; - -class NetworkSettingswlan0: - public TriggeredConfigurationGroup { +class NetworkSettingswlan0: public GroupSetting { Q_OBJECT public: NetworkSettingswlan0(); - HostLineEdit *HostIPwlan0; - HostComboBox *HostNETMASKwlan0; - HostLineEdit *HostGWwlan0; - HostLineEdit *HostDNSwlan0; - HostCheckBox *HostActiveonbootwlan0; - HostCheckBox *HostUseDHCPwlan0 ; - HostCheckBox *HostDefaultwlan0; - TransButtonSetting *wirelessbuttonwlan0; + HostTextEditSetting *HostIPwlan0; + HostComboBoxSetting *HostNETMASKwlan0; + HostTextEditSetting *HostGWwlan0; + HostTextEditSetting *HostDNSwlan0; + HostCheckBoxSetting *HostActiveonbootwlan0; + HostCheckBoxSetting *HostUseDHCPwlan0 ; + HostCheckBoxSetting *HostDefaultwlan0; + ButtonStandardSetting *wirelessbuttonwlan0; + HostComboBoxSetting *HOSTESSIDwlan0(); + HostTextEditSetting *Hostkeywlan0(); signals: void wlan0_is_default(void); public slots: @@ -102,27 +102,27 @@ public slots: void wlan0_wireless_disable(); }; -class Wlan0options : public ConfigurationWizard -{ +class Wlan0options: public GroupSetting { public: Wlan0options(); }; -class NetworkSettingswlan1: - public TriggeredConfigurationGroup { +class NetworkSettingswlan1: public GroupSetting { Q_OBJECT public: NetworkSettingswlan1(); - HostLineEdit *HostIPwlan1; - HostComboBox *HostNETMASKwlan1; - HostLineEdit *HostGWwlan1; - HostLineEdit *HostDNSwlan1; - HostCheckBox *HostActiveonbootwlan1; - HostCheckBox *HostUseDHCPwlan1 ; - HostCheckBox *HostDefaultwlan1; - TransButtonSetting *wirelessbuttonwlan1; + HostTextEditSetting *HostIPwlan1; + HostComboBoxSetting *HostNETMASKwlan1; + HostTextEditSetting *HostGWwlan1; + HostTextEditSetting *HostDNSwlan1; + HostCheckBoxSetting *HostActiveonbootwlan1; + HostCheckBoxSetting *HostUseDHCPwlan1 ; + HostCheckBoxSetting *HostDefaultwlan1; + ButtonStandardSetting *wirelessbuttonwlan1; + HostComboBoxSetting *HOSTESSIDwlan1(); + HostTextEditSetting *Hostkeywlan1(); signals: void wlan1_is_default(void); public slots: @@ -132,28 +132,25 @@ public slots: void wlan1_wireless_disable(); }; -class wlan1options : public ConfigurationWizard -{ +class wlan1options: public GroupSetting { public: wlan1options(); }; - -class NetworkSettingsath0: - public TriggeredConfigurationGroup { +class NetworkSettingsath0: public GroupSetting { Q_OBJECT public: NetworkSettingsath0(); - HostLineEdit *HostIPath0; - HostComboBox *HostNETMASKath0; - HostLineEdit *HostGWath0; - HostLineEdit *HostDNSath0; - HostCheckBox *HostActiveonbootath0; - HostCheckBox *HostUseDHCPath0 ; - HostCheckBox *HostDefaultath0; - TransButtonSetting *wirelessbuttonath0; + HostTextEditSetting *HostIPath0; + HostComboBoxSetting *HostNETMASKath0; + HostTextEditSetting *HostGWath0; + HostTextEditSetting *HostDNSath0; + HostCheckBoxSetting *HostActiveonbootath0; + HostCheckBoxSetting *HostUseDHCPath0 ; + HostCheckBoxSetting *HostDefaultath0; + ButtonStandardSetting *wirelessbuttonath0; signals: void ath0_is_default(void); public slots: @@ -163,19 +160,17 @@ public slots: void ath0_wireless_disable(); }; -class ath0options : public ConfigurationWizard -{ +class ath0options: public GroupSetting { public: ath0options(); }; -class NetworkOptionsFrame: public VerticalConfigurationGroup { +class NetworkOptionsFrame: public GroupSetting { Q_OBJECT public: NetworkOptionsFrame(); - TransButtonSetting *FetchDhcpHostnameButton; - TransLabelSetting *networklabel; - HostComboBox *HostMyhostname; + ButtonStandardSetting *FetchDhcpHostnameButton; + HostComboBoxSetting *HostMyhostname; QString find_hostname(); public slots: void fetch_hostname(); @@ -185,11 +180,11 @@ public slots: //-------------------------------------------- -class SoundSettings: public TriggeredConfigurationGroup { +class SoundSettings: public GroupSetting { Q_OBJECT public: SoundSettings(); - HostComboBox *HostAudiotype; + HostComboBoxSetting *HostAudiotype; signals: @@ -201,23 +196,23 @@ public slots: }; - -class SoundOSSsettings: public TriggeredConfigurationGroup { +/* +class SoundOSSsettings: public HostCheckBoxSetting { Q_OBJECT public: SoundOSSsettings(); - HostComboBox *HostSoundOssAll; + HostComboBoxSetting *HostSoundOssAll; void fillossselection(); public slots: void soundossgathersettings(); void loadossdriver(); }; - -class SoundALSAsettings: public TriggeredConfigurationGroup { +*/ +class SoundALSAsettings: public GroupSetting { Q_OBJECT public: SoundALSAsettings(); - HostComboBox *HostSoundALSAAll; + HostComboBoxSetting *HostSoundALSAAll; void fillALSAselection(); public slots: void soundalsagathersettings(); @@ -227,80 +222,36 @@ public slots: //############################################ -class MythInstallSettings: public ConfigurationWizard -{ - +class MythInstallSettings: public GroupSetting { public: MythInstallSettings(); void testme(); private: MythPopupBox *popup; - }; -/* -#include "mythstorage.h" - -class MPUBLIC ImageSelectSetting: public SelectSetting { - Q_OBJECT -public: - ImageSelectSetting(Storage *_storage) : - SelectSetting(_storage), - bxwidget(NULL), imagelabel(NULL), combo(NULL), - m_hmult(1.0f), m_wmult(1.0f) { } - virtual QWidget* configWidget(ConfigurationGroup *cg, QWidget* parent, - const char* widgetName = 0); - virtual void widgetInvalid(QObject *obj); - virtual void deleteLater(void); - virtual void setHelpText(const QString &str); - - virtual void addImageSelection(const QString& label, - QImage* image, - QString value=QString::null, - bool select=false); - -protected slots: - void imageSet(int); - -protected: - void Teardown(void); - virtual ~ImageSelectSetting(); - -protected: - vector<QImage*> images; - QWidget *bxwidget; - QLabel *imagelabel; - MythComboBox *combo; - float m_hmult, m_wmult; -}; - - -class MPUBLIC HostImageSelect : public ImageSelectSetting, public HostDBStorage -{ -public: - HostImageSelect(const QString &name) : - ImageSelectSetting(this), HostDBStorage(this, name) { } -};*/ - +/* class HostRemoteType: public HostImageSelect { public: HostRemoteType(); }; - +*/ #define MV_ROOT "/usr/MythVantage/" -int runsettings(bool = false , bool = false , bool = false ,bool = false ,bool = false, bool = false,bool = false,bool = false , bool = false , bool = false , bool = false, bool = false , bool = false , bool = false , bool = false, bool = false , bool = false , bool = false , bool = false, bool = false); +int runsettings(bool = false, bool = false, bool = false, bool = false, + bool = false, bool = false, bool = false, bool = false, + bool = false, bool = false, bool = false, bool = false, + bool = false, bool = false, bool = false, bool = false, + bool = false, bool = false, bool = false, bool = false); //void ReadDDCifno(void); void run_systemconfig(QString,bool = false,QString = ""); +void settingsWait(); void writesettings(); //void testXconfiguration(); - - - struct HostParms { @@ -329,7 +280,6 @@ struct HostParms QString ThisHostkeyeth0; QString ThisHostMTUeth0; - QString ThisHostIPeth1; QString ThisHostNETMASKeth1; QString ThisHostDNSeth1; @@ -354,7 +304,6 @@ struct HostParms QString ThisHostkeywlan0; QString ThisHostMTUwlan0; - QString ThisHostIPwlan1; QString ThisHostNETMASKwlan1; QString ThisHostDNSwlan1; @@ -379,7 +328,6 @@ struct HostParms QString ThisHostkeyath0; QString ThisHostMTUath0; - QString ThisRemote; QString ThisHostRemotebucket; @@ -393,12 +341,12 @@ struct HostParms QString ThisNFS; QString ThisMythWEB; QString ThisHostwebauth; - // QString ThisHostServiceHobbit; - // QString ThisHostServiceRRD; +// QString ThisHostServiceHobbit; +// QString ThisHostServiceRRD; QString ThisHostRunDHCP; QString ThisSystemType; -// QString ThisBlaster; +// QString ThisBlaster; QString ThisHostTransmitproto_1; QString ThisHostTransmitproto_2; @@ -416,12 +364,6 @@ struct HostParms QString ThisHostTransmitDelay_4; QString ThisHostTransmitSend_after_4; - - - - - - QString ThisReceiverType; QString ThisHDHRlirc_device; QString ThisHostLircWait; @@ -431,8 +373,6 @@ struct HostParms QString ThisDBhost; QString ThisXres; - - QString ThisHostBEWait; QString ThisHostUseXLargeMouse; QString ThisShutdowntime; @@ -503,7 +443,6 @@ struct HostParms QString ThisHostXBMC; QString ThisHostPLEXHT; QString ThisHostPLEXMS; - QString ThisHostHuluDesktop; QString ThisHostpluginmythgameMame; QString ThisHostpluginmythgamefceux; @@ -549,10 +488,4 @@ struct DDCinfo QString Displaysize; }; - - - - - - #endif diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp index 5c2e128..6751796 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp @@ -1,5 +1,4 @@ -//#include <qapplication.h> - +// mythinstall #include "installdialog.h" #include "installsettings.h" #include "password_manage.h" @@ -12,6 +11,7 @@ #include <QDir> #include <QTextStream> +#include <stdio.h> #include <cstdlib> #include <sys/types.h> #include <sys/stat.h> @@ -19,8 +19,6 @@ #include <chrono> // for milliseconds #include <thread> // for sleep_for -#include <stdio.h> - //MythTV #include "langsettings.h" #include "mythcontext.h" @@ -39,18 +37,18 @@ #include "mythuihelper.h" //?? -#include "myththemebase.h" +//#include "myththemebase.h" HostParms hostparm; DDCinfo ddcinfo; -void initKeys(void) -{ - REG_KEY("Welcome", "STARTXTERM", "Open an Xterm window", "F12"); - REG_KEY("Welcome", "SHOWSETTINGS", "Show Mythshutdown settings", "F11"); -} +//void initKeys(void) +//{ +// REG_KEY("Welcome", "STARTXTERM", "Open an Xterm window", "F12"); +// REG_KEY("Welcome", "SHOWSETTINGS", "Show Mythshutdown settings", "F11"); +//} int main(int argc, char **argv) { @@ -67,7 +65,7 @@ int main(int argc, char **argv) bool bShowplugins = false; bool bShowsoftware = false; bool bShowTemplate = false; - bool bShowuser = false; + bool bShowuser = false; bool bShowwebuser = false; bool bRunSetup = false; bool bShowHelp = false; @@ -78,8 +76,8 @@ int main(int argc, char **argv) bool bShowquestion = false; bool bShowsupplemental = false; bool bShowremotes_only = false; - bool bShowvnc = false; - bool bShowFileshare = false; + bool bShowvnc = false; + bool bShowFileshare = false; QStringList template_c_line ; QString modulelist = "" ; @@ -261,14 +259,17 @@ int main(int argc, char **argv) showLang = true; LCD::SetupLCD(); + if (class LCD *lcd = LCD::Get()) lcd->switchToTime(); - MythTranslation::load("mythfrontend"); + GetMythUI()->LoadQtConfig(); + MythMainWindow *mainWindow = GetMythMainWindow(); mainWindow->Init(); + MythScreenStack *mainStack = mainWindow->GetMainStack(); // if parms were passed to -t then doen't init the screen. // if ( template_c_line.size() == 0 ) @@ -282,14 +283,15 @@ int main(int argc, char **argv) // initKeys(); // }; - gCoreContext->ActivateSettingsCache(false); - gCoreContext->ClearSettingsCache(); - gCoreContext->ActivateSettingsCache(false); +// gCoreContext->ActivateSettingsCache(false); +// gCoreContext->ClearSettingsCache(); +// gCoreContext->ActivateSettingsCache(false); + MythScreenType *screen; if (bShowSettings) { - gCoreContext->ActivateSettingsCache(false); - gCoreContext->ClearSettingsCache(); + //gCoreContext->ActivateSettingsCache(false); + //gCoreContext->ClearSettingsCache(); bool runconfig = false; int sysRet=system("cp -f /etc/systemconfig /tmp/systemconfig.bak"); if (sysRet < 0) @@ -321,7 +323,6 @@ int main(int argc, char **argv) "libdvdcss", "mythweather", "mythzoneminder", - "huludesktop", "openpht", "plex-media-server", "kodi", @@ -347,7 +348,6 @@ int main(int argc, char **argv) "Hostpluginmythvideo_dvdcss", "Hostpluginmythweather", "Hostpluginmythzoneminder", - "HostHuluDesktop", "HostPLEXHT", "HostPLEXMS", "HostXBMC", @@ -389,14 +389,18 @@ int main(int argc, char **argv) } //DONE sync db with pacman - runsettings(false,bShowNetwork,bShowHostype,bShowMisc,bShowshutdown,bShowadvanced,bShowsound,bShowadvancedX,bShowAccesscontrol,bShowplugins,bShowsoftware,bShowuser,bShowwebuser,bShowddns,bShowinfrared,bShowscreensaver,bShowsupplemental,bShowremotes_only,bShowvnc,bShowFileshare); + runsettings(false,bShowNetwork,bShowHostype,bShowMisc,bShowshutdown, + bShowadvanced,bShowsound,bShowadvancedX,bShowAccesscontrol, + bShowplugins,bShowsoftware,bShowuser,bShowwebuser,bShowddns, + bShowinfrared,bShowscreensaver,bShowsupplemental, + bShowremotes_only,bShowvnc,bShowFileshare); QString newdb = gCoreContext->GetSetting("HostMysqlserver"); QString newhostype = gCoreContext->GetSetting("HostSystemType"); int status = system("diff /tmp/systemconfig.bak /etc/systemconfig"); bool restart = false; //save my settings in case db switches QString cmdtxt=MV_ROOT; - cmdtxt.append("bin/myth_settings_wrapper.sh -c save -t syssettings -d " + olddb); + cmdtxt.append("bin/myth_settings_wrapper.sh -c save -t syssettings -d " + olddb); sysRet=system(qPrintable(cmdtxt)); if (sysRet < 0) LOG(VB_GENERAL, LOG_ERR, "Could not save settings"); @@ -413,7 +417,7 @@ int main(int argc, char **argv) //db changed save setting from olddb QString cmdtxt; cmdtxt=MV_ROOT; - cmdtxt.append("bin/myth_settings_wrapper.sh -c save -t syssettings -d " + olddb ) ; + cmdtxt.append("bin/myth_settings_wrapper.sh -c save -t syssettings -d " + olddb); int sysRet=system(qPrintable(cmdtxt)); if (sysRet < 0) LOG(VB_GENERAL, LOG_ERR, "Could not save settings"); @@ -421,15 +425,14 @@ int main(int argc, char **argv) if ( runconfig ) { - //LOG(VB_GENERAL, LOG_ERR, - // "mythinstall: this is where i stalled"); + //LOG(VB_GENERAL, LOG_ERR, "mythinstall: this is where i stalled"); if ( newhostype != oldhostype ) modulelist.append("hostypec,"); - // trim off last , + // trim off last , modulelist.truncate(modulelist.length()-1); QString cmdtxt; - cmdtxt=MV_ROOT ; - cmdtxt.append("bin/myth_settings_wrapper.sh -c restore -t syssettings -d "); + cmdtxt=MV_ROOT; + cmdtxt.append("bin/myth_settings_wrapper.sh -c restore -t syssettings -d "); QString dbcommand = cmdtxt; dbcommand.append(newdb); run_systemconfig(modulelist,restart,dbcommand); @@ -438,8 +441,8 @@ int main(int argc, char **argv) if (sysRet < 0) LOG(VB_GENERAL, LOG_ERR, "Could not remove /tmp/systemconfig.bak."); - gCoreContext->ActivateSettingsCache(false); - gCoreContext->ClearSettingsCache(); +// gCoreContext->ActivateSettingsCache(false); +// gCoreContext->ClearSettingsCache(); if ( restart ) { QString prompt; @@ -469,9 +472,9 @@ int main(int argc, char **argv) if (sysRet < 0) LOG(VB_GENERAL, LOG_ERR, "Could not reload frontend."); } - gCoreContext->ActivateSettingsCache(false); - gCoreContext->ClearSettingsCache(); - gCoreContext->SendMessage("CLEAR_SETTINGS_CACHE"); +// gCoreContext->ActivateSettingsCache(false); +// gCoreContext->ClearSettingsCache(); +// gCoreContext->SendMessage("CLEAR_SETTINGS_CACHE"); }//run settings else if (bShowTemplate) @@ -644,6 +647,8 @@ int main(int argc, char **argv) } DestroyMythMainWindow(); delete gContext; +// gContext = nullptr; +// delete qApp; SignalHandler::Done(); return retval; } diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.h b/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.h index 325fc0e..3e76ae6 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.h +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.h @@ -3,7 +3,7 @@ #include <iostream> #include <fstream> #include <stdio.h> -#include "settings.h" +//#include "settings.h" #include "installsettings.h" #include <qsqldatabase.h> #include <qsqlquery.h> @@ -16,7 +16,7 @@ #include "mythmiscutil.h" -class MiscMainFrame: public VerticalConfigurationGroup { +class MiscMainFrame: public GroupSetting { Q_OBJECT public: MiscMainFrame(); @@ -29,14 +29,14 @@ signals: void update_timezone(QString); }; -class MiscMainFrame2: public VerticalConfigurationGroup { +class MiscMainFrame2: public GroupSetting { Q_OBJECT public: MiscMainFrame2(); }; /* -class TimezoneButton: public VerticalConfigurationGroup { +class TimezoneButton: public GroupSetting { Q_OBJECT public: TimezoneButton(); @@ -49,28 +49,28 @@ signals: }; */ -class TimezoneRegion: public TriggeredConfigurationGroup { +class TimezoneRegion: public GroupSetting { Q_OBJECT public: TimezoneRegion(); - HostComboBox *HostTimeZoneRegion; - HostComboBox *HostTimezoneRegion_US; - HostComboBox *HostTimezoneRegion_Pacific; - HostComboBox *HostTimezoneRegion_Mideast; - HostComboBox *HostTimezoneRegion_Mexico; - HostComboBox *HostTimezoneRegion_Indian; - HostComboBox *HostTimezoneRegion_Europe; - HostComboBox *HostTimezoneRegion_Etc; - HostComboBox *HostTimezoneRegion_Chile; - HostComboBox *HostTimezoneRegion_Canada; - HostComboBox *HostTimezoneRegion_Brazil; - HostComboBox *HostTimezoneRegion_Australia; - HostComboBox *HostTimezoneRegion_Atlantic; - HostComboBox *HostTimezoneRegion_Asia; - HostComboBox *HostTimezoneRegion_Arctic; - HostComboBox *HostTimezoneRegion_Antarctica; - HostComboBox *HostTimezoneRegion_America; - HostComboBox *HostTimezoneRegion_Africa; + HostComboBoxSetting *HostTimeZoneRegion; + HostComboBoxSetting *HostTimezoneRegion_US; + HostComboBoxSetting *HostTimezoneRegion_Pacific; + HostComboBoxSetting *HostTimezoneRegion_Mideast; + HostComboBoxSetting *HostTimezoneRegion_Mexico; + HostComboBoxSetting *HostTimezoneRegion_Indian; + HostComboBoxSetting *HostTimezoneRegion_Europe; + HostComboBoxSetting *HostTimezoneRegion_Etc; + HostComboBoxSetting *HostTimezoneRegion_Chile; + HostComboBoxSetting *HostTimezoneRegion_Canada; + HostComboBoxSetting *HostTimezoneRegion_Brazil; + HostComboBoxSetting *HostTimezoneRegion_Australia; + HostComboBoxSetting *HostTimezoneRegion_Atlantic; + HostComboBoxSetting *HostTimezoneRegion_Asia; + HostComboBoxSetting *HostTimezoneRegion_Arctic; + HostComboBoxSetting *HostTimezoneRegion_Antarctica; + HostComboBoxSetting *HostTimezoneRegion_America; + HostComboBoxSetting *HostTimezoneRegion_Africa; void timezoneregion_fillselection(QString); void timezoneregion_fillselection_zone(); @@ -84,7 +84,7 @@ signals: /* class NFSSettings: public - TriggeredConfigurationGroup { + GroupSetting { public: NFSSettings(); diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/mythinstall.pro b/abs/core/mythinstall/MythVantage-app/mythinstall/mythinstall.pro index 099d0f0..08704cf 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/mythinstall.pro +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/mythinstall.pro @@ -38,21 +38,22 @@ INSTALLS += uifiles QMAKE_CLEAN += $(TARGET) # Input -//HEADERS += commandlineparser.h -//SOURCES += main.cpp commandlineparser.cpp - HEADERS += installdialog.h commandlineparser.h installsettings.h -HEADERS += settemplate.h installationtype.h xorgsettings.h password_manage.h -HEADERS += misc_settings.h mv_common.h infrared.h compat-mv.h supplemental.h +HEADERS += installationtype.h xorgsettings.h password_manage.h +#HEADERS += settemplate.h installationtype.h xorgsettings.h password_manage.h +#HEADERS += misc_settings.h mv_common.h infrared.h compat-mv.h supplemental.h +HEADERS += misc_settings.h mv_common.h infrared.h supplemental.h HEADERS += vnc.h fileshare.h questionnotice.h -HEADERS += mythconfigdialogs.h mythconfiggroups.h -HEADERS += settings.h +#HEADERS += mythconfigdialogs.h mythconfiggroups.h +#HEADERS += settings.h SOURCES += main.cpp commandlineparser.cpp installdialog.cpp installsettings.cpp -SOURCES += settemplate.cpp installationtype.cpp xorgsettings.cpp -SOURCES += password_manage.cpp misc_settings.cpp infrared.cpp compat-mv.cpp +SOURCES += installationtype.cpp xorgsettings.cpp +#SOURCES += settemplate.cpp installationtype.cpp xorgsettings.cpp +#SOURCES += password_manage.cpp misc_settings.cpp infrared.cpp compat-mv.cpp +SOURCES += password_manage.cpp misc_settings.cpp infrared.cpp SOURCES += supplemental.cpp vnc.cpp fileshare.cpp questionnotice.cpp -SOURCES += mythconfigdialogs.cpp mythconfiggroups.cpp -SOURCES += settings.cpp +#SOURCES += mythconfigdialogs.cpp mythconfiggroups.cpp +#SOURCES += settings.cpp QT += sql xml network widgets diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.cpp index 11e2974..3fc0e02 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.cpp @@ -128,31 +128,31 @@ bool UserManagement::user_valid_check(QString check_string) } -UserManagement::UserManagement(): - VerticalConfigurationGroup(false,false,false,false) +UserManagement::UserManagement() { - setLabel(QObject::tr("User Accounts")); - userlist = new TransComboBoxSetting(false); + GroupSetting* UMsettings = new GroupSetting(); + UMsettings->setLabel(QObject::tr("User Accounts")); + HostComboBoxSetting* userlist = new HostComboBoxSetting(false); userlist->setLabel(QObject::tr("User")); userlist->addSelection("root"); userlist->addSelection("mythtv"); user_fillselection(); userlist->setHelpText(QObject::tr("Select the user to change the user password or delete the user account.")); - userpass1= new TransLineEditSetting(true); + userpass1= new HostLineEditSetting(true); userpass1->setLabel("Password"); userpass1->SetPasswordEcho(passtoggle); userpass1->setHelpText("The following characters will not be accepted: " + invalid_chars); - passToggleButton = new TransButtonSetting; + passToggleButton = new ButtonStandardSetting; passToggleButton->setLabel("Toggle Password View"); passToggleButton->setHelpText(QObject::tr("Hide or show the password.")); - info = new TransLabelSetting; - info->setValue(""); +// info = new TransLabelSetting; +// info->setValue(""); - userapplyButton = new TransButtonSetting; + userapplyButton = new ButtonStandardSetting; userapplyButton->setLabel("Apply New Password"); usercreateButton = new TransButtonSetting; diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.h b/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.h index 049cbce..cea7010 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.h +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.h @@ -1,24 +1,24 @@ -#include <settings.h> +//#include <settings.h> +#include "standardsettings.h" #include "mythdialogs.h" //#include "libmyth/mythdialogs.h" #include "libmyth/mythwidgets.h" #include "installsettings.h" #include <QTextStream> -class UserManagement: public - VerticalConfigurationGroup { +class UserManagement: public GroupSetting { Q_OBJECT public: UserManagement(); - TransComboBoxSetting *userlist; - TransLineEditSetting *userpass1; - TransButtonSetting *userapplyButton; - TransButtonSetting *usercreateButton; - TransButtonSetting *userdeleteButton; - TransButtonSetting *passToggleButton; - TransLabelSetting *info; - TransCheckBoxSetting *lockaccount; - HostCheckBox *rootSSH; + HostComboBoxSetting *userlist; + HostTextEditSetting *userpass1; + ButtonStandardSetting *userapplyButton; + ButtonStandardSetting *usercreateButton; + ButtonStandardSetting *userdeleteButton; + ButtonStandardSetting *passToggleButton; +// TransLabelSetting *info; +// TransMythUICheckBoxSetting *lockaccount; + HostCheckBoxSetting *rootSSH; void user_fillselection(void); bool user_exist_check(QString); bool user_valid_check(QString); @@ -33,29 +33,26 @@ public slots: -class WebPassword: public - TriggeredConfigurationGroup { +class WebPassword: public GroupSetting { Q_OBJECT public: WebPassword(); - HostLineEdit *webuser; - HostLineEdit *webpassword; - HostCheckBox *webAuth; - TransButtonSetting *webpassToggleButton; - TransLabelSetting *info; + HostTextEditSetting *webuser; + HostTextEditSetting *webpassword; + HostCheckBoxSetting *webAuth; + ButtonStandardSetting *webpassToggleButton; +// TransLabelSetting *info; bool valid_check(QString); - TransButtonSetting *webapplyButton; + ButtonStandardSetting *webapplyButton; public slots: void webpassword_gathersettings(); void togglepass(); }; -class WebPasswordFrame: public - VerticalConfigurationGroup { +class WebPasswordFrame: public GroupSetting { Q_OBJECT public: WebPasswordFrame(); - TransButtonSetting *webapplyButton; - + ButtonStandardSetting *webapplyButton; }; diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.cpp index 7201304..def6ae6 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.cpp @@ -44,7 +44,7 @@ void choosetemplate (QString templateop, QString templatename , QString templat MythCtemplate setting; // setting.load(); // setting.save(); - setting.exec(); +// setting.exec(); }; QString thistemplate; @@ -283,9 +283,9 @@ void c_from(QString copyhost, QString templatenumber) -static HostComboBox *HOSTtemplatetype() +static HostComboBoxSetting *HOSTtemplatetype() { - HostComboBox *gc = new HostComboBox("HOSTtemplatetype"); + HostComboBoxSetting *gc = new HostComboBoxSetting("HOSTtemplatetype"); gc->setLabel(QObject::tr("Template options")); gc->addSelection("Do Nothing") ; gc->addSelection("restore"); @@ -297,9 +297,9 @@ static HostComboBox *HOSTtemplatetype() return gc; } -static HostComboBox *HostTemplateSave() +static HostComboBoxSetting *HostTemplateSave() { - HostComboBox *gc = new HostComboBox("HostTemplateSave"); + HostComboBoxSetting *gc = new HostComboBoxSetting("HostTemplateSave"); gc->setLabel(QObject::tr("Save Template")); // gc->addSelection("none"); gc->addSelection("user1") ; @@ -309,9 +309,9 @@ static HostComboBox *HostTemplateSave() return gc; } -static HostComboBox *HostTemplateCopy_restore() +static HostComboBoxSetting *HostTemplateCopy_restore() { - HostComboBox *gc = new HostComboBox("HostTemplateRestore"); + HostComboBoxSetting *gc = new HostComboBoxSetting("HostTemplateRestore"); gc->setLabel(QObject::tr("Template")); // gc->addSelection("none"); gc->addSelection("Current"); @@ -323,9 +323,9 @@ static HostComboBox *HostTemplateCopy_restore() return gc; } -static HostComboBox *HostTemplateRestore() +static HostComboBoxSetting *HostTemplateRestore() { - HostComboBox *gc = new HostComboBox("HostTemplateRestore"); + HostComboBoxSetting *gc = new HostComboBoxSetting("HostTemplateRestore"); gc->setLabel(QObject::tr("Template")); // gc->addSelection("none"); gc->addSelection("default_1"); @@ -338,9 +338,9 @@ static HostComboBox *HostTemplateRestore() return gc; } -static HostComboBox *HostSelectcopy_from() +static HostComboBoxSetting *HostSelectcopy_from() { - HostComboBox *gc = new HostComboBox("HostSelectcopy_from"); + HostComboBoxSetting *gc = new HostComboBoxSetting("HostSelectcopy_from"); gc->setLabel(QObject::tr("Host")); // gc->addSelection("none"); diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.h b/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.h index a730cf5..c89ef33 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.h +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.h @@ -1,7 +1,7 @@ -#include <settings.h> +//#include <settings.h> #include "mythdialogs.h" -class MythCtemplate: public ConfigurationWizard { +class MythCtemplate: public GroupSetting { public: MythCtemplate(); diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/supplemental.h b/abs/core/mythinstall/MythVantage-app/mythinstall/supplemental.h index 835d161..c8a670a 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/supplemental.h +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/supplemental.h @@ -3,7 +3,7 @@ #include <iostream> #include <fstream> #include <stdio.h> -#include "settings.h" +//#include "settings.h" #include "installsettings.h" #include <qsqldatabase.h> #include <qsqlquery.h> @@ -15,12 +15,12 @@ #include <qapplication.h> #include "mythmiscutil.h" -class WindowManager_settings: public TriggeredConfigurationGroup { +class WindowManager_settings: public GroupSetting { Q_OBJECT public: WindowManager_settings(); - HostCheckBox *HostEnhancedWMStyle; - HostCheckBox *HostSupplemental; + HostCheckBoxSetting *HostEnhancedWMStyle; + HostCheckBoxSetting *HostSupplemental; signals: void eth0_is_default(void); public slots: @@ -29,7 +29,7 @@ public: -class Supplementalhostsettings: public VerticalConfigurationGroup { +class Supplementalhostsettings: public GroupSetting { // Q_OBJECT public: Supplementalhostsettings(); 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); +} diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.h b/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.h index 3b1b349..c1d04d3 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.h +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.h @@ -3,8 +3,9 @@ #include <iostream> #include <fstream> #include <stdio.h> -#include "settings.h" -#include "installsettings.h" +//#include "settings.h" +#include "standardsettings.h" +//#include "installsettings.h" #include <qsqldatabase.h> #include <qsqlquery.h> @@ -16,13 +17,7 @@ #include "mythmiscutil.h" -class VNChostsettings: public VerticalConfigurationGroup { +class VNChostsettings: public GroupSetting { public: VNChostsettings(); - }; - - - - - diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.cpp index eb6c893..f34f95d 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.cpp @@ -61,7 +61,6 @@ static HostComboBox *HostXgeneric_connection() gc->setHelpText(QObject::tr("Video-out")); return gc; } -*/ static HostCheckBox *HostXIgnoreEDID() { @@ -278,11 +277,11 @@ void AdvancedXGeneric_modelines::AdvancedXGeneric_modelines_GatherSettings(void) // Jump to final step testXconfiguration(); } - +*/ // --------------------------------------------start of nvidia specific ------------------------------------ - +/* AdvancedXNvidiaConnections::AdvancedXNvidiaConnections(): TriggeredConfigurationGroup(false,false,true,true,true,true,true,true) { @@ -544,7 +543,7 @@ void AdvancedXcardtype::AdvancedXcardgatherSettings(void) else emit go(); }; - +*/ // AdvancedXSettings::AdvancedXSettings(): // TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) { @@ -591,14 +590,11 @@ void AdvancedXcardtype::AdvancedXcardgatherSettings(void) // // }; -AdvancedXSettings::AdvancedXSettings(): - TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) { +AdvancedXSettings::AdvancedXSettings(): GroupSetting() +{ setLabel(QObject::tr("Display Settings")); - - - - HostXIgnoreConfig = new HostCheckBox("HostXIgnoreConfig"); + HostXIgnoreConfig = new HostCheckBoxSetting("HostXIgnoreConfig"); HostXIgnoreConfig->setLabel(QObject::tr("User Supplied Configuration")); HostXIgnoreConfig->setValue(false); #ifdef __MVAPP__ @@ -607,31 +603,21 @@ AdvancedXSettings::AdvancedXSettings(): HostXIgnoreConfig->setHelpText(QObject::tr("If checked, the system will use the configuration file provided by YOU. Place your configuration file in /home/mythtv/templates/xorg.user.")); #endif - Setting* Advancedxsettings = HostXIgnoreConfig; - addChild(Advancedxsettings); - setTrigger(Advancedxsettings); - - - - - - - ConfigurationGroup* settings = new VerticalConfigurationGroup(false); - - - ConfigurationGroup* setting1 = new GridConfigurationGroup(1,false); - setting1->addChild(HostXres()); - - addTarget("0",setting1); - addTarget("1", settings); - +// Setting* Advancedxsettings = HostXIgnoreConfig; + addChild(HostXIgnoreConfig); +// setTrigger(Advancedxsettings); +// ConfigurationGroup* settings = new VerticalConfigurationGroup(false); +// ConfigurationGroup* setting1 = new GridConfigurationGroup(1,false); + HostXIgnoreConfig->addTargetedChild("1", HostXres()); +// addTarget("0",setting1); +// addTarget("1", settings); }; - +/* void AdvancedXSettings::ADJUSTEDID(void) { EDIDOptions edidscreen; @@ -684,10 +670,4 @@ void testXconfiguration(void) GetMythMainWindow(), QObject::tr("Test X button"), message); }; - - - - - - - +*/ diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.h b/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.h index ad62564..8c659f7 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.h +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.h @@ -1,6 +1,6 @@ -#include <settings.h> -#include "mythdialogs.h" -#include "libmyth/mythdialogs.h" +//#include <settings.h> +//#include "mythdialogs.h" +//#include "libmyth/mythdialogs.h" #include "libmyth/mythwidgets.h" #include "installsettings.h" @@ -8,13 +8,13 @@ #include <qdir.h> -class AdvancedXNvidiaConnections: public TriggeredConfigurationGroup { +class AdvancedXNvidiaConnections: public GroupSetting { Q_OBJECT public: AdvancedXNvidiaConnections(); - HostComboBox *HostXNvidiaConnection; - HostComboBox *HostXnVidiaTVformat; - HostComboBox *HostXnVidiaTVstandard; + HostComboBoxSetting *HostXNvidiaConnection; + HostComboBoxSetting *HostXnVidiaTVformat; + HostComboBoxSetting *HostXnVidiaTVstandard; public slots: void AdvancedXNvidiaConnectionsGatherSettings(); @@ -23,20 +23,20 @@ signals: }; -class AdvancedXNvidia_modelines: public TriggeredConfigurationGroup { +class AdvancedXNvidia_modelines: public GroupSetting { Q_OBJECT public: AdvancedXNvidia_modelines(); - HostComboBox *HostXNvidiaModelineCatagory; - HostComboBox *HostXNvidiaadvancedresVESA; - HostComboBox *HostXNvidiaadvancedresATSC; - HostComboBox *HostXNvidiaadvancedresDVD; - HostComboBox *HostXNvidiaadvancedresNTSC; - HostComboBox *HostXNvidiaadvancedresCustom; - HostCheckBox *HostXnVidia1080p; - HostCheckBox *HostXnVidia1080i; - HostCheckBox *HostXnVidia720p; - HostCheckBox *HostXnVidia480p; + HostComboBoxSetting *HostXNvidiaModelineCatagory; + HostComboBoxSetting *HostXNvidiaadvancedresVESA; + HostComboBoxSetting *HostXNvidiaadvancedresATSC; + HostComboBoxSetting *HostXNvidiaadvancedresDVD; + HostComboBoxSetting *HostXNvidiaadvancedresNTSC; + HostComboBoxSetting *HostXNvidiaadvancedresCustom; + HostCheckBoxSetting *HostXnVidia1080p; + HostCheckBoxSetting *HostXnVidia1080i; + HostCheckBoxSetting *HostXnVidia720p; + HostCheckBoxSetting *HostXnVidia480p; void Nvidia_fillselection(QString); public slots: void AdvancedXNvidia_modelines_GatherSettings(void); @@ -45,11 +45,11 @@ public slots: //------------------------------------------------- -class AdvancedXcardtype: public TriggeredConfigurationGroup { +class AdvancedXcardtype: public GroupSetting { Q_OBJECT public: AdvancedXcardtype(); - HostComboBox *HostXcardtype; + HostComboBoxSetting *HostXcardtype; public slots: void AdvancedXcardgatherSettings(); @@ -60,34 +60,33 @@ signals: }; -class AdvancedXSettings: public TriggeredConfigurationGroup { +class AdvancedXSettings: public GroupSetting { Q_OBJECT public: AdvancedXSettings(); - HostCheckBox *HostXIgnoreConfig; + HostCheckBoxSetting *HostXIgnoreConfig; protected slots: void ADJUSTEDID(void); }; -class AdvancedXGeneric_modelines: public TriggeredConfigurationGroup { +class AdvancedXGeneric_modelines: public GroupSetting { Q_OBJECT public: AdvancedXGeneric_modelines(); - HostComboBox *HostXModelineCatagory; - HostComboBox *HostXadvancedresVESA; - HostComboBox *HostXadvancedresATSC; - HostComboBox *HostXadvancedresDVD; - HostComboBox *HostXadvancedresNTSC; - HostComboBox *HostXadvancedresCustom; + HostComboBoxSetting *HostXModelineCatagory; + HostComboBoxSetting *HostXadvancedresVESA; + HostComboBoxSetting *HostXadvancedresATSC; + HostComboBoxSetting *HostXadvancedresDVD; + HostComboBoxSetting *HostXadvancedresNTSC; + HostComboBoxSetting *HostXadvancedresCustom; void generic_fillselection(QString); public slots: void AdvancedXGeneric_modelines_GatherSettings(void); }; -class EDIDOptions : public ConfigurationWizard -{ +class EDIDOptions : public GroupSetting { public: EDIDOptions(); }; @@ -101,10 +100,10 @@ void ReadDDCvalues(); #include <iostream> -static HostComboBox *HostXres() +static HostComboBoxSetting *HostXres() //Used in the simple config { - HostComboBox *gc = new HostComboBox("HostXres"); + HostComboBoxSetting *gc = new HostComboBoxSetting("HostXres"); gc->setLabel(QObject::tr("Initial Resolution")); gc->addSelection("Auto") ; gc->setHelpText(QObject::tr("")); @@ -124,4 +123,3 @@ static HostComboBox *HostXres() return gc; } - diff --git a/abs/core/mythinstall/PKGBUILD b/abs/core/mythinstall/PKGBUILD index 24a8235..76cce00 100644 --- a/abs/core/mythinstall/PKGBUILD +++ b/abs/core/mythinstall/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Jams pkgname=mythinstall pkgver=8.6 -pkgrel=1 +pkgrel=2 pkgdesc="LinHES installer/systemconfig GUI." arch=('x86_64') depends=('mythtv>=30.0' 'LinHES-config') |