1
0
mirror of https://github.com/altlinux/admc.git synced 2025-01-08 01:18:25 +03:00

Add console widget ptr to inheritance widget initialization

This commit is contained in:
Semyon Knyazev 2024-02-09 20:49:31 +04:00
parent 30786c41d0
commit e6f5638db5
2 changed files with 5 additions and 10 deletions

View File

@ -34,9 +34,10 @@
//#include <QDebug>
InheritedPoliciesWidget::InheritedPoliciesWidget(QWidget *parent) :
InheritedPoliciesWidget::InheritedPoliciesWidget(ConsoleWidget *console_arg, QWidget *parent) :
QWidget(parent),
ui(new Ui::InheritedPoliciesWidget)
ui(new Ui::InheritedPoliciesWidget),
console(console_arg)
{
ui->setupUi(this);
@ -67,10 +68,6 @@ InheritedPoliciesWidget::~InheritedPoliciesWidget()
delete ui;
}
void InheritedPoliciesWidget::set_console(ConsoleWidget *console_arg) {
console = console_arg;
}
void InheritedPoliciesWidget::update(const QModelIndex &index)
{
model->removeRows(0, model->rowCount());

View File

@ -52,18 +52,16 @@ public:
RowRole_IsEnforced,
};
explicit InheritedPoliciesWidget(QWidget *parent = nullptr);
explicit InheritedPoliciesWidget(ConsoleWidget *console_arg, QWidget *parent = nullptr);
~InheritedPoliciesWidget();
void set_console(ConsoleWidget *console_arg);
void update(const QModelIndex &index);
void hide_not_enforced_inherited_links(bool hide);
private:
QStandardItemModel *model;
ConsoleWidget *console;
Ui::InheritedPoliciesWidget *ui;
ConsoleWidget *console;
QModelIndex selected_scope_index;
void add_enabled_policy_items(const QModelIndex &index, bool inheritance_blocked = false);