mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-08 18:19:42 +00:00
Factorize out the way window titles are handled.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22784 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8c27d557b9
commit
6bb94129d8
@ -14,8 +14,6 @@
|
||||
|
||||
#include "ButtonPolicy.h"
|
||||
|
||||
#include "support/gettext.h"
|
||||
|
||||
#include <list>
|
||||
|
||||
class QWidget;
|
||||
|
@ -34,8 +34,8 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
|
||||
Dialog::Dialog(GuiView & lv, string const & name)
|
||||
: name_(name), lyxview_(&lv)
|
||||
Dialog::Dialog(GuiView & lv, string const & name, QString const & title)
|
||||
: name_(name), title_(title), lyxview_(&lv)
|
||||
{}
|
||||
|
||||
|
||||
@ -189,6 +189,8 @@ void Dialog::showView()
|
||||
return;
|
||||
|
||||
QWidget * w = asQWidget();
|
||||
w->setWindowTitle(title_);
|
||||
|
||||
QSize const hint = w->sizeHint();
|
||||
if (hint.height() >= 0 && hint.width() >= 0)
|
||||
w->setMinimumSize(hint);
|
||||
|
@ -50,7 +50,8 @@ public:
|
||||
/// \param lv is the access point for the dialog to the LyX kernel.
|
||||
/// \param name is the identifier given to the dialog by its parent
|
||||
/// container.
|
||||
Dialog(GuiView & lv, std::string const & name);
|
||||
/// \param title is the window title used for decoration.
|
||||
Dialog(GuiView & lv, std::string const & name, QString const & title);
|
||||
|
||||
virtual ~Dialog();
|
||||
|
||||
@ -251,6 +252,9 @@ public:
|
||||
//@}
|
||||
|
||||
protected:
|
||||
///
|
||||
void setTitle(QString const & title) { title_ = title; }
|
||||
///
|
||||
virtual void apply();
|
||||
|
||||
private:
|
||||
@ -259,6 +263,8 @@ private:
|
||||
*/
|
||||
std::string const name_;
|
||||
///
|
||||
QString title_;
|
||||
///
|
||||
GuiView * lyxview_;
|
||||
|
||||
/// intentionally unimplemented, therefore uncopiable
|
||||
|
@ -23,8 +23,9 @@ using namespace std;
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
DialogView::DialogView(GuiView & lv, string const & name)
|
||||
: QDialog(&lv), Dialog(lv, name)
|
||||
DialogView::DialogView(GuiView & lv, string const & name,
|
||||
QString const & title)
|
||||
: QDialog(&lv), Dialog(lv, name, "LyX: " + title)
|
||||
{}
|
||||
|
||||
} // namespace frontend
|
||||
|
@ -30,7 +30,8 @@ public:
|
||||
/// \param lv is the access point for the dialog to the LyX kernel.
|
||||
/// \param name is the identifier given to the dialog by its parent
|
||||
/// container.
|
||||
explicit DialogView(GuiView & lv, std::string const & name);
|
||||
/// \param title is the window title used for decoration.
|
||||
DialogView(GuiView & lv, std::string const & name, QString const & title);
|
||||
virtual ~DialogView() {}
|
||||
|
||||
virtual QWidget * asQWidget() { return this; }
|
||||
|
@ -32,10 +32,11 @@ public:
|
||||
DockView(
|
||||
GuiView & parent, ///< the main window where to dock.
|
||||
std::string const & name, ///< dialog identifier.
|
||||
QString const & title, ///< dialog title.
|
||||
Qt::DockWidgetArea area = Qt::LeftDockWidgetArea, ///< Position of the dock (and also drawer)
|
||||
Qt::WindowFlags flags = 0
|
||||
)
|
||||
: QDockWidget(&parent, flags), Dialog(parent, name)
|
||||
: QDockWidget(&parent, flags), Dialog(parent, name, title)
|
||||
{
|
||||
if (flags & Qt::Drawer)
|
||||
setFeatures(QDockWidget::NoDockWidgetFeatures);
|
||||
|
@ -13,7 +13,6 @@
|
||||
#include "GuiAbout.h"
|
||||
|
||||
#include "qt_helpers.h"
|
||||
#include "support/gettext.h"
|
||||
#include "version.h"
|
||||
|
||||
#include "support/filetools.h"
|
||||
@ -36,9 +35,9 @@ static QString credits()
|
||||
QTextStream out(&res);
|
||||
|
||||
if (file.isReadable()) {
|
||||
out << toqstr(_("ERROR: LyX wasn't able to read CREDITS file\n"));
|
||||
out << toqstr(_("Please install correctly to estimate the great\n"));
|
||||
out << toqstr(_("amount of work other people have done for the LyX project."));
|
||||
out << qt_("ERROR: LyX wasn't able to read CREDITS file\n");
|
||||
out << qt_("Please install correctly to estimate the great\n");
|
||||
out << qt_("amount of work other people have done for the LyX project.");
|
||||
} else {
|
||||
file.open(QIODevice::ReadOnly);
|
||||
QTextStream ts(&file);
|
||||
@ -61,19 +60,19 @@ static QString credits()
|
||||
|
||||
static QString copyright()
|
||||
{
|
||||
return toqstr(_("LyX is Copyright (C) 1995 by Matthias Ettrich,\n1995-2006 LyX Team"));
|
||||
return qt_("LyX is Copyright (C) 1995 by Matthias Ettrich,\n1995-2006 LyX Team");
|
||||
}
|
||||
|
||||
|
||||
static QString license()
|
||||
{
|
||||
return toqstr(_("This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version."));
|
||||
return qt_("This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.");
|
||||
}
|
||||
|
||||
|
||||
static QString disclaimer()
|
||||
{
|
||||
return toqstr(_("LyX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\nSee the GNU General Public License for more details.\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA."));
|
||||
return qt_("LyX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\nSee the GNU General Public License for more details.\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.");
|
||||
}
|
||||
|
||||
|
||||
@ -81,25 +80,24 @@ static QString version()
|
||||
{
|
||||
QString res;
|
||||
QTextStream out(&res);
|
||||
out << toqstr(_("LyX Version "));
|
||||
out << qt_("LyX Version ");
|
||||
out << lyx_version;
|
||||
out << " (";
|
||||
out << lyx_release_date;
|
||||
out << ")\n";
|
||||
out << toqstr(_("Library directory: "));
|
||||
out << qt_("Library directory: ");
|
||||
out << toqstr(makeDisplayPath(package().system_support().absFilename()));
|
||||
out << "\n";
|
||||
out << toqstr(_("User directory: "));
|
||||
out << qt_("User directory: ");
|
||||
out << toqstr(makeDisplayPath(package().user_support().absFilename()));
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
GuiAbout::GuiAbout(GuiView & lv)
|
||||
: GuiDialog(lv, "aboutlyx")
|
||||
: GuiDialog(lv, "aboutlyx", qt_("About LyX"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("About LyX"));
|
||||
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
|
||||
|
@ -24,10 +24,9 @@ namespace frontend {
|
||||
|
||||
|
||||
GuiBibitem::GuiBibitem(GuiView & lv)
|
||||
: GuiCommand(lv, "bibitem")
|
||||
: GuiCommand(lv, "bibitem", qt_("Bibliography Entry Settings"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Bibliography Entry Settings"));
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
|
@ -22,11 +22,11 @@
|
||||
#include "qt_helpers.h"
|
||||
#include "Validator.h"
|
||||
#include "LyXRC.h"
|
||||
#include "support/gettext.h"
|
||||
|
||||
#include "ButtonPolicy.h"
|
||||
|
||||
#include "support/filetools.h" // changeExtension
|
||||
#include "support/gettext.h"
|
||||
#include "support/lstrings.h"
|
||||
#include "support/FileFilterList.h"
|
||||
|
||||
@ -44,12 +44,10 @@ namespace frontend {
|
||||
|
||||
|
||||
GuiBibtex::GuiBibtex(GuiView & lv)
|
||||
: GuiCommand(lv, "bibtex")
|
||||
: GuiCommand(lv, "bibtex", qt_("BibTeX Bibliography"))
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
setViewTitle( _("BibTeX Bibliography"));
|
||||
|
||||
QDialog::setModal(true);
|
||||
|
||||
connect(okPB, SIGNAL(clicked()),
|
||||
|
@ -73,10 +73,9 @@ void box_gui_tokens_special_length(vector<string> & ids,
|
||||
|
||||
|
||||
GuiBox::GuiBox(GuiView & lv)
|
||||
: GuiDialog(lv, "box"), params_("")
|
||||
: GuiDialog(lv, "box", qt_("Box Settings")), params_("")
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Box Settings"));
|
||||
|
||||
// fill the box type choice
|
||||
box_gui_tokens(ids_, gui_names_);
|
||||
|
@ -33,10 +33,9 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiBranch::GuiBranch(GuiView & lv)
|
||||
: GuiDialog(lv, "branch")
|
||||
: GuiDialog(lv, "branch", qt_("Branch Settings"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Branch Settings"));
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
#include "qt_helpers.h"
|
||||
|
||||
#include "support/gettext.h"
|
||||
#include "support/lstrings.h"
|
||||
#include "support/lyxtime.h"
|
||||
|
||||
@ -37,10 +38,9 @@ namespace frontend {
|
||||
using support::bformat;
|
||||
|
||||
GuiChanges::GuiChanges(GuiView & lv)
|
||||
: GuiDialog(lv, "changes")
|
||||
: GuiDialog(lv, "changes", qt_("Merge Changes"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Merge Changes"));
|
||||
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
connect(nextPB, SIGNAL(clicked()), this, SLOT(nextChange()));
|
||||
|
@ -269,11 +269,10 @@ static vector<FamilyPair> const getFamilyData()
|
||||
|
||||
|
||||
GuiCharacter::GuiCharacter(GuiView & lv)
|
||||
: GuiDialog(lv, "character"), font_(ignore_font),
|
||||
: GuiDialog(lv, "character", qt_("Text Style")), font_(ignore_font),
|
||||
toggleall_(false), reset_lang_(false)
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Text Style"));
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
|
||||
|
@ -76,10 +76,9 @@ static vector<lyx::docstring> to_docstring_vector(QStringList const & qlist)
|
||||
|
||||
|
||||
GuiCitation::GuiCitation(GuiView & lv)
|
||||
: GuiCommand(lv, "citation")
|
||||
: GuiCommand(lv, "citation", qt_("Citation"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Citation"));
|
||||
|
||||
connect(citationStyleCO, SIGNAL(activated(int)),
|
||||
this, SLOT(on_citationStyleCO_currentIndexChanged(int)));
|
||||
|
@ -70,10 +70,9 @@ namespace frontend {
|
||||
|
||||
|
||||
GuiDelimiter::GuiDelimiter(GuiView & lv)
|
||||
: GuiMath(lv, "mathdelimiter")
|
||||
: GuiMath(lv, "mathdelimiter", qt_("Math Delimiter"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Math Delimiter"));
|
||||
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(accept()));
|
||||
|
||||
|
@ -26,17 +26,11 @@ using namespace std;
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiDialog::GuiDialog(GuiView & lv, string const & name)
|
||||
: QDialog(&lv), Dialog(lv, name), is_closing_(false)
|
||||
GuiDialog::GuiDialog(GuiView & lv, string const & name, QString const & title)
|
||||
: QDialog(&lv), Dialog(lv, name, "LyX: " + title), is_closing_(false)
|
||||
{}
|
||||
|
||||
|
||||
void GuiDialog::setViewTitle(docstring const & title)
|
||||
{
|
||||
setWindowTitle("LyX: " + toqstr(title));
|
||||
}
|
||||
|
||||
|
||||
void GuiDialog::setButtonsValid(bool valid)
|
||||
{
|
||||
bc().setValid(valid);
|
||||
@ -126,8 +120,9 @@ using namespace std;
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiCommand::GuiCommand(GuiView & lv, string const & name)
|
||||
: GuiDialog(lv, name), params_(insetCode(name)), lfun_name_(name)
|
||||
GuiCommand::GuiCommand(GuiView & lv, string const & name,
|
||||
QString const & title)
|
||||
: GuiDialog(lv, name, title), params_(insetCode(name)), lfun_name_(name)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,8 @@ public:
|
||||
/// \param lv is the access point for the dialog to the LyX kernel.
|
||||
/// \param name is the identifier given to the dialog by its parent
|
||||
/// container.
|
||||
explicit GuiDialog(GuiView & lv, std::string const & name);
|
||||
/// \param title is the window title used for decoration.
|
||||
GuiDialog(GuiView & lv, std::string const & name, QString const & title);
|
||||
|
||||
virtual QWidget * asQWidget() { return this; }
|
||||
virtual QWidget const * asQWidget() const { return this; }
|
||||
@ -59,9 +60,6 @@ public Q_SLOTS:
|
||||
void slotClose();
|
||||
|
||||
public:
|
||||
///
|
||||
void setViewTitle(docstring const & title);
|
||||
|
||||
/** Check whether we may apply our data.
|
||||
*
|
||||
* The buttons are disabled if not and (re-)enabled if yes.
|
||||
@ -114,7 +112,7 @@ class GuiCommand : public GuiDialog
|
||||
public:
|
||||
/// We need to know with what sort of inset we're associated.
|
||||
// FIXME This should probably be an InsetCode
|
||||
GuiCommand(GuiView &, std::string const & name);
|
||||
GuiCommand(GuiView &, std::string const & name, QString const & title);
|
||||
///
|
||||
bool initialiseParams(std::string const & data);
|
||||
/// clean-up on hide.
|
||||
|
@ -492,11 +492,10 @@ void PreambleModule::closeEvent(QCloseEvent * e)
|
||||
|
||||
|
||||
GuiDocument::GuiDocument(GuiView & lv)
|
||||
: GuiDialog(lv, "document"), current_id_(0)
|
||||
: GuiDialog(lv, "document", qt_("Document Settings")), current_id_(0)
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Document Settings"));
|
||||
|
||||
|
||||
lang_ = getSecond(getLanguageData(false));
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
|
@ -26,10 +26,9 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiERT::GuiERT(GuiView & lv)
|
||||
: GuiDialog(lv, "ert"), status_(InsetERT::Collapsed)
|
||||
: GuiDialog(lv, "ert", qt_("TeX Code Settings")), status_(InsetERT::Collapsed)
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("TeX Code Settings"));
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
|
@ -35,7 +35,7 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiErrorList::GuiErrorList(GuiView & lv)
|
||||
: GuiDialog(lv, "errorlist")
|
||||
: GuiDialog(lv, "errorlist", qt_("Error List"))
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
@ -74,7 +74,7 @@ void GuiErrorList::select(QListWidgetItem * wi)
|
||||
|
||||
void GuiErrorList::updateContents()
|
||||
{
|
||||
setViewTitle(name_);
|
||||
setTitle(toqstr(name_));
|
||||
errorsLW->clear();
|
||||
descriptionTB->setPlainText(QString());
|
||||
|
||||
|
@ -89,10 +89,9 @@ char const * const origin_gui_strs[] = {
|
||||
|
||||
|
||||
GuiExternal::GuiExternal(GuiView & lv)
|
||||
: GuiDialog(lv, "external"), bbChanged_(false)
|
||||
: GuiDialog(lv, "external", qt_("External Material")), bbChanged_(false)
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("External Material"));
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
|
||||
|
@ -26,11 +26,10 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiFloat::GuiFloat(GuiView & lv)
|
||||
: GuiDialog(lv, "float")
|
||||
: GuiDialog(lv, "float", qt_("Float Settings"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Float Settings"));
|
||||
|
||||
|
||||
connect(restorePB, SIGNAL(clicked()), this, SLOT(slotRestore()));
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
|
||||
|
@ -113,11 +113,10 @@ vector<RotationOriginPair> getRotationOriginData();
|
||||
|
||||
|
||||
GuiGraphics::GuiGraphics(GuiView & lv)
|
||||
: GuiDialog(lv, "graphics")
|
||||
: GuiDialog(lv, "graphics", qt_("Graphics"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Graphics"));
|
||||
|
||||
|
||||
//main buttons
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
|
||||
|
@ -27,10 +27,9 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiHyperlink::GuiHyperlink(GuiView & lv)
|
||||
: GuiCommand(lv, "href")
|
||||
: GuiCommand(lv, "href",qt_("Hyperlink"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle( _("Hyperlink"));
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
|
@ -47,10 +47,9 @@ namespace frontend {
|
||||
|
||||
|
||||
GuiInclude::GuiInclude(GuiView & lv)
|
||||
: GuiCommand(lv, "include")
|
||||
: GuiCommand(lv, "include", qt_("Child Document"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Child Document"));
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
|
@ -32,12 +32,11 @@ namespace frontend {
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
GuiIndexDialogBase::GuiIndexDialogBase(GuiView & lv,
|
||||
docstring const & title, QString const & label, string const & name)
|
||||
: GuiCommand(lv, name)
|
||||
QString const & title, QString const & label, string const & name)
|
||||
: GuiCommand(lv, name, title)
|
||||
{
|
||||
label_ = label;
|
||||
setupUi(this);
|
||||
setViewTitle(title);
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
@ -118,7 +117,7 @@ bool GuiIndexDialogBase::isValid()
|
||||
|
||||
|
||||
GuiIndex::GuiIndex(GuiView & lv)
|
||||
: GuiIndexDialogBase(lv, _("Index Entry"), qt_("&Keyword:"), "index")
|
||||
: GuiIndexDialogBase(lv, qt_("Index Entry"), qt_("&Keyword:"), "index")
|
||||
{
|
||||
keywordED->setWhatsThis( qt_(
|
||||
"The format of the entry in the index.\n"
|
||||
@ -148,7 +147,7 @@ Dialog * createGuiIndex(GuiView & lv) { return new GuiIndex(lv); }
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
GuiLabel::GuiLabel(GuiView & lv)
|
||||
: GuiIndexDialogBase(lv, _("Label"), qt_("&Label:"), "label")
|
||||
: GuiIndexDialogBase(lv, qt_("Label"), qt_("&Label:"), "label")
|
||||
{}
|
||||
|
||||
|
||||
|
@ -24,7 +24,7 @@ class GuiIndexDialogBase : public GuiCommand, public Ui::IndexUi
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GuiIndexDialogBase(GuiView & lv, docstring const & title,
|
||||
GuiIndexDialogBase(GuiView & lv, QString const & title,
|
||||
QString const & label, std::string const & name);
|
||||
|
||||
private Q_SLOTS:
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "insets/InsetListingsParams.h"
|
||||
#include "support/debug.h"
|
||||
|
||||
#include "support/gettext.h"
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include <QLineEdit>
|
||||
@ -158,10 +159,9 @@ char const * font_styles_gui[] =
|
||||
|
||||
|
||||
GuiListings::GuiListings(GuiView & lv)
|
||||
: GuiDialog(lv, "listings")
|
||||
: GuiDialog(lv, "listings", qt_("Program Listing Settings"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Program Listing Settings"));
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
|
||||
|
@ -99,7 +99,7 @@ void LogHighlighter::highlightBlock(QString const & text)
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
GuiLog::GuiLog(GuiView & lv)
|
||||
: GuiDialog(lv, "log"), type_(LatexLog)
|
||||
: GuiDialog(lv, "log", qt_("LaTeX Log")), type_(LatexLog)
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
@ -129,7 +129,7 @@ void GuiLog::closeEvent(QCloseEvent * e)
|
||||
|
||||
void GuiLog::updateContents()
|
||||
{
|
||||
setViewTitle(title());
|
||||
setTitle(toqstr(title()));
|
||||
|
||||
ostringstream ss;
|
||||
getContents(ss);
|
||||
|
@ -19,8 +19,8 @@ using namespace std;
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiMath::GuiMath(GuiView & lv, string const & name)
|
||||
: GuiDialog(lv, name)
|
||||
GuiMath::GuiMath(GuiView & lv, string const & name, QString const & title)
|
||||
: GuiDialog(lv, name, title)
|
||||
{
|
||||
// FIXME: Ideally, those unicode codepoints would be defined
|
||||
// in "lib/symbols". Unfortunately, some of those are already
|
||||
|
@ -36,7 +36,7 @@ struct MathSymbol {
|
||||
class GuiMath : public GuiDialog
|
||||
{
|
||||
public:
|
||||
GuiMath(GuiView & lv, std::string const & name);
|
||||
GuiMath(GuiView & lv, std::string const & name, QString const & title);
|
||||
|
||||
/// Nothing to initialise in this case.
|
||||
bool initialiseParams(std::string const &) { return true; }
|
||||
|
@ -28,10 +28,9 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiMathMatrix::GuiMathMatrix(GuiView & lv)
|
||||
: GuiMath(lv, "mathmatrix")
|
||||
: GuiMath(lv, "mathmatrix", qt_("Math Matrix"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Math Matrix"));
|
||||
|
||||
table->setMinimumSize(100, 100);
|
||||
rowsSB->setValue(5);
|
||||
|
@ -29,7 +29,7 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiNomenclature::GuiNomenclature(GuiView & lv)
|
||||
: GuiCommand(lv, "nomenclature")
|
||||
: GuiCommand(lv, "nomenclature", qt_("Nomenclature"))
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
|
@ -25,10 +25,9 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiNote::GuiNote(GuiView & lv)
|
||||
: GuiDialog(lv, "note")
|
||||
: GuiDialog(lv, "note", qt_("Note Settings"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Note Settings"));
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
|
@ -43,10 +43,9 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiParagraph::GuiParagraph(GuiView & lv)
|
||||
: DialogView(lv, "paragraph")
|
||||
: DialogView(lv, "paragraph", qt_("Paragraph Settings"))
|
||||
{
|
||||
setupUi(this);
|
||||
setWindowTitle(qt_("Paragraph Settings"));
|
||||
|
||||
connect(alignDefaultRB, SIGNAL(clicked()), this, SLOT(changed()));
|
||||
connect(alignJustRB, SIGNAL(clicked()), this, SLOT(changed()));
|
||||
|
@ -2141,10 +2141,9 @@ void PrefIdentity::update(LyXRC const & rc)
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
GuiPreferences::GuiPreferences(GuiView & lv)
|
||||
: GuiDialog(lv, "prefs"), update_screen_font_(false)
|
||||
: GuiDialog(lv, "prefs", qt_("Preferences")), update_screen_font_(false)
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Preferences"));
|
||||
|
||||
QDialog::setModal(false);
|
||||
|
||||
|
@ -41,10 +41,9 @@ namespace frontend {
|
||||
|
||||
|
||||
GuiPrint::GuiPrint(GuiView & lv)
|
||||
: GuiDialog(lv, "print")
|
||||
: GuiDialog(lv, "print", qt_("Print Document"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Print Document"));
|
||||
|
||||
connect(printPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
|
@ -39,10 +39,9 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiRef::GuiRef(GuiView & lv)
|
||||
: GuiCommand(lv, "ref")
|
||||
: GuiCommand(lv, "ref", qt_("Cross-reference"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Cross-reference"));
|
||||
|
||||
sort_ = false;
|
||||
at_ref_ = false;
|
||||
|
@ -39,10 +39,9 @@ static void uniqueInsert(QComboBox * box, QString const & text)
|
||||
|
||||
|
||||
GuiSearch::GuiSearch(GuiView & lv)
|
||||
: GuiDialog(lv, "findreplace")
|
||||
: GuiDialog(lv, "findreplace", qt_("Find and Replace"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Find and Replace"));
|
||||
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
connect(findPB, SIGNAL(clicked()), this, SLOT(findClicked()));
|
||||
|
@ -35,10 +35,9 @@ namespace frontend {
|
||||
|
||||
|
||||
GuiSendTo::GuiSendTo(GuiView & lv)
|
||||
: GuiDialog(lv, "sendto")
|
||||
: GuiDialog(lv, "sendto", qt_("Send Document to Command"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Send Document to Command"));
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
|
||||
|
@ -28,10 +28,9 @@ namespace frontend {
|
||||
|
||||
|
||||
GuiShowFile::GuiShowFile(GuiView & lv)
|
||||
: GuiDialog(lv, "file")
|
||||
: GuiDialog(lv, "file", qt_("Show File"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Show File"));
|
||||
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
|
||||
@ -51,11 +50,11 @@ void GuiShowFile::updateContents()
|
||||
{
|
||||
setWindowTitle(toqstr(onlyFilename(filename_.absFilename())));
|
||||
|
||||
docstring contents = filename_.fileContents("UTF-8");
|
||||
if (contents.empty())
|
||||
contents = _("Error -> Cannot load file!");
|
||||
QString contents = toqstr(filename_.fileContents("UTF-8"));
|
||||
if (contents.isEmpty())
|
||||
contents = qt_("Error -> Cannot load file!");
|
||||
|
||||
textTB->setPlainText(toqstr(contents));
|
||||
textTB->setPlainText(contents);
|
||||
}
|
||||
|
||||
|
||||
|
@ -54,11 +54,10 @@ namespace frontend {
|
||||
|
||||
|
||||
GuiSpellchecker::GuiSpellchecker(GuiView & lv)
|
||||
: GuiDialog(lv, "spellchecker"), exitEarly_(false),
|
||||
: GuiDialog(lv, "spellchecker", qt_("Spellchecker")), exitEarly_(false),
|
||||
oldval_(0), newvalue_(0), count_(0), speller_(0)
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Spellchecker"));
|
||||
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
connect(replacePB, SIGNAL(clicked()), this, SLOT(replace()));
|
||||
|
@ -37,12 +37,11 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiTabular::GuiTabular(GuiView & lv)
|
||||
: GuiDialog(lv, "tabular")
|
||||
: GuiDialog(lv, "tabular", qt_("Table Settings"))
|
||||
{
|
||||
active_cell_ = Tabular::npos;
|
||||
|
||||
setupUi(this);
|
||||
setViewTitle(_("Table Settings"));
|
||||
|
||||
widthED->setValidator(unsignedLengthValidator(widthED));
|
||||
topspaceED->setValidator(new LengthValidator(topspaceED));
|
||||
|
@ -27,10 +27,9 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiTabularCreate::GuiTabularCreate(GuiView & lv)
|
||||
: GuiDialog(lv, "tabularcreate")
|
||||
: GuiDialog(lv, "tabularcreate", qt_("Insert Table"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Insert Table"));
|
||||
|
||||
rowsSB->setValue(5);
|
||||
columnsSB->setValue(5);
|
||||
|
@ -79,10 +79,9 @@ static string texFileFromList(string const & file, string const & type)
|
||||
|
||||
|
||||
GuiTexInfo::GuiTexInfo(GuiView & lv)
|
||||
: GuiDialog(lv, "texinfo")
|
||||
: GuiDialog(lv, "texinfo", qt_("TeX Information"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("TeX Information"));
|
||||
|
||||
warningPosted = false;
|
||||
activeStyle = ClsType;
|
||||
|
@ -13,7 +13,12 @@
|
||||
#include "GuiThesaurus.h"
|
||||
|
||||
#include "qt_helpers.h"
|
||||
|
||||
#include "FuncRequest.h"
|
||||
#include "lyxfind.h"
|
||||
|
||||
#include "support/debug.h"
|
||||
#include "support/gettext.h"
|
||||
|
||||
#include <QCloseEvent>
|
||||
#include <QHeaderView>
|
||||
@ -22,8 +27,6 @@
|
||||
#include <QTreeWidget>
|
||||
#include <QTreeWidgetItem>
|
||||
|
||||
#include "lyxfind.h"
|
||||
#include "FuncRequest.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -31,10 +34,9 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiThesaurus::GuiThesaurus(GuiView & lv)
|
||||
: GuiDialog(lv, "thesaurus")
|
||||
: GuiDialog(lv, "thesaurus", qt_("Thesaurus"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Thesaurus"));
|
||||
|
||||
meaningsTV->setColumnCount(1);
|
||||
meaningsTV->header()->hide();
|
||||
|
@ -41,11 +41,10 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiToc::GuiToc(GuiView & parent, Qt::DockWidgetArea area, Qt::WindowFlags flags)
|
||||
: DockView(parent, "toc", area, flags), params_(TOC_CODE)
|
||||
: DockView(parent, "toc", qt_("Outline"), area, flags), params_(TOC_CODE)
|
||||
{
|
||||
widget_ = new TocWidget(*this);
|
||||
setWidget(widget_);
|
||||
setWindowTitle(widget_->windowTitle());
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "FuncRequest.h"
|
||||
#include "insets/InsetVSpace.h"
|
||||
|
||||
#include "support/gettext.h"
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
@ -40,10 +41,9 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiVSpace::GuiVSpace(GuiView & lv)
|
||||
: GuiDialog(lv, "vspace")
|
||||
: GuiDialog(lv, "vspace", qt_("Vertical Space Settings"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Vertical Space Settings"));
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
|
||||
|
@ -39,7 +39,6 @@ ViewSourceWidget::ViewSourceWidget(GuiViewSource & controller)
|
||||
highlighter_(new LaTeXHighlighter(document_))
|
||||
{
|
||||
setupUi(this);
|
||||
setWindowTitle(qt_("LaTeX Source"));
|
||||
|
||||
connect(viewFullSourceCB, SIGNAL(clicked()),
|
||||
this, SLOT(updateView()));
|
||||
@ -89,11 +88,10 @@ void ViewSourceWidget::update(bool full_source)
|
||||
|
||||
GuiViewSource::GuiViewSource(GuiView & parent,
|
||||
Qt::DockWidgetArea area, Qt::WindowFlags flags)
|
||||
: DockView(parent, "view-source", area, flags)
|
||||
: DockView(parent, "view-source", qt_("LaTeX Source"), area, flags)
|
||||
{
|
||||
widget_ = new ViewSourceWidget(*this);
|
||||
setWidget(widget_);
|
||||
setWindowTitle(widget_->windowTitle());
|
||||
}
|
||||
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "insets/InsetWrap.h"
|
||||
|
||||
#include "support/gettext.h"
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include <QLineEdit>
|
||||
@ -31,10 +32,9 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiWrap::GuiWrap(GuiView & lv)
|
||||
: GuiDialog(lv, "wrap")
|
||||
: GuiDialog(lv, "wrap", qt_("Wrap Float Settings"))
|
||||
{
|
||||
setupUi(this);
|
||||
setViewTitle(_("Wrap Float Settings"));
|
||||
|
||||
connect(restorePB, SIGNAL(clicked()), this, SLOT(slotRestore()));
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
|
@ -31,7 +31,6 @@ TocWidget::TocWidget(GuiToc & form, QWidget * parent)
|
||||
: QWidget(parent), depth_(0), form_(form)
|
||||
{
|
||||
setupUi(this);
|
||||
setWindowTitle(qt_("Outline"));
|
||||
|
||||
connect(&form_, SIGNAL(modelReset()), SLOT(updateGui()));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user