]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiNote.cpp
Whitespace.
[lyx.git] / src / frontends / qt4 / GuiNote.cpp
index 93b1e7dfdef82af8d8096868ef97316ae46bc005..adbb6e7425f09bbd3893116d2cc3cc34fcbe03cc 100644 (file)
@@ -4,7 +4,7 @@
  * Licence details can be found in the file COPYING.
  *
  * \author Angus Leeming
- * \author Jürgen Spitzmüller
+ * \author Jürgen Spitzmüller
  *
  * Full author contact details are available in file CREDITS.
  */
 
 #include "GuiNote.h"
 #include "FuncRequest.h"
-#include "gettext.h"
+#include "support/gettext.h"
 
 #include "insets/InsetNote.h"
 
-#include <QCloseEvent>
-
-using std::string;
-
+using namespace std;
 
 namespace lyx {
 namespace frontend {
 
-GuiNote::GuiNote(LyXView & lv)
-       : GuiDialog(lv, "note"), Controller(this)
+GuiNote::GuiNote(GuiView & lv)
+       : GuiDialog(lv, "note", qt_("Note Settings"))
 {
        setupUi(this);
-       setController(this, false);
-       setViewTitle(_("Note Settings"));
 
        connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
        connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
@@ -38,8 +33,6 @@ GuiNote::GuiNote(LyXView & lv)
        connect(noteRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
        connect(greyedoutRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
        connect(commentRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
-       connect(framedRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
-       connect(shadedRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
 
        bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy);
        bc().setOK(okPB);
@@ -47,13 +40,6 @@ GuiNote::GuiNote(LyXView & lv)
 }
 
 
-void GuiNote::closeEvent(QCloseEvent * e)
-{
-       slotClose();
-       e->accept();
-}
-
-
 void GuiNote::change_adaptor()
 {
        changed();
@@ -72,12 +58,6 @@ void GuiNote::updateContents()
        case InsetNoteParams::Greyedout:
                greyedoutRB->setChecked(true);
                break;
-       case InsetNoteParams::Framed:
-               framedRB->setChecked(true);
-               break;
-       case InsetNoteParams::Shaded:
-               shadedRB->setChecked(true);
-               break;
        }
 }
 
@@ -88,10 +68,6 @@ void GuiNote::applyView()
                params_.type = InsetNoteParams::Greyedout;
        else if (commentRB->isChecked())
                params_.type = InsetNoteParams::Comment;
-       else if (framedRB->isChecked())
-               params_.type = InsetNoteParams::Framed;
-       else if (shadedRB->isChecked())
-               params_.type = InsetNoteParams::Shaded;
        else
                params_.type = InsetNoteParams::Note;
 }
@@ -99,7 +75,7 @@ void GuiNote::applyView()
 
 bool GuiNote::initialiseParams(string const & data)
 {
-       InsetNoteMailer::string2params(data, params_);
+       InsetNote::string2params(data, params_);
        return true;
 }
 
@@ -112,14 +88,14 @@ void GuiNote::clearParams()
 
 void GuiNote::dispatchParams()
 {
-       dispatch(FuncRequest(getLfun(), InsetNoteMailer::params2string(params_)));
+       dispatch(FuncRequest(getLfun(), InsetNote::params2string(params_)));
 }
 
 
-Dialog * createGuiNote(LyXView & lv) { return new GuiNote(lv); }
+Dialog * createGuiNote(GuiView & lv) { return new GuiNote(lv); }
 
 
 } // namespace frontend
 } // namespace lyx
 
-#include "GuiNote_moc.cpp"
+#include "moc_GuiNote.cpp"