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