vertical spaces
@bJürgen Spitzmüller
@iE-mail: j.spitzmueller@gmx.de
- Many improvements to xforms dialogs
+ Qt frontend, bugfixes
@bBen Stanley
@iE-mail: bds02@uow.edu.au
fix bugs with error insets placement
+2003-07-09 Juergen Spitzmueller <j.spitzmueller@gmx.de>
+
+ * CREDITS: update.
+
2003-07-10 John Levon <levon@movementarian.org>
* ui/classic.ui: fix toolbars to new scheme, fix space inserts
src/frontends/qt2/QMathDialog.C
src/frontends/qt2/QMathMatrixDialog.C
src/frontends/qt2/QMinipage.C
+src/frontends/qt2/QNote.C
src/frontends/qt2/QParagraph.C
src/frontends/qt2/QPrefs.C
src/frontends/qt2/QPrefsDialog.C
sure that it is initialized to some reasonable value, so that the
(ugly) Qt/Mac code can do its magic (conditionally on Q_WS_MAC).
+2003-07-09 Juergen Spitzmueller <j.spitzmueller@gmx.de>
+
+ * ui/QNoteDialog.ui:
+ * QNoteDialog.[Ch]:
+ * QNote.[Ch]:
+ * Makefile.dialogs:
+ * Dialogs.C:
+ * Dialogs2.C: New Annotation (Note) dialog
+
2003-07-11 André Pönitz <poenitz@lyx.org>
* Alert_pimpl.C:
#include "ControlLog.h"
#include "ControlMath.h"
#include "ControlMinipage.h"
+#include "ControlNote.h"
#include "ControlParagraph.h"
#include "ControlRef.h"
#include "ControlShowFile.h"
#include "QLog.h"
#include "QMath.h"
#include "QMinipage.h"
+#include "QNote.h"
#include "QParagraph.h"
#include "QRef.h"
#include "QShowFile.h"
"character", "citation", "error", "errorlist", "ert", "external", "file",
"float", "graphics", "include", "index", "label", "latexlog",
"mathpanel", "mathdelimiter", "mathmatrix",
-"minipage", "paragraph", "ref", "tabular", "tabularcreate", "texinfo",
+"minipage", "note", "paragraph", "ref", "tabular", "tabularcreate", "texinfo",
#ifdef HAVE_LIBAIKSAURUS
"thesaurus",
dialog->setController(new ControlMinipage(*dialog));
dialog->setView(new QMinipage(*dialog));
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+ } else if (name == "note") {
+ dialog->setController(new ControlNote(*dialog));
+ dialog->setView(new QNote(*dialog));
+ dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
} else if (name == "paragraph") {
dialog->setController(new ControlParagraph(*dialog));
dialog->setView(new QParagraph(*dialog));
QLyXKeySym.C QLyXKeySym.h \
QMath.C QMath.h \
QMinipage.C QMinipage.h \
+ QNote.C QNote.h \
QParagraph.C QParagraph.h \
QPrefs.C QPrefs.h \
QPrint.C QPrint.h \
QMathDialogBase.ui \
QMathMatrixDialogBase.ui \
QMinipageDialogBase.ui \
+ QNoteDialogBase.ui \
QParagraphDialogBase.ui \
QPrefAsciiModule.ui \
QPrefColorsModule.ui \
QMathDialog.C QMathDialog.h \
QMathMatrixDialog.C QMathMatrixDialog.h \
QMinipageDialog.C QMinipageDialog.h \
+ QNoteDialog.C QNoteDialog.h \
QParagraphDialog.C QParagraphDialog.h \
QPrefsDialog.C QPrefsDialog.h \
QRefDialog.C QRefDialog.h \
--- /dev/null
+/**
+ * \file QNote.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Juergen Spitzmueller
+ *
+ * Full author contact details are available in file CREDITS
+ */
+
+#include <config.h>
+
+#include "ControlNote.h"
+#include "qt_helpers.h"
+#include "insets/insetnote.h"
+
+#include <qradiobutton.h>
+#include <qpushbutton.h>
+
+#include "QNoteDialog.h"
+#include "QNote.h"
+#include "Qt2BC.h"
+
+
+typedef QController<ControlNote, QView<QNoteDialog> > base_class;
+
+
+QNote::QNote(Dialog & parent)
+ : base_class(parent, _("LyX: Annotation Settings"))
+{}
+
+
+void QNote::build_dialog()
+{
+ dialog_.reset(new QNoteDialog(this));
+
+ bcview().setOK(dialog_->okPB);
+ bcview().setCancel(dialog_->closePB);
+}
+
+
+void QNote::update_contents()
+{
+ QRadioButton * rb = 0;
+ string type(controller().params().type);
+
+ if (type == "Note")
+ rb = dialog_->noteRB;
+ else if (type == "Comment")
+ rb = dialog_->commentRB;
+ else if (type == "Greyedout")
+ rb = dialog_->greyedoutRB;
+
+ rb->setChecked(true);
+}
+
+
+void QNote::apply()
+{
+ string type;
+
+ if (dialog_->greyedoutRB->isChecked())
+ type = "Greyedout";
+ else if (dialog_->commentRB->isChecked())
+ type = "Comment";
+ else
+ type = "Note";
+
+ controller().params().type = type;
+}
+
--- /dev/null
+// -*- C++ -*-
+/**
+ * \file QNote.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Juergen Spitzmueller
+ *
+ * Full author contact details are available in file CREDITS
+ */
+
+#ifndef QNOTE_H
+#define QNOTE_H
+
+#include "QDialogView.h"
+
+
+class ControlNote;
+class QNoteDialog;
+
+/** This class provides a QT implementation of the Note Dialog.
+ */
+class QNote : public QController<ControlNote, QView<QNoteDialog> >
+{
+public:
+ friend class QNoteDialog;
+
+ /// Constructor
+ QNote(Dialog &);
+private:
+ /// Apply changes
+ virtual void apply();
+ /// Build the dialog
+ virtual void build_dialog();
+ /// Update dialog before showing it
+ virtual void update_contents();
+};
+
+#endif // QNOTE_H
--- /dev/null
+/**
+ * \file QNoteDialog.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Juergen Spitzmueller
+ *
+ * Full author contact details are available in file CREDITS
+ */
+
+#include <config.h>
+
+
+#include "QNote.h"
+#include "QNoteDialog.h"
+
+#include <qpushbutton.h>
+
+
+QNoteDialog::QNoteDialog(QNote * form)
+ : QNoteDialogBase(0, 0, false, 0),
+ form_(form)
+{
+ connect(okPB, SIGNAL(clicked()),
+ form, SLOT(slotOK()));
+ connect(closePB, SIGNAL(clicked()),
+ form, SLOT(slotClose()));
+}
+
+
+void QNoteDialog::closeEvent(QCloseEvent * e)
+{
+ form_->slotWMHide();
+ e->accept();
+}
+
+
+void QNoteDialog::change_adaptor()
+{
+ form_->changed();
+}
--- /dev/null
+// -*- C++ -*-
+/**
+ * \file QNoteDialog.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Juergen Spitzmueller
+ *
+ * Full author contact details are available in file CREDITS
+ */
+
+#ifndef QNOTEDIALOG_H
+#define QNOTEDIALOG_H
+
+#include "ui/QNoteDialogBase.h"
+
+
+class QNote;
+
+class QNoteDialog : public QNoteDialogBase {
+ Q_OBJECT
+public:
+ QNoteDialog(QNote * form);
+protected slots:
+ virtual void change_adaptor();
+protected:
+ virtual void closeEvent(QCloseEvent * e);
+private:
+ QNote * form_;
+};
+
+#endif // QNOTEDIALOG_H
--- /dev/null
+<!DOCTYPE UI><UI>
+<class>QNoteDialogBase</class>
+<include location="global">config.h</include>
+<include location="local">qt_helpers.h</include>
+<widget>
+ <class>QDialog</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>QNoteDialogBase</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>188</width>
+ <height>146</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>caption</name>
+ <string>Annotation Settings</string>
+ </property>
+ <property stdset="1">
+ <name>sizeGripEnabled</name>
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property stdset="1">
+ <name>margin</name>
+ <number>11</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget row="1" column="0" >
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>okPB</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>OK</string>
+ </property>
+ <property stdset="1">
+ <name>default</name>
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget row="1" column="1" >
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>closePB</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&Close</string>
+ </property>
+ <property stdset="1">
+ <name>default</name>
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget row="0" column="0" rowspan="1" colspan="2" >
+ <class>QButtonGroup</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>NoteBG</cstring>
+ </property>
+ <property stdset="1">
+ <name>title</name>
+ <string>Type</string>
+ </property>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>11</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QRadioButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>noteRB</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&Note</string>
+ </property>
+ <property>
+ <name>toolTip</name>
+ <string>LyX internal only</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QRadioButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>commentRB</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>C&omment</string>
+ </property>
+ <property>
+ <name>toolTip</name>
+ <string>Export to LaTeX but don't print</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QRadioButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>greyedoutRB</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&Greyed out</string>
+ </property>
+ <property>
+ <name>toolTip</name>
+ <string>Print as grey text</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>noteRB</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>QNoteDialogBase</receiver>
+ <slot>change_adaptor()</slot>
+ </connection>
+ <connection>
+ <sender>greyedoutRB</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>QNoteDialogBase</receiver>
+ <slot>change_adaptor()</slot>
+ </connection>
+ <connection>
+ <sender>commentRB</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>QNoteDialogBase</receiver>
+ <slot>change_adaptor()</slot>
+ </connection>
+ <slot access="public">change_adaptor()</slot>
+</connections>
+</UI>