mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
revert r28281
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28282 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5ae52b3b6c
commit
6a0cdc2a1e
@ -729,6 +729,7 @@ src_frontends_qt4_header_files = Split('''
|
|||||||
GuiLog.h
|
GuiLog.h
|
||||||
GuiMathMatrix.h
|
GuiMathMatrix.h
|
||||||
GuiNomencl.h
|
GuiNomencl.h
|
||||||
|
GuiNote.h
|
||||||
GuiPainter.h
|
GuiPainter.h
|
||||||
GuiParagraph.h
|
GuiParagraph.h
|
||||||
GuiPrefs.h
|
GuiPrefs.h
|
||||||
@ -819,6 +820,7 @@ src_frontends_qt4_files = Split('''
|
|||||||
GuiLog.cpp
|
GuiLog.cpp
|
||||||
GuiMathMatrix.cpp
|
GuiMathMatrix.cpp
|
||||||
GuiNomencl.cpp
|
GuiNomencl.cpp
|
||||||
|
GuiNote.cpp
|
||||||
GuiPainter.cpp
|
GuiPainter.cpp
|
||||||
GuiParagraph.cpp
|
GuiParagraph.cpp
|
||||||
GuiPrefs.cpp
|
GuiPrefs.cpp
|
||||||
@ -904,6 +906,7 @@ src_frontends_qt4_ui_files = Split('''
|
|||||||
MathsUi.ui
|
MathsUi.ui
|
||||||
ModulesUi.ui
|
ModulesUi.ui
|
||||||
NomenclUi.ui
|
NomenclUi.ui
|
||||||
|
NoteUi.ui
|
||||||
NumberingUi.ui
|
NumberingUi.ui
|
||||||
PageLayoutUi.ui
|
PageLayoutUi.ui
|
||||||
ParagraphUi.ui
|
ParagraphUi.ui
|
||||||
|
101
src/frontends/qt4/GuiNote.cpp
Normal file
101
src/frontends/qt4/GuiNote.cpp
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
/**
|
||||||
|
* \file GuiNote.cpp
|
||||||
|
* This file is part of LyX, the document processor.
|
||||||
|
* Licence details can be found in the file COPYING.
|
||||||
|
*
|
||||||
|
* \author Angus Leeming
|
||||||
|
* \author Jürgen Spitzmüller
|
||||||
|
*
|
||||||
|
* Full author contact details are available in file CREDITS.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
|
#include "GuiNote.h"
|
||||||
|
#include "FuncRequest.h"
|
||||||
|
#include "support/gettext.h"
|
||||||
|
|
||||||
|
#include "insets/InsetNote.h"
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
namespace lyx {
|
||||||
|
namespace frontend {
|
||||||
|
|
||||||
|
GuiNote::GuiNote(GuiView & lv)
|
||||||
|
: GuiDialog(lv, "note", qt_("Note Settings"))
|
||||||
|
{
|
||||||
|
setupUi(this);
|
||||||
|
|
||||||
|
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||||
|
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||||
|
|
||||||
|
connect(noteRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
|
||||||
|
connect(greyedoutRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
|
||||||
|
connect(commentRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
|
||||||
|
|
||||||
|
bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy);
|
||||||
|
bc().setOK(okPB);
|
||||||
|
bc().setCancel(closePB);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GuiNote::change_adaptor()
|
||||||
|
{
|
||||||
|
changed();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GuiNote::updateContents()
|
||||||
|
{
|
||||||
|
switch (params_.type) {
|
||||||
|
case InsetNoteParams::Note:
|
||||||
|
noteRB->setChecked(true);
|
||||||
|
break;
|
||||||
|
case InsetNoteParams::Comment:
|
||||||
|
commentRB->setChecked(true);
|
||||||
|
break;
|
||||||
|
case InsetNoteParams::Greyedout:
|
||||||
|
greyedoutRB->setChecked(true);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GuiNote::applyView()
|
||||||
|
{
|
||||||
|
if (greyedoutRB->isChecked())
|
||||||
|
params_.type = InsetNoteParams::Greyedout;
|
||||||
|
else if (commentRB->isChecked())
|
||||||
|
params_.type = InsetNoteParams::Comment;
|
||||||
|
else
|
||||||
|
params_.type = InsetNoteParams::Note;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool GuiNote::initialiseParams(string const & data)
|
||||||
|
{
|
||||||
|
InsetNote::string2params(data, params_);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GuiNote::clearParams()
|
||||||
|
{
|
||||||
|
params_ = InsetNoteParams();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GuiNote::dispatchParams()
|
||||||
|
{
|
||||||
|
dispatch(FuncRequest(getLfun(), InsetNote::params2string(params_)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Dialog * createGuiNote(GuiView & lv) { return new GuiNote(lv); }
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace frontend
|
||||||
|
} // namespace lyx
|
||||||
|
|
||||||
|
#include "moc_GuiNote.cpp"
|
50
src/frontends/qt4/GuiNote.h
Normal file
50
src/frontends/qt4/GuiNote.h
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
// -*- C++ -*-
|
||||||
|
/**
|
||||||
|
* \file GuiNote.h
|
||||||
|
* This file is part of LyX, the document processor.
|
||||||
|
* Licence details can be found in the file COPYING.
|
||||||
|
*
|
||||||
|
* \author Jürgen Spitzmüller
|
||||||
|
*
|
||||||
|
* Full author contact details are available in file CREDITS.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GUINOTE_H
|
||||||
|
#define GUINOTE_H
|
||||||
|
|
||||||
|
#include "GuiDialog.h"
|
||||||
|
#include "insets/InsetNote.h"
|
||||||
|
#include "ui_NoteUi.h"
|
||||||
|
|
||||||
|
namespace lyx {
|
||||||
|
namespace frontend {
|
||||||
|
|
||||||
|
class GuiNote : public GuiDialog, public Ui::NoteUi
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
GuiNote(GuiView & lv);
|
||||||
|
private Q_SLOTS:
|
||||||
|
void change_adaptor();
|
||||||
|
private:
|
||||||
|
/// Apply changes
|
||||||
|
void applyView();
|
||||||
|
/// Update dialog before showing it
|
||||||
|
void updateContents();
|
||||||
|
///
|
||||||
|
bool initialiseParams(std::string const & data);
|
||||||
|
///
|
||||||
|
void clearParams();
|
||||||
|
///
|
||||||
|
void dispatchParams();
|
||||||
|
///
|
||||||
|
bool isBufferDependent() const { return true; }
|
||||||
|
private:
|
||||||
|
///
|
||||||
|
InsetNoteParams params_;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace frontend
|
||||||
|
} // namespace lyx
|
||||||
|
|
||||||
|
#endif // GUINOTE_H
|
@ -2299,7 +2299,7 @@ char const * const dialognames[] = {
|
|||||||
"aboutlyx", "bibitem", "bibtex", "box", "branch", "changes", "character",
|
"aboutlyx", "bibitem", "bibtex", "box", "branch", "changes", "character",
|
||||||
"citation", "document", "errorlist", "ert", "external", "file",
|
"citation", "document", "errorlist", "ert", "external", "file",
|
||||||
"findreplace", "float", "graphics", "include", "index", "info", "nomenclature", "label", "log",
|
"findreplace", "float", "graphics", "include", "index", "info", "nomenclature", "label", "log",
|
||||||
"mathdelimiter", "mathmatrix", "mathspace", "paragraph", "prefs", "print",
|
"mathdelimiter", "mathmatrix", "mathspace", "note", "paragraph", "prefs", "print",
|
||||||
"ref", "sendto", "space", "spellchecker", "symbols", "tabular", "tabularcreate",
|
"ref", "sendto", "space", "spellchecker", "symbols", "tabular", "tabularcreate",
|
||||||
|
|
||||||
#ifdef HAVE_LIBAIKSAURUS
|
#ifdef HAVE_LIBAIKSAURUS
|
||||||
@ -2488,6 +2488,7 @@ Dialog * createGuiLog(GuiView & lv);
|
|||||||
Dialog * createGuiMathHSpace(GuiView & lv);
|
Dialog * createGuiMathHSpace(GuiView & lv);
|
||||||
Dialog * createGuiMathMatrix(GuiView & lv);
|
Dialog * createGuiMathMatrix(GuiView & lv);
|
||||||
Dialog * createGuiNomenclature(GuiView & lv);
|
Dialog * createGuiNomenclature(GuiView & lv);
|
||||||
|
Dialog * createGuiNote(GuiView & lv);
|
||||||
Dialog * createGuiParagraph(GuiView & lv);
|
Dialog * createGuiParagraph(GuiView & lv);
|
||||||
Dialog * createGuiPreferences(GuiView & lv);
|
Dialog * createGuiPreferences(GuiView & lv);
|
||||||
Dialog * createGuiPrint(GuiView & lv);
|
Dialog * createGuiPrint(GuiView & lv);
|
||||||
@ -2566,6 +2567,8 @@ Dialog * GuiView::build(string const & name)
|
|||||||
return createGuiMathHSpace(*this);
|
return createGuiMathHSpace(*this);
|
||||||
if (name == "mathmatrix")
|
if (name == "mathmatrix")
|
||||||
return createGuiMathMatrix(*this);
|
return createGuiMathMatrix(*this);
|
||||||
|
if (name == "note")
|
||||||
|
return createGuiNote(*this);
|
||||||
if (name == "paragraph")
|
if (name == "paragraph")
|
||||||
return createGuiParagraph(*this);
|
return createGuiParagraph(*this);
|
||||||
if (name == "prefs")
|
if (name == "prefs")
|
||||||
|
@ -97,6 +97,7 @@ SOURCEFILES = \
|
|||||||
GuiLog.cpp \
|
GuiLog.cpp \
|
||||||
GuiMathMatrix.cpp \
|
GuiMathMatrix.cpp \
|
||||||
GuiNomencl.cpp \
|
GuiNomencl.cpp \
|
||||||
|
GuiNote.cpp \
|
||||||
GuiPainter.cpp \
|
GuiPainter.cpp \
|
||||||
GuiParagraph.cpp \
|
GuiParagraph.cpp \
|
||||||
GuiPrefs.cpp \
|
GuiPrefs.cpp \
|
||||||
@ -190,6 +191,7 @@ MOCHEADER = \
|
|||||||
GuiLog.h \
|
GuiLog.h \
|
||||||
GuiMathMatrix.h \
|
GuiMathMatrix.h \
|
||||||
GuiNomencl.h \
|
GuiNomencl.h \
|
||||||
|
GuiNote.h \
|
||||||
GuiParagraph.h \
|
GuiParagraph.h \
|
||||||
GuiPrefs.h \
|
GuiPrefs.h \
|
||||||
GuiPrint.h \
|
GuiPrint.h \
|
||||||
|
@ -27,6 +27,7 @@ uic MarginsUi.ui -o MarginsUi.h
|
|||||||
uic MathMatrixUi.ui -o MathMatrixUi.h
|
uic MathMatrixUi.ui -o MathMatrixUi.h
|
||||||
uic MathsUi.ui -o MathsUi.h
|
uic MathsUi.ui -o MathsUi.h
|
||||||
uic ModulesUi.ui -o ModulesUi.h
|
uic ModulesUi.ui -o ModulesUi.h
|
||||||
|
uic NoteUi.ui -o NoteUi.h
|
||||||
uic NumberingUi.ui -o NumberingUi.h
|
uic NumberingUi.ui -o NumberingUi.h
|
||||||
uic PageLayoutUi.ui -o PageLayoutUi.h
|
uic PageLayoutUi.ui -o PageLayoutUi.h
|
||||||
uic ParagraphUi.ui -o ParagraphUi.h
|
uic ParagraphUi.ui -o ParagraphUi.h
|
||||||
|
Loading…
Reference in New Issue
Block a user