3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Jürgen Spitzmüller
8 * Full author contact details are available in file CREDITS.
14 #include "QNoteDialog.h"
17 #include "controllers/ControlNote.h"
19 #include "insets/insetnote.h"
21 #include <qradiobutton.h>
22 #include <qpushbutton.h>
30 typedef QController<ControlNote, QView<QNoteDialog> > note_base_class;
33 QNote::QNote(Dialog & parent)
34 : note_base_class(parent, _("Note Settings"))
38 void QNote::build_dialog()
40 dialog_.reset(new QNoteDialog(this));
42 bcview().setOK(dialog_->okPB);
43 bcview().setCancel(dialog_->closePB);
47 void QNote::update_contents()
49 QRadioButton * rb = 0;
51 switch (controller().params().type) {
52 case InsetNoteParams::Note:
55 case InsetNoteParams::Comment:
56 rb = dialog_->commentRB;
58 case InsetNoteParams::Greyedout:
59 rb = dialog_->greyedoutRB;
61 case InsetNoteParams::Framed:
62 rb = dialog_->framedRB;
64 case InsetNoteParams::Shaded:
65 rb = dialog_->shadedRB;
75 InsetNoteParams::Type type;
77 if (dialog_->greyedoutRB->isChecked())
78 type = InsetNoteParams::Greyedout;
79 else if (dialog_->commentRB->isChecked())
80 type = InsetNoteParams::Comment;
81 else if (dialog_->framedRB->isChecked())
82 type = InsetNoteParams::Framed;
83 else if (dialog_->shadedRB->isChecked())
84 type = InsetNoteParams::Shaded;
86 type = InsetNoteParams::Note;
88 controller().params().type = type;
91 } // namespace frontend