Rename GuiViewBase to GuiView.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21436 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-11-05 13:52:37 +00:00
parent c1afc30a8a
commit ff189f6c70
21 changed files with 90 additions and 90 deletions

View File

@ -27,7 +27,7 @@ namespace lyx {
namespace frontend { namespace frontend {
Action::Action(GuiViewBase & lyxView, QIcon const & icon, Action::Action(GuiView & lyxView, QIcon const & icon,
QString const & text, FuncRequest const & func, QString const & text, FuncRequest const & func,
QString const & tooltip) QString const & tooltip)
: QAction(&lyxView), func_(func), lyxView_(lyxView) : QAction(&lyxView), func_(func), lyxView_(lyxView)

View File

@ -22,7 +22,7 @@ class FuncRequest;
namespace frontend { namespace frontend {
class GuiViewBase; class GuiView;
/** /**
* Action - Qt interface with LyX' FuncRequest. * Action - Qt interface with LyX' FuncRequest.
@ -34,7 +34,7 @@ class Action : public QAction
Q_OBJECT Q_OBJECT
public: 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); FuncRequest const & func, QString const & tooltip);
void update(); void update();
@ -48,7 +48,7 @@ private Q_SLOTS:
private: private:
FuncRequest const & func_ ; FuncRequest const & func_ ;
GuiViewBase & lyxView_; GuiView & lyxView_;
}; };

View File

@ -36,7 +36,7 @@ class DialogView : public QDialog, public Dialog
{ {
public: public:
DialogView( DialogView(
GuiViewBase & parent, ///< the main window where to dock. GuiView & parent, ///< the main window where to dock.
std::string const & name, ///< dialog identifier. std::string const & name, ///< dialog identifier.
bool modal = false, ///< Window modality. bool modal = false, ///< Window modality.
Qt::WindowFlags flags = 0 Qt::WindowFlags flags = 0

View File

@ -29,7 +29,7 @@ class DockView : public QDockWidget, public Dialog
{ {
public: public:
DockView( DockView(
GuiViewBase & parent, ///< the main window where to dock. GuiView & parent, ///< the main window where to dock.
std::string const & name, ///< dialog identifier. std::string const & name, ///< dialog identifier.
Qt::DockWidgetArea area = Qt::LeftDockWidgetArea, ///< Position of the dock (and also drawer) Qt::DockWidgetArea area = Qt::LeftDockWidgetArea, ///< Position of the dock (and also drawer)
Qt::WindowFlags flags = 0 Qt::WindowFlags flags = 0

View File

@ -88,7 +88,7 @@ protected:
} // end of anon } // end of anon
GuiCommandBuffer::GuiCommandBuffer(GuiViewBase * view) GuiCommandBuffer::GuiCommandBuffer(GuiView * view)
: view_(view), lv_(*view), history_pos_(history_.end()) : view_(view), lv_(*view), history_pos_(history_.end())
{ {
transform(lyxaction.func_begin(), lyxaction.func_end(), transform(lyxaction.func_begin(), lyxaction.func_end(),

View File

@ -26,7 +26,7 @@ namespace lyx {
namespace frontend { namespace frontend {
class LyXView; class LyXView;
class GuiViewBase; class GuiView;
class GuiCommandEdit; class GuiCommandEdit;
class GuiCommandBuffer : public QWidget class GuiCommandBuffer : public QWidget
@ -34,7 +34,7 @@ class GuiCommandBuffer : public QWidget
Q_OBJECT Q_OBJECT
public: public:
GuiCommandBuffer(GuiViewBase * view); GuiCommandBuffer(GuiView * view);
public Q_SLOTS: public Q_SLOTS:
/// cancel command compose /// cancel command compose
@ -53,7 +53,7 @@ public Q_SLOTS:
void hideParent(); void hideParent();
private: private:
/// owning view /// owning view
GuiViewBase * view_; GuiView * view_;
/// ///
LyXView & lv_; LyXView & lv_;
/// command widget /// command widget

View File

@ -48,7 +48,7 @@ LyXView& GuiImplementation::createRegisteredView()
int id = 0; int id = 0;
while (views_.find(id) != views_.end()) while (views_.find(id) != views_.end())
id++; id++;
views_.insert(std::pair<int, GuiViewBase *>(id, new GuiViewBase(id))); views_.insert(std::pair<int, GuiView *>(id, new GuiView(id)));
updateIds(views_, view_ids_); updateIds(views_, view_ids_);
return *views_[id]; return *views_[id];
} }
@ -60,7 +60,7 @@ bool GuiImplementation::unregisterView(int id)
BOOST_ASSERT(views_.find(id) != views_.end()); BOOST_ASSERT(views_.find(id) != views_.end());
BOOST_ASSERT(views_[id]); BOOST_ASSERT(views_[id]);
std::map<int, GuiViewBase *>::iterator it; std::map<int, GuiView *>::iterator it;
for (it = views_.begin(); it != views_.end(); ++it) { for (it = views_.begin(); it != views_.end(); ++it) {
if (it->first == id) { if (it->first == id) {
views_.erase(id); views_.erase(id);
@ -82,8 +82,8 @@ bool GuiImplementation::closeAllViews()
return true; return true;
} }
std::map<int, GuiViewBase*> const cmap = views_; std::map<int, GuiView*> const cmap = views_;
std::map<int, GuiViewBase*>::const_iterator it; std::map<int, GuiView*>::const_iterator it;
for (it = cmap.begin(); it != cmap.end(); ++it) for (it = cmap.begin(); it != cmap.end(); ++it)
{ {
// TODO: return false when close event was ignored // TODO: return false when close event was ignored

View File

@ -22,7 +22,7 @@
namespace lyx { namespace lyx {
namespace frontend { namespace frontend {
class GuiViewBase; class GuiView;
class LyXView; class LyXView;
/** /**
@ -50,7 +50,7 @@ private:
* object is handled by Qt when the view is closed * object is handled by Qt when the view is closed
* \sa Qt::WA_DeleteOnClose attribute. * \sa Qt::WA_DeleteOnClose attribute.
*/ */
std::map<int, GuiViewBase *> views_; std::map<int, GuiView *> views_;
}; };
} // namespace frontend } // namespace frontend

View File

@ -38,7 +38,7 @@ namespace frontend {
// MacOSX specific stuff is at the end. // MacOSX specific stuff is at the end.
GuiMenubar::GuiMenubar(LyXView * view, MenuBackend & mbe) GuiMenubar::GuiMenubar(LyXView * view, MenuBackend & mbe)
: owner_(static_cast<GuiViewBase*>(view)), menubackend_(mbe) : owner_(static_cast<GuiView*>(view)), menubackend_(mbe)
{ {
macxMenuBarInit(); macxMenuBarInit();

View File

@ -24,7 +24,7 @@ class MenuBackend;
namespace frontend { namespace frontend {
class GuiViewBase; class GuiView;
class GuiPopupMenu; class GuiPopupMenu;
class LyXView; class LyXView;
@ -40,7 +40,7 @@ public:
void openByName(QString const & name); void openByName(QString const & name);
/// return the owning view /// return the owning view
GuiViewBase * view() { return owner_; } GuiView * view() { return owner_; }
/// return the menu controller /// return the menu controller
MenuBackend const & backend() { return menubackend_; } MenuBackend const & backend() { return menubackend_; }
@ -56,7 +56,7 @@ private:
void macxMenuBarInit(); void macxMenuBarInit();
/// owning view /// owning view
GuiViewBase * owner_; GuiView * owner_;
/// menu controller /// menu controller
MenuBackend & menubackend_; MenuBackend & menubackend_;

View File

@ -332,7 +332,7 @@ LyXAlignment GuiParagraph::alignDefault() const
Dialog * createGuiParagraph(LyXView & lv) Dialog * createGuiParagraph(LyXView & lv)
{ {
#if 0 #if 0
GuiViewBase & guiview = static_cast<GuiViewBase &>(lv); GuiView & guiview = static_cast<GuiView &>(lv);
#ifdef USE_DOCK_WIDGET #ifdef USE_DOCK_WIDGET
return new DockView<ControlParagraph, GuiParagraph>(guiview, "paragraph", return new DockView<ControlParagraph, GuiParagraph>(guiview, "paragraph",
Qt::TopDockWidgetArea); Qt::TopDockWidgetArea);

View File

@ -43,7 +43,7 @@ using std::string;
namespace lyx { namespace lyx {
namespace frontend { 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) : DockView(parent, "toc", area, flags), params_(TOC_CODE)
{ {
widget_ = new TocWidget(*this); widget_ = new TocWidget(*this);
@ -236,7 +236,7 @@ void GuiToc::dispatchParams()
Dialog * createGuiToc(LyXView & lv) Dialog * createGuiToc(LyXView & lv)
{ {
GuiViewBase & guiview = static_cast<GuiViewBase &>(lv); GuiView & guiview = static_cast<GuiView &>(lv);
#ifdef Q_WS_MACX #ifdef Q_WS_MACX
// On Mac show as a drawer at the right // On Mac show as a drawer at the right
return new GuiToc(guiview, Qt::RightDockWidgetArea, Qt::Drawer); return new GuiToc(guiview, Qt::RightDockWidgetArea, Qt::Drawer);

View File

@ -40,7 +40,7 @@ class GuiToc : public DockView
public: public:
/// ///
GuiToc( 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::DockWidgetArea area = Qt::LeftDockWidgetArea, ///< Position of the dock (and also drawer)
Qt::WindowFlags flags = 0); Qt::WindowFlags flags = 0);

View File

@ -238,7 +238,7 @@ static TextClass const & textClass(LyXView const & lv)
// //
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
GuiLayoutBox::GuiLayoutBox(GuiViewBase & owner) GuiLayoutBox::GuiLayoutBox(GuiView & owner)
: owner_(owner) : owner_(owner)
{ {
setSizeAdjustPolicy(QComboBox::AdjustToContents); 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), : QToolBar(qt_(tbinfo.gui_name), &owner), owner_(owner),
layout_(0), command_buffer_(0) layout_(0), command_buffer_(0)
{ {

View File

@ -29,7 +29,7 @@ class ToolbarItem;
namespace frontend { namespace frontend {
class GuiCommandBuffer; class GuiCommandBuffer;
class GuiViewBase; class GuiView;
class Action; class Action;
@ -37,7 +37,7 @@ class GuiLayoutBox : public QComboBox
{ {
Q_OBJECT Q_OBJECT
public: public:
GuiLayoutBox(GuiViewBase &); GuiLayoutBox(GuiView &);
/// select the right layout in the combobox. /// select the right layout in the combobox.
void set(docstring const & layout); void set(docstring const & layout);
@ -48,7 +48,7 @@ private Q_SLOTS:
void selected(const QString & str); void selected(const QString & str);
private: private:
GuiViewBase & owner_; GuiView & owner_;
}; };
@ -56,7 +56,7 @@ class GuiToolbar : public QToolBar
{ {
Q_OBJECT Q_OBJECT
public: public:
GuiToolbar(ToolbarInfo const &, GuiViewBase &); GuiToolbar(ToolbarInfo const &, GuiView &);
/// Add a button to the bar. /// Add a button to the bar.
void add(ToolbarItem const & item); void add(ToolbarItem const & item);
@ -77,7 +77,7 @@ private:
Action * addItem(ToolbarItem const & item); Action * addItem(ToolbarItem const & item);
QList<Action *> actions_; QList<Action *> actions_;
GuiViewBase & owner_; GuiView & owner_;
GuiLayoutBox * layout_; GuiLayoutBox * layout_;
GuiCommandBuffer * command_buffer_; GuiCommandBuffer * command_buffer_;

View File

@ -40,7 +40,7 @@ namespace frontend {
#define TurnOnFlag(x) flags |= ToolbarInfo::x #define TurnOnFlag(x) flags |= ToolbarInfo::x
#define TurnOffFlag(x) flags &= ~ToolbarInfo::x #define TurnOffFlag(x) flags &= ~ToolbarInfo::x
GuiToolbars::GuiToolbars(GuiViewBase & owner) GuiToolbars::GuiToolbars(GuiView & owner)
: owner_(owner), : owner_(owner),
layout_(0), layout_(0),
last_textclass_(TextClassPtr()) last_textclass_(TextClassPtr())

View File

@ -26,13 +26,13 @@ namespace frontend {
class GuiLayoutBox; class GuiLayoutBox;
class GuiToolbar; class GuiToolbar;
class GuiViewBase; class GuiView;
class GuiToolbars class GuiToolbars
{ {
public: public:
/// ///
GuiToolbars(GuiViewBase & owner); GuiToolbars(GuiView & owner);
/// Initialize the toolbars using the backend database. /// Initialize the toolbars using the backend database.
void init(); void init();
@ -88,7 +88,7 @@ private:
void initFlags(ToolbarInfo & tbinfo); void initFlags(ToolbarInfo & tbinfo);
/// The parent window. /// The parent window.
GuiViewBase & owner_; GuiView & owner_;
/** The layout box is actually owned by whichever toolbar /** The layout box is actually owned by whichever toolbar
* contains it. All the Toolbars class needs is a means of * contains it. All the Toolbars class needs is a means of

View File

@ -124,7 +124,7 @@ private:
}; };
struct GuiViewBase::GuiViewPrivate struct GuiView::GuiViewPrivate
{ {
string cur_title; string cur_title;
@ -149,7 +149,7 @@ struct GuiViewBase::GuiViewPrivate
// static needed by "New Window" // static needed by "New Window"
static unsigned int lastIconSize; static unsigned int lastIconSize;
QMenu * toolBarPopup(GuiViewBase * parent) QMenu * toolBarPopup(GuiView * parent)
{ {
// FIXME: translation // FIXME: translation
QMenu * menu = new QMenu(parent); 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), : QMainWindow(), LyXView(id), quitting_by_menu_(false),
d(*new GuiViewPrivate) d(*new GuiViewPrivate)
{ {
@ -247,7 +247,7 @@ GuiViewBase::GuiViewBase(int id)
} }
GuiViewBase::~GuiViewBase() GuiView::~GuiView()
{ {
delete d.menubar_; delete d.menubar_;
delete d.toolbars_; delete d.toolbars_;
@ -255,7 +255,7 @@ GuiViewBase::~GuiViewBase()
} }
void GuiViewBase::close() void GuiView::close()
{ {
quitting_by_menu_ = true; quitting_by_menu_ = true;
d.tab_widget_->closeAll(); d.tab_widget_->closeAll();
@ -264,20 +264,20 @@ void GuiViewBase::close()
} }
void GuiViewBase::setFocus() void GuiView::setFocus()
{ {
if (d.tab_widget_->count()) if (d.tab_widget_->count())
d.tab_widget_->currentWidget()->setFocus(); d.tab_widget_->currentWidget()->setFocus();
} }
QMenu* GuiViewBase::createPopupMenu() QMenu* GuiView::createPopupMenu()
{ {
return d.toolBarPopup(this); return d.toolBarPopup(this);
} }
void GuiViewBase::init() void GuiView::init()
{ {
// GuiToolbars *must* be initialised before GuiMenubar. // GuiToolbars *must* be initialised before GuiMenubar.
d.toolbars_ = new GuiToolbars(*this); 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 // we may have been called through the close window button
// which bypasses the LFUN machinery. // 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()) if (event->mimeData()->hasUrls())
event->accept(); event->accept();
@ -342,7 +342,7 @@ void GuiViewBase::dragEnterEvent(QDragEnterEvent * event)
} }
void GuiViewBase::dropEvent(QDropEvent* event) void GuiView::dropEvent(QDropEvent* event)
{ {
QList<QUrl> files = event->mimeData()->urls(); QList<QUrl> files = event->mimeData()->urls();
if (files.isEmpty()) if (files.isEmpty())
@ -359,7 +359,7 @@ void GuiViewBase::dropEvent(QDropEvent* event)
} }
void GuiViewBase::saveGeometry() void GuiView::saveGeometry()
{ {
static bool done = false; static bool done = false;
if (done) if (done)
@ -373,7 +373,7 @@ void GuiViewBase::saveGeometry()
// http://www.trolltech.com/developer/task-tracker/index_html?id=119684+&method=entry // http://www.trolltech.com/developer/task-tracker/index_html?id=119684+&method=entry
// Then also the moveEvent, resizeEvent, and the // Then also the moveEvent, resizeEvent, and the
// code for floatingGeometry_ can be removed; // code for floatingGeometry_ can be removed;
// adjust GuiViewBase::setGeometry() // adjust GuiView::setGeometry()
QRect normal_geometry; QRect normal_geometry;
int maximized; int maximized;
@ -424,7 +424,7 @@ void GuiViewBase::saveGeometry()
} }
void GuiViewBase::setGeometry(unsigned int width, void GuiView::setGeometry(unsigned int width,
unsigned int height, unsigned int height,
int posx, int posy, int posx, int posy,
int maximized, 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 title = windowTitle();
QString new_title = toqstr(t); 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()->showMessage(toqstr(str));
statusbar_timer_.stop(); statusbar_timer_.stop();
@ -556,38 +556,38 @@ void GuiViewBase::message(docstring const & str)
} }
void GuiViewBase::clearMessage() void GuiView::clearMessage()
{ {
update_view_state_qt(); update_view_state_qt();
} }
void GuiViewBase::setIconSize(unsigned int size) void GuiView::setIconSize(unsigned int size)
{ {
d.lastIconSize = size; d.lastIconSize = size;
QMainWindow::setIconSize(QSize(size, size)); QMainWindow::setIconSize(QSize(size, size));
} }
void GuiViewBase::smallSizedIcons() void GuiView::smallSizedIcons()
{ {
setIconSize(d.smallIconSize); setIconSize(d.smallIconSize);
} }
void GuiViewBase::normalSizedIcons() void GuiView::normalSizedIcons()
{ {
setIconSize(d.normalIconSize); setIconSize(d.normalIconSize);
} }
void GuiViewBase::bigSizedIcons() void GuiView::bigSizedIcons()
{ {
setIconSize(d.bigIconSize); setIconSize(d.bigIconSize);
} }
void GuiViewBase::update_view_state_qt() void GuiView::update_view_state_qt()
{ {
if (!hasFocus()) if (!hasFocus())
return; return;
@ -597,7 +597,7 @@ void GuiViewBase::update_view_state_qt()
} }
void GuiViewBase::on_currentWorkAreaChanged(GuiWorkArea * wa) void GuiView::on_currentWorkAreaChanged(GuiWorkArea * wa)
{ {
disconnectBuffer(); disconnectBuffer();
disconnectBufferView(); disconnectBufferView();
@ -616,7 +616,7 @@ void GuiViewBase::on_currentWorkAreaChanged(GuiWorkArea * wa)
} }
void GuiViewBase::updateStatusBar() void GuiView::updateStatusBar()
{ {
// let the user see the explicit message // let the user see the explicit message
if (statusbar_timer_.isActive()) 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); dispatch(func);
} }
bool GuiViewBase::hasFocus() const bool GuiView::hasFocus() const
{ {
return qApp->activeWindow() == this; return qApp->activeWindow() == this;
} }
QRect GuiViewBase::updateFloatingGeometry() QRect GuiView::updateFloatingGeometry()
{ {
QDesktopWidget& dw = *qApp->desktop(); QDesktopWidget& dw = *qApp->desktop();
QRect desk = dw.availableGeometry(dw.primaryScreen()); QRect desk = dw.availableGeometry(dw.primaryScreen());
@ -650,19 +650,19 @@ QRect GuiViewBase::updateFloatingGeometry()
} }
void GuiViewBase::resizeEvent(QResizeEvent *) void GuiView::resizeEvent(QResizeEvent *)
{ {
updateFloatingGeometry(); updateFloatingGeometry();
} }
void GuiViewBase::moveEvent(QMoveEvent *) void GuiView::moveEvent(QMoveEvent *)
{ {
updateFloatingGeometry(); updateFloatingGeometry();
} }
bool GuiViewBase::event(QEvent * e) bool GuiView::event(QEvent * e)
{ {
switch (e->type()) switch (e->type())
{ {
@ -719,14 +719,14 @@ bool GuiViewBase::event(QEvent * e)
} }
bool GuiViewBase::focusNextPrevChild(bool /*next*/) bool GuiView::focusNextPrevChild(bool /*next*/)
{ {
setFocus(); setFocus();
return true; return true;
} }
void GuiViewBase::showView() void GuiView::showView()
{ {
QMainWindow::setWindowTitle(qt_("LyX")); QMainWindow::setWindowTitle(qt_("LyX"));
QMainWindow::show(); 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(); GuiWorkArea * wa = d.tab_widget_->currentWorkArea();
if (wa) { 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); 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); return d.tab_widget_->workArea(buffer);
} }
WorkArea * GuiViewBase::addWorkArea(Buffer & buffer) WorkArea * GuiView::addWorkArea(Buffer & buffer)
{ {
GuiWorkArea * wa = new GuiWorkArea(buffer, *this); GuiWorkArea * wa = new GuiWorkArea(buffer, *this);
wa->setUpdatesEnabled(false); wa->setUpdatesEnabled(false);
@ -819,19 +819,19 @@ WorkArea * GuiViewBase::addWorkArea(Buffer & buffer)
} }
WorkArea * GuiViewBase::currentWorkArea() WorkArea * GuiView::currentWorkArea()
{ {
return d.tab_widget_->currentWorkArea(); return d.tab_widget_->currentWorkArea();
} }
WorkArea const * GuiViewBase::currentWorkArea() const WorkArea const * GuiView::currentWorkArea() const
{ {
return d.tab_widget_->currentWorkArea(); return d.tab_widget_->currentWorkArea();
} }
void GuiViewBase::setCurrentWorkArea(WorkArea * work_area) void GuiView::setCurrentWorkArea(WorkArea * work_area)
{ {
BOOST_ASSERT(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); BOOST_ASSERT(work_area);
if (work_area == currentWorkArea()) { 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); d.toolbars_->showCommandBuffer(visible);
} }
void GuiViewBase::openMenu(docstring const & name) void GuiView::openMenu(docstring const & name)
{ {
d.menubar_->openByName(toqstr(name)); d.menubar_->openByName(toqstr(name));
} }
void GuiViewBase::openLayoutList() void GuiView::openLayoutList()
{ {
d.toolbars_->openLayoutList(); d.toolbars_->openLayoutList();
} }
void GuiViewBase::updateLayoutChoice() void GuiView::updateLayoutChoice()
{ {
// Don't show any layouts without a buffer // Don't show any layouts without a buffer
if (!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); return d.toolbars_->visible(id);
} }
void GuiViewBase::updateToolbars() void GuiView::updateToolbars()
{ {
WorkArea * wa = currentWorkArea(); WorkArea * wa = currentWorkArea();
if (wa) { 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); 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,... // it is possible to get current toolbar status like this,...
// but I decide to obey the order of ToolbarBackend::flags // but I decide to obey the order of ToolbarBackend::flags

View File

@ -46,14 +46,14 @@ QWidget * mainWindow();
* is deleted. This might be useful for closing other dialogs * is deleted. This might be useful for closing other dialogs
* depending on a given GuiView. * depending on a given GuiView.
*/ */
class GuiViewBase : public QMainWindow, public LyXView class GuiView : public QMainWindow, public LyXView
{ {
Q_OBJECT Q_OBJECT
public: public:
/// create a main window of the given dimensions /// create a main window of the given dimensions
GuiViewBase(int id); GuiView(int id);
~GuiViewBase(); ~GuiView();
virtual void init(); virtual void init();
virtual void close(); virtual void close();

View File

@ -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) : DockView(parent, "view-source", area, flags)
{ {
widget_ = new ViewSourceWidget(*this); widget_ = new ViewSourceWidget(*this);
@ -172,7 +172,7 @@ QString GuiViewSource::title() const
Dialog * createGuiViewSource(LyXView & lv) Dialog * createGuiViewSource(LyXView & lv)
{ {
return new GuiViewSource(static_cast<GuiViewBase &>(lv)); return new GuiViewSource(static_cast<GuiView &>(lv));
} }

View File

@ -63,7 +63,7 @@ class GuiViewSource : public DockView
public: public:
GuiViewSource( 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::DockWidgetArea area = Qt::BottomDockWidgetArea, ///< Position of the dock (and also drawer)
Qt::WindowFlags flags = 0); Qt::WindowFlags flags = 0);