34 #ifndef CXCONSOLEWIDGET_H_
35 #define CXCONSOLEWIDGET_H_
37 #include "cxResourceWidgetsExport.h"
41 #include <QTextBrowser>
42 #include <QTextCharFormat>
45 class QTableWidgetItem;
48 class QContextMenuEvent;
54 class PopupToolbarWidget;
62 virtual void clear() = 0;
65 virtual QString
getType()
const = 0;
70 std::map<MESSAGE_LEVEL, QTextCharFormat>
mFormat;
81 virtual QString
getType()
const {
return "detail";}
88 QTableWidgetItem *
addItem(
int column, QString text,
const Message& message);
101 virtual QString
getType()
const {
return "simple";}
109 void scrollToBottom();
110 bool mScrollToBottomEnabled;
126 ConsoleWidget(QWidget* parent, QString uid=
"ConsoleWidget", QString name=
"Console");
130 void setDetails(
bool on);
133 void contextMenuEvent(QContextMenuEvent* event);
134 virtual void showEvent(QShowEvent* event);
137 virtual void prePaintEvent();
140 void onChannelSelectorChanged();
141 void onLoggingFolderChanged();
142 void receivedMessage(
Message message);
143 void receivedChannel(QString channel);
146 void onSeverityDown();
147 void onSeverityChange(
int delta);
150 void updateShowHeader();
155 void printMessage(
const Message& message);
156 void addSeverityButtons(QBoxLayout* buttonLayout);
157 void addDetailsButton(QBoxLayout* buttonLayout);
158 void createChannelSelector();
159 void updateSeverityIndicator(QString iconname, QString help);
160 void addSeverityIndicator(QBoxLayout* buttonLayout);
161 void updateSeverityIndicator();
162 QString getDetailTypeFromButton()
const;
163 void selectMessagesWidget();
164 void createButtonWidget(QWidget *widget);
167 QAction* mSeverityAction;
169 QVBoxLayout* mMessagesLayout;
171 QAction* mDetailsAction;
173 QStringList mChannels;
175 boost::shared_ptr<class MessageFilterConsole> mMessageFilter;
Helper class for storing one string value in an xml document.
boost::shared_ptr< class StringProperty > StringPropertyPtr
boost::shared_ptr< class Log > LogPtr
Helper class for xml files used to store ssc/cx data.
boost::shared_ptr< class MessageListener > MessageListenerPtr