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");
147 void setDetails(
bool on);
150 void contextMenuEvent(QContextMenuEvent* event);
151 virtual void showEvent(QShowEvent* event);
154 virtual void prePaintEvent();
157 void onChannelSelectorChanged();
158 void onLoggingFolderChanged();
159 void receivedMessage(
Message message);
160 void receivedChannel(QString channel);
163 void onSeverityDown();
164 void onSeverityChange(
int delta);
167 void updateShowHeader();
172 void printMessage(
const Message& message);
173 void addSeverityButtons(QBoxLayout* buttonLayout);
174 void addDetailsButton(QBoxLayout* buttonLayout);
175 void createChannelSelector();
176 void updateSeverityIndicator(QString iconname, QString help);
177 void addSeverityIndicator(QBoxLayout* buttonLayout);
178 void updateSeverityIndicator();
179 QString getDetailTypeFromButton()
const;
180 void selectMessagesWidget();
181 void createButtonWidget();
184 QAction* mSeverityAction;
186 QVBoxLayout* mMessagesLayout;
188 QAction* mDetailsAction;
190 QStringList mChannels;
192 boost::shared_ptr<class MessageFilterConsole> mMessageFilter;
194 QWidget* mButtonWidget;
195 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