Commit 46bfc6cb authored by Ming Rui Zhang's avatar Ming Rui Zhang Committed by Andreas Traczyk

settingswidget: hide unnecessary ui components for account manager

Change-Id: Ib1bf1331cb717c07a15dea5d3aa812d4e8af2c6d
parent 405158c3
......@@ -440,6 +440,11 @@ void SettingsWidget::updateAccountInfoDisplayed()
auto& accInfo = LRCInstance::getCurrentAccountInfo();
auto accConfig = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId());
bool showLocalAccountConfig = accConfig.managerUri.empty();
ui->passwdPushButton->setVisible(showLocalAccountConfig);
ui->btnExportAccount->setVisible(showLocalAccountConfig);
ui->linkDevPushButton->setVisible(showLocalAccountConfig);
ui->usernameSIP->setText(QString::fromStdString(accConfig.username));
ui->hostnameSIP->setText(QString::fromStdString(accConfig.hostname));
ui->passSIPlineEdit->setText(QString::fromStdString(accConfig.password));
......@@ -766,7 +771,9 @@ void SettingsWidget::updateAndShowDevicesSlot()
{
ui->settingsListWidget->clear();
ui->linkDevPushButton->show();
if (LRCInstance::getCurrAccConfig().managerUri.empty()) {
ui->linkDevPushButton->show();
}
auto deviceList = LRCInstance::getCurrentAccountInfo().deviceModel->getAllDevices();
......
......@@ -376,7 +376,7 @@
</size>
</property>
<property name="currentIndex">
<number>3</number>
<number>1</number>
</property>
<widget class="QWidget" name="generalSettings">
<property name="sizePolicy">
......@@ -1416,7 +1416,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>705</width>
<width>749</width>
<height>1387</height>
</rect>
</property>
......@@ -1913,7 +1913,7 @@
</layout>
</item>
<item>
<spacer name="verticalSpacer_30">
<spacer name="verticalSpacerBetweenlblRegisteredNameAndChangePassButton">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
......@@ -1975,7 +1975,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
<height>0</height>
</size>
</property>
</spacer>
......@@ -2016,7 +2016,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
<height>0</height>
</size>
</property>
</spacer>
......@@ -2085,7 +2085,7 @@
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_18">
<layout class="QVBoxLayout" name="linkedDeviceVerticalLayout">
<property name="topMargin">
<number>0</number>
</property>
......@@ -4255,12 +4255,6 @@
<header>iconbutton.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>PhotoboothWidget</class>
<extends>QWidget</extends>
<header>photoboothwidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>LevelMeter</class>
<extends>QWidget</extends>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment