+2002-01-25 Edwin Leuven <leuven@fee.uva.nl>
+
+ * Makefile.am:
+ * Dialogs.C:
+ * Makefile.dialogs:
+ * QFloat.h:
+ * QFloat.C:
+ * QFloatDialog.h:
+ * QFloatDialog.C:
+ * ui/QFloatDialog.ui: add float dialog
+
+2002-01-25 John Levon <moz@compsoc.man.ac.uk>
+
+ * Makefile.am:
+ * Makefile.dialogs: don't compile QPar/Doc
+ for now, as they cause problems
+
2002-01-20 John Levon <moz@compsoc.man.ac.uk>
* Makefile.am:
#include "QErrorDialog.h"
#include "QERTDialog.h"
#include "QExternalDialog.h"
+#include "QFloatDialog.h"
#include "QGraphicsDialog.h"
#include "QIncludeDialog.h"
#include "QIndexDialog.h"
#include "QError.h"
#include "QERT.h"
#include "QExternal.h"
+#include "QFloat.h"
#include "QGraphics.h"
#include "QInclude.h"
#include "QIndex.h"
#include "xforms/FormBrowser.h"
#include "xforms/form_browser.h"
#include "xforms/FormDocument.h"
-#include "xforms/FormFloat.h"
-#include "xforms/form_float.h"
#include "xforms/FormMathsPanel.h"
#include "xforms/FormParagraph.h"
#include "xforms/FormPreferences.h"
add(new GUIError<QError, Qt2BC>(*lv, *this));
add(new GUIERT<QERT, Qt2BC>(*lv, *this));
add(new GUIExternal<QExternal, Qt2BC>(*lv, *this));
+ add(new GUIFloat<QFloat, Qt2BC>(*lv, *this));
add(new GUIGraphics<QGraphics, Qt2BC>(*lv, *this));
add(new GUIInclude<QInclude, Qt2BC>(*lv, *this));
add(new GUIIndex<QIndex, Qt2BC>(*lv, *this));
add(new GUIVCLog<QVCLog, Qt2BC>(*lv, *this));
// dialogs not yet converted
- add(new GUIFloat<FormFloat, xformsBC>(*lv, *this));
add(new GUIShowFile<FormShowFile, xformsBC>(*lv, *this));
// dialogs not yet MVCd
ui/libqt2ui.la \
moc/libqt2moc.la \
ui/moc/libqt2uimoc.la \
- ../controllers/ButtonControllerBase.lo \
../xforms/combox.lo \
../xforms/Alert_pimpl.lo \
../xforms/Color.lo \
../xforms/FormBase.lo \
../xforms/FormBaseDeprecated.lo \
../xforms/FormBrowser.lo \
- ../xforms/FormFloat.lo \
../xforms/FormMathsBitmap.lo \
../xforms/FormMathsDeco.lo \
../xforms/FormMathsDelim.lo \
../xforms/bmtable.lo \
../xforms/form_browser.lo \
../xforms/form_document.lo \
- ../xforms/form_float.lo \
../xforms/form_preferences.lo \
../xforms/form_tabular.lo \
../xforms/form_maths_deco.lo \
../xforms/xformsBC.lo \
../xforms/xforms_helpers.lo \
@LYX_LIBS@ @FRONTEND_LDFLAGS@ @FRONTEND_LIBS@
-
+
LIBS=
#LDFLAGS= $(libqt2_la_OBJADD)
ETAGS_ARGS = --lang=c++
QBibtex \
QCharacter \
QCitation \
- QDocument \
QError \
QERT \
QExternal \
+ QFloat \
QGraphics \
QInclude \
QIndex \
QLog \
QMinipage \
- QParagraph \
QPreamble \
QPrint \
QRef \
QCharacter.C QCharacterDialog.C \
QCitation.h QCitationDialog.h \
QCitation.C QCitationDialog.C \
- QDocument.h QDocumentDialog.h \
- QDocument.C QDocumentDialog.C \
QError.h QErrorDialog.h \
QError.C QErrorDialog.C \
QERT.h QERTDialog.h \
QERT.C QERTDialog.C \
QExternal.h QExternalDialog.h \
QExternal.C QExternalDialog.C \
+ QFloat.h QFloatDialog.h \
+ QFloat.C QFloatDialog.C \
QGraphics.h QGraphicsDialog.h \
QGraphics.C QGraphicsDialog.C \
QInclude.h QIncludeDialog.h \
QLog.C QLogDialog.C \
QMinipage.h QMinipageDialog.h \
QMinipage.C QMinipageDialog.C \
- QParagraph.h QParagraphDialog.h \
- QParagraph.C QParagraphDialog.C \
QPreamble.h QPreambleDialog.h \
QPreamble.C QPreambleDialog.C \
QPrint.h QPrintDialog.h \
QBibtexDialog_moc.C \
QCharacterDialog_moc.C \
QCitationDialog_moc.C \
- QDocumentDialog_moc.C \
QErrorDialog_moc.C \
QERTDialog_moc.C \
QExternalDialog_moc.C \
+ QFloatDialog_moc.C \
QGraphicsDialog_moc.C \
QIncludeDialog_moc.C \
QIndexDialog_moc.C \
QLogDialog_moc.C \
QMinipageDialog_moc.C \
- QParagraphDialog_moc.C \
QPreambleDialog_moc.C \
QPrintDialog_moc.C \
QRefDialog_moc.C \
QCharacterDialogBase.C \
QCitationDialogBase.h \
QCitationDialogBase.C \
- QDocumentDialogBase.h \
- QDocumentDialogBase.C \
QErrorDialogBase.C \
QErrorDialogBase.h \
QERTDialogBase.C \
QERTDialogBase.h \
QExternalDialogBase.C \
QExternalDialogBase.h \
+ QFloatDialogBase.C \
+ QFloatDialogBase.h \
QGraphicsDialogBase.C \
QGraphicsDialogBase.h \
QIncludeDialogBase.h \
QLogDialogBase.C \
QMinipageDialogBase.h \
QMinipageDialogBase.C \
- QParagraphDialogBase.h \
- QParagraphDialogBase.C \
QPreambleDialogBase.h \
QPreambleDialogBase.C \
QPrintDialogBase.h \
QBibtexDialogBase_moc.C \
QCharacterDialogBase_moc.C \
QCitationDialogBase_moc.C \
- QDocumentDialogBase_moc.C \
QErrorDialogBase_moc.C \
QERTDialogBase_moc.C \
QExternalDialogBase_moc.C \
+ QFloatDialogBase_moc.C \
QGraphicsDialogBase_moc.C \
QIncludeDialogBase_moc.C \
QIndexDialogBase_moc.C \
QLogDialogBase_moc.C \
QMinipageDialogBase_moc.C \
- QParagraphDialogBase_moc.C \
QPreambleDialogBase_moc.C \
QPrintDialogBase_moc.C \
QRefDialogBase_moc.C \
+
+
--- /dev/null
+/**
+ * \file QFloat.C
+ * Copyright 2002 the LyX Team
+ * Read the file COPYING
+ *
+ * \author Edwin Leuven <leuven@fee.uva.nl>
+ */
+
+#include <config.h>
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include "ControlFloat.h"
+#include "QFloatDialog.h"
+#include "QFloat.h"
+#include "Qt2BC.h"
+#include "gettext.h"
+#include "helper_funcs.h"
+
+#include "support/lstrings.h"
+
+#include <qradiobutton.h>
+#include <qpushbutton.h>
+#include <qcheckbox.h>
+
+typedef Qt2CB<ControlFloat, Qt2DB<QFloatDialog> > base_class;
+
+QFloat::QFloat(ControlFloat & c)
+ : base_class(c, _("LaTeX Information"))
+{
+}
+
+
+void QFloat::build_dialog()
+{
+ dialog_.reset(new QFloatDialog(this));
+
+ bc().setCancel(dialog_->closePB);
+ bc().setApply(dialog_->applyPB);
+ bc().setOK(dialog_->okPB);
+ bc().setRestore(dialog_->restorePB);
+}
+
+
+void QFloat::update_contents()
+{
+ bool top = false;
+ bool bottom = false;
+ bool page = false;
+ bool here = false;
+ bool forcehere = false;
+
+ string placement(controller().params().placement);
+
+ if (contains(placement, "H")) {
+ forcehere = true;
+ } else {
+ if (contains(placement, "t")) {
+ top = true;
+ }
+ if (contains(placement, "b")) {
+ bottom = true;
+ }
+ if (contains(placement, "p")) {
+ page = true;
+ }
+ if (contains(placement, "h")) {
+ here = true;
+ }
+ }
+
+ dialog_->top->setChecked(top);
+ dialog_->bottom->setChecked(bottom);
+ dialog_->page->setChecked(page);
+ dialog_->here->setChecked(here);
+ dialog_->forcehere->setChecked(forcehere);
+}
+
+void QFloat::apply()
+{
+ string placement;
+
+ if (dialog_->forcehere->isChecked()) {
+ placement += "H";
+ } else {
+ if (dialog_->top->isChecked()) {
+ placement += "t";
+ }
+ if (dialog_->bottom->isChecked()) {
+ placement += "b";
+ }
+ if (dialog_->page->isChecked()) {
+ placement += "p";
+ }
+ if (dialog_->here->isChecked()) {
+ placement += "h";
+ }
+ }
+ controller().params().placement = placement;
+}
--- /dev/null
+// -*- C++ -*-
+/**
+ * \file QFloat.h
+ * Copyright 2002 the LyX Team
+ * Read the file COPYING
+ *
+ * \author Edwin Leuven <leuven@fee.uva.nl>
+ */
+
+#ifndef QFLOAT_H
+#define QFLOAT_H
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+#include "Qt2Base.h"
+
+class ControlFloat;
+class QFloatDialog;
+
+///
+class QFloat
+ : public Qt2CB<ControlFloat, Qt2DB<QFloatDialog> >
+{
+public:
+ ///
+ friend class QFloatDialog;
+ ///
+ QFloat(ControlFloat &);
+private:
+ /// Apply changes
+ virtual void apply();
+ /// update
+ virtual void update_contents();
+ /// build the dialog
+ virtual void build_dialog();
+};
+
+#endif // QFLOAT_H
+
+
+
+
--- /dev/null
+/**
+ * \file QFloatDialog.C
+ * Copyright 2002 the LyX Team
+ * Read the file COPYING
+ *
+ * \author Edwin Leuven <leuven@fee.uva.nl>
+ */
+
+#include <config.h>
+
+#include <qpushbutton.h>
+
+#include "LString.h"
+
+#include "ControlFloat.h"
+#include "QFloatDialog.h"
+#include "Dialogs.h"
+#include "QFloat.h"
+
+QFloatDialog::QFloatDialog(QFloat * form)
+ : QFloatDialogBase(0, 0, false, 0),
+ form_(form)
+{
+ connect(restorePB, SIGNAL(clicked()),
+ form, SLOT(slotRestore()));
+ connect(okPB, SIGNAL(clicked()),
+ form, SLOT(slotOK()));
+ connect(applyPB, SIGNAL(clicked()),
+ form, SLOT(slotApply()));
+ connect(closePB, SIGNAL(clicked()),
+ form, SLOT(slotClose()));
+}
+
+
+void QFloatDialog::change_adaptor()
+{
+ form_->changed();
+}
+
+
+void QFloatDialog::closeEvent(QCloseEvent * e)
+{
+ form_->slotWMHide();
+ e->accept();
+}
+
--- /dev/null
+/**
+ * \file QFloatDialog.h
+ * Copyright 2002 the LyX Team
+ * Read the file COPYING
+ *
+ * \author Edwin Leuven <leuven@fee.uva.nl>
+ */
+
+#ifndef QFLOATDIALOG_H
+#define QFLOATDIALOG_H
+
+#include <config.h>
+
+#include "ui/QFloatDialogBase.h"
+
+class QFloat;
+
+class QFloatDialog : public QFloatDialogBase
+{ Q_OBJECT
+
+public:
+ QFloatDialog(QFloat * form);
+
+protected slots:
+ virtual void change_adaptor();
+
+protected:
+ virtual void closeEvent(QCloseEvent * e);
+
+private:
+ QFloat * form_;
+};
+
+#endif // QFLOATDIALOG_H
+
+
+
bc().setCancel(dialog_->closePB);
}
-
+
void QTexinfo::updateStyles(ControlTexinfo::texFileSuffix whichStyle)
{
bool const withFullPath = dialog_->path->isChecked();
activeStyle = whichStyle;
}
+
void QTexinfo::updateStyles()
{
updateStyles(activeStyle);
--- /dev/null
+<!DOCTYPE UI><UI>
+<class>QFloatDialogBase</class>
+<include location="global">config.h</include>
+<include location="local">gettext.h</include>
+<widget>
+ <class>QDialog</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>QFloatDialogBase</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>369</width>
+ <height>169</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>caption</name>
+ <string>Form1</string>
+ </property>
+ <grid>
+ <property stdset="1">
+ <name>margin</name>
+ <number>11</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget row="2" column="0" >
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout1</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>restorePB</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&Restore</string>
+ </property>
+ </widget>
+ <spacer>
+ <property>
+ <name>name</name>
+ <cstring>Spacer1</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Horizontal</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>okPB</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&OK</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>applyPB</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&Apply</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>closePB</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&Close</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget row="0" column="0" >
+ <class>QGroupBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>placement</cstring>
+ </property>
+ <property stdset="1">
+ <name>title</name>
+ <string>Placement</string>
+ </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>QRadioButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>bottom</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Bottom of the page</string>
+ </property>
+ </widget>
+ <widget row="0" column="0" >
+ <class>QRadioButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>top</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Top of the page</string>
+ </property>
+ </widget>
+ <widget row="0" column="1" >
+ <class>QRadioButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>page</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Page of floats</string>
+ </property>
+ </widget>
+ <widget row="1" column="1" >
+ <class>QRadioButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>here</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Here, if possible</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget row="1" column="0" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>forcehere</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Here, definitely</string>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>forcehere</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>placement</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>top</tabstop>
+ <tabstop>bottom</tabstop>
+ <tabstop>page</tabstop>
+ <tabstop>here</tabstop>
+ <tabstop>forcehere</tabstop>
+ <tabstop>restorePB</tabstop>
+ <tabstop>okPB</tabstop>
+ <tabstop>applyPB</tabstop>
+ <tabstop>closePB</tabstop>
+</tabstops>
+</UI>