RetroShare/retroshare-gui/src/gui/settings/GroupFrameSettingsWidget.cpp
thunder2 2d100b70af Fixed some strings in settings window
Updated english translation

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7781 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2014-12-23 10:37:35 +00:00

45 lines
1.2 KiB
C++

#include "GroupFrameSettingsWidget.h"
#include "ui_GroupFrameSettingsWidget.h"
GroupFrameSettingsWidget::GroupFrameSettingsWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::GroupFrameSettingsWidget)
{
ui->setupUi(this);
mEnable = true;
}
GroupFrameSettingsWidget::~GroupFrameSettingsWidget()
{
delete ui;
}
void GroupFrameSettingsWidget::setOpenAllInNewTabText(const QString &text)
{
ui->openAllInNewTabCheckBox->setText(text);
}
void GroupFrameSettingsWidget::loadSettings(GroupFrameSettings::Type type)
{
GroupFrameSettings groupFrameSettings;
if (Settings->getGroupFrameSettings(type, groupFrameSettings)) {
ui->openAllInNewTabCheckBox->setChecked(groupFrameSettings.mOpenAllInNewTab);
ui->hideTabBarWithOneTabCheckBox->setChecked(groupFrameSettings.mHideTabBarWithOneTab);
} else {
hide();
mEnable = false;
}
}
void GroupFrameSettingsWidget::saveSettings(GroupFrameSettings::Type type)
{
if (mEnable) {
GroupFrameSettings groupFrameSettings;
groupFrameSettings.mOpenAllInNewTab = ui->openAllInNewTabCheckBox->isChecked();
groupFrameSettings.mHideTabBarWithOneTab = ui->hideTabBarWithOneTabCheckBox->isChecked();
Settings->setGroupFrameSettings(type, groupFrameSettings);
}
}