mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
move Controller inheritance further up the tree
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20870 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5a2deb94c3
commit
6f3cdf8da8
@ -44,12 +44,10 @@ public:
|
||||
: QDialog(&parent, flags), name_(name)
|
||||
{
|
||||
setModal(modal);
|
||||
MyController * c = new MyController(*this);
|
||||
controller_ = c;
|
||||
controller_->setLyXView(parent);
|
||||
controller_ = new MyController(*this, parent);
|
||||
QGridLayout * gridLayout = new QGridLayout(this);
|
||||
gridLayout->setMargin(0);
|
||||
widget_ = new MyWidget(*c, this);
|
||||
widget_ = new MyWidget(*controller_, this);
|
||||
gridLayout->addWidget(widget_);
|
||||
setWindowTitle("LyX: " + widget_->windowTitle());
|
||||
}
|
||||
|
@ -34,11 +34,10 @@ public:
|
||||
Qt::DockWidgetArea area = Qt::LeftDockWidgetArea, ///< Position of the dock (and also drawer)
|
||||
Qt::WindowFlags flags = 0
|
||||
)
|
||||
: QDockWidget(&parent, flags), name_(name), Controller(this)
|
||||
: QDockWidget(&parent, flags), Controller(this, parent), name_(name)
|
||||
{
|
||||
if (flags & Qt::Drawer)
|
||||
setFeatures(QDockWidget::NoDockWidgetFeatures);
|
||||
setLyXView(parent);
|
||||
parent.addDockWidget(area, this);
|
||||
}
|
||||
|
||||
|
@ -96,11 +96,10 @@ static QString version()
|
||||
|
||||
|
||||
GuiAbout::GuiAbout(LyXView & lv)
|
||||
: GuiDialog(lv, "aboutlyx"), Controller(this)
|
||||
: GuiDialog(lv, "aboutlyx")
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("About LyX"));
|
||||
setController(this, false);
|
||||
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class GuiAbout : public GuiDialog, public Ui::AboutUi, public Controller
|
||||
class GuiAbout : public GuiDialog, public Ui::AboutUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -74,11 +74,10 @@ void box_gui_tokens_special_length(vector<string> & ids,
|
||||
|
||||
|
||||
GuiBox::GuiBox(LyXView & lv)
|
||||
: GuiDialog(lv, "box"), Controller(this), params_("")
|
||||
: GuiDialog(lv, "box"), params_("")
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Box Settings"));
|
||||
setController(this, false);
|
||||
|
||||
// fill the box type choice
|
||||
box_gui_tokens(ids_, gui_names_);
|
||||
|
@ -23,7 +23,7 @@
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class GuiBox : public GuiDialog, public Ui::BoxUi, public Controller
|
||||
class GuiBox : public GuiDialog, public Ui::BoxUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -40,8 +40,6 @@ private:
|
||||
///
|
||||
void closeEvent(QCloseEvent * e);
|
||||
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
/// add and remove special lengths
|
||||
void setSpecial(bool ibox);
|
||||
/// only show valid inner box items
|
||||
|
@ -34,10 +34,9 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiBranch::GuiBranch(LyXView & lv)
|
||||
: GuiDialog(lv, "branch"), Controller(this)
|
||||
: GuiDialog(lv, "branch")
|
||||
{
|
||||
setupUi(this);
|
||||
setController(this, false);
|
||||
setViewTitle(_("Branch Settings"));
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
|
@ -22,7 +22,7 @@
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class GuiBranch : public GuiDialog, public Ui::BranchUi, public Controller
|
||||
class GuiBranch : public GuiDialog, public Ui::BranchUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -35,8 +35,6 @@ private Q_SLOTS:
|
||||
private:
|
||||
///
|
||||
void closeEvent(QCloseEvent * e);
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
/// Apply changes
|
||||
void applyView();
|
||||
/// Update dialog before showing it
|
||||
|
@ -37,10 +37,9 @@ namespace frontend {
|
||||
using support::bformat;
|
||||
|
||||
GuiChanges::GuiChanges(LyXView & lv)
|
||||
: GuiDialog(lv, "changes"), Controller(this)
|
||||
: GuiDialog(lv, "changes")
|
||||
{
|
||||
setupUi(this);
|
||||
setController(this, false);
|
||||
setViewTitle(_("Merge Changes"));
|
||||
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
|
@ -21,7 +21,7 @@
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class GuiChanges : public GuiDialog, public Ui::ChangesUi, public Controller
|
||||
class GuiChanges : public GuiDialog, public Ui::ChangesUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -38,7 +38,6 @@ protected Q_SLOTS:
|
||||
|
||||
private:
|
||||
void closeEvent(QCloseEvent * e);
|
||||
Controller & controller() { return *this; }
|
||||
void updateContents();
|
||||
|
||||
/// Nothing to initialise in this case.
|
||||
|
@ -273,11 +273,10 @@ static vector<FamilyPair> const getFamilyData()
|
||||
|
||||
|
||||
GuiCharacter::GuiCharacter(LyXView & lv)
|
||||
: GuiDialog(lv, "character"), Controller(this), font_(Font::ALL_IGNORE),
|
||||
: GuiDialog(lv, "character"), font_(Font::ALL_IGNORE),
|
||||
toggleall_(false), reset_lang_(false)
|
||||
{
|
||||
setupUi(this);
|
||||
setController(this, false);
|
||||
setViewTitle(_("Text Style"));
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
|
@ -48,7 +48,7 @@ typedef std::pair<QString, Font::FONT_SIZE> SizePair;
|
||||
typedef std::pair<QString, FontState> BarPair;
|
||||
typedef std::pair<QString, Color_color> ColorPair;
|
||||
|
||||
class GuiCharacter : public GuiDialog, public Ui::CharacterUi, public Controller
|
||||
class GuiCharacter : public GuiDialog, public Ui::CharacterUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -60,8 +60,6 @@ protected Q_SLOTS:
|
||||
|
||||
private:
|
||||
void closeEvent(QCloseEvent * e);
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
/// Apply changes
|
||||
void applyView();
|
||||
/// update
|
||||
|
@ -74,7 +74,6 @@ GuiDelimiter::GuiDelimiter(LyXView & lv)
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Math Delimiter"));
|
||||
setController(this, false);
|
||||
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(accept()));
|
||||
|
||||
|
@ -25,16 +25,12 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiDialog::GuiDialog(LyXView & lv, std::string const & name)
|
||||
: is_closing_(false), name_(name), controller_(0), destroy_controller_(false)
|
||||
{
|
||||
lyxview_ = &lv;
|
||||
}
|
||||
: Controller(this, lv), is_closing_(false), name_(name)
|
||||
{}
|
||||
|
||||
|
||||
GuiDialog::~GuiDialog()
|
||||
{
|
||||
if (destroy_controller_)
|
||||
delete controller_;
|
||||
}
|
||||
|
||||
|
||||
@ -79,7 +75,7 @@ void GuiDialog::slotRestore()
|
||||
// Tell the controller that a request to refresh the dialog's contents
|
||||
// has been received. It's up to the controller to supply the necessary
|
||||
// info by calling GuiDialog::updateView().
|
||||
controller().updateDialog(name_);
|
||||
updateDialog(name_);
|
||||
bc().restore();
|
||||
}
|
||||
|
||||
@ -87,23 +83,23 @@ void GuiDialog::checkStatus()
|
||||
{
|
||||
// buffer independant dialogs are always active.
|
||||
// This check allows us leave canApply unimplemented for some dialogs.
|
||||
if (!controller().isBufferDependent())
|
||||
if (!isBufferDependent())
|
||||
return;
|
||||
|
||||
// deactivate the dialog if we have no buffer
|
||||
if (!controller().isBufferAvailable()) {
|
||||
if (!isBufferAvailable()) {
|
||||
bc().setReadOnly(true);
|
||||
return;
|
||||
}
|
||||
|
||||
// check whether this dialog may be active
|
||||
if (controller().canApply()) {
|
||||
bool const readonly = controller().isBufferReadonly();
|
||||
if (canApply()) {
|
||||
bool const readonly = isBufferReadonly();
|
||||
bc().setReadOnly(readonly);
|
||||
// refreshReadOnly() is too generous in _enabling_ widgets
|
||||
// update dialog to disable disabled widgets again
|
||||
|
||||
if (!readonly || controller().canApplyToReadOnly())
|
||||
if (!readonly || canApplyToReadOnly())
|
||||
updateView();
|
||||
|
||||
} else {
|
||||
@ -125,7 +121,7 @@ void GuiDialog::showView()
|
||||
setMinimumSize(hint);
|
||||
|
||||
updateView(); // make sure its up-to-date
|
||||
if (controller().exitEarly())
|
||||
if (exitEarly())
|
||||
return;
|
||||
|
||||
if (QWidget::isVisible()) {
|
||||
@ -168,17 +164,17 @@ void GuiDialog::updateView()
|
||||
|
||||
void GuiDialog::showData(string const & data)
|
||||
{
|
||||
if (controller().isBufferDependent() && !controller().isBufferAvailable())
|
||||
if (isBufferDependent() && !isBufferAvailable())
|
||||
return;
|
||||
|
||||
if (!controller().initialiseParams(data)) {
|
||||
if (!initialiseParams(data)) {
|
||||
lyxerr << "Dialog \"" << name_
|
||||
<< "\" failed to translate the data "
|
||||
"string passed to show()" << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
bc().setReadOnly(controller().isBufferReadonly());
|
||||
bc().setReadOnly(isBufferReadonly());
|
||||
showView();
|
||||
// The widgets may not be valid, so refresh the button controller
|
||||
bc().refresh();
|
||||
@ -187,16 +183,16 @@ void GuiDialog::showData(string const & data)
|
||||
|
||||
void GuiDialog::updateData(string const & data)
|
||||
{
|
||||
if (controller().isBufferDependent() && !controller().isBufferAvailable())
|
||||
if (isBufferDependent() && !isBufferAvailable())
|
||||
return;
|
||||
|
||||
if (!controller().initialiseParams(data)) {
|
||||
if (!initialiseParams(data)) {
|
||||
lyxerr << "Dialog \"" << name_
|
||||
<< "\" could not be initialized" << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
bc().setReadOnly(controller().isBufferReadonly());
|
||||
bc().setReadOnly(isBufferReadonly());
|
||||
updateView();
|
||||
// The widgets may not be valid, so refresh the button controller
|
||||
bc().refresh();
|
||||
@ -208,41 +204,31 @@ void GuiDialog::hide()
|
||||
if (!isVisibleView())
|
||||
return;
|
||||
|
||||
controller().clearParams();
|
||||
clearParams();
|
||||
hideView();
|
||||
controller().disconnect(name_);
|
||||
Controller::disconnect(name_);
|
||||
}
|
||||
|
||||
|
||||
void GuiDialog::apply()
|
||||
{
|
||||
if (controller().isBufferDependent()) {
|
||||
if (!controller().isBufferAvailable() ||
|
||||
(controller().isBufferReadonly() && !controller().canApplyToReadOnly()))
|
||||
if (isBufferDependent()) {
|
||||
if (!isBufferAvailable() ||
|
||||
(isBufferReadonly() && !canApplyToReadOnly()))
|
||||
return;
|
||||
}
|
||||
|
||||
applyView();
|
||||
controller().dispatchParams();
|
||||
dispatchParams();
|
||||
|
||||
if (controller().disconnectOnApply() && !is_closing_) {
|
||||
controller().disconnect(name_);
|
||||
controller().initialiseParams(string());
|
||||
if (disconnectOnApply() && !is_closing_) {
|
||||
Controller::disconnect(name_);
|
||||
initialiseParams(string());
|
||||
updateView();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GuiDialog::setController(Controller * controller, bool destroy)
|
||||
{
|
||||
BOOST_ASSERT(controller);
|
||||
BOOST_ASSERT(!controller_);
|
||||
destroy_controller_ = destroy;
|
||||
controller_ = controller;
|
||||
controller_->setLyXView(*lyxview_);
|
||||
}
|
||||
|
||||
|
||||
void GuiDialog::showEvent(QShowEvent * e)
|
||||
{
|
||||
#if (QT_VERSION >= 0x040200)
|
||||
@ -284,9 +270,8 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiCommand::GuiCommand(LyXView & lv, string const & name)
|
||||
: GuiDialog(lv, name), Controller(this), params_(name), lfun_name_(name)
|
||||
: GuiDialog(lv, name), params_(name), lfun_name_(name)
|
||||
{
|
||||
setController(this, false);
|
||||
}
|
||||
|
||||
|
||||
|
@ -29,7 +29,7 @@ namespace frontend {
|
||||
/** \c Dialog collects the different parts of a Model-Controller-View
|
||||
* split of a generic dialog together.
|
||||
*/
|
||||
class GuiDialog : public QDialog, public Dialog
|
||||
class GuiDialog : public QDialog, public Dialog, public Controller
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -119,20 +119,11 @@ public:
|
||||
*/
|
||||
bool isClosing() const { return is_closing_; }
|
||||
|
||||
/** \name Dialog Specialization
|
||||
* Methods to set the Controller and View and so specialise
|
||||
* to a particular dialog.
|
||||
*/
|
||||
//@{
|
||||
/// \param ptr is stored and destroyed by \c Dialog.
|
||||
void setController(Controller * ptr, bool destroy = true);
|
||||
//@}
|
||||
|
||||
/** \name Dialog Components
|
||||
* Methods to access the various components making up a dialog.
|
||||
*/
|
||||
//@{
|
||||
virtual Controller & controller() { return *controller_; }
|
||||
virtual Controller & controller() { return *this; }
|
||||
//@}
|
||||
|
||||
/** Defaults to nothing. Can be used by the Controller, however, to
|
||||
@ -161,13 +152,10 @@ private:
|
||||
* itself to the kernel.
|
||||
*/
|
||||
std::string name_;
|
||||
Controller * controller_;
|
||||
bool destroy_controller_;
|
||||
LyXView * lyxview_; // FIXME: replace by moving to constructor
|
||||
};
|
||||
|
||||
|
||||
class GuiCommand : public GuiDialog, public Controller
|
||||
class GuiCommand : public GuiDialog
|
||||
{
|
||||
public:
|
||||
/// We need to know with what sort of inset we're associated.
|
||||
|
@ -219,10 +219,9 @@ void PreambleModule::closeEvent(QCloseEvent * e)
|
||||
|
||||
|
||||
GuiDocument::GuiDocument(LyXView & lv)
|
||||
: GuiDialog(lv, "document"), Controller(this)
|
||||
: GuiDialog(lv, "document")
|
||||
{
|
||||
setupUi(this);
|
||||
setController(this, false);
|
||||
setViewTitle(_("Document Settings"));
|
||||
|
||||
lang_ = getSecond(getLanguageData(false));
|
||||
|
@ -70,7 +70,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class GuiDocument : public GuiDialog, public Ui::DocumentUi, public Controller
|
||||
class GuiDocument : public GuiDialog, public Ui::DocumentUi
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@ -134,8 +134,6 @@ private:
|
||||
// FIXME
|
||||
std::vector<std::string> lang_;
|
||||
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
/// Available modules
|
||||
QStringListModel * availableModel() { return &available_model_; }
|
||||
/// Selected modules
|
||||
|
@ -25,11 +25,10 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiERT::GuiERT(LyXView & lv)
|
||||
: GuiDialog(lv, "ert"), Controller(this), status_(InsetERT::Collapsed)
|
||||
: GuiDialog(lv, "ert"), status_(InsetERT::Collapsed)
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("TeX Code Settings"));
|
||||
setController(this, false);
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
|
@ -19,7 +19,7 @@
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class GuiERT : public GuiDialog, public Ui::ERTUi, public Controller
|
||||
class GuiERT : public GuiDialog, public Ui::ERTUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -31,8 +31,6 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
void closeEvent(QCloseEvent * e);
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
/// Apply changes
|
||||
void applyView();
|
||||
/// update
|
||||
|
@ -43,10 +43,9 @@ namespace frontend {
|
||||
using support::bformat;
|
||||
|
||||
GuiErrorList::GuiErrorList(LyXView & lv)
|
||||
: GuiDialog(lv, "errorlist"), Controller(this)
|
||||
: GuiDialog(lv, "errorlist")
|
||||
{
|
||||
setupUi(this);
|
||||
setController(this, false);
|
||||
|
||||
connect(closePB, SIGNAL(clicked()),
|
||||
this, SLOT(slotClose()));
|
||||
|
@ -21,7 +21,7 @@ class QListWidgetItem;
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class GuiErrorList : public GuiDialog, public Ui::ErrorListUi, public Controller
|
||||
class GuiErrorList : public GuiDialog, public Ui::ErrorListUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -37,8 +37,6 @@ private:
|
||||
void closeEvent(QCloseEvent *);
|
||||
///
|
||||
void showEvent(QShowEvent *);
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
/// update contents
|
||||
void updateContents();
|
||||
///
|
||||
|
@ -103,11 +103,10 @@ char const * const origin_gui_strs[] = {
|
||||
|
||||
|
||||
GuiExternal::GuiExternal(LyXView & lv)
|
||||
: GuiDialog(lv, "external"), Controller(this), bbChanged_(false)
|
||||
: GuiDialog(lv, "external"), bbChanged_(false)
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("External Material"));
|
||||
setController(this, false);
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
|
||||
@ -117,7 +116,7 @@ GuiExternal::GuiExternal(LyXView & lv)
|
||||
showCO, SLOT(setEnabled(bool)));
|
||||
connect(displayCB, SIGNAL(toggled(bool)),
|
||||
displayscaleED, SLOT(setEnabled(bool)));
|
||||
connect(showCO, SIGNAL(activated(const QString&)),
|
||||
connect(showCO, SIGNAL(activated(QString)),
|
||||
this, SLOT(change_adaptor()));
|
||||
connect(originCO, SIGNAL(activated(int)),
|
||||
this, SLOT(change_adaptor()));
|
||||
@ -127,27 +126,27 @@ GuiExternal::GuiExternal(LyXView & lv)
|
||||
this, SLOT(browseClicked()));
|
||||
connect(editPB, SIGNAL(clicked()),
|
||||
this, SLOT(editClicked()));
|
||||
connect(externalCO, SIGNAL(activated(const QString &)),
|
||||
connect(externalCO, SIGNAL(activated(QString)),
|
||||
this, SLOT(templateChanged()));
|
||||
connect(extraED, SIGNAL(textChanged(const QString &)),
|
||||
this, SLOT(extraChanged(const QString&)));
|
||||
connect(extraFormatCO, SIGNAL(activated(const QString &)),
|
||||
this, SLOT(formatChanged(const QString&)));
|
||||
connect(extraED, SIGNAL(textChanged(QString)),
|
||||
this, SLOT(extraChanged(QString)));
|
||||
connect(extraFormatCO, SIGNAL(activated(QString)),
|
||||
this, SLOT(formatChanged(QString)));
|
||||
connect(widthUnitCO, SIGNAL(activated(int)),
|
||||
this, SLOT(widthUnitChanged()));
|
||||
connect(heightUnitCO, SIGNAL(selectionChanged(lyx::Length::UNIT)),
|
||||
this, SLOT(change_adaptor()));
|
||||
connect(displayCB, SIGNAL(stateChanged(int)),
|
||||
this, SLOT(change_adaptor()));
|
||||
connect(displayscaleED, SIGNAL(textChanged(const QString &)),
|
||||
connect(displayscaleED, SIGNAL(textChanged(QString)),
|
||||
this, SLOT(change_adaptor()));
|
||||
connect(angleED, SIGNAL(textChanged(const QString &)),
|
||||
connect(angleED, SIGNAL(textChanged(QString)),
|
||||
this, SLOT(change_adaptor()));
|
||||
connect(widthED, SIGNAL(textChanged(const QString &)),
|
||||
connect(widthED, SIGNAL(textChanged(QString)),
|
||||
this, SLOT(sizeChanged()));
|
||||
connect(heightED, SIGNAL(textChanged(const QString &)),
|
||||
connect(heightED, SIGNAL(textChanged(QString)),
|
||||
this, SLOT(sizeChanged()));
|
||||
connect(fileED, SIGNAL(textChanged(const QString &)),
|
||||
connect(fileED, SIGNAL(textChanged(QString)),
|
||||
this, SLOT(change_adaptor()));
|
||||
connect(clipCB, SIGNAL(stateChanged(int)),
|
||||
this, SLOT(change_adaptor()));
|
||||
|
@ -36,7 +36,7 @@ class RotationDataType;
|
||||
|
||||
namespace frontend {
|
||||
|
||||
class GuiExternal : public GuiDialog, public Ui::ExternalUi, public Controller
|
||||
class GuiExternal : public GuiDialog, public Ui::ExternalUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -63,8 +63,6 @@ private:
|
||||
void closeEvent(QCloseEvent * e);
|
||||
//
|
||||
bool activateAspectratio() const;
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
/// Apply changes
|
||||
void applyView();
|
||||
/// update
|
||||
|
@ -27,9 +27,8 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiFloat::GuiFloat(LyXView & lv)
|
||||
: GuiDialog(lv, "float"), Controller(this)
|
||||
: GuiDialog(lv, "float")
|
||||
{
|
||||
setController(this, false);
|
||||
setViewTitle(_("Float Settings"));
|
||||
|
||||
setupUi(this);
|
||||
|
@ -20,7 +20,7 @@
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class GuiFloat : public GuiDialog, public Ui::FloatUi, public Controller
|
||||
class GuiFloat : public GuiDialog, public Ui::FloatUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -32,8 +32,6 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
void closeEvent(QCloseEvent * e);
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
/// Apply changes
|
||||
void applyView();
|
||||
/// update
|
||||
|
@ -135,11 +135,10 @@ getSecond(vector<Pair> const & pr)
|
||||
}
|
||||
|
||||
GuiGraphics::GuiGraphics(LyXView & lv)
|
||||
: GuiDialog(lv, "graphics"), Controller(this)
|
||||
: GuiDialog(lv, "graphics")
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Graphics"));
|
||||
setController(this, false);
|
||||
|
||||
//main buttons
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
|
@ -35,7 +35,7 @@ namespace frontend {
|
||||
|
||||
class LyXView;
|
||||
|
||||
class GuiGraphics : public GuiDialog, public Ui::GraphicsUi, public Controller
|
||||
class GuiGraphics : public GuiDialog, public Ui::GraphicsUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -57,8 +57,6 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
void closeEvent(QCloseEvent * e);
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
bool isValid();
|
||||
/// Apply changes
|
||||
void applyView();
|
||||
|
@ -61,11 +61,10 @@ using support::getVectorFromString;
|
||||
|
||||
|
||||
GuiInclude::GuiInclude(LyXView & lv)
|
||||
: GuiDialog(lv, "include"), Controller(this), params_("include")
|
||||
: GuiDialog(lv, "include"), params_("include")
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Child Document"));
|
||||
setController(this, false);
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
|
@ -25,7 +25,7 @@
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class GuiInclude : public GuiDialog, public Ui::IncludeUi, public Controller
|
||||
class GuiInclude : public GuiDialog, public Ui::IncludeUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -49,8 +49,6 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
void closeEvent(QCloseEvent * e);
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
///
|
||||
void updateLists();
|
||||
/// validate listings parameters and return an error message, if any
|
||||
|
@ -166,11 +166,10 @@ char const * font_styles_gui[] =
|
||||
|
||||
|
||||
GuiListings::GuiListings(LyXView & lv)
|
||||
: GuiDialog(lv, "listings"), Controller(this)
|
||||
: GuiDialog(lv, "listings")
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Program Listing Settings"));
|
||||
setController(this, false);
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
|
||||
|
@ -19,7 +19,7 @@
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class GuiListings : public GuiDialog, public Ui::ListingsUi, public Controller
|
||||
class GuiListings : public GuiDialog, public Ui::ListingsUi
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@ -45,8 +45,6 @@ private Q_SLOTS:
|
||||
void on_languageCO_currentIndexChanged(int);
|
||||
private:
|
||||
void closeEvent(QCloseEvent * e);
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
/// return false if validate_listings_params returns error
|
||||
bool isValid();
|
||||
/// Apply changes
|
||||
|
@ -103,10 +103,9 @@ void LogHighlighter::highlightBlock(QString const & text)
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
GuiLog::GuiLog(LyXView & lv)
|
||||
: GuiDialog(lv, "log"), Controller(this), type_(LatexLog)
|
||||
: GuiDialog(lv, "log"), type_(LatexLog)
|
||||
{
|
||||
setupUi(this);
|
||||
setController(this, false);
|
||||
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
connect(updatePB, SIGNAL(clicked()), this, SLOT(updateContents()));
|
||||
|
@ -24,7 +24,7 @@ namespace frontend {
|
||||
|
||||
class LogHighlighter;
|
||||
|
||||
class GuiLog : public GuiDialog, public Ui::LogUi, public Controller
|
||||
class GuiLog : public GuiDialog, public Ui::LogUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -36,8 +36,6 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
void closeEvent(QCloseEvent * e);
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
/// Apply changes
|
||||
void applyView() {}
|
||||
|
||||
|
@ -21,7 +21,7 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiMath::GuiMath(LyXView & lv, std::string const & name)
|
||||
: GuiDialog(lv, name), Controller(this)
|
||||
: GuiDialog(lv, name)
|
||||
{
|
||||
// FIXME: Ideally, those unicode codepoints would be defined
|
||||
// in "lib/symbols". Unfortunately, some of those are already
|
||||
|
@ -33,7 +33,7 @@ struct MathSymbol {
|
||||
};
|
||||
|
||||
|
||||
class GuiMath : public GuiDialog, public Controller
|
||||
class GuiMath : public GuiDialog
|
||||
{
|
||||
public:
|
||||
GuiMath(LyXView & lv, std::string const & name);
|
||||
@ -44,8 +44,6 @@ public:
|
||||
void dispatchParams() {}
|
||||
bool isBufferDependent() const { return true; }
|
||||
|
||||
Controller & controller() { return *this; }
|
||||
|
||||
/// dispatch an LFUN
|
||||
void dispatchFunc(kb_action action,
|
||||
std::string const & arg = std::string()) const;
|
||||
|
@ -33,7 +33,6 @@ GuiMathMatrix::GuiMathMatrix(LyXView & lv)
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Math Matrix"));
|
||||
setController(this, false);
|
||||
|
||||
table->setMinimumSize(100, 100);
|
||||
rowsSB->setValue(5);
|
||||
|
@ -26,10 +26,9 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiNote::GuiNote(LyXView & lv)
|
||||
: GuiDialog(lv, "note"), Controller(this)
|
||||
: GuiDialog(lv, "note")
|
||||
{
|
||||
setupUi(this);
|
||||
setController(this, false);
|
||||
setViewTitle(_("Note Settings"));
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
|
@ -19,7 +19,7 @@
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class GuiNote : public GuiDialog, public Ui::NoteUi, public Controller
|
||||
class GuiNote : public GuiDialog, public Ui::NoteUi
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@ -28,8 +28,6 @@ private Q_SLOTS:
|
||||
void change_adaptor();
|
||||
private:
|
||||
void closeEvent(QCloseEvent * e);
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
/// Apply changes
|
||||
void applyView();
|
||||
/// Update dialog before showing it
|
||||
|
@ -50,13 +50,12 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiParagraph::GuiParagraph(LyXView & lv)
|
||||
: Controller(this)
|
||||
: Controller(this, lv)
|
||||
{
|
||||
setupUi(this);
|
||||
setWindowTitle(qt_("Paragraph Settings"));
|
||||
|
||||
//setModal(modal);
|
||||
setLyXView(lv);
|
||||
QGridLayout * gridLayout = new QGridLayout(this);
|
||||
gridLayout->setMargin(0);
|
||||
gridLayout->addWidget(this);
|
||||
@ -67,10 +66,10 @@ GuiParagraph::GuiParagraph(LyXView & lv)
|
||||
connect(alignRightRB, SIGNAL(clicked()), this, SLOT(changed()));
|
||||
connect(alignCenterRB, SIGNAL(clicked()), this, SLOT(changed()));
|
||||
connect(linespacing, SIGNAL(activated(int)), this, SLOT(changed()));
|
||||
connect(linespacingValue, SIGNAL(textChanged(const QString &)),
|
||||
connect(linespacingValue, SIGNAL(textChanged(QString)),
|
||||
this, SLOT(changed()));
|
||||
connect(indentCB, SIGNAL(clicked()), this, SLOT(changed()));
|
||||
connect(labelWidth, SIGNAL(textChanged(const QString &)),
|
||||
connect(labelWidth, SIGNAL(textChanged(QString)),
|
||||
this, SLOT(changed()));
|
||||
|
||||
|
||||
|
@ -1721,11 +1721,10 @@ void PrefIdentity::update(LyXRC const & rc)
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
GuiPreferences::GuiPreferences(LyXView & lv)
|
||||
: GuiDialog(lv, "prefs"), Controller(this), update_screen_font_(false)
|
||||
: GuiDialog(lv, "prefs"), update_screen_font_(false)
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Preferences"));
|
||||
setController(this, false);
|
||||
|
||||
QDialog::setModal(false);
|
||||
|
||||
|
@ -355,7 +355,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class GuiPreferences : public GuiDialog, public Ui::PrefsUi, public Controller
|
||||
class GuiPreferences : public GuiDialog, public Ui::PrefsUi
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@ -372,8 +372,6 @@ public:
|
||||
void closeEvent(QCloseEvent * e);
|
||||
///
|
||||
void add(PrefModule * module);
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
/// Apply changes
|
||||
void applyView();
|
||||
/// update (do we need this?)
|
||||
|
@ -45,10 +45,9 @@ using support::FileFilterList;
|
||||
|
||||
|
||||
GuiPrint::GuiPrint(LyXView & lv)
|
||||
: GuiDialog(lv, "print"), Controller(this)
|
||||
: GuiDialog(lv, "print")
|
||||
{
|
||||
setupUi(this);
|
||||
setController(this, false);
|
||||
setViewTitle(_("Print Document"));
|
||||
|
||||
connect(printPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
|
@ -25,7 +25,7 @@
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class GuiPrint : public GuiDialog, public Ui::PrintUi, public Controller
|
||||
class GuiPrint : public GuiDialog, public Ui::PrintUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -39,8 +39,6 @@ private Q_SLOTS:
|
||||
void copiesChanged(int);
|
||||
void printerChanged();
|
||||
void pagerangeChanged();
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
|
||||
private:
|
||||
/// Apply changes
|
||||
|
@ -52,11 +52,9 @@ using support::makeDisplayPath;
|
||||
static std::string const lfun_name_ = "ref";
|
||||
|
||||
GuiRef::GuiRef(LyXView & lv)
|
||||
: GuiDialog(lv, "ref"), Controller(this),
|
||||
params_("ref")
|
||||
: GuiDialog(lv, "ref"), params_("ref")
|
||||
{
|
||||
setupUi(this);
|
||||
setController(this, false);
|
||||
setViewTitle(_("Cross-reference"));
|
||||
|
||||
sort_ = false;
|
||||
@ -70,9 +68,9 @@ GuiRef::GuiRef(LyXView & lv)
|
||||
|
||||
connect(typeCO, SIGNAL(activated(int)),
|
||||
this, SLOT(changed_adaptor()));
|
||||
connect(referenceED, SIGNAL(textChanged(const QString &)),
|
||||
connect(referenceED, SIGNAL(textChanged(QString)),
|
||||
this, SLOT(changed_adaptor()));
|
||||
connect(nameED, SIGNAL(textChanged(const QString &)),
|
||||
connect(nameED, SIGNAL(textChanged(QString)),
|
||||
this, SLOT(changed_adaptor()));
|
||||
connect(refsLW, SIGNAL(itemClicked(QListWidgetItem *)),
|
||||
this, SLOT(refHighlighted(QListWidgetItem *)));
|
||||
@ -117,6 +115,7 @@ void GuiRef::gotoClicked()
|
||||
gotoRef();
|
||||
}
|
||||
|
||||
|
||||
void GuiRef::selectionChanged()
|
||||
{
|
||||
if (isBufferReadonly())
|
||||
@ -326,20 +325,18 @@ void GuiRef::redoRefs()
|
||||
if (!oldSelection.isEmpty() || !last_reference_.isEmpty()) {
|
||||
bool const newInset = oldSelection.isEmpty();
|
||||
QString textToFind = newInset ? last_reference_ : oldSelection;
|
||||
bool foundItem = false;
|
||||
for (int i = 0; !foundItem && i < refsLW->count(); ++i) {
|
||||
last_reference_.clear();
|
||||
for (int i = 0; i != refsLW->count(); ++i) {
|
||||
QListWidgetItem * item = refsLW->item(i);
|
||||
if (textToFind == item->text()) {
|
||||
refsLW->setCurrentItem(item);
|
||||
refsLW->setItemSelected(item, !newInset);
|
||||
//Make sure selected item is visible
|
||||
refsLW->scrollToItem(item);
|
||||
foundItem = true;
|
||||
}
|
||||
}
|
||||
if (foundItem)
|
||||
last_reference_ = textToFind;
|
||||
else last_reference_ = "";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
refsLW->setUpdatesEnabled(true);
|
||||
refsLW->update();
|
||||
|
@ -24,7 +24,7 @@ class QListWidgetItem;
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class GuiRef : public GuiDialog, public Ui::RefUi, public Controller
|
||||
class GuiRef : public GuiDialog, public Ui::RefUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -63,8 +63,6 @@ private:
|
||||
|
||||
///
|
||||
void closeEvent(QCloseEvent * e);
|
||||
/// parent controller
|
||||
Controller & controller() { return *static_cast<Controller*>(this); }
|
||||
///
|
||||
bool isValid();
|
||||
/// apply changes
|
||||
|
@ -40,17 +40,16 @@ static void uniqueInsert(QComboBox * box, QString const & text)
|
||||
|
||||
|
||||
GuiSearch::GuiSearch(LyXView & lv)
|
||||
: GuiDialog(lv, "findreplace"), Controller(this)
|
||||
: GuiDialog(lv, "findreplace")
|
||||
{
|
||||
setupUi(this);
|
||||
setController(this, false);
|
||||
setViewTitle(_("Find and Replace"));
|
||||
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
connect(findPB, SIGNAL(clicked()), this, SLOT(findClicked()));
|
||||
connect(replacePB, SIGNAL(clicked()), this, SLOT(replaceClicked()));
|
||||
connect(replaceallPB, SIGNAL(clicked()), this, SLOT(replaceallClicked()));
|
||||
connect(findCO, SIGNAL(editTextChanged(const QString &)),
|
||||
connect(findCO, SIGNAL(editTextChanged(QString)),
|
||||
this, SLOT(findChanged()));
|
||||
|
||||
setFocusProxy(findCO);
|
||||
|
@ -19,7 +19,7 @@
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class GuiSearch : public GuiDialog, public Ui::SearchUi, public Controller
|
||||
class GuiSearch : public GuiDialog, public Ui::SearchUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -35,8 +35,6 @@ private Q_SLOTS:
|
||||
private:
|
||||
void showView();
|
||||
void closeEvent(QCloseEvent * e);
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
///
|
||||
bool initialiseParams(std::string const &) { return true; }
|
||||
void clearParams() {}
|
||||
|
@ -37,11 +37,10 @@ namespace frontend {
|
||||
using support::trim;
|
||||
|
||||
GuiSendTo::GuiSendTo(LyXView & lv)
|
||||
: GuiDialog(lv, "sendto"), Controller(this)
|
||||
: GuiDialog(lv, "sendto")
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Send Document to Command"));
|
||||
setController(this, false);
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
|
||||
|
@ -26,7 +26,7 @@ class Format;
|
||||
|
||||
namespace frontend {
|
||||
|
||||
class GuiSendTo : public GuiDialog, public Ui::SendtoUi, public Controller
|
||||
class GuiSendTo : public GuiDialog, public Ui::SendtoUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -40,8 +40,6 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
void closeEvent(QCloseEvent * e);
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
///
|
||||
bool isValid();
|
||||
/// Apply from dialog
|
||||
|
@ -28,11 +28,10 @@ using support::FileName;
|
||||
using support::onlyFilename;
|
||||
|
||||
GuiShowFile::GuiShowFile(LyXView & lv)
|
||||
: GuiDialog(lv, "file"), Controller(this)
|
||||
: GuiDialog(lv, "file")
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Show File"));
|
||||
setController(this, false);
|
||||
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class GuiShowFile : public GuiDialog, public Ui::ShowFileUi, public Controller
|
||||
class GuiShowFile : public GuiDialog, public Ui::ShowFileUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -31,8 +31,6 @@ public:
|
||||
private:
|
||||
///
|
||||
void closeEvent(QCloseEvent * e);
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
/// update
|
||||
void updateContents();
|
||||
///
|
||||
|
@ -71,12 +71,11 @@ using support::bformat;
|
||||
using support::contains;
|
||||
|
||||
GuiSpellchecker::GuiSpellchecker(LyXView & lv)
|
||||
: GuiDialog(lv, "spellchecker"), Controller(this), exitEarly_(false),
|
||||
: GuiDialog(lv, "spellchecker"), exitEarly_(false),
|
||||
oldval_(0), newvalue_(0), count_(0), speller_(0)
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Spellchecker"));
|
||||
setController(this, false);
|
||||
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
connect(replacePB, SIGNAL(clicked()), this, SLOT(replaceClicked()));
|
||||
|
@ -27,8 +27,7 @@ class SpellBase;
|
||||
|
||||
namespace frontend {
|
||||
|
||||
class GuiSpellchecker
|
||||
: public GuiDialog, public Ui::SpellcheckerUi, public Controller
|
||||
class GuiSpellchecker : public GuiDialog, public Ui::SpellcheckerUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -52,8 +51,6 @@ private:
|
||||
void closeEvent(QCloseEvent * e);
|
||||
/// update from controller
|
||||
void partialUpdate(int id);
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
///
|
||||
void updateContents();
|
||||
|
||||
|
@ -38,13 +38,12 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiTabular::GuiTabular(LyXView & lv)
|
||||
: GuiDialog(lv, "tabular"), Controller(this)
|
||||
: GuiDialog(lv, "tabular")
|
||||
{
|
||||
active_cell_ = Tabular::npos;
|
||||
|
||||
setupUi(this);
|
||||
setViewTitle(_("Table Settings"));
|
||||
setController(this, false);
|
||||
|
||||
widthED->setValidator(unsignedLengthValidator(widthED));
|
||||
topspaceED->setValidator(new LengthValidator(topspaceED));
|
||||
|
@ -22,7 +22,7 @@
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class GuiTabular : public GuiDialog, public Ui::TabularUi, public Controller
|
||||
class GuiTabular : public GuiDialog, public Ui::TabularUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -71,8 +71,6 @@ private Q_SLOTS:
|
||||
private:
|
||||
///
|
||||
void closeEvent(QCloseEvent * e);
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
///
|
||||
bool isValid() { return true; }
|
||||
/// update borders
|
||||
|
@ -28,11 +28,10 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiTabularCreate::GuiTabularCreate(LyXView & lv)
|
||||
: GuiDialog(lv, "tabularcreate"), Controller(this)
|
||||
: GuiDialog(lv, "tabularcreate")
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Insert Table"));
|
||||
setController(this, false);
|
||||
|
||||
rowsSB->setValue(5);
|
||||
columnsSB->setValue(5);
|
||||
|
@ -21,8 +21,7 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
|
||||
class GuiTabularCreate
|
||||
: public GuiDialog, public Ui::TabularCreateUi, public Controller
|
||||
class GuiTabularCreate : public GuiDialog, public Ui::TabularCreateUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -33,9 +32,6 @@ private Q_SLOTS:
|
||||
void columnsChanged(int);
|
||||
void rowsChanged(int);
|
||||
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
|
||||
private:
|
||||
/// Apply changes
|
||||
void applyView();
|
||||
|
@ -86,11 +86,10 @@ static string texFileFromList(string const & file, string const & type)
|
||||
|
||||
|
||||
GuiTexInfo::GuiTexInfo(LyXView & lv)
|
||||
: GuiDialog(lv, "texinfo"), Controller(this)
|
||||
: GuiDialog(lv, "texinfo")
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("TeX Information"));
|
||||
setController(this, false);
|
||||
|
||||
warningPosted = false;
|
||||
activeStyle = ClsType;
|
||||
|
@ -24,7 +24,7 @@
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class GuiTexInfo : public GuiDialog, public Ui::TexinfoUi, public Controller
|
||||
class GuiTexInfo : public GuiDialog, public Ui::TexinfoUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -52,8 +52,6 @@ private:
|
||||
///
|
||||
void closeEvent(QCloseEvent * e);
|
||||
///
|
||||
Controller & controller() { return *this; }
|
||||
///
|
||||
void updateStyles(TexFileType);
|
||||
///
|
||||
void updateStyles();
|
||||
|
@ -32,11 +32,10 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiThesaurus::GuiThesaurus(LyXView & lv)
|
||||
: GuiDialog(lv, "thesaurus"), Controller(this)
|
||||
: GuiDialog(lv, "thesaurus")
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Thesaurus"));
|
||||
setController(this, false);
|
||||
|
||||
meaningsTV->setColumnCount(1);
|
||||
meaningsTV->header()->hide();
|
||||
|
@ -21,7 +21,7 @@ class QTreeWidgetItem;
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class GuiThesaurus : public GuiDialog, public Ui::ThesaurusUi, public Controller
|
||||
class GuiThesaurus : public GuiDialog, public Ui::ThesaurusUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -38,8 +38,6 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
void closeEvent(QCloseEvent * e);
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
/// update
|
||||
void updateContents();
|
||||
///
|
||||
|
@ -41,11 +41,10 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiVSpace::GuiVSpace(LyXView & lv)
|
||||
: GuiDialog(lv, "vspace"), Controller(this)
|
||||
: GuiDialog(lv, "vspace")
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Vertical Space Settings"));
|
||||
setController(this, false);
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
|
||||
|
@ -22,7 +22,7 @@
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class GuiVSpace : public GuiDialog, public Ui::VSpaceUi, public Controller
|
||||
class GuiVSpace : public GuiDialog, public Ui::VSpaceUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -38,8 +38,6 @@ private Q_SLOTS:
|
||||
void enableCustom(int);
|
||||
|
||||
private:
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
/// Apply from dialog
|
||||
void applyView();
|
||||
/// Update the dialog
|
||||
|
@ -32,11 +32,10 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiWrap::GuiWrap(LyXView & lv)
|
||||
: GuiDialog(lv, "wrap"), Controller(this)
|
||||
: GuiDialog(lv, "wrap")
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Wrap Float Settings"));
|
||||
setController(this, false);
|
||||
|
||||
connect(restorePB, SIGNAL(clicked()), this, SLOT(slotRestore()));
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
|
@ -19,7 +19,7 @@
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class GuiWrap : public GuiDialog, public Ui::WrapUi, public Controller
|
||||
class GuiWrap : public GuiDialog, public Ui::WrapUi
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -31,8 +31,6 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
void closeEvent(QCloseEvent * e);
|
||||
/// parent controller
|
||||
Controller & controller() { return *this; }
|
||||
/// Apply changes
|
||||
void applyView();
|
||||
/// update
|
||||
|
@ -141,6 +141,7 @@ NOMOCHEADER = \
|
||||
GuiFontLoader.h \
|
||||
GuiFontMetrics.h \
|
||||
GuiImage.h \
|
||||
GuiMath.h \
|
||||
GuiPainter.h \
|
||||
GuiToolbars.h \
|
||||
qt_helpers.h
|
||||
@ -182,7 +183,6 @@ MOCHEADER = \
|
||||
GuiKeySymbol.h \
|
||||
GuiListings.h \
|
||||
GuiLog.h \
|
||||
GuiMath.h \
|
||||
GuiMathMatrix.h \
|
||||
GuiMenubar.h \
|
||||
GuiNomencl.h \
|
||||
|
Loading…
Reference in New Issue
Block a user