feat(settings): Correct spelling of 'folder' & add deleting folder method.
Description: 更正文件夹单词的拼写并添加设置列表删除功能 Log: 更正文件夹单词的拼写并添加设置列表删除功能
This commit is contained in:
parent
d33ea025a4
commit
c2d678492c
|
@ -1 +1,7 @@
|
|||
INCLUDEPATH += $$PWD
|
||||
|
||||
HEADERS += \
|
||||
$$PWD/app-match.h \
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/app-match.cpp \
|
||||
|
|
|
@ -2,7 +2,7 @@ INCLUDEPATH += $$PWD
|
|||
|
||||
HEADERS += \
|
||||
$$PWD/config-file.h \
|
||||
$$PWD/floder-list-item.h \
|
||||
$$PWD/folder-list-item.h \
|
||||
$$PWD/search-list-view.h \
|
||||
$$PWD/search-detail-view.h \
|
||||
$$PWD/option-view.h \
|
||||
|
@ -10,7 +10,7 @@ HEADERS += \
|
|||
|
||||
SOURCES += \
|
||||
$$PWD/config-file.cpp \
|
||||
$$PWD/floder-list-item.cpp \
|
||||
$$PWD/folder-list-item.cpp \
|
||||
$$PWD/search-list-view.cpp \
|
||||
$$PWD/search-detail-view.cpp \
|
||||
$$PWD/option-view.cpp \
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
#include "floder-list-item.h"
|
||||
#include "folder-list-item.h"
|
||||
#include <QIcon>
|
||||
#include <QEvent>
|
||||
|
||||
FloderListItem::FloderListItem(QWidget *parent, const QString &path) : QWidget(parent)
|
||||
FolderListItem::FolderListItem(QWidget *parent, const QString &path) : QWidget(parent)
|
||||
{
|
||||
m_path = path;
|
||||
initUi();
|
||||
}
|
||||
|
||||
FloderListItem::~FloderListItem()
|
||||
FolderListItem::~FolderListItem()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief FloderListItem::initUi 构建ui
|
||||
* @brief FolderListItem::initUi 构建ui
|
||||
*/
|
||||
void FloderListItem::initUi() {
|
||||
void FolderListItem::initUi() {
|
||||
m_layout = new QVBoxLayout(this);
|
||||
m_layout->setSpacing(0);
|
||||
m_layout->setContentsMargins(0,0,0,0);
|
||||
|
@ -33,7 +33,7 @@ void FloderListItem::initUi() {
|
|||
m_delLabel = new QLabel(m_widget);
|
||||
m_iconLabel->setPixmap(QIcon::fromTheme("inode-directory").pixmap(QSize(16, 16)));
|
||||
m_pathLabel->setText(m_path);
|
||||
m_delLabel->setText(tr("Delete the floder out of blacklist"));
|
||||
m_delLabel->setText(tr("Delete the folder out of blacklist"));
|
||||
m_pathLabel->setStyleSheet("QLabel{color: palette(text); background: transparent;}");
|
||||
m_delLabel->setStyleSheet("QLabel{color: #3790FA; background: transparent;}");
|
||||
m_delLabel->setCursor(QCursor(Qt::PointingHandCursor));
|
||||
|
@ -46,20 +46,28 @@ void FloderListItem::initUi() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief FloderListItem::enterEvent 鼠标移入事件
|
||||
* @brief FolderListItem::getPath 获取当前文件夹路径
|
||||
* @return
|
||||
*/
|
||||
QString FolderListItem::getPath() {
|
||||
return m_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief FolderListItem::enterEvent 鼠标移入事件
|
||||
* @param event
|
||||
*/
|
||||
void FloderListItem::enterEvent(QEvent *event){
|
||||
void FolderListItem::enterEvent(QEvent *event){
|
||||
m_delLabel->show();
|
||||
m_widget->setStyleSheet("QWidget#mWidget{background: rgba(0,0,0,0.1);}");
|
||||
QWidget::enterEvent(event);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief FloderListItem::leaveEvent 鼠标移出事件
|
||||
* @brief FolderListItem::leaveEvent 鼠标移出事件
|
||||
* @param event
|
||||
*/
|
||||
void FloderListItem::leaveEvent(QEvent *event){
|
||||
void FolderListItem::leaveEvent(QEvent *event){
|
||||
m_delLabel->hide();
|
||||
m_widget->setStyleSheet("QWidget#mWidget{background: transparent;}");
|
||||
QWidget::leaveEvent(event);
|
||||
|
@ -67,15 +75,16 @@ void FloderListItem::leaveEvent(QEvent *event){
|
|||
|
||||
|
||||
/**
|
||||
* @brief FloderListItem::eventFilter 处理删除按钮点击事件
|
||||
* @brief FolderListItem::eventFilter 处理删除按钮点击事件
|
||||
* @param watched
|
||||
* @param event
|
||||
* @return
|
||||
*/
|
||||
bool FloderListItem::eventFilter(QObject *watched, QEvent *event){
|
||||
bool FolderListItem::eventFilter(QObject *watched, QEvent *event){
|
||||
if (watched == m_delLabel) {
|
||||
if (event->type() == QEvent::MouseButtonPress) {
|
||||
// qDebug()<<"pressed!";
|
||||
Q_EMIT this->onDelBtnClicked(m_path);
|
||||
}
|
||||
}
|
||||
return QObject::eventFilter(watched, event);
|
|
@ -1,21 +1,22 @@
|
|||
#ifndef FLODERLISTITEM_H
|
||||
#define FLODERLISTITEM_H
|
||||
#ifndef FOLDERLISTITEM_H
|
||||
#define FOLDERLISTITEM_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
#include <QLabel>
|
||||
|
||||
class FloderListItem : public QWidget
|
||||
class FolderListItem : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit FloderListItem(QWidget *parent = nullptr, const QString &path = 0);
|
||||
~FloderListItem();
|
||||
explicit FolderListItem(QWidget *parent = nullptr, const QString &path = 0);
|
||||
~FolderListItem();
|
||||
QString getPath();
|
||||
|
||||
protected:
|
||||
virtual void enterEvent(QEvent * event);
|
||||
virtual void leaveEvent(QEvent * event);
|
||||
virtual void enterEvent(QEvent *);
|
||||
virtual void leaveEvent(QEvent *);
|
||||
bool eventFilter(QObject *, QEvent *);
|
||||
|
||||
private:
|
||||
|
@ -30,6 +31,7 @@ private:
|
|||
QLabel * m_pathLabel = nullptr;
|
||||
QLabel * m_delLabel = nullptr;
|
||||
Q_SIGNALS:
|
||||
void onDelBtnClicked(const QString&);
|
||||
};
|
||||
|
||||
#endif // FLODERLISTITEM_H
|
||||
#endif // FOLDERLISTITEM_H
|
|
@ -4,63 +4,63 @@
|
|||
<context>
|
||||
<name>ContentWidget</name>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="80"/>
|
||||
<location filename="../../content-widget.cpp" line="80"/>
|
||||
<source>Recently Opened</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="99"/>
|
||||
<location filename="../../content-widget.cpp" line="99"/>
|
||||
<source>Open Quickly</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="104"/>
|
||||
<location filename="../../content-widget.cpp" line="104"/>
|
||||
<source>Commonly Used</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="212"/>
|
||||
<location filename="../../content-widget.cpp" line="212"/>
|
||||
<source>Apps</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="214"/>
|
||||
<location filename="../../content-widget.cpp" line="214"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="216"/>
|
||||
<location filename="../../content-widget.cpp" line="216"/>
|
||||
<source>Files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="218"/>
|
||||
<location filename="../../content-widget.cpp" line="218"/>
|
||||
<source>Dirs</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="220"/>
|
||||
<location filename="../../content-widget.cpp" line="220"/>
|
||||
<source>Best Matches</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="222"/>
|
||||
<location filename="../../content-widget.cpp" line="222"/>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FloderListItem</name>
|
||||
<name>FolderListItem</name>
|
||||
<message>
|
||||
<location filename="../../control/floder-list-item.cpp" line="36"/>
|
||||
<source>Delete the floder out of blacklist</source>
|
||||
<location filename="../../control/folder-list-item.cpp" line="36"/>
|
||||
<source>Delete the folder out of blacklist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../../src/mainwindow.cpp" line="125"/>
|
||||
<location filename="../../mainwindow.cpp" line="119"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -96,7 +96,7 @@
|
|||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../src/main.cpp" line="71"/>
|
||||
<location filename="../../main.cpp" line="71"/>
|
||||
<source>ukui-search is already running!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -127,88 +127,88 @@
|
|||
<context>
|
||||
<name>SettingsWidget</name>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="49"/>
|
||||
<location filename="../../settings-widget.cpp" line="49"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="66"/>
|
||||
<location filename="../../settings-widget.cpp" line="66"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="72"/>
|
||||
<location filename="../../settings-widget.cpp" line="72"/>
|
||||
<source>Index State</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="75"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="77"/>
|
||||
<location filename="../../settings-widget.cpp" line="75"/>
|
||||
<location filename="../../settings-widget.cpp" line="77"/>
|
||||
<source>...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="84"/>
|
||||
<location filename="../../settings-widget.cpp" line="84"/>
|
||||
<source>File Index Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="87"/>
|
||||
<location filename="../../settings-widget.cpp" line="87"/>
|
||||
<source>Following folders will not be searched. You can set it by adding and removing folders.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="96"/>
|
||||
<location filename="../../settings-widget.cpp" line="96"/>
|
||||
<source>Add ignored folders</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="117"/>
|
||||
<location filename="../../settings-widget.cpp" line="117"/>
|
||||
<source>Search Engine Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="120"/>
|
||||
<location filename="../../settings-widget.cpp" line="120"/>
|
||||
<source>Please select search engine you preferred.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="133"/>
|
||||
<location filename="../../settings-widget.cpp" line="133"/>
|
||||
<source>baidu</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="135"/>
|
||||
<location filename="../../settings-widget.cpp" line="135"/>
|
||||
<source>sougou</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="137"/>
|
||||
<location filename="../../settings-widget.cpp" line="137"/>
|
||||
<source>360</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="160"/>
|
||||
<location filename="../../settings-widget.cpp" line="160"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="164"/>
|
||||
<location filename="../../settings-widget.cpp" line="164"/>
|
||||
<source>Confirm</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="194"/>
|
||||
<location filename="../../settings-widget.cpp" line="194"/>
|
||||
<source>Creating ...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="197"/>
|
||||
<location filename="../../settings-widget.cpp" line="197"/>
|
||||
<source>Done</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="205"/>
|
||||
<location filename="../../settings-widget.cpp" line="205"/>
|
||||
<source>Index Entry: %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -4,63 +4,63 @@
|
|||
<context>
|
||||
<name>ContentWidget</name>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="80"/>
|
||||
<location filename="../../content-widget.cpp" line="80"/>
|
||||
<source>Recently Opened</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="99"/>
|
||||
<location filename="../../content-widget.cpp" line="99"/>
|
||||
<source>Open Quickly</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="104"/>
|
||||
<location filename="../../content-widget.cpp" line="104"/>
|
||||
<source>Commonly Used</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="212"/>
|
||||
<location filename="../../content-widget.cpp" line="212"/>
|
||||
<source>Apps</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="214"/>
|
||||
<location filename="../../content-widget.cpp" line="214"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="216"/>
|
||||
<location filename="../../content-widget.cpp" line="216"/>
|
||||
<source>Files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="218"/>
|
||||
<location filename="../../content-widget.cpp" line="218"/>
|
||||
<source>Dirs</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="220"/>
|
||||
<location filename="../../content-widget.cpp" line="220"/>
|
||||
<source>Best Matches</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="222"/>
|
||||
<location filename="../../content-widget.cpp" line="222"/>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FloderListItem</name>
|
||||
<name>FolderListItem</name>
|
||||
<message>
|
||||
<location filename="../../control/floder-list-item.cpp" line="36"/>
|
||||
<source>Delete the floder out of blacklist</source>
|
||||
<location filename="../../control/folder-list-item.cpp" line="36"/>
|
||||
<source>Delete the folder out of blacklist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../../src/mainwindow.cpp" line="125"/>
|
||||
<location filename="../../mainwindow.cpp" line="119"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -96,7 +96,7 @@
|
|||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../src/main.cpp" line="71"/>
|
||||
<location filename="../../main.cpp" line="71"/>
|
||||
<source>ukui-search is already running!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -127,88 +127,88 @@
|
|||
<context>
|
||||
<name>SettingsWidget</name>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="49"/>
|
||||
<location filename="../../settings-widget.cpp" line="49"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="66"/>
|
||||
<location filename="../../settings-widget.cpp" line="66"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="72"/>
|
||||
<location filename="../../settings-widget.cpp" line="72"/>
|
||||
<source>Index State</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="75"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="77"/>
|
||||
<location filename="../../settings-widget.cpp" line="75"/>
|
||||
<location filename="../../settings-widget.cpp" line="77"/>
|
||||
<source>...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="84"/>
|
||||
<location filename="../../settings-widget.cpp" line="84"/>
|
||||
<source>File Index Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="87"/>
|
||||
<location filename="../../settings-widget.cpp" line="87"/>
|
||||
<source>Following folders will not be searched. You can set it by adding and removing folders.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="96"/>
|
||||
<location filename="../../settings-widget.cpp" line="96"/>
|
||||
<source>Add ignored folders</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="117"/>
|
||||
<location filename="../../settings-widget.cpp" line="117"/>
|
||||
<source>Search Engine Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="120"/>
|
||||
<location filename="../../settings-widget.cpp" line="120"/>
|
||||
<source>Please select search engine you preferred.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="133"/>
|
||||
<location filename="../../settings-widget.cpp" line="133"/>
|
||||
<source>baidu</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="135"/>
|
||||
<location filename="../../settings-widget.cpp" line="135"/>
|
||||
<source>sougou</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="137"/>
|
||||
<location filename="../../settings-widget.cpp" line="137"/>
|
||||
<source>360</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="160"/>
|
||||
<location filename="../../settings-widget.cpp" line="160"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="164"/>
|
||||
<location filename="../../settings-widget.cpp" line="164"/>
|
||||
<source>Confirm</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="194"/>
|
||||
<location filename="../../settings-widget.cpp" line="194"/>
|
||||
<source>Creating ...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="197"/>
|
||||
<location filename="../../settings-widget.cpp" line="197"/>
|
||||
<source>Done</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="205"/>
|
||||
<location filename="../../settings-widget.cpp" line="205"/>
|
||||
<source>Index Entry: %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -4,63 +4,63 @@
|
|||
<context>
|
||||
<name>ContentWidget</name>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="80"/>
|
||||
<location filename="../../content-widget.cpp" line="80"/>
|
||||
<source>Recently Opened</source>
|
||||
<translation type="unfinished">最近</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="99"/>
|
||||
<location filename="../../content-widget.cpp" line="99"/>
|
||||
<source>Open Quickly</source>
|
||||
<translation type="unfinished">快速</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="104"/>
|
||||
<location filename="../../content-widget.cpp" line="104"/>
|
||||
<source>Commonly Used</source>
|
||||
<translation type="unfinished">常用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="212"/>
|
||||
<location filename="../../content-widget.cpp" line="212"/>
|
||||
<source>Apps</source>
|
||||
<translation type="unfinished">应用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="214"/>
|
||||
<location filename="../../content-widget.cpp" line="214"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished">配置项</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="216"/>
|
||||
<location filename="../../content-widget.cpp" line="216"/>
|
||||
<source>Files</source>
|
||||
<translation type="unfinished">文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="218"/>
|
||||
<location filename="../../content-widget.cpp" line="218"/>
|
||||
<source>Dirs</source>
|
||||
<translation type="unfinished">文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="220"/>
|
||||
<location filename="../../content-widget.cpp" line="220"/>
|
||||
<source>Best Matches</source>
|
||||
<translation type="unfinished">最佳匹配</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="222"/>
|
||||
<location filename="../../content-widget.cpp" line="222"/>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished">未知</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FloderListItem</name>
|
||||
<name>FolderListItem</name>
|
||||
<message>
|
||||
<location filename="../../control/floder-list-item.cpp" line="36"/>
|
||||
<source>Delete the floder out of blacklist</source>
|
||||
<location filename="../../control/folder-list-item.cpp" line="36"/>
|
||||
<source>Delete the folder out of blacklist</source>
|
||||
<translation type="unfinished">删除</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../../src/mainwindow.cpp" line="125"/>
|
||||
<location filename="../../mainwindow.cpp" line="119"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished">从列表搜索</translation>
|
||||
</message>
|
||||
|
@ -96,7 +96,7 @@
|
|||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../src/main.cpp" line="71"/>
|
||||
<location filename="../../main.cpp" line="71"/>
|
||||
<source>ukui-search is already running!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -127,88 +127,88 @@
|
|||
<context>
|
||||
<name>SettingsWidget</name>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="49"/>
|
||||
<location filename="../../settings-widget.cpp" line="49"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished">搜索</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="66"/>
|
||||
<location filename="../../settings-widget.cpp" line="66"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished">配置项</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="72"/>
|
||||
<location filename="../../settings-widget.cpp" line="72"/>
|
||||
<source>Index State</source>
|
||||
<translation type="unfinished">索引状态</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="75"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="77"/>
|
||||
<location filename="../../settings-widget.cpp" line="75"/>
|
||||
<location filename="../../settings-widget.cpp" line="77"/>
|
||||
<source>...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="84"/>
|
||||
<location filename="../../settings-widget.cpp" line="84"/>
|
||||
<source>File Index Settings</source>
|
||||
<translation type="unfinished">文件索引设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="87"/>
|
||||
<location filename="../../settings-widget.cpp" line="87"/>
|
||||
<source>Following folders will not be searched. You can set it by adding and removing folders.</source>
|
||||
<translation type="unfinished">搜索将不再查看以下文件夹。通过增加和删除文件夹可进行文件索引设置。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="96"/>
|
||||
<location filename="../../settings-widget.cpp" line="96"/>
|
||||
<source>Add ignored folders</source>
|
||||
<translation type="unfinished">添加禁止索引文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="117"/>
|
||||
<location filename="../../settings-widget.cpp" line="117"/>
|
||||
<source>Search Engine Settings</source>
|
||||
<translation type="unfinished">搜索引擎设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="120"/>
|
||||
<location filename="../../settings-widget.cpp" line="120"/>
|
||||
<source>Please select search engine you preferred.</source>
|
||||
<translation type="unfinished">设置互联网搜索引擎</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="133"/>
|
||||
<location filename="../../settings-widget.cpp" line="133"/>
|
||||
<source>baidu</source>
|
||||
<translation type="unfinished">百度</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="135"/>
|
||||
<location filename="../../settings-widget.cpp" line="135"/>
|
||||
<source>sougou</source>
|
||||
<translation type="unfinished">搜狗</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="137"/>
|
||||
<location filename="../../settings-widget.cpp" line="137"/>
|
||||
<source>360</source>
|
||||
<translation type="unfinished">360</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="160"/>
|
||||
<location filename="../../settings-widget.cpp" line="160"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished">取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="164"/>
|
||||
<location filename="../../settings-widget.cpp" line="164"/>
|
||||
<source>Confirm</source>
|
||||
<translation type="unfinished">确认</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="194"/>
|
||||
<location filename="../../settings-widget.cpp" line="194"/>
|
||||
<source>Creating ...</source>
|
||||
<translation type="unfinished">正在索引</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="197"/>
|
||||
<location filename="../../settings-widget.cpp" line="197"/>
|
||||
<source>Done</source>
|
||||
<translation type="unfinished">索引完成</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="205"/>
|
||||
<location filename="../../settings-widget.cpp" line="205"/>
|
||||
<source>Index Entry: %1</source>
|
||||
<translation type="unfinished">索引项: %1</translation>
|
||||
</message>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <QFileDialog>
|
||||
#include <QDir>
|
||||
#include <QDebug>
|
||||
#include "floder-list-item.h"
|
||||
#include "folder-list-item.h"
|
||||
|
||||
extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed);
|
||||
SettingsWidget::SettingsWidget(QWidget *parent) : QWidget(parent)
|
||||
|
@ -178,13 +178,30 @@ void SettingsWidget::initUi() {
|
|||
*/
|
||||
void SettingsWidget::setupBlackList(const QStringList& list) {
|
||||
Q_FOREACH(QString path, list) {
|
||||
FloderListItem * item = new FloderListItem(m_dirListWidget, path);
|
||||
FolderListItem * item = new FolderListItem(m_dirListWidget, path);
|
||||
m_dirListLyt->addWidget(item);
|
||||
item->setMaximumWidth(470);
|
||||
//测试用,实际调用中应等待后端完成操作后删除该控件
|
||||
connect(item, SIGNAL(onDelBtnClicked(const QString&)), this, SLOT(onBtnDelClicked(const QString&)));
|
||||
}
|
||||
m_dirListLyt->addStretch();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SettingsWidget::onBtnDelClicked 删除黑名单中的目录
|
||||
* @param path 文件夹路径
|
||||
*/
|
||||
void SettingsWidget::onBtnDelClicked(const QString& path) {
|
||||
qDebug()<<path;
|
||||
Q_FOREACH (FolderListItem * item, m_dirListWidget->findChildren<FolderListItem*>()) {
|
||||
if (item->getPath() == path) {
|
||||
item->deleteLater();
|
||||
item = NULL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief setIndexState 设置当前索引状态
|
||||
* @param isCreatingIndex 是否正在创建索引
|
||||
|
|
|
@ -73,6 +73,7 @@ private Q_SLOTS:
|
|||
void onBtnConfirmClicked();
|
||||
void onBtnCancelClicked();
|
||||
void onBtnAddClicked();
|
||||
void onBtnDelClicked(const QString&);
|
||||
};
|
||||
|
||||
#endif // SETTINGSWIDGET_H
|
||||
|
|
Loading…
Reference in New Issue