Commit Graph

4 Commits

Author SHA1 Message Date
Abdelrazak Younes
31d7f2ed30 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
2006-04-11 08:26:43 +00:00
Lars Gullik Bjønnes
3b9338a3a8 Whitespace cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13565 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-05 23:56:29 +00:00
Abdelrazak Younes
2f415cfbb1 This new citation dialog follows a new design similar to lyx-1.3:
- two panes for Selected/Available keys
- find as you search (Regular expression are supported)
- advanced search button

There are a lot of work still:
- selected citations are not inserted in the document
- find does not select the found key
- the graying/un-graying of buttons does not work properly
- the Advanced Search Dialog (which will search inside the citation) is not done yet
- ...
But the good news is that I have used the Model/View separation of Qt4. QCitation contains the list models and QCitationDialog contains the list views. The idea would be to reuse the model for a new dialog, I am thinking of a simple combo box placed on the toolbar which insert citations with default style, etc. Or a context menu insert->citation...



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13496 a592a061-630c-0410-9148-cb99ea01b6c8
2006-03-25 21:26:09 +00:00
Lars Gullik Bjønnes
12e5a52b92 Added initial qt4 work by Abdelrazak Younes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13294 a592a061-630c-0410-9148-cb99ea01b6c8
2006-03-05 17:24:44 +00:00