-class GuiViewSource : public QDockWidget, public Dialog
-{
-public:
- GuiViewSource(GuiViewBase & parent)
- : QDockWidget(&parent, Qt::WindowFlags(0)), name_("view-source")
- {
- ControlViewSource * c = new ControlViewSource(*this);
- controller_ = c;
- controller_->setLyXView(parent);
- widget_ = new GuiViewSourceDialog(*c);
- setWidget(widget_);
- setWindowTitle(widget_->windowTitle());
- parent.addDockWidget(Qt::BottomDockWidgetArea, this);
- }
- ~GuiViewSource() { delete widget_; delete controller_; }
-
- /// Dialog inherited methods
- //@{
- void applyView() {}
- void hideView() { QDockWidget::hide(); }
- void showData(std::string const & data)
- {
- controller_->initialiseParams(data);
- showView();
- }
- void showView()
- {
- widget_->updateView(); // make sure its up-to-date
- QDockWidget::show();
- }
- bool isVisibleView() const { return QDockWidget::isVisible(); }
- void checkStatus() { updateView(); }
- void redraw() { redrawView(); }
- void redrawView() {}
- void updateData(std::string const & data)
- {
- controller_->initialiseParams(data);
- updateView();
- }
- void updateView()
- {
- widget_->updateView();
- QDockWidget::update();
- }
- bool isClosing() const { return false; }
- void partialUpdateView(int /*id*/) {}
- Controller & controller() { return *controller_; }
- std::string name() const { return name_; }
- //@}