forked from qt-creator/qt-creator
Core: Inline directoryfilter.ui
Change-Id: I4b9de0fb9943c4d05ffff0585d1452e472b1e0f8 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -105,7 +105,7 @@ add_qtc_plugin(Core
|
|||||||
jsexpander.cpp jsexpander.h
|
jsexpander.cpp jsexpander.h
|
||||||
locator/basefilefilter.cpp locator/basefilefilter.h
|
locator/basefilefilter.cpp locator/basefilefilter.h
|
||||||
locator/commandlocator.cpp locator/commandlocator.h
|
locator/commandlocator.cpp locator/commandlocator.h
|
||||||
locator/directoryfilter.cpp locator/directoryfilter.h locator/directoryfilter.ui
|
locator/directoryfilter.cpp locator/directoryfilter.h
|
||||||
locator/executefilter.cpp locator/executefilter.h
|
locator/executefilter.cpp locator/executefilter.h
|
||||||
locator/externaltoolsfilter.cpp locator/externaltoolsfilter.h
|
locator/externaltoolsfilter.cpp locator/externaltoolsfilter.h
|
||||||
locator/filesystemfilter.cpp locator/filesystemfilter.h
|
locator/filesystemfilter.cpp locator/filesystemfilter.h
|
||||||
|
|||||||
@@ -341,7 +341,6 @@ Project {
|
|||||||
"commandlocator.h",
|
"commandlocator.h",
|
||||||
"directoryfilter.cpp",
|
"directoryfilter.cpp",
|
||||||
"directoryfilter.h",
|
"directoryfilter.h",
|
||||||
"directoryfilter.ui",
|
|
||||||
"executefilter.cpp",
|
"executefilter.cpp",
|
||||||
"executefilter.h",
|
"executefilter.h",
|
||||||
"externaltoolsfilter.cpp",
|
"externaltoolsfilter.cpp",
|
||||||
|
|||||||
@@ -2,18 +2,27 @@
|
|||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
||||||
|
|
||||||
#include "directoryfilter.h"
|
#include "directoryfilter.h"
|
||||||
#include "ui_directoryfilter.h"
|
|
||||||
|
|
||||||
#include "locator.h"
|
#include "locator.h"
|
||||||
|
|
||||||
#include <coreplugin/coreconstants.h>
|
#include <coreplugin/coreconstants.h>
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/fileutils.h>
|
#include <utils/fileutils.h>
|
||||||
#include <utils/filesearch.h>
|
#include <utils/filesearch.h>
|
||||||
|
#include <utils/layoutbuilder.h>
|
||||||
|
|
||||||
|
#include <QCheckBox>
|
||||||
|
#include <QCoreApplication>
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QDialogButtonBox>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QLineEdit>
|
||||||
|
#include <QListWidget>
|
||||||
|
#include <QPushButton>
|
||||||
|
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
@@ -137,68 +146,152 @@ void DirectoryFilter::restoreState(const QByteArray &state)
|
|||||||
updateFileIterator();
|
updateFileIterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class DirectoryFilterOptions : public QDialog
|
||||||
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(Core::Internal::DirectoryFilterOptions)
|
||||||
|
|
||||||
|
public:
|
||||||
|
DirectoryFilterOptions(QWidget *parent)
|
||||||
|
: QDialog(parent)
|
||||||
|
{
|
||||||
|
nameLabel = new QLabel(tr("Name:"));
|
||||||
|
nameEdit = new QLineEdit(this);
|
||||||
|
|
||||||
|
filePatternLabel = new QLabel(this);
|
||||||
|
filePattern = new QLineEdit(this);
|
||||||
|
|
||||||
|
exclusionPatternLabel = new QLabel(this);
|
||||||
|
exclusionPattern = new QLineEdit(this);
|
||||||
|
|
||||||
|
prefixLabel = new QLabel(this);
|
||||||
|
|
||||||
|
shortcutEdit = new QLineEdit(this);
|
||||||
|
shortcutEdit->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||||
|
shortcutEdit->setMaximumSize(QSize(16777215, 16777215));
|
||||||
|
shortcutEdit->setToolTip(tr("Specify a short word/abbreviation that can be used to "
|
||||||
|
"restrict completions to files from this directory tree.\n"
|
||||||
|
"To do this, you type this shortcut and a space in the "
|
||||||
|
"Locator entry field, and then the word to search for."));
|
||||||
|
|
||||||
|
defaultFlag = new QCheckBox(this);
|
||||||
|
defaultFlag->setChecked(false);
|
||||||
|
|
||||||
|
directoryLabel = new QLabel(tr("Directories:"));
|
||||||
|
|
||||||
|
addButton = new QPushButton(tr("Add..."));
|
||||||
|
editButton = new QPushButton(tr("Edit..."));
|
||||||
|
removeButton = new QPushButton(tr("Remove"));
|
||||||
|
|
||||||
|
directoryList = new QListWidget(this);
|
||||||
|
QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
|
sizePolicy1.setHorizontalStretch(1);
|
||||||
|
sizePolicy1.setVerticalStretch(0);
|
||||||
|
directoryList->setSizePolicy(sizePolicy1);
|
||||||
|
|
||||||
|
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
|
||||||
|
|
||||||
|
using namespace Layouting;
|
||||||
|
|
||||||
|
Column buttons {
|
||||||
|
addButton,
|
||||||
|
editButton,
|
||||||
|
removeButton,
|
||||||
|
st
|
||||||
|
};
|
||||||
|
|
||||||
|
Column {
|
||||||
|
Grid {
|
||||||
|
nameLabel, Span(3, nameEdit), br,
|
||||||
|
Column { directoryLabel, st }, Span(2, directoryList), buttons, br,
|
||||||
|
filePatternLabel, Span(3, filePattern), br,
|
||||||
|
exclusionPatternLabel, Span(3, exclusionPattern), br,
|
||||||
|
prefixLabel, shortcutEdit, Span(2, defaultFlag)
|
||||||
|
},
|
||||||
|
st,
|
||||||
|
buttonBox
|
||||||
|
}.attachTo(this);
|
||||||
|
|
||||||
|
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
|
||||||
|
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
|
||||||
|
}
|
||||||
|
|
||||||
|
QLabel *nameLabel;
|
||||||
|
QLineEdit *nameEdit;
|
||||||
|
QLabel *filePatternLabel;
|
||||||
|
QLineEdit *filePattern;
|
||||||
|
QLabel *exclusionPatternLabel;
|
||||||
|
QLineEdit *exclusionPattern;
|
||||||
|
QLabel *prefixLabel;
|
||||||
|
QLineEdit *shortcutEdit;
|
||||||
|
QCheckBox *defaultFlag;
|
||||||
|
QPushButton *addButton;
|
||||||
|
QPushButton *editButton;
|
||||||
|
QPushButton *removeButton;
|
||||||
|
QLabel *directoryLabel;
|
||||||
|
QListWidget *directoryList;
|
||||||
|
};
|
||||||
|
|
||||||
bool DirectoryFilter::openConfigDialog(QWidget *parent, bool &needsRefresh)
|
bool DirectoryFilter::openConfigDialog(QWidget *parent, bool &needsRefresh)
|
||||||
{
|
{
|
||||||
if (!m_ui) {
|
|
||||||
m_ui = new Internal::Ui::DirectoryFilterOptions;
|
|
||||||
}
|
|
||||||
bool success = false;
|
bool success = false;
|
||||||
QDialog dialog(parent);
|
|
||||||
|
DirectoryFilterOptions dialog(parent);
|
||||||
m_dialog = &dialog;
|
m_dialog = &dialog;
|
||||||
m_ui->setupUi(&dialog);
|
|
||||||
dialog.setWindowTitle(ILocatorFilter::msgConfigureDialogTitle());
|
dialog.setWindowTitle(ILocatorFilter::msgConfigureDialogTitle());
|
||||||
m_ui->prefixLabel->setText(ILocatorFilter::msgPrefixLabel());
|
m_dialog->prefixLabel->setText(ILocatorFilter::msgPrefixLabel());
|
||||||
m_ui->prefixLabel->setToolTip(ILocatorFilter::msgPrefixToolTip());
|
m_dialog->prefixLabel->setToolTip(ILocatorFilter::msgPrefixToolTip());
|
||||||
m_ui->defaultFlag->setText(ILocatorFilter::msgIncludeByDefault());
|
m_dialog->defaultFlag->setText(ILocatorFilter::msgIncludeByDefault());
|
||||||
m_ui->defaultFlag->setToolTip(ILocatorFilter::msgIncludeByDefaultToolTip());
|
m_dialog->defaultFlag->setToolTip(ILocatorFilter::msgIncludeByDefaultToolTip());
|
||||||
m_ui->nameEdit->setText(displayName());
|
m_dialog->nameEdit->setText(displayName());
|
||||||
m_ui->nameEdit->selectAll();
|
m_dialog->nameEdit->selectAll();
|
||||||
connect(m_ui->addButton,
|
|
||||||
|
connect(m_dialog->addButton,
|
||||||
&QPushButton::clicked,
|
&QPushButton::clicked,
|
||||||
this,
|
this,
|
||||||
&DirectoryFilter::handleAddDirectory,
|
&DirectoryFilter::handleAddDirectory,
|
||||||
Qt::DirectConnection);
|
Qt::DirectConnection);
|
||||||
connect(m_ui->editButton,
|
connect(m_dialog->editButton,
|
||||||
&QPushButton::clicked,
|
&QPushButton::clicked,
|
||||||
this,
|
this,
|
||||||
&DirectoryFilter::handleEditDirectory,
|
&DirectoryFilter::handleEditDirectory,
|
||||||
Qt::DirectConnection);
|
Qt::DirectConnection);
|
||||||
connect(m_ui->removeButton,
|
connect(m_dialog->removeButton,
|
||||||
&QPushButton::clicked,
|
&QPushButton::clicked,
|
||||||
this,
|
this,
|
||||||
&DirectoryFilter::handleRemoveDirectory,
|
&DirectoryFilter::handleRemoveDirectory,
|
||||||
Qt::DirectConnection);
|
Qt::DirectConnection);
|
||||||
connect(m_ui->directoryList,
|
connect(m_dialog->directoryList,
|
||||||
&QListWidget::itemSelectionChanged,
|
&QListWidget::itemSelectionChanged,
|
||||||
this,
|
this,
|
||||||
&DirectoryFilter::updateOptionButtons,
|
&DirectoryFilter::updateOptionButtons,
|
||||||
Qt::DirectConnection);
|
Qt::DirectConnection);
|
||||||
m_ui->directoryList->clear();
|
m_dialog->directoryList->clear();
|
||||||
// Note: assuming we only change m_directories in the Gui thread,
|
// Note: assuming we only change m_directories in the Gui thread,
|
||||||
// we don't need to protect it here with mutex
|
// we don't need to protect it here with mutex
|
||||||
m_ui->directoryList->addItems(Utils::transform(m_directories, &FilePath::toString));
|
m_dialog->directoryList->addItems(Utils::transform(m_directories, &FilePath::toString));
|
||||||
m_ui->nameLabel->setVisible(m_isCustomFilter);
|
m_dialog->nameLabel->setVisible(m_isCustomFilter);
|
||||||
m_ui->nameEdit->setVisible(m_isCustomFilter);
|
m_dialog->nameEdit->setVisible(m_isCustomFilter);
|
||||||
m_ui->directoryLabel->setVisible(m_isCustomFilter);
|
m_dialog->directoryLabel->setVisible(m_isCustomFilter);
|
||||||
m_ui->directoryList->setVisible(m_isCustomFilter);
|
m_dialog->directoryList->setVisible(m_isCustomFilter);
|
||||||
m_ui->addButton->setVisible(m_isCustomFilter);
|
m_dialog->addButton->setVisible(m_isCustomFilter);
|
||||||
m_ui->editButton->setVisible(m_isCustomFilter);
|
m_dialog->editButton->setVisible(m_isCustomFilter);
|
||||||
m_ui->removeButton->setVisible(m_isCustomFilter);
|
m_dialog->removeButton->setVisible(m_isCustomFilter);
|
||||||
m_ui->filePatternLabel->setText(Utils::msgFilePatternLabel());
|
m_dialog->filePatternLabel->setText(Utils::msgFilePatternLabel());
|
||||||
m_ui->filePatternLabel->setBuddy(m_ui->filePattern);
|
m_dialog->filePatternLabel->setBuddy(m_dialog->filePattern);
|
||||||
m_ui->filePattern->setToolTip(Utils::msgFilePatternToolTip());
|
m_dialog->filePattern->setToolTip(Utils::msgFilePatternToolTip());
|
||||||
// Note: assuming we only change m_filters in the Gui thread,
|
// Note: assuming we only change m_filters in the Gui thread,
|
||||||
// we don't need to protect it here with mutex
|
// we don't need to protect it here with mutex
|
||||||
m_ui->filePattern->setText(Utils::transform(m_filters, &QDir::toNativeSeparators).join(','));
|
m_dialog->filePattern->setText(Utils::transform(m_filters, &QDir::toNativeSeparators).join(','));
|
||||||
m_ui->exclusionPatternLabel->setText(Utils::msgExclusionPatternLabel());
|
m_dialog->exclusionPatternLabel->setText(Utils::msgExclusionPatternLabel());
|
||||||
m_ui->exclusionPatternLabel->setBuddy(m_ui->exclusionPattern);
|
m_dialog->exclusionPatternLabel->setBuddy(m_dialog->exclusionPattern);
|
||||||
m_ui->exclusionPattern->setToolTip(Utils::msgFilePatternToolTip());
|
m_dialog->exclusionPattern->setToolTip(Utils::msgFilePatternToolTip());
|
||||||
// Note: assuming we only change m_exclusionFilters in the Gui thread,
|
// Note: assuming we only change m_exclusionFilters in the Gui thread,
|
||||||
// we don't need to protect it here with mutex
|
// we don't need to protect it here with mutex
|
||||||
m_ui->exclusionPattern->setText(
|
m_dialog->exclusionPattern->setText(
|
||||||
Utils::transform(m_exclusionFilters, &QDir::toNativeSeparators).join(','));
|
Utils::transform(m_exclusionFilters, &QDir::toNativeSeparators).join(','));
|
||||||
m_ui->shortcutEdit->setText(shortcutString());
|
m_dialog->shortcutEdit->setText(shortcutString());
|
||||||
m_ui->defaultFlag->setChecked(isIncludedByDefault());
|
m_dialog->defaultFlag->setChecked(isIncludedByDefault());
|
||||||
updateOptionButtons();
|
updateOptionButtons();
|
||||||
dialog.adjustSize();
|
dialog.adjustSize();
|
||||||
if (dialog.exec() == QDialog::Accepted) {
|
if (dialog.exec() == QDialog::Accepted) {
|
||||||
@@ -207,21 +300,21 @@ bool DirectoryFilter::openConfigDialog(QWidget *parent, bool &needsRefresh)
|
|||||||
const FilePaths oldDirectories = m_directories;
|
const FilePaths oldDirectories = m_directories;
|
||||||
const QStringList oldFilters = m_filters;
|
const QStringList oldFilters = m_filters;
|
||||||
const QStringList oldExclusionFilters = m_exclusionFilters;
|
const QStringList oldExclusionFilters = m_exclusionFilters;
|
||||||
setDisplayName(m_ui->nameEdit->text().trimmed());
|
setDisplayName(m_dialog->nameEdit->text().trimmed());
|
||||||
m_directories.clear();
|
m_directories.clear();
|
||||||
const int oldCount = oldDirectories.count();
|
const int oldCount = oldDirectories.count();
|
||||||
const int newCount = m_ui->directoryList->count();
|
const int newCount = m_dialog->directoryList->count();
|
||||||
if (oldCount != newCount)
|
if (oldCount != newCount)
|
||||||
directoriesChanged = true;
|
directoriesChanged = true;
|
||||||
for (int i = 0; i < newCount; ++i) {
|
for (int i = 0; i < newCount; ++i) {
|
||||||
m_directories.append(FilePath::fromString(m_ui->directoryList->item(i)->text()));
|
m_directories.append(FilePath::fromString(m_dialog->directoryList->item(i)->text()));
|
||||||
if (!directoriesChanged && m_directories.at(i) != oldDirectories.at(i))
|
if (!directoriesChanged && m_directories.at(i) != oldDirectories.at(i))
|
||||||
directoriesChanged = true;
|
directoriesChanged = true;
|
||||||
}
|
}
|
||||||
m_filters = Utils::splitFilterUiText(m_ui->filePattern->text());
|
m_filters = Utils::splitFilterUiText(m_dialog->filePattern->text());
|
||||||
m_exclusionFilters = Utils::splitFilterUiText(m_ui->exclusionPattern->text());
|
m_exclusionFilters = Utils::splitFilterUiText(m_dialog->exclusionPattern->text());
|
||||||
setShortcutString(m_ui->shortcutEdit->text().trimmed());
|
setShortcutString(m_dialog->shortcutEdit->text().trimmed());
|
||||||
setIncludedByDefault(m_ui->defaultFlag->isChecked());
|
setIncludedByDefault(m_dialog->defaultFlag->isChecked());
|
||||||
needsRefresh = directoriesChanged || oldFilters != m_filters
|
needsRefresh = directoriesChanged || oldFilters != m_filters
|
||||||
|| oldExclusionFilters != m_exclusionFilters;
|
|| oldExclusionFilters != m_exclusionFilters;
|
||||||
success = true;
|
success = true;
|
||||||
@@ -233,14 +326,14 @@ void DirectoryFilter::handleAddDirectory()
|
|||||||
{
|
{
|
||||||
FilePath dir = FileUtils::getExistingDirectory(m_dialog, tr("Select Directory"));
|
FilePath dir = FileUtils::getExistingDirectory(m_dialog, tr("Select Directory"));
|
||||||
if (!dir.isEmpty())
|
if (!dir.isEmpty())
|
||||||
m_ui->directoryList->addItem(dir.toUserOutput());
|
m_dialog->directoryList->addItem(dir.toUserOutput());
|
||||||
}
|
}
|
||||||
|
|
||||||
void DirectoryFilter::handleEditDirectory()
|
void DirectoryFilter::handleEditDirectory()
|
||||||
{
|
{
|
||||||
if (m_ui->directoryList->selectedItems().count() < 1)
|
if (m_dialog->directoryList->selectedItems().count() < 1)
|
||||||
return;
|
return;
|
||||||
QListWidgetItem *currentItem = m_ui->directoryList->selectedItems().at(0);
|
QListWidgetItem *currentItem = m_dialog->directoryList->selectedItems().at(0);
|
||||||
FilePath dir = FileUtils::getExistingDirectory(m_dialog, tr("Select Directory"),
|
FilePath dir = FileUtils::getExistingDirectory(m_dialog, tr("Select Directory"),
|
||||||
FilePath::fromUserInput(currentItem->text()));
|
FilePath::fromUserInput(currentItem->text()));
|
||||||
if (!dir.isEmpty())
|
if (!dir.isEmpty())
|
||||||
@@ -249,17 +342,17 @@ void DirectoryFilter::handleEditDirectory()
|
|||||||
|
|
||||||
void DirectoryFilter::handleRemoveDirectory()
|
void DirectoryFilter::handleRemoveDirectory()
|
||||||
{
|
{
|
||||||
if (m_ui->directoryList->selectedItems().count() < 1)
|
if (m_dialog->directoryList->selectedItems().count() < 1)
|
||||||
return;
|
return;
|
||||||
QListWidgetItem *currentItem = m_ui->directoryList->selectedItems().at(0);
|
QListWidgetItem *currentItem = m_dialog->directoryList->selectedItems().at(0);
|
||||||
delete m_ui->directoryList->takeItem(m_ui->directoryList->row(currentItem));
|
delete m_dialog->directoryList->takeItem(m_dialog->directoryList->row(currentItem));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DirectoryFilter::updateOptionButtons()
|
void DirectoryFilter::updateOptionButtons()
|
||||||
{
|
{
|
||||||
bool haveSelectedItem = !m_ui->directoryList->selectedItems().isEmpty();
|
bool haveSelectedItem = !m_dialog->directoryList->selectedItems().isEmpty();
|
||||||
m_ui->editButton->setEnabled(haveSelectedItem);
|
m_dialog->editButton->setEnabled(haveSelectedItem);
|
||||||
m_ui->removeButton->setEnabled(haveSelectedItem);
|
m_dialog->removeButton->setEnabled(haveSelectedItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DirectoryFilter::updateFileIterator()
|
void DirectoryFilter::updateFileIterator()
|
||||||
|
|||||||
@@ -13,11 +13,6 @@
|
|||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
namespace Internal {
|
|
||||||
namespace Ui {
|
|
||||||
class DirectoryFilterOptions;
|
|
||||||
} // namespace Ui
|
|
||||||
} // namespace Internal
|
|
||||||
|
|
||||||
class CORE_EXPORT DirectoryFilter : public BaseFileFilter
|
class CORE_EXPORT DirectoryFilter : public BaseFileFilter
|
||||||
{
|
{
|
||||||
@@ -53,8 +48,7 @@ private:
|
|||||||
QStringList m_exclusionFilters;
|
QStringList m_exclusionFilters;
|
||||||
// Our config dialog, uses in addDirectory and editDirectory
|
// Our config dialog, uses in addDirectory and editDirectory
|
||||||
// to give their dialogs the right parent
|
// to give their dialogs the right parent
|
||||||
QDialog *m_dialog = nullptr;
|
class DirectoryFilterOptions *m_dialog = nullptr;
|
||||||
Internal::Ui::DirectoryFilterOptions *m_ui = nullptr;
|
|
||||||
mutable QMutex m_lock;
|
mutable QMutex m_lock;
|
||||||
Utils::FilePaths m_files;
|
Utils::FilePaths m_files;
|
||||||
bool m_isCustomFilter = true;
|
bool m_isCustomFilter = true;
|
||||||
|
|||||||
@@ -1,214 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>Core::Internal::DirectoryFilterOptions</class>
|
|
||||||
<widget class="QDialog" name="Core::Internal::DirectoryFilterOptions">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>393</width>
|
|
||||||
<height>300</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<layout class="QGridLayout">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="nameLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Name:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1" colspan="3">
|
|
||||||
<widget class="QLineEdit" name="nameEdit"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="filePatternLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">File pattern:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1" colspan="3">
|
|
||||||
<widget class="QLineEdit" name="filePattern"/>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="exclusionPatternLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">Exclusion pattern:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1" colspan="3">
|
|
||||||
<widget class="QLineEdit" name="exclusionPattern"/>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="prefixLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">Prefix:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QLineEdit" name="shortcutEdit">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Specify a short word/abbreviation that can be used to restrict completions to files from this directory tree.
|
|
||||||
To do this, you type this shortcut and a space in the Locator entry field, and then the word to search for.</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="2" colspan="2">
|
|
||||||
<widget class="QCheckBox" name="defaultFlag">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">Include by default</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="3">
|
|
||||||
<layout class="QVBoxLayout" name="directoryButtonLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="addButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Add...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="editButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Edit...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="removeButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Remove</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<layout class="QVBoxLayout" name="directoryLabelLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="directoryLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Directories:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="directoryLabelSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1" colspan="2">
|
|
||||||
<widget class="QListWidget" name="directoryList">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>1</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</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="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>buttonBox</sender>
|
|
||||||
<signal>accepted()</signal>
|
|
||||||
<receiver>Core::Internal::DirectoryFilterOptions</receiver>
|
|
||||||
<slot>accept()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>353</x>
|
|
||||||
<y>174</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>390</x>
|
|
||||||
<y>152</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>buttonBox</sender>
|
|
||||||
<signal>rejected()</signal>
|
|
||||||
<receiver>Core::Internal::DirectoryFilterOptions</receiver>
|
|
||||||
<slot>reject()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>280</x>
|
|
||||||
<y>176</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>391</x>
|
|
||||||
<y>141</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
|
||||||
Reference in New Issue
Block a user