mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 10:18:50 +00:00
About box: Migrate to DialogView.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33180 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b5d172abc8
commit
a87c8175f1
@ -12,6 +12,8 @@
|
||||
|
||||
#include "GuiAbout.h"
|
||||
|
||||
#include "ui_AboutUi.h"
|
||||
|
||||
#include "qt_helpers.h"
|
||||
#include "version.h"
|
||||
|
||||
@ -126,21 +128,32 @@ static QString version()
|
||||
}
|
||||
|
||||
|
||||
GuiAbout::GuiAbout(GuiView & lv)
|
||||
: GuiDialog(lv, "aboutlyx", qt_("About LyX"))
|
||||
struct GuiAbout::Private
|
||||
{
|
||||
setupUi(this);
|
||||
Ui::AboutUi ui;
|
||||
};
|
||||
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
|
||||
copyrightTB->setPlainText(copyright());
|
||||
copyrightTB->append(QString());
|
||||
copyrightTB->append(license());
|
||||
copyrightTB->append(QString());
|
||||
copyrightTB->append(disclaimer());
|
||||
GuiAbout::GuiAbout(GuiView & lv)
|
||||
: DialogView(lv, "aboutlyx", qt_("About LyX")),
|
||||
d(new GuiAbout::Private)
|
||||
{
|
||||
d->ui.setupUi(this);
|
||||
|
||||
versionLA->setText(version());
|
||||
creditsTB->setHtml(credits());
|
||||
d->ui.copyrightTB->setPlainText(copyright());
|
||||
d->ui.copyrightTB->append(QString());
|
||||
d->ui.copyrightTB->append(license());
|
||||
d->ui.copyrightTB->append(QString());
|
||||
d->ui.copyrightTB->append(disclaimer());
|
||||
|
||||
d->ui.versionLA->setText(version());
|
||||
d->ui.creditsTB->setHtml(credits());
|
||||
}
|
||||
|
||||
|
||||
void GuiAbout::on_closePB_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
|
||||
|
@ -12,13 +12,12 @@
|
||||
#ifndef GUIABOUT_H
|
||||
#define GUIABOUT_H
|
||||
|
||||
#include "GuiDialog.h"
|
||||
#include "ui_AboutUi.h"
|
||||
#include "DialogView.h"
|
||||
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class GuiAbout : public GuiDialog, public Ui::AboutUi
|
||||
class GuiAbout : public DialogView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -26,11 +25,19 @@ public:
|
||||
// Constructor
|
||||
GuiAbout(GuiView & lv);
|
||||
|
||||
// Controller stuff
|
||||
bool initialiseParams(std::string const &) { return true; }
|
||||
void clearParams() {}
|
||||
private Q_SLOTS:
|
||||
void on_closePB_clicked();
|
||||
|
||||
private:
|
||||
/// Controller stuff
|
||||
///@{
|
||||
void updateView() {}
|
||||
void dispatchParams() {}
|
||||
bool isBufferDependent() const { return false; }
|
||||
///@}
|
||||
|
||||
struct Private;
|
||||
Private * const d;
|
||||
};
|
||||
|
||||
} // namespace frontend
|
||||
|
Loading…
Reference in New Issue
Block a user