- 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));

File diff suppressed because it is too large Load Diff

View File

@ -6,88 +6,111 @@
* *
* 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();
// ///
// virtual QDialog* form() const;
///
bool CheckDocumentInput(QWidget* ob, long);
///
void ChoiceBulletSize(QWidget* ob, long);
///
void InputBulletLaTeX(QWidget* ob, long);
///
void BulletDepth(QWidget* ob, State);
///
void BulletPanel(QWidget* ob, State);
///
void BulletBMTable(QWidget* ob, long);
///
void checkMarginValues(); void checkMarginValues();
/// ///
void checkReadOnly(); void checkReadOnly();
/// ///
void CheckChoiceClass(QWidget* ob, long);
///
void UpdateLayoutDocument(BufferParams const & params); void UpdateLayoutDocument(BufferParams const & params);
public:
///
void checkChoiceClass(QComboBox* cb);
// ///
bool checkDocumentInput(QWidget* w);
// ///
void bulletDepth( int );
///
void choiceBulletSize();
// ///
void inputBulletLaTeX();
// ///
void setBulletPics();
// ///
void bulletBMTable( int );
/// Update the popup.
void update();
/// ///
void paper_update(BufferParams const &); void paper_update(BufferParams const &);
/// ///
@ -98,8 +121,7 @@ public:
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(); void paper_apply();
/// ///
@ -110,56 +132,45 @@ public:
bool options_apply(); bool options_apply();
/// ///
void bullets_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 /// Fdesign generated methods
// FD_form_tabbed_document * build_tabbed_document(); QDialog* build_tabbed_document();
// ///
// FD_form_doc_paper * build_doc_paper();
// ///
// FD_form_doc_class * build_doc_class();
// ///
// FD_form_doc_language * build_doc_language();
// ///
// FD_form_doc_options * build_doc_options();
// ///
// FD_form_doc_bullet * build_doc_bullet();
// /// Real GUI implementation.
FormDocumentDialog* dialog_;
/// Which LyXView do we belong to?
LyXView * lv_;
/// ///
Dialogs * d_; QDialog* build_doc_paper();
/// Update connection. ///
Connection u_; QDialog* build_doc_class();
/// Hide connection. ///
Connection h_; QDialog* build_doc_language();
/// has form contents changed? Used to control OK/Apply ///
EnumPopupStatus status; QDialog* build_doc_options();
///
QDialog* build_doc_bullet();
/// Real GUI implementation.
boost::scoped_ptr<FormDocumentDialogImpl> dialog_;
/// ///
int ActCell; int ActCell;
/// ///
int Confirmed; int Confirmed;
/// ///
int currentBulletPanel; int current_bullet_panel;
/// ///
int currentBulletDepth; int current_bullet_depth;
/// // ///
// FL_OBJECT * fbullet;
QPixmap* standardpix; // ///
QPixmap* amssymbpix; // boost::scoped_ptr<Combox> combo_language;
QPixmap* psnfss1pix; // ///
QPixmap* psnfss2pix; // boost::scoped_ptr<Combox> combo_doc_class;
QPixmap* psnfss3pix; /// The ButtonController
QPixmap* psnfss4pix; ButtonController<NoRepeatedApplyReadOnlyPolicy, qt2BC> bc_;
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

@ -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

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