fix(frontend): Add 'Show More' label to hide items when resultList is too lang.
Description: 添加‘显示更多’和‘收起’按钮 Log: 添加‘显示更多’和‘收起’按钮 Bug: -
This commit is contained in:
parent
7187c2b4ad
commit
1a7f52b85c
|
@ -50,7 +50,7 @@ void FileSearcher::onKeywordSearch(QString keyword,QQueue<QString> *searchResult
|
|||
int num = 5;
|
||||
int resultCount = 0;
|
||||
int total = 0;
|
||||
while(total<20)
|
||||
while(total<40)
|
||||
{
|
||||
resultCount = keywordSearchfile(uniqueSymbol1,keyword,"0",1,begin,num);
|
||||
if(resultCount == 0 || resultCount == -1)
|
||||
|
@ -68,7 +68,7 @@ void FileSearcher::onKeywordSearch(QString keyword,QQueue<QString> *searchResult
|
|||
int num = 5;
|
||||
int resultCount = 0;
|
||||
int total = 0;
|
||||
while(total<20)
|
||||
while(total<40)
|
||||
{
|
||||
resultCount = keywordSearchfile(uniqueSymbol2,keyword,"1",1,begin,num);
|
||||
if(resultCount == 0 || resultCount == -1)
|
||||
|
@ -87,7 +87,7 @@ void FileSearcher::onKeywordSearch(QString keyword,QQueue<QString> *searchResult
|
|||
int resultCount = 0;
|
||||
int total = 0;
|
||||
|
||||
while(total<20)
|
||||
while(total<40)
|
||||
{
|
||||
keywordSearchContent(uniqueSymbol3,keyword,begin,num);
|
||||
if(resultCount == 0 || resultCount == -1)
|
||||
|
|
|
@ -121,21 +121,83 @@ void ContentWidget::initListView()
|
|||
m_bestTitleLabel->setStyleSheet("QLabel{background: rgba(0,0,0,0.1);}");
|
||||
m_bestTitleLabel->setText(getTitleName(SearchItem::SearchType::Best));
|
||||
|
||||
m_appShowMoreLabel = new ShowMoreLabel(m_resultList);
|
||||
m_settingShowMoreLabel = new ShowMoreLabel(m_resultList);
|
||||
m_dirShowMoreLabel = new ShowMoreLabel(m_resultList);
|
||||
m_fileShowMoreLabel = new ShowMoreLabel(m_resultList);
|
||||
m_contentShowMoreLabel = new ShowMoreLabel(m_resultList);
|
||||
|
||||
m_listLyt->addWidget(m_bestTitleLabel);
|
||||
m_listLyt->addWidget(m_bestListView);
|
||||
m_listLyt->addWidget(m_appTitleLabel);
|
||||
m_listLyt->addWidget(m_appListView);
|
||||
m_listLyt->addWidget(m_appShowMoreLabel);
|
||||
m_listLyt->addWidget(m_settingTitleLabel);
|
||||
m_listLyt->addWidget(m_settingListView);
|
||||
m_listLyt->addWidget(m_settingShowMoreLabel);
|
||||
m_listLyt->addWidget(m_dirTitleLabel);
|
||||
m_listLyt->addWidget(m_dirListView);
|
||||
m_listLyt->addWidget(m_dirShowMoreLabel);
|
||||
m_listLyt->addWidget(m_fileTitleLabel);
|
||||
m_listLyt->addWidget(m_fileListView);
|
||||
m_listLyt->addWidget(m_fileShowMoreLabel);
|
||||
m_listLyt->addWidget(m_contentTitleLabel);
|
||||
m_listLyt->addWidget(m_contentListView);
|
||||
m_listLyt->addWidget(m_contentShowMoreLabel);
|
||||
|
||||
this->hideListView();
|
||||
m_resultList->setFixedHeight(0);
|
||||
|
||||
connect(m_appShowMoreLabel, &ShowMoreLabel::showMoreClicked, this, [ = ]() {
|
||||
m_appListView->setList(m_appList);
|
||||
m_appShowMoreLabel->stopLoading();
|
||||
this->resetListHeight();
|
||||
});
|
||||
connect(m_appShowMoreLabel, &ShowMoreLabel::retractClicked, this, [ = ]() {
|
||||
m_appListView->setList(m_appList.mid(0, 5));
|
||||
m_appShowMoreLabel->stopLoading();
|
||||
this->resetListHeight();
|
||||
});
|
||||
connect(m_settingShowMoreLabel, &ShowMoreLabel::showMoreClicked, this, [ = ]() {
|
||||
m_settingListView->setList(m_settingList);
|
||||
m_settingShowMoreLabel->stopLoading();
|
||||
this->resetListHeight();
|
||||
});
|
||||
connect(m_settingShowMoreLabel, &ShowMoreLabel::retractClicked, this, [ = ]() {
|
||||
m_settingListView->setList(m_settingList.mid(0, 5));
|
||||
m_settingShowMoreLabel->stopLoading();
|
||||
this->resetListHeight();
|
||||
});
|
||||
connect(m_dirShowMoreLabel, &ShowMoreLabel::showMoreClicked, this, [ = ]() {
|
||||
m_dirListView->setList(m_dirList);
|
||||
m_dirShowMoreLabel->stopLoading();
|
||||
this->resetListHeight();
|
||||
});
|
||||
connect(m_dirShowMoreLabel, &ShowMoreLabel::retractClicked, this, [ = ]() {
|
||||
m_dirListView->setList(m_dirList.mid(0, 5));
|
||||
m_dirShowMoreLabel->stopLoading();
|
||||
this->resetListHeight();
|
||||
});
|
||||
connect(m_fileShowMoreLabel, &ShowMoreLabel::showMoreClicked, this, [ = ]() {
|
||||
m_fileListView->setList(m_fileList);
|
||||
m_fileShowMoreLabel->stopLoading();
|
||||
this->resetListHeight();
|
||||
});
|
||||
connect(m_fileShowMoreLabel, &ShowMoreLabel::retractClicked, this, [ = ]() {
|
||||
m_fileListView->setList(m_fileList.mid(0, 5));
|
||||
m_fileShowMoreLabel->stopLoading();
|
||||
this->resetListHeight();
|
||||
});
|
||||
connect(m_contentShowMoreLabel, &ShowMoreLabel::showMoreClicked, this, [ = ]() {
|
||||
m_contentListView->setList(m_contentList);
|
||||
m_contentShowMoreLabel->stopLoading();
|
||||
this->resetListHeight();
|
||||
});
|
||||
connect(m_contentShowMoreLabel, &ShowMoreLabel::retractClicked, this, [ = ]() {
|
||||
m_contentListView->setList(m_contentList.mid(0, 5));
|
||||
m_contentShowMoreLabel->stopLoading();
|
||||
this->resetListHeight();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -147,14 +209,19 @@ void ContentWidget::hideListView()
|
|||
m_bestListView->hide();
|
||||
m_appTitleLabel->hide();
|
||||
m_appListView->hide();
|
||||
m_appShowMoreLabel->hide();
|
||||
m_settingTitleLabel->hide();
|
||||
m_settingListView->hide();
|
||||
m_settingShowMoreLabel->hide();
|
||||
m_dirTitleLabel->hide();
|
||||
m_dirListView->hide();
|
||||
m_dirShowMoreLabel->hide();
|
||||
m_fileTitleLabel->hide();
|
||||
m_fileListView->hide();
|
||||
m_fileShowMoreLabel->hide();
|
||||
m_contentTitleLabel->hide();
|
||||
m_contentListView->hide();
|
||||
m_contentShowMoreLabel->hide();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -163,8 +230,8 @@ void ContentWidget::hideListView()
|
|||
*/
|
||||
void ContentWidget::setupConnect(SearchListView * listview) {
|
||||
connect(listview, &SearchListView::currentRowChanged, this, [ = ](const int& type, const QString& path) {
|
||||
if(type == SearchItem::SearchType::Contents && !m_contentList.isEmpty()) {
|
||||
m_detailView->setContent(m_contentList.at(listview->currentIndex().row()), m_keyword);
|
||||
if(type == SearchItem::SearchType::Contents && !m_contentDetailList.isEmpty()) {
|
||||
m_detailView->setContent(m_contentDetailList.at(listview->currentIndex().row()), m_keyword);
|
||||
}
|
||||
m_detailView->setupWidget(type, path);
|
||||
listview->is_current_list = true;
|
||||
|
@ -193,22 +260,37 @@ void ContentWidget::resetListHeight()
|
|||
if (! m_appListView->isHidden) {
|
||||
height += m_appTitleLabel->height();
|
||||
height += m_appListView->height();
|
||||
if (m_appShowMoreLabel->isVisible()) {
|
||||
height += m_appShowMoreLabel->height();
|
||||
}
|
||||
}
|
||||
if (! m_settingListView->isHidden) {
|
||||
height += m_settingTitleLabel->height();
|
||||
height += m_settingListView->height();
|
||||
if (m_settingShowMoreLabel->isVisible()) {
|
||||
height += m_settingShowMoreLabel->height();
|
||||
}
|
||||
}
|
||||
if (! m_fileListView->isHidden) {
|
||||
height += m_fileTitleLabel->height();
|
||||
height += m_fileListView->height();
|
||||
if (m_fileShowMoreLabel->isVisible()) {
|
||||
height += m_fileShowMoreLabel->height();
|
||||
}
|
||||
}
|
||||
if (! m_dirListView->isHidden) {
|
||||
height += m_dirTitleLabel->height();
|
||||
height += m_dirListView->height();
|
||||
if (m_dirShowMoreLabel->isVisible()) {
|
||||
height += m_dirShowMoreLabel->height();
|
||||
}
|
||||
}
|
||||
if (! m_contentListView->isHidden) {
|
||||
height += m_contentTitleLabel->height();
|
||||
height += m_contentListView->height();
|
||||
if (m_contentShowMoreLabel->isVisible()) {
|
||||
height += m_contentShowMoreLabel->height();
|
||||
}
|
||||
}
|
||||
m_resultList->setFixedHeight(height);
|
||||
}
|
||||
|
@ -301,30 +383,35 @@ void ContentWidget::refreshSearchList(const QVector<QStringList>& lists) {
|
|||
if (m_fileListView) {
|
||||
m_fileListView->hide();
|
||||
m_fileTitleLabel->hide();
|
||||
m_fileShowMoreLabel->hide();
|
||||
m_fileListView->isHidden = true;
|
||||
m_fileListView->clear();
|
||||
}
|
||||
if (m_dirListView) {
|
||||
m_dirListView->hide();
|
||||
m_dirTitleLabel->hide();
|
||||
m_dirShowMoreLabel->hide();
|
||||
m_dirListView->isHidden = true;
|
||||
m_dirListView->clear();
|
||||
}
|
||||
if (m_contentListView) {
|
||||
m_contentListView->hide();
|
||||
m_contentTitleLabel->hide();
|
||||
m_contentShowMoreLabel->hide();
|
||||
m_contentListView->isHidden = true;
|
||||
m_contentListView->clear();
|
||||
}
|
||||
if (m_appListView) {
|
||||
m_appListView->hide();
|
||||
m_appTitleLabel->hide();
|
||||
m_appShowMoreLabel->hide();
|
||||
m_appListView->isHidden = true;
|
||||
m_appListView->clear();
|
||||
}
|
||||
if (m_settingListView) {
|
||||
m_settingListView->hide();
|
||||
m_settingTitleLabel->hide();
|
||||
m_settingShowMoreLabel->hide();
|
||||
m_settingListView->isHidden = true;
|
||||
m_settingListView->clear();
|
||||
}
|
||||
|
@ -337,25 +424,44 @@ void ContentWidget::refreshSearchList(const QVector<QStringList>& lists) {
|
|||
m_resultList->setFixedHeight(0);
|
||||
m_detailView->clearLayout();
|
||||
|
||||
if (! m_appList.isEmpty())
|
||||
m_appList.clear();
|
||||
if (! m_settingList.isEmpty())
|
||||
m_settingList.clear();
|
||||
if (! m_dirList.isEmpty())
|
||||
m_dirList.clear();
|
||||
if (! m_fileList.isEmpty())
|
||||
m_fileList.clear();
|
||||
if (! m_contentList.isEmpty())
|
||||
m_contentList.clear();
|
||||
|
||||
if (!lists.at(0).isEmpty()) {
|
||||
m_appList = lists.at(0);
|
||||
qDebug()<<"Append a best item into list: "<<lists.at(0).at(0);
|
||||
appendSearchItem(SearchItem::SearchType::Best, lists.at(0).at(0));
|
||||
}
|
||||
if (!lists.at(1).isEmpty()) {
|
||||
qDebug()<<"Append a best item into list: "<<lists.at(1).at(0);
|
||||
appendSearchItem(SearchItem::SearchType::Best, lists.at(1).at(0));
|
||||
}
|
||||
if (!lists.at(0).isEmpty()) {
|
||||
m_appListView->show();
|
||||
m_appTitleLabel->show();
|
||||
m_appListView->isHidden = false;
|
||||
m_appListView->appendList(lists.at(0));
|
||||
if (m_appList.length() <= 5) {
|
||||
m_appListView->setList(m_appList);
|
||||
} else {
|
||||
m_appShowMoreLabel->show();
|
||||
m_appListView->setList(m_appList.mid(0, 5));
|
||||
}
|
||||
}
|
||||
if (!lists.at(1).isEmpty()) {
|
||||
m_settingList = lists.at(1);
|
||||
qDebug()<<"Append a best item into list: "<<lists.at(1).at(0);
|
||||
appendSearchItem(SearchItem::SearchType::Best, lists.at(1).at(0));
|
||||
m_settingListView->show();
|
||||
m_settingTitleLabel->show();
|
||||
m_settingListView->isHidden = false;
|
||||
m_settingListView->appendList(lists.at(1));
|
||||
if (m_settingList.length() <= 5) {
|
||||
m_settingListView->setList(m_settingList);
|
||||
} else {
|
||||
m_settingShowMoreLabel->show();
|
||||
m_settingListView->setList(m_settingList.mid(0, 5));
|
||||
}
|
||||
}
|
||||
this->resetListHeight();
|
||||
}
|
||||
|
@ -415,7 +521,12 @@ void ContentWidget::appendSearchItem(const int& type, const QString& path, QStri
|
|||
m_fileListView->isHidden = false;
|
||||
appendSearchItem(SearchItem::SearchType::Best, path);
|
||||
}
|
||||
m_fileListView->appendItem(path);
|
||||
if (m_fileListView->getLength() < 5) {
|
||||
m_fileListView->appendItem(path);
|
||||
} else if (m_fileListView->getLength() == 5) {
|
||||
m_fileShowMoreLabel->show();
|
||||
}
|
||||
m_fileList.append(path);
|
||||
break;;
|
||||
}
|
||||
case SearchItem::SearchType::Dirs: {
|
||||
|
@ -425,7 +536,12 @@ void ContentWidget::appendSearchItem(const int& type, const QString& path, QStri
|
|||
m_dirListView->isHidden = false;
|
||||
appendSearchItem(SearchItem::SearchType::Best, path);
|
||||
}
|
||||
m_dirListView->appendItem(path);
|
||||
if (m_dirListView->getLength() < 5) {
|
||||
m_dirListView->appendItem(path);
|
||||
} else if (m_dirListView->getLength() == 5) {
|
||||
m_dirShowMoreLabel->show();
|
||||
}
|
||||
m_dirList.append(path);
|
||||
break;
|
||||
}
|
||||
case SearchItem::SearchType::Contents: {
|
||||
|
@ -435,7 +551,12 @@ void ContentWidget::appendSearchItem(const int& type, const QString& path, QStri
|
|||
m_contentListView->isHidden = false;
|
||||
appendSearchItem(SearchItem::SearchType::Best, path);
|
||||
}
|
||||
m_contentListView->appendItem(path);
|
||||
if (m_contentListView->getLength() < 5) {
|
||||
m_contentListView->appendItem(path);
|
||||
} else if (m_contentListView->getLength() == 5) {
|
||||
m_contentShowMoreLabel->show();
|
||||
}
|
||||
m_contentList.append(path);
|
||||
QString temp;
|
||||
for (int i = 0; i < contents.length(); i ++) {
|
||||
temp.append(contents.at(i));
|
||||
|
@ -443,7 +564,7 @@ void ContentWidget::appendSearchItem(const int& type, const QString& path, QStri
|
|||
temp.append("\n");
|
||||
}
|
||||
}
|
||||
m_contentList.append(temp);
|
||||
m_contentDetailList.append(temp);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -482,7 +603,6 @@ QString ContentWidget::getTitleName(const int& type) {
|
|||
* @param layout 需要清空的布局
|
||||
*/
|
||||
void ContentWidget::clearLayout(QLayout * layout) {
|
||||
m_contentList.clear();
|
||||
if (! layout) return;
|
||||
QLayoutItem * child;
|
||||
while ((child = layout->takeAt(0)) != 0) {
|
||||
|
@ -501,8 +621,8 @@ void ContentWidget::clearLayout(QLayout * layout) {
|
|||
* @param list
|
||||
*/
|
||||
void ContentWidget::setContentList(const QStringList& list) {
|
||||
m_contentList.clear();
|
||||
m_contentList = list;
|
||||
m_contentDetailList.clear();
|
||||
m_contentDetailList = list;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <QGridLayout>
|
||||
#include "control/search-detail-view.h"
|
||||
#include "home-page-item.h"
|
||||
#include "show-more-label.h"
|
||||
|
||||
class ContentWidget : public QStackedWidget
|
||||
{
|
||||
|
@ -30,7 +31,7 @@ private:
|
|||
void clearHomepage();
|
||||
void resetListHeight();
|
||||
QString m_keyword;
|
||||
QStringList m_contentList;
|
||||
QStringList m_contentDetailList;
|
||||
QWidget * m_homePage = nullptr;
|
||||
QVBoxLayout * m_homePageLyt = nullptr;
|
||||
QWidget * m_resultPage = nullptr;
|
||||
|
@ -55,6 +56,17 @@ private:
|
|||
QLabel * m_appTitleLabel = nullptr;
|
||||
QLabel * m_settingTitleLabel = nullptr;
|
||||
QLabel * m_bestTitleLabel = nullptr;
|
||||
ShowMoreLabel * m_appShowMoreLabel = nullptr;
|
||||
ShowMoreLabel * m_settingShowMoreLabel = nullptr;
|
||||
ShowMoreLabel * m_dirShowMoreLabel = nullptr;
|
||||
ShowMoreLabel * m_fileShowMoreLabel = nullptr;
|
||||
ShowMoreLabel * m_contentShowMoreLabel = nullptr;
|
||||
|
||||
QStringList m_appList;
|
||||
QStringList m_settingList;
|
||||
QStringList m_dirList;
|
||||
QStringList m_fileList;
|
||||
QStringList m_contentList;
|
||||
|
||||
int m_currentType = 0;
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ HEADERS += \
|
|||
$$PWD/search-detail-view.h \
|
||||
$$PWD/option-view.h \
|
||||
$$PWD/home-page-item.h \
|
||||
$$PWD/show-more-label.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/config-file.cpp \
|
||||
|
@ -17,3 +18,4 @@ SOURCES += \
|
|||
$$PWD/search-detail-view.cpp \
|
||||
$$PWD/option-view.cpp \
|
||||
$$PWD/home-page-item.cpp \
|
||||
$$PWD/show-more-label.cpp
|
||||
|
|
|
@ -51,12 +51,12 @@ void SearchListView::appendItem(QString path) {
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief SearchListView::appendList 添加整个列表
|
||||
* @brief SearchListView::setList 设置整个列表
|
||||
*/
|
||||
void SearchListView::appendList(QStringList list)
|
||||
void SearchListView::setList(QStringList list)
|
||||
{
|
||||
m_model->appendList(list);
|
||||
rowheight = this->rowHeight(this->model()->index(0, 0, QModelIndex())) + 1;
|
||||
rowheight = this->rowHeight(this->model()->index(0, 0, QModelIndex()));
|
||||
this->setFixedHeight(m_item->getCurrentSize() * rowheight + 3);
|
||||
}
|
||||
|
||||
|
@ -95,6 +95,15 @@ int SearchListView::getType()
|
|||
return m_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SearchListView::getLength 获取当前显示的列表项数量
|
||||
* @return
|
||||
*/
|
||||
int SearchListView::getLength()
|
||||
{
|
||||
return m_item->getCurrentSize();
|
||||
}
|
||||
|
||||
//获取当前选项所属搜索类型
|
||||
int SearchListView::getCurrentType() {
|
||||
switch (m_type) {
|
||||
|
|
|
@ -30,11 +30,12 @@ public:
|
|||
int rowheight = 0;
|
||||
|
||||
void appendItem(QString);
|
||||
void appendList(QStringList);
|
||||
void setList(QStringList);
|
||||
void removeItem(QString);
|
||||
void clear();
|
||||
void setKeyword(QString);
|
||||
int getType();
|
||||
int getLength();
|
||||
bool isHidden = false;
|
||||
private:
|
||||
SearchItemModel * m_model = nullptr;
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
#include "show-more-label.h"
|
||||
#include <QEvent>
|
||||
#include <QDebug>
|
||||
|
||||
ShowMoreLabel::ShowMoreLabel(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
initUi();
|
||||
m_timer = new QTimer;
|
||||
connect(m_timer, &QTimer::timeout, this, &ShowMoreLabel::refreshLoadState);
|
||||
connect(this, &ShowMoreLabel::showMoreClicked, this, &ShowMoreLabel::startLoading);
|
||||
}
|
||||
|
||||
ShowMoreLabel::~ShowMoreLabel()
|
||||
{
|
||||
}
|
||||
|
||||
void ShowMoreLabel::initUi()
|
||||
{
|
||||
m_layout = new QHBoxLayout(this);
|
||||
m_layout->setContentsMargins(0,0,0,6);
|
||||
m_textLabel = new QLabel(this);
|
||||
m_textLabel->setText(tr("<u>Show More...</u>"));
|
||||
m_textLabel->setCursor(QCursor(Qt::PointingHandCursor));
|
||||
m_textLabel->installEventFilter(this);
|
||||
// m_loadingIconLabel = new QLabel(this); //使用图片显示加载状态时,取消此label的注释
|
||||
// m_loadingIconLabel->setFixedSize(18, 18);
|
||||
// m_loadingIconLabel->hide();
|
||||
m_layout->setAlignment(Qt::AlignCenter);
|
||||
m_layout->addWidget(m_textLabel);
|
||||
// m_layout->addWidget(m_loadingIconLabel);
|
||||
}
|
||||
|
||||
void ShowMoreLabel::startLoading()
|
||||
{
|
||||
// m_textLabel->hide();
|
||||
// m_loadingIconLabel->show();
|
||||
m_timer->start(0.4 * 1000);
|
||||
m_textLabel->setCursor(QCursor(Qt::ArrowCursor));
|
||||
}
|
||||
|
||||
void ShowMoreLabel::stopLoading()
|
||||
{
|
||||
// m_loadingIconLabel->hide();
|
||||
// m_textLabel->show();
|
||||
if (m_timer->isActive()) {
|
||||
m_timer->stop();
|
||||
}
|
||||
if (m_isOpen) {
|
||||
m_textLabel->setText(tr("<u>Retract</u>"));
|
||||
} else {
|
||||
m_textLabel->setText(tr("<u>Show More...</u>"));
|
||||
}
|
||||
m_textLabel->setCursor(QCursor(Qt::PointingHandCursor));
|
||||
}
|
||||
|
||||
void ShowMoreLabel::refreshLoadState()
|
||||
{
|
||||
switch (m_currentState) {
|
||||
case 0: {
|
||||
m_textLabel->setText(tr("Loading"));
|
||||
m_currentState ++;
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
m_textLabel->setText(tr("Loading."));
|
||||
m_currentState ++;
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
m_textLabel->setText(tr("Loading.."));
|
||||
m_currentState ++;
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
m_textLabel->setText(tr("Loading..."));
|
||||
m_currentState = 0;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool ShowMoreLabel::eventFilter(QObject *watched, QEvent *event){
|
||||
if (watched == m_textLabel) {
|
||||
if (event->type() == QEvent::MouseButtonPress) {
|
||||
if (! m_timer->isActive()) {
|
||||
if (!m_isOpen) {
|
||||
m_isOpen = true;
|
||||
Q_EMIT this->showMoreClicked();
|
||||
} else {
|
||||
m_isOpen = false;
|
||||
Q_EMIT this->retractClicked();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return QWidget::eventFilter(watched, event);
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
#ifndef SHOWMORELABEL_H
|
||||
#define SHOWMORELABEL_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QLabel>
|
||||
#include <QHBoxLayout>
|
||||
#include <QTimer>
|
||||
|
||||
class ShowMoreLabel : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ShowMoreLabel(QWidget *parent = nullptr);
|
||||
~ShowMoreLabel();
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *, QEvent *);
|
||||
|
||||
private:
|
||||
QHBoxLayout * m_layout = nullptr;
|
||||
QLabel * m_textLabel = nullptr;
|
||||
QLabel * m_loadingIconLabel = nullptr;
|
||||
QTimer * m_timer = nullptr;
|
||||
bool m_isOpen = false;
|
||||
int m_currentState = 0;
|
||||
|
||||
void initUi();
|
||||
|
||||
Q_SIGNALS:
|
||||
void showMoreClicked();
|
||||
void retractClicked();
|
||||
|
||||
public Q_SLOTS:
|
||||
void startLoading();
|
||||
void stopLoading();
|
||||
void refreshLoadState();
|
||||
};
|
||||
|
||||
#endif // SHOWMORELABEL_H
|
|
@ -308,8 +308,15 @@ void SettingsWidget::onBtnAddClicked() {
|
|||
QFileDialog * fileDialog = new QFileDialog(this);
|
||||
// fileDialog->setFileMode(QFileDialog::Directory); //允许查看文件和文件夹,但只允许选择文件夹
|
||||
fileDialog->setFileMode(QFileDialog::DirectoryOnly); //只允许查看文件夹
|
||||
fileDialog->setViewMode(QFileDialog::Detail);
|
||||
// fileDialog->setViewMode(QFileDialog::Detail);
|
||||
fileDialog->setDirectory(QDir::homePath());
|
||||
fileDialog->setNameFilter(tr("Directories"));
|
||||
fileDialog->setWindowTitle(tr("select blocked folder"));
|
||||
fileDialog->setLabelText(QFileDialog::Accept, tr("Select"));
|
||||
fileDialog->setLabelText(QFileDialog::LookIn, tr("Position: "));
|
||||
fileDialog->setLabelText(QFileDialog::FileName, tr("FileName: "));
|
||||
fileDialog->setLabelText(QFileDialog::FileType, tr("FileType: "));
|
||||
fileDialog->setLabelText(QFileDialog::Reject, tr("Cancel"));
|
||||
if (fileDialog->exec() != QDialog::Accepted) {
|
||||
fileDialog->deleteLater();
|
||||
return;
|
||||
|
|
|
@ -4,52 +4,52 @@
|
|||
<context>
|
||||
<name>ContentWidget</name>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="237"/>
|
||||
<location filename="../../src/content-widget.cpp" line="325"/>
|
||||
<source>Recently Opened</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="261"/>
|
||||
<location filename="../../src/content-widget.cpp" line="349"/>
|
||||
<source>Open Quickly</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="262"/>
|
||||
<location filename="../../src/content-widget.cpp" line="350"/>
|
||||
<source>Commonly Used</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="458"/>
|
||||
<location filename="../../src/content-widget.cpp" line="585"/>
|
||||
<source>Apps</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="460"/>
|
||||
<location filename="../../src/content-widget.cpp" line="587"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="462"/>
|
||||
<location filename="../../src/content-widget.cpp" line="589"/>
|
||||
<source>Files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="464"/>
|
||||
<location filename="../../src/content-widget.cpp" line="591"/>
|
||||
<source>Dirs</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="466"/>
|
||||
<location filename="../../src/content-widget.cpp" line="593"/>
|
||||
<source>File Contents</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="468"/>
|
||||
<location filename="../../src/content-widget.cpp" line="595"/>
|
||||
<source>Best Matches</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="470"/>
|
||||
<location filename="../../src/content-widget.cpp" line="597"/>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -111,25 +111,33 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SearchBarHLayout</name>
|
||||
<message>
|
||||
<location filename="../../src/input-box.cpp" line="100"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SearchDetailView</name>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="323"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="346"/>
|
||||
<source>Path</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="331"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="354"/>
|
||||
<source>Last time modified</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="160"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="179"/>
|
||||
<source>Application</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="171"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="190"/>
|
||||
<source>Document</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -137,90 +145,155 @@
|
|||
<context>
|
||||
<name>SettingsWidget</name>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="46"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="47"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="65"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="66"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="71"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="72"/>
|
||||
<source>Index State</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="74"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="76"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="75"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="77"/>
|
||||
<source>...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="83"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="84"/>
|
||||
<source>File Index Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="86"/>
|
||||
<location filename="../../src/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="95"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="96"/>
|
||||
<source>Add ignored folders</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="116"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="117"/>
|
||||
<source>Search Engine Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="119"/>
|
||||
<location filename="../../src/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="132"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="133"/>
|
||||
<source>baidu</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="134"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="135"/>
|
||||
<source>sougou</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="136"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="137"/>
|
||||
<source>360</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="159"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="160"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="319"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="163"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="164"/>
|
||||
<source>Confirm</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="250"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="258"/>
|
||||
<source>Creating ...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="253"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="261"/>
|
||||
<source>Done</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="261"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="269"/>
|
||||
<source>Index Entry: %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="313"/>
|
||||
<source>Directories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="314"/>
|
||||
<source>select blocked folder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="315"/>
|
||||
<source>Select</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="316"/>
|
||||
<source>Position: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="317"/>
|
||||
<source>FileName: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="318"/>
|
||||
<source>FileType: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ShowMoreLabel</name>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="22"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="51"/>
|
||||
<source><u>Show More...</u></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="49"/>
|
||||
<source><u>Retract</u></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="60"/>
|
||||
<source>Loading</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="65"/>
|
||||
<source>Loading.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="70"/>
|
||||
<source>Loading..</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="75"/>
|
||||
<source>Loading...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
|
@ -4,52 +4,52 @@
|
|||
<context>
|
||||
<name>ContentWidget</name>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="237"/>
|
||||
<location filename="../../src/content-widget.cpp" line="325"/>
|
||||
<source>Recently Opened</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="261"/>
|
||||
<location filename="../../src/content-widget.cpp" line="349"/>
|
||||
<source>Open Quickly</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="262"/>
|
||||
<location filename="../../src/content-widget.cpp" line="350"/>
|
||||
<source>Commonly Used</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="458"/>
|
||||
<location filename="../../src/content-widget.cpp" line="585"/>
|
||||
<source>Apps</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="460"/>
|
||||
<location filename="../../src/content-widget.cpp" line="587"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="462"/>
|
||||
<location filename="../../src/content-widget.cpp" line="589"/>
|
||||
<source>Files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="464"/>
|
||||
<location filename="../../src/content-widget.cpp" line="591"/>
|
||||
<source>Dirs</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="466"/>
|
||||
<location filename="../../src/content-widget.cpp" line="593"/>
|
||||
<source>File Contents</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="468"/>
|
||||
<location filename="../../src/content-widget.cpp" line="595"/>
|
||||
<source>Best Matches</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="470"/>
|
||||
<location filename="../../src/content-widget.cpp" line="597"/>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -111,25 +111,33 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SearchBarHLayout</name>
|
||||
<message>
|
||||
<location filename="../../src/input-box.cpp" line="100"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SearchDetailView</name>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="323"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="346"/>
|
||||
<source>Path</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="331"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="354"/>
|
||||
<source>Last time modified</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="160"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="179"/>
|
||||
<source>Application</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="171"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="190"/>
|
||||
<source>Document</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -137,90 +145,155 @@
|
|||
<context>
|
||||
<name>SettingsWidget</name>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="46"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="47"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="65"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="66"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="71"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="72"/>
|
||||
<source>Index State</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="74"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="76"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="75"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="77"/>
|
||||
<source>...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="83"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="84"/>
|
||||
<source>File Index Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="86"/>
|
||||
<location filename="../../src/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="95"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="96"/>
|
||||
<source>Add ignored folders</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="116"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="117"/>
|
||||
<source>Search Engine Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="119"/>
|
||||
<location filename="../../src/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="132"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="133"/>
|
||||
<source>baidu</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="134"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="135"/>
|
||||
<source>sougou</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="136"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="137"/>
|
||||
<source>360</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="159"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="160"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="319"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="163"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="164"/>
|
||||
<source>Confirm</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="250"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="258"/>
|
||||
<source>Creating ...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="253"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="261"/>
|
||||
<source>Done</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="261"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="269"/>
|
||||
<source>Index Entry: %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="313"/>
|
||||
<source>Directories</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="314"/>
|
||||
<source>select blocked folder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="315"/>
|
||||
<source>Select</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="316"/>
|
||||
<source>Position: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="317"/>
|
||||
<source>FileName: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="318"/>
|
||||
<source>FileType: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ShowMoreLabel</name>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="22"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="51"/>
|
||||
<source><u>Show More...</u></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="49"/>
|
||||
<source><u>Retract</u></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="60"/>
|
||||
<source>Loading</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="65"/>
|
||||
<source>Loading.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="70"/>
|
||||
<source>Loading..</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="75"/>
|
||||
<source>Loading...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
|
@ -4,52 +4,52 @@
|
|||
<context>
|
||||
<name>ContentWidget</name>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="237"/>
|
||||
<location filename="../../src/content-widget.cpp" line="325"/>
|
||||
<source>Recently Opened</source>
|
||||
<translation>最近</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="261"/>
|
||||
<location filename="../../src/content-widget.cpp" line="349"/>
|
||||
<source>Open Quickly</source>
|
||||
<translation>快速</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="262"/>
|
||||
<location filename="../../src/content-widget.cpp" line="350"/>
|
||||
<source>Commonly Used</source>
|
||||
<translation>常用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="458"/>
|
||||
<location filename="../../src/content-widget.cpp" line="585"/>
|
||||
<source>Apps</source>
|
||||
<translation>应用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="460"/>
|
||||
<location filename="../../src/content-widget.cpp" line="587"/>
|
||||
<source>Settings</source>
|
||||
<translation>配置项</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="462"/>
|
||||
<location filename="../../src/content-widget.cpp" line="589"/>
|
||||
<source>Files</source>
|
||||
<translation>文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="464"/>
|
||||
<location filename="../../src/content-widget.cpp" line="591"/>
|
||||
<source>Dirs</source>
|
||||
<translation>文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="466"/>
|
||||
<location filename="../../src/content-widget.cpp" line="593"/>
|
||||
<source>File Contents</source>
|
||||
<translation>文件内容</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="468"/>
|
||||
<location filename="../../src/content-widget.cpp" line="595"/>
|
||||
<source>Best Matches</source>
|
||||
<translation>最佳匹配</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/content-widget.cpp" line="470"/>
|
||||
<location filename="../../src/content-widget.cpp" line="597"/>
|
||||
<source>Unknown</source>
|
||||
<translation>未知</translation>
|
||||
</message>
|
||||
|
@ -111,25 +111,33 @@
|
|||
<translation></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SearchBarHLayout</name>
|
||||
<message>
|
||||
<location filename="../../src/input-box.cpp" line="100"/>
|
||||
<source>Search</source>
|
||||
<translation>搜索</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SearchDetailView</name>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="323"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="346"/>
|
||||
<source>Path</source>
|
||||
<translation>路径</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="331"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="354"/>
|
||||
<source>Last time modified</source>
|
||||
<translation>上次修改时间</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="160"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="179"/>
|
||||
<source>Application</source>
|
||||
<translation>应用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="171"/>
|
||||
<location filename="../../src/control/search-detail-view.cpp" line="190"/>
|
||||
<source>Document</source>
|
||||
<translation>文件</translation>
|
||||
</message>
|
||||
|
@ -137,90 +145,155 @@
|
|||
<context>
|
||||
<name>SettingsWidget</name>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="46"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="47"/>
|
||||
<source>Search</source>
|
||||
<translation>搜索</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="65"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="66"/>
|
||||
<source>Settings</source>
|
||||
<translation>配置项</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="71"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="72"/>
|
||||
<source>Index State</source>
|
||||
<translation>索引状态</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="74"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="76"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="75"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="77"/>
|
||||
<source>...</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="83"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="84"/>
|
||||
<source>File Index Settings</source>
|
||||
<translation>文件索引设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="86"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="87"/>
|
||||
<source>Following folders will not be searched. You can set it by adding and removing folders.</source>
|
||||
<translation>搜索将不再查看以下文件夹。通过增加和删除文件夹可进行文件索引设置。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="95"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="96"/>
|
||||
<source>Add ignored folders</source>
|
||||
<translation>添加禁止索引文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="116"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="117"/>
|
||||
<source>Search Engine Settings</source>
|
||||
<translation>搜索引擎设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="119"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="120"/>
|
||||
<source>Please select search engine you preferred.</source>
|
||||
<translation>设置互联网搜索引擎</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="132"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="133"/>
|
||||
<source>baidu</source>
|
||||
<translation>百度</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="134"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="135"/>
|
||||
<source>sougou</source>
|
||||
<translation>搜狗</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="136"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="137"/>
|
||||
<source>360</source>
|
||||
<translation>360</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="159"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="160"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="319"/>
|
||||
<source>Cancel</source>
|
||||
<translation>取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="163"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="164"/>
|
||||
<source>Confirm</source>
|
||||
<translation>确认</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="250"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="258"/>
|
||||
<source>Creating ...</source>
|
||||
<translation>正在索引</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="253"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="261"/>
|
||||
<source>Done</source>
|
||||
<translation>索引完成</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="261"/>
|
||||
<location filename="../../src/settings-widget.cpp" line="269"/>
|
||||
<source>Index Entry: %1</source>
|
||||
<translation>索引项: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="313"/>
|
||||
<source>Directories</source>
|
||||
<translation>文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="314"/>
|
||||
<source>select blocked folder</source>
|
||||
<translation>选择屏蔽文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="315"/>
|
||||
<source>Select</source>
|
||||
<translation>选择</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="316"/>
|
||||
<source>Position: </source>
|
||||
<translation>位置:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="317"/>
|
||||
<source>FileName: </source>
|
||||
<translation>名称:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings-widget.cpp" line="318"/>
|
||||
<source>FileType: </source>
|
||||
<translation>类型:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ShowMoreLabel</name>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="22"/>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="51"/>
|
||||
<source><u>Show More...</u></source>
|
||||
<translation><u>显示更多...<</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="49"/>
|
||||
<source><u>Retract</u></source>
|
||||
<translation><u>收起<</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="60"/>
|
||||
<source>Loading</source>
|
||||
<translation>加载中</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="65"/>
|
||||
<source>Loading.</source>
|
||||
<translation>加载中.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="70"/>
|
||||
<source>Loading..</source>
|
||||
<translation>加载中..</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/show-more-label.cpp" line="75"/>
|
||||
<source>Loading...</source>
|
||||
<translation>加载中...</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
Loading…
Reference in New Issue