#include "QFileDialog"
static const char* VERSION = "2016.11.26";
+static const int s_defaultPageSize = 10;
MainWindow::MainWindow(QApplication& application, const QString& homeDir,
QWidget *parent) :
ReGuiApplication(application, "rsearch", homeDir, 2, 10100100, "de", parent),
ReGuiValidator(),
- ui(new Ui::MainWindow),
- m_fileFinder(NULL),
- m_fileCache(new FileCache()),
- m_test(true),
- m_lastHitPosition(new HitPosition())
+ ui(new Ui::MainWindow),
+ m_fileFinder(NULL),
+ m_fileCache(new FileCache()),
+ m_test(true),
+ m_lastHitPosition(new HitPosition()),
+ m_currentTask(ttUndef),
+ m_timer(new QTimer(this))
{
ReComboBox::setDefaultHistorySize(20);
+ m_timer->setSingleShot(true);
initializeGui();
}
MainWindow::~MainWindow()
{
delete ui;
- delete m_fileCache;
- delete m_fileFinder;
- delete m_lastHitPosition;
+ delete m_fileCache;
+ delete m_fileFinder;
+ delete m_lastHitPosition;
+}
+
+/**
+ * Adds a single file to the table.
+ *
+ * @param filename the filename with path
+ * @param yetFound IN/OUT: number of already found files.<br>
+ * Will be incremented if the file exists and was already
+ * in the table
+ * @return <i>1</i>: the file exists<br>
+ * <i>0</i>: fhe file does not exist
+ */
+int MainWindow::addSingleFile(bool addNotDetach, const QString& filename, int& alreadyFound)
+{
+ QFileInfo info(filename);
+ int rc = info.exists() ? 1 : 0;
+ if (rc)
+ {
+ QString path = info.absolutePath();
+ QString node = info.baseName();
+ QString full = info.absoluteFilePath();
+ int ignoredFiles = m_fileFinder->ignoredFiles();
+ if (addNotDetach)
+ m_fileFinder->addToTable(full, path, node, info);
+ else
+ m_fileFinder->detachFromTable(full, path, node);
+ if (m_fileFinder->ignoredFiles() - ignoredFiles > 0)
+ ++alreadyFound;
+ }
+ return rc;
}
/**
* @param defaultValue the value if the source value is invalid
*/
int MainWindow::comboboxToInt(QComboBox& combobox, int defaultValue){
- QString text = combobox.currentText();
- uint rc = 0;
- if (ReQStringUtils::lengthOfUInt(text, 0, 10, &rc) != text.length()){
- say(LOG_ERROR, tr("not an integer: %1 using instead: %2").arg(text).arg(defaultValue));
- combobox.setCurrentText(QString::number(defaultValue));
- rc = (uint) defaultValue;
- }
- return (int) rc;
+ QString text = combobox.currentText();
+ uint rc = 0;
+ if (ReQStringUtils::lengthOfUInt(text, 0, 10, &rc) != text.length()){
+ say(LOG_ERROR, tr("not an integer: %1 using instead: %2").arg(text).arg(defaultValue));
+ combobox.setCurrentText(QString::number(defaultValue));
+ rc = (uint) defaultValue;
+ }
+ return (int) rc;
}
/**
connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(onAbout()));
connect(ui->comboBoxBaseDirectory, SIGNAL(textEdited(const QString&, const QString&)),
this, SLOT(textEdited(const QString&, const QString&)));
- connect(ui->pushButtonSelectBase, SIGNAL(clicked()), this, SLOT(onSelectBaseDirectory()));
- connect(ui->pushButtonAdd, SIGNAL(clicked()), this, SLOT(onAdd()));
- connect(ui->pushButtonClear, SIGNAL(clicked()), this, SLOT(onClear()));
- connect(ui->pushButtonFilter, SIGNAL(clicked()), this, SLOT(onFilter()));
- connect(ui->pushButtonDetach, SIGNAL(clicked()), this, SLOT(onDetach()));
- connect(ui->pushButtonPrevious, SIGNAL(clicked()), this, SLOT(onPrevious()));
- connect(ui->pushButtonNext, SIGNAL(clicked()), this, SLOT(onNext()));
-
- connect(ui->comboBoxExcludingPattern, SIGNAL(textEdited(QString,QString)),
- this, SLOT(clearLastHitPosition(const QString&, const QString&)));
- connect(ui->comboBoxIncludingPattern, SIGNAL(textEdited(QString,QString)),
- this, SLOT(clearLastHitPosition(const QString&, const QString&)));
- connect(ui->comboBoxLinesAbove, SIGNAL(textEdited(QString,QString)),
- this, SLOT(clearLastHitPosition(const QString&, const QString&)));
+ connect(ui->pushButtonSelectBase, SIGNAL(clicked()), this, SLOT(onSelectBaseDirectory()));
+ connect(ui->pushButtonAdd, SIGNAL(clicked()), this, SLOT(onAdd()));
+ connect(ui->pushButtonClear, SIGNAL(clicked()), this, SLOT(onClear()));
+ connect(ui->pushButtonFilter, SIGNAL(clicked()), this, SLOT(onFilter()));
+ connect(ui->pushButtonDetach, SIGNAL(clicked()), this, SLOT(onDetach()));
+ connect(ui->pushButtonPrevious, SIGNAL(clicked()), this, SLOT(onPrevious()));
+ connect(ui->pushButtonNext, SIGNAL(clicked()), this, SLOT(onNext()));
+
+ connect(ui->comboBoxExcludingPattern, SIGNAL(textEdited(QString,QString)),
+ this, SLOT(clearLastHitPosition(const QString&, const QString&)));
+ connect(ui->comboBoxIncludingPattern, SIGNAL(textEdited(QString,QString)),
+ this, SLOT(clearLastHitPosition(const QString&, const QString&)));
+ connect(ui->comboBoxLinesAbove, SIGNAL(textEdited(QString,QString)),
+ this, SLOT(clearLastHitPosition(const QString&, const QString&)));
connect(ui->comboBoxLinesBelow, SIGNAL(textEdited(QString,QString)),
this, SLOT(clearLastHitPosition(const QString&, const QString&)));
- delete m_fileFinder;
- m_fileFinder = new FileFinder(*ui->tableWidget, *m_fileCache);
+ connect(ui->comboBoxFromHit, SIGNAL(textEdited(QString,QString)),
+ this, SLOT(onFromHitChanged(const QString&, const QString&)));
- ui->tableWidget->setColumnWidth(colNode, 200);
- ui->tableWidget->setColumnWidth(colSize, 125);
- ui->tableWidget->setColumnWidth(colDate, 175);
- switchFilter(true);
- if (m_test){
- ui->comboBoxBaseDirectory->setCurrentText("/home/mhm/labor");
- ui->comboBoxFilePatterns->setCurrentText("big*.txt");
- ui->comboBoxIncludingPattern->setCurrentText("47");
- onAdd();
- }
+ connect(m_timer, SIGNAL(timeout()), this, SLOT(onTimerTask()));
+
+ delete m_fileFinder;
+ m_fileFinder = new FileFinder(*ui->tableWidget, *m_fileCache);
+
+ ui->tableWidget->setColumnWidth(colNode, 200);
+ ui->tableWidget->setColumnWidth(colSize, 125);
+ ui->tableWidget->setColumnWidth(colDate, 175);
+ switchFilter(true);
+ if (m_test){
+ ui->comboBoxBaseDirectory->setCurrentText("/home/mhm");
+ }
}
/**
* Writes the known number of hits into the label.
*/
void MainWindow::logHits(){
- if (m_lastHitPosition->m_hitCount >= 0)
- ui->labelHits->setText(tr("%1 hit(s)").arg(m_lastHitPosition->m_hitCount));
- else
- ui->labelHits->setText(tr(">= %1 hit(s)").arg(m_lastHitPosition->m_maxHitNo));
+ if (m_lastHitPosition->m_hitCount >= 0)
+ ui->labelHits->setText(tr("%1 hit(s)").arg(m_lastHitPosition->m_hitCount));
+ else
+ ui->labelHits->setText(tr(">= %1 hit(s)").arg(m_lastHitPosition->m_maxHitNo));
}
/**
*/
void MainWindow::clearLastHitPosition(const QString&, const QString&)
{
- m_lastHitPosition->m_filename.clear();
- m_lastHitPosition->m_hitCount = -1;
- m_lastHitPosition->m_hitNo = -1;
- m_lastHitPosition->m_maxHitNo = 0;
+ m_lastHitPosition->m_filename.clear();
+ m_lastHitPosition->m_hitCount = -1;
+ m_lastHitPosition->m_hitNo = -1;
+ m_lastHitPosition->m_maxHitNo = 0;
+ switchFilter(true);
}
/**
*/
void MainWindow::onAdd()
{
- searchFiles(true);
+ switchFilter(true);
+ switchAdd(true);
+ m_currentTask = ttAdd;
+ m_timer->start(5);
+}
+
+/**
+ * Handles the click of the "Add" button.
+ */
+void MainWindow::onAddTimer()
+{
+ if (ui->tabWidgetFileSearch->currentIndex() < 2){
+ searchFiles(true);
+ } else {
+ searchSingleFile(true);
+ }
+ switchAdd(false);
}
/**
*/
void MainWindow::onDetach()
{
- searchFiles(false);
+ switchAdd(true);
+ switchFilter(true);
+ m_currentTask = ttDetach;
+ m_timer->start(5);
+}
+
+/**
+ * Handles the click of the "Detach" button.
+ */
+void MainWindow::onDetachTimer()
+{
+ if (ui->tabWidgetFileSearch->currentIndex() < 2){
+ searchFiles(false);
+ } else {
+ searchSingleFile(false);
+ }
+ switchAdd(false);
}
/**
*/
void MainWindow::onClear()
{
+ switchFilter(true);
m_fileFinder->clear();
- ui->labelFileCount->setText("");
+ ui->labelFileCount->setText("");
}
/**
*/
void MainWindow::onFilter()
{
- FileFilter filter(*ui->tableWidget, *ui->listWidgetHits, *m_fileCache,
- *m_lastHitPosition);
- int from = comboboxToInt(*ui->comboBoxFromHit, 0);
- int to = comboboxToInt(*ui->comboBoxToHit, from + 100);
- int above = comboboxToInt(*ui->comboBoxLinesAbove, 0);
- int below = comboboxToInt(*ui->comboBoxLinesBelow, 0);
-
- filter.filter(ui->comboBoxIncludingPattern->currentText(),
- ui->comboBoxExcludingPattern->currentText(),
- from, to, above, below, false);
+ qint64 start = QDateTime::currentMSecsSinceEpoch();
+ FileFilter filter(*ui->tableWidget, *ui->listWidgetHits, *m_fileCache,
+ *m_lastHitPosition);
+ int from = comboboxToInt(*ui->comboBoxFromHit, 0);
+ int pageSize = comboboxToInt(*ui->comboBoxPageSize, s_defaultPageSize);
+ int above = comboboxToInt(*ui->comboBoxLinesAbove, 0);
+ int below = comboboxToInt(*ui->comboBoxLinesBelow, 0);
+ ui->pushButtonFilter->setEnabled(false);
+ filter.filter(ui->comboBoxIncludingPattern->currentText(),
+ ui->comboBoxExcludingPattern->currentText(),
+ from, pageSize, above, below, false);
switchFilter(false);
+ int found = pageSize;
+ if (m_lastHitPosition->m_hitCount >= 0
+ && m_lastHitPosition->m_hitCount - from < pageSize)
+ found = m_lastHitPosition->m_hitCount - from + 1;
+ qint64 duration = QDateTime::currentMSecsSinceEpoch() - start;
+ say(LOG_INFO, tr("Found: %1 hit(s) in %2").arg(found)
+ .arg(ReQStringUtils::readableDuration(duration)));
}
/**
{
}
+/**
+ * Handles the event "changed text" of the field <i>comboBoxFromHit</i>.
+ *
+ * @param oldValue value before editing
+ * @param newValue value after editing
+ */
+void MainWindow::onFromHitChanged(const QString& oldValue, const QString& newValue)
+{
+ ReUseParameter(oldValue);
+ ReUseParameter(newValue);
+ ui->pushButtonFilter->setEnabled(true);
+}
/**
* The language has been changed.
*/
void MainWindow::onNext()
{
- int first = comboInt(ui->comboBoxFromHit, 1);
- int last = comboInt(ui->comboBoxToHit, first + 100);
- int pageSize = last - first + 1;
- first = first + pageSize;
- ui->comboBoxFromHit->setCurrentText(QString::number(first));
- ui->comboBoxToHit->setCurrentText(QString::number(first + pageSize - 1));
- onFilter();
+ int first = comboInt(ui->comboBoxFromHit, 1);
+ int pageSize = comboInt(ui->comboBoxPageSize, s_defaultPageSize);
+ if (m_lastHitPosition->m_hitCount >= 0
+ && first + pageSize > m_lastHitPosition->m_hitCount)
+ first = max(1, m_lastHitPosition->m_hitCount - 1);
+ else
+ first += pageSize;
+ ui->comboBoxFromHit->setCurrentText(QString::number(first));
+ if (first != m_lastHitPosition->m_hitNo)
+ onFilter();
+ if (m_lastHitPosition->m_hitCount >= 0
+ && first + pageSize > m_lastHitPosition->m_hitCount)
+ ui->pushButtonNext->setEnabled(false);
}
/**
* Shows the previous page of filtered lines.
*/
void MainWindow::onPrevious()
{
- int first = comboInt(ui->comboBoxFromHit, 1);
- int last = comboInt(ui->comboBoxToHit, first + 100);
- int pageSize = last - first + 1;
- first = max(1, first - pageSize);
- ui->comboBoxFromHit->setCurrentText(QString::number(first));
- ui->comboBoxToHit->setCurrentText(QString::number(first + pageSize - 1));
- onFilter();
+ int first = comboInt(ui->comboBoxFromHit, 1);
+ int pageSize = comboInt(ui->comboBoxPageSize, s_defaultPageSize);
+ first = max(1, first - pageSize);
+ ui->comboBoxFromHit->setCurrentText(QString::number(first));
+ onFilter();
+ bool enabled = m_lastHitPosition->m_hitCount < 0
+ || first < m_lastHitPosition->m_hitCount;
+ ui->pushButtonNext->setEnabled(enabled);
}
/**
*/
void MainWindow::onSelectBaseDirectory(){
QString dir = QFileDialog::getExistingDirectory(this, tr("Select Directory"),
- ui->comboBoxBaseDirectory->currentText(), QFileDialog::ShowDirsOnly);
+ ui->comboBoxBaseDirectory->currentText(), QFileDialog::ShowDirsOnly);
if (!dir.isEmpty())
ui->comboBoxBaseDirectory->setCurrentText(ReFileUtils::nativePath(dir));
}
+/**
+ * Does the timer task.
+ */
+void MainWindow::onTimerTask()
+{
+ switch(m_currentTask)
+ {
+ case ttAdd:
+ onAddTimer();
+ break;
+ case ttDetach:
+ onDetachTimer();
+ break;
+ case ttClear:
+ break;
+ default:
+ break;
+ }
+}
+
/**
* Writes a message.
*
*/
void MainWindow::searchFiles(bool addNotDetach)
{
- QString base = ui->comboBoxBaseDirectory->currentText();
- if (base.isEmpty()){
- say(LOG_ERROR, tr("missing a base directory"));
- } else {
- QDateTime olderThan = comboDate(ui->comboBoxOlder);
- QDateTime youngerThan = comboDate(ui->comboBoxYounger);
- m_fileFinder->setOlderThan(olderThan.toMSecsSinceEpoch() <= 0
- ? NULL : new QDateTime(olderThan));
- m_fileFinder->setYoungerThan(olderThan.toMSecsSinceEpoch() <= 0
- ? NULL : new QDateTime(youngerThan));
- m_fileFinder->setTextToSearch(ui->comboBoxTextPattern->currentText(),
- ui->checkBoxCaseSensitiv->isChecked(),
- ui->checkBoxRegularExpr->isChecked(),
- ui->checkBoxInverse->isChecked());
- m_fileFinder->setAddNotDetach(addNotDetach);
- m_fileFinder->search(base, ui->comboBoxFilePatterns->currentText(),
- atoi(ui->lineEditMinDepth->text().toLocal8Bit().data()),
- atoi(ui->lineEditMaxDepth->text().toLocal8Bit().data()));
- int files = ui->tableWidget->rowCount();
- ui->labelFileCount->setText(QString::number(files)
- + " " + tr("file(s)"));
- say(LOG_INFO, tr("files: %1 already found: %2 processed directories: %3")
- .arg(m_fileFinder->foundFiles())
- .arg(m_fileFinder->ignoredFiles())
- .arg(m_fileFinder->processedDirs()));
+ QString base = ui->comboBoxBaseDirectory->currentText();
+ if (base.isEmpty()){
+ say(LOG_ERROR, tr("missing a base directory"));
+ } else {
+ QDateTime olderThan = comboDate(ui->comboBoxOlder);
+ QDateTime youngerThan = comboDate(ui->comboBoxYounger);
+ m_fileFinder->setOlderThan(olderThan.toMSecsSinceEpoch() <= 0
+ ? NULL : new QDateTime(olderThan));
+ m_fileFinder->setYoungerThan(olderThan.toMSecsSinceEpoch() <= 0
+ ? NULL : new QDateTime(youngerThan));
+ m_fileFinder->setTextToSearch(ui->comboBoxTextPattern->currentText(),
+ ui->checkBoxCaseSensitiv->isChecked(),
+ ui->checkBoxRegularExpr->isChecked(),
+ ui->checkBoxInverse->isChecked());
+ m_fileFinder->setAddNotDetach(addNotDetach);
+ m_fileFinder->search(base, ui->comboBoxFilePatterns->currentText(),
+ atoi(ui->lineEditMinDepth->text().toLocal8Bit().data()),
+ atoi(ui->lineEditMaxDepth->text().toLocal8Bit().data()));
+ int files = ui->tableWidget->rowCount();
+ ui->labelFileCount->setText(QString::number(files)
+ + " " + tr("file(s)"));
+ say(LOG_INFO, tr("files: %1 already found: %2 processed directories: %3")
+ .arg(m_fileFinder->foundFiles())
+ .arg(m_fileFinder->ignoredFiles())
+ .arg(m_fileFinder->processedDirs()));
+ }
+}
+
+/**
+ * Common operation of onAdd() and onDetach().
+ *
+ * @param addNotDetach <i>true</i>: add the found files<br>
+ * <i>false</i>: detach the found files
+ */
+void MainWindow::searchSingleFile(bool addNotDetach)
+{
+ int ix = ui->comboBoxSeparator->currentIndex();
+ QString separator;
+ if (ix >= 0)
+ separator = ui->comboBoxSeparator->currentText();
+ QStringList lines = ui->plainTextFilenames->toPlainText()
+ .split('\n', QString::SkipEmptyParts);
+ QRegExp separatorExpr(separator);
+
+ int found = 0;
+ int allFiles = 0;
+ int ignored = 0;
+ for (int no = 0; no < lines.size(); no++){
+ QString line = lines[no].trimmed();
+ if (separator.isEmpty()){
+ found += addSingleFile(addNotDetach, line, ignored);
+ ++ allFiles;
+ } else {
+ QStringList files = line.split(separatorExpr, QString::SkipEmptyParts);
+ allFiles += files.size();
+ for (int ix2 = 0; ix2 < files.size(); ix2++)
+ found += addSingleFile(addNotDetach, files[ix2], ignored);
+ }
}
+ say(LOG_INFO, tr("Listed: %1 exists: %2 already found: %3").arg(allFiles)
+ .arg(found).arg(ignored));
+}
+
+/**
+ * Switches the add button and related.
+ *
+ * @param hide <i>true</i>: hide the buttons
+ * <i>false</i>: show the buttons
+ */
+void MainWindow::switchAdd(bool hide)
+{
+ ui->pushButtonAdd->setEnabled(! hide);
+ ui->pushButtonDetach->setEnabled(! hide);
+ ui->pushButtonClear->setEnabled(! hide);
+ if (hide)
+ say(LOG_INFO, tr("I am working..."));
+ ui->pushButtonAdd->update();
+ ui->groupBox->update();
}
/**
* @param first <i>true</i>: a new resultset is expected.
*/
void MainWindow::switchFilter(bool first){
- ui->pushButtonFilter->setEnabled(first);
- ui->pushButtonPrevious->setEnabled(! first);
- ui->pushButtonNext->setEnabled(! first);
- if (first){
- int start = comboInt(ui->comboBoxFromHit, 1);
- int pageSize = comboInt(ui->comboBoxToHit, start + 50) - start + 1;
- ui->comboBoxFromHit->setCurrentText("1");
- ui->comboBoxToHit->setCurrentText(QString::number(pageSize));
- ui->labelHits->setText("");
- } else {
- logHits();
- }
+ ui->pushButtonFilter->setEnabled(first);
+ ui->pushButtonPrevious->setEnabled(! first);
+ ui->pushButtonNext->setEnabled(! first);
+ if (first){
+ ui->comboBoxFromHit->setCurrentText("1");
+ ui->labelHits->setText("");
+ } else {
+ logHits();
+ }
}
/**
void MainWindow::textEdited(const QString& oldString, const QString& newString)
{
ReUseParameter(oldString);
- ReUseParameter(newString);
+ ReUseParameter(newString);
}
</rect>
</property>
<property name="windowTitle">
- <string>MainWindow</string>
+ <string>ReSearch</string>
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
- <number>1</number>
+ <number>0</number>
</property>
<widget class="QWidget" name="tabFiles">
<attribute name="title">
<attribute name="title">
<string>Single files</string>
</attribute>
- </widget>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox">
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>175</height>
- </size>
- </property>
- <property name="title">
- <string>Activity</string>
- </property>
- <widget class="QLabel" name="labelFileCount">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>150</y>
- <width>131</width>
- <height>20</height>
- </rect>
- </property>
- <property name="text">
- <string notr="true"/>
- </property>
- </widget>
- <widget class="QWidget" name="layoutWidget">
- <property name="geometry">
- <rect>
- <x>19</x>
- <y>27</y>
- <width>87</width>
- <height>113</height>
- </rect>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_5">
- <item>
- <widget class="QPushButton" name="pushButtonAdd">
- <property name="toolTip">
- <string>Adds the described files into the table below</string>
- </property>
+ <layout class="QFormLayout" name="formLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_14">
<property name="text">
- <string>&Add</string>
+ <string>List of files:</string>
</property>
</widget>
</item>
- <item>
- <widget class="QPushButton" name="pushButtonDetach">
+ <item row="0" column="1">
+ <widget class="QPlainTextEdit" name="plainTextFilenames">
<property name="toolTip">
- <string>Removes the found files from the table below</string>
- </property>
- <property name="text">
- <string>&Detach</string>
+ <string>One ore more filenames (with path) separated by the separator described below</string>
</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>40</height>
- </size>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_15">
+ <property name="text">
+ <string>Separator:</string>
</property>
- </spacer>
+ </widget>
</item>
- <item>
- <widget class="QPushButton" name="pushButtonClear">
+ <item row="1" column="1">
+ <widget class="QComboBox" name="comboBoxSeparator">
<property name="toolTip">
- <string>Clears the table below</string>
+ <string><html><head/><body><p>Regular expression for the separator between filenames.</p><p><span style=" font-weight:600;">Note</span>: The newline is always a separator.</p><p><span style=" font-weight:600;">Examples</span>: (type without &quot;)</p><p>&quot;\s+&quot; : whitespaces (blanks, tabulators)</p><p>&quot;,\s*&quot;: a comma with or without whitespaces</p><p><br/></p></body></html></string>
</property>
- <property name="text">
- <string>&Clear</string>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="currentText">
+ <string notr="true">'\n' (newline)</string>
</property>
+ <item>
+ <property name="text">
+ <string>'\n' (newline)</string>
+ </property>
+ </item>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
+ <item>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>175</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Activity</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_7">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_5">
+ <item>
+ <widget class="QPushButton" name="pushButtonAdd">
+ <property name="toolTip">
+ <string>Adds the described files into the table below</string>
+ </property>
+ <property name="text">
+ <string>&Add</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pushButtonDetach">
+ <property name="toolTip">
+ <string>Removes the found files from the table below</string>
+ </property>
+ <property name="text">
+ <string>&Detach</string>
+ </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>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pushButtonClear">
+ <property name="toolTip">
+ <string>Clears the table below</string>
+ </property>
+ <property name="text">
+ <string>&Clear</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QLabel" name="labelFileCount">
+ <property name="text">
+ <string notr="true"/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
</layout>
</item>
<item>
</item>
<item row="0" column="1">
<widget class="ReComboBox" name="comboBoxIncludingPattern">
+ <property name="toolTip">
+ <string>Regular expression defining a hit.
+<b>Examples</b>
+<b>or expression</b>: "cat|dog" find the lines "<bcat</b>s are wanted" and "Missing a <b>dog</b>"
+<b>Begin of the line</b>: "^1234" finds the line "<b>1234</b> houses" but not the line "count: <b>1234</b>"
+<b>Word boundaries</b>: "\bcat\b" finds the line "a <b>cat</b> and a dog" but not the line "Look at the <b>cat</b>s"</string>
+ </property>
<property name="editable">
<bool>true</bool>
</property>
</item>
<item row="1" column="1">
<widget class="ReComboBox" name="comboBoxExcludingPattern">
+ <property name="toolTip">
+ <string>Regulare expression to prevend from being a hit</string>
+ </property>
<property name="editable">
<bool>true</bool>
</property>
<rect>
<x>11</x>
<y>11</y>
- <width>298</width>
+ <width>321</width>
<height>38</height>
</rect>
</property>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
+ <property name="leftMargin">
+ <number>10</number>
+ </property>
+ <property name="rightMargin">
+ <number>10</number>
+ </property>
<item>
<widget class="QPushButton" name="pushButtonFilter">
<property name="text">
<item>
<widget class="QLabel" name="label_11">
<property name="text">
- <string>To hit:</string>
+ <string>Pagesize:</string>
</property>
</widget>
</item>
<item>
- <widget class="ReComboBox" name="comboBoxToHit">
+ <widget class="ReComboBox" name="comboBoxPageSize">
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
+ <property name="toolTip">
+ <string>Maximal number of hits in the list below</string>
+ </property>
<property name="editable">
<bool>true</bool>
</property>