mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-08 14:32:39 -04:00
Improve search.
Find as you type. Add shortcut. Hide search widgets when not used. Refs #24
This commit is contained in:
parent
4a1423da88
commit
e4a5cd214f
10 changed files with 182 additions and 39 deletions
|
@ -18,11 +18,8 @@
|
|||
#ifndef KEEPASSX_DATABASEWIDGET_H
|
||||
#define KEEPASSX_DATABASEWIDGET_H
|
||||
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QStackedWidget>
|
||||
|
||||
class QLineEdit;
|
||||
|
||||
class ChangeMasterKeyWidget;
|
||||
class DatabaseSettingsWidget;
|
||||
class Database;
|
||||
|
@ -33,6 +30,10 @@ class EntryView;
|
|||
class Group;
|
||||
class GroupView;
|
||||
|
||||
namespace Ui {
|
||||
class SearchWidget;
|
||||
}
|
||||
|
||||
class DatabaseWidget : public QStackedWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -46,6 +47,7 @@ public:
|
|||
};
|
||||
|
||||
explicit DatabaseWidget(Database* db, QWidget* parent = 0);
|
||||
~DatabaseWidget();
|
||||
GroupView* groupView();
|
||||
EntryView* entryView();
|
||||
bool dbHasKey();
|
||||
|
@ -69,7 +71,7 @@ public Q_SLOTS:
|
|||
void switchToGroupEdit();
|
||||
void switchToMasterKeyChange();
|
||||
void switchToDatabaseSettings();
|
||||
void search();
|
||||
void toggleSearch();
|
||||
|
||||
private Q_SLOTS:
|
||||
void switchBackToEntryEdit();
|
||||
|
@ -82,11 +84,17 @@ private Q_SLOTS:
|
|||
void emitCurrentModeChanged();
|
||||
void clearLastGroup(Group* group);
|
||||
void clearSearchEdit();
|
||||
void search();
|
||||
void startSearchTimer();
|
||||
void showSearch();
|
||||
void closeSearch();
|
||||
|
||||
private:
|
||||
void truncateHistories();
|
||||
|
||||
Database* const m_db;
|
||||
const QScopedPointer<Ui::SearchWidget> m_searchUi;
|
||||
QWidget* const m_searchWidget;
|
||||
QWidget* m_mainWidget;
|
||||
EditEntryWidget* m_editEntryWidget;
|
||||
EditEntryWidget* m_historyEditEntryWidget;
|
||||
|
@ -98,9 +106,8 @@ private:
|
|||
Group* m_newGroup;
|
||||
Entry* m_newEntry;
|
||||
Group* m_newParent;
|
||||
QLineEdit* m_searchEdit;
|
||||
QPushButton* m_clearSearchButton;
|
||||
Group* m_lastGroup;
|
||||
QTimer* m_searchTimer;
|
||||
};
|
||||
|
||||
#endif // KEEPASSX_DATABASEWIDGET_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue