]> git.lyx.org Git - features.git/commit
I have continued a bit on my track to do a real model view separation for the Citatio...
authorAbdelrazak Younes <younes@lyx.org>
Tue, 11 Apr 2006 08:26:43 +0000 (08:26 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 11 Apr 2006 08:26:43 +0000 (08:26 +0000)
commit31d7f2ed30f036eaefc096b585e24d2af1bdcae7
tree97f1d17a1998ab0157d49f02cd26f7572695f49a
parentcc0a9f811cc658bb7b1c498ff94fde64872eac38
I have continued a bit on my track to do a real model view separation for the Citation Dialog. In this new scheme, QCitation is the controller and the model at the same time, it inherits ControlCitation and it doesn't know about the view. QCitationDialog is the view, it is using QCitation to get its model and for communication with the core; it is inheriting Dialog::View directly.

In frontend/qt4/Dialog.C, we use these class like this:

    } else if (name == "citation") {
        QCitation * ci = new QCitation(*dialog);
        dialog->setController(ci);
        dialog->setView(new QCitationDialog(*dialog, ci));
        dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);

Now, it should be possible to define another view like this:

    } else if (name == "citation-inline") {
        QCitation * ci = new QCitation(*dialog);
        dialog->setController(ci);
        dialog->setView(new QCitationInline(*dialog, ci));

All the citation functionalities are not there yet but the basic ones are there. There are still a few "intelligence" still to be transfered from the view to the dialog.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13635 a592a061-630c-0410-9148-cb99ea01b6c8
src/frontends/qt4/Dialogs.C
src/frontends/qt4/QCitation.C
src/frontends/qt4/QCitation.h
src/frontends/qt4/QCitationDialog.C
src/frontends/qt4/QCitationDialog.h