forked from qt-creator/qt-creator
Axivion: Add highlight marks to toolbar
Make it more easy to toggle between showing inline markers or not. This also makes the reaction more direct. Before this change markers were kept or not added until the file got re-opened the next time. Change-Id: I3ad56444648967db9565176e5b60ac6df8c32ff1 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
#include "axivionoutputpane.h"
|
#include "axivionoutputpane.h"
|
||||||
|
|
||||||
#include "axivionplugin.h"
|
#include "axivionplugin.h"
|
||||||
|
#include "axivionsettings.h"
|
||||||
#include "axiviontr.h"
|
#include "axiviontr.h"
|
||||||
#include "dashboard/dto.h"
|
#include "dashboard/dto.h"
|
||||||
#include "issueheaderview.h"
|
#include "issueheaderview.h"
|
||||||
@@ -813,6 +814,18 @@ public:
|
|||||||
m_showDashboard->setChecked(idx == 0);
|
m_showDashboard->setChecked(idx == 0);
|
||||||
m_showIssues->setChecked(idx == 1);
|
m_showIssues->setChecked(idx == 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
m_toggleIssues = new QToolButton(m_outputWidget);
|
||||||
|
m_toggleIssues->setIcon(Utils::Icons::WARNING_TOOLBAR.icon());
|
||||||
|
m_toggleIssues->setToolTip(Tr::tr("Show issue markers inline"));
|
||||||
|
m_toggleIssues->setCheckable(true);
|
||||||
|
m_toggleIssues->setChecked(settings().highlightMarks());
|
||||||
|
connect(m_toggleIssues, &QToolButton::toggled, this, [](bool checked) {
|
||||||
|
settings().highlightMarks.setValue(checked);
|
||||||
|
});
|
||||||
|
connect(&settings().highlightMarks, &BaseAspect::changed, this, [this] {
|
||||||
|
m_toggleIssues->setChecked(settings().highlightMarks());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
~AxivionOutputPane()
|
~AxivionOutputPane()
|
||||||
@@ -832,7 +845,7 @@ public:
|
|||||||
|
|
||||||
QList<QWidget *> toolBarWidgets() const final
|
QList<QWidget *> toolBarWidgets() const final
|
||||||
{
|
{
|
||||||
return {m_showDashboard, m_showIssues};
|
return {m_showDashboard, m_showIssues, m_toggleIssues};
|
||||||
}
|
}
|
||||||
|
|
||||||
void clearContents() final {}
|
void clearContents() final {}
|
||||||
@@ -909,6 +922,7 @@ private:
|
|||||||
QStackedWidget *m_outputWidget = nullptr;
|
QStackedWidget *m_outputWidget = nullptr;
|
||||||
QToolButton *m_showDashboard = nullptr;
|
QToolButton *m_showDashboard = nullptr;
|
||||||
QToolButton *m_showIssues = nullptr;
|
QToolButton *m_showIssues = nullptr;
|
||||||
|
QToolButton *m_toggleIssues = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -309,6 +309,12 @@ AxivionPluginPrivate::AxivionPluginPrivate()
|
|||||||
connect(&m_networkAccessManager, &QNetworkAccessManager::sslErrors,
|
connect(&m_networkAccessManager, &QNetworkAccessManager::sslErrors,
|
||||||
this, &AxivionPluginPrivate::handleSslErrors);
|
this, &AxivionPluginPrivate::handleSslErrors);
|
||||||
#endif // ssl
|
#endif // ssl
|
||||||
|
connect(&settings().highlightMarks, &BoolAspect::changed, this, [this] {
|
||||||
|
if (settings().highlightMarks())
|
||||||
|
handleOpenedDocs();
|
||||||
|
else
|
||||||
|
clearAllMarks();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void AxivionPluginPrivate::handleSslErrors(QNetworkReply *reply, const QList<QSslError> &errors)
|
void AxivionPluginPrivate::handleSslErrors(QNetworkReply *reply, const QList<QSslError> &errors)
|
||||||
|
Reference in New Issue
Block a user