mirror of
https://github.com/altlinux/admc.git
synced 2025-02-09 01:57:26 +03:00
reuse query folder dialog
also reduce height
This commit is contained in:
parent
e4a4cc108e
commit
d38115b098
@ -63,9 +63,11 @@ QueryFolderImpl::QueryFolderImpl(ConsoleWidget *console_arg)
|
||||
|
||||
import_action = new QAction(tr("&Import query..."), this);
|
||||
|
||||
create_query_folder_dialog = new CreateQueryFolderDialog(console);
|
||||
|
||||
connect(
|
||||
new_query_folder_action, &QAction::triggered,
|
||||
this, &QueryFolderImpl::on_new_query_folder);
|
||||
create_query_folder_dialog, &QDialog::open);
|
||||
connect(
|
||||
new_query_item_action, &QAction::triggered,
|
||||
this, &QueryFolderImpl::on_new_query_item);
|
||||
@ -151,11 +153,6 @@ void QueryFolderImpl::on_new_query_item() {
|
||||
dialog->open();
|
||||
}
|
||||
|
||||
void QueryFolderImpl::on_new_query_folder() {
|
||||
auto dialog = new CreateQueryFolderDialog(console);
|
||||
dialog->open();
|
||||
}
|
||||
|
||||
void QueryFolderImpl::on_import() {
|
||||
const QModelIndex parent_index = console->get_selected_item(ItemType_QueryFolder);
|
||||
|
||||
|
@ -23,6 +23,8 @@
|
||||
|
||||
#include "console_widget/console_impl.h"
|
||||
|
||||
class CreateQueryFolderDialog;
|
||||
|
||||
class QueryFolderImpl final : public ConsoleImpl {
|
||||
Q_OBJECT
|
||||
|
||||
@ -48,8 +50,8 @@ private:
|
||||
QAction *new_action;
|
||||
QAction *edit_action;
|
||||
QAction *import_action;
|
||||
CreateQueryFolderDialog *create_query_folder_dialog;
|
||||
|
||||
void on_new_query_folder();
|
||||
void on_new_query_item();
|
||||
void on_edit();
|
||||
void on_import();
|
||||
|
@ -37,8 +37,6 @@ CreateQueryFolderDialog::CreateQueryFolderDialog(ConsoleWidget *console_arg)
|
||||
ui = new Ui::CreateQueryFolderDialog();
|
||||
ui->setupUi(this);
|
||||
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
console = console_arg;
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
<height>127</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
Loading…
x
Reference in New Issue
Block a user