* Constructor.
*/
FileFinder::FileFinder() :
- m_lines(0),
m_patterns(),
m_antiPatterns(),
m_minSize(0),
m_textFinder(NULL),
m_table(NULL),
m_statistics(),
- m_announcer(NULL),
- m_observer(NULL){
- m_youngerThan.setMSecsSinceEpoch(0);
- m_olderThan.setMSecsSinceEpoch(0);
+ m_guiQueue(NULL),
+ m_maxHits(0){
+ m_youngerThan.setMSecsSinceEpoch(0);
+ m_olderThan.setMSecsSinceEpoch(0);
}
+/**
+ * Destructor.
+ */
FileFinder::~FileFinder(){
}
+/**
+ * Resets the instance.
+ */
+void FileFinder::clear()
+{
+ m_statistics.clear();
+}
+
/**
* Returns a string representation of the filesize.
*
*/
QString fileSize(int64_t size){
QString rc;
- rc.sprintf("%.6f", (double) size / 1000000.0);
+ rc.sprintf("%12.6f", (double) size / 1000000.0);
return rc;
}
/**
QList<QRegExp*>::const_iterator it2;
QList <QFileInfo>::const_iterator it;
clock_t nextUpdate = clock() + CLOCKS_PER_SEC;
+ QString row, size, type, modified;
for (it = entries.begin(); it != entries.end(); ++it){
node = it->fileName();
if (node == "." || node == "..")
if (ignore)
continue;
if (depth >= m_minDepth && isValid(*it)){
- if (m_lines >= m_table->rowCount()){
- m_table->setRowCount(m_lines + 500);
- }
bool isDir = it->isDir();
if (isDir)
m_statistics.m_dirs++;
else
m_statistics.m_files++;
- m_table->setItem(m_lines, TC_NODE, new QTableWidgetItem(node));
+ row.clear();
+ // TC_NODE, TC_EXT, TC_SIZE, TC_MODIFIED, TC_TYPE, TC_PATH
int ix = node.lastIndexOf('.');
ext = ix <= 0 ? "" : node.mid(ix + 1).toLower();
- m_table->setItem(m_lines, TC_EXT, new QTableWidgetItem(ext));
- m_table->setItem(m_lines, TC_TYPE, new QTableWidgetItem(typeOf(*it)));
- m_table->setItem(m_lines, TC_PATH, new QTableWidgetItem(path));
- QTableWidgetItem* item = new QTableWidgetItem(
- isDir ? "" : fileSize(it->size()));
+ type = typeOf(*it);
+ if (isDir)
+ size.clear();
+ else
+ size = fileSize(it->size());
+ modified = it->lastModified().toString("yyyy.MM.dd/hh:mm:ss");
+ row.reserve(6 + node.length() + ext.length() + size.length()
+ + modified.length() + type.length() + path.length());
+ row.append('\t').append(node).append('\t').append(ext);
+ row.append('\t').append(size).append('\t').append(modified);
+ row.append('\t').append(type).append('\t').append(path);
if (!isDir)
m_statistics.m_bytes += it->size();
- item->setTextAlignment(Qt::AlignRight);
- m_table->setItem(m_lines, TC_SIZE, item);
- m_table->setItem(m_lines, TC_MODIFIED,
- new QTableWidgetItem(
- it->lastModified().toString("yyyy.MM.dd/hh:mm:ss")));
- }
- clock_t now = clock();
- if (now > nextUpdate){
- m_table->setRowCount(m_lines);
- if (m_announcer != NULL)
- m_announcer->say(LOG_INFO, path);
- nextUpdate = now + CLOCKS_PER_SEC;
- }
+ m_guiQueue->pushBack(ReGuiQueueItem(ReGuiQueueItem::NewTableRow, m_table, row));
+ if (m_maxHits-- < 0)
+ break;
+ }
+ clock_t now = clock();
+ if (now > nextUpdate){
+ m_guiQueue->pushBack(ReGuiQueueItem(ReGuiQueueItem::LogMessage, NULL, path));
+ nextUpdate = now + CLOCKS_PER_SEC;
+ }
}
for (it2 = antiPatterns.begin(); it2 != antiPatterns.end(); ++it2){
delete *it2;
}
- if (depth < m_maxDepth || m_maxDepth < 0){
+ if (depth < m_maxDepth || m_maxDepth < 0 && m_maxHits > 0){
entries = dir.entryInfoList(
QDir::NoSymLinks | QDir::NoDotAndDotDot | QDir::AllDirs, QDir::NoSort);
bool filtered = m_excludedDirs.length() > 0;
fillTable(path + QDir::separator() + node, depth + 1);
}
}
- m_table->setRowCount(m_lines);
}
/**
* Runs a file search in a second thread.
* Fills the table with the data of the filtered files of a given directory.
*/
void FileFinder::search(){
- if (! m_append){
- m_statistics.clear();
- m_lines = 0;
- }
clock_t start = clock();
- m_table->setSortingEnabled(false);
- QString path = ReFileUtils::nativePath(m_baseDir);
- path = ReQStringUtils::chomp(path, OS_SEPARATOR);
- fillTable(path, 0);
+ m_statistics.clear();
+ QString path = ReFileUtils::nativePath(m_baseDir);
+ path = ReQStringUtils::chomp(path, OS_SEPARATOR);
+ fillTable(path, 0);
m_statistics.m_runtimeSeconds = (double) (clock() - start)
/ CLOCKS_PER_SEC;
- if (m_announcer != NULL){
- QString msg;
- msg.sprintf(
- I18N::s2b(QObject::tr(
- "Found: %d dir(s) and %d file(s) with %.6f MByte. Duration of the search: %.3f sec")),
- m_statistics.m_dirs, m_statistics.m_files,
- m_statistics.m_bytes / 1000000.0, m_statistics.m_runtimeSeconds);
- m_announcer->say(LOG_INFO, msg);
- }
- m_table->setSortingEnabled(true);
- if (m_observer != NULL)
- m_observer->notify("ready");
+ QString msg;
+ msg.sprintf(
+ I18N::s2b(QObject::tr(
+ "Found: %d dir(s) and %d file(s) with %.6f MByte. Duration of the search: %.3f sec")),
+ m_statistics.m_dirs, m_statistics.m_files,
+ m_statistics.m_bytes / 1000000.0, m_statistics.m_runtimeSeconds);
+ m_guiQueue->pushBack(ReGuiQueueItem(ReGuiQueueItem::ReadyMessage, NULL, msg));
}
/**
return rc;
}
-void FileFinder::setAppend(bool append)
+/**
+ * Sets the maximal hit count.
+ *
+ * @param maxHits the maximal hit count
+ */
+void FileFinder::setMaxHits(int maxHits)
{
- m_append = append;
+ m_maxHits = maxHits;
}
/**
- * Sets the announcer for the summary message at the end.
+ * Sets the gui queue for exchanging data to the main tread.
*
- * @param announcer the announcer
+ * @param guiQueue the gui queue
*/
-void FileFinder::setAnnouncer(ReAnnouncer* announcer)
+void FileFinder::setGuiQueue(ReGuiQueue* guiQueue)
{
- m_announcer = announcer;
+ m_guiQueue = guiQueue;
}
+
/**
* Sets the base directory.
*
m_storageFile(),
m_contextHandlers(),
m_logger(new ReMemoryLogger()),
- m_finder(NULL){
+ m_finder(NULL),
+ m_guiQueue(),
+ m_guiTimer(new QTimer(this)){
ui->setupUi(this);
initializeHome();
m_statusMessage = new QLabel(tr("Welcome at refind"));
m_horizontalHeader = ui->tableWidget->horizontalHeader();
connect(m_horizontalHeader, SIGNAL(sectionClicked ( int ) ),
this, SLOT(headerClicked ( int ) ));
+ connect(m_guiTimer, SIGNAL(timeout()), this, SLOT(guiTimerUpdate()));
ui->tableWidget->setColumnWidth(TC_NODE, 200);
ui->tableWidget->setColumnWidth(TC_EXT, 40);
ui->tableWidget->setColumnWidth(TC_SIZE, 125);
ui->tableWidget->setColumnWidth(TC_MODIFIED, 175);
ui->tableWidget->setColumnWidth(TC_TYPE, 75);
prepareContextMenu();
+ m_guiTimer->start(100);
+ bool active = m_guiTimer->isActive();
+ active = ! active;
}
/**
}
}
+/**
+ * Callback method of the GUI timer.
+ */
+void MainWindow::guiTimerUpdate()
+{
+ int count = m_guiQueue.count();
+ while(count-- > 0){
+ ReGuiQueueItem item = m_guiQueue.popFront();
+ if (item.m_type == ReGuiQueueItem::Undef)
+ break;
+ if (! item.apply()){
+ switch (item.m_type){
+ case ReGuiQueueItem::ReadyMessage:
+ say(LOG_INFO, item.m_value);
+ m_statistics = m_finder->statistics();
+ ui->pushButtonSearch->setEnabled(true);
+ ui->pushButtonSearch2->setEnabled(true);
+ break;
+ case ReGuiQueueItem::LogMessage:
+ say(LOG_INFO, item.m_value);
+ break;
+ default:
+ say(LOG_ERROR, "unknown item type: " + QString::number(item.m_type)
+ + " " + item.m_value);
+ break;
+ }
+
+ }
+ }
+}
+
/**
* Handle the "copy to clipboard" entry from the context menu.
*
*/
ReObserver::ReturnCode MainWindow::notify(const char* message)
{
- if (strcmp(message, "ready") == 0){
- ui->pushButtonSearch->setEnabled(true);
- ui->pushButtonSearch2->setEnabled(true);
- m_statistics = m_finder->statistics();
- }
return ReObserver::SUCCESS;
}
}
inline QString addEsc(const QString& text){
- QString rc = text;
+ QString rc = text;
#if defined WIN32
- rc.replace("\\", "\\\\");
+ rc.replace("\\", "\\\\");
#endif
- return rc;
+ return rc;
}
/**
*/
void MainWindow::buildGlobalPlaceholders(QMap <QString, QString>& hash){
-hash.insert("filepatterns", addEsc(ui->comboBoxFilePatterns->currentText()));
-hash.insert("base", m_lastBaseDir.absolutePath());
-hash.insert("textpattern", addEsc(ui->comboBoxTextPattern->currentText()));
-hash.insert("dirs", QString::number(m_statistics.m_dirs));
-hash.insert("files", QString::number(m_statistics.m_files));
-hash.insert("runtime", QString::number(m_statistics.m_runtimeSeconds, 'g', 3));
-hash.insert("bytes", QString::number(m_statistics.m_bytes));
-hash.insert("megabytes",
- QString::number((double) m_statistics.m_bytes / 1000000));
-hash.insert("datetime",
- QDateTime::currentDateTime().toLocalTime().toString("yyyy.MM.dd/hh:mm:ss"));
+ hash.insert("filepatterns", addEsc(ui->comboBoxFilePatterns->currentText()));
+ hash.insert("base", m_lastBaseDir.absolutePath());
+ hash.insert("textpattern", addEsc(ui->comboBoxTextPattern->currentText()));
+ hash.insert("dirs", QString::number(m_statistics.m_dirs));
+ hash.insert("files", QString::number(m_statistics.m_files));
+ hash.insert("runtime", QString::number(m_statistics.m_runtimeSeconds, 'g', 3));
+ hash.insert("bytes", QString::number(m_statistics.m_bytes));
+ hash.insert("megabytes",
+ QString::number((double) m_statistics.m_bytes / 1000000));
+ hash.insert("datetime",
+ QDateTime::currentDateTime().toLocalTime().toString("yyyy.MM.dd/hh:mm:ss"));
}
/**
* Replaces the placeholders valid in header and footer.
* @param finder OUT: the finder to populate
*/
void MainWindow::populateFinder(FileFinder& finder){
+ if (! ui->checkBoxAppend->isChecked()){
+ ui->tableWidget->setRowCount(0);
+ m_statistics.clear();
+ }
finder.setObserver(this);
- finder.setAnnouncer(this);
+ finder.setGuiQueue(&this->m_guiQueue);
finder.setBaseDir(comboText(ui->comboBoxDirectory));
finder.setTable(ui->tableWidget);
m_lastBaseDir.cd(comboText(ui->comboBoxDirectory));
finder.setYoungerThan(comboDate(ui->comboBoxYounger));
finder.setMinDepth(comboInt(ui->comboBoxMinDepth, 0));
finder.setMaxDepth(comboInt(ui->comboBoxMaxDepth, -1));
+ finder.setMaxHits(comboInt(ui->comboBoxMaxHits, 0x7fffffff));
finder.setFiletypes(buildFileTypes());
- finder.setAppend(ui->checkBoxAppend->isChecked());
QStringList patterns;
QString value = comboText(ui->comboBoxFilePatterns);
if (!value.isEmpty())
guiError(ui->comboBoxDirectory, tr("not a directory: ") + path);
else{
QApplication::setOverrideCursor (QCursor(Qt::WaitCursor));
+ ui->pushButtonSearch->setEnabled(false);
+ ui->pushButtonSearch->setEnabled(false);
if (m_finder == NULL)
m_finder = new FileFinder;
populateFinder(*m_finder);
if (dir.exists()){
dir.cdUp();
if (dir.exists()){
- path = ReFileUtils::nativePath(dir.absolutePath());
+ path = ReFileUtils::nativePath(dir.absolutePath());
ui->comboBoxDirectory->setEditText(path);
setInHistory(ui->comboBoxDirectory, path);
}
<property name="maximumSize">
<size>
<width>16777215</width>
- <height>150</height>
+ <height>175</height>
</size>
</property>
<property name="currentIndex">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0,0,0,0,0">
+ <item row="3" column="0" colspan="2">
+ <widget class="QPushButton" name="pushButtonSearch">
+ <property name="toolTip">
+ <string>Execute the search</string>
+ </property>
+ <property name="text">
+ <string>&Run search</string>
+ </property>
+ <property name="icon">
+ <iconset>
+ <normaloff>:/main/icons/action_go.gif</normaloff>
+ <normalon>:/main/icons/action_go.png</normalon>:/main/icons/action_go.gif</iconset>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+F</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="maximumSize">
</property>
</widget>
</item>
- <item row="2" column="5" colspan="2">
+ <item row="1" column="5" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QCheckBox" name="checkBoxDirs">
</property>
</spacer>
</item>
- <item>
- <widget class="QPushButton" name="pushButtonClear">
- <property name="toolTip">
- <string>Clears the file table</string>
- </property>
- <property name="text">
- <string>C&lear</string>
- </property>
- <property name="shortcut">
- <string notr="true"/>
- </property>
- <property name="checkable">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="checkBoxAppend">
- <property name="toolTip">
- <string>Adds the result of the next search to the table</string>
- </property>
- <property name="text">
- <string>Append</string>
- </property>
- </widget>
- </item>
</layout>
</item>
- <item row="3" column="1">
+ <item row="2" column="1">
<widget class="QComboBox" name="comboBoxTextPattern">
<property name="minimumSize">
<size>
</property>
</widget>
</item>
- <item row="3" column="0">
+ <item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="maximumSize">
<size>
</property>
</widget>
</item>
- <item row="1" column="5">
- <layout class="QVBoxLayout" name="verticalLayout_4"/>
- </item>
- <item row="2" column="0">
+ <item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="maximumSize">
<size>
</property>
</widget>
</item>
- <item row="2" column="1">
+ <item row="1" column="1">
<widget class="QComboBox" name="comboBoxFilePatterns">
<property name="toolTip">
<string><html><head/><body><p>A comma (',') separated list of filename patterns. A prefix of '-' means inversion: if a filename matches it will not be found.</p><p>Example: *.txt,*.odt</p></body></html></string>
</property>
</widget>
</item>
- <item row="3" column="5" colspan="2">
+ <item row="2" column="5" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QCheckBox" name="checkBoxRegExpr">
</item>
</layout>
</item>
- <item row="0" column="6">
- <widget class="QPushButton" name="pushButtonSearch">
- <property name="toolTip">
- <string>Execute the search</string>
+ <item row="2" column="2">
+ <widget class="QCheckBox" name="checkBoxTextIgnoreCase">
+ <property name="maximumSize">
+ <size>
+ <width>125</width>
+ <height>16777215</height>
+ </size>
</property>
<property name="text">
- <string>&Run search</string>
- </property>
- <property name="icon">
- <iconset>
- <normaloff>:/main/icons/action_go.gif</normaloff>
- <normalon>:/main/icons/action_go.png</normalon>:/main/icons/action_go.gif</iconset>
- </property>
- <property name="shortcut">
- <string>Ctrl+F</string>
- </property>
- <property name="autoDefault">
- <bool>true</bool>
- </property>
- <property name="default">
- <bool>true</bool>
+ <string>Ignore case</string>
</property>
</widget>
</item>
</item>
</layout>
</item>
+ <item row="1" column="2">
+ <widget class="QCheckBox" name="checkBoxFiles">
+ <property name="text">
+ <string>Files</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
<item row="0" column="1" colspan="2">
<widget class="QComboBox" name="comboBoxDirectory">
<property name="toolTip">
</property>
</widget>
</item>
+ <item row="3" column="5">
+ <layout class="QFormLayout" name="formLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_16">
+ <property name="text">
+ <string>Stop after:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QComboBox" name="comboBoxMaxHits">
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="currentText">
+ <string notr="true"/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
<item row="3" column="2">
- <widget class="QCheckBox" name="checkBoxTextIgnoreCase">
- <property name="maximumSize">
- <size>
- <width>125</width>
- <height>16777215</height>
- </size>
+ <widget class="QCheckBox" name="checkBoxAppend">
+ <property name="toolTip">
+ <string>Adds the result of the next search to the table</string>
</property>
<property name="text">
- <string>ignore case</string>
+ <string>Append</string>
</property>
</widget>
</item>
- <item row="2" column="2">
- <widget class="QCheckBox" name="checkBoxFiles">
+ <item row="3" column="6">
+ <widget class="QPushButton" name="pushButtonClear">
+ <property name="toolTip">
+ <string>Clears the file table</string>
+ </property>
<property name="text">
- <string>Files</string>
+ <string>C&lear</string>
</property>
- <property name="checked">
- <bool>true</bool>
+ <property name="shortcut">
+ <string notr="true"/>
+ </property>
+ <property name="checkable">
+ <bool>false</bool>
</property>
</widget>
</item>
</property>
</widget>
</item>
+ <item row="0" column="2">
+ <widget class="QLabel" name="label_6">
+ <property name="maximumSize">
+ <size>
+ <width>200</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Younger than:</string>
+ </property>
+ </widget>
+ </item>
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="maximumSize">
</property>
</widget>
</item>
- <item row="0" column="2">
- <widget class="QLabel" name="label_6">
+ <item row="1" column="2">
+ <widget class="QLabel" name="label_7">
<property name="maximumSize">
<size>
<width>200</width>
</size>
</property>
<property name="text">
- <string>Younger than:</string>
+ <string>Older than:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="4">
+ <widget class="QLabel" name="label_12">
+ <property name="text">
+ <string>Max. Depth:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" colspan="3">
+ <widget class="QComboBox" name="comboBoxExcludedDirs">
+ <property name="toolTip">
+ <string><html><head/><body><p>a comma (',') separated list of directory names not entered for the search.</p><p>Example: .git,.cache</p></body></html></string>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="4">
+ <widget class="QLabel" name="label_11">
+ <property name="text">
+ <string>Min. Depth:</string>
</property>
</widget>
</item>
- <item row="2" column="4" colspan="2">
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_13">
+ <property name="text">
+ <string>Excluded Dirs:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" colspan="4">
<widget class="QPushButton" name="pushButtonSearch2">
<property name="text">
<string>&Run search</string>
</property>
</widget>
</item>
- <item row="1" column="2">
- <widget class="QLabel" name="label_7">
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tabExport">
+ <attribute name="title">
+ <string>&Export</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_5">
+ <item>
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="2" column="1" colspan="3">
+ <widget class="QComboBox" name="comboBoxHeader">
+ <property name="minimumSize">
+ <size>
+ <width>300</width>
+ <height>0</height>
+ </size>
+ </property>
<property name="maximumSize">
<size>
- <width>200</width>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Text at the top of the export file</string>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QPushButton" name="pushButtonExport">
+ <property name="toolTip">
+ <string>Exports file attributes (specified in the template line) of each found files found file in a textfile or clipboard</string>
+ </property>
+ <property name="text">
+ <string>&Export</string>
+ </property>
+ <property name="icon">
+ <iconset resource="refind.qrc">
+ <normaloff>:/main/icons/database_save.png</normaloff>:/main/icons/database_save.png</iconset>
+ </property>
+ <property name="shortcut">
+ <string>Alt+E</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="4">
+ <widget class="QPushButton" name="pushButtonFooterPlaceholder">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
<height>16777215</height>
</size>
</property>
+ <property name="toolTip">
+ <string>Select a placeholder for the footer</string>
+ </property>
<property name="text">
- <string>Older than:</string>
+ <string>...</string>
</property>
</widget>
</item>
- <item row="2" column="1" colspan="3">
- <widget class="QComboBox" name="comboBoxExcludedDirs">
+ <item row="3" column="1" colspan="3">
+ <widget class="QComboBox" name="comboBoxFooter">
<property name="toolTip">
- <string><html><head/><body><p>a comma (',') separated list of directory names not entered for the search.</p><p>Example: .git,.cache</p></body></html></string>
+ <string>Text at the end of the export file</string>
</property>
<property name="editable">
<bool>true</bool>
</property>
+ <property name="currentText">
+ <string>=== found: ${dirs} dir(s) and ${files} file(s) with ${megabytes} MB in ${runtime} sec</string>
+ </property>
</widget>
</item>
- <item row="0" column="4">
- <widget class="QLabel" name="label_11">
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_15">
<property name="text">
- <string>Min. Depth:</string>
+ <string>File footer:</string>
</property>
</widget>
</item>
- <item row="1" column="4">
- <widget class="QLabel" name="label_12">
+ <item row="2" column="4">
+ <widget class="QPushButton" name="pushButtonHeaderPlaceholder">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Select a placeholder for the header</string>
+ </property>
<property name="text">
- <string>Max. Depth:</string>
+ <string>...</string>
</property>
</widget>
</item>
<item row="2" column="0">
- <widget class="QLabel" name="label_13">
+ <widget class="QLabel" name="label_10">
<property name="text">
- <string>Excluded Dirs:</string>
+ <string>File header:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="4">
+ <widget class="QPushButton" name="pushButtonFilePlaceholder">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Select a placeholder for the template</string>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_8">
+ <property name="text">
+ <string>Line template:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" colspan="3">
+ <widget class="QComboBox" name="comboBoxTemplate">
+ <property name="toolTip">
+ <string>Template of a line for each file</string>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="currentText">
+ <string notr="true">${full};${size};${modified}</string>
</property>
</widget>
</item>
+ <item row="4" column="4">
+ <widget class="QPushButton" name="pushButtonPreview">
+ <property name="text">
+ <string>&Preview</string>
+ </property>
+ <property name="icon">
+ <iconset resource="refind.qrc">
+ <normaloff>:/main/icons/eye.png</normaloff>:/main/icons/eye.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1" colspan="3">
+ <layout class="QHBoxLayout" name="horizontalLayout_7" stretch="0,0,1,0">
+ <item>
+ <widget class="QRadioButton" name="radioButtonClipboard">
+ <property name="text">
+ <string>Clipboard</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="radioButtonFile">
+ <property name="text">
+ <string>&File:</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="comboBoxExportFile">
+ <property name="toolTip">
+ <string>Name of the export file</string>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="currentText">
+ <string>refind.result.txt</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pushButtonExportFile">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Select the export file</string>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
</layout>
</item>
</layout>
</widget>
- <widget class="QWidget" name="tabExport">
- <attribute name="title">
- <string>&Export</string>
- </attribute>
- <widget class="QLabel" name="label_14">
- <property name="geometry">
- <rect>
- <x>515</x>
- <y>106</y>
- <width>85</width>
- <height>29</height>
- </rect>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- <widget class="QWidget" name="layoutWidget">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>11</y>
- <width>981</width>
- <height>116</height>
- </rect>
- </property>
- <layout class="QGridLayout" name="gridLayout_3">
- <item row="1" column="0">
- <widget class="QLabel" name="label_9">
- <property name="text">
- <string>Export file:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_7">
- <item>
- <widget class="QComboBox" name="comboBoxTemplate">
- <property name="toolTip">
- <string>Template of a line for each file</string>
- </property>
- <property name="editable">
- <bool>true</bool>
- </property>
- <property name="currentText">
- <string notr="true">${full};${size};${modified}</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="pushButtonFilePlaceholder">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="toolTip">
- <string>Select a placeholder for the template</string>
- </property>
- <property name="text">
- <string>...</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="2" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_8">
- <item>
- <widget class="QRadioButton" name="radioButtonFile">
- <property name="text">
- <string>&File</string>
- </property>
- <property name="checked">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="radioButtonClipboard">
- <property name="text">
- <string>Clipboard</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <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>
- <widget class="QPushButton" name="pushButtonPreview">
- <property name="text">
- <string>&Preview</string>
- </property>
- <property name="icon">
- <iconset resource="refind.qrc">
- <normaloff>:/main/icons/eye.png</normaloff>:/main/icons/eye.png</iconset>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="1" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_6">
- <item>
- <widget class="QComboBox" name="comboBoxExportFile">
- <property name="toolTip">
- <string>Name of the export file</string>
- </property>
- <property name="editable">
- <bool>true</bool>
- </property>
- <property name="currentText">
- <string>refind.result.txt</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="pushButtonExportFile">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="toolTip">
- <string>Select the export file</string>
- </property>
- <property name="text">
- <string>...</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="2" column="3">
- <widget class="QPushButton" name="pushButtonExport">
- <property name="toolTip">
- <string>Exports file attributes (specified in the template line) of each found files found file in a textfile or clipboard</string>
- </property>
- <property name="text">
- <string>&Export</string>
- </property>
- <property name="icon">
- <iconset resource="refind.qrc">
- <normaloff>:/main/icons/database_save.png</normaloff>:/main/icons/database_save.png</iconset>
- </property>
- <property name="shortcut">
- <string>Alt+E</string>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QLabel" name="label_15">
- <property name="text">
- <string>File footer:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="label_8">
- <property name="text">
- <string>Line template:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QLabel" name="label_10">
- <property name="text">
- <string>File header:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="3">
- <widget class="QComboBox" name="comboBoxHeader">
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="toolTip">
- <string>Text at the top of the export file</string>
- </property>
- <property name="editable">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="3">
- <widget class="QComboBox" name="comboBoxFooter">
- <property name="toolTip">
- <string>Text at the end of the export file</string>
- </property>
- <property name="editable">
- <bool>true</bool>
- </property>
- <property name="currentText">
- <string>=== found: ${dirs} dir(s) and ${files} file(s) with ${megabytes} MB in ${runtime} sec</string>
- </property>
- </widget>
- </item>
- <item row="0" column="4">
- <widget class="QPushButton" name="pushButtonHeaderPlaceholder">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="toolTip">
- <string>Select a placeholder for the header</string>
- </property>
- <property name="text">
- <string>...</string>
- </property>
- </widget>
- </item>
- <item row="1" column="4">
- <widget class="QPushButton" name="pushButtonFooterPlaceholder">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="toolTip">
- <string>Select a placeholder for the footer</string>
- </property>
- <property name="text">
- <string>...</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
</widget>
</item>
<item>
<tabstop>comboBoxDirectory</tabstop>
<tabstop>pushButtonUp</tabstop>
<tabstop>pushButtonDirectory</tabstop>
- <tabstop>pushButtonSearch</tabstop>
<tabstop>comboBoxFilePatterns</tabstop>
<tabstop>checkBoxFiles</tabstop>
<tabstop>checkBoxDirs</tabstop>
<tabstop>comboBoxMinDepth</tabstop>
<tabstop>comboBoxMaxDepth</tabstop>
<tabstop>comboBoxExcludedDirs</tabstop>
- <tabstop>pushButtonSearch2</tabstop>
- <tabstop>comboBoxTemplate</tabstop>
- <tabstop>pushButtonFilePlaceholder</tabstop>
- <tabstop>comboBoxHeader</tabstop>
- <tabstop>pushButtonHeaderPlaceholder</tabstop>
- <tabstop>comboBoxExportFile</tabstop>
- <tabstop>pushButtonExportFile</tabstop>
- <tabstop>comboBoxFooter</tabstop>
- <tabstop>pushButtonFooterPlaceholder</tabstop>
- <tabstop>radioButtonFile</tabstop>
- <tabstop>radioButtonClipboard</tabstop>
- <tabstop>pushButtonExport</tabstop>
- <tabstop>tabWidget</tabstop>
<tabstop>tableWidget</tabstop>
</tabstops>
<resources>