2022-05-10 10:06:48 +00:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#ifndef WINDOW_H
|
|
|
|
#define WINDOW_H
|
|
|
|
|
2011-04-27 17:16:41 +00:00
|
|
|
#include <QWidget>
|
2011-04-27 10:05:43 +00:00
|
|
|
#include <QDir>
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
class QComboBox;
|
|
|
|
class QLabel;
|
|
|
|
class QPushButton;
|
|
|
|
class QTableWidget;
|
|
|
|
class QTableWidgetItem;
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
//! [0]
|
2011-04-27 17:16:41 +00:00
|
|
|
class Window : public QWidget
|
2011-04-27 10:05:43 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2019-09-06 21:24:56 +00:00
|
|
|
Window(QWidget *parent = nullptr);
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void browse();
|
|
|
|
void find();
|
2016-07-05 11:26:53 +00:00
|
|
|
void animateFindClick();
|
2011-04-27 10:05:43 +00:00
|
|
|
void openFileOfItem(int row, int column);
|
2016-07-05 11:26:53 +00:00
|
|
|
void contextMenu(const QPoint &pos);
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
QStringList findFiles(const QStringList &files, const QString &text);
|
2017-05-09 10:42:18 +00:00
|
|
|
void showFiles(const QStringList &paths);
|
2011-04-27 10:05:43 +00:00
|
|
|
QComboBox *createComboBox(const QString &text = QString());
|
|
|
|
void createFilesTable();
|
|
|
|
|
|
|
|
QComboBox *fileComboBox;
|
|
|
|
QComboBox *textComboBox;
|
|
|
|
QComboBox *directoryComboBox;
|
|
|
|
QLabel *filesFoundLabel;
|
|
|
|
QPushButton *findButton;
|
|
|
|
QTableWidget *filesTable;
|
|
|
|
|
|
|
|
QDir currentDir;
|
|
|
|
};
|
|
|
|
//! [0]
|
|
|
|
|
|
|
|
#endif
|