]> gitweb.hamatoma.de Git - reqt/commitdiff
File search
authorhama <hama@siduction.net>
Wed, 2 Sep 2015 09:16:12 +0000 (11:16 +0200)
committerhama <hama@siduction.net>
Wed, 2 Sep 2015 14:17:01 +0000 (16:17 +0200)
appl/reide/filesearch.cpp [new file with mode: 0644]
appl/reide/filesearch.hpp [new file with mode: 0644]
appl/reide/filesearch.ui [new file with mode: 0644]
appl/reide/mainwindow.cpp
appl/reide/mainwindow.hpp
appl/reide/reide.pro

diff --git a/appl/reide/filesearch.cpp b/appl/reide/filesearch.cpp
new file mode 100644 (file)
index 0000000..3198c8a
--- /dev/null
@@ -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 (file)
index 0000000..eb5e151
--- /dev/null
@@ -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 <QWidget>
+
+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 (file)
index 0000000..daed0c2
--- /dev/null
@@ -0,0 +1,614 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>FileSearch</class>
+ <widget class="QWidget" name="FileSearch">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>763</width>
+    <height>407</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_4">
+   <item>
+    <widget class="QTabWidget" name="tabWidget">
+     <property name="tabPosition">
+      <enum>QTabWidget::North</enum>
+     </property>
+     <property name="currentIndex">
+      <number>0</number>
+     </property>
+     <property name="tabsClosable">
+      <bool>false</bool>
+     </property>
+     <property name="movable">
+      <bool>true</bool>
+     </property>
+     <widget class="QWidget" name="tab">
+      <attribute name="title">
+       <string>File search</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_3">
+       <item>
+        <layout class="QGridLayout" name="gridLayout">
+         <item row="0" column="0">
+          <widget class="QLabel" name="label">
+           <property name="maximumSize">
+            <size>
+             <width>150</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>Base directory:</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <layout class="QHBoxLayout" name="horizontalLayout_2">
+           <item>
+            <widget class="QComboBox" name="comboBoxDirectory">
+             <property name="editable">
+              <bool>true</bool>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QPushButton" name="pushButtonSelectDirectory">
+             <property name="maximumSize">
+              <size>
+               <width>50</width>
+               <height>16777215</height>
+              </size>
+             </property>
+             <property name="text">
+              <string>...</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_2">
+           <property name="maximumSize">
+            <size>
+             <width>150</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>File patterns:</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QComboBox" name="comboBoxFilePatterns">
+           <property name="editable">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="label_3">
+           <property name="maximumSize">
+            <size>
+             <width>150</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>Text patterns:</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QComboBox" name="comboBoxTextPattern">
+           <property name="editable">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="0">
+          <widget class="QPushButton" name="pushButtonSearch">
+           <property name="text">
+            <string>Search</string>
+           </property>
+           <property name="icon">
+            <iconset resource="editor.qrc">
+             <normaloff>:/main/icons/action_go.png</normaloff>:/main/icons/action_go.png</iconset>
+           </property>
+           <property name="autoDefault">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="1">
+          <layout class="QHBoxLayout" name="horizontalLayout">
+           <item>
+            <widget class="QCheckBox" name="checkBoxIgnoreCase">
+             <property name="text">
+              <string>Ignore case</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QCheckBox" name="checkBoxWholeWord">
+             <property name="text">
+              <string>Whole word</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QComboBox" name="comboBoxMethod">
+             <item>
+              <property name="text">
+               <string>Raw text (no wildcards)</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>Simple pattern ('*' for any string)</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>Regular expression</string>
+              </property>
+             </item>
+            </widget>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="verticalSpacer_3">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>162</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tab_2">
+      <attribute name="title">
+       <string>Environment</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_2">
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_3">
+         <item>
+          <layout class="QGridLayout" name="gridLayout_2">
+           <item row="0" column="2">
+            <widget class="QLabel" name="label_13">
+             <property name="text">
+              <string>Block start:</string>
+             </property>
+            </widget>
+           </item>
+           <item row="2" column="1">
+            <widget class="QSpinBox" name="spinBoxBelow"/>
+           </item>
+           <item row="1" column="0">
+            <widget class="QLabel" name="label_4">
+             <property name="text">
+              <string>Lines above:</string>
+             </property>
+            </widget>
+           </item>
+           <item row="2" column="0">
+            <widget class="QLabel" name="label_5">
+             <property name="text">
+              <string>Lines below:</string>
+             </property>
+            </widget>
+           </item>
+           <item row="3" column="3">
+            <widget class="QLabel" name="label_14">
+             <property name="text">
+              <string>0 means unlimited!</string>
+             </property>
+            </widget>
+           </item>
+           <item row="0" column="1">
+            <widget class="QLabel" name="label_12">
+             <property name="text">
+              <string>Lines:</string>
+             </property>
+            </widget>
+           </item>
+           <item row="3" column="0">
+            <widget class="QLabel" name="label_9">
+             <property name="text">
+              <string>Hits in file:</string>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="2">
+            <widget class="QSpinBox" name="spinBox"/>
+           </item>
+           <item row="0" column="3">
+            <widget class="QLabel" name="label_11">
+             <property name="text">
+              <string>Block end:</string>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="3">
+            <widget class="QSpinBox" name="spinBox_2"/>
+           </item>
+           <item row="2" column="3">
+            <widget class="QSpinBox" name="spinBox_4"/>
+           </item>
+           <item row="3" column="1">
+            <widget class="QSpinBox" name="spinBox_5"/>
+           </item>
+           <item row="1" column="1">
+            <widget class="QSpinBox" name="spinBoxAbove"/>
+           </item>
+           <item row="2" column="2">
+            <widget class="QSpinBox" name="spinBox_3"/>
+           </item>
+           <item row="3" column="2">
+            <widget class="QSpinBox" name="spinBox_6">
+             <property name="value">
+              <number>0</number>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <layout class="QVBoxLayout" name="verticalLayout">
+           <item>
+            <spacer name="verticalSpacer_4">
+             <property name="orientation">
+              <enum>Qt::Vertical</enum>
+             </property>
+             <property name="sizeHint" stdset="0">
+              <size>
+               <width>20</width>
+               <height>40</height>
+              </size>
+             </property>
+            </spacer>
+           </item>
+           <item>
+            <widget class="QPushButton" name="pushButtonSearch_4">
+             <property name="text">
+              <string>Search</string>
+             </property>
+             <property name="icon">
+              <iconset resource="editor.qrc">
+               <normaloff>:/main/icons/action_go.png</normaloff>:/main/icons/action_go.png</iconset>
+             </property>
+             <property name="autoDefault">
+              <bool>true</bool>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="verticalSpacer_2">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>180</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tab_3">
+      <attribute name="title">
+       <string>Blocks</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_5">
+       <item>
+        <layout class="QGridLayout" name="gridLayout_3">
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_6">
+           <property name="maximumSize">
+            <size>
+             <width>150</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>Start pattern:</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QComboBox" name="comboBoxStartPattern">
+           <property name="editable">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="2">
+          <widget class="QPushButton" name="pushButtonSearch_2">
+           <property name="text">
+            <string>Search</string>
+           </property>
+           <property name="icon">
+            <iconset resource="editor.qrc">
+             <normaloff>:/main/icons/action_go.png</normaloff>:/main/icons/action_go.png</iconset>
+           </property>
+           <property name="autoDefault">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QCheckBox" name="checkBoxInclusiveStart">
+           <property name="text">
+            <string>Inclusive</string>
+           </property>
+           <property name="checked">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <layout class="QHBoxLayout" name="horizontalLayout_4">
+           <item>
+            <widget class="QCheckBox" name="checkBoxIgnoreCaseStart">
+             <property name="text">
+              <string>Ignore case</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QCheckBox" name="checkBoxWholeWordStart">
+             <property name="text">
+              <string>Whole word</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item row="1" column="2">
+          <widget class="QComboBox" name="comboBoxMethodStart">
+           <item>
+            <property name="text">
+             <string>Raw text (no wildcards)</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>Simple pattern ('*' for any string)</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>Regular expression</string>
+            </property>
+           </item>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="label_7">
+           <property name="maximumSize">
+            <size>
+             <width>150</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>End pattern:</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="QComboBox" name="comboBoxEndPattern">
+           <property name="editable">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="2">
+          <spacer name="horizontalSpacer_2">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item row="3" column="0">
+          <widget class="QCheckBox" name="checkBoxInclusiveEnd">
+           <property name="text">
+            <string>Inclusive</string>
+           </property>
+           <property name="checked">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="1">
+          <layout class="QHBoxLayout" name="horizontalLayout_5">
+           <item>
+            <widget class="QCheckBox" name="checkBoxIgnoreCaseEnd">
+             <property name="text">
+              <string>Ignore case</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QCheckBox" name="checkBoxWholeWordEnd">
+             <property name="text">
+              <string>Whole word</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item row="3" column="2">
+          <widget class="QComboBox" name="comboBoxMethodStop">
+           <item>
+            <property name="text">
+             <string>Raw text (no wildcards)</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>Simple pattern ('*' for any string)</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>Regular expression</string>
+            </property>
+           </item>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="verticalSpacer_5">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tab_5">
+      <attribute name="title">
+       <string>Output</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_6">
+       <item>
+        <layout class="QGridLayout" name="gridLayout_4" columnstretch="1,5,0">
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_8">
+           <property name="text">
+            <string>Prefix file:</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QComboBox" name="comboBoxPrefixFile">
+           <property name="editable">
+            <bool>true</bool>
+           </property>
+           <item>
+            <property name="text">
+             <string>${full}</string>
+            </property>
+           </item>
+          </widget>
+         </item>
+         <item row="0" column="2">
+          <widget class="QPushButton" name="pushButtonVariablesFile">
+           <property name="maximumSize">
+            <size>
+             <width>50</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>...</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_10">
+           <property name="text">
+            <string>Prefix line:</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QComboBox" name="comboBoxPrefixFile_2">
+           <property name="editable">
+            <bool>true</bool>
+           </property>
+           <item>
+            <property name="text">
+             <string>${line_no}: </string>
+            </property>
+           </item>
+          </widget>
+         </item>
+         <item row="1" column="2">
+          <widget class="QPushButton" name="pushButtonVariablesFile_2">
+           <property name="maximumSize">
+            <size>
+             <width>50</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>...</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <widget class="QPushButton" name="pushButtonSearch_3">
+         <property name="text">
+          <string>Search</string>
+         </property>
+         <property name="icon">
+          <iconset resource="editor.qrc">
+           <normaloff>:/main/icons/action_go.png</normaloff>:/main/icons/action_go.png</iconset>
+         </property>
+         <property name="autoDefault">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="verticalSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>205</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="editor.qrc"/>
+ </resources>
+ <connections/>
+</ui>
index 0e38f059411ba05c2c33740dd8e9fa536f9662e8..47fb26336f6cac6c6ef5f8190e33baf06d593fbd 100644 (file)
@@ -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);
index 64d7b6a5d4558a93a17c3293c26765818c8c7394..dfb35fb1c282a6d5621740d8f37ae4b29026d037 100644 (file)
@@ -45,6 +45,7 @@ private:
        ReLogger* m_logger;
        ReFileTree* m_fileTree;
        QDockWidget* m_dockProjectTree;
+       PerspectiveList m_perspectives;
 };
 
 #endif // MAINWINDOW_HPP
index ee33728d805b673e1f0c0f030da266facb6d39d5..a8b0bc2ac79e300ae3c6e7c19acc1e737757bc98 100644 (file)
@@ -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