#include <Common/Globals>
#include <Common/iLogger>
#include <Common/iApp>
+#include <Common/iRegistry>
+#include <SdiWindow/iSdiWindow>
#include <QtGui>
+#include <QXmlStreamReader>
using namespace eVaf;
//-------------------------------------------------------------------
-Window::Window(QWidget * parent, Qt::WindowFlags flags)
- : QWidget(parent, flags)
+Window::Window(QString const & args, QWidget * parent, Qt::WindowFlags flags)
+ : Gui::Panel(parent, flags)
{
setObjectName(QString("%1-Window").arg(VER_MODULE_NAME_STR));
+ SdiWindow::iSdiWindow * win = evafQueryInterface<SdiWindow::iSdiWindow>("iSdiWindow");
+ win->addPanel(getPanelName(args), this);
+
setWindowTitle(tr("Messages"));
Common::iLogger * logger = Common::iLogger::instance();
EVAF_INFO("%s destroyed", qPrintable(objectName()));
}
+QString Window::getPanelName(QString const & args) const
+{
+ QString panelName = "LogView";
+
+ QXmlStreamReader xml(args);
+ while (!xml.atEnd()) {
+ xml.readNext();
+ if (xml.isStartElement() && xml.name() == "attributes") {
+ if (xml.attributes().hasAttribute("panelName")) {
+ QString s = xml.attributes().value("panelName").toString();
+ if (!s.isEmpty())
+ panelName = s;
+ }
+ }
+ }
+
+ return panelName;
+}
+
bool Window::event(QEvent * e)
{
if (e->type() == QEvent::StatusTip) {
bool Module::init(QString const & args)
{
- Q_UNUSED(args);
-
- wWindow = new Window();
+ wWindow = new Window(args);
EVAF_INFO("%s initialized", qPrintable(objectName()));
#include <Plugins/iPlugin>
#include <Common/iLogger>
+#include <Gui/Panel>
#include <QObject>
#include <QString>
/**
* The log view window
*/
-class Window : public QWidget
+class Window : public Gui::Panel
{
Q_OBJECT
public:
- Window(QWidget * parent = 0, Qt::WindowFlags flags = 0);
+ Window(QString const & args, QWidget * parent = 0, Qt::WindowFlags flags = 0);
virtual ~Window();
void restoreSettings();
+ QString getPanelName(QString const & args) const;
+
private: // Members
/**
* Module/library version number in the form major,minor,release,build
*/
-#define VER_FILE_VERSION 0,1,1,2
+#define VER_FILE_VERSION 0,2,1,3
/**
* Module/library version number in the string format (shall end with \0)
*/
-#define VER_FILE_VERSION_STR "0.1.1.2\0"
+#define VER_FILE_VERSION_STR "0.2.1.3\0"
/**
* Module/library name (shall end with \0)