* 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 "insets/InsetNote.h"
-#include <QCloseEvent>
-
-using std::string;
-
+using namespace std;
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()));
+ connect(buttonBox, SIGNAL(clicked(QAbstractButton *)),
+ this, SLOT(slotButtonBox(QAbstractButton *)));
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::closeEvent(QCloseEvent * e)
-{
- slotClose();
- e->accept();
+ bc().setOK(buttonBox->button(QDialogButtonBox::Ok));
+ bc().setCancel(buttonBox->button(QDialogButtonBox::Cancel));
}
}
-bool GuiNote::initialiseParams(string const & data)
+bool GuiNote::initialiseParams(string const & sdata)
{
- InsetNoteMailer::string2params(data, params_);
+ InsetNote::string2params(sdata, params_);
return true;
}
void GuiNote::dispatchParams()
{
- dispatch(FuncRequest(getLfun(), InsetNoteMailer::params2string(params_)));
+ dispatch(FuncRequest(getLfun(), InsetNote::params2string(params_)));
}
} // namespace frontend
} // namespace lyx
-#include "GuiNote_moc.cpp"
+#include "moc_GuiNote.cpp"