From 4c13913d0b432526e65aec19c92612747779addb Mon Sep 17 00:00:00 2001 From: hama Date: Wed, 2 Sep 2015 11:16:12 +0200 Subject: [PATCH] File search --- appl/reide/filesearch.cpp | 23 ++ appl/reide/filesearch.hpp | 31 ++ appl/reide/filesearch.ui | 614 ++++++++++++++++++++++++++++++++++++++ appl/reide/mainwindow.cpp | 3 +- appl/reide/mainwindow.hpp | 1 + appl/reide/reide.pro | 9 +- 6 files changed, 677 insertions(+), 4 deletions(-) create mode 100644 appl/reide/filesearch.cpp create mode 100644 appl/reide/filesearch.hpp create mode 100644 appl/reide/filesearch.ui diff --git a/appl/reide/filesearch.cpp b/appl/reide/filesearch.cpp new file mode 100644 index 0000000..3198c8a --- /dev/null +++ b/appl/reide/filesearch.cpp @@ -0,0 +1,23 @@ +/* + * Licence: + * You can use and modify this file without any restriction. + * There is no warranty. + * You also can use the licence from http://www.wtfpl.net/. + * The original sources can be found on https://github.com/republib. +*/ + + +#include "filesearch.hpp" +#include "ui_filesearch.h" + +FileSearch::FileSearch(QWidget *parent) : + QWidget(parent), + ui(new Ui::FileSearch) +{ + ui->setupUi(this); +} + +FileSearch::~FileSearch() +{ + delete ui; +} diff --git a/appl/reide/filesearch.hpp b/appl/reide/filesearch.hpp new file mode 100644 index 0000000..eb5e151 --- /dev/null +++ b/appl/reide/filesearch.hpp @@ -0,0 +1,31 @@ +/* + * Licence: + * You can use and modify this file without any restriction. + * There is no warranty. + * You also can use the licence from http://www.wtfpl.net/. + * The original sources can be found on https://github.com/republib. +*/ + + +#ifndef FILESEARCH_HPP +#define FILESEARCH_HPP + +#include + +namespace Ui { +class FileSearch; +} + +class FileSearch : public QWidget +{ + Q_OBJECT + +public: + explicit FileSearch(QWidget *parent = 0); + ~FileSearch(); + +private: + Ui::FileSearch *ui; +}; + +#endif // FILESEARCH_HPP diff --git a/appl/reide/filesearch.ui b/appl/reide/filesearch.ui new file mode 100644 index 0000000..daed0c2 --- /dev/null +++ b/appl/reide/filesearch.ui @@ -0,0 +1,614 @@ + + + FileSearch + + + + 0 + 0 + 763 + 407 + + + + Form + + + + + + QTabWidget::North + + + 0 + + + false + + + true + + + + File search + + + + + + + + + 150 + 16777215 + + + + Base directory: + + + + + + + + + true + + + + + + + + 50 + 16777215 + + + + ... + + + + + + + + + + 150 + 16777215 + + + + File patterns: + + + + + + + true + + + + + + + + 150 + 16777215 + + + + Text patterns: + + + + + + + true + + + + + + + Search + + + + :/main/icons/action_go.png:/main/icons/action_go.png + + + true + + + + + + + + + Ignore case + + + + + + + Whole word + + + + + + + + Raw text (no wildcards) + + + + + Simple pattern ('*' for any string) + + + + + Regular expression + + + + + + + + + + + + Qt::Vertical + + + + 20 + 162 + + + + + + + + + Environment + + + + + + + + + + Block start: + + + + + + + + + + Lines above: + + + + + + + Lines below: + + + + + + + 0 means unlimited! + + + + + + + Lines: + + + + + + + Hits in file: + + + + + + + + + + Block end: + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Search + + + + :/main/icons/action_go.png:/main/icons/action_go.png + + + true + + + + + + + + + + + Qt::Vertical + + + + 20 + 180 + + + + + + + + + Blocks + + + + + + + + + 150 + 16777215 + + + + Start pattern: + + + + + + + true + + + + + + + Search + + + + :/main/icons/action_go.png:/main/icons/action_go.png + + + true + + + + + + + Inclusive + + + true + + + + + + + + + Ignore case + + + + + + + Whole word + + + + + + + + + + Raw text (no wildcards) + + + + + Simple pattern ('*' for any string) + + + + + Regular expression + + + + + + + + + 150 + 16777215 + + + + End pattern: + + + + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Inclusive + + + true + + + + + + + + + Ignore case + + + + + + + Whole word + + + + + + + + + + Raw text (no wildcards) + + + + + Simple pattern ('*' for any string) + + + + + Regular expression + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + Output + + + + + + + + Prefix file: + + + + + + + true + + + + ${full} + + + + + + + + + 50 + 16777215 + + + + ... + + + + + + + Prefix line: + + + + + + + true + + + + ${line_no}: + + + + + + + + + 50 + 16777215 + + + + ... + + + + + + + + + Search + + + + :/main/icons/action_go.png:/main/icons/action_go.png + + + true + + + + + + + Qt::Vertical + + + + 20 + 205 + + + + + + + + + + + + + + + diff --git a/appl/reide/mainwindow.cpp b/appl/reide/mainwindow.cpp index 0e38f05..47fb263 100644 --- a/appl/reide/mainwindow.cpp +++ b/appl/reide/mainwindow.cpp @@ -21,7 +21,8 @@ MainWindow::MainWindow(const char* workspace, const char* project, m_workspace(NULL), m_logger(logger), m_fileTree(NULL), - m_dockProjectTree(NULL) { + m_dockProjectTree(NULL), + m_perspectives(this) { if (workspace == NULL) workspace = QDir::homePath().toUtf8(); changeWorkspace(workspace == NULL ? QDir::homePath() : workspace); diff --git a/appl/reide/mainwindow.hpp b/appl/reide/mainwindow.hpp index 64d7b6a..dfb35fb 100644 --- a/appl/reide/mainwindow.hpp +++ b/appl/reide/mainwindow.hpp @@ -45,6 +45,7 @@ private: ReLogger* m_logger; ReFileTree* m_fileTree; QDockWidget* m_dockProjectTree; + PerspectiveList m_perspectives; }; #endif // MAINWINDOW_HPP diff --git a/appl/reide/reide.pro b/appl/reide/reide.pro index ee33728..a8b0bc2 100644 --- a/appl/reide/reide.pro +++ b/appl/reide/reide.pro @@ -32,7 +32,8 @@ SOURCES += \ views/EditorView.cpp \ views/Perspective.cpp \ views/ProjectPerspective.cpp \ - main.cpp + main.cpp \ + filesearch.cpp HEADERS += mainwindow.hpp \ @@ -46,10 +47,12 @@ HEADERS += mainwindow.hpp \ workspace.hpp \ project.hpp \ storage.hpp \ - reide.hpp + reide.hpp \ + filesearch.hpp FORMS += mainwindow.ui \ - projectselection.ui + projectselection.ui \ + filesearch.ui RESOURCES += \ editor.qrc -- 2.39.5