12 #include "ui_logcomponent.h"
17 #include "gui/menus/menuaction.h"
28 using namespace swift::gui::menus;
32 CConsoleTextEdit::CConsoleTextEdit(QWidget *parent) : QPlainTextEdit(parent)
36 Q_ASSERT_X(c, Q_FUNC_INFO,
"Custom menu");
38 this->setContextMenuPolicy(Qt::CustomContextMenu);
43 QMenu *menu = QPlainTextEdit::createStandardContextMenu();
44 menu->addAction(CIcons::delete16(),
"Clear console",
this, &QPlainTextEdit::clear);
45 menu->exec(this->mapToGlobal(pos));
52 connect(&m_history, &CLogHistoryReplica::elementAdded,
this,
53 [
this](
const CStatusMessage &message) { ui->comp_StatusMessages->appendStatusMessageToList(message); });
54 connect(&m_history, &CLogHistoryReplica::elementsReplaced,
this, [
this](
const CStatusMessageList &messages) {
55 ui->comp_StatusMessages->appendStatusMessagesToList(messages);
59 m_history.setFilter(filter.to<CLogPattern>());
74 ui->comp_StatusMessages->filterUseRadioButtonDescriptiveIcons(oneLetterText);
91 ui->comp_StatusMessages->setSorting(propertyIndex, order);
SWIFT_CORE_EXPORT swift::core::CApplication * sApp
Single instance of application object.
swift::misc::shared_state::CDataLinkDBus * getDataLinkDBus()
Transport mechanism for sharing state between applications.
void customMenuRequested(const QPoint &pos)
Custom menu.
GUI displaying log and status messages.
void displayLog(bool attention=false)
Display log.
void filterUseRadioButtonDescriptiveIcons(bool oneLetterText)
Use icons with radio buttons.
void showDetails(bool details)
Show log details.
void setNoSorting()
Disable sorting.
void setSorting(const swift::misc::CPropertyIndex &propertyIndex, Qt::SortOrder order)
Sorting for view.
virtual ~CLogComponent()
Destructor.
void requestAttention()
Make me visible.
void setMaxLogMessages(int max)
Set max.log messages.
void showFilterBar()
Show a filter bar.
void hideFilterBar()
Hide a filter bar.
void clearMessages()
Clear.
CLogComponent(QWidget *parent=nullptr)
Constructor.
void showFilterDialog()
Show filter dialog and disable bar.
void filterChanged(const swift::misc::CVariant &filter)
The user changed their message filter.
Value class for matching log messages based on their categories.
Streamable status message, e.g.
Status messages, e.g. from Core -> GUI.
Wrapper around QVariant which provides transparent access to CValueObject methods of the contained ob...
void setFilter(const U &filter)
Set filter to choose list elements.
virtual void initialize(IDataLink *dataLink)
Subscribe using the given transport mechanism.
Backend services of the swift project, like dealing with the network or the simulators.
High level reusable GUI components.
Views, mainly QTableView.
Free functions in swift::misc.