- Compiles and links again

- Renamed document dialog to new naming scheme, but do not compile and link
  it yet, pending conversion of document form to MVC by Angus


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1855 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Kalle Dalheimer 2001-03-29 15:02:19 +00:00
parent 6cc6ff3866
commit 41719bdb8a
9 changed files with 1549 additions and 1542 deletions

View File

@ -43,6 +43,7 @@
#include "BufferView.h" #include "BufferView.h"
#include "controllers/ControlCopyright.h" #include "controllers/ControlCopyright.h"
#include "GUI.h"
#include "qt2BC.h" #include "qt2BC.h"
@ -75,7 +76,8 @@ Dialogs::Dialogs(LyXView * lv)
// REMOVED THIS UNTIL CHANGED TO NEW SCHEME -- Kalle, 2001-03-23 // REMOVED THIS UNTIL CHANGED TO NEW SCHEME -- Kalle, 2001-03-23
// add(new FormError(lv, this)); // add(new FormError(lv, this));
add(new FormGraphics(lv, this)); // REMOVED THIS UNTIL CHANGED TO NEW SCHEME -- Kalle, 2001-03-28
// add(new FormGraphics(lv, this));
// add(new FormIndex(lv, this)); // add(new FormIndex(lv, this));
add(new FormParagraph(lv, this)); add(new FormParagraph(lv, this));
add(new FormPreferences(lv, this)); add(new FormPreferences(lv, this));
@ -86,7 +88,7 @@ Dialogs::Dialogs(LyXView * lv)
add(new FormTabularCreate(lv, this)); add(new FormTabularCreate(lv, this));
// add(new FormToc(lv, this)); // add(new FormToc(lv, this));
// add(new FormUrl(lv, this)); // add(new FormUrl(lv, this));
// reduce the number of connections needed in // reduce the number of connections needed in
// dialogs by a simple connection here. // dialogs by a simple connection here.
hideAll.connect(hideBufferDependent.slot()); hideAll.connect(hideBufferDependent.slot());

File diff suppressed because it is too large Load Diff

View File

@ -1,165 +1,176 @@
// -*- C++ -*- // -*- C++ -*-
/* This file is part of /* This file is part of
* ====================================================== * ======================================================
* *
* LyX, The Document Processor * LyX, The Document Processor
* *
* Copyright (C) 2000 The LyX Team. * Copyright (C) 2000 The LyX Team.
* *
* @author Jürgen Vigna, Kalle Dalheimer * @author Kalle Dalheimer
* *
*======================================================*/ *======================================================*/
#ifndef FORM_DOCUMENT_H #ifndef FORM_DOCUMENT_H
#define FORM_DOCUMENT_H #define FORM_DOCUMENT_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "FormBase.h"
#include <vector> #include <vector>
#include <boost/smart_ptr.hpp>
#include "Qt2Base.h"
#include "qt2BC.h"
#undef emit
#ifdef __GNUG_ #ifdef __GNUG_
#pragma interface #pragma interface
#endif #endif
class ControlDocument;
class FormDocumentDialogImpl;
class BufferParams;
class LyXView; class LyXView;
class Dialogs; class Dialogs;
class Combox;
class BufferParams;
class QWidget;
class FormDocumentDialog;
#ifdef SIGC_CXX_NAMESPACES
using SigC::Connection;
#endif
class QComboBox;
#include <qpixmap.h>
/** This class provides an Qt2 implementation of the FormDocument Popup. /** This class provides an Qt2 implementation of the FormDocument Popup.
The table-layout-form here changes values for latex-tabulars The table-layout-form here changes values for latex-tabulars
@author Kalle Dalheimer
*/ */
class FormDocument : public DialogBase { class FormDocument
: public Qt2CB<ControlDocument, Qt2DB<FormDocumentDialogImpl> >
{
public: public:
/// #FormDocument x(Communicator ..., Popups ...);# /// #FormDocument x(Communicator ..., Popups ...);#
FormDocument(LyXView *, Dialogs *); FormDocument(LyXView *, Dialogs *);
///
~FormDocument();
///
enum EnumPopupStatus {
///
POPUP_UNMODIFIED,
///
POPUP_MODIFIED,
///
POPUP_READONLY
};
private: private:
/// Show the dialog. ///
void show(); enum State {
/// Hide the dialog. ///
void hide(); INPUT,
///
CHECKCHOICECLASS,
///
CHOICEBULLETSIZE,
///
INPUTBULLETLATEX,
///
BULLETDEPTH1,
///
BULLETDEPTH2,
///
BULLETDEPTH3,
///
BULLETDEPTH4,
///
BULLETPANEL1,
///
BULLETPANEL2,
///
BULLETPANEL3,
///
BULLETPANEL4,
///
BULLETPANEL5,
///
BULLETPANEL6,
///
BULLETBMTABLE
};
/// Pointer to the actual instantiation of the ButtonController.
virtual qt2BC & bc();
/// Build the dialog
virtual void build();
// /// Filter the inputs
// virtual bool input( FL_OBJECT *, long );
/// Update the popup.
virtual void update();
/// Apply from popup
virtual void apply();
/// Cancel from popup
virtual void cancel();
void checkMarginValues(); // ///
/// // virtual QDialog* form() const;
void checkReadOnly();
///
void UpdateLayoutDocument(BufferParams const & params);
public: ///
/// bool CheckDocumentInput(QWidget* ob, long);
void checkChoiceClass(QComboBox* cb); ///
// /// void ChoiceBulletSize(QWidget* ob, long);
bool checkDocumentInput(QWidget* w); ///
// /// void InputBulletLaTeX(QWidget* ob, long);
void bulletDepth( int ); ///
/// void BulletDepth(QWidget* ob, State);
void choiceBulletSize(); ///
// /// void BulletPanel(QWidget* ob, State);
void inputBulletLaTeX(); ///
// /// void BulletBMTable(QWidget* ob, long);
void setBulletPics(); ///
// /// void checkMarginValues();
void bulletBMTable( int ); ///
void checkReadOnly();
///
void CheckChoiceClass(QWidget* ob, long);
///
void UpdateLayoutDocument(BufferParams const & params);
/// Update the popup. ///
void update(); void paper_update(BufferParams const &);
/// ///
void paper_update(BufferParams const &); void class_update(BufferParams const &);
/// ///
void class_update(BufferParams const &); void language_update(BufferParams const &);
/// ///
void language_update(BufferParams const &); void options_update(BufferParams const &);
/// ///
void options_update(BufferParams const &); void bullets_update(BufferParams const &);
///
void bullets_update(BufferParams const &);
/// Apply from popup
void apply();
///
void paper_apply();
///
bool class_apply();
///
bool language_apply();
///
bool options_apply();
///
void bullets_apply();
/// Cancel from popup
void cancel();
/// Build the popup
void build();
/// Explicitly free the popup.
void free();
// /// Typedefinitions from the fdesign produced Header file ///
// FD_form_tabbed_document * build_tabbed_document(); void paper_apply();
// /// ///
// FD_form_doc_paper * build_doc_paper(); bool class_apply();
// /// ///
// FD_form_doc_class * build_doc_class(); bool language_apply();
// /// ///
// FD_form_doc_language * build_doc_language(); bool options_apply();
// /// ///
// FD_form_doc_options * build_doc_options(); void bullets_apply();
// ///
// FD_form_doc_bullet * build_doc_bullet();
// /// Real GUI implementation. /// Fdesign generated methods
FormDocumentDialog* dialog_; QDialog* build_tabbed_document();
///
QDialog* build_doc_paper();
///
QDialog* build_doc_class();
///
QDialog* build_doc_language();
///
QDialog* build_doc_options();
///
QDialog* build_doc_bullet();
/// Which LyXView do we belong to? /// Real GUI implementation.
LyXView * lv_; boost::scoped_ptr<FormDocumentDialogImpl> dialog_;
/// ///
Dialogs * d_; int ActCell;
/// Update connection. ///
Connection u_; int Confirmed;
/// Hide connection. ///
Connection h_; int current_bullet_panel;
/// has form contents changed? Used to control OK/Apply ///
EnumPopupStatus status; int current_bullet_depth;
/// // ///
int ActCell; // FL_OBJECT * fbullet;
/// // ///
int Confirmed; // boost::scoped_ptr<Combox> combo_language;
/// // ///
int currentBulletPanel; // boost::scoped_ptr<Combox> combo_doc_class;
/// /// The ButtonController
int currentBulletDepth; ButtonController<NoRepeatedApplyReadOnlyPolicy, qt2BC> bc_;
///
QPixmap* standardpix;
QPixmap* amssymbpix;
QPixmap* psnfss1pix;
QPixmap* psnfss2pix;
QPixmap* psnfss3pix;
QPixmap* psnfss4pix;
QPixmap bulletpics[36];
}; };
inline
qt2BC & FormDocument::bc()
{
return bc_;
}
#endif #endif

View File

@ -1,16 +1,16 @@
#ifndef FORMDOCUMENTDIALOG_H #ifndef FORMDOCUMENTDIALOGIMPL_H
#define FORMDOCUMENTDIALOG_H #define FORMDOCUMENTDIALOGIMPL_H
#include "FormDocumentDialogBase.h" #include "FormDocumentDialog.h"
class FormDocument; class FormDocument;
class FormDocumentDialog : public FormDocumentDialogBase class FormDocumentDialogImpl : public FormDocumentDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
FormDocumentDialog( FormDocument* form, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); FormDocumentDialogImpl( FormDocument* form, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~FormDocumentDialog(); ~FormDocumentDialogImpl();
public slots: public slots:
void slotApply(); void slotApply();

View File

@ -39,7 +39,7 @@ libqt2_la_OBJADD = \
../xforms/FormBibitem.lo \ ../xforms/FormBibitem.lo \
../xforms/FormBibtex.lo \ ../xforms/FormBibtex.lo \
../xforms/FormBrowser.lo \ ../xforms/FormBrowser.lo \
../xforms/FormDocument.lo \ ../xforms/FormDocument.lo \
../xforms/FormError.lo \ ../xforms/FormError.lo \
../xforms/FormExternal.lo \ ../xforms/FormExternal.lo \
../xforms/FormGraphics.lo \ ../xforms/FormGraphics.lo \

View File

@ -14,13 +14,13 @@
#ifndef QT2BASE_H #ifndef QT2BASE_H
#define QT2BASE_H #define QT2BASE_H
#include <boost/smart_ptr.hpp>
class QDialog; class QDialog;
#include <qfont.h> #include <qfont.h>
#include <qobject.h> #include <qobject.h>
#include <boost/smart_ptr.hpp>
#ifdef __GNUG__ #ifdef __GNUG__
#pragma interface #pragma interface
#endif #endif
@ -53,19 +53,19 @@ protected:
protected slots: protected slots:
// dialog closed from WM // dialog closed from WM
void slotWMHide(); void slotWMHide();
// Apply button clicked // Apply button clicked
void slotApply(); void slotApply();
// OK button clicked // OK button clicked
void slotOK(); void slotOK();
// Cancel button clicked // Cancel button clicked
void slotCancel(); void slotCancel();
// Restore button clicked // Restore button clicked
void slotRestore(); void slotRestore();
private: private:
/// Pointer to the actual instantiation of xform's form /// Pointer to the actual instantiation of xform's form
virtual QDialog* form() const = 0; virtual QDialog* form() const = 0;

View File

@ -2,9 +2,9 @@ Dialog Maintainer MVC conversion
---------------------------------------------- ----------------------------------------------
Character Edwin Character Edwin
Citation Kalle Citation Kalle
Copyright Kalle In progress Copyright Kalle Done
Credits Credits
Document Kalle Document Kalle In progress
Error Error
File Edwin File Edwin
Graphics Graphics