From ff189f6c706d7e79778c7e241478a1dbe07b96a1 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Mon, 5 Nov 2007 13:52:37 +0000 Subject: [PATCH] Rename GuiViewBase to GuiView. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21436 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/Action.cpp | 2 +- src/frontends/qt4/Action.h | 6 +- src/frontends/qt4/DialogView.h | 2 +- src/frontends/qt4/DockView.h | 2 +- src/frontends/qt4/GuiCommandBuffer.cpp | 2 +- src/frontends/qt4/GuiCommandBuffer.h | 6 +- src/frontends/qt4/GuiImplementation.cpp | 8 +- src/frontends/qt4/GuiImplementation.h | 4 +- src/frontends/qt4/GuiMenubar.cpp | 2 +- src/frontends/qt4/GuiMenubar.h | 6 +- src/frontends/qt4/GuiParagraph.cpp | 2 +- src/frontends/qt4/GuiToc.cpp | 4 +- src/frontends/qt4/GuiToc.h | 2 +- src/frontends/qt4/GuiToolbar.cpp | 4 +- src/frontends/qt4/GuiToolbar.h | 10 +-- src/frontends/qt4/GuiToolbars.cpp | 2 +- src/frontends/qt4/GuiToolbars.h | 6 +- src/frontends/qt4/GuiView.cpp | 98 ++++++++++++------------- src/frontends/qt4/GuiView.h | 6 +- src/frontends/qt4/GuiViewSource.cpp | 4 +- src/frontends/qt4/GuiViewSource.h | 2 +- 21 files changed, 90 insertions(+), 90 deletions(-) diff --git a/src/frontends/qt4/Action.cpp b/src/frontends/qt4/Action.cpp index bf18bef6db..2d4fc2c4c3 100644 --- a/src/frontends/qt4/Action.cpp +++ b/src/frontends/qt4/Action.cpp @@ -27,7 +27,7 @@ namespace lyx { namespace frontend { -Action::Action(GuiViewBase & lyxView, QIcon const & icon, +Action::Action(GuiView & lyxView, QIcon const & icon, QString const & text, FuncRequest const & func, QString const & tooltip) : QAction(&lyxView), func_(func), lyxView_(lyxView) diff --git a/src/frontends/qt4/Action.h b/src/frontends/qt4/Action.h index 28ab3df4e0..7376a433d2 100644 --- a/src/frontends/qt4/Action.h +++ b/src/frontends/qt4/Action.h @@ -22,7 +22,7 @@ class FuncRequest; namespace frontend { -class GuiViewBase; +class GuiView; /** * Action - Qt interface with LyX' FuncRequest. @@ -34,7 +34,7 @@ class Action : public QAction Q_OBJECT public: - Action(GuiViewBase & lyxView, QIcon const & icon, QString const & text, + Action(GuiView & lyxView, QIcon const & icon, QString const & text, FuncRequest const & func, QString const & tooltip); void update(); @@ -48,7 +48,7 @@ private Q_SLOTS: private: FuncRequest const & func_ ; - GuiViewBase & lyxView_; + GuiView & lyxView_; }; diff --git a/src/frontends/qt4/DialogView.h b/src/frontends/qt4/DialogView.h index 72451b50cc..79d34ab5c8 100644 --- a/src/frontends/qt4/DialogView.h +++ b/src/frontends/qt4/DialogView.h @@ -36,7 +36,7 @@ class DialogView : public QDialog, public Dialog { public: DialogView( - GuiViewBase & parent, ///< the main window where to dock. + GuiView & parent, ///< the main window where to dock. std::string const & name, ///< dialog identifier. bool modal = false, ///< Window modality. Qt::WindowFlags flags = 0 diff --git a/src/frontends/qt4/DockView.h b/src/frontends/qt4/DockView.h index 821f3fc881..c93e4e9a7b 100644 --- a/src/frontends/qt4/DockView.h +++ b/src/frontends/qt4/DockView.h @@ -29,7 +29,7 @@ class DockView : public QDockWidget, public Dialog { public: DockView( - GuiViewBase & parent, ///< the main window where to dock. + GuiView & parent, ///< the main window where to dock. std::string const & name, ///< dialog identifier. Qt::DockWidgetArea area = Qt::LeftDockWidgetArea, ///< Position of the dock (and also drawer) Qt::WindowFlags flags = 0 diff --git a/src/frontends/qt4/GuiCommandBuffer.cpp b/src/frontends/qt4/GuiCommandBuffer.cpp index f764442336..92317f60dd 100644 --- a/src/frontends/qt4/GuiCommandBuffer.cpp +++ b/src/frontends/qt4/GuiCommandBuffer.cpp @@ -88,7 +88,7 @@ protected: } // end of anon -GuiCommandBuffer::GuiCommandBuffer(GuiViewBase * view) +GuiCommandBuffer::GuiCommandBuffer(GuiView * view) : view_(view), lv_(*view), history_pos_(history_.end()) { transform(lyxaction.func_begin(), lyxaction.func_end(), diff --git a/src/frontends/qt4/GuiCommandBuffer.h b/src/frontends/qt4/GuiCommandBuffer.h index 5dc58dd7e8..b3a1004d4e 100644 --- a/src/frontends/qt4/GuiCommandBuffer.h +++ b/src/frontends/qt4/GuiCommandBuffer.h @@ -26,7 +26,7 @@ namespace lyx { namespace frontend { class LyXView; -class GuiViewBase; +class GuiView; class GuiCommandEdit; class GuiCommandBuffer : public QWidget @@ -34,7 +34,7 @@ class GuiCommandBuffer : public QWidget Q_OBJECT public: - GuiCommandBuffer(GuiViewBase * view); + GuiCommandBuffer(GuiView * view); public Q_SLOTS: /// cancel command compose @@ -53,7 +53,7 @@ public Q_SLOTS: void hideParent(); private: /// owning view - GuiViewBase * view_; + GuiView * view_; /// LyXView & lv_; /// command widget diff --git a/src/frontends/qt4/GuiImplementation.cpp b/src/frontends/qt4/GuiImplementation.cpp index 344f7954ca..99c2871186 100644 --- a/src/frontends/qt4/GuiImplementation.cpp +++ b/src/frontends/qt4/GuiImplementation.cpp @@ -48,7 +48,7 @@ LyXView& GuiImplementation::createRegisteredView() int id = 0; while (views_.find(id) != views_.end()) id++; - views_.insert(std::pair(id, new GuiViewBase(id))); + views_.insert(std::pair(id, new GuiView(id))); updateIds(views_, view_ids_); return *views_[id]; } @@ -60,7 +60,7 @@ bool GuiImplementation::unregisterView(int id) BOOST_ASSERT(views_.find(id) != views_.end()); BOOST_ASSERT(views_[id]); - std::map::iterator it; + std::map::iterator it; for (it = views_.begin(); it != views_.end(); ++it) { if (it->first == id) { views_.erase(id); @@ -82,8 +82,8 @@ bool GuiImplementation::closeAllViews() return true; } - std::map const cmap = views_; - std::map::const_iterator it; + std::map const cmap = views_; + std::map::const_iterator it; for (it = cmap.begin(); it != cmap.end(); ++it) { // TODO: return false when close event was ignored diff --git a/src/frontends/qt4/GuiImplementation.h b/src/frontends/qt4/GuiImplementation.h index b88c2f211e..72917ca6f7 100644 --- a/src/frontends/qt4/GuiImplementation.h +++ b/src/frontends/qt4/GuiImplementation.h @@ -22,7 +22,7 @@ namespace lyx { namespace frontend { -class GuiViewBase; +class GuiView; class LyXView; /** @@ -50,7 +50,7 @@ private: * object is handled by Qt when the view is closed * \sa Qt::WA_DeleteOnClose attribute. */ - std::map views_; + std::map views_; }; } // namespace frontend diff --git a/src/frontends/qt4/GuiMenubar.cpp b/src/frontends/qt4/GuiMenubar.cpp index 4f2bc59ec3..cf523b64ea 100644 --- a/src/frontends/qt4/GuiMenubar.cpp +++ b/src/frontends/qt4/GuiMenubar.cpp @@ -38,7 +38,7 @@ namespace frontend { // MacOSX specific stuff is at the end. GuiMenubar::GuiMenubar(LyXView * view, MenuBackend & mbe) - : owner_(static_cast(view)), menubackend_(mbe) + : owner_(static_cast(view)), menubackend_(mbe) { macxMenuBarInit(); diff --git a/src/frontends/qt4/GuiMenubar.h b/src/frontends/qt4/GuiMenubar.h index 1256fff0ce..e52906c356 100644 --- a/src/frontends/qt4/GuiMenubar.h +++ b/src/frontends/qt4/GuiMenubar.h @@ -24,7 +24,7 @@ class MenuBackend; namespace frontend { -class GuiViewBase; +class GuiView; class GuiPopupMenu; class LyXView; @@ -40,7 +40,7 @@ public: void openByName(QString const & name); /// return the owning view - GuiViewBase * view() { return owner_; } + GuiView * view() { return owner_; } /// return the menu controller MenuBackend const & backend() { return menubackend_; } @@ -56,7 +56,7 @@ private: void macxMenuBarInit(); /// owning view - GuiViewBase * owner_; + GuiView * owner_; /// menu controller MenuBackend & menubackend_; diff --git a/src/frontends/qt4/GuiParagraph.cpp b/src/frontends/qt4/GuiParagraph.cpp index 8013464a9d..39d09f64ed 100644 --- a/src/frontends/qt4/GuiParagraph.cpp +++ b/src/frontends/qt4/GuiParagraph.cpp @@ -332,7 +332,7 @@ LyXAlignment GuiParagraph::alignDefault() const Dialog * createGuiParagraph(LyXView & lv) { #if 0 - GuiViewBase & guiview = static_cast(lv); + GuiView & guiview = static_cast(lv); #ifdef USE_DOCK_WIDGET return new DockView(guiview, "paragraph", Qt::TopDockWidgetArea); diff --git a/src/frontends/qt4/GuiToc.cpp b/src/frontends/qt4/GuiToc.cpp index 07c5828654..160e7643a3 100644 --- a/src/frontends/qt4/GuiToc.cpp +++ b/src/frontends/qt4/GuiToc.cpp @@ -43,7 +43,7 @@ using std::string; namespace lyx { namespace frontend { -GuiToc::GuiToc(GuiViewBase & parent, Qt::DockWidgetArea area, Qt::WindowFlags flags) +GuiToc::GuiToc(GuiView & parent, Qt::DockWidgetArea area, Qt::WindowFlags flags) : DockView(parent, "toc", area, flags), params_(TOC_CODE) { widget_ = new TocWidget(*this); @@ -236,7 +236,7 @@ void GuiToc::dispatchParams() Dialog * createGuiToc(LyXView & lv) { - GuiViewBase & guiview = static_cast(lv); + GuiView & guiview = static_cast(lv); #ifdef Q_WS_MACX // On Mac show as a drawer at the right return new GuiToc(guiview, Qt::RightDockWidgetArea, Qt::Drawer); diff --git a/src/frontends/qt4/GuiToc.h b/src/frontends/qt4/GuiToc.h index 4c9b6d64fc..e3b3f643f7 100644 --- a/src/frontends/qt4/GuiToc.h +++ b/src/frontends/qt4/GuiToc.h @@ -40,7 +40,7 @@ class GuiToc : public DockView public: /// GuiToc( - GuiViewBase & parent, ///< the main window where to dock. + GuiView & parent, ///< the main window where to dock. Qt::DockWidgetArea area = Qt::LeftDockWidgetArea, ///< Position of the dock (and also drawer) Qt::WindowFlags flags = 0); diff --git a/src/frontends/qt4/GuiToolbar.cpp b/src/frontends/qt4/GuiToolbar.cpp index 4f111e2bd7..2e77e6e874 100644 --- a/src/frontends/qt4/GuiToolbar.cpp +++ b/src/frontends/qt4/GuiToolbar.cpp @@ -238,7 +238,7 @@ static TextClass const & textClass(LyXView const & lv) // ///////////////////////////////////////////////////////////////////// -GuiLayoutBox::GuiLayoutBox(GuiViewBase & owner) +GuiLayoutBox::GuiLayoutBox(GuiView & owner) : owner_(owner) { setSizeAdjustPolicy(QComboBox::AdjustToContents); @@ -324,7 +324,7 @@ void GuiLayoutBox::selected(const QString & str) ///////////////////////////////////////////////////////////////////// -GuiToolbar::GuiToolbar(ToolbarInfo const & tbinfo, GuiViewBase & owner) +GuiToolbar::GuiToolbar(ToolbarInfo const & tbinfo, GuiView & owner) : QToolBar(qt_(tbinfo.gui_name), &owner), owner_(owner), layout_(0), command_buffer_(0) { diff --git a/src/frontends/qt4/GuiToolbar.h b/src/frontends/qt4/GuiToolbar.h index ca4703ca0a..4657424105 100644 --- a/src/frontends/qt4/GuiToolbar.h +++ b/src/frontends/qt4/GuiToolbar.h @@ -29,7 +29,7 @@ class ToolbarItem; namespace frontend { class GuiCommandBuffer; -class GuiViewBase; +class GuiView; class Action; @@ -37,7 +37,7 @@ class GuiLayoutBox : public QComboBox { Q_OBJECT public: - GuiLayoutBox(GuiViewBase &); + GuiLayoutBox(GuiView &); /// select the right layout in the combobox. void set(docstring const & layout); @@ -48,7 +48,7 @@ private Q_SLOTS: void selected(const QString & str); private: - GuiViewBase & owner_; + GuiView & owner_; }; @@ -56,7 +56,7 @@ class GuiToolbar : public QToolBar { Q_OBJECT public: - GuiToolbar(ToolbarInfo const &, GuiViewBase &); + GuiToolbar(ToolbarInfo const &, GuiView &); /// Add a button to the bar. void add(ToolbarItem const & item); @@ -77,7 +77,7 @@ private: Action * addItem(ToolbarItem const & item); QList actions_; - GuiViewBase & owner_; + GuiView & owner_; GuiLayoutBox * layout_; GuiCommandBuffer * command_buffer_; diff --git a/src/frontends/qt4/GuiToolbars.cpp b/src/frontends/qt4/GuiToolbars.cpp index 3b3effb7bf..d368b57e84 100644 --- a/src/frontends/qt4/GuiToolbars.cpp +++ b/src/frontends/qt4/GuiToolbars.cpp @@ -40,7 +40,7 @@ namespace frontend { #define TurnOnFlag(x) flags |= ToolbarInfo::x #define TurnOffFlag(x) flags &= ~ToolbarInfo::x -GuiToolbars::GuiToolbars(GuiViewBase & owner) +GuiToolbars::GuiToolbars(GuiView & owner) : owner_(owner), layout_(0), last_textclass_(TextClassPtr()) diff --git a/src/frontends/qt4/GuiToolbars.h b/src/frontends/qt4/GuiToolbars.h index af9c4b9bab..446f7eaabf 100644 --- a/src/frontends/qt4/GuiToolbars.h +++ b/src/frontends/qt4/GuiToolbars.h @@ -26,13 +26,13 @@ namespace frontend { class GuiLayoutBox; class GuiToolbar; -class GuiViewBase; +class GuiView; class GuiToolbars { public: /// - GuiToolbars(GuiViewBase & owner); + GuiToolbars(GuiView & owner); /// Initialize the toolbars using the backend database. void init(); @@ -88,7 +88,7 @@ private: void initFlags(ToolbarInfo & tbinfo); /// The parent window. - GuiViewBase & owner_; + GuiView & owner_; /** The layout box is actually owned by whichever toolbar * contains it. All the Toolbars class needs is a means of diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 96b9347d62..bf924837a9 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -124,7 +124,7 @@ private: }; -struct GuiViewBase::GuiViewPrivate +struct GuiView::GuiViewPrivate { string cur_title; @@ -149,7 +149,7 @@ struct GuiViewBase::GuiViewPrivate // static needed by "New Window" static unsigned int lastIconSize; - QMenu * toolBarPopup(GuiViewBase * parent) + QMenu * toolBarPopup(GuiView * parent) { // FIXME: translation QMenu * menu = new QMenu(parent); @@ -204,10 +204,10 @@ struct GuiViewBase::GuiViewPrivate }; -unsigned int GuiViewBase::GuiViewPrivate::lastIconSize = 0; +unsigned int GuiView::GuiViewPrivate::lastIconSize = 0; -GuiViewBase::GuiViewBase(int id) +GuiView::GuiView(int id) : QMainWindow(), LyXView(id), quitting_by_menu_(false), d(*new GuiViewPrivate) { @@ -247,7 +247,7 @@ GuiViewBase::GuiViewBase(int id) } -GuiViewBase::~GuiViewBase() +GuiView::~GuiView() { delete d.menubar_; delete d.toolbars_; @@ -255,7 +255,7 @@ GuiViewBase::~GuiViewBase() } -void GuiViewBase::close() +void GuiView::close() { quitting_by_menu_ = true; d.tab_widget_->closeAll(); @@ -264,20 +264,20 @@ void GuiViewBase::close() } -void GuiViewBase::setFocus() +void GuiView::setFocus() { if (d.tab_widget_->count()) d.tab_widget_->currentWidget()->setFocus(); } -QMenu* GuiViewBase::createPopupMenu() +QMenu* GuiView::createPopupMenu() { return d.toolBarPopup(this); } -void GuiViewBase::init() +void GuiView::init() { // GuiToolbars *must* be initialised before GuiMenubar. d.toolbars_ = new GuiToolbars(*this); @@ -297,7 +297,7 @@ void GuiViewBase::init() } -void GuiViewBase::closeEvent(QCloseEvent * close_event) +void GuiView::closeEvent(QCloseEvent * close_event) { // we may have been called through the close window button // which bypasses the LFUN machinery. @@ -332,7 +332,7 @@ void GuiViewBase::closeEvent(QCloseEvent * close_event) } -void GuiViewBase::dragEnterEvent(QDragEnterEvent * event) +void GuiView::dragEnterEvent(QDragEnterEvent * event) { if (event->mimeData()->hasUrls()) event->accept(); @@ -342,7 +342,7 @@ void GuiViewBase::dragEnterEvent(QDragEnterEvent * event) } -void GuiViewBase::dropEvent(QDropEvent* event) +void GuiView::dropEvent(QDropEvent* event) { QList files = event->mimeData()->urls(); if (files.isEmpty()) @@ -359,7 +359,7 @@ void GuiViewBase::dropEvent(QDropEvent* event) } -void GuiViewBase::saveGeometry() +void GuiView::saveGeometry() { static bool done = false; if (done) @@ -373,7 +373,7 @@ void GuiViewBase::saveGeometry() // http://www.trolltech.com/developer/task-tracker/index_html?id=119684+&method=entry // Then also the moveEvent, resizeEvent, and the // code for floatingGeometry_ can be removed; - // adjust GuiViewBase::setGeometry() + // adjust GuiView::setGeometry() QRect normal_geometry; int maximized; @@ -424,7 +424,7 @@ void GuiViewBase::saveGeometry() } -void GuiViewBase::setGeometry(unsigned int width, +void GuiView::setGeometry(unsigned int width, unsigned int height, int posx, int posy, int maximized, @@ -534,7 +534,7 @@ void GuiViewBase::setGeometry(unsigned int width, } -void GuiViewBase::setWindowTitle(docstring const & t, docstring const & it) +void GuiView::setWindowTitle(docstring const & t, docstring const & it) { QString title = windowTitle(); QString new_title = toqstr(t); @@ -548,7 +548,7 @@ void GuiViewBase::setWindowTitle(docstring const & t, docstring const & it) } -void GuiViewBase::message(docstring const & str) +void GuiView::message(docstring const & str) { statusBar()->showMessage(toqstr(str)); statusbar_timer_.stop(); @@ -556,38 +556,38 @@ void GuiViewBase::message(docstring const & str) } -void GuiViewBase::clearMessage() +void GuiView::clearMessage() { update_view_state_qt(); } -void GuiViewBase::setIconSize(unsigned int size) +void GuiView::setIconSize(unsigned int size) { d.lastIconSize = size; QMainWindow::setIconSize(QSize(size, size)); } -void GuiViewBase::smallSizedIcons() +void GuiView::smallSizedIcons() { setIconSize(d.smallIconSize); } -void GuiViewBase::normalSizedIcons() +void GuiView::normalSizedIcons() { setIconSize(d.normalIconSize); } -void GuiViewBase::bigSizedIcons() +void GuiView::bigSizedIcons() { setIconSize(d.bigIconSize); } -void GuiViewBase::update_view_state_qt() +void GuiView::update_view_state_qt() { if (!hasFocus()) return; @@ -597,7 +597,7 @@ void GuiViewBase::update_view_state_qt() } -void GuiViewBase::on_currentWorkAreaChanged(GuiWorkArea * wa) +void GuiView::on_currentWorkAreaChanged(GuiWorkArea * wa) { disconnectBuffer(); disconnectBufferView(); @@ -616,7 +616,7 @@ void GuiViewBase::on_currentWorkAreaChanged(GuiWorkArea * wa) } -void GuiViewBase::updateStatusBar() +void GuiView::updateStatusBar() { // let the user see the explicit message if (statusbar_timer_.isActive()) @@ -626,19 +626,19 @@ void GuiViewBase::updateStatusBar() } -void GuiViewBase::activated(FuncRequest const & func) +void GuiView::activated(FuncRequest const & func) { dispatch(func); } -bool GuiViewBase::hasFocus() const +bool GuiView::hasFocus() const { return qApp->activeWindow() == this; } -QRect GuiViewBase::updateFloatingGeometry() +QRect GuiView::updateFloatingGeometry() { QDesktopWidget& dw = *qApp->desktop(); QRect desk = dw.availableGeometry(dw.primaryScreen()); @@ -650,19 +650,19 @@ QRect GuiViewBase::updateFloatingGeometry() } -void GuiViewBase::resizeEvent(QResizeEvent *) +void GuiView::resizeEvent(QResizeEvent *) { updateFloatingGeometry(); } -void GuiViewBase::moveEvent(QMoveEvent *) +void GuiView::moveEvent(QMoveEvent *) { updateFloatingGeometry(); } -bool GuiViewBase::event(QEvent * e) +bool GuiView::event(QEvent * e) { switch (e->type()) { @@ -719,14 +719,14 @@ bool GuiViewBase::event(QEvent * e) } -bool GuiViewBase::focusNextPrevChild(bool /*next*/) +bool GuiView::focusNextPrevChild(bool /*next*/) { setFocus(); return true; } -void GuiViewBase::showView() +void GuiView::showView() { QMainWindow::setWindowTitle(qt_("LyX")); QMainWindow::show(); @@ -734,7 +734,7 @@ void GuiViewBase::showView() } -void GuiViewBase::setBusy(bool yes) +void GuiView::setBusy(bool yes) { GuiWorkArea * wa = d.tab_widget_->currentWorkArea(); if (wa) { @@ -752,7 +752,7 @@ void GuiViewBase::setBusy(bool yes) } -GuiToolbar * GuiViewBase::makeToolbar(ToolbarInfo const & tbinfo, bool newline) +GuiToolbar * GuiView::makeToolbar(ToolbarInfo const & tbinfo, bool newline) { GuiToolbar * toolBar = new GuiToolbar(tbinfo, *this); @@ -799,13 +799,13 @@ GuiToolbar * GuiViewBase::makeToolbar(ToolbarInfo const & tbinfo, bool newline) } -WorkArea * GuiViewBase::workArea(Buffer & buffer) +WorkArea * GuiView::workArea(Buffer & buffer) { return d.tab_widget_->workArea(buffer); } -WorkArea * GuiViewBase::addWorkArea(Buffer & buffer) +WorkArea * GuiView::addWorkArea(Buffer & buffer) { GuiWorkArea * wa = new GuiWorkArea(buffer, *this); wa->setUpdatesEnabled(false); @@ -819,19 +819,19 @@ WorkArea * GuiViewBase::addWorkArea(Buffer & buffer) } -WorkArea * GuiViewBase::currentWorkArea() +WorkArea * GuiView::currentWorkArea() { return d.tab_widget_->currentWorkArea(); } -WorkArea const * GuiViewBase::currentWorkArea() const +WorkArea const * GuiView::currentWorkArea() const { return d.tab_widget_->currentWorkArea(); } -void GuiViewBase::setCurrentWorkArea(WorkArea * work_area) +void GuiView::setCurrentWorkArea(WorkArea * work_area) { BOOST_ASSERT(work_area); @@ -845,7 +845,7 @@ void GuiViewBase::setCurrentWorkArea(WorkArea * work_area) } -void GuiViewBase::removeWorkArea(WorkArea * work_area) +void GuiView::removeWorkArea(WorkArea * work_area) { BOOST_ASSERT(work_area); if (work_area == currentWorkArea()) { @@ -869,25 +869,25 @@ void GuiViewBase::removeWorkArea(WorkArea * work_area) } -void GuiViewBase::showMiniBuffer(bool visible) +void GuiView::showMiniBuffer(bool visible) { d.toolbars_->showCommandBuffer(visible); } -void GuiViewBase::openMenu(docstring const & name) +void GuiView::openMenu(docstring const & name) { d.menubar_->openByName(toqstr(name)); } -void GuiViewBase::openLayoutList() +void GuiView::openLayoutList() { d.toolbars_->openLayoutList(); } -void GuiViewBase::updateLayoutChoice() +void GuiView::updateLayoutChoice() { // Don't show any layouts without a buffer if (!buffer()) { @@ -910,12 +910,12 @@ void GuiViewBase::updateLayoutChoice() } -bool GuiViewBase::isToolbarVisible(std::string const & id) +bool GuiView::isToolbarVisible(std::string const & id) { return d.toolbars_->visible(id); } -void GuiViewBase::updateToolbars() +void GuiView::updateToolbars() { WorkArea * wa = currentWorkArea(); if (wa) { @@ -936,13 +936,13 @@ void GuiViewBase::updateToolbars() } -ToolbarInfo * GuiViewBase::getToolbarInfo(string const & name) +ToolbarInfo * GuiView::getToolbarInfo(string const & name) { return d.toolbars_->getToolbarInfo(name); } -void GuiViewBase::toggleToolbarState(string const & name, bool allowauto) +void GuiView::toggleToolbarState(string const & name, bool allowauto) { // it is possible to get current toolbar status like this,... // but I decide to obey the order of ToolbarBackend::flags diff --git a/src/frontends/qt4/GuiView.h b/src/frontends/qt4/GuiView.h index 5556fd9ba7..27933e9521 100644 --- a/src/frontends/qt4/GuiView.h +++ b/src/frontends/qt4/GuiView.h @@ -46,14 +46,14 @@ QWidget * mainWindow(); * is deleted. This might be useful for closing other dialogs * depending on a given GuiView. */ -class GuiViewBase : public QMainWindow, public LyXView +class GuiView : public QMainWindow, public LyXView { Q_OBJECT public: /// create a main window of the given dimensions - GuiViewBase(int id); + GuiView(int id); - ~GuiViewBase(); + ~GuiView(); virtual void init(); virtual void close(); diff --git a/src/frontends/qt4/GuiViewSource.cpp b/src/frontends/qt4/GuiViewSource.cpp index 85dc747767..e6927e42a5 100644 --- a/src/frontends/qt4/GuiViewSource.cpp +++ b/src/frontends/qt4/GuiViewSource.cpp @@ -88,7 +88,7 @@ void ViewSourceWidget::update(bool full_source) } -GuiViewSource::GuiViewSource(GuiViewBase & parent, Qt::DockWidgetArea area, Qt::WindowFlags flags) +GuiViewSource::GuiViewSource(GuiView & parent, Qt::DockWidgetArea area, Qt::WindowFlags flags) : DockView(parent, "view-source", area, flags) { widget_ = new ViewSourceWidget(*this); @@ -172,7 +172,7 @@ QString GuiViewSource::title() const Dialog * createGuiViewSource(LyXView & lv) { - return new GuiViewSource(static_cast(lv)); + return new GuiViewSource(static_cast(lv)); } diff --git a/src/frontends/qt4/GuiViewSource.h b/src/frontends/qt4/GuiViewSource.h index ab1db03640..ab976e3876 100644 --- a/src/frontends/qt4/GuiViewSource.h +++ b/src/frontends/qt4/GuiViewSource.h @@ -63,7 +63,7 @@ class GuiViewSource : public DockView public: GuiViewSource( - GuiViewBase & parent, ///< the main window where to dock. + GuiView & parent, ///< the main window where to dock. Qt::DockWidgetArea area = Qt::BottomDockWidgetArea, ///< Position of the dock (and also drawer) Qt::WindowFlags flags = 0); -- 2.39.2