34 #ifndef CXCONSOLEWIDGET_H_
35 #define CXCONSOLEWIDGET_H_
37 #include "cxResourceWidgetsExport.h"
41 #include <QTextBrowser>
42 #include <QTextCharFormat>
45 class QTableWidgetItem;
48 class QContextMenuEvent;
61 virtual void clear() = 0;
64 virtual QString
getType()
const = 0;
69 std::map<MESSAGE_LEVEL, QTextCharFormat>
mFormat;
80 virtual QString
getType()
const {
return "detail";}
87 QTableWidgetItem *
addItem(
int column, QString text,
const Message& message);
100 virtual QString
getType()
const {
return "simple";}
108 void scrollToBottom();
109 bool mScrollToBottomEnabled;
120 void popup(
bool show);
127 QToolButton* mShowHeaderButton;
143 ConsoleWidget(QWidget* parent, QString uid=
"ConsoleWidget", QString name=
"Console");
146 virtual QString defaultWhatsThis()
const;
148 void setDetails(
bool on);
151 void contextMenuEvent(QContextMenuEvent* event);
152 virtual void showEvent(QShowEvent* event);
155 virtual void prePaintEvent();
158 void onChannelSelectorChanged();
159 void onLoggingFolderChanged();
160 void receivedMessage(
Message message);
161 void receivedChannel(QString channel);
164 void onSeverityDown();
165 void onSeverityChange(
int delta);
168 void updateShowHeader();
173 void printMessage(
const Message& message);
174 void addSeverityButtons(QBoxLayout* buttonLayout);
175 void addDetailsButton(QBoxLayout* buttonLayout);
176 void createChannelSelector();
177 void updateSeverityIndicator(QString iconname, QString help);
178 void addSeverityIndicator(QBoxLayout* buttonLayout);
179 void updateSeverityIndicator();
180 QString getDetailTypeFromButton()
const;
181 void selectMessagesWidget();
182 void createButtonWidget();
185 QAction* mSeverityAction;
187 QVBoxLayout* mMessagesLayout;
189 QAction* mDetailsAction;
191 QStringList mChannels;
193 boost::shared_ptr<class MessageFilterConsole> mMessageFilter;
195 QWidget* mButtonWidget;
196 QHBoxLayout* mControlLayout;
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