void RemoteControlDialog::createDialogContent() { rc = GETSTELMODULE(RemoteControl); ui->setupUi(dialog); // Kinetic scrolling kineticScrollingList << ui->aboutTextBrowser; StelGui* gui= dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); if (gui) { enableKineticScrolling(gui->getFlagUseKineticScrolling()); connect(gui, SIGNAL(flagUseKineticScrollingChanged(bool)), this, SLOT(enableKineticScrolling(bool))); } connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate())); connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())); connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMovedTo(QPoint))); // TODO Fill other buttons connectCheckBox(ui->enabledCheckbox,"actionShow_Remote_Control"); connect(ui->enabledCheckbox, SIGNAL(clicked(bool)), this, SLOT(updateIPlabel(bool))); updateIPlabel(ui->enabledCheckbox->isChecked()); ui->activateOnStartCheckBox->setChecked(rc->getFlagAutoStart()); connect(ui->activateOnStartCheckBox, SIGNAL(toggled(bool)), rc, SLOT(setFlagAutoStart(bool))); connect(rc, SIGNAL(flagAutoStartChanged(bool)), ui->activateOnStartCheckBox, SLOT(setChecked(bool))); ui->passwordCheckBox->setChecked(rc->getFlagUsePassword()); connect(ui->passwordCheckBox, SIGNAL(toggled(bool)), rc, SLOT(setFlagUsePassword(bool))); connect(rc, SIGNAL(flagUsePasswordChanged(bool)), ui->passwordCheckBox, SLOT(setChecked(bool))); ui->passwordEdit->setEnabled(rc->getFlagUsePassword()); ui->passwordEdit->setText(rc->getPassword()); connect(rc,SIGNAL(flagUsePasswordChanged(bool)),ui->passwordEdit,SLOT(setEnabled(bool))); connect(ui->passwordEdit, SIGNAL(textChanged(QString)), rc, SLOT(setPassword(QString))); ui->portNumberSpinBox->setValue(rc->getPort()); connect(ui->portNumberSpinBox, SIGNAL(valueChanged(int)), rc, SLOT(setPort(int))); ui->restartPanel->setVisible(false); connect(rc, SIGNAL(flagUsePasswordChanged(bool)), this, SLOT(requiresRestart())); connect(rc, SIGNAL(passwordChanged(QString)), this, SLOT(requiresRestart())); connect(rc, SIGNAL(portChanged(int)), this, SLOT(requiresRestart())); connect(ui->resetButton, SIGNAL(clicked(bool)),this,SLOT(restart())); connect(ui->saveSettingsButton, SIGNAL(clicked()), rc, SLOT(saveSettings())); connect(ui->restoreDefaultsButton, SIGNAL(clicked()), rc, SLOT(restoreDefaultSettings())); setAboutHtml(); }