mirror of
https://github.com/altlinux/admc.git
synced 2025-02-01 13:47:06 +03:00
move static actions from MainWindow
create Settings store some static actions in Settings create entry context menu actions in EntryWidget do context menu interaction through request slots in MainWindow
This commit is contained in:
parent
35052e91c8
commit
9ba1a844ad
@ -63,6 +63,7 @@ set(ADTOOL_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/members_model.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/members_widget.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/entry_model.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/settings.cpp
|
||||
)
|
||||
|
||||
add_definitions(${QT5_DEFINITIONS})
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "ad_proxy_model.h"
|
||||
#include "ad_model.h"
|
||||
#include "ad_interface.h"
|
||||
#include "main_window.h"
|
||||
#include "settings.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
@ -30,7 +30,7 @@ AdProxyModel::AdProxyModel(AdModel *model, QObject *parent)
|
||||
setSourceModel(model);
|
||||
|
||||
connect(
|
||||
MainWindow::action_advanced_view, &QAction::triggered,
|
||||
SETTINGS()->toggle_advanced_view, &QAction::triggered,
|
||||
this, &AdProxyModel::on_advanced_view_toggled);
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ bool AdProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source_pa
|
||||
|
||||
// Hide advanced view only entries if advanced view is OFF
|
||||
const bool advanced_view_only = index.data(AdModel::Roles::AdvancedViewOnly).toBool();
|
||||
const bool advanced_view_is_on = MainWindow::action_advanced_view->isChecked();
|
||||
const bool advanced_view_is_on = SETTINGS()->toggle_advanced_view->isChecked();
|
||||
if (advanced_view_only && !advanced_view_is_on) {
|
||||
return false;
|
||||
}
|
||||
|
@ -19,13 +19,19 @@
|
||||
|
||||
#include "admc.h"
|
||||
#include "ad_interface.h"
|
||||
#include "settings.h"
|
||||
|
||||
ADMC::ADMC(int& argc, char** argv)
|
||||
: QApplication(argc, argv)
|
||||
{
|
||||
m_ad_interface = new AdInterface(this);
|
||||
m_settings = new Settings(this);
|
||||
}
|
||||
|
||||
AdInterface *ADMC::ad_interface() {
|
||||
return m_ad_interface;
|
||||
}
|
||||
|
||||
const Settings *ADMC::settings() {
|
||||
return m_settings;
|
||||
}
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <QApplication>
|
||||
|
||||
class AdInterface;
|
||||
class Settings;
|
||||
|
||||
class ADMC final: public QApplication {
|
||||
Q_OBJECT
|
||||
@ -31,9 +32,11 @@ public:
|
||||
ADMC(int& argc, char** argv);
|
||||
|
||||
AdInterface* ad_interface();
|
||||
const Settings* settings();
|
||||
|
||||
private:
|
||||
AdInterface* m_ad_interface = nullptr;
|
||||
Settings* m_settings = nullptr;
|
||||
};
|
||||
|
||||
#endif /* __ADMC_APPLICATION_H */
|
||||
|
@ -25,9 +25,11 @@
|
||||
#include <QTreeView>
|
||||
#include <QStandardItemModel>
|
||||
|
||||
DetailsWidget::DetailsWidget()
|
||||
DetailsWidget::DetailsWidget(MembersWidget *members_widget_)
|
||||
: QTabWidget()
|
||||
{
|
||||
members_widget = members_widget_;
|
||||
|
||||
attributes_model = new AttributesModel(this);
|
||||
|
||||
attributes_view = new QTreeView();
|
||||
@ -36,8 +38,6 @@ DetailsWidget::DetailsWidget()
|
||||
attributes_view->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
attributes_view->setModel(attributes_model);
|
||||
|
||||
members_widget = MembersWidget::make();
|
||||
|
||||
connect(
|
||||
AD(), &AdInterface::delete_entry_complete,
|
||||
this, &DetailsWidget::on_delete_entry_complete);
|
||||
|
@ -34,7 +34,7 @@ class DetailsWidget final : public QTabWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DetailsWidget();
|
||||
DetailsWidget(MembersWidget *members_widget_);
|
||||
|
||||
void change_target(const QString &dn);
|
||||
|
||||
|
@ -18,9 +18,9 @@
|
||||
*/
|
||||
|
||||
#include "entry_widget.h"
|
||||
#include "main_window.h"
|
||||
#include "ad_interface.h"
|
||||
#include "entry_model.h"
|
||||
#include "settings.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QItemSelection>
|
||||
@ -60,8 +60,8 @@ EntryWidget::EntryWidget(EntryModel *model)
|
||||
update_column_visibility();
|
||||
|
||||
connect(
|
||||
MainWindow::action_toggle_dn, &QAction::triggered,
|
||||
this, &EntryWidget::on_action_toggle_dn);
|
||||
SETTINGS()->toggle_show_dn_column, &QAction::triggered,
|
||||
this, &EntryWidget::on_toggle_show_dn_column);
|
||||
|
||||
connect(
|
||||
view, &QWidget::customContextMenuRequested,
|
||||
@ -84,26 +84,43 @@ void EntryWidget::on_context_menu_requested(const QPoint &pos) {
|
||||
return;
|
||||
}
|
||||
|
||||
const QString dn = entry_model->get_dn_from_index(index);
|
||||
|
||||
QMenu menu;
|
||||
|
||||
menu.addAction(MainWindow::action_details);
|
||||
menu.addAction(MainWindow::action_delete_entry);
|
||||
menu.addAction(MainWindow::action_rename);
|
||||
QAction *action_to_show_menu_at = menu.addAction("Details", [this, dn]() {
|
||||
emit request_details(dn);
|
||||
});
|
||||
menu.addAction("Delete", [this, dn]() {
|
||||
emit request_delete(dn);
|
||||
});
|
||||
menu.addAction("Rename", [this, dn]() {
|
||||
emit request_rename(dn);
|
||||
});
|
||||
|
||||
QMenu *submenu_new = menu.addMenu("New");
|
||||
submenu_new->addAction(MainWindow::action_new_user);
|
||||
submenu_new->addAction(MainWindow::action_new_computer);
|
||||
submenu_new->addAction(MainWindow::action_new_group);
|
||||
submenu_new->addAction(MainWindow::action_new_ou);
|
||||
submenu_new->addAction("New User", [this, dn]() {
|
||||
emit request_new_user(dn);
|
||||
});
|
||||
submenu_new->addAction("New Computer", [this, dn]() {
|
||||
emit request_new_computer(dn);
|
||||
});
|
||||
submenu_new->addAction("New Group", [this, dn]() {
|
||||
emit request_new_group(dn);
|
||||
});
|
||||
submenu_new->addAction("New OU", [this, dn]() {
|
||||
emit request_new_ou(dn);
|
||||
});
|
||||
|
||||
const QString dn = entry_model->get_dn_from_index(index);
|
||||
const bool is_policy = AD()->is_policy(dn);
|
||||
if (is_policy) {
|
||||
menu.addAction(MainWindow::action_edit_policy);
|
||||
submenu_new->addAction("Edit Policy", [this, dn]() {
|
||||
emit request_edit_policy(dn);
|
||||
});
|
||||
}
|
||||
|
||||
QPoint global_pos = view->mapToGlobal(pos);
|
||||
menu.exec(global_pos, MainWindow::action_details);
|
||||
menu.exec(global_pos, action_to_show_menu_at);
|
||||
}
|
||||
|
||||
QString EntryWidget::get_selected_dn() {
|
||||
@ -124,7 +141,7 @@ QString EntryWidget::get_selected_dn() {
|
||||
return "";
|
||||
}
|
||||
|
||||
void EntryWidget::on_action_toggle_dn(bool checked) {
|
||||
void EntryWidget::on_toggle_show_dn_column(bool checked) {
|
||||
const bool dn_column_hidden = !checked;
|
||||
column_hidden[entry_model->dn_column] = dn_column_hidden;
|
||||
|
||||
|
@ -40,9 +40,17 @@ public:
|
||||
|
||||
signals:
|
||||
void clicked_dn(const QString &dn);
|
||||
void request_details(const QString &dn);
|
||||
void request_rename(const QString &dn);
|
||||
void request_delete(const QString &dn);
|
||||
void request_new_user(const QString &dn);
|
||||
void request_new_computer(const QString &dn);
|
||||
void request_new_group(const QString &dn);
|
||||
void request_new_ou(const QString &dn);
|
||||
void request_edit_policy(const QString &dn);
|
||||
|
||||
private slots:
|
||||
void on_action_toggle_dn(bool checked);
|
||||
void on_toggle_show_dn_column(bool checked);
|
||||
void on_context_menu_requested(const QPoint &pos);
|
||||
void on_view_clicked(const QModelIndex &index);
|
||||
|
||||
|
@ -22,11 +22,14 @@
|
||||
#include "main_window.h"
|
||||
#include "containers_widget.h"
|
||||
#include "contents_widget.h"
|
||||
#include "members_widget.h"
|
||||
#include "details_widget.h"
|
||||
#include "ad_model.h"
|
||||
#include "attributes_model.h"
|
||||
#include "create_entry_dialog.h"
|
||||
#include "status_bar.h"
|
||||
#include "entry_widget.h"
|
||||
#include "settings.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QString>
|
||||
@ -42,17 +45,6 @@
|
||||
#include <QInputDialog>
|
||||
#include <QMessageBox>
|
||||
|
||||
QAction *MainWindow::action_advanced_view = new QAction("Advanced view");
|
||||
QAction *MainWindow::action_toggle_dn = new QAction("Show DN");
|
||||
QAction *MainWindow::action_details = new QAction("Details");
|
||||
QAction *MainWindow::action_delete_entry = new QAction("Delete");
|
||||
QAction *MainWindow::action_new_user = new QAction("New User");
|
||||
QAction *MainWindow::action_new_computer = new QAction("New Computer");
|
||||
QAction *MainWindow::action_new_group = new QAction("New Group");
|
||||
QAction *MainWindow::action_new_ou = new QAction("New OU");
|
||||
QAction *MainWindow::action_edit_policy = new QAction("Edit policy");
|
||||
QAction *MainWindow::action_rename = new QAction("Rename");
|
||||
|
||||
MainWindow::MainWindow(const bool auto_login)
|
||||
: QMainWindow()
|
||||
{
|
||||
@ -79,15 +71,9 @@ MainWindow::MainWindow(const bool auto_login)
|
||||
menubar_file->addAction(action_login);
|
||||
menubar_file->addAction(action_exit);
|
||||
|
||||
const auto menubar_new = menubar->addMenu("New");
|
||||
menubar_new->addAction(action_new_user);
|
||||
menubar_new->addAction(action_new_computer);
|
||||
menubar_new->addAction(action_new_group);
|
||||
menubar_new->addAction(action_new_ou);
|
||||
|
||||
const auto menubar_view = menubar->addMenu("View");
|
||||
menubar_view->addAction(action_advanced_view);
|
||||
menubar_view->addAction(action_toggle_dn);
|
||||
menubar_view->addAction(SETTINGS()->toggle_advanced_view);
|
||||
menubar_view->addAction(SETTINGS()->toggle_show_dn_column);
|
||||
|
||||
const auto menubar_preferences = menubar->addMenu("Preferences");
|
||||
{
|
||||
@ -108,7 +94,9 @@ MainWindow::MainWindow(const bool auto_login)
|
||||
|
||||
containers_widget = new ContainersWidget(ad_model);
|
||||
contents_widget = new ContentsWidget(ad_model);
|
||||
details_widget = new DetailsWidget();
|
||||
|
||||
MembersWidget *members_widget = MembersWidget::make();
|
||||
details_widget = new DetailsWidget(members_widget);
|
||||
|
||||
splitter->addWidget(containers_widget);
|
||||
splitter->addWidget(contents_widget);
|
||||
@ -120,37 +108,6 @@ MainWindow::MainWindow(const bool auto_login)
|
||||
splitter->setStretchFactor(1, 2);
|
||||
splitter->setStretchFactor(2, 2);
|
||||
|
||||
//
|
||||
// Setup actions
|
||||
//
|
||||
action_advanced_view->setCheckable(true);
|
||||
action_toggle_dn->setCheckable(true);
|
||||
|
||||
connect(
|
||||
action_details, &QAction::triggered,
|
||||
this, &MainWindow::on_action_details);
|
||||
connect(
|
||||
action_delete_entry, &QAction::triggered,
|
||||
this, &MainWindow::on_action_delete_entry);
|
||||
connect(
|
||||
action_new_user, &QAction::triggered,
|
||||
this, &MainWindow::on_action_new_user);
|
||||
connect(
|
||||
action_new_computer, &QAction::triggered,
|
||||
this, &MainWindow::on_action_new_computer);
|
||||
connect(
|
||||
action_new_group, &QAction::triggered,
|
||||
this, &MainWindow::on_action_new_group);
|
||||
connect(
|
||||
action_new_ou, &QAction::triggered,
|
||||
this, &MainWindow::on_action_new_ou);
|
||||
connect(
|
||||
action_rename, &QAction::triggered,
|
||||
this, &MainWindow::on_action_rename);
|
||||
|
||||
connect(
|
||||
action_edit_policy, &QAction::triggered,
|
||||
this, &MainWindow::on_action_edit_policy);
|
||||
connect(
|
||||
AD(), &AdInterface::ad_interface_login_complete,
|
||||
this, &MainWindow::on_ad_interface_login_complete);
|
||||
@ -175,6 +132,10 @@ MainWindow::MainWindow(const bool auto_login)
|
||||
action_exit, &QAction::triggered,
|
||||
this, &MainWindow::on_action_exit);
|
||||
|
||||
connect_entry_widget(*containers_widget);
|
||||
connect_entry_widget(*contents_widget);
|
||||
connect_entry_widget(*members_widget);
|
||||
|
||||
// Disable actions until login complete
|
||||
set_enabled_for_ad_actions(false);
|
||||
|
||||
@ -184,15 +145,9 @@ MainWindow::MainWindow(const bool auto_login)
|
||||
}
|
||||
|
||||
void MainWindow::set_enabled_for_ad_actions(bool enabled) {
|
||||
// TODO: redo this for new action locations
|
||||
QList<QAction *> ad_actions = {
|
||||
action_advanced_view,
|
||||
action_details,
|
||||
action_delete_entry,
|
||||
action_new_user,
|
||||
action_new_computer,
|
||||
action_new_group,
|
||||
action_new_ou,
|
||||
action_edit_policy,
|
||||
|
||||
};
|
||||
for (auto a : ad_actions) {
|
||||
a->setEnabled(enabled);
|
||||
@ -216,8 +171,7 @@ void MainWindow::on_action_exit() {
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_action_details() {
|
||||
QString dn = EntryWidget::get_selected_dn();
|
||||
void MainWindow::on_request_details(const QString &dn) {
|
||||
details_widget->change_target(dn);
|
||||
}
|
||||
|
||||
@ -249,9 +203,34 @@ bool MainWindow::confirmation_dialog(const QString &text) {
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_action_delete_entry() {
|
||||
const QString dn = EntryWidget::get_selected_dn();
|
||||
void MainWindow::connect_entry_widget(const EntryWidget &widget) {
|
||||
connect(
|
||||
&widget, &EntryWidget::request_details,
|
||||
this, &MainWindow::on_request_details);
|
||||
connect(
|
||||
&widget, &EntryWidget::request_rename,
|
||||
this, &MainWindow::on_request_rename);
|
||||
connect(
|
||||
&widget, &EntryWidget::request_delete,
|
||||
this, &MainWindow::on_request_delete);
|
||||
connect(
|
||||
&widget, &EntryWidget::request_new_user,
|
||||
this, &MainWindow::on_request_new_user);
|
||||
connect(
|
||||
&widget, &EntryWidget::request_new_computer,
|
||||
this, &MainWindow::on_request_new_computer);
|
||||
connect(
|
||||
&widget, &EntryWidget::request_new_group,
|
||||
this, &MainWindow::on_request_new_group);
|
||||
connect(
|
||||
&widget, &EntryWidget::request_new_ou,
|
||||
this, &MainWindow::on_request_new_ou);
|
||||
connect(
|
||||
&widget, &EntryWidget::request_edit_policy,
|
||||
this, &MainWindow::on_request_edit_policy);
|
||||
}
|
||||
|
||||
void MainWindow::on_request_delete(const QString &dn) {
|
||||
const QString name = AD()->get_attribute(dn, "name");
|
||||
const QString text = QString("Are you sure you want to delete \"%1\"?").arg(name);
|
||||
const bool confirmed = confirmation_dialog(text);
|
||||
@ -261,33 +240,27 @@ void MainWindow::on_action_delete_entry() {
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_action_new_entry_generic(NewEntryType type) {
|
||||
QString dn = EntryWidget::get_selected_dn();
|
||||
|
||||
if (dn != "") {
|
||||
create_entry_dialog(type, dn);
|
||||
}
|
||||
void MainWindow::on_request_new_entry_generic(const QString &dn, NewEntryType type) {
|
||||
create_entry_dialog(type, dn);
|
||||
}
|
||||
|
||||
void MainWindow::on_action_new_user() {
|
||||
on_action_new_entry_generic(NewEntryType::User);
|
||||
void MainWindow::on_request_new_user(const QString &dn) {
|
||||
on_request_new_entry_generic(dn, NewEntryType::User);
|
||||
}
|
||||
|
||||
void MainWindow::on_action_new_computer() {
|
||||
on_action_new_entry_generic(NewEntryType::Computer);
|
||||
void MainWindow::on_request_new_computer(const QString &dn) {
|
||||
on_request_new_entry_generic(dn, NewEntryType::Computer);
|
||||
}
|
||||
|
||||
void MainWindow::on_action_new_group() {
|
||||
on_action_new_entry_generic(NewEntryType::Group);
|
||||
void MainWindow::on_request_new_group(const QString &dn) {
|
||||
on_request_new_entry_generic(dn, NewEntryType::Group);
|
||||
}
|
||||
|
||||
void MainWindow::on_action_new_ou() {
|
||||
on_action_new_entry_generic(NewEntryType::OU);
|
||||
void MainWindow::on_request_new_ou(const QString &dn) {
|
||||
on_request_new_entry_generic(dn, NewEntryType::OU);
|
||||
}
|
||||
|
||||
void MainWindow::on_action_rename() {
|
||||
QString dn = EntryWidget::get_selected_dn();
|
||||
|
||||
void MainWindow::on_request_rename(const QString &dn) {
|
||||
// Get new name from input box
|
||||
QString dialog_title = "Rename";
|
||||
QString input_label = "New name:";
|
||||
@ -299,7 +272,7 @@ void MainWindow::on_action_rename() {
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_action_edit_policy() {
|
||||
void MainWindow::on_request_edit_policy(const QString &dn) {
|
||||
// Start policy edit process
|
||||
const auto process = new QProcess(this);
|
||||
|
||||
@ -308,7 +281,6 @@ void MainWindow::on_action_edit_policy() {
|
||||
|
||||
const char *uri = "ldap://dc0.domain.alt";
|
||||
|
||||
const QString dn = EntryWidget::get_selected_dn();
|
||||
const QString path = AD()->get_attribute(dn, "gPCFileSysPath");
|
||||
|
||||
QStringList args;
|
||||
|
@ -30,6 +30,7 @@ class AdModel;
|
||||
class ContainersWidget;
|
||||
class ContentsWidget;
|
||||
class DetailsWidget;
|
||||
class EntryWidget;
|
||||
|
||||
class MainWindow final : public QMainWindow {
|
||||
Q_OBJECT
|
||||
@ -37,37 +38,27 @@ Q_OBJECT
|
||||
public:
|
||||
explicit MainWindow(const bool auto_login);
|
||||
|
||||
static QAction *action_advanced_view;
|
||||
static QAction *action_toggle_dn;
|
||||
static QAction *action_details;
|
||||
static QAction *action_delete_entry;
|
||||
static QAction *action_new_user;
|
||||
static QAction *action_new_computer;
|
||||
static QAction *action_new_group;
|
||||
static QAction *action_new_ou;
|
||||
static QAction *action_edit_policy;
|
||||
static QAction *action_rename;
|
||||
|
||||
private slots:
|
||||
void on_action_details();
|
||||
void on_action_delete_entry();
|
||||
void on_action_new_user();
|
||||
void on_action_new_computer();
|
||||
void on_action_new_group();
|
||||
void on_action_new_ou();
|
||||
void on_action_rename();
|
||||
void on_request_details(const QString &dn);
|
||||
void on_request_rename(const QString &dn);
|
||||
void on_request_delete(const QString &dn);
|
||||
void on_request_new_user(const QString &dn);
|
||||
void on_request_new_computer(const QString &dn);
|
||||
void on_request_new_group(const QString &dn);
|
||||
void on_request_new_ou(const QString &dn);
|
||||
void on_request_edit_policy(const QString &dn);
|
||||
void on_containers_clicked_dn(const QString &dn);
|
||||
void on_contents_clicked_dn(const QString &dn);
|
||||
void on_action_edit_policy();
|
||||
void on_action_login();
|
||||
void on_action_exit();
|
||||
void on_ad_interface_login_complete(const QString &base, const QString &head);
|
||||
|
||||
private:
|
||||
QString get_selected_dn() const;
|
||||
void on_action_new_entry_generic(NewEntryType type);
|
||||
void on_request_new_entry_generic(const QString &dn, NewEntryType type);
|
||||
void set_enabled_for_ad_actions(bool enabled);
|
||||
bool confirmation_dialog(const QString &text);
|
||||
void connect_entry_widget(const EntryWidget &widget);
|
||||
|
||||
AdModel *ad_model = nullptr;
|
||||
ContainersWidget *containers_widget = nullptr;
|
||||
|
41
src/settings.cpp
Normal file
41
src/settings.cpp
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* ADMC - AD Management Center
|
||||
*
|
||||
* Copyright (C) 2020 BaseALT Ltd.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "settings.h"
|
||||
#include "admc.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
Settings::Settings(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
toggle_advanced_view = new QAction("Advanced View");
|
||||
toggle_advanced_view->setCheckable(true);
|
||||
toggle_advanced_view->setChecked(false);
|
||||
|
||||
toggle_show_dn_column = new QAction("Show DN column");
|
||||
toggle_show_dn_column->setCheckable(true);
|
||||
toggle_show_dn_column->setChecked(false);
|
||||
}
|
||||
|
||||
const Settings *SETTINGS() {
|
||||
ADMC *app = qobject_cast<ADMC *>(qApp);
|
||||
const Settings *settings = app->settings();
|
||||
return settings;
|
||||
}
|
40
src/settings.h
Normal file
40
src/settings.h
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* ADMC - AD Management Center
|
||||
*
|
||||
* Copyright (C) 2020 BaseALT Ltd.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef SETTINGS_H
|
||||
#define SETTINGS_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class QAction;
|
||||
|
||||
class Settings final : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Settings(QObject *parent);
|
||||
|
||||
QAction *toggle_advanced_view = nullptr;
|
||||
QAction *toggle_show_dn_column = nullptr;
|
||||
|
||||
};
|
||||
|
||||
const Settings *SETTINGS();
|
||||
|
||||
#endif /* SETTINGS_H */
|
Loading…
x
Reference in New Issue
Block a user