-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new : add find-window for export table
- Loading branch information
Alexander Bychuk
committed
Sep 21, 2020
1 parent
065b10e
commit 2c3ec58
Showing
6 changed files
with
115 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "finfdialog.h" | ||
#include "ui_finfdialog.h" | ||
#include "mainwindow.h" | ||
|
||
FinfDialog::FinfDialog(QWidget *parent) : QDialog(parent), ui(new Ui::FinfDialog) { | ||
ui->setupUi(this); | ||
shortcutClose = new QShortcut(QKeySequence(Qt::Key_Escape), this); | ||
connect(shortcutClose, SIGNAL(activated()), this, SLOT(close())); | ||
|
||
shortcutFind = new QShortcut(QKeySequence(Qt::Key_Enter), this); | ||
connect(shortcutFind, SIGNAL(activated()), this, SLOT(find())); | ||
} | ||
|
||
FinfDialog::~FinfDialog() { delete ui; } | ||
|
||
void FinfDialog::on_findButton_clicked() { | ||
if (!ui->findLineEdit->text().isEmpty()) { | ||
MainWindow *mw = dynamic_cast<MainWindow *>(parentWidget()); | ||
mw->fillExportTable(ui->findLineEdit->text()); | ||
close(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#ifndef FINFDIALOG_H | ||
#define FINFDIALOG_H | ||
|
||
#include <QDialog> | ||
#include <QShortcut> | ||
|
||
namespace Ui { | ||
class FinfDialog; | ||
} | ||
|
||
class FinfDialog : public QDialog { | ||
Q_OBJECT | ||
|
||
public: | ||
explicit FinfDialog(QWidget *parent = nullptr); | ||
~FinfDialog(); | ||
|
||
private slots: | ||
void on_findButton_clicked(); | ||
|
||
private: | ||
Ui::FinfDialog *ui; | ||
QShortcut *shortcutClose; | ||
QShortcut *shortcutFind; | ||
}; | ||
|
||
#endif // FINFDIALOG_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>FinfDialog</class> | ||
<widget class="QDialog" name="FinfDialog"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>400</width> | ||
<height>93</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Dialog</string> | ||
</property> | ||
<property name="autoFillBackground"> | ||
<bool>true</bool> | ||
</property> | ||
<property name="modal"> | ||
<bool>true</bool> | ||
</property> | ||
<layout class="QHBoxLayout" name="horizontalLayout"> | ||
<item> | ||
<widget class="QLineEdit" name="findLineEdit"/> | ||
</item> | ||
<item> | ||
<widget class="QPushButton" name="findButton"> | ||
<property name="text"> | ||
<string>Find</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections/> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters