|
|
@ -22,14 +22,14 @@ SettingsForm::SettingsForm() |
|
|
|
id.setTextInteractionFlags(Qt::TextSelectableByMouse); |
|
|
|
id.setTextInteractionFlags(Qt::TextSelectableByMouse); |
|
|
|
id.setReadOnly(true); |
|
|
|
id.setReadOnly(true); |
|
|
|
id.setFrameStyle(QFrame::NoFrame); |
|
|
|
id.setFrameStyle(QFrame::NoFrame); |
|
|
|
id.setMinimumHeight(10); |
|
|
|
id.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); |
|
|
|
id.setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum); |
|
|
|
id.setFixedHeight(id.document()->size().height()); |
|
|
|
id.setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents); |
|
|
|
|
|
|
|
id.setMaximumHeight(40); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
videoTest.setText(tr("Test video","Text on a button to test the video/webcam")); |
|
|
|
videoTest.setText(tr("Test video","Text on a button to test the video/webcam")); |
|
|
|
enableIPv6.setText(tr("Enable IPv6 (recommended)","Text on a checkbox to enable IPv6")); |
|
|
|
enableIPv6.setText(tr("Enable IPv6 (recommended)","Text on a checkbox to enable IPv6")); |
|
|
|
enableIPv6.setChecked(Settings::getInstance().getEnableIPv6()); |
|
|
|
enableIPv6.setChecked(Settings::getInstance().getEnableIPv6()); |
|
|
|
|
|
|
|
useTranslations.setText(tr("Use translations","Text on a checkbox to enable translations")); |
|
|
|
|
|
|
|
useTranslations.setChecked(Settings::getInstance().getUseTranslations()); |
|
|
|
|
|
|
|
|
|
|
|
main->setLayout(&layout); |
|
|
|
main->setLayout(&layout); |
|
|
|
layout.addWidget(&nameLabel); |
|
|
|
layout.addWidget(&nameLabel); |
|
|
@ -40,6 +40,7 @@ SettingsForm::SettingsForm() |
|
|
|
layout.addWidget(&id); |
|
|
|
layout.addWidget(&id); |
|
|
|
layout.addWidget(&videoTest); |
|
|
|
layout.addWidget(&videoTest); |
|
|
|
layout.addWidget(&enableIPv6); |
|
|
|
layout.addWidget(&enableIPv6); |
|
|
|
|
|
|
|
layout.addWidget(&useTranslations); |
|
|
|
layout.addStretch(); |
|
|
|
layout.addStretch(); |
|
|
|
|
|
|
|
|
|
|
|
head->setLayout(&headLayout); |
|
|
|
head->setLayout(&headLayout); |
|
|
@ -84,3 +85,8 @@ void SettingsForm::copyIdClicked() |
|
|
|
id.selectAll();; |
|
|
|
id.selectAll();; |
|
|
|
QApplication::clipboard()->setText(id.toPlainText()); |
|
|
|
QApplication::clipboard()->setText(id.toPlainText()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void SettingsForm::onUseTranslationUpdated() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Settings::getInstance().setUseTranslations(useTranslations.isChecked()); |
|
|
|
|
|
|
|
} |
|
|
|