mirror of
https://github.com/altlinux/admc.git
synced 2025-03-23 18:50:26 +03:00
rename details to properties
This commit is contained in:
parent
aa9d922f6e
commit
a6997a326e
@ -4,7 +4,8 @@ CHANGELOG
|
||||
-----------------------------------------------------------------------
|
||||
VERSION 0.4.0 (In progress)
|
||||
-----------------------------------------------------------------------
|
||||
- Added more tabs to Details dialog
|
||||
- Renamed Details dialog to Properties dialog
|
||||
- Added more tabs to Properties dialog
|
||||
- general
|
||||
- object
|
||||
- account
|
||||
@ -16,13 +17,13 @@ CHANGELOG
|
||||
- member of
|
||||
- group policy
|
||||
- links to
|
||||
- Added traditional way to display Details dialog as a dialog. Docked mode is still available via options.
|
||||
- Changed details dialog to display tab titles in a list.
|
||||
- Added traditional way to display Properties dialog as a dialog. Docked mode is still available via options.
|
||||
- Changed Properties dialog to display tab titles in a list.
|
||||
- Improved object menu
|
||||
- added most of the actions
|
||||
- added ability to perform actions on multiple objects
|
||||
- duplicated object menu to menubar for accesibility
|
||||
- Improved attributes tab in Details dialog
|
||||
- Improved attributes tab in Properties dialog
|
||||
- filtering
|
||||
- attribute type column
|
||||
- specialized editors for all attribute types
|
||||
|
@ -25,7 +25,7 @@ add_executable(admc
|
||||
ad_config.cpp
|
||||
ad_utils.cpp
|
||||
ad_object.cpp
|
||||
details_dialog.cpp
|
||||
properties_dialog.cpp
|
||||
main_window.cpp
|
||||
status.cpp
|
||||
object_model.cpp
|
||||
@ -59,7 +59,7 @@ add_executable(admc
|
||||
filter_widget/select_classes_widget.cpp
|
||||
filter_widget/filter_builder.cpp
|
||||
|
||||
tabs/details_tab.cpp
|
||||
tabs/properties_tab.cpp
|
||||
tabs/general_tab.cpp
|
||||
tabs/object_tab.cpp
|
||||
tabs/attributes_tab.cpp
|
||||
|
@ -1100,7 +1100,7 @@ bool AdInterface::create_gpo(const QString &display_name) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO: security descriptor. Samba does this: get nTSecurityDescriptor attribute from the gpo object as raw bytes, then sets the security descriptor of the sysvol dir to that value. Currently not doing that, so security descriptor of sysvol dir is the default one, which is ... bad? Not sure. Problem is, libsmbclient only provides a way to set security descriptor using key/value strings, not the raw bytes basically. So to do it that way would need to decode object security descriptor. Samba source has that implemented internally but not exposed as a usable lib. Probably SHOULD set security descriptor because who knows what the default is, what if it's just randomly modifiable by any user. Also, the security descriptor functionality will be needed for "Security" details tab in ADMC at some point. So should either implement all of that stuff (it's a lot...) or hopefully find some lib to use (unlikely). On Windows you would just use Microsoft's lib.
|
||||
// TODO: security descriptor. Samba does this: get nTSecurityDescriptor attribute from the gpo object as raw bytes, then sets the security descriptor of the sysvol dir to that value. Currently not doing that, so security descriptor of sysvol dir is the default one, which is ... bad? Not sure. Problem is, libsmbclient only provides a way to set security descriptor using key/value strings, not the raw bytes basically. So to do it that way would need to decode object security descriptor. Samba source has that implemented internally but not exposed as a usable lib. Probably SHOULD set security descriptor because who knows what the default is, what if it's just randomly modifiable by any user. Also, the security descriptor functionality will be needed for "Security" tab in ADMC at some point. So should either implement all of that stuff (it's a lot...) or hopefully find some lib to use (unlikely). On Windows you would just use Microsoft's lib.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "object_menu.h"
|
||||
#include "utils.h"
|
||||
#include "ad_utils.h"
|
||||
#include "details_dialog.h"
|
||||
#include "properties_dialog.h"
|
||||
#include "ad_config.h"
|
||||
#include "ad_interface.h"
|
||||
#include "ad_object.h"
|
||||
@ -724,6 +724,6 @@ void Console::on_result_item_double_clicked(const QModelIndex &index)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
DetailsDialog::open_for_target(dn);
|
||||
PropertiesDialog::open_for_target(dn);
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "edits/attribute_edit.h"
|
||||
#include "tabs/details_tab.h"
|
||||
#include "tabs/properties_tab.h"
|
||||
|
||||
AttributeEdit::AttributeEdit(QList<AttributeEdit *> *edits_out, QObject *parent) {
|
||||
if (edits_out != nullptr) {
|
||||
@ -90,10 +90,10 @@ void edits_load(QList<AttributeEdit *> edits, const AdObject &object) {
|
||||
}
|
||||
}
|
||||
|
||||
void edits_connect_to_tab(QList<AttributeEdit *> edits, DetailsTab *tab) {
|
||||
void edits_connect_to_tab(QList<AttributeEdit *> edits, PropertiesTab *tab) {
|
||||
for (auto edit : edits) {
|
||||
QObject::connect(
|
||||
edit, &AttributeEdit::edited,
|
||||
tab, &DetailsTab::on_edit_edited);
|
||||
tab, &PropertiesTab::on_edit_edited);
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
||||
* are used to represent different data types.
|
||||
*/
|
||||
|
||||
class DetailsTab;
|
||||
class PropertiesTab;
|
||||
class QFormLayout;
|
||||
class AdObject;
|
||||
|
||||
@ -88,7 +88,7 @@ public:\
|
||||
|
||||
|
||||
// Helper f-ns that iterate over edit lists for you
|
||||
void edits_connect_to_tab(QList<AttributeEdit *> edits, DetailsTab *tab);
|
||||
void edits_connect_to_tab(QList<AttributeEdit *> edits, PropertiesTab *tab);
|
||||
void edits_add_to_layout(QList<AttributeEdit *> edits, QFormLayout *layout);
|
||||
|
||||
// Verify all edits that were modified. Verify process will
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "ad_interface.h"
|
||||
#include "ad_utils.h"
|
||||
#include "ad_config.h"
|
||||
#include "details_dialog.h"
|
||||
#include "properties_dialog.h"
|
||||
#include "select_dialog.h"
|
||||
#include "ad_object.h"
|
||||
#include <QLineEdit>
|
||||
@ -35,15 +35,15 @@ ManagerEdit::ManagerEdit(QList<AttributeEdit *> *edits_out, QObject *parent)
|
||||
edit = new QLineEdit();
|
||||
|
||||
change_button = new QPushButton(tr("Change"));
|
||||
details_button = new QPushButton(tr("Details"));
|
||||
properties_button = new QPushButton(tr("Properties"));
|
||||
clear_button = new QPushButton(tr("Clear"));
|
||||
|
||||
connect(
|
||||
change_button, &QPushButton::clicked,
|
||||
this, &ManagerEdit::on_change);
|
||||
connect(
|
||||
details_button, &QPushButton::clicked,
|
||||
this, &ManagerEdit::on_details);
|
||||
properties_button, &QPushButton::clicked,
|
||||
this, &ManagerEdit::on_properties);
|
||||
connect(
|
||||
clear_button, &QPushButton::clicked,
|
||||
this, &ManagerEdit::on_clear);
|
||||
@ -62,7 +62,7 @@ void ManagerEdit::set_read_only(const bool read_only) {
|
||||
void ManagerEdit::add_to_layout(QFormLayout *layout) {
|
||||
auto buttons_layout = new QHBoxLayout();
|
||||
buttons_layout->addWidget(change_button);
|
||||
buttons_layout->addWidget(details_button);
|
||||
buttons_layout->addWidget(properties_button);
|
||||
buttons_layout->addWidget(clear_button);
|
||||
|
||||
auto sublayout = new QVBoxLayout();
|
||||
@ -98,8 +98,8 @@ void ManagerEdit::on_change() {
|
||||
dialog->open();
|
||||
}
|
||||
|
||||
void ManagerEdit::on_details() {
|
||||
DetailsDialog::open_for_target(current_value);
|
||||
void ManagerEdit::on_properties() {
|
||||
PropertiesDialog::open_for_target(current_value);
|
||||
}
|
||||
|
||||
void ManagerEdit::on_clear() {
|
||||
@ -115,6 +115,6 @@ void ManagerEdit::load_value(const QString &value) {
|
||||
edit->setText(current_value);
|
||||
|
||||
const bool have_manager = !current_value.isEmpty();
|
||||
details_button->setEnabled(have_manager);
|
||||
properties_button->setEnabled(have_manager);
|
||||
clear_button->setEnabled(have_manager);
|
||||
}
|
||||
|
@ -37,13 +37,13 @@ public:
|
||||
|
||||
private slots:
|
||||
void on_change();
|
||||
void on_details();
|
||||
void on_properties();
|
||||
void on_clear();
|
||||
|
||||
private:
|
||||
QLineEdit *edit;
|
||||
QPushButton *change_button;
|
||||
QPushButton *details_button;
|
||||
QPushButton *properties_button;
|
||||
QPushButton *clear_button;
|
||||
|
||||
QString current_value;
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "find_results.h"
|
||||
#include "ad_config.h"
|
||||
#include "object_menu.h"
|
||||
#include "details_dialog.h"
|
||||
#include "properties_dialog.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QVBoxLayout>
|
||||
@ -44,7 +44,7 @@ FindDialog::FindDialog(const QList<QString> classes, const QString default_searc
|
||||
auto find_widget = new FindWidget(classes, default_search_base);
|
||||
|
||||
QTreeView *results_view = find_widget->find_results->view;
|
||||
DetailsDialog::connect_to_open_by_double_click(results_view, ADCONFIG()->get_column_index(ATTRIBUTE_DN));
|
||||
PropertiesDialog::connect_to_open_by_double_click(results_view, ADCONFIG()->get_column_index(ATTRIBUTE_DN));
|
||||
|
||||
auto layout = new QVBoxLayout();
|
||||
setLayout(layout);
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include "find_results.h"
|
||||
#include "object_menu.h"
|
||||
#include "details_dialog.h"
|
||||
#include "properties_dialog.h"
|
||||
#include "utils.h"
|
||||
#include "filter.h"
|
||||
#include "ad_interface.h"
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include "main_window.h"
|
||||
#include "menubar.h"
|
||||
#include "details_dialog.h"
|
||||
#include "properties_dialog.h"
|
||||
#include "status.h"
|
||||
#include "settings.h"
|
||||
#include "confirmation_dialog.h"
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "rename_dialog.h"
|
||||
#include "password_dialog.h"
|
||||
#include "create_dialog.h"
|
||||
#include "details_dialog.h"
|
||||
#include "properties_dialog.h"
|
||||
#include "select_container_dialog.h"
|
||||
#include "utils.h"
|
||||
#include "find_dialog.h"
|
||||
@ -48,7 +48,7 @@ void add_to_group(const QList<QString> targets, QWidget *parent);
|
||||
void enable_account(const QList<QString> targets, QWidget *parent);
|
||||
void disable_account(const QList<QString> targets, QWidget *parent);
|
||||
|
||||
void details(const QString &target, QWidget *parent);
|
||||
void properties(const QString &target, QWidget *parent);
|
||||
void rename(const QString &target, QWidget *parent);
|
||||
void create(const QString &target, const QString &object_class, QWidget *parent);
|
||||
void find(const QString &target, QWidget *parent);
|
||||
@ -192,12 +192,12 @@ void add_object_actions_to_menu(QMenu *menu, QAbstractItemView *view, QWidget *p
|
||||
action->setDisabled(disabled);
|
||||
};
|
||||
|
||||
// TODO: multi-object details
|
||||
auto add_details =
|
||||
// TODO: multi-object properties
|
||||
auto add_properties =
|
||||
[=]() {
|
||||
menu->addAction(QObject::tr("Details"),
|
||||
menu->addAction(QObject::tr("Properties"),
|
||||
[=]() {
|
||||
details(targets[0], parent);
|
||||
properties(targets[0], parent);
|
||||
});
|
||||
};
|
||||
|
||||
@ -254,7 +254,7 @@ void add_object_actions_to_menu(QMenu *menu, QAbstractItemView *view, QWidget *p
|
||||
|
||||
menu->addSeparator();
|
||||
|
||||
add_details();
|
||||
add_properties();
|
||||
} else if (targets.size() > 1) {
|
||||
const bool all_users = (target_classes.contains(CLASS_USER) && target_classes.size() == 1);
|
||||
|
||||
@ -271,9 +271,9 @@ void add_object_actions_to_menu(QMenu *menu, QAbstractItemView *view, QWidget *p
|
||||
}
|
||||
}
|
||||
|
||||
void details(const QString &target, QWidget *parent) {
|
||||
// TODO: multi-object details
|
||||
DetailsDialog::open_for_target(target);
|
||||
void properties(const QString &target, QWidget *parent) {
|
||||
// TODO: multi-object properties
|
||||
PropertiesDialog::open_for_target(target);
|
||||
}
|
||||
|
||||
void delete_object(const QList<QString> targets, QWidget *parent) {
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "policies_widget.h"
|
||||
#include "ad_interface.h"
|
||||
#include "ad_object.h"
|
||||
#include "details_dialog.h"
|
||||
#include "properties_dialog.h"
|
||||
#include "rename_policy_dialog.h"
|
||||
#include "utils.h"
|
||||
#include "filter.h"
|
||||
@ -105,8 +105,8 @@ void PoliciesWidget::on_context_menu(const QPoint pos) {
|
||||
const AdObject object = AD()->search_object(dn);
|
||||
|
||||
QMenu menu;
|
||||
menu.addAction(tr("Details"), [this, dn]() {
|
||||
DetailsDialog::open_for_target(dn);
|
||||
menu.addAction(tr("Properties"), [this, dn]() {
|
||||
PropertiesDialog::open_for_target(dn);
|
||||
});
|
||||
menu.addAction(tr("Edit Policy"), [this, dn, object]() {
|
||||
edit_policy(object);
|
||||
|
@ -17,8 +17,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "details_dialog.h"
|
||||
#include "tabs/details_tab.h"
|
||||
#include "properties_dialog.h"
|
||||
#include "tabs/properties_tab.h"
|
||||
#include "tabs/attributes_tab.h"
|
||||
#include "tabs/membership_tab.h"
|
||||
#include "tabs/account_tab.h"
|
||||
@ -46,25 +46,25 @@
|
||||
#include <QDebug>
|
||||
#include <QAbstractItemView>
|
||||
|
||||
void DetailsDialog::open_for_target(const QString &target) {
|
||||
void PropertiesDialog::open_for_target(const QString &target) {
|
||||
if (target.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
show_busy_indicator();
|
||||
|
||||
static QHash<QString, DetailsDialog *> instances;
|
||||
static QHash<QString, PropertiesDialog *> instances;
|
||||
|
||||
const bool dialog_already_open_for_this_target = instances.contains(target);
|
||||
|
||||
if (dialog_already_open_for_this_target) {
|
||||
// Focus already open dialog
|
||||
DetailsDialog *dialog = instances[target];
|
||||
PropertiesDialog *dialog = instances[target];
|
||||
dialog->raise();
|
||||
dialog->setFocus();
|
||||
} else {
|
||||
// Make new dialog for this target
|
||||
auto dialog = new DetailsDialog(target);
|
||||
auto dialog = new PropertiesDialog(target);
|
||||
|
||||
instances[target] = dialog;
|
||||
connect(
|
||||
@ -79,7 +79,7 @@ void DetailsDialog::open_for_target(const QString &target) {
|
||||
hide_busy_indicator();
|
||||
}
|
||||
|
||||
void DetailsDialog::connect_to_open_by_double_click(QAbstractItemView *view, const int dn_column) {
|
||||
void PropertiesDialog::connect_to_open_by_double_click(QAbstractItemView *view, const int dn_column) {
|
||||
connect(
|
||||
view, &QAbstractItemView::doubleClicked,
|
||||
[dn_column](const QModelIndex &index) {
|
||||
@ -88,7 +88,7 @@ void DetailsDialog::connect_to_open_by_double_click(QAbstractItemView *view, con
|
||||
});
|
||||
}
|
||||
|
||||
DetailsDialog::DetailsDialog(const QString &target_arg)
|
||||
PropertiesDialog::PropertiesDialog(const QString &target_arg)
|
||||
: QDialog()
|
||||
{
|
||||
target = target_arg;
|
||||
@ -115,7 +115,7 @@ DetailsDialog::DetailsDialog(const QString &target_arg)
|
||||
layout->setSpacing(0);
|
||||
|
||||
const QString name = object.get_string(ATTRIBUTE_NAME);
|
||||
const QString window_title = name.isEmpty() ? tr("Details") : QString(tr("\"%1\" Details")).arg(name);
|
||||
const QString window_title = name.isEmpty() ? tr("Properties") : QString(tr("\"%1\" Properties")).arg(name);
|
||||
setWindowTitle(window_title);
|
||||
|
||||
if (object.is_empty()) {
|
||||
@ -135,7 +135,7 @@ DetailsDialog::DetailsDialog(const QString &target_arg)
|
||||
|
||||
// Create new tabs
|
||||
const auto add_tab =
|
||||
[this, tab_widget](DetailsTab *tab, const QString &title) {
|
||||
[this, tab_widget](PropertiesTab *tab, const QString &title) {
|
||||
tabs.append(tab);
|
||||
tab_widget->add_tab(tab, title);
|
||||
};
|
||||
@ -172,27 +172,27 @@ DetailsDialog::DetailsDialog(const QString &target_arg)
|
||||
|
||||
for (auto tab : tabs) {
|
||||
connect(
|
||||
tab, &DetailsTab::edited,
|
||||
this, &DetailsDialog::on_edited);
|
||||
tab, &PropertiesTab::edited,
|
||||
this, &PropertiesDialog::on_edited);
|
||||
}
|
||||
|
||||
reset();
|
||||
|
||||
connect(
|
||||
ok_button, &QPushButton::clicked,
|
||||
this, &DetailsDialog::ok);
|
||||
this, &PropertiesDialog::ok);
|
||||
connect(
|
||||
apply_button, &QPushButton::clicked,
|
||||
this, &DetailsDialog::apply);
|
||||
this, &PropertiesDialog::apply);
|
||||
connect(
|
||||
reset_button, &QPushButton::clicked,
|
||||
this, &DetailsDialog::reset);
|
||||
this, &PropertiesDialog::reset);
|
||||
connect(
|
||||
cancel_button, &QPushButton::clicked,
|
||||
this, &DetailsDialog::reject);
|
||||
this, &PropertiesDialog::reject);
|
||||
}
|
||||
|
||||
void DetailsDialog::ok() {
|
||||
void PropertiesDialog::ok() {
|
||||
const bool success = apply();
|
||||
|
||||
if (success) {
|
||||
@ -200,7 +200,7 @@ void DetailsDialog::ok() {
|
||||
}
|
||||
}
|
||||
|
||||
bool DetailsDialog::apply() {
|
||||
bool PropertiesDialog::apply() {
|
||||
for (auto tab : tabs) {
|
||||
const bool verify_success = tab->verify(target);
|
||||
if (!verify_success) {
|
||||
@ -226,7 +226,7 @@ bool DetailsDialog::apply() {
|
||||
return success;
|
||||
}
|
||||
|
||||
void DetailsDialog::reset() {
|
||||
void PropertiesDialog::reset() {
|
||||
const AdObject object = AD()->search_object(target);
|
||||
for (auto tab : tabs) {
|
||||
tab->load(object);
|
||||
@ -236,7 +236,7 @@ void DetailsDialog::reset() {
|
||||
reset_button->setEnabled(false);
|
||||
}
|
||||
|
||||
void DetailsDialog::on_edited() {
|
||||
void PropertiesDialog::on_edited() {
|
||||
apply_button->setEnabled(true);
|
||||
reset_button->setEnabled(true);
|
||||
}
|
@ -17,8 +17,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef DETAILS_DIALOG_H
|
||||
#define DETAILS_DIALOG_H
|
||||
#ifndef PROPERTIES_DIALOG_H
|
||||
#define PROPERTIES_DIALOG_H
|
||||
|
||||
/**
|
||||
* Shows info about object's attributes in multiple tabs.
|
||||
@ -30,12 +30,12 @@
|
||||
#include <QDialog>
|
||||
|
||||
class QString;
|
||||
class DetailsTab;
|
||||
class PropertiesTab;
|
||||
class QAbstractItemView;
|
||||
class QPushButton;
|
||||
template <typename T> class QList;
|
||||
|
||||
class DetailsDialog final : public QDialog {
|
||||
class PropertiesDialog final : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
@ -49,17 +49,17 @@ private slots:
|
||||
void on_edited();
|
||||
|
||||
private:
|
||||
QList<DetailsTab *> tabs;
|
||||
QList<PropertiesTab *> tabs;
|
||||
QString target;
|
||||
QPushButton *apply_button;
|
||||
QPushButton *reset_button;
|
||||
|
||||
DetailsDialog(const QString &target_arg);
|
||||
PropertiesDialog(const QString &target_arg);
|
||||
|
||||
DetailsDialog(const DetailsDialog&) = delete;
|
||||
DetailsDialog& operator=(const DetailsDialog&) = delete;
|
||||
DetailsDialog(DetailsDialog&&) = delete;
|
||||
DetailsDialog& operator=(DetailsDialog&&) = delete;
|
||||
PropertiesDialog(const PropertiesDialog&) = delete;
|
||||
PropertiesDialog& operator=(const PropertiesDialog&) = delete;
|
||||
PropertiesDialog(PropertiesDialog&&) = delete;
|
||||
PropertiesDialog& operator=(PropertiesDialog&&) = delete;
|
||||
};
|
||||
|
||||
#endif /* DETAILS_DIALOG_H */
|
||||
#endif /* PROPERTIES_DIALOG_H */
|
@ -20,9 +20,9 @@
|
||||
#ifndef ACCOUNT_TAB_H
|
||||
#define ACCOUNT_TAB_H
|
||||
|
||||
#include "tabs/details_tab.h"
|
||||
#include "tabs/properties_tab.h"
|
||||
|
||||
class AccountTab final : public DetailsTab {
|
||||
class AccountTab final : public PropertiesTab {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -20,10 +20,10 @@
|
||||
#ifndef ADDRESS_TAB_H
|
||||
#define ADDRESS_TAB_H
|
||||
|
||||
#include "tabs/details_tab.h"
|
||||
#include "tabs/properties_tab.h"
|
||||
|
||||
// Address related attributes
|
||||
class AddressTab final : public DetailsTab {
|
||||
class AddressTab final : public PropertiesTab {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -25,7 +25,7 @@
|
||||
* viewing/editing if possible via attribute editor dialogs.
|
||||
*/
|
||||
|
||||
#include "tabs/details_tab.h"
|
||||
#include "tabs/properties_tab.h"
|
||||
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QSet>
|
||||
@ -50,7 +50,7 @@ enum AttributeFilter {
|
||||
};
|
||||
|
||||
|
||||
class AttributesTab final : public DetailsTab {
|
||||
class AttributesTab final : public PropertiesTab {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -20,9 +20,9 @@
|
||||
#ifndef GENERAL_TAB_H
|
||||
#define GENERAL_TAB_H
|
||||
|
||||
#include "tabs/details_tab.h"
|
||||
#include "tabs/properties_tab.h"
|
||||
|
||||
class GeneralTab final : public DetailsTab {
|
||||
class GeneralTab final : public PropertiesTab {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "tabs/gpo_links_tab.h"
|
||||
#include "details_dialog.h"
|
||||
#include "properties_dialog.h"
|
||||
#include "utils.h"
|
||||
#include "ad_interface.h"
|
||||
#include "ad_object.h"
|
||||
@ -58,7 +58,7 @@ GpoLinksTab::GpoLinksTab() {
|
||||
setLayout(layout);
|
||||
layout->addWidget(view);
|
||||
|
||||
DetailsDialog::connect_to_open_by_double_click(view, GpoLinksColumn_DN);
|
||||
PropertiesDialog::connect_to_open_by_double_click(view, GpoLinksColumn_DN);
|
||||
}
|
||||
|
||||
void GpoLinksTab::load(const AdObject &policy) {
|
||||
|
@ -20,7 +20,7 @@
|
||||
#ifndef GPO_LINKS_TAB_H
|
||||
#define GPO_LINKS_TAB_H
|
||||
|
||||
#include "tabs/details_tab.h"
|
||||
#include "tabs/properties_tab.h"
|
||||
|
||||
#include <QPoint>
|
||||
|
||||
@ -33,7 +33,7 @@ class QStandardItemModel;
|
||||
* of objects.
|
||||
*/
|
||||
|
||||
class GpoLinksTab final : public DetailsTab {
|
||||
class GpoLinksTab final : public PropertiesTab {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -116,14 +116,14 @@ void GroupPolicyTab::load(const AdObject &object) {
|
||||
|
||||
reload_gplink();
|
||||
|
||||
DetailsTab::load(object);
|
||||
PropertiesTab::load(object);
|
||||
}
|
||||
|
||||
void GroupPolicyTab::apply(const QString &target) const {
|
||||
const QString gplink_string = gplink.to_string();
|
||||
AD()->attribute_replace_string(target, ATTRIBUTE_GPLINK, gplink_string);
|
||||
|
||||
DetailsTab::apply(target);
|
||||
PropertiesTab::apply(target);
|
||||
}
|
||||
|
||||
void GroupPolicyTab::on_context_menu(const QPoint pos) {
|
||||
|
@ -20,7 +20,7 @@
|
||||
#ifndef GROUP_POLICY_TAB_H
|
||||
#define GROUP_POLICY_TAB_H
|
||||
|
||||
#include "tabs/details_tab.h"
|
||||
#include "tabs/properties_tab.h"
|
||||
#include "gplink.h"
|
||||
|
||||
class QTreeView;
|
||||
@ -35,7 +35,7 @@ class QPoint;
|
||||
* gpoptions.
|
||||
*/
|
||||
|
||||
class GroupPolicyTab final : public DetailsTab {
|
||||
class GroupPolicyTab final : public PropertiesTab {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "tabs/membership_tab.h"
|
||||
#include "details_dialog.h"
|
||||
#include "properties_dialog.h"
|
||||
#include "ad_interface.h"
|
||||
#include "ad_utils.h"
|
||||
#include "ad_object.h"
|
||||
@ -80,11 +80,11 @@ MembershipTab::MembershipTab(const MembershipTabType type_arg) {
|
||||
|
||||
setup_column_toggle_menu(view, model, {MembersColumn_Name, MembersColumn_Parent});
|
||||
|
||||
auto details_button = new QPushButton(tr("Details"));
|
||||
auto properties_button = new QPushButton(tr("Properties"));
|
||||
auto add_button = new QPushButton(tr("Add"));
|
||||
auto remove_button = new QPushButton(tr("Remove"));
|
||||
auto button_layout = new QHBoxLayout();
|
||||
button_layout->addWidget(details_button);
|
||||
button_layout->addWidget(properties_button);
|
||||
button_layout->addWidget(add_button);
|
||||
button_layout->addWidget(remove_button);
|
||||
|
||||
@ -109,7 +109,7 @@ MembershipTab::MembershipTab(const MembershipTabType type_arg) {
|
||||
layout->addLayout(button_layout);
|
||||
|
||||
enable_widget_on_selection(remove_button, view);
|
||||
enable_widget_on_selection(details_button, view);
|
||||
enable_widget_on_selection(properties_button, view);
|
||||
|
||||
const QItemSelectionModel *selection_model = view->selectionModel();
|
||||
connect(
|
||||
@ -124,10 +124,10 @@ MembershipTab::MembershipTab(const MembershipTabType type_arg) {
|
||||
add_button, &QAbstractButton::clicked,
|
||||
this, &MembershipTab::on_add_button);
|
||||
connect(
|
||||
details_button, &QAbstractButton::clicked,
|
||||
this, &MembershipTab::on_details_button);
|
||||
properties_button, &QAbstractButton::clicked,
|
||||
this, &MembershipTab::on_properties_button);
|
||||
|
||||
DetailsDialog::connect_to_open_by_double_click(view, MembersColumn_DN);
|
||||
PropertiesDialog::connect_to_open_by_double_click(view, MembersColumn_DN);
|
||||
}
|
||||
|
||||
void MembershipTab::load(const AdObject &object) {
|
||||
@ -318,11 +318,11 @@ void MembershipTab::on_primary_button() {
|
||||
emit edited();
|
||||
}
|
||||
|
||||
void MembershipTab::on_details_button() {
|
||||
void MembershipTab::on_properties_button() {
|
||||
const QModelIndex current = view->selectionModel()->currentIndex();
|
||||
const QString &dn = get_dn_from_index(current, MembersColumn_DN);
|
||||
|
||||
DetailsDialog::open_for_target(dn);
|
||||
PropertiesDialog::open_for_target(dn);
|
||||
}
|
||||
|
||||
void MembershipTab::enable_primary_button_on_valid_selection() {
|
||||
|
@ -20,7 +20,7 @@
|
||||
#ifndef MEMBERS_TAB_H
|
||||
#define MEMBERS_TAB_H
|
||||
|
||||
#include "tabs/details_tab.h"
|
||||
#include "tabs/properties_tab.h"
|
||||
|
||||
#include <QSet>
|
||||
#include <QString>
|
||||
@ -34,7 +34,7 @@ class QPushButton;
|
||||
// 2. groups of user is member of
|
||||
// MembersTab and MemberOfTab implement both of those
|
||||
|
||||
class MembershipTab : public DetailsTab {
|
||||
class MembershipTab : public PropertiesTab {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
@ -45,7 +45,7 @@ private slots:
|
||||
void on_add_button();
|
||||
void on_remove_button();
|
||||
void on_primary_button();
|
||||
void on_details_button();
|
||||
void on_properties_button();
|
||||
void enable_primary_button_on_valid_selection();
|
||||
|
||||
protected:
|
||||
|
@ -20,10 +20,10 @@
|
||||
#ifndef OBJECT_TAB_H
|
||||
#define OBJECT_TAB_H
|
||||
|
||||
#include "tabs/details_tab.h"
|
||||
#include "tabs/properties_tab.h"
|
||||
|
||||
// Object attributes, same for all types
|
||||
class ObjectTab final : public DetailsTab {
|
||||
class ObjectTab final : public PropertiesTab {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "edits/manager_edit.h"
|
||||
#include "ad_utils.h"
|
||||
#include "ad_object.h"
|
||||
#include "details_dialog.h"
|
||||
#include "properties_dialog.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <QFormLayout>
|
||||
@ -63,7 +63,7 @@ OrganizationTab::OrganizationTab() {
|
||||
reports_view->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
reports_view->setAllColumnsShowFocus(true);
|
||||
reports_view->setSortingEnabled(true);
|
||||
DetailsDialog::connect_to_open_by_double_click(reports_view, ReportsColumn_DN);
|
||||
PropertiesDialog::connect_to_open_by_double_click(reports_view, ReportsColumn_DN);
|
||||
|
||||
setup_column_toggle_menu(reports_view, reports_model, {ReportsColumn_Name, ReportsColumn_Folder});
|
||||
|
||||
@ -90,7 +90,7 @@ void OrganizationTab::load(const AdObject &object) {
|
||||
reports_model->appendRow(row);
|
||||
}
|
||||
|
||||
DetailsTab::load(object);
|
||||
PropertiesTab::load(object);
|
||||
}
|
||||
|
||||
void OrganizationTab::showEvent(QShowEvent *event) {
|
||||
|
@ -20,12 +20,12 @@
|
||||
#ifndef ORGANIZATION_TAB_H
|
||||
#define ORGANIZATION_TAB_H
|
||||
|
||||
#include "tabs/details_tab.h"
|
||||
#include "tabs/properties_tab.h"
|
||||
|
||||
class QStandardItemModel;
|
||||
class QTreeView;
|
||||
|
||||
class OrganizationTab final : public DetailsTab {
|
||||
class OrganizationTab final : public PropertiesTab {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -20,9 +20,9 @@
|
||||
#ifndef PROFILE_TAB_H
|
||||
#define PROFILE_TAB_H
|
||||
|
||||
#include "tabs/details_tab.h"
|
||||
#include "tabs/properties_tab.h"
|
||||
|
||||
class ProfileTab final : public DetailsTab {
|
||||
class ProfileTab final : public PropertiesTab {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -17,21 +17,21 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "tabs/details_tab.h"
|
||||
#include "tabs/properties_tab.h"
|
||||
#include "edits/attribute_edit.h"
|
||||
|
||||
void DetailsTab::load(const AdObject &object) {
|
||||
void PropertiesTab::load(const AdObject &object) {
|
||||
edits_load(edits, object);
|
||||
}
|
||||
|
||||
bool DetailsTab::verify(const QString &target) const {
|
||||
bool PropertiesTab::verify(const QString &target) const {
|
||||
return edits_verify(edits, target);
|
||||
}
|
||||
|
||||
void DetailsTab::apply(const QString &target) const {
|
||||
void PropertiesTab::apply(const QString &target) const {
|
||||
edits_apply(edits, target);
|
||||
}
|
||||
|
||||
void DetailsTab::on_edit_edited() {
|
||||
void PropertiesTab::on_edit_edited() {
|
||||
emit edited();
|
||||
}
|
@ -17,15 +17,15 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef DETAILS_TAB_H
|
||||
#define DETAILS_TAB_H
|
||||
#ifndef PROPERTIES_TAB_H
|
||||
#define PROPERTIES_TAB_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
|
||||
/**
|
||||
* Details tabs are used in DetailsDialog. They are usually
|
||||
* PropertiesTab are used in PropertiesDialog. They are usually
|
||||
* a collection of AttributeEdit's and so mirror their
|
||||
* behavior. All tab f-ns call f-ns of tab's edits but edits
|
||||
* aren't required. If needed, a tab can implement custom
|
||||
@ -35,7 +35,7 @@
|
||||
class AttributeEdit;
|
||||
class AdObject;
|
||||
|
||||
class DetailsTab : public QWidget {
|
||||
class PropertiesTab : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
@ -54,4 +54,4 @@ public slots:
|
||||
void on_edit_edited();
|
||||
};
|
||||
|
||||
#endif /* DETAILS_TAB_H */
|
||||
#endif /* PROPERTIES_TAB_H */
|
@ -20,9 +20,9 @@
|
||||
#ifndef TELEPHONES_TAB_H
|
||||
#define TELEPHONES_TAB_H
|
||||
|
||||
#include "tabs/details_tab.h"
|
||||
#include "tabs/properties_tab.h"
|
||||
|
||||
class TelephonesTab final : public DetailsTab {
|
||||
class TelephonesTab final : public PropertiesTab {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
@ -634,79 +634,79 @@
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DetailsDialog</name>
|
||||
<name>PropertiesDialog</name>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="152"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="152"/>
|
||||
<source>Details</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="152"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="152"/>
|
||||
<source>"%1" Details</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="164"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="164"/>
|
||||
<source>Object could not be found</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="185"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="185"/>
|
||||
<source>General</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="190"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="190"/>
|
||||
<source>Object</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="191"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="191"/>
|
||||
<source>Attributes</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="195"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="195"/>
|
||||
<source>Account</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="197"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="197"/>
|
||||
<source>Organization</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="198"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="198"/>
|
||||
<source>Telephones</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="199"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="199"/>
|
||||
<source>Profile</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="202"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="202"/>
|
||||
<source>Members</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="205"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="205"/>
|
||||
<source>Member of</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="209"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="209"/>
|
||||
<source>Group policy</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="212"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="212"/>
|
||||
<source>Links to</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="196"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="196"/>
|
||||
<source>Address</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
|
@ -637,79 +637,79 @@
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DetailsDialog</name>
|
||||
<name>PropertiesDialog</name>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="152"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="152"/>
|
||||
<source>Details</source>
|
||||
<translation>Детали</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="152"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="152"/>
|
||||
<source>"%1" Details</source>
|
||||
<translation>"%1" Детали</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="164"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="164"/>
|
||||
<source>Object could not be found</source>
|
||||
<translation>Невозможно загрузить объект</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="185"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="185"/>
|
||||
<source>General</source>
|
||||
<translation>Общее</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="190"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="190"/>
|
||||
<source>Object</source>
|
||||
<translation>Объект</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="191"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="191"/>
|
||||
<source>Attributes</source>
|
||||
<translation>Атрибуты</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="195"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="195"/>
|
||||
<source>Account</source>
|
||||
<translation>Учётная запись</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="197"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="197"/>
|
||||
<source>Organization</source>
|
||||
<translation>Организация</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="198"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="198"/>
|
||||
<source>Telephones</source>
|
||||
<translation>Телефоны</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="199"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="199"/>
|
||||
<source>Profile</source>
|
||||
<translation>Профиль</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="202"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="202"/>
|
||||
<source>Members</source>
|
||||
<translation>Члены</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="205"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="205"/>
|
||||
<source>Member of</source>
|
||||
<translation>Группы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="209"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="209"/>
|
||||
<source>Group policy</source>
|
||||
<translation>Групповая политика</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="212"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="212"/>
|
||||
<source>Links to</source>
|
||||
<translation>Линки политик</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/admc/details_dialog.cpp" line="196"/>
|
||||
<location filename="../src/admc/properties_dialog.cpp" line="196"/>
|
||||
<source>Address</source>
|
||||
<translation>Адрес</translation>
|
||||
</message>
|
||||
|
Loading…
x
Reference in New Issue
Block a user