Merge pull request #93 from mammonsama666/0118-dev

Fix bus for frontend.
This commit is contained in:
iaom 2021-01-18 21:06:32 +08:00 committed by GitHub
commit 85fec122ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 702 additions and 162 deletions

16
debian/changelog vendored
View File

@ -1,3 +1,19 @@
ukui-search (0.0.1+0118) v101; urgency=medium
* Feature: Add animation into inputbox.
* Feature: Set fixed height for titlelabel.
* Feature: Add function of querying current index count.
* Feature: Add more text file encoding formats are supported.
* Feature: Add ukui-search icon in start menu.
* Fix: Break line by adding '\n' into path string.(33378)
* Fix: There is not enough items in homepage.(33320)
* Fix: Index is empty.(33094)
* Fix: Translation is incompleted.(33047)
* Fix: Widget crashed when searching & open file/filepath failed.
-- zhangjiaping <zhangjiaping@zhangpengfei> Mon, 18 Jan 2021 14:3
6:12 +0800
ukui-search (0.0.1+0115) v101; urgency=medium ukui-search (0.0.1+0115) v101; urgency=medium
* Bugs fixed. * Bugs fixed.

View File

@ -121,21 +121,83 @@ void ContentWidget::initListView()
m_bestTitleLabel->setStyleSheet("QLabel{background: rgba(0,0,0,0.1);}"); m_bestTitleLabel->setStyleSheet("QLabel{background: rgba(0,0,0,0.1);}");
m_bestTitleLabel->setText(getTitleName(SearchItem::SearchType::Best)); 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_bestTitleLabel);
m_listLyt->addWidget(m_bestListView); m_listLyt->addWidget(m_bestListView);
m_listLyt->addWidget(m_appTitleLabel); m_listLyt->addWidget(m_appTitleLabel);
m_listLyt->addWidget(m_appListView); m_listLyt->addWidget(m_appListView);
m_listLyt->addWidget(m_appShowMoreLabel);
m_listLyt->addWidget(m_settingTitleLabel); m_listLyt->addWidget(m_settingTitleLabel);
m_listLyt->addWidget(m_settingListView); m_listLyt->addWidget(m_settingListView);
m_listLyt->addWidget(m_settingShowMoreLabel);
m_listLyt->addWidget(m_dirTitleLabel); m_listLyt->addWidget(m_dirTitleLabel);
m_listLyt->addWidget(m_dirListView); m_listLyt->addWidget(m_dirListView);
m_listLyt->addWidget(m_dirShowMoreLabel);
m_listLyt->addWidget(m_fileTitleLabel); m_listLyt->addWidget(m_fileTitleLabel);
m_listLyt->addWidget(m_fileListView); m_listLyt->addWidget(m_fileListView);
m_listLyt->addWidget(m_fileShowMoreLabel);
m_listLyt->addWidget(m_contentTitleLabel); m_listLyt->addWidget(m_contentTitleLabel);
m_listLyt->addWidget(m_contentListView); m_listLyt->addWidget(m_contentListView);
m_listLyt->addWidget(m_contentShowMoreLabel);
this->hideListView(); this->hideListView();
m_resultList->setFixedHeight(0); 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_bestListView->hide();
m_appTitleLabel->hide(); m_appTitleLabel->hide();
m_appListView->hide(); m_appListView->hide();
m_appShowMoreLabel->hide();
m_settingTitleLabel->hide(); m_settingTitleLabel->hide();
m_settingListView->hide(); m_settingListView->hide();
m_settingShowMoreLabel->hide();
m_dirTitleLabel->hide(); m_dirTitleLabel->hide();
m_dirListView->hide(); m_dirListView->hide();
m_dirShowMoreLabel->hide();
m_fileTitleLabel->hide(); m_fileTitleLabel->hide();
m_fileListView->hide(); m_fileListView->hide();
m_fileShowMoreLabel->hide();
m_contentTitleLabel->hide(); m_contentTitleLabel->hide();
m_contentListView->hide(); m_contentListView->hide();
m_contentShowMoreLabel->hide();
} }
/** /**
@ -163,8 +230,8 @@ void ContentWidget::hideListView()
*/ */
void ContentWidget::setupConnect(SearchListView * listview) { void ContentWidget::setupConnect(SearchListView * listview) {
connect(listview, &SearchListView::currentRowChanged, this, [ = ](const int& type, const QString& path) { connect(listview, &SearchListView::currentRowChanged, this, [ = ](const int& type, const QString& path) {
if(type == SearchItem::SearchType::Contents && !m_contentList.isEmpty()) { if(type == SearchItem::SearchType::Contents && !m_contentDetailList.isEmpty()) {
m_detailView->setContent(m_contentList.at(listview->currentIndex().row()), m_keyword); m_detailView->setContent(m_contentDetailList.at(listview->currentIndex().row()), m_keyword);
} }
m_detailView->setupWidget(type, path); m_detailView->setupWidget(type, path);
listview->is_current_list = true; listview->is_current_list = true;
@ -193,22 +260,37 @@ void ContentWidget::resetListHeight()
if (! m_appListView->isHidden) { if (! m_appListView->isHidden) {
height += m_appTitleLabel->height(); height += m_appTitleLabel->height();
height += m_appListView->height(); height += m_appListView->height();
if (m_appShowMoreLabel->isVisible()) {
height += m_appShowMoreLabel->height();
}
} }
if (! m_settingListView->isHidden) { if (! m_settingListView->isHidden) {
height += m_settingTitleLabel->height(); height += m_settingTitleLabel->height();
height += m_settingListView->height(); height += m_settingListView->height();
if (m_settingShowMoreLabel->isVisible()) {
height += m_settingShowMoreLabel->height();
}
} }
if (! m_fileListView->isHidden) { if (! m_fileListView->isHidden) {
height += m_fileTitleLabel->height(); height += m_fileTitleLabel->height();
height += m_fileListView->height(); height += m_fileListView->height();
if (m_fileShowMoreLabel->isVisible()) {
height += m_fileShowMoreLabel->height();
}
} }
if (! m_dirListView->isHidden) { if (! m_dirListView->isHidden) {
height += m_dirTitleLabel->height(); height += m_dirTitleLabel->height();
height += m_dirListView->height(); height += m_dirListView->height();
if (m_dirShowMoreLabel->isVisible()) {
height += m_dirShowMoreLabel->height();
}
} }
if (! m_contentListView->isHidden) { if (! m_contentListView->isHidden) {
height += m_contentTitleLabel->height(); height += m_contentTitleLabel->height();
height += m_contentListView->height(); height += m_contentListView->height();
if (m_contentShowMoreLabel->isVisible()) {
height += m_contentShowMoreLabel->height();
}
} }
m_resultList->setFixedHeight(height); m_resultList->setFixedHeight(height);
} }
@ -301,30 +383,35 @@ void ContentWidget::refreshSearchList(const QVector<QStringList>& lists) {
if (m_fileListView) { if (m_fileListView) {
m_fileListView->hide(); m_fileListView->hide();
m_fileTitleLabel->hide(); m_fileTitleLabel->hide();
m_fileShowMoreLabel->hide();
m_fileListView->isHidden = true; m_fileListView->isHidden = true;
m_fileListView->clear(); m_fileListView->clear();
} }
if (m_dirListView) { if (m_dirListView) {
m_dirListView->hide(); m_dirListView->hide();
m_dirTitleLabel->hide(); m_dirTitleLabel->hide();
m_dirShowMoreLabel->hide();
m_dirListView->isHidden = true; m_dirListView->isHidden = true;
m_dirListView->clear(); m_dirListView->clear();
} }
if (m_contentListView) { if (m_contentListView) {
m_contentListView->hide(); m_contentListView->hide();
m_contentTitleLabel->hide(); m_contentTitleLabel->hide();
m_contentShowMoreLabel->hide();
m_contentListView->isHidden = true; m_contentListView->isHidden = true;
m_contentListView->clear(); m_contentListView->clear();
} }
if (m_appListView) { if (m_appListView) {
m_appListView->hide(); m_appListView->hide();
m_appTitleLabel->hide(); m_appTitleLabel->hide();
m_appShowMoreLabel->hide();
m_appListView->isHidden = true; m_appListView->isHidden = true;
m_appListView->clear(); m_appListView->clear();
} }
if (m_settingListView) { if (m_settingListView) {
m_settingListView->hide(); m_settingListView->hide();
m_settingTitleLabel->hide(); m_settingTitleLabel->hide();
m_settingShowMoreLabel->hide();
m_settingListView->isHidden = true; m_settingListView->isHidden = true;
m_settingListView->clear(); m_settingListView->clear();
} }
@ -336,26 +423,46 @@ void ContentWidget::refreshSearchList(const QVector<QStringList>& lists) {
} }
m_resultList->setFixedHeight(0); m_resultList->setFixedHeight(0);
m_detailView->clearLayout(); m_detailView->clearLayout();
m_contentDetailList.clear();
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()) { if (!lists.at(0).isEmpty()) {
m_appList = lists.at(0);
qDebug()<<"Append a best item into list: "<<lists.at(0).at(0); qDebug()<<"Append a best item into list: "<<lists.at(0).at(0);
appendSearchItem(SearchItem::SearchType::Best, 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_appListView->show();
m_appTitleLabel->show(); m_appTitleLabel->show();
m_appListView->isHidden = false; 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()) { 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_settingListView->show();
m_settingTitleLabel->show(); m_settingTitleLabel->show();
m_settingListView->isHidden = false; 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(); this->resetListHeight();
} }
@ -415,7 +522,12 @@ void ContentWidget::appendSearchItem(const int& type, const QString& path, QStri
m_fileListView->isHidden = false; m_fileListView->isHidden = false;
appendSearchItem(SearchItem::SearchType::Best, path); appendSearchItem(SearchItem::SearchType::Best, path);
} }
if (m_fileListView->getLength() < 5) {
m_fileListView->appendItem(path); m_fileListView->appendItem(path);
} else if (m_fileListView->getLength() == 5) {
m_fileShowMoreLabel->show();
}
m_fileList.append(path);
break;; break;;
} }
case SearchItem::SearchType::Dirs: { case SearchItem::SearchType::Dirs: {
@ -425,7 +537,12 @@ void ContentWidget::appendSearchItem(const int& type, const QString& path, QStri
m_dirListView->isHidden = false; m_dirListView->isHidden = false;
appendSearchItem(SearchItem::SearchType::Best, path); appendSearchItem(SearchItem::SearchType::Best, path);
} }
if (m_dirListView->getLength() < 5) {
m_dirListView->appendItem(path); m_dirListView->appendItem(path);
} else if (m_dirListView->getLength() == 5) {
m_dirShowMoreLabel->show();
}
m_dirList.append(path);
break; break;
} }
case SearchItem::SearchType::Contents: { case SearchItem::SearchType::Contents: {
@ -435,7 +552,12 @@ void ContentWidget::appendSearchItem(const int& type, const QString& path, QStri
m_contentListView->isHidden = false; m_contentListView->isHidden = false;
appendSearchItem(SearchItem::SearchType::Best, path); appendSearchItem(SearchItem::SearchType::Best, path);
} }
if (m_contentListView->getLength() < 5) {
m_contentListView->appendItem(path); m_contentListView->appendItem(path);
} else if (m_contentListView->getLength() == 5) {
m_contentShowMoreLabel->show();
}
m_contentList.append(path);
QString temp; QString temp;
for (int i = 0; i < contents.length(); i ++) { for (int i = 0; i < contents.length(); i ++) {
temp.append(contents.at(i)); temp.append(contents.at(i));
@ -443,7 +565,7 @@ void ContentWidget::appendSearchItem(const int& type, const QString& path, QStri
temp.append("\n"); temp.append("\n");
} }
} }
m_contentList.append(temp); m_contentDetailList.append(temp);
break; break;
} }
default: default:
@ -482,7 +604,6 @@ QString ContentWidget::getTitleName(const int& type) {
* @param layout * @param layout
*/ */
void ContentWidget::clearLayout(QLayout * layout) { void ContentWidget::clearLayout(QLayout * layout) {
m_contentList.clear();
if (! layout) return; if (! layout) return;
QLayoutItem * child; QLayoutItem * child;
while ((child = layout->takeAt(0)) != 0) { while ((child = layout->takeAt(0)) != 0) {
@ -501,8 +622,8 @@ void ContentWidget::clearLayout(QLayout * layout) {
* @param list * @param list
*/ */
void ContentWidget::setContentList(const QStringList& list) { void ContentWidget::setContentList(const QStringList& list) {
m_contentList.clear(); m_contentDetailList.clear();
m_contentList = list; m_contentDetailList = list;
} }
/** /**

View File

@ -7,6 +7,7 @@
#include <QGridLayout> #include <QGridLayout>
#include "control/search-detail-view.h" #include "control/search-detail-view.h"
#include "home-page-item.h" #include "home-page-item.h"
#include "show-more-label.h"
class ContentWidget : public QStackedWidget class ContentWidget : public QStackedWidget
{ {
@ -30,7 +31,7 @@ private:
void clearHomepage(); void clearHomepage();
void resetListHeight(); void resetListHeight();
QString m_keyword; QString m_keyword;
QStringList m_contentList; QStringList m_contentDetailList;
QWidget * m_homePage = nullptr; QWidget * m_homePage = nullptr;
QVBoxLayout * m_homePageLyt = nullptr; QVBoxLayout * m_homePageLyt = nullptr;
QWidget * m_resultPage = nullptr; QWidget * m_resultPage = nullptr;
@ -55,6 +56,17 @@ private:
QLabel * m_appTitleLabel = nullptr; QLabel * m_appTitleLabel = nullptr;
QLabel * m_settingTitleLabel = nullptr; QLabel * m_settingTitleLabel = nullptr;
QLabel * m_bestTitleLabel = 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; int m_currentType = 0;

View File

@ -8,6 +8,7 @@ HEADERS += \
$$PWD/search-detail-view.h \ $$PWD/search-detail-view.h \
$$PWD/option-view.h \ $$PWD/option-view.h \
$$PWD/home-page-item.h \ $$PWD/home-page-item.h \
$$PWD/show-more-label.h
SOURCES += \ SOURCES += \
$$PWD/config-file.cpp \ $$PWD/config-file.cpp \
@ -17,3 +18,4 @@ SOURCES += \
$$PWD/search-detail-view.cpp \ $$PWD/search-detail-view.cpp \
$$PWD/option-view.cpp \ $$PWD/option-view.cpp \
$$PWD/home-page-item.cpp \ $$PWD/home-page-item.cpp \
$$PWD/show-more-label.cpp

View File

@ -13,7 +13,6 @@
#include <QApplication> #include <QApplication>
#include <QFileInfo> #include <QFileInfo>
#include <QDateTime> #include <QDateTime>
#include <QTextBrowser>
#include "config-file.h" #include "config-file.h"
SearchDetailView::SearchDetailView(QWidget *parent) : QWidget(parent) SearchDetailView::SearchDetailView(QWidget *parent) : QWidget(parent)

View File

@ -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); 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); this->setFixedHeight(m_item->getCurrentSize() * rowheight + 3);
} }
@ -95,6 +95,15 @@ int SearchListView::getType()
return m_type; return m_type;
} }
/**
* @brief SearchListView::getLength
* @return
*/
int SearchListView::getLength()
{
return m_item->getCurrentSize();
}
//获取当前选项所属搜索类型 //获取当前选项所属搜索类型
int SearchListView::getCurrentType() { int SearchListView::getCurrentType() {
switch (m_type) { switch (m_type) {

View File

@ -30,11 +30,12 @@ public:
int rowheight = 0; int rowheight = 0;
void appendItem(QString); void appendItem(QString);
void appendList(QStringList); void setList(QStringList);
void removeItem(QString); void removeItem(QString);
void clear(); void clear();
void setKeyword(QString); void setKeyword(QString);
int getType(); int getType();
int getLength();
bool isHidden = false; bool isHidden = false;
private: private:
SearchItemModel * m_model = nullptr; SearchItemModel * m_model = nullptr;

View File

@ -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);
}

View File

@ -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

View File

@ -3,38 +3,38 @@
/** /**
* @brief ukui-search顶部搜索界面 * @brief ukui-search顶部搜索界面
*/ */
UKuiSeachBarWidget::UKuiSeachBarWidget() SeachBarWidget::SeachBarWidget()
{ {
} }
UKuiSeachBarWidget::~UKuiSeachBarWidget() SeachBarWidget::~SeachBarWidget()
{ {
} }
/** /**
* @brief ukui-search ui * @brief ukui-search ui
*/ */
UKuiSeachBar::UKuiSeachBar() SeachBar::SeachBar()
{ {
setFocusPolicy(Qt::NoFocus); setFocusPolicy(Qt::NoFocus);
} }
UkuiSearchBarWidgetLayout::UkuiSearchBarWidgetLayout() SearchBarWidgetLayout::SearchBarWidgetLayout()
{ {
} }
UkuiSearchBarWidgetLayout::~UkuiSearchBarWidgetLayout() SearchBarWidgetLayout::~SearchBarWidgetLayout()
{ {
} }
UKuiSeachBar::~UKuiSeachBar() SeachBar::~SeachBar()
{ {
} }
/** /**
* @brief * @brief
*/ */
UkuiSearchBarHLayout::UkuiSearchBarHLayout() SearchBarHLayout::SearchBarHLayout()
{ {
initUI(); initUI();
@ -43,7 +43,7 @@ UkuiSearchBarHLayout::UkuiSearchBarHLayout()
m_timer->stop(); m_timer->stop();
Q_EMIT this->textChanged(m_queryLineEdit->text()); Q_EMIT this->textChanged(m_queryLineEdit->text());
}); });
connect(m_queryLineEdit, &UKuiSearchLineEdit::textChanged, this, [ = ](QString text) { connect(m_queryLineEdit, &SearchLineEdit::textChanged, this, [ = ](QString text) {
if (m_isEmpty) { if (m_isEmpty) {
m_isEmpty = false; m_isEmpty = false;
Q_EMIT this->textChanged(text); Q_EMIT this->textChanged(text);
@ -60,7 +60,7 @@ UkuiSearchBarHLayout::UkuiSearchBarHLayout()
}); });
} }
UkuiSearchBarHLayout::~UkuiSearchBarHLayout() SearchBarHLayout::~SearchBarHLayout()
{ {
if (m_timer) { if (m_timer) {
delete m_timer; delete m_timer;
@ -71,9 +71,9 @@ UkuiSearchBarHLayout::~UkuiSearchBarHLayout()
/** /**
* @brief ui * @brief ui
*/ */
void UkuiSearchBarHLayout::initUI() void SearchBarHLayout::initUI()
{ {
m_queryLineEdit = new UKuiSearchLineEdit; m_queryLineEdit = new SearchLineEdit;
m_queryLineEdit->installEventFilter(this); m_queryLineEdit->installEventFilter(this);
m_queryLineEdit->setTextMargins(30,1,0,1); m_queryLineEdit->setTextMargins(30,1,0,1);
this->setContentsMargins(0,0,0,0); this->setContentsMargins(0,0,0,0);
@ -119,22 +119,35 @@ void UkuiSearchBarHLayout::initUI()
}); });
} }
void UkuiSearchBarHLayout::clearText() { void SearchBarHLayout::focusIn() {
m_queryLineEdit->setFocus();
}
void SearchBarHLayout::focusOut() {
m_queryLineEdit->clearFocus();
if (! m_queryText->parent()) {
m_queryWidget->layout()->addWidget(m_queryText);
m_queryText->adjustSize();
}
m_queryWidget->setGeometry(QRect((m_queryLineEdit->width() - (m_queryIcon->width() + m_queryText->width() + 15)) / 2 - 10, 0,
m_queryIcon->width() + m_queryText->width() + 10, 35)); //使图标回到初始位置
}
void SearchBarHLayout::clearText() {
m_queryLineEdit->setText(""); m_queryLineEdit->setText("");
} }
QString UkuiSearchBarHLayout::text() { QString SearchBarHLayout::text() {
return m_queryLineEdit->text(); return m_queryLineEdit->text();
} }
bool UkuiSearchBarHLayout::eventFilter(QObject *watched, QEvent *event) bool SearchBarHLayout::eventFilter(QObject *watched, QEvent *event)
{ {
if (watched == m_queryLineEdit) { if (watched == m_queryLineEdit) {
if (event->type()==QEvent::FocusIn) { if (event->type()==QEvent::FocusIn) {
if (m_queryLineEdit->text().isEmpty()) { if (m_queryLineEdit->text().isEmpty()) {
m_animation->stop(); m_animation->stop();
m_animation->setStartValue(QRect((m_queryLineEdit->width() - (m_queryIcon->width() + m_queryText->width() + 10)) / 2, 0, m_animation->setStartValue(m_queryWidget->geometry());
m_queryIcon->width() + m_queryText->width() + 10, 35));
m_animation->setEndValue(QRect(0, 0, m_queryIcon->width() + 5, 35)); m_animation->setEndValue(QRect(0, 0, m_queryIcon->width() + 5, 35));
m_animation->setEasingCurve(QEasingCurve::OutQuad); m_animation->setEasingCurve(QEasingCurve::OutQuad);
m_animation->start(); m_animation->start();
@ -161,7 +174,7 @@ bool UkuiSearchBarHLayout::eventFilter(QObject *watched, QEvent *event)
/** /**
* @brief UKuiSearchLineEdit * @brief UKuiSearchLineEdit
*/ */
UKuiSearchLineEdit::UKuiSearchLineEdit() SearchLineEdit::SearchLineEdit()
{ {
this->setFocusPolicy(Qt::ClickFocus); this->setFocusPolicy(Qt::ClickFocus);
this->installEventFilter(this); this->installEventFilter(this);
@ -179,10 +192,10 @@ UKuiSearchLineEdit::UKuiSearchLineEdit()
QDBusConnection::sessionBus().registerService("org.ukui.search.service"); QDBusConnection::sessionBus().registerService("org.ukui.search.service");
QDBusConnection::sessionBus().registerObject("/lineEdit/textChanged", this,QDBusConnection :: ExportAllSlots | QDBusConnection :: ExportAllSignals); QDBusConnection::sessionBus().registerObject("/lineEdit/textChanged", this,QDBusConnection :: ExportAllSlots | QDBusConnection :: ExportAllSignals);
connect(this, &QLineEdit::textChanged, this, &UKuiSearchLineEdit::lineEditTextChanged); connect(this, &QLineEdit::textChanged, this, &SearchLineEdit::lineEditTextChanged);
} }
UKuiSearchLineEdit::~UKuiSearchLineEdit() SearchLineEdit::~SearchLineEdit()
{ {
} }
@ -195,7 +208,7 @@ UKuiSearchLineEdit::~UKuiSearchLineEdit()
* QDBusConnection::sessionBus().connect(QString(), QString("/lineEdit/textChanged"), "org.ukui.search.inputbox", "InputBoxTextChanged", this, SLOT(client_get(QString))); * QDBusConnection::sessionBus().connect(QString(), QString("/lineEdit/textChanged"), "org.ukui.search.inputbox", "InputBoxTextChanged", this, SLOT(client_get(QString)));
* client_get(void)  * client_get(void) 
*/ */
void UKuiSearchLineEdit::lineEditTextChanged(QString arg) void SearchLineEdit::lineEditTextChanged(QString arg)
{ {
QDBusMessage message = QDBusMessage::createSignal("/lineEdit/textChanged", "org.ukui.search.inputbox", "InputBoxTextChanged"); QDBusMessage message = QDBusMessage::createSignal("/lineEdit/textChanged", "org.ukui.search.inputbox", "InputBoxTextChanged");
message<<arg; message<<arg;

View File

@ -7,33 +7,35 @@
#include <QAction> #include <QAction>
#include <QTimer> #include <QTimer>
class UKuiSearchLineEdit; class SearchLineEdit;
class UKuiSeachBarWidget:public QWidget class SeachBarWidget:public QWidget
{ {
public: public:
UKuiSeachBarWidget(); SeachBarWidget();
~UKuiSeachBarWidget(); ~SeachBarWidget();
}; };
class UKuiSeachBar:public QWidget class SeachBar:public QWidget
{ {
public: public:
UKuiSeachBar(); SeachBar();
~UKuiSeachBar(); ~SeachBar();
private: private:
// QLineEdit *m_queryLineEdit=nullptr; // QLineEdit *m_queryLineEdit=nullptr;
}; };
class UkuiSearchBarHLayout : public QHBoxLayout class SearchBarHLayout : public QHBoxLayout
{ {
Q_OBJECT Q_OBJECT
public: public:
UkuiSearchBarHLayout(); SearchBarHLayout();
~UkuiSearchBarHLayout(); ~SearchBarHLayout();
void clearText(); void clearText();
QString text(); QString text();
void focusIn();
void focusOut();
protected: protected:
bool eventFilter(QObject *watched, QEvent *event); bool eventFilter(QObject *watched, QEvent *event);
@ -43,7 +45,7 @@ private:
bool m_isEmpty = true; bool m_isEmpty = true;
QTimer * m_timer = nullptr; QTimer * m_timer = nullptr;
UKuiSearchLineEdit * m_queryLineEdit = nullptr; SearchLineEdit * m_queryLineEdit = nullptr;
QPropertyAnimation * m_animation = nullptr; QPropertyAnimation * m_animation = nullptr;
QWidget * m_queryWidget = nullptr; QWidget * m_queryWidget = nullptr;
QLabel * m_queryIcon = nullptr; QLabel * m_queryIcon = nullptr;
@ -54,17 +56,17 @@ Q_SIGNALS:
void textChanged(QString text); void textChanged(QString text);
}; };
class UkuiSearchBarWidgetLayout : public QHBoxLayout class SearchBarWidgetLayout : public QHBoxLayout
{ {
public: public:
UkuiSearchBarWidgetLayout(); SearchBarWidgetLayout();
~UkuiSearchBarWidgetLayout(); ~SearchBarWidgetLayout();
private: private:
void initUI(); void initUI();
}; };
class UKuiSearchLineEdit:public QLineEdit class SearchLineEdit : public QLineEdit
{ {
Q_OBJECT Q_OBJECT
@ -74,8 +76,8 @@ class UKuiSearchLineEdit:public QLineEdit
   */    */
Q_CLASSINFO("D-Bus Interface", "org.ukui.search.inputbox") Q_CLASSINFO("D-Bus Interface", "org.ukui.search.inputbox")
public: public:
UKuiSearchLineEdit(); SearchLineEdit();
~UKuiSearchLineEdit(); ~SearchLineEdit();
private Q_SLOTS: private Q_SLOTS:
void lineEditTextChanged(QString arg); void lineEditTextChanged(QString arg);

View File

@ -189,8 +189,8 @@ void MainWindow::initUi()
m_contentFrame = new ContentWidget(m_frame);//内容栏 m_contentFrame = new ContentWidget(m_frame);//内容栏
m_searchWidget = new UKuiSeachBarWidget; m_searchWidget = new SeachBarWidget;
m_searchLayout = new UkuiSearchBarHLayout; m_searchLayout = new SearchBarHLayout;
m_searchWidget->setLayout(m_searchLayout); m_searchWidget->setLayout(m_searchLayout);
m_searchWidget->setFixedHeight(44); m_searchWidget->setFixedHeight(44);
@ -202,7 +202,7 @@ void MainWindow::initUi()
this, &MainWindow::monitorResolutionChange); this, &MainWindow::monitorResolutionChange);
connect(qApp, &QApplication::primaryScreenChanged, this, connect(qApp, &QApplication::primaryScreenChanged, this,
&MainWindow::primaryScreenChangedSlot); &MainWindow::primaryScreenChangedSlot);
connect(m_searchLayout, &UkuiSearchBarHLayout::textChanged, this, [ = ](QString text) { connect(m_searchLayout, &SearchBarHLayout::textChanged, this, [ = ](QString text) {
if (text == "") { if (text == "") {
if (m_search_result_thread->isRunning()) { if (m_search_result_thread->isRunning()) {
m_search_result_thread->requestInterruption(); m_search_result_thread->requestInterruption();
@ -244,6 +244,7 @@ void MainWindow::bootOptionsFilter(QString opt)
*/ */
void MainWindow::clearSearchResult() { void MainWindow::clearSearchResult() {
m_searchLayout->clearText(); m_searchLayout->clearText();
m_searchLayout->focusOut();
} }
/** /**

View File

@ -73,8 +73,8 @@ private:
ContentWidget * m_contentFrame = nullptr;//内容栏 ContentWidget * m_contentFrame = nullptr;//内容栏
UKuiSeachBarWidget * m_searchWidget = nullptr;//搜索栏 SeachBarWidget * m_searchWidget = nullptr;//搜索栏
UkuiSearchBarHLayout * m_searchLayout = nullptr; SearchBarHLayout * m_searchLayout = nullptr;
bool m_winFlag = false; bool m_winFlag = false;

View File

@ -308,8 +308,15 @@ void SettingsWidget::onBtnAddClicked() {
QFileDialog * fileDialog = new QFileDialog(this); QFileDialog * fileDialog = new QFileDialog(this);
// fileDialog->setFileMode(QFileDialog::Directory); //允许查看文件和文件夹,但只允许选择文件夹 // fileDialog->setFileMode(QFileDialog::Directory); //允许查看文件和文件夹,但只允许选择文件夹
fileDialog->setFileMode(QFileDialog::DirectoryOnly); //只允许查看文件夹 fileDialog->setFileMode(QFileDialog::DirectoryOnly); //只允许查看文件夹
fileDialog->setViewMode(QFileDialog::Detail); // fileDialog->setViewMode(QFileDialog::Detail);
fileDialog->setDirectory(QDir::homePath()); 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) { if (fileDialog->exec() != QDialog::Accepted) {
fileDialog->deleteLater(); fileDialog->deleteLater();
return; return;

View File

@ -4,52 +4,52 @@
<context> <context>
<name>ContentWidget</name> <name>ContentWidget</name>
<message> <message>
<location filename="../../src/content-widget.cpp" line="237"/> <location filename="../../src/content-widget.cpp" line="325"/>
<source>Recently Opened</source> <source>Recently Opened</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="261"/> <location filename="../../src/content-widget.cpp" line="349"/>
<source>Open Quickly</source> <source>Open Quickly</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="262"/> <location filename="../../src/content-widget.cpp" line="350"/>
<source>Commonly Used</source> <source>Commonly Used</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="458"/> <location filename="../../src/content-widget.cpp" line="585"/>
<source>Apps</source> <source>Apps</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="460"/> <location filename="../../src/content-widget.cpp" line="587"/>
<source>Settings</source> <source>Settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="462"/> <location filename="../../src/content-widget.cpp" line="589"/>
<source>Files</source> <source>Files</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="464"/> <location filename="../../src/content-widget.cpp" line="591"/>
<source>Dirs</source> <source>Dirs</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="466"/> <location filename="../../src/content-widget.cpp" line="593"/>
<source>File Contents</source> <source>File Contents</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="468"/> <location filename="../../src/content-widget.cpp" line="595"/>
<source>Best Matches</source> <source>Best Matches</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="470"/> <location filename="../../src/content-widget.cpp" line="597"/>
<source>Unknown</source> <source>Unknown</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -111,25 +111,33 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>SearchBarHLayout</name>
<message>
<location filename="../../src/input-box.cpp" line="100"/>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>SearchDetailView</name> <name>SearchDetailView</name>
<message> <message>
<location filename="../../src/control/search-detail-view.cpp" line="323"/> <location filename="../../src/control/search-detail-view.cpp" line="346"/>
<source>Path</source> <source>Path</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Last time modified</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Application</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Document</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -137,90 +145,155 @@
<context> <context>
<name>SettingsWidget</name> <name>SettingsWidget</name>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="46"/> <location filename="../../src/settings-widget.cpp" line="47"/>
<source>Search</source> <source>Search</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="65"/> <location filename="../../src/settings-widget.cpp" line="66"/>
<source>Settings</source> <source>Settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="71"/> <location filename="../../src/settings-widget.cpp" line="72"/>
<source>Index State</source> <source>Index State</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="74"/> <location filename="../../src/settings-widget.cpp" line="75"/>
<location filename="../../src/settings-widget.cpp" line="76"/> <location filename="../../src/settings-widget.cpp" line="77"/>
<source>...</source> <source>...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="83"/> <location filename="../../src/settings-widget.cpp" line="84"/>
<source>File Index Settings</source> <source>File Index Settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Following folders will not be searched. You can set it by adding and removing folders.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="95"/> <location filename="../../src/settings-widget.cpp" line="96"/>
<source>Add ignored folders</source> <source>Add ignored folders</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="116"/> <location filename="../../src/settings-widget.cpp" line="117"/>
<source>Search Engine Settings</source> <source>Search Engine Settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Please select search engine you preferred.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="132"/> <location filename="../../src/settings-widget.cpp" line="133"/>
<source>baidu</source> <source>baidu</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="134"/> <location filename="../../src/settings-widget.cpp" line="135"/>
<source>sougou</source> <source>sougou</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="136"/> <location filename="../../src/settings-widget.cpp" line="137"/>
<source>360</source> <source>360</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Cancel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="163"/> <location filename="../../src/settings-widget.cpp" line="164"/>
<source>Confirm</source> <source>Confirm</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="250"/> <location filename="../../src/settings-widget.cpp" line="258"/>
<source>Creating ...</source> <source>Creating ...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="253"/> <location filename="../../src/settings-widget.cpp" line="261"/>
<source>Done</source> <source>Done</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="261"/> <location filename="../../src/settings-widget.cpp" line="269"/>
<source>Index Entry: %1</source> <source>Index Entry: %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </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>&lt;u&gt;Show More...&lt;/u&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/control/show-more-label.cpp" line="49"/>
<source>&lt;u&gt;Retract&lt;/u&gt;</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> </context>
</TS> </TS>

View File

@ -4,52 +4,52 @@
<context> <context>
<name>ContentWidget</name> <name>ContentWidget</name>
<message> <message>
<location filename="../../src/content-widget.cpp" line="237"/> <location filename="../../src/content-widget.cpp" line="325"/>
<source>Recently Opened</source> <source>Recently Opened</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="261"/> <location filename="../../src/content-widget.cpp" line="349"/>
<source>Open Quickly</source> <source>Open Quickly</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="262"/> <location filename="../../src/content-widget.cpp" line="350"/>
<source>Commonly Used</source> <source>Commonly Used</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="458"/> <location filename="../../src/content-widget.cpp" line="585"/>
<source>Apps</source> <source>Apps</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="460"/> <location filename="../../src/content-widget.cpp" line="587"/>
<source>Settings</source> <source>Settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="462"/> <location filename="../../src/content-widget.cpp" line="589"/>
<source>Files</source> <source>Files</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="464"/> <location filename="../../src/content-widget.cpp" line="591"/>
<source>Dirs</source> <source>Dirs</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="466"/> <location filename="../../src/content-widget.cpp" line="593"/>
<source>File Contents</source> <source>File Contents</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="468"/> <location filename="../../src/content-widget.cpp" line="595"/>
<source>Best Matches</source> <source>Best Matches</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="470"/> <location filename="../../src/content-widget.cpp" line="597"/>
<source>Unknown</source> <source>Unknown</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -111,25 +111,33 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>SearchBarHLayout</name>
<message>
<location filename="../../src/input-box.cpp" line="100"/>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>SearchDetailView</name> <name>SearchDetailView</name>
<message> <message>
<location filename="../../src/control/search-detail-view.cpp" line="323"/> <location filename="../../src/control/search-detail-view.cpp" line="346"/>
<source>Path</source> <source>Path</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Last time modified</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Application</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Document</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -137,90 +145,155 @@
<context> <context>
<name>SettingsWidget</name> <name>SettingsWidget</name>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="46"/> <location filename="../../src/settings-widget.cpp" line="47"/>
<source>Search</source> <source>Search</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="65"/> <location filename="../../src/settings-widget.cpp" line="66"/>
<source>Settings</source> <source>Settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="71"/> <location filename="../../src/settings-widget.cpp" line="72"/>
<source>Index State</source> <source>Index State</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="74"/> <location filename="../../src/settings-widget.cpp" line="75"/>
<location filename="../../src/settings-widget.cpp" line="76"/> <location filename="../../src/settings-widget.cpp" line="77"/>
<source>...</source> <source>...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="83"/> <location filename="../../src/settings-widget.cpp" line="84"/>
<source>File Index Settings</source> <source>File Index Settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Following folders will not be searched. You can set it by adding and removing folders.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="95"/> <location filename="../../src/settings-widget.cpp" line="96"/>
<source>Add ignored folders</source> <source>Add ignored folders</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="116"/> <location filename="../../src/settings-widget.cpp" line="117"/>
<source>Search Engine Settings</source> <source>Search Engine Settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Please select search engine you preferred.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="132"/> <location filename="../../src/settings-widget.cpp" line="133"/>
<source>baidu</source> <source>baidu</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="134"/> <location filename="../../src/settings-widget.cpp" line="135"/>
<source>sougou</source> <source>sougou</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="136"/> <location filename="../../src/settings-widget.cpp" line="137"/>
<source>360</source> <source>360</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<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> <source>Cancel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="163"/> <location filename="../../src/settings-widget.cpp" line="164"/>
<source>Confirm</source> <source>Confirm</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="250"/> <location filename="../../src/settings-widget.cpp" line="258"/>
<source>Creating ...</source> <source>Creating ...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="253"/> <location filename="../../src/settings-widget.cpp" line="261"/>
<source>Done</source> <source>Done</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="261"/> <location filename="../../src/settings-widget.cpp" line="269"/>
<source>Index Entry: %1</source> <source>Index Entry: %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </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>&lt;u&gt;Show More...&lt;/u&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/control/show-more-label.cpp" line="49"/>
<source>&lt;u&gt;Retract&lt;/u&gt;</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> </context>
</TS> </TS>

View File

@ -4,52 +4,52 @@
<context> <context>
<name>ContentWidget</name> <name>ContentWidget</name>
<message> <message>
<location filename="../../src/content-widget.cpp" line="237"/> <location filename="../../src/content-widget.cpp" line="325"/>
<source>Recently Opened</source> <source>Recently Opened</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="261"/> <location filename="../../src/content-widget.cpp" line="349"/>
<source>Open Quickly</source> <source>Open Quickly</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="262"/> <location filename="../../src/content-widget.cpp" line="350"/>
<source>Commonly Used</source> <source>Commonly Used</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="458"/> <location filename="../../src/content-widget.cpp" line="585"/>
<source>Apps</source> <source>Apps</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="460"/> <location filename="../../src/content-widget.cpp" line="587"/>
<source>Settings</source> <source>Settings</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="462"/> <location filename="../../src/content-widget.cpp" line="589"/>
<source>Files</source> <source>Files</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="464"/> <location filename="../../src/content-widget.cpp" line="591"/>
<source>Dirs</source> <source>Dirs</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="466"/> <location filename="../../src/content-widget.cpp" line="593"/>
<source>File Contents</source> <source>File Contents</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="468"/> <location filename="../../src/content-widget.cpp" line="595"/>
<source>Best Matches</source> <source>Best Matches</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/content-widget.cpp" line="470"/> <location filename="../../src/content-widget.cpp" line="597"/>
<source>Unknown</source> <source>Unknown</source>
<translation></translation> <translation></translation>
</message> </message>
@ -111,25 +111,33 @@
<translation></translation> <translation></translation>
</message> </message>
</context> </context>
<context>
<name>SearchBarHLayout</name>
<message>
<location filename="../../src/input-box.cpp" line="100"/>
<source>Search</source>
<translation></translation>
</message>
</context>
<context> <context>
<name>SearchDetailView</name> <name>SearchDetailView</name>
<message> <message>
<location filename="../../src/control/search-detail-view.cpp" line="323"/> <location filename="../../src/control/search-detail-view.cpp" line="346"/>
<source>Path</source> <source>Path</source>
<translation></translation> <translation></translation>
</message> </message>
<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> <source>Last time modified</source>
<translation></translation> <translation></translation>
</message> </message>
<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> <source>Application</source>
<translation></translation> <translation></translation>
</message> </message>
<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> <source>Document</source>
<translation></translation> <translation></translation>
</message> </message>
@ -137,90 +145,155 @@
<context> <context>
<name>SettingsWidget</name> <name>SettingsWidget</name>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="46"/> <location filename="../../src/settings-widget.cpp" line="47"/>
<source>Search</source> <source>Search</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="65"/> <location filename="../../src/settings-widget.cpp" line="66"/>
<source>Settings</source> <source>Settings</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="71"/> <location filename="../../src/settings-widget.cpp" line="72"/>
<source>Index State</source> <source>Index State</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="74"/> <location filename="../../src/settings-widget.cpp" line="75"/>
<location filename="../../src/settings-widget.cpp" line="76"/> <location filename="../../src/settings-widget.cpp" line="77"/>
<source>...</source> <source>...</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="83"/> <location filename="../../src/settings-widget.cpp" line="84"/>
<source>File Index Settings</source> <source>File Index Settings</source>
<translation></translation> <translation></translation>
</message> </message>
<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> <source>Following folders will not be searched. You can set it by adding and removing folders.</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="95"/> <location filename="../../src/settings-widget.cpp" line="96"/>
<source>Add ignored folders</source> <source>Add ignored folders</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="116"/> <location filename="../../src/settings-widget.cpp" line="117"/>
<source>Search Engine Settings</source> <source>Search Engine Settings</source>
<translation></translation> <translation></translation>
</message> </message>
<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> <source>Please select search engine you preferred.</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="132"/> <location filename="../../src/settings-widget.cpp" line="133"/>
<source>baidu</source> <source>baidu</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="134"/> <location filename="../../src/settings-widget.cpp" line="135"/>
<source>sougou</source> <source>sougou</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="136"/> <location filename="../../src/settings-widget.cpp" line="137"/>
<source>360</source> <source>360</source>
<translation>360</translation> <translation>360</translation>
</message> </message>
<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> <source>Cancel</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="163"/> <location filename="../../src/settings-widget.cpp" line="164"/>
<source>Confirm</source> <source>Confirm</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="250"/> <location filename="../../src/settings-widget.cpp" line="258"/>
<source>Creating ...</source> <source>Creating ...</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="253"/> <location filename="../../src/settings-widget.cpp" line="261"/>
<source>Done</source> <source>Done</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../src/settings-widget.cpp" line="261"/> <location filename="../../src/settings-widget.cpp" line="269"/>
<source>Index Entry: %1</source> <source>Index Entry: %1</source>
<translation>: %1</translation> <translation>: %1</translation>
</message> </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>&lt;u&gt;Show More...&lt;/u&gt;</source>
<translation>&lt;u&gt;...&lt;</translation>
</message>
<message>
<location filename="../../src/control/show-more-label.cpp" line="49"/>
<source>&lt;u&gt;Retract&lt;/u&gt;</source>
<translation>&lt;u&gt;&lt;</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> </context>
</TS> </TS>