X-Git-Url: https://vaikene.ee/gitweb/pswgen09.html?a=blobdiff_plain;f=src%2Fapps%2FFileFinder%2FGUI%2Fgui.h;h=3b584c3cb08a5a1ea6800a770a61cd66634be545;hb=refs%2Fheads%2Fmaster;hp=809dab1f39449499fa7d1f727add7f9c5a0fad53;hpb=e73fe47c7bba8066feeb68b0f1568f3ac493f50c;p=evaf
diff --git a/src/apps/FileFinder/GUI/gui.h b/src/apps/FileFinder/GUI/gui.h
index 809dab1..3b584c3 100644
--- a/src/apps/FileFinder/GUI/gui.h
+++ b/src/apps/FileFinder/GUI/gui.h
@@ -3,7 +3,7 @@
* @brief GUI for the FileFinder application
* @author Enar Vaikene
*
- * Copyright (c) 2011 Enar Vaikene
+ * Copyright (c) 2011-2019 Enar Vaikene
*
* This file is part of the eVaf C++ cross-platform application development framework.
*
@@ -20,7 +20,10 @@
#ifndef __FILEFINDER_GUI_GUI_H
# define __FILEFINDER_GUI_GUI_H
+#include "version.h"
+
#include
+#include
#include
#include
@@ -33,13 +36,14 @@ class QComboBox;
class QPushButton;
class QListWidget;
class QAction;
+class QFileSystemModel;
namespace eVaf {
namespace SdiWindow {
struct iSdiWindow;
} // namespace eVaf::SdiWindow
namespace FileFinder {
- struct iFileFinder;
+ class iFileFinder;
namespace GUI {
namespace Internal {
@@ -47,14 +51,14 @@ namespace Internal {
/**
* Main widget for the FileFinder window
*/
-class MainWidget : public QWidget
+class MainWidget : public Gui::Panel
{
Q_OBJECT
public:
- MainWidget(QWidget * parent = 0)
- : QWidget(parent)
+ MainWidget(QWidget * parent = nullptr)
+ : Gui::Panel(parent)
{}
virtual void keyPressEvent(QKeyEvent * e);
@@ -80,6 +84,7 @@ class Module : public Plugins::iPlugin
{
Q_OBJECT
Q_INTERFACES(eVaf::Plugins::iPlugin)
+ Q_PLUGIN_METADATA(IID VER_MODULE_NAME_STR)
public:
@@ -110,9 +115,16 @@ private slots:
void openDirectory();
+ void copyName();
+
+ void copyAllNames();
+
private: // Members
+ /// Max number of items in each field that we save
+ static int const MaxHistoryItems;
+
/// Flag indicating that the module is ready
bool mReady;
@@ -122,10 +134,13 @@ private: // Members
/// Actions
QAction * mOpenFileAction;
QAction * mOpenDirectoryAction;
+ QAction * mCopyNameAction;
+ QAction * mCopyAllNamesAction;
/// Widgets on the screen
Internal::MainWidget * wMain;
QComboBox * wDirectory;
+ QPushButton * wBrowse;
QCheckBox * wRecursive;
QComboBox * wIncludeNames;
QComboBox * wExcludeNames;
@@ -134,6 +149,9 @@ private: // Members
QListWidget * wResults;
QPushButton * wFind;
+ /// File system auto-completion model for the directory field
+ QFileSystemModel * mDirModel;
+
private: // Methods