gui: Add index options group in index tab
This commit is contained in:
parent
ccc4d09b36
commit
590a8888fc
@ -222,16 +222,18 @@ void MainWindow::connectSignals()
|
|||||||
qCritical() << msg << Qt::endl;
|
qCritical() << msg << Qt::endl;
|
||||||
QMessageBox::critical(this, "IPC error", msg);
|
QMessageBox::critical(this, "IPC error", msg);
|
||||||
});
|
});
|
||||||
|
connect(ui->radioMetadataOnly, &QRadioButton::toggled, this,
|
||||||
/*connect(this, &MainWindow::startIpcPreviews, &previewCoordinator, &IPCPreviewClient::startGeneration,
|
[this](bool toggled)
|
||||||
Qt::QueuedConnection);
|
{
|
||||||
connect(this, &MainWindow::stopIpcPreviews, &ipcPreviewClient, &IPCPreviewClient::stopGeneration,
|
if(toggled)
|
||||||
Qt::QueuedConnection); */
|
{
|
||||||
|
this->ui->chkFillContentForContentless->setChecked(false);
|
||||||
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::exportFailedPaths()
|
void MainWindow::exportFailedPaths()
|
||||||
{
|
{
|
||||||
|
|
||||||
QString filename =
|
QString filename =
|
||||||
QString("/tmp/looqs_indexresult_failed_%1").arg(QDateTime::currentDateTime().toString("yyyy-MM-dd_hhmmss"));
|
QString("/tmp/looqs_indexresult_failed_%1").arg(QDateTime::currentDateTime().toString("yyyy-MM-dd_hhmmss"));
|
||||||
QFile outFile(filename);
|
QFile outFile(filename);
|
||||||
@ -312,6 +314,15 @@ void MainWindow::startIndexing()
|
|||||||
this->indexer->setTargetPaths(paths);
|
this->indexer->setTargetPaths(paths);
|
||||||
QString ignorePatterns = ui->txtIgnorePatterns->text();
|
QString ignorePatterns = ui->txtIgnorePatterns->text();
|
||||||
this->indexer->setIgnorePattern(ignorePatterns.split(";"));
|
this->indexer->setIgnorePattern(ignorePatterns.split(";"));
|
||||||
|
|
||||||
|
FileSaverOptions options;
|
||||||
|
options.fillExistingContentless =
|
||||||
|
ui->chkFillContentForContentless->isEnabled() && ui->chkFillContentForContentless->isChecked();
|
||||||
|
options.metadataOnly = ui->radioMetadataOnly->isChecked();
|
||||||
|
options.verbose = false;
|
||||||
|
options.keepGoing = true;
|
||||||
|
|
||||||
|
this->indexer->setFileSaverOptions(options);
|
||||||
this->indexer->beginIndexing();
|
this->indexer->beginIndexing();
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
settings.setValue("indexPaths", pathSettingsValue);
|
settings.setValue("indexPaths", pathSettingsValue);
|
||||||
|
@ -18,16 +18,13 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="txtSearch"/>
|
<widget class="QLineEdit" name="txtSearch"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="tabPosition">
|
<property name="tabPosition">
|
||||||
<enum>QTabWidget::South</enum>
|
<enum>QTabWidget::South</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="resultsTab">
|
<widget class="QWidget" name="resultsTab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -82,7 +79,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1244</width>
|
<width>1244</width>
|
||||||
<height>633</height>
|
<height>641</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout"/>
|
<layout class="QHBoxLayout" name="horizontalLayout"/>
|
||||||
@ -195,62 +192,6 @@
|
|||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="6" column="0">
|
<item row="6" column="0">
|
||||||
<widget class="QLineEdit" name="txtIgnorePatterns"/>
|
|
||||||
</item>
|
|
||||||
<item row="11" column="0">
|
|
||||||
<widget class="QPushButton" name="btnStartIndexing">
|
|
||||||
<property name="text">
|
|
||||||
<string>Start indexing</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBoxPaths">
|
|
||||||
<property name="title">
|
|
||||||
<string>Add paths to scan</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLineEdit" name="txtPathScanAdd"/>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0" colspan="5">
|
|
||||||
<widget class="QListWidget" name="lstPaths"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="3">
|
|
||||||
<widget class="QToolButton" name="btnDeletePath">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Delete</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QPushButton" name="btnChoosePath">
|
|
||||||
<property name="text">
|
|
||||||
<string>...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QPushButton" name="btnAddPath">
|
|
||||||
<property name="text">
|
|
||||||
<string>Add</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Ignore patterns, separated by ';'. Example: *.js;*Downloads*</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBoxIndexProgress">
|
<widget class="QGroupBox" name="groupBoxIndexProgress">
|
||||||
<property name="contextMenuPolicy">
|
<property name="contextMenuPolicy">
|
||||||
<enum>Qt::PreventContextMenu</enum>
|
<enum>Qt::PreventContextMenu</enum>
|
||||||
@ -452,6 +393,102 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QGroupBox" name="groupBoxIndexOptions">
|
||||||
|
<property name="title">
|
||||||
|
<string>Index options</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_11">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Ignore patterns, separated by ';'. Example: *.js;*Downloads*:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="txtIgnorePatterns"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="Line" name="line">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="radioIndexEverything">
|
||||||
|
<property name="text">
|
||||||
|
<string>Index everything (metadata + file content)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="chkFillContentForContentless">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Index content for files previously indexed without content</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="radioMetadataOnly">
|
||||||
|
<property name="text">
|
||||||
|
<string>Index metadata only, don't process content of files</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="0">
|
||||||
|
<widget class="QPushButton" name="btnStartIndexing">
|
||||||
|
<property name="text">
|
||||||
|
<string>Start indexing</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QGroupBox" name="groupBoxPaths">
|
||||||
|
<property name="title">
|
||||||
|
<string>Add paths to scan</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLineEdit" name="txtPathScanAdd"/>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" colspan="5">
|
||||||
|
<widget class="QListWidget" name="lstPaths"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="3">
|
||||||
|
<widget class="QToolButton" name="btnDeletePath">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Delete</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QPushButton" name="btnChoosePath">
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QPushButton" name="btnAddPath">
|
||||||
|
<property name="text">
|
||||||
|
<string>Add</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="settingsTab">
|
<widget class="QWidget" name="settingsTab">
|
||||||
@ -701,5 +738,22 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>radioIndexEverything</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>chkFillContentForContentless</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>639</x>
|
||||||
|
<y>464</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>639</x>
|
||||||
|
<y>497</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
</ui>
|
</ui>
|
||||||
|
Loading…
Reference in New Issue
Block a user