#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
  Q_OBJECT
  Q_PROPERTY(QMenu* scriptMenu READ scriptMenu)
public:
  explicit MainWindow(QWidget *parent = 0);
  ~MainWindow();

public slots:
  void setStyleByName(const QString& style_name);
  void showScriptDebugger();
  void evalScript();
  void loadScript();

  QMenu* scriptMenu() const
  {
    return mScriptMenu;
  }
private slots:
  void selectStyle();
  void postInit();

private:
  void closeEvent(QCloseEvent *evn);

private:
  Ui::MainWindow *ui;

  QMenu* mScriptMenu;

  class Private;
  Private& p_;

  void addDataWidget(QWidget*, int wnum);

  friend class Private;

};

#endif // MAINWINDOW_H
