mirror of
https://github.com/tnodir/fort
synced 2024-11-15 11:25:08 +00:00
UI: Fix connections.
This commit is contained in:
parent
cb51a7c94c
commit
e4f38a9d91
@ -26,6 +26,14 @@ AddressesPage::AddressesPage(OptionsController *ctrl,
|
||||
setupUi();
|
||||
}
|
||||
|
||||
void AddressesPage::setAddressGroup(AddressGroup *v)
|
||||
{
|
||||
if (m_addressGroup != v) {
|
||||
m_addressGroup = v;
|
||||
emit addressGroupChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void AddressesPage::onRetranslateUi()
|
||||
{
|
||||
m_tabBar->setTabText(0, tr("Internet Addresses"));
|
||||
@ -176,11 +184,11 @@ void AddressesPage::refreshGroup()
|
||||
|
||||
void AddressesPage::setupAddressGroup()
|
||||
{
|
||||
connect(this, &AddressesPage::addressGroupChanged, this, &AddressesPage::refreshGroup);
|
||||
|
||||
const auto refreshAddressGroup = [&] {
|
||||
const int tabIndex = m_tabBar->currentIndex();
|
||||
setAddressGroup(addressGroupByIndex(tabIndex));
|
||||
|
||||
refreshGroup();
|
||||
};
|
||||
|
||||
refreshAddressGroup();
|
||||
|
@ -15,7 +15,10 @@ public:
|
||||
QWidget *parent = nullptr);
|
||||
|
||||
AddressGroup *addressGroup() const { return m_addressGroup; }
|
||||
void setAddressGroup(AddressGroup *v) { m_addressGroup = v; }
|
||||
void setAddressGroup(AddressGroup *v);
|
||||
|
||||
signals:
|
||||
void addressGroupChanged();
|
||||
|
||||
protected slots:
|
||||
void onRetranslateUi() override;
|
||||
|
@ -36,6 +36,14 @@ ApplicationsPage::ApplicationsPage(OptionsController *ctrl,
|
||||
setupUi();
|
||||
}
|
||||
|
||||
void ApplicationsPage::setAppGroup(AppGroup *v)
|
||||
{
|
||||
if (m_appGroup != v) {
|
||||
m_appGroup = v;
|
||||
emit appGroupChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void ApplicationsPage::onRetranslateUi()
|
||||
{
|
||||
m_editGroupName->setPlaceholderText(tr("Group Name"));
|
||||
@ -438,11 +446,11 @@ void ApplicationsPage::refreshGroup()
|
||||
|
||||
void ApplicationsPage::setupAppGroup()
|
||||
{
|
||||
connect(this, &ApplicationsPage::appGroupChanged, this, &ApplicationsPage::refreshGroup);
|
||||
|
||||
const auto refreshAppGroup = [&] {
|
||||
const int tabIndex = m_tabBar->currentIndex();
|
||||
setAppGroup(appGroupByIndex(tabIndex));
|
||||
|
||||
refreshGroup();
|
||||
};
|
||||
|
||||
refreshAppGroup();
|
||||
|
@ -17,7 +17,10 @@ public:
|
||||
QWidget *parent = nullptr);
|
||||
|
||||
AppGroup *appGroup() const { return m_appGroup; }
|
||||
void setAppGroup(AppGroup *v) { m_appGroup = v; }
|
||||
void setAppGroup(AppGroup *v);
|
||||
|
||||
signals:
|
||||
void appGroupChanged();
|
||||
|
||||
protected slots:
|
||||
void onRetranslateUi() override;
|
||||
|
Loading…
Reference in New Issue
Block a user