Crossfire Server, Trunk
QuickFilterDialog.cpp
Go to the documentation of this file.
1
/*
2
* Crossfire -- cooperative multi-player graphical RPG and adventure game
3
*
4
* Copyright (c) 2022 the Crossfire Development Team
5
*
6
* Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
7
* welcome to redistribute it under certain conditions. For details, please
8
* see COPYING and LICENSE.
9
*
10
* The authors can be reached via e-mail at <crossfire@metalforge.org>.
11
*/
12
13
#include "
QuickFilterDialog.h
"
14
#include "
AssetTextEdit.h
"
15
#include <QtWidgets>
16
17
QuickFilterDialog::QuickFilterDialog
(QWidget *parent,
const
QString &
filter
) : QDialog(parent) {
18
setModal(
true
);
19
setWindowTitle(tr(
"Quick filter"
));
20
21
QVBoxLayout *
layout
=
new
QVBoxLayout(
this
);
22
layout
->addWidget(
new
QLabel(tr(
"Quick filter:"
),
this
));
23
myEdit
=
new
AssetTextEdit
(
this
);
24
myEdit
->setText(
filter
);
25
layout
->addWidget(
myEdit
);
26
27
auto
buttons =
new
QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
28
connect
(buttons, &QDialogButtonBox::accepted,
this
, &
QDialog::accept
);
29
connect
(buttons, &QDialogButtonBox::rejected,
this
, &QDialog::reject);
30
layout
->addWidget(buttons);
31
}
32
33
QString
QuickFilterDialog::filter
()
const
{
34
return
myEdit
->toPlainText();
35
}
layout
Definition:
main.cpp:84
filter
Definition:
filter.py:1
AssetTextEdit
Definition:
AssetTextEdit.h:25
QuickFilterDialog::QuickFilterDialog
QuickFilterDialog(QWidget *parent, const QString &filter)
Definition:
QuickFilterDialog.cpp:17
QuickFilterDialog::filter
QString filter() const
Definition:
QuickFilterDialog.cpp:33
AssetTextEdit.h
connect
Definition:
connect.py:1
altar_valkyrie.accept
def accept(description)
Definition:
altar_valkyrie.py:22
QuickFilterDialog.h
QuickFilterDialog::myEdit
AssetTextEdit * myEdit
Definition:
QuickFilterDialog.h:40
crossfire-crossfire-server
utils
cre
QuickFilterDialog.cpp
Generated by
1.8.17