mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
2d100b70af
Updated english translation git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7781 b45a01b8-16f6-495d-af2f-9b41ad6348cc
45 lines
1.2 KiB
C++
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);
|
|
}
|
|
}
|