]>
vaikene.ee Git - evaf/blob - src/apps/FileFinder/GUI/gui.h
809dab1f39449499fa7d1f727add7f9c5a0fad53
2 * @file FileFinder/GUI/gui.h
3 * @brief GUI for the FileFinder application
6 * Copyright (c) 2011 Enar Vaikene
8 * This file is part of the eVaf C++ cross-platform application development framework.
10 * This file can be used under the terms of the GNU General Public License
11 * version 3.0 as published by the Free Software Foundation and appearing in
12 * the file LICENSE included in the packaging of this file. Please review the
13 * the following information to ensure the GNU General Public License version
14 * 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
16 * Alternatively, this file may be used in accordance with the Commercial License
17 * Agreement provided with the Software.
20 #ifndef __FILEFINDER_GUI_GUI_H
21 # define __FILEFINDER_GUI_GUI_H
23 #include <Plugins/iPlugin>
27 #include <QModelIndex>
40 } // namespace eVaf::SdiWindow
41 namespace FileFinder
{
48 * Main widget for the FileFinder window
50 class MainWidget
: public QWidget
56 MainWidget(QWidget
* parent
= 0)
60 virtual void keyPressEvent(QKeyEvent
* e
);
66 * Request to close the windows/application
72 } // namespace eVaf::FileFinder::GUI::Internal
75 * Graphical User Interface for the FileFinder application.
77 * This module adds a GUI window to the FileFinder application using the SdiWindow module.
79 class Module
: public Plugins::iPlugin
82 Q_INTERFACES(eVaf::Plugins::iPlugin
)
90 virtual bool init(QString
const & args
);
94 virtual bool isReady() const { return mReady
; }
99 void browseDirectory();
103 void found(QString
const & file
, QString
const & dir
);
107 void currentRowChanged(int currentRow
);
109 void openFile(QModelIndex
const & index
= QModelIndex());
111 void openDirectory();
116 /// Flag indicating that the module is ready
119 /// The iFileFinder interface
120 eVaf::FileFinder::iFileFinder
* mFinder
;
123 QAction
* mOpenFileAction
;
124 QAction
* mOpenDirectoryAction
;
126 /// Widgets on the screen
127 Internal::MainWidget
* wMain
;
128 QComboBox
* wDirectory
;
129 QCheckBox
* wRecursive
;
130 QComboBox
* wIncludeNames
;
131 QComboBox
* wExcludeNames
;
132 QComboBox
* wIncludeContent
;
133 QComboBox
* wExcludeContent
;
134 QListWidget
* wResults
;
140 void createWidgets();
142 void createActions();
150 } // namespace eVaf::FileFinder::GUI
151 } // namespace eVaf::FileFinder