2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 2001 The LyX Team.
9 * ======================================================
11 * \file ControlConnections.C
12 * \author Angus Leeming <a.leeming@ic.ac.uk>
16 #pragma implementation
21 #include "ControlConnections.h"
28 ControlConnectBase::ControlConnectBase(LyXView & lv, Dialogs & d)
29 : lv_(lv), d_(d), h_(0), r_(0)
33 void ControlConnectBase::connect()
35 r_ = Dialogs::redrawGUI.
36 connect(slot(this, &ControlConnectBase::redraw));
39 void ControlConnectBase::disconnect()
46 void ControlConnectBase::redraw()
52 bool ControlConnectBase::isReadonly() const
57 return lv_.buffer()->isReadonly();
61 ControlConnectBase::DocTypes ControlConnectBase::docType() const
66 if (lv_.buffer()->isLatex())
68 else if (lv_.buffer()->isLiterate())
70 else if (lv_.buffer()->isLinuxDoc())
72 /* else if (lv_.buffer()->isDocBook()) */
77 ControlConnectBI::ControlConnectBI(LyXView & lv, Dialogs & d)
78 : ControlConnectBase(lv, d)
82 void ControlConnectBI::connect()
84 h_ = d_.hideAll.connect(slot(this, &ControlConnectBI::hide));
85 ControlConnectBase::connect();
88 ControlConnectBD::ControlConnectBD(LyXView & lv, Dialogs & d)
89 : ControlConnectBase(lv, d),
94 void ControlConnectBD::connect()
96 u_ = d_.updateBufferDependent.
97 connect(slot(this, &ControlConnectBD::updateSlot));
98 h_ = d_.hideBufferDependent.
99 connect(slot(this, &ControlConnectBD::hide));
100 ControlConnectBase::connect();
103 void ControlConnectBD::disconnect()
106 ControlConnectBase::disconnect();