GUI: add shortcut to toggle showing results as table. Default: Ctrl+T
This commit is contained in:
parent
7dd93f7bbf
commit
cced5efb45
@ -350,6 +350,11 @@ void RclMain::onNewShortcuts()
|
|||||||
"Ctrl+Shift+S", m_focustosearcholdsc, takeFocus);
|
"Ctrl+Shift+S", m_focustosearcholdsc, takeFocus);
|
||||||
SETSHORTCUT(sSearch, tr("Main Window"), tr("Clear Search"),
|
SETSHORTCUT(sSearch, tr("Main Window"), tr("Clear Search"),
|
||||||
"Ctrl+S", m_clearsearchsc, clearAll);
|
"Ctrl+S", m_clearsearchsc, clearAll);
|
||||||
|
// We could set this as an action shortcut, but then, it would not
|
||||||
|
// be editable
|
||||||
|
SETSHORTCUT(this, tr("Main Window"), tr("Toggle table display"),
|
||||||
|
"Ctrl+T", m_toggletablesc, toggleTable);
|
||||||
|
|
||||||
ks = scb.get(tr("Main Window"), tr("Focus to Result Table"), "Ctrl+R");
|
ks = scb.get(tr("Main Window"), tr("Focus to Result Table"), "Ctrl+R");
|
||||||
if (!ks.isEmpty()) {
|
if (!ks.isEmpty()) {
|
||||||
delete m_focustotablesc;
|
delete m_focustotablesc;
|
||||||
@ -1004,6 +1009,13 @@ void RclMain::onSortDataChanged(DocSeqSortSpec spec)
|
|||||||
initiateQuery();
|
initiateQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Needed only because an action is not a widget, so can't be used
|
||||||
|
// with SETSHORTCUT
|
||||||
|
void RclMain::toggleTable()
|
||||||
|
{
|
||||||
|
actionShowResultsAsTable->toggle();
|
||||||
|
}
|
||||||
|
|
||||||
void RclMain::on_actionShowResultsAsTable_toggled(bool on)
|
void RclMain::on_actionShowResultsAsTable_toggled(bool on)
|
||||||
{
|
{
|
||||||
LOGDEB("RclMain::on_actionShowResultsAsTable_toggled(" << on << ")\n");
|
LOGDEB("RclMain::on_actionShowResultsAsTable_toggled(" << on << ")\n");
|
||||||
|
|||||||
@ -168,6 +168,7 @@ public slots:
|
|||||||
virtual void showTrayMessage(const QString& text);
|
virtual void showTrayMessage(const QString& text);
|
||||||
virtual void onSetDescription(QString);
|
virtual void onSetDescription(QString);
|
||||||
virtual void onNewShortcuts();
|
virtual void onNewShortcuts();
|
||||||
|
virtual void toggleTable();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
virtual void updateIdxStatus();
|
virtual void updateIdxStatus();
|
||||||
@ -220,6 +221,7 @@ private:
|
|||||||
QShortcut *m_focustosearchsc{0};
|
QShortcut *m_focustosearchsc{0};
|
||||||
QShortcut *m_focustosearcholdsc{0};
|
QShortcut *m_focustosearcholdsc{0};
|
||||||
QShortcut *m_clearsearchsc{0};
|
QShortcut *m_clearsearchsc{0};
|
||||||
|
QShortcut *m_toggletablesc{0};
|
||||||
QFileSystemWatcher m_watcher;
|
QFileSystemWatcher m_watcher;
|
||||||
vector<ExecCmd*> m_viewers;
|
vector<ExecCmd*> m_viewers;
|
||||||
ExecCmd *m_idxproc{0}; // Indexing process
|
ExecCmd *m_idxproc{0}; // Indexing process
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user