OSDN Git Service

*Implemented server interface.
[greensite/jasmine.git] / ui / settingdialog.cxx
index a5b071b..62b1c6f 100644 (file)
@@ -19,8 +19,8 @@ void SettingDialog::setPort(const quint16 port){this->port_control->setValue(por
 void SettingDialog::setNickName(const QString &name){this->nickName_control->setText(name);}
 void SettingDialog::setIPAddress(const QHostAddress &address){this->address->setText(address.toString());}
 void SettingDialog::setNoloadMemberlist(const bool yesno){this->no_load_memberlist->setChecked(yesno);}
-void SettingDialog::setTab(tab t){
-       switch(t){
+void SettingDialog::setTab(const tab id){
+       switch(id){
        case SettingDialog::server:
                server:
                this->settingTab->setCurrentIndex(0);
@@ -35,6 +35,22 @@ void SettingDialog::setTab(tab t){
                goto server;
        }
 }
+void SettingDialog::setTabEnabled(const tab id,bool enable){
+       switch(id){
+       case SettingDialog::server:
+               server:
+               this->settingTab->setTabEnabled(0,enable);
+               break;
+       case SettingDialog::client:
+               this->settingTab->setTabEnabled(1,enable);
+               break;
+       case SettingDialog::misc:
+               this->settingTab->setTabEnabled(2,enable);
+               break;
+       default:
+               goto server;
+       }
+}
 
 void SettingDialog::setAddressAndPort(AddressAndPort pair){
        this->setIPAddress(pair.first);