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
22 #include "ControlConnections.h"
29 ControlConnectBase::ControlConnectBase(LyXView & lv, Dialogs & d)
30 : lv_(lv), d_(d), h_(0), r_(0)
34 void ControlConnectBase::connect()
36 r_ = Dialogs::redrawGUI.
37 connect(slot(this, &ControlConnectBase::redraw));
40 void ControlConnectBase::disconnect()
47 void ControlConnectBase::redraw()
53 bool ControlConnectBase::isReadonly() const
58 return lv_.buffer()->isReadonly();
62 ControlConnectBase::DocTypes ControlConnectBase::docType() const
67 if (lv_.buffer()->isLatex())
69 else if (lv_.buffer()->isLiterate())
71 else if (lv_.buffer()->isLinuxDoc())
73 /* else if (lv_.buffer()->isDocBook()) */
78 ControlConnectBI::ControlConnectBI(LyXView & lv, Dialogs & d)
79 : ControlConnectBase(lv, d)
83 void ControlConnectBI::connect()
85 h_ = d_.hideAll.connect(slot(this, &ControlConnectBI::hide));
86 ControlConnectBase::connect();
89 ControlConnectBD::ControlConnectBD(LyXView & lv, Dialogs & d)
90 : ControlConnectBase(lv, d),
95 void ControlConnectBD::connect()
97 u_ = d_.updateBufferDependent.
98 connect(slot(this, &ControlConnectBD::updateSlot));
99 h_ = d_.hideBufferDependent.
100 connect(slot(this, &ControlConnectBD::hide));
101 ControlConnectBase::connect();
104 void ControlConnectBD::disconnect()
107 ControlConnectBase::disconnect();