* @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.
*
*/
#include "gui.h"
-#include "version.h"
#include "Engine/iFileFinder"
#include <Common/iApp>
#include <SdiWindow/iSdiWindow>
-#include <QtGui>
+#include <QtWidgets>
VER_EXPORT_VERSION_INFO()
-Q_EXPORT_PLUGIN2(VER_MODULE_NAME_STR, eVaf::FileFinder::GUI::Module)
using namespace eVaf;
switch (e->key()) {
case Qt::Key_Enter:
case Qt::Key_Return: {
- QList<QPushButton *> buttons = qFindChildren<QPushButton *>(this);
+ QList<QPushButton *> buttons = findChildren<QPushButton *>();
foreach (QPushButton * btn, buttons) {
if (btn->isDefault() && btn->isVisible()) {
if (btn->isEnabled())
FileFinder::GUI::Module::Module()
: Plugins::iPlugin()
, mReady(false)
- , mFinder(0)
- , mOpenFileAction(0)
- , mOpenDirectoryAction(0)
- , mCopyNameAction(0)
- , mCopyAllNamesAction(0)
- , wMain(0)
- , wDirectory(0)
- , wRecursive(0)
- , wIncludeNames(0)
- , wExcludeNames(0)
- , wIncludeContent(0)
- , wExcludeContent(0)
- , wFind(0)
+ , mFinder(nullptr)
+ , mOpenFileAction(nullptr)
+ , mOpenDirectoryAction(nullptr)
+ , mCopyNameAction(nullptr)
+ , mCopyAllNamesAction(nullptr)
+ , wMain(nullptr)
+ , wDirectory(nullptr)
+ , wRecursive(nullptr)
+ , wIncludeNames(nullptr)
+ , wExcludeNames(nullptr)
+ , wIncludeContent(nullptr)
+ , wExcludeContent(nullptr)
+ , wFind(nullptr)
{
setObjectName(QString("%1.Module").arg(VER_MODULE_NAME_STR));
Q_UNUSED(args)
// Get the iFileFinder interface
- EVAF_TEST_X((mFinder = evafQueryInterface<FileFinder::iFileFinder>("iFileFinder")), "No iFileFinder interface");
+ EVAF_TEST_X((mFinder = evafQueryInterface<FileFinder::iFileFinder>("iFileFinder")), "No iFileFinder interface")
connect(mFinder, SIGNAL(found(QString,QString)), this, SLOT(found(QString,QString)));
connect(mFinder, SIGNAL(finished(bool)), this, SLOT(finished(bool)));
// Get the main window interface and fill it with widgets
SdiWindow::iSdiWindow * win = evafQueryInterface<SdiWindow::iSdiWindow>("iSdiWindow");
- EVAF_TEST_X(win, "No iSdiWindow interface");
+ EVAF_TEST_X(win, "No iSdiWindow interface")
// Create the main widget for this window
wMain = new Internal::MainWidget;
{
mReady = false;
- mFinder = 0;
+ mFinder = nullptr;
/*
* Widgets are deleted by the SdiWindow module. We use wMain to track calls to done() without
* proper init().
*/
if (wMain) {
- wMain = 0;
+ wMain = nullptr;
saveHistory();
}