renaming, fix citation (still no search though)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1903 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2001-04-05 14:41:19 +00:00
parent 5dfa23378b
commit 6b219fc94a
32 changed files with 1407 additions and 365 deletions

View File

@ -1,3 +1,24 @@
2001-04-03 John Levon <moz@compsoc.man.ac.uk>
* Form*.C:
* Dialogs.C: s/UndoAll/Restore/, s/ControlButton/ControlButtons/,
add closeEvents where necessary
* FormCitation.h:
* FormCitation.C:
* citationdlg.C:
* citationdlg.h:
* dlg/citationdlgdata.C:
* dlg/citationdlgdata.h:
* dlg/dialogs/citation.dlg: update to work with MVC properly,
move to qtarch-generated dialog file; still need search dialog
* paradlg.h:
* paradlg.C:
* FormParagraph.C: only include extra code ifndef NO_PEXTRA
* docdlg.C: include language.h
2001-04-02 John Levon <moz@compsoc.man.ac.uk> 2001-04-02 John Levon <moz@compsoc.man.ac.uk>
* Dialogs.C: update for MVC * Dialogs.C: update for MVC

View File

@ -7,9 +7,44 @@
* \author John Levon * \author John Levon
*/ */
// real GUI implementations. Have to go at the top
// because Qt is stupid.
#include "citationdlg.h"
#include "copyrightdlg.h"
#include "indexdlg.h"
#include "logdlg.h"
#include "printdlg.h"
#include "refdlg.h"
#include "tabcreatedlg.h"
//#include "tocdlg.h"
#include "urldlg.h"
#include "vclogdlg.h"
#include <config.h> #include <config.h>
#include FORMS_H_LOCATION #include FORMS_H_LOCATION
#include "QtLyXView.h"
#include "combox.h"
#include "form_bibitem.h"
#include "form_bibtex.h"
#include "form_browser.h"
#include "form_character.h"
#include "form_credits.h"
#include "form_error.h"
#include "form_external.h"
#include "form_graphics.h"
#include "form_include.h"
#include "form_minipage.h"
#include "form_preamble.h"
#include "form_search.h"
#include "form_splash.h"
#include "Dialogs.h"
#include "kdeBC.h"
#include "GUI.h"
// controllers
#include "ControlBibitem.h" #include "ControlBibitem.h"
#include "ControlBibtex.h" #include "ControlBibtex.h"
#include "ControlCharacter.h" #include "ControlCharacter.h"
@ -32,15 +67,7 @@
#include "ControlUrl.h" #include "ControlUrl.h"
#include "ControlVCLog.h" #include "ControlVCLog.h"
#include "Dialogs.h" // dialogs
#include "kdeBC.h"
#include "GUI.h"
// FIXME: how horrendous. It would help a little if we
// could rename ControlButton not to clash with stupid Qt ... Angus ?
#include "FormBibitem.h" #include "FormBibitem.h"
#include "FormBibtex.h" #include "FormBibtex.h"
#include "FormCharacter.h" #include "FormCharacter.h"
@ -69,39 +96,6 @@
#include "FormUrl.h" #include "FormUrl.h"
#include "FormVCLog.h" #include "FormVCLog.h"
// we need all these in order to use scoped_ptr. how ugly ...
#include "combox.h"
#include "form_bibitem.h"
#include "form_bibtex.h"
#include "form_browser.h"
#include "form_character.h"
#include "form_credits.h"
#include "form_error.h"
#include "form_external.h"
#include "form_graphics.h"
#include "form_include.h"
#include "form_minipage.h"
#include "form_preamble.h"
#include "form_search.h"
#include "form_splash.h"
// Qt does it again. We can't include the dlg.h files *before*
// anything else because "ControlButton" is an enum value,
// and we can't include them *after* because it #errors on
// a #defined TrueColor ... *sigh*
#undef TrueColor
// FIXME: I don't even know where this one is coming from !
#undef Unsorted
#include "citationdlg.h"
#include "copyrightdlg.h"
#include "indexdlg.h"
#include "logdlg.h"
#include "printdlg.h"
#include "refdlg.h"
#include "tabcreatedlg.h"
//#include "tocdlg.h"
#include "urldlg.h"
#include "vclogdlg.h"
#ifdef __GNUG__ #ifdef __GNUG__
#pragma implementation #pragma implementation
@ -136,13 +130,13 @@ Dialogs::Dialogs(LyXView * lv)
add(new GUITabularCreate<FormTabularCreate, kdeBC>(*lv, *this)); add(new GUITabularCreate<FormTabularCreate, kdeBC>(*lv, *this));
add(new GUIUrl<FormUrl, kdeBC>(*lv, *this)); add(new GUIUrl<FormUrl, kdeBC>(*lv, *this));
add(new GUIVCLog<FormVCLog, kdeBC>(*lv, *this)); add(new GUIVCLog<FormVCLog, kdeBC>(*lv, *this));
//add(new GUIToc<FormToc, kdeBC>(*lv, *this));
add(new FormDocument(lv, this)); add(new FormDocument(lv, this));
add(new FormMathsPanel(lv, this)); add(new FormMathsPanel(lv, this));
add(new FormParagraph(lv, this)); add(new FormParagraph(lv, this));
add(new FormPreferences(lv, this)); add(new FormPreferences(lv, this));
add(new FormTabular(lv, this)); add(new FormTabular(lv, this));
//add(new FormToc(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.

View File

@ -15,6 +15,7 @@
#include "ControlCitation.h" #include "ControlCitation.h"
#include "citationdlg.h" #include "citationdlg.h"
#include "gettext.h" #include "gettext.h"
#include "biblio.h"
#include "support/lstrings.h" #include "support/lstrings.h"
#include "helper_funcs.h" #include "helper_funcs.h"
@ -33,7 +34,7 @@ void FormCitation::apply()
{ {
controller().params().setCmdName("cite"); controller().params().setCmdName("cite");
controller().params().setContents(getStringFromVector(chosenkeys)); controller().params().setContents(getStringFromVector(chosenkeys));
controller().params().setOptions(dialog_->after->text()); controller().params().setOptions(dialog_->line_after->text());
} }
@ -49,33 +50,29 @@ void FormCitation::hide()
void FormCitation::build() void FormCitation::build()
{ {
dialog_.reset(new CitationDialog(this, 0, "Citation", false)); dialog_.reset(new CitationDialog(this, 0, _("Citation")));
// FIXME: apply, restore buttons
// Manage the ok, apply, restore and cancel/close buttons // Manage the ok, apply, restore and cancel/close buttons
bc().setOK(dialog_->buttonOk); bc().setOK(dialog_->button_ok);
//bc().setApply(dialog_->buttonApply); bc().setApply(dialog_->button_apply);
bc().setCancel(dialog_->buttonCancel); bc().setRestore(dialog_->button_restore);
//bc().setUndoAll(dialog_->buttonRestore); bc().setCancel(dialog_->button_cancel);
bc().addReadOnly(dialog_->keys); bc().addReadOnly(dialog_->list_available);
bc().addReadOnly(dialog_->chosen); bc().addReadOnly(dialog_->list_chosen);
bc().addReadOnly(dialog_->after); bc().addReadOnly(dialog_->line_after);
bc().addReadOnly(dialog_->add); bc().addReadOnly(dialog_->button_add);
bc().addReadOnly(dialog_->remove); bc().addReadOnly(dialog_->button_remove);
bc().addReadOnly(dialog_->up); bc().addReadOnly(dialog_->button_up);
bc().addReadOnly(dialog_->down); bc().addReadOnly(dialog_->button_down);
// FIXME: when implemented, add these
//bc().addReadOnly(dialog_->style); //bc().addReadOnly(dialog_->style);
//bc().addReadOnly(dialog_->before);
} }
void FormCitation::update() void FormCitation::update()
{ {
/* FIXME keys = biblio::getKeys(controller().bibkeysInfo());
keys = controller().getBibkeys();
updateAvailableList(); updateAvailableList();
selectedKey.erase(); selectedKey.erase();
@ -83,55 +80,37 @@ void FormCitation::update()
updateChosenList(); updateChosenList();
selectedChosenKey.erase(); selectedChosenKey.erase();
dialog_->entry->setText(""); dialog_->line_details->setText("");
dialog_->after->setText(controller().params().getOptions().c_str()); dialog_->line_after->setText(controller().params().getOptions().c_str());
updateButtons(); if (!controller().isReadonly())
updateButtons();
if (controller().isReadonly()) {
dialog_->keys->setFocusPolicy(QWidget::NoFocus);
dialog_->chosen->setFocusPolicy(QWidget::NoFocus);
dialog_->after->setFocusPolicy(QWidget::NoFocus);
} else {
dialog_->keys->setFocusPolicy(QWidget::StrongFocus);
dialog_->chosen->setFocusPolicy(QWidget::StrongFocus);
dialog_->after->setFocusPolicy(QWidget::StrongFocus);
}
*/
} }
void FormCitation::updateButtons() void FormCitation::updateButtons()
{ {
if (controller().isReadonly()) {
dialog_->add->setEnabled(false);
dialog_->remove->setEnabled(false);
dialog_->up->setEnabled(false);
dialog_->down->setEnabled(false);
return;
}
bool ischosenkey = !selectedChosenKey.empty(); bool ischosenkey = !selectedChosenKey.empty();
vector<string>::const_iterator iter = vector<string>::const_iterator iter =
find(chosenkeys.begin(), chosenkeys.end(), selectedKey); find(chosenkeys.begin(), chosenkeys.end(), selectedKey);
dialog_->add->setEnabled(!selectedKey.empty() && iter == chosenkeys.end()); dialog_->button_add->setEnabled(!selectedKey.empty() && iter == chosenkeys.end());
dialog_->remove->setEnabled(ischosenkey); dialog_->button_remove->setEnabled(ischosenkey);
dialog_->up->setEnabled(ischosenkey); dialog_->button_up->setEnabled(ischosenkey);
dialog_->down->setEnabled(ischosenkey); dialog_->button_down->setEnabled(ischosenkey);
} }
void FormCitation::updateChosenList() void FormCitation::updateChosenList()
{ {
updateList(dialog_->chosen, chosenkeys); updateList(dialog_->list_chosen, chosenkeys);
} }
void FormCitation::updateAvailableList() void FormCitation::updateAvailableList()
{ {
updateList(dialog_->keys, keys); updateList(dialog_->list_available, keys);
} }
@ -142,7 +121,8 @@ void FormCitation::updateList(QListBox * lb, vector<string> const & keys)
for (vector<string>::const_iterator iter = keys.begin(); for (vector<string>::const_iterator iter = keys.begin();
iter != keys.end(); ++iter) { iter != keys.end(); ++iter) {
lb->insertItem(iter->c_str()); if (!iter->empty())
lb->insertItem(iter->c_str());
} }
lb->setAutoUpdate(true); lb->setAutoUpdate(true);
lb->update(); lb->update();
@ -151,10 +131,10 @@ void FormCitation::updateList(QListBox * lb, vector<string> const & keys)
void FormCitation::selectChosen() void FormCitation::selectChosen()
{ {
for (unsigned int i=0; i < dialog_->chosen->count(); ++i) { for (unsigned int i=0; i < dialog_->list_chosen->count(); ++i) {
if (dialog_->chosen->text(i)==selectedChosenKey) { if (dialog_->list_chosen->text(i)==selectedChosenKey) {
dialog_->chosen->setSelected(i,true); dialog_->list_chosen->setSelected(i,true);
dialog_->chosen->setTopItem(i); dialog_->list_chosen->setTopItem(i);
break; break;
} }
} }
@ -277,20 +257,19 @@ ButtonPolicy::SMInput FormCitation::select_key(char const * key)
void FormCitation::highlight_key(char const * key) void FormCitation::highlight_key(char const * key)
{ {
highlight(key, dialog_->chosen, selectedKey, selectedChosenKey); highlight(key, dialog_->list_chosen, selectedKey, selectedChosenKey);
} }
void FormCitation::highlight_chosen(char const * key) void FormCitation::highlight_chosen(char const * key)
{ {
highlight(key, dialog_->keys, selectedChosenKey, selectedKey); highlight(key, dialog_->list_available, selectedChosenKey, selectedKey);
} }
void FormCitation::highlight(char const * key, QListBox * lb, void FormCitation::highlight(char const * key, QListBox * lb,
string & selected1, string & selected2) string & selected1, string & selected2)
{ {
/*
selected1.erase(); selected1.erase();
selected1 = key; selected1 = key;
@ -298,8 +277,8 @@ void FormCitation::highlight(char const * key, QListBox * lb,
for (i=0; i < keys.size(); ++i) { for (i=0; i < keys.size(); ++i) {
if (keys[i] == key) { if (keys[i] == key) {
string const tmp = controller().getBibkeyInfo(key); string const tmp = biblio::getInfo(controller().bibkeysInfo(), key);
dialog_->entry->setText(tmp.c_str()); dialog_->line_details->setText(tmp.c_str());
lb->clearFocus(); lb->clearFocus();
lb->clearSelection(); lb->clearSelection();
selected2.erase(); selected2.erase();
@ -308,8 +287,7 @@ void FormCitation::highlight(char const * key, QListBox * lb,
} }
if (i == keys.size()) if (i == keys.size())
dialog_->entry->setText(_("Key not found.")); dialog_->line_details->setText(_("Key not found."));
updateButtons(); updateButtons();
*/
} }

View File

@ -26,7 +26,7 @@ void FormIndex::build()
// FIXME // FIXME
//bc().setUndoAll(dialog_->buttonRestore); //bc().setRestore(dialog_->buttonRestore);
bc().setOK(dialog_->button_ok); bc().setOK(dialog_->button_ok);
//bc().setApply(dialog_->buttonApply); //bc().setApply(dialog_->buttonApply);
bc().setCancel(dialog_->button_cancel); bc().setCancel(dialog_->button_cancel);

View File

@ -107,6 +107,7 @@ void FormParagraph::update(bool switched)
physpar->params.spaceTop().keep(), physpar->params.spaceTop().keep(),
physpar->params.spaceBottom().keep()); physpar->params.spaceBottom().keep());
#ifndef NO_PEXTRA
// now the extras page // now the extras page
LyXLength extrawidth; LyXLength extrawidth;
@ -127,6 +128,7 @@ void FormParagraph::update(bool switched)
par->params.pextraStartMinipage(), par->params.pextraStartMinipage(),
static_cast<LyXParagraph::PEXTRA_TYPE> static_cast<LyXParagraph::PEXTRA_TYPE>
(par->params.pextraType())); (par->params.pextraType()));
#endif // NO_PEXTRA
} }
@ -162,6 +164,7 @@ void FormParagraph::apply()
spaceabove, spacebelow, dialog_->getAlign(), spaceabove, spacebelow, dialog_->getAlign(),
dialog_->getLabelWidth(), dialog_->getNoIndent()); dialog_->getLabelWidth(), dialog_->getNoIndent());
#ifndef NO_PEXTRA
// extra stuff // extra stuff
string width(""); string width("");
@ -176,13 +179,12 @@ void FormParagraph::apply()
lyxerr[Debug::GUI] << "Setting extrawidth \"" << width << "\"" << endl; lyxerr[Debug::GUI] << "Setting extrawidth \"" << width << "\"" << endl;
lyxerr[Debug::GUI] << "Setting percent extrawidth \"" << widthp << "\"" << endl; lyxerr[Debug::GUI] << "Setting percent extrawidth \"" << widthp << "\"" << endl;
/* FIXME
lv_->view()->text->SetParagraphExtraOpt(lv_->view(), lv_->view()->text->SetParagraphExtraOpt(lv_->view(),
dialog_->getExtraType(), width, widthp, dialog_->getExtraType(), width, widthp,
dialog_->getExtraAlign(), dialog_->getExtraAlign(),
dialog_->getHfillBetween(), dialog_->getHfillBetween(),
dialog_->getStartNewMinipage()); dialog_->getStartNewMinipage());
*/ #endif // NO_PEXTRA
lv_->view()->update(lv_->view()->text, lv_->view()->update(lv_->view()->text,
BufferView::SELECT | BufferView::SELECT |

View File

@ -31,7 +31,7 @@ void FormRef::build()
{ {
dialog_.reset(new RefDialog(this, 0, _("LyX: Cross Reference"), false)); dialog_.reset(new RefDialog(this, 0, _("LyX: Cross Reference"), false));
//bc().setUndoAll(dialog_->buttonRestore); //bc().setRestore(dialog_->buttonRestore);
bc().setOK(dialog_->buttonOk); bc().setOK(dialog_->buttonOk);
//bc().setApply(dialog_->buttonApply); //bc().setApply(dialog_->buttonApply);
bc().setCancel(dialog_->buttonCancel); bc().setCancel(dialog_->buttonCancel);

View File

@ -14,16 +14,15 @@
#include "Dialogs.h" #include "Dialogs.h"
#include "KFormBase.h" #include "KFormBase.h"
#include "ControlButton.h" #include "ControlButtons.h"
KFormDialogBase::KFormDialogBase(ControlButton & c) #include <qdialog.h>
KFormDialogBase::KFormDialogBase(ControlButtons & c)
: ViewBC<kdeBC>(c) : ViewBC<kdeBC>(c)
{ {
} }
// this HAS to go here because it has ControlButton as an enum value
#include <qdialog.h>
void KFormDialogBase::show() void KFormDialogBase::show()
{ {

View File

@ -24,7 +24,7 @@ class QWidget;
class KFormDialogBase : public ViewBC<kdeBC> { class KFormDialogBase : public ViewBC<kdeBC> {
public: public:
/// ///
KFormDialogBase(ControlButton & c); KFormDialogBase(ControlButtons & c);
// Functions accessible to the Controller // Functions accessible to the Controller
@ -44,7 +44,7 @@ template <class Controller, class Dialog>
class KFormBase : public KFormDialogBase { class KFormBase : public KFormDialogBase {
public: public:
/// ///
KFormBase(ControlButton & c); KFormBase(ControlButtons & c);
protected: protected:
/// parent controller /// parent controller
@ -58,7 +58,7 @@ protected:
}; };
template <class Controller, class Dialog> template <class Controller, class Dialog>
KFormBase<Controller, Dialog>::KFormBase(ControlButton & c) KFormBase<Controller, Dialog>::KFormBase(ControlButtons & c)
: KFormDialogBase(c) : KFormDialogBase(c)
{ {
} }

View File

@ -7,163 +7,39 @@
*/ */
#include <config.h> #include <config.h>
#include <gettext.h>
#include "FormCitation.h"
#include "citationdlg.h" #include "citationdlg.h"
#include "dlg/helpers.h"
using kde_helpers::setSizeHint; #include <qtooltip.h>
CitationDialog::CitationDialog(FormCitation *form, QWidget *parent, char const * name, bool, WFlags) CitationDialog::CitationDialog(FormCitation * f, QWidget * p, char const * name)
: QDialog(parent,name,0), form_(form) : CitationDialogData(p, name), form_(f)
{ {
setCaption(name); setCaption(name);
setMinimumWidth(500);
// widgets
labelchosen = new QLabel(this);
labelchosen->setText(_("Selected keys"));
setSizeHint(labelchosen);
labelchosen->setMaximumSize(labelchosen->sizeHint());
chosen = new QListBox(this);
labelkeys = new QLabel(this);
labelkeys->setText(_("Available keys"));
setSizeHint(labelkeys);
labelkeys->setMaximumSize(labelkeys->sizeHint());
keys = new QListBox(this);
labelentry = new QLabel(this);
labelentry->setText(_("Reference entry"));
setSizeHint(labelentry);
labelentry->setMaximumSize(labelentry->sizeHint());
after = new QLineEdit(this);
setSizeHint(after);
entry = new QMultiLineEdit(this);
entry->setReadOnly(true);
entry->setFixedVisibleLines(2);
labelafter = new QLabel(this);
labelafter->setText(_("Text after"));
labelafter->setMargin(5);
setSizeHint(labelafter);
labelafter->setMaximumSize(labelafter->sizeHint());
add = new QPushButton(this);
add->setText(_("&Add"));
setSizeHint(add);
add->setMaximumSize(add->sizeHint());
up = new QPushButton(this);
up->setText(_("&Up"));
setSizeHint(up);
up->setMaximumSize(up->sizeHint());
down = new QPushButton(this);
down->setText(_("&Down"));
setSizeHint(down);
down->setMaximumSize(down->sizeHint());
remove = new QPushButton(this);
remove->setText(_("&Remove"));
setSizeHint(remove);
remove->setMaximumSize(remove->sizeHint());
buttonOk = new QPushButton(this);
buttonOk->setText(_("&OK"));
buttonOk->setDefault(true);
setSizeHint(buttonOk);
buttonOk->setMaximumSize(buttonOk->sizeHint());
buttonCancel = new QPushButton(this);
buttonCancel->setText(_("&Cancel"));
setSizeHint(buttonCancel);
buttonCancel->setMaximumSize(buttonCancel->sizeHint());
// tooltips // tooltips
QToolTip::add(chosen,_("Keys currently selected")); QToolTip::add(button_add, _("Add reference to current citation"));
QToolTip::add(keys,_("Reference keys available")); QToolTip::add(button_remove, _("Remove reference from current citation"));
QToolTip::add(entry,_("Reference entry text")); QToolTip::add(button_up, _("Move reference before"));
QToolTip::add(after,_("Text to place after citation")); QToolTip::add(button_down, _("Move reference after"));
QToolTip::add(line_after, _("Text to add after references"));
QToolTip::add(line_details, _("Reference details"));
QToolTip::add(button_search, _("Search through references"));
QToolTip::add(list_available, _("Available references"));
QToolTip::add(list_chosen, _("Current chosen references"));
// layouts line_details->setMinimumHeight(30);
topLayout = new QHBoxLayout(this,10); setMinimumSize(200, 65);
layout = new QVBoxLayout();
topLayout->addLayout(layout);
layout->addSpacing(10);
browserLayout = new QHBoxLayout();
layout->addLayout(browserLayout,1);
chosenLayout = new QVBoxLayout();
browserLayout->addLayout(chosenLayout,1);
iconLayout = new QVBoxLayout();
browserLayout->addLayout(iconLayout,0);
keysLayout = new QVBoxLayout();
browserLayout->addLayout(keysLayout,1);
chosenLayout->addWidget(labelchosen, 0, AlignLeft);
chosenLayout->addWidget(chosen, 1);
iconLayout->addStretch(1);
iconLayout->addWidget(add,1);
iconLayout->addStretch(1);
iconLayout->addWidget(up,1);
iconLayout->addStretch(1);
iconLayout->addWidget(down,1);
iconLayout->addStretch(1);
iconLayout->addWidget(remove,1);
iconLayout->addStretch(1);
keysLayout->addWidget(labelkeys, 0, AlignLeft);
keysLayout->addWidget(keys, 1);
entryLayout = new QVBoxLayout();
layout->addLayout(entryLayout);
entryLayout->addWidget(labelentry, 0, AlignLeft);
entryLayout->addWidget(entry, 0);
afterLayout = new QHBoxLayout();
layout->addLayout(afterLayout);
afterLayout->addWidget(labelafter, 0, AlignLeft);
afterLayout->addWidget(after, 1);
buttonLayout = new QHBoxLayout();
layout->addLayout(buttonLayout);
buttonLayout->addStretch(1);
buttonLayout->addWidget(buttonOk, 1);
buttonLayout->addStretch(2);
buttonLayout->addWidget(buttonCancel, 1);
buttonLayout->addStretch(1);
// connections
connect(keys, SIGNAL(selected(const char *)), this, SLOT(select_key_adaptor(const char *)));
connect(keys, SIGNAL(highlighted(const char *)), this, SLOT(highlight_key_adaptor(const char *)));
connect(chosen, SIGNAL(highlighted(const char *)), this, SLOT(highlight_chosen_adaptor(const char *)));
connect(add, SIGNAL(clicked()), this, SLOT(add_adaptor()));
connect(up, SIGNAL(clicked()), this, SLOT(up_adaptor()));
connect(down, SIGNAL(clicked()), this, SLOT(down_adaptor()));
connect(remove, SIGNAL(clicked()), this, SLOT(remove_adaptor()));
connect(buttonOk, SIGNAL(clicked()), this, SLOT(apply_adaptor()));
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(close_adaptor()));
resize(sizeHint());
} }
CitationDialog::~CitationDialog() void CitationDialog::clicked_search()
{ {
// FIXME
} }

View File

@ -6,102 +6,71 @@
* \author John Levon * \author John Levon
*/ */
#ifndef CITATIONDLG_H #ifndef CITATIONDIALOG_H
#define CITATIONDLG_H #define CITATIONDIALOG_H
#include <config.h>
#include <gettext.h>
// to connect apply() and hide()
#include "FormCitation.h" #include "FormCitation.h"
#include "dlg/citationdlgdata.h"
#include "controllers/ButtonPolicies.h"
#include <qdialog.h> class CitationDialog : public CitationDialogData
#include <qlistbox.h> {
#include <qlayout.h> Q_OBJECT
#include <qlabel.h>
#include <qtooltip.h>
#include <qlineedit.h>
#include <qmultilinedit.h>
#include <qpushbutton.h>
class CitationDialog : public QDialog {
Q_OBJECT
public: public:
CitationDialog(FormCitation *form, QWidget *parent=0, char const * name=0, CitationDialog(FormCitation * form, QWidget * parent = 0, char const * name = 0);
bool modal=false, WFlags f=0);
~CitationDialog();
// widgets private slots:
virtual void clicked_ok() { form_->OKButton(); };
virtual void clicked_apply() { form_->ApplyButton(); };
virtual void clicked_restore() { form_->RestoreButton(); form_->updateButtons(); };
virtual void clicked_cancel() { form_->CancelButton(); };
QLabel * labelchosen; virtual void clicked_add() {
QListBox * chosen; form_->bc().input(form_->add());
QLabel * labelkeys; form_->updateButtons();
QListBox * keys; }
QLabel * labelentry;
QMultiLineEdit * entry;
QLabel * labelafter;
QLineEdit * after;
QPushButton * add;
QPushButton * up;
QPushButton * down;
QPushButton * remove;
QPushButton * buttonOk;
QPushButton * buttonCancel;
protected: virtual void clicked_up() {
void closeEvent(QCloseEvent * e); form_->bc().input(form_->up());
form_->updateButtons();
}
virtual void clicked_down() {
form_->bc().input(form_->down());
form_->updateButtons();
}
virtual void clicked_remove() {
form_->bc().input(form_->remove());
form_->updateButtons();
}
virtual void clicked_search();
virtual void select_available_adaptor(const char * key) {
form_->bc().input(form_->select_key(key));
form_->updateButtons();
}
virtual void highlight_available_adaptor(const char * key) {
form_->highlight_key(key);
}
virtual void highlight_chosen_adaptor(const char * key) {
form_->highlight_chosen(key);
}
virtual void after_changed(const char *) {
form_->bc().valid(true);
form_->updateButtons();
}
protected slots:
virtual void closeEvent(QCloseEvent *e);
private: private:
FormCitation * form_; FormCitation * form_;
// layouts
QHBoxLayout * topLayout;
QVBoxLayout * layout;
QHBoxLayout * browserLayout;
QVBoxLayout * chosenLayout;
QVBoxLayout * iconLayout;
QVBoxLayout * keysLayout;
QVBoxLayout * entryLayout;
QHBoxLayout * afterLayout;
QHBoxLayout * buttonLayout;
private slots:
void apply_adaptor(void) {
form_->OKButton();
}
void close_adaptor(void) {
form_->CancelButton();
}
void add_adaptor(void) {
form_->bc().valid(form_->add());
}
void up_adaptor(void) {
form_->bc().valid(form_->up());
}
void down_adaptor(void) {
form_->bc().valid(form_->down());
}
void remove_adaptor(void) {
form_->bc().valid(form_->remove());
}
void select_key_adaptor(const char * key) {
form_->bc().valid(form_->select_key(key));
}
void highlight_key_adaptor(const char * key) {
form_->highlight_key(key);
}
void highlight_chosen_adaptor(const char * key) {
form_->highlight_chosen(key);
}
}; };
#endif // CITATIONDIALOG_H
#endif // CITATIONDLG_H

View File

@ -27,3 +27,10 @@ void CopyrightDialog::clickedOK()
{ {
form_->OKButton(); form_->OKButton();
} }
void CopyrightDialog::closeEvent(QCloseEvent * e)
{
form_->CancelButton();
e->accept();
}

View File

@ -11,7 +11,6 @@
#include "dlg/copyrightdlgdata.h" #include "dlg/copyrightdlgdata.h"
// FIXME: closeEvent
class FormCopyright; class FormCopyright;
class CopyrightDialog : public CopyrightDialogData class CopyrightDialog : public CopyrightDialogData
@ -26,6 +25,7 @@ public:
protected slots: protected slots:
virtual void clickedOK(); virtual void clickedOK();
virtual void closeEvent(QCloseEvent * e);
private: private:
FormCopyright * form_; FormCopyright * form_;

View File

@ -7,7 +7,9 @@ INCLUDES = -I${top_srcdir}/src/ -I${top_srcdir}/src/frontends/ \
${FRONTEND_INCLUDES} $(BOOST_INCLUDES) ${FRONTEND_INCLUDES} $(BOOST_INCLUDES)
# generated by qtarch # generated by qtarch
GENSOURCES = copyrightdlgdata.C \ GENSOURCES = citationdlgdata.C \
citationdlgdata.h \
copyrightdlgdata.C \
copyrightdlgdata.h \ copyrightdlgdata.h \
docdlgdata.C \ docdlgdata.C \
docdlgdata.h \ docdlgdata.h \
@ -55,6 +57,7 @@ libkdedlg_la_SOURCES = \
helpers.C \ helpers.C \
$(GENSOURCES) $(GENSOURCES)
moc/citationdlgdata_moc.C: citationdlgdata.C citationdlgdata.h
moc/copyrightdlgdata_moc.C: copyrightdlgdata.C copyrightdlgdata.h moc/copyrightdlgdata_moc.C: copyrightdlgdata.C copyrightdlgdata.h
moc/docdlgdata_moc.C: docdlgdata.C docdlgdata.h moc/docdlgdata_moc.C: docdlgdata.C docdlgdata.h
moc/docsettingsdlgdata_moc.C: docsettingsdlgdata.C docsettingsdlgdata.h moc/docsettingsdlgdata_moc.C: docsettingsdlgdata.C docsettingsdlgdata.h

View File

@ -48,6 +48,7 @@ lengthentry - length_
radio buttons - radio_ radio buttons - radio_
line edits - line_ line edits - line_
emptytable - table emptytable - table
list box - list_
Some tips and guidelines for qtarch and the KDE frontend : Some tips and guidelines for qtarch and the KDE frontend :

View File

@ -0,0 +1,473 @@
/**********************************************************************
--- Qt Architect 1.4-6 generated file ---
File: citationdlgdata.C
Last generated: Tue Apr 3 00:57:49 2001
DO NOT EDIT!!! This file will be automatically
regenerated by qtarch. All changes will be lost.
*********************************************************************/
#include <gettext.h>
#include <qpixmap.h>
#include <qlayout.h>
#include "citationdlgdata.h"
#define Inherited QDialog
#include <qlabel.h>
CitationDialogData::CitationDialogData
(
QWidget* parent,
const char* name
)
:
Inherited( parent, name, FALSE, 53248 )
{
button_ok = new QPushButton( this, "button_ok" );
button_ok->setGeometry( 51, 379, 47, 56 );
button_ok->setMinimumSize( 0, 0 );
button_ok->setMaximumSize( 32767, 32767 );
connect( button_ok, SIGNAL(clicked()), SLOT(clicked_ok()) );
button_ok->setFocusPolicy( QWidget::TabFocus );
button_ok->setBackgroundMode( QWidget::PaletteBackground );
button_ok->setFontPropagation( QWidget::NoChildren );
button_ok->setPalettePropagation( QWidget::NoChildren );
button_ok->setText( _("&OK") );
button_ok->setAutoRepeat( false );
button_ok->setAutoResize( false );
button_ok->setToggleButton( false );
button_ok->setDefault( false );
button_ok->setAutoDefault( true );
button_ok->setIsMenuButton( false );
button_cancel = new QPushButton( this, "button_cancel" );
button_cancel->setGeometry( 483, 379, 46, 56 );
button_cancel->setMinimumSize( 0, 0 );
button_cancel->setMaximumSize( 32767, 32767 );
connect( button_cancel, SIGNAL(clicked()), SLOT(clicked_cancel()) );
button_cancel->setFocusPolicy( QWidget::TabFocus );
button_cancel->setBackgroundMode( QWidget::PaletteBackground );
button_cancel->setFontPropagation( QWidget::NoChildren );
button_cancel->setPalettePropagation( QWidget::NoChildren );
button_cancel->setText( _("&Cancel") );
button_cancel->setAutoRepeat( false );
button_cancel->setAutoResize( false );
button_cancel->setToggleButton( false );
button_cancel->setDefault( false );
button_cancel->setAutoDefault( false );
button_cancel->setIsMenuButton( false );
button_apply = new QPushButton( this, "button_apply" );
button_apply->setGeometry( 195, 379, 46, 56 );
button_apply->setMinimumSize( 0, 0 );
button_apply->setMaximumSize( 32767, 32767 );
connect( button_apply, SIGNAL(clicked()), SLOT(clicked_apply()) );
button_apply->setFocusPolicy( QWidget::TabFocus );
button_apply->setBackgroundMode( QWidget::PaletteBackground );
button_apply->setFontPropagation( QWidget::NoChildren );
button_apply->setPalettePropagation( QWidget::NoChildren );
button_apply->setText( _("&Apply") );
button_apply->setAutoRepeat( false );
button_apply->setAutoResize( false );
button_apply->setToggleButton( false );
button_apply->setDefault( false );
button_apply->setAutoDefault( true );
button_apply->setIsMenuButton( false );
button_restore = new QPushButton( this, "button_restore" );
button_restore->setGeometry( 339, 379, 46, 56 );
button_restore->setMinimumSize( 0, 0 );
button_restore->setMaximumSize( 32767, 32767 );
connect( button_restore, SIGNAL(clicked()), SLOT(clicked_restore()) );
button_restore->setFocusPolicy( QWidget::TabFocus );
button_restore->setBackgroundMode( QWidget::PaletteBackground );
button_restore->setFontPropagation( QWidget::NoChildren );
button_restore->setPalettePropagation( QWidget::NoChildren );
button_restore->setText( _("&Restore") );
button_restore->setAutoRepeat( false );
button_restore->setAutoResize( false );
button_restore->setToggleButton( false );
button_restore->setDefault( false );
button_restore->setAutoDefault( true );
button_restore->setIsMenuButton( false );
list_chosen = new QListBox( this, "list_chosen" );
list_chosen->setGeometry( 79, 5, 209, 233 );
list_chosen->setMinimumSize( 0, 0 );
list_chosen->setMaximumSize( 32767, 32767 );
connect( list_chosen, SIGNAL(highlighted(const char*)), SLOT(highlight_chosen_adaptor(const char*)) );
list_chosen->setFocusPolicy( QWidget::StrongFocus );
list_chosen->setBackgroundMode( QWidget::PaletteBase );
list_chosen->setFontPropagation( QWidget::SameFont );
list_chosen->setPalettePropagation( QWidget::SameFont );
list_chosen->setFrameStyle( 51 );
list_chosen->setLineWidth( 2 );
list_chosen->setMidLineWidth( 0 );
list_chosen->QFrame::setMargin( 0 );
list_chosen->setDragSelect( true );
list_chosen->setAutoScroll( true );
list_chosen->setScrollBar( false );
list_chosen->setAutoScrollBar( true );
list_chosen->setBottomScrollBar( false );
list_chosen->setAutoBottomScrollBar( true );
list_chosen->setSmoothScrolling( true );
list_chosen->setMultiSelection( false );
list_chosen->setAutoUpdate( true );
list_available = new QListBox( this, "list_available" );
list_available->setGeometry( 367, 5, 208, 233 );
list_available->setMinimumSize( 0, 0 );
list_available->setMaximumSize( 32767, 32767 );
connect( list_available, SIGNAL(highlighted(const char*)), SLOT(highlight_available_adaptor(const char*)) );
connect( list_available, SIGNAL(selected(const char*)), SLOT(select_available_adaptor(const char*)) );
list_available->setFocusPolicy( QWidget::StrongFocus );
list_available->setBackgroundMode( QWidget::PaletteBase );
list_available->setFontPropagation( QWidget::SameFont );
list_available->setPalettePropagation( QWidget::SameFont );
list_available->setFrameStyle( 51 );
list_available->setLineWidth( 2 );
list_available->setMidLineWidth( 0 );
list_available->QFrame::setMargin( 0 );
list_available->setDragSelect( true );
list_available->setAutoScroll( true );
list_available->setScrollBar( false );
list_available->setAutoScrollBar( true );
list_available->setBottomScrollBar( false );
list_available->setAutoBottomScrollBar( true );
list_available->setSmoothScrolling( true );
list_available->setMultiSelection( false );
list_available->setAutoUpdate( true );
button_down = new QPushButton( this, "button_down" );
button_down->setGeometry( 5, 86, 69, 76 );
button_down->setMinimumSize( 0, 0 );
button_down->setMaximumSize( 32767, 32767 );
connect( button_down, SIGNAL(clicked()), SLOT(clicked_down()) );
button_down->setFocusPolicy( QWidget::TabFocus );
button_down->setBackgroundMode( QWidget::PaletteBackground );
button_down->setFontPropagation( QWidget::NoChildren );
button_down->setPalettePropagation( QWidget::NoChildren );
button_down->setText( _("&Down") );
button_down->setAutoRepeat( false );
button_down->setAutoResize( false );
button_down->setToggleButton( false );
button_down->setDefault( false );
button_down->setAutoDefault( true );
button_down->setIsMenuButton( false );
button_remove = new QPushButton( this, "button_remove" );
button_remove->setGeometry( 293, 66, 69, 56 );
button_remove->setMinimumSize( 0, 0 );
button_remove->setMaximumSize( 32767, 32767 );
connect( button_remove, SIGNAL(clicked()), SLOT(clicked_remove()) );
button_remove->setFocusPolicy( QWidget::TabFocus );
button_remove->setBackgroundMode( QWidget::PaletteBackground );
button_remove->setFontPropagation( QWidget::NoChildren );
button_remove->setPalettePropagation( QWidget::NoChildren );
button_remove->setText( _("&Remove") );
button_remove->setAutoRepeat( false );
button_remove->setAutoResize( false );
button_remove->setToggleButton( false );
button_remove->setDefault( false );
button_remove->setAutoDefault( true );
button_remove->setIsMenuButton( false );
button_up = new QPushButton( this, "button_up" );
button_up->setGeometry( 5, 5, 69, 76 );
button_up->setMinimumSize( 0, 0 );
button_up->setMaximumSize( 32767, 32767 );
connect( button_up, SIGNAL(clicked()), SLOT(clicked_up()) );
button_up->setFocusPolicy( QWidget::TabFocus );
button_up->setBackgroundMode( QWidget::PaletteBackground );
button_up->setFontPropagation( QWidget::NoChildren );
button_up->setPalettePropagation( QWidget::NoChildren );
button_up->setText( _("&Up") );
button_up->setAutoRepeat( false );
button_up->setAutoResize( false );
button_up->setToggleButton( false );
button_up->setDefault( false );
button_up->setAutoDefault( true );
button_up->setIsMenuButton( false );
button_add = new QPushButton( this, "button_add" );
button_add->setGeometry( 293, 5, 69, 56 );
button_add->setMinimumSize( 0, 0 );
button_add->setMaximumSize( 32767, 32767 );
connect( button_add, SIGNAL(clicked()), SLOT(clicked_add()) );
button_add->setFocusPolicy( QWidget::TabFocus );
button_add->setBackgroundMode( QWidget::PaletteBackground );
button_add->setFontPropagation( QWidget::NoChildren );
button_add->setPalettePropagation( QWidget::NoChildren );
button_add->setText( _("&Add") );
button_add->setAutoRepeat( false );
button_add->setAutoResize( false );
button_add->setToggleButton( false );
button_add->setDefault( false );
button_add->setAutoDefault( true );
button_add->setIsMenuButton( false );
QLabel* qtarch_label_after;
qtarch_label_after = new QLabel( this, "label_after" );
qtarch_label_after->setGeometry( 5, 271, 283, 15 );
qtarch_label_after->setMinimumSize( 0, 15 );
qtarch_label_after->setMaximumSize( 32767, 15 );
qtarch_label_after->setFocusPolicy( QWidget::NoFocus );
qtarch_label_after->setBackgroundMode( QWidget::PaletteBackground );
qtarch_label_after->setFontPropagation( QWidget::NoChildren );
qtarch_label_after->setPalettePropagation( QWidget::NoChildren );
qtarch_label_after->setFrameStyle( 0 );
qtarch_label_after->setLineWidth( 1 );
qtarch_label_after->setMidLineWidth( 0 );
qtarch_label_after->QFrame::setMargin( 0 );
qtarch_label_after->setText( _("Text after : ") );
qtarch_label_after->setAlignment( 289 );
qtarch_label_after->setMargin( -1 );
line_after = new QLineEdit( this, "line_after" );
line_after->setGeometry( 293, 243, 282, 71 );
line_after->setMinimumSize( 0, 0 );
line_after->setMaximumSize( 32767, 32767 );
connect( line_after, SIGNAL(textChanged(const char*)), SLOT(after_changed(const char*)) );
line_after->setFocusPolicy( QWidget::StrongFocus );
line_after->setBackgroundMode( QWidget::PaletteBase );
line_after->setFontPropagation( QWidget::NoChildren );
line_after->setPalettePropagation( QWidget::NoChildren );
line_after->setText( "" );
line_after->setMaxLength( 32767 );
line_after->setFrame( QLineEdit::Normal );
line_after->setFrame( true );
line_details = new QMultiLineEdit( this, "line_details" );
line_details->setGeometry( 5, 319, 570, 55 );
line_details->setMinimumSize( 0, 0 );
line_details->setMaximumSize( 32767, 32767 );
line_details->setFocusPolicy( QWidget::StrongFocus );
line_details->setBackgroundMode( QWidget::PaletteBase );
line_details->setFontPropagation( QWidget::SameFont );
line_details->setPalettePropagation( QWidget::SameFont );
line_details->setFrameStyle( 51 );
line_details->setLineWidth( 2 );
line_details->setMidLineWidth( 0 );
line_details->QFrame::setMargin( 0 );
line_details->insertLine( "" );
line_details->setReadOnly( true );
line_details->setOverwriteMode( false );
line_details->setAutoUpdate( true );
button_search = new QPushButton( this, "button_search" );
button_search->setGeometry( 293, 127, 69, 55 );
button_search->setMinimumSize( 0, 0 );
button_search->setMaximumSize( 32767, 32767 );
connect( button_search, SIGNAL(clicked()), SLOT(clicked_search()) );
button_search->setFocusPolicy( QWidget::TabFocus );
button_search->setBackgroundMode( QWidget::PaletteBackground );
button_search->setFontPropagation( QWidget::NoChildren );
button_search->setPalettePropagation( QWidget::NoChildren );
button_search->setText( _("&Search") );
button_search->setAutoRepeat( false );
button_search->setAutoResize( false );
button_search->setToggleButton( false );
button_search->setDefault( false );
button_search->setAutoDefault( true );
button_search->setIsMenuButton( false );
if (button_ok->sizeHint().width()!=-1)
button_ok->setMinimumWidth(button_ok->sizeHint().width());
if (button_ok->sizeHint().height()!=-1)
button_ok->setMinimumHeight(button_ok->sizeHint().height());
if (button_ok->sizeHint().width()!=-1)
button_ok->setMaximumWidth(button_ok->sizeHint().width());
if (button_ok->sizeHint().height()!=-1)
button_ok->setMaximumHeight(button_ok->sizeHint().height());
if (button_cancel->sizeHint().width()!=-1)
button_cancel->setMinimumWidth(button_cancel->sizeHint().width());
if (button_cancel->sizeHint().height()!=-1)
button_cancel->setMinimumHeight(button_cancel->sizeHint().height());
if (button_cancel->sizeHint().width()!=-1)
button_cancel->setMaximumWidth(button_cancel->sizeHint().width());
if (button_cancel->sizeHint().height()!=-1)
button_cancel->setMaximumHeight(button_cancel->sizeHint().height());
if (button_apply->sizeHint().width()!=-1)
button_apply->setMinimumWidth(button_apply->sizeHint().width());
if (button_apply->sizeHint().height()!=-1)
button_apply->setMinimumHeight(button_apply->sizeHint().height());
if (button_apply->sizeHint().width()!=-1)
button_apply->setMaximumWidth(button_apply->sizeHint().width());
if (button_apply->sizeHint().height()!=-1)
button_apply->setMaximumHeight(button_apply->sizeHint().height());
if (button_restore->sizeHint().width()!=-1)
button_restore->setMinimumWidth(button_restore->sizeHint().width());
if (button_restore->sizeHint().height()!=-1)
button_restore->setMinimumHeight(button_restore->sizeHint().height());
if (button_restore->sizeHint().width()!=-1)
button_restore->setMaximumWidth(button_restore->sizeHint().width());
if (button_restore->sizeHint().height()!=-1)
button_restore->setMaximumHeight(button_restore->sizeHint().height());
if (list_chosen->sizeHint().width()!=-1)
list_chosen->setMinimumWidth(list_chosen->sizeHint().width());
if (list_chosen->sizeHint().height()!=-1)
list_chosen->setMinimumHeight(list_chosen->sizeHint().height());
if (list_available->sizeHint().width()!=-1)
list_available->setMinimumWidth(list_available->sizeHint().width());
if (list_available->sizeHint().height()!=-1)
list_available->setMinimumHeight(list_available->sizeHint().height());
if (button_down->sizeHint().width()!=-1)
button_down->setMinimumWidth(button_down->sizeHint().width());
if (button_down->sizeHint().height()!=-1)
button_down->setMinimumHeight(button_down->sizeHint().height());
if (button_down->sizeHint().width()!=-1)
button_down->setMaximumWidth(button_down->sizeHint().width());
if (button_down->sizeHint().height()!=-1)
button_down->setMaximumHeight(button_down->sizeHint().height());
if (button_remove->sizeHint().width()!=-1)
button_remove->setMinimumWidth(button_remove->sizeHint().width());
if (button_remove->sizeHint().height()!=-1)
button_remove->setMinimumHeight(button_remove->sizeHint().height());
if (button_remove->sizeHint().width()!=-1)
button_remove->setMaximumWidth(button_remove->sizeHint().width());
if (button_remove->sizeHint().height()!=-1)
button_remove->setMaximumHeight(button_remove->sizeHint().height());
if (button_up->sizeHint().width()!=-1)
button_up->setMinimumWidth(button_up->sizeHint().width());
if (button_up->sizeHint().height()!=-1)
button_up->setMinimumHeight(button_up->sizeHint().height());
if (button_up->sizeHint().width()!=-1)
button_up->setMaximumWidth(button_up->sizeHint().width());
if (button_up->sizeHint().height()!=-1)
button_up->setMaximumHeight(button_up->sizeHint().height());
if (button_add->sizeHint().width()!=-1)
button_add->setMinimumWidth(button_add->sizeHint().width());
if (button_add->sizeHint().height()!=-1)
button_add->setMinimumHeight(button_add->sizeHint().height());
if (button_add->sizeHint().width()!=-1)
button_add->setMaximumWidth(button_add->sizeHint().width());
if (button_add->sizeHint().height()!=-1)
button_add->setMaximumHeight(button_add->sizeHint().height());
if (qtarch_label_after->sizeHint().width()!=-1)
qtarch_label_after->setMinimumWidth(qtarch_label_after->sizeHint().width());
if (qtarch_label_after->sizeHint().height()!=-1)
qtarch_label_after->setMinimumHeight(qtarch_label_after->sizeHint().height());
if (qtarch_label_after->sizeHint().width()!=-1)
qtarch_label_after->setMaximumWidth(qtarch_label_after->sizeHint().width());
if (qtarch_label_after->sizeHint().height()!=-1)
qtarch_label_after->setMaximumHeight(qtarch_label_after->sizeHint().height());
if (line_after->sizeHint().width()!=-1)
line_after->setMinimumWidth(line_after->sizeHint().width());
if (line_after->sizeHint().height()!=-1)
line_after->setMinimumHeight(line_after->sizeHint().height());
if (line_after->sizeHint().height()!=-1)
line_after->setMaximumHeight(line_after->sizeHint().height());
if (line_details->sizeHint().width()!=-1)
line_details->setMinimumWidth(line_details->sizeHint().width());
if (line_details->sizeHint().height()!=-1)
line_details->setMinimumHeight(line_details->sizeHint().height());
if (line_details->sizeHint().height()!=-1)
line_details->setMaximumHeight(line_details->sizeHint().height());
if (button_search->sizeHint().width()!=-1)
button_search->setMinimumWidth(button_search->sizeHint().width());
if (button_search->sizeHint().height()!=-1)
button_search->setMinimumHeight(button_search->sizeHint().height());
if (button_search->sizeHint().width()!=-1)
button_search->setMaximumWidth(button_search->sizeHint().width());
if (button_search->sizeHint().height()!=-1)
button_search->setMaximumHeight(button_search->sizeHint().height());
QBoxLayout* qtarch_layout_1 = new QBoxLayout( this, QBoxLayout::TopToBottom, 5, 5, NULL );
qtarch_layout_1->addStrut( 0 );
QBoxLayout* qtarch_layout_1_1 = new QBoxLayout( QBoxLayout::LeftToRight, 5, NULL );
qtarch_layout_1->addLayout( qtarch_layout_1_1, 4 );
qtarch_layout_1_1->addStrut( 0 );
QBoxLayout* qtarch_layout_1_1_1 = new QBoxLayout( QBoxLayout::TopToBottom, 5, NULL );
qtarch_layout_1_1->addLayout( qtarch_layout_1_1_1, 1 );
qtarch_layout_1_1_1->addStrut( 0 );
qtarch_layout_1_1_1->addWidget( button_up, 1, 36 );
qtarch_layout_1_1_1->addWidget( button_down, 1, 36 );
qtarch_layout_1_1_1->addStretch( 1 );
QBoxLayout* qtarch_layout_1_1_2 = new QBoxLayout( QBoxLayout::TopToBottom, 5, NULL );
qtarch_layout_1_1->addLayout( qtarch_layout_1_1_2, 3 );
qtarch_layout_1_1_2->addStrut( 0 );
qtarch_layout_1_1_2->addWidget( list_chosen, 1, 36 );
QBoxLayout* qtarch_layout_1_1_3 = new QBoxLayout( QBoxLayout::TopToBottom, 5, NULL );
qtarch_layout_1_1->addLayout( qtarch_layout_1_1_3, 1 );
qtarch_layout_1_1_3->addStrut( 0 );
qtarch_layout_1_1_3->addWidget( button_add, 1, 36 );
qtarch_layout_1_1_3->addWidget( button_remove, 1, 36 );
qtarch_layout_1_1_3->addWidget( button_search, 1, 36 );
qtarch_layout_1_1_3->addStretch( 1 );
QBoxLayout* qtarch_layout_1_1_4 = new QBoxLayout( QBoxLayout::TopToBottom, 5, NULL );
qtarch_layout_1_1->addLayout( qtarch_layout_1_1_4, 3 );
qtarch_layout_1_1_4->addStrut( 0 );
qtarch_layout_1_1_4->addWidget( list_available, 1, 36 );
QBoxLayout* qtarch_layout_1_2 = new QBoxLayout( QBoxLayout::LeftToRight, 5, NULL );
qtarch_layout_1->addLayout( qtarch_layout_1_2, 1 );
qtarch_layout_1_2->addStrut( 0 );
qtarch_layout_1_2->addWidget( qtarch_label_after, 1, 36 );
qtarch_layout_1_2->addWidget( line_after, 1, 36 );
QBoxLayout* qtarch_layout_1_3 = new QBoxLayout( QBoxLayout::LeftToRight, 5, NULL );
qtarch_layout_1->addLayout( qtarch_layout_1_3, 1 );
qtarch_layout_1_3->addStrut( 0 );
qtarch_layout_1_3->addWidget( line_details, 1, 36 );
QBoxLayout* qtarch_layout_1_4 = new QBoxLayout( QBoxLayout::LeftToRight, 5, NULL );
qtarch_layout_1->addLayout( qtarch_layout_1_4, 1 );
qtarch_layout_1_4->addStrut( 0 );
qtarch_layout_1_4->addStretch( 1 );
qtarch_layout_1_4->addWidget( button_ok, 1, 36 );
qtarch_layout_1_4->addStretch( 2 );
qtarch_layout_1_4->addWidget( button_apply, 1, 36 );
qtarch_layout_1_4->addStretch( 2 );
qtarch_layout_1_4->addWidget( button_restore, 1, 36 );
qtarch_layout_1_4->addStretch( 2 );
qtarch_layout_1_4->addWidget( button_cancel, 1, 36 );
qtarch_layout_1_4->addStretch( 1 );
resize( 580,440 );
setMinimumSize( 200, 65 );
setMaximumSize( 32767, 65 );
}
CitationDialogData::~CitationDialogData()
{
}
void CitationDialogData::clicked_ok()
{
}
void CitationDialogData::clicked_cancel()
{
}
void CitationDialogData::clicked_apply()
{
}
void CitationDialogData::clicked_restore()
{
}
void CitationDialogData::highlight_chosen_adaptor(const char*)
{
}
void CitationDialogData::highlight_available_adaptor(const char*)
{
}
void CitationDialogData::select_available_adaptor(const char*)
{
}
void CitationDialogData::clicked_down()
{
}
void CitationDialogData::clicked_remove()
{
}
void CitationDialogData::clicked_up()
{
}
void CitationDialogData::clicked_add()
{
}
void CitationDialogData::after_changed(const char*)
{
}
void CitationDialogData::clicked_search()
{
}

View File

@ -0,0 +1,72 @@
/**********************************************************************
--- Qt Architect 1.4-6 generated file ---
File: citationdlgdata.h
Last generated: Tue Apr 3 00:57:49 2001
DO NOT EDIT!!! This file will be automatically
regenerated by qtarch. All changes will be lost.
*********************************************************************/
#ifndef CitationDialogData_included
#define CitationDialogData_included
#include <qdialog.h>
#include <qpushbutton.h>
#include <qmultilinedit.h>
#include <qlistbox.h>
#include <qlineedit.h>
class CitationDialogData : public QDialog
{
Q_OBJECT
public:
CitationDialogData
(
QWidget* parent = NULL,
const char* name = NULL
);
virtual ~CitationDialogData();
public slots:
protected slots:
virtual void clicked_remove();
virtual void select_available_adaptor(const char*);
virtual void clicked_cancel();
virtual void clicked_restore();
virtual void clicked_down();
virtual void highlight_chosen_adaptor(const char*);
virtual void clicked_search();
virtual void highlight_available_adaptor(const char*);
virtual void clicked_ok();
virtual void clicked_add();
virtual void after_changed(const char*);
virtual void clicked_up();
virtual void clicked_apply();
public:
QPushButton* button_ok;
QPushButton* button_cancel;
QPushButton* button_apply;
QPushButton* button_restore;
QListBox* list_chosen;
QListBox* list_available;
QPushButton* button_down;
QPushButton* button_remove;
QPushButton* button_up;
QPushButton* button_add;
QLineEdit* line_after;
QMultiLineEdit* line_details;
QPushButton* button_search;
};
#endif // CitationDialogData_included

View File

@ -0,0 +1,600 @@
DlgEdit:v1.2:Dialog:
Dialog {
ClassHeader {}
ClassSource {}
ClassName {}
DataHeader {citationdlgdata.h}
DataSource {citationdlgdata.C}
DataName {CitationDialogData}
WindowBaseClass {QDialog}
IsModal {false}
UseGetText {true}
WindowFlags {53248}
}
WidgetLayout {
InitialPos {-1 -1}
Size {580 440}
MinSize {200 65}
MaxSize {32767 65}
Grid {5}
PushButton {
ToggleButton {false}
Default {false}
AutoDefault {true}
IsMenuButton {false}
Text {&OK}
AutoRepeat {false}
AutoResize {false}
Rect {51 379 47 56}
Name {button_ok}
Variable {button_ok}
Signal {[Protected] clicked --> clicked_ok ()}
MinimumSize {0 0}
MaximumSize {32767 32767}
BackgroundPixmap {}
UseBackgroundPixmap {false}
AdjustSize {false}
ReadPixmapFromData {false}
DataVarName {}
DataLenName {}
minWidthSizeHint {true}
minHeightSizeHint {true}
maxWidthSizeHint {true}
maxHeightSizeHint {true}
FocusPolicy {TabFocus}
BackgroundMode {PaletteBackground}
FontPropagation {NoChildren}
PalettePropagation {NoChildren}
}
PushButton {
ToggleButton {false}
Default {false}
AutoDefault {false}
IsMenuButton {false}
Text {&Cancel}
AutoRepeat {false}
AutoResize {false}
Rect {483 379 46 56}
Name {button_cancel}
Variable {button_cancel}
Signal {[Protected] clicked --> clicked_cancel ()}
MinimumSize {0 0}
MaximumSize {32767 32767}
BackgroundPixmap {}
UseBackgroundPixmap {false}
AdjustSize {false}
ReadPixmapFromData {false}
DataVarName {}
DataLenName {}
minWidthSizeHint {true}
minHeightSizeHint {true}
maxWidthSizeHint {true}
maxHeightSizeHint {true}
FocusPolicy {TabFocus}
BackgroundMode {PaletteBackground}
FontPropagation {NoChildren}
PalettePropagation {NoChildren}
}
PushButton {
ToggleButton {false}
Default {false}
AutoDefault {true}
IsMenuButton {false}
Text {&Apply}
AutoRepeat {false}
AutoResize {false}
Rect {195 379 46 56}
Name {button_apply}
Variable {button_apply}
Signal {[Protected] clicked --> clicked_apply ()}
MinimumSize {0 0}
MaximumSize {32767 32767}
BackgroundPixmap {}
UseBackgroundPixmap {false}
AdjustSize {false}
ReadPixmapFromData {false}
DataVarName {}
DataLenName {}
minWidthSizeHint {true}
minHeightSizeHint {true}
maxWidthSizeHint {true}
maxHeightSizeHint {true}
FocusPolicy {TabFocus}
BackgroundMode {PaletteBackground}
FontPropagation {NoChildren}
PalettePropagation {NoChildren}
}
PushButton {
ToggleButton {false}
Default {false}
AutoDefault {true}
IsMenuButton {false}
Text {&Restore}
AutoRepeat {false}
AutoResize {false}
Rect {339 379 46 56}
Name {button_restore}
Variable {button_restore}
Signal {[Protected] clicked --> clicked_restore ()}
MinimumSize {0 0}
MaximumSize {32767 32767}
BackgroundPixmap {}
UseBackgroundPixmap {false}
AdjustSize {false}
ReadPixmapFromData {false}
DataVarName {}
DataLenName {}
minWidthSizeHint {true}
minHeightSizeHint {true}
maxWidthSizeHint {true}
maxHeightSizeHint {true}
FocusPolicy {TabFocus}
BackgroundMode {PaletteBackground}
FontPropagation {NoChildren}
PalettePropagation {NoChildren}
}
ListBox {
DragSelect {true}
AutoScroll {true}
ScrollBar {false}
AutoScrollBar {true}
BottomScrollBar {false}
AutoBottomScrollBar {true}
SmoothScrolling {true}
MultiSelection {false}
AutoUpdate {true}
Style {51}
LineWidth {2}
MidLineWidth {0}
FrameMargin {0}
Rect {79 5 209 233}
Name {list_chosen}
Variable {list_chosen}
Signal {[Protected] highlighted --> highlight_chosen_adaptor (const char*)}
MinimumSize {0 0}
MaximumSize {32767 32767}
BackgroundPixmap {}
UseBackgroundPixmap {false}
AdjustSize {false}
ReadPixmapFromData {false}
DataVarName {}
DataLenName {}
minWidthSizeHint {true}
minHeightSizeHint {true}
maxWidthSizeHint {false}
maxHeightSizeHint {false}
FocusPolicy {StrongFocus}
BackgroundMode {PaletteBase}
FontPropagation {SameFont}
PalettePropagation {SameFont}
}
ListBox {
DragSelect {true}
AutoScroll {true}
ScrollBar {false}
AutoScrollBar {true}
BottomScrollBar {false}
AutoBottomScrollBar {true}
SmoothScrolling {true}
MultiSelection {false}
AutoUpdate {true}
Style {51}
LineWidth {2}
MidLineWidth {0}
FrameMargin {0}
Rect {367 5 208 233}
Name {list_available}
Variable {list_available}
Signal {[Protected] highlighted --> highlight_available_adaptor (const char*)}
Signal {[Protected] selected --> select_available_adaptor (const char*)}
MinimumSize {0 0}
MaximumSize {32767 32767}
BackgroundPixmap {}
UseBackgroundPixmap {false}
AdjustSize {false}
ReadPixmapFromData {false}
DataVarName {}
DataLenName {}
minWidthSizeHint {true}
minHeightSizeHint {true}
maxWidthSizeHint {false}
maxHeightSizeHint {false}
FocusPolicy {StrongFocus}
BackgroundMode {PaletteBase}
FontPropagation {SameFont}
PalettePropagation {SameFont}
}
PushButton {
ToggleButton {false}
Default {false}
AutoDefault {true}
IsMenuButton {false}
Text {&Down}
AutoRepeat {false}
AutoResize {false}
Rect {5 86 69 76}
Name {button_down}
Variable {button_down}
Signal {[Protected] clicked --> clicked_down ()}
MinimumSize {0 0}
MaximumSize {32767 32767}
BackgroundPixmap {}
UseBackgroundPixmap {false}
AdjustSize {false}
ReadPixmapFromData {false}
DataVarName {}
DataLenName {}
minWidthSizeHint {true}
minHeightSizeHint {true}
maxWidthSizeHint {true}
maxHeightSizeHint {true}
FocusPolicy {TabFocus}
BackgroundMode {PaletteBackground}
FontPropagation {NoChildren}
PalettePropagation {NoChildren}
}
PushButton {
ToggleButton {false}
Default {false}
AutoDefault {true}
IsMenuButton {false}
Text {&Remove}
AutoRepeat {false}
AutoResize {false}
Rect {293 66 69 56}
Name {button_remove}
Variable {button_remove}
Signal {[Protected] clicked --> clicked_remove ()}
MinimumSize {0 0}
MaximumSize {32767 32767}
BackgroundPixmap {}
UseBackgroundPixmap {false}
AdjustSize {false}
ReadPixmapFromData {false}
DataVarName {}
DataLenName {}
minWidthSizeHint {true}
minHeightSizeHint {true}
maxWidthSizeHint {true}
maxHeightSizeHint {true}
FocusPolicy {TabFocus}
BackgroundMode {PaletteBackground}
FontPropagation {NoChildren}
PalettePropagation {NoChildren}
}
PushButton {
ToggleButton {false}
Default {false}
AutoDefault {true}
IsMenuButton {false}
Text {&Up}
AutoRepeat {false}
AutoResize {false}
Rect {5 5 69 76}
Name {button_up}
Variable {button_up}
Signal {[Protected] clicked --> clicked_up ()}
MinimumSize {0 0}
MaximumSize {32767 32767}
BackgroundPixmap {}
UseBackgroundPixmap {false}
AdjustSize {false}
ReadPixmapFromData {false}
DataVarName {}
DataLenName {}
minWidthSizeHint {true}
minHeightSizeHint {true}
maxWidthSizeHint {true}
maxHeightSizeHint {true}
FocusPolicy {TabFocus}
BackgroundMode {PaletteBackground}
FontPropagation {NoChildren}
PalettePropagation {NoChildren}
}
PushButton {
ToggleButton {false}
Default {false}
AutoDefault {true}
IsMenuButton {false}
Text {&Add}
AutoRepeat {false}
AutoResize {false}
Rect {293 5 69 56}
Name {button_add}
Variable {button_add}
Signal {[Protected] clicked --> clicked_add ()}
MinimumSize {0 0}
MaximumSize {32767 32767}
BackgroundPixmap {}
UseBackgroundPixmap {false}
AdjustSize {false}
ReadPixmapFromData {false}
DataVarName {}
DataLenName {}
minWidthSizeHint {true}
minHeightSizeHint {true}
maxWidthSizeHint {true}
maxHeightSizeHint {true}
FocusPolicy {TabFocus}
BackgroundMode {PaletteBackground}
FontPropagation {NoChildren}
PalettePropagation {NoChildren}
}
Label {
Text {Text after : }
Alignment {289}
AutoResize {false}
Margin {-1}
Style {0}
LineWidth {1}
MidLineWidth {0}
FrameMargin {0}
Rect {5 271 283 15}
Name {label_after}
MinimumSize {0 15}
MaximumSize {32767 15}
BackgroundPixmap {}
UseBackgroundPixmap {false}
AdjustSize {false}
ReadPixmapFromData {false}
DataVarName {}
DataLenName {}
minWidthSizeHint {true}
minHeightSizeHint {true}
maxWidthSizeHint {true}
maxHeightSizeHint {true}
FocusPolicy {NoFocus}
BackgroundMode {PaletteBackground}
FontPropagation {NoChildren}
PalettePropagation {NoChildren}
}
LineEdit {
Text {}
EchoMode {Normal}
MaxLength {32767}
FrameShown {true}
Rect {293 243 282 71}
Name {line_after}
Variable {line_after}
Signal {[Protected] textChanged --> after_changed (const char*)}
MinimumSize {0 0}
MaximumSize {32767 32767}
BackgroundPixmap {}
UseBackgroundPixmap {false}
AdjustSize {false}
ReadPixmapFromData {false}
DataVarName {}
DataLenName {}
minWidthSizeHint {true}
minHeightSizeHint {true}
maxWidthSizeHint {false}
maxHeightSizeHint {true}
FocusPolicy {StrongFocus}
BackgroundMode {PaletteBase}
FontPropagation {NoChildren}
PalettePropagation {NoChildren}
}
MultiLineEdit {
Line {}
ReadOnly {true}
OverwriteMode {false}
AutoUpdate {true}
Style {51}
LineWidth {2}
MidLineWidth {0}
FrameMargin {0}
Rect {5 319 570 55}
Name {line_details}
Variable {line_details}
MinimumSize {0 0}
MaximumSize {32767 32767}
BackgroundPixmap {}
UseBackgroundPixmap {false}
AdjustSize {false}
ReadPixmapFromData {false}
DataVarName {}
DataLenName {}
minWidthSizeHint {true}
minHeightSizeHint {true}
maxWidthSizeHint {false}
maxHeightSizeHint {true}
FocusPolicy {StrongFocus}
BackgroundMode {PaletteBase}
FontPropagation {SameFont}
PalettePropagation {SameFont}
}
PushButton {
ToggleButton {false}
Default {false}
AutoDefault {true}
IsMenuButton {false}
Text {&Search}
AutoRepeat {false}
AutoResize {false}
Rect {293 127 69 55}
Name {button_search}
Variable {button_search}
Signal {[Protected] clicked --> clicked_search ()}
MinimumSize {0 0}
MaximumSize {32767 32767}
BackgroundPixmap {}
UseBackgroundPixmap {false}
AdjustSize {false}
ReadPixmapFromData {false}
DataVarName {}
DataLenName {}
minWidthSizeHint {true}
minHeightSizeHint {true}
maxWidthSizeHint {true}
maxHeightSizeHint {true}
FocusPolicy {TabFocus}
BackgroundMode {PaletteBackground}
FontPropagation {NoChildren}
PalettePropagation {NoChildren}
}
Box_Layout-1{
Direction {TopToBottom}
Border {5}
AutoBorder {5}
Name {}
Strut {0}
Stretch {1}
}
Box_Layout-1.1{
Direction {LeftToRight}
Border {5}
AutoBorder {5}
Name {}
Strut {0}
Stretch {4}
}
Box_Layout-1.1.1{
Direction {TopToBottom}
Border {5}
AutoBorder {5}
Name {}
Strut {0}
Stretch {1}
}
Layout_Widget-1.1.1.1{
Widget {button_up}
BoxStretch {1}
Alignment {36}
}
Layout_Widget-1.1.1.2{
Widget {button_down}
BoxStretch {1}
Alignment {36}
}
Box_Stretch-1.1.1.3{
Stretch {1}
}
Box_Layout-1.1.2{
Direction {TopToBottom}
Border {5}
AutoBorder {5}
Name {}
Strut {0}
Stretch {3}
}
Layout_Widget-1.1.2.1{
Widget {list_chosen}
BoxStretch {1}
Alignment {36}
}
Box_Layout-1.1.3{
Direction {TopToBottom}
Border {5}
AutoBorder {5}
Name {}
Strut {0}
Stretch {1}
}
Layout_Widget-1.1.3.1{
Widget {button_add}
BoxStretch {1}
Alignment {36}
}
Layout_Widget-1.1.3.2{
Widget {button_remove}
BoxStretch {1}
Alignment {36}
}
Layout_Widget-1.1.3.3{
Widget {button_search}
BoxStretch {1}
Alignment {36}
}
Box_Stretch-1.1.3.4{
Stretch {1}
}
Box_Layout-1.1.4{
Direction {TopToBottom}
Border {5}
AutoBorder {5}
Name {}
Strut {0}
Stretch {3}
}
Layout_Widget-1.1.4.1{
Widget {list_available}
BoxStretch {1}
Alignment {36}
}
Box_Layout-1.2{
Direction {LeftToRight}
Border {5}
AutoBorder {5}
Name {}
Strut {0}
Stretch {1}
}
Layout_Widget-1.2.1{
Widget {label_after}
BoxStretch {1}
Alignment {36}
}
Layout_Widget-1.2.2{
Widget {line_after}
BoxStretch {1}
Alignment {36}
}
Box_Layout-1.3{
Direction {LeftToRight}
Border {5}
AutoBorder {5}
Name {}
Strut {0}
Stretch {1}
}
Layout_Widget-1.3.1{
Widget {line_details}
BoxStretch {1}
Alignment {36}
}
Box_Layout-1.4{
Direction {LeftToRight}
Border {5}
AutoBorder {5}
Name {}
Strut {0}
Stretch {1}
}
Box_Stretch-1.4.1{
Stretch {1}
}
Layout_Widget-1.4.2{
Widget {button_ok}
BoxStretch {1}
Alignment {36}
}
Box_Stretch-1.4.3{
Stretch {2}
}
Layout_Widget-1.4.4{
Widget {button_apply}
BoxStretch {1}
Alignment {36}
}
Box_Stretch-1.4.5{
Stretch {2}
}
Layout_Widget-1.4.6{
Widget {button_restore}
BoxStretch {1}
Alignment {36}
}
Box_Stretch-1.4.7{
Stretch {2}
}
Layout_Widget-1.4.8{
Widget {button_cancel}
BoxStretch {1}
Alignment {36}
}
Box_Stretch-1.4.9{
Stretch {1}
}
}

View File

@ -5,7 +5,8 @@ BOOST_INCLUDES = -I$(top_srcdir)/boost
INCLUDES = -I${top_srcdir}/src/ -I${top_srcdir}/src/frontends/ \ INCLUDES = -I${top_srcdir}/src/ -I${top_srcdir}/src/frontends/ \
${FRONTEND_INCLUDES} ${BOOST_INCLUDES} ${FRONTEND_INCLUDES} ${BOOST_INCLUDES}
libkdedlgmoc_la_SOURCES = copyrightdlgdata_moc.C \ libkdedlgmoc_la_SOURCES = citationdlgdata_moc.C \
copyrightdlgdata_moc.C \
docdlgdata_moc.C \ docdlgdata_moc.C \
docsettingsdlgdata_moc.C \ docsettingsdlgdata_moc.C \
docgeometrydlgdata_moc.C \ docgeometrydlgdata_moc.C \
@ -31,6 +32,8 @@ LIBS=
ETAGS_ARGS = --lang=c++ ETAGS_ARGS = --lang=c++
$(BUILTSOURCES) $(BUILTSOURCES)
citationdlgdata_moc.C: ../citationdlgdata.h
$(MOC) $< -o $@
copyrightdlgdata_moc.C: ../copyrightdlgdata.h copyrightdlgdata_moc.C: ../copyrightdlgdata.h
$(MOC) $< -o $@ $(MOC) $< -o $@
docdlgdata_moc.C: ../docdlgdata.h docdlgdata_moc.C: ../docdlgdata.h

View File

@ -20,6 +20,7 @@
#include "dlg/helpers.h" #include "dlg/helpers.h"
#include "language.h"
#include "gettext.h" #include "gettext.h"
#include "debug.h" #include "debug.h"

View File

@ -27,3 +27,10 @@ IndexDialog::IndexDialog(FormIndex * f, QWidget * p, char const * name)
setMinimumSize(200, 65); setMinimumSize(200, 65);
setMaximumSize(32767, 65); setMaximumSize(32767, 65);
} }
void IndexDialog::closeEvent(QCloseEvent * e)
{
form_->CancelButton();
e->accept();
}

View File

@ -12,8 +12,6 @@
#include "FormIndex.h" #include "FormIndex.h"
#include "dlg/indexdlgdata.h" #include "dlg/indexdlgdata.h"
// FIXME: closeEvent
class IndexDialog : public IndexDialogData class IndexDialog : public IndexDialogData
{ {
Q_OBJECT Q_OBJECT
@ -24,9 +22,10 @@ public:
void setIndexText(char const * str) { line_index->setText(str); } void setIndexText(char const * str) { line_index->setText(str); }
char const * getIndexText() { return line_index->text(); } char const * getIndexText() { return line_index->text(); }
private slots: protected slots:
void clickedOK() { form_->OKButton(); }; virtual void clickedOK() { form_->OKButton(); };
void clickedCancel() { form_->CancelButton(); }; virtual void clickedCancel() { form_->CancelButton(); };
virtual void closeEvent(QCloseEvent * e);
private: private:
FormIndex * form_; FormIndex * form_;

View File

@ -40,3 +40,10 @@ void LogDialog::updatePressed()
// FIXME: hmm // FIXME: hmm
//form_->controller().setParams(); //form_->controller().setParams();
} }
void LogDialog::closeEvent(QCloseEvent * e)
{
form_->CancelButton();
e->accept();
}

View File

@ -14,8 +14,6 @@
#include "dlg/logdlgdata.h" #include "dlg/logdlgdata.h"
// FIXME: closeEvent
class FormLog; class FormLog;
class LogDialog : public LogDialogData class LogDialog : public LogDialogData
@ -29,8 +27,8 @@ public:
protected slots: protected slots:
virtual void closePressed(); virtual void closePressed();
virtual void updatePressed(); virtual void updatePressed();
virtual void closeEvent(QCloseEvent * e);
private: private:
FormLog * form_; FormLog * form_;

View File

@ -28,10 +28,11 @@ ParaDialog::ParaDialog(FormParagraph * form, QWidget * parent, char const * name
setUpdatesEnabled(false); setUpdatesEnabled(false);
generalpage = new ParaGeneralDialog(this, "generalpage"); generalpage = new ParaGeneralDialog(this, "generalpage");
extrapage = new ParaExtraDialog(this, "extrapage");
tabstack->addTabPage(generalpage, _("&General")); tabstack->addTabPage(generalpage, _("&General"));
#ifndef NO_PEXTRA
extrapage = new ParaExtraDialog(this, "extrapage");
tabstack->addTabPage(extrapage, _("&Extra")); tabstack->addTabPage(extrapage, _("&Extra"));
#endif
setUpdatesEnabled(true); setUpdatesEnabled(true);
update(); update();
@ -199,6 +200,7 @@ void ParaDialog::setBelowLength(float val, float plus, float minus,
} }
#ifndef NO_PEXTRA
void ParaDialog::setExtra(float widthval, LyXLength::UNIT units, const string percent, int align, void ParaDialog::setExtra(float widthval, LyXLength::UNIT units, const string percent, int align,
bool hfill, bool startminipage, LyXParagraph::PEXTRA_TYPE type) bool hfill, bool startminipage, LyXParagraph::PEXTRA_TYPE type)
{ {
@ -271,6 +273,7 @@ void ParaDialog::setExtra(float widthval, LyXLength::UNIT units, const string pe
break; break;
} }
} }
#endif // NO_PEXTRA
LyXGlueLength ParaDialog::getAboveLength() const LyXGlueLength ParaDialog::getAboveLength() const
@ -303,6 +306,7 @@ LyXGlueLength ParaDialog::getBelowLength() const
} }
#ifndef NO_PEXTRA
LyXLength ParaDialog::getExtraWidth() const LyXLength ParaDialog::getExtraWidth() const
{ {
@ -342,3 +346,4 @@ string ParaDialog::getExtraWidthPercent() const
val = 0.0; val = 0.0;
return tostr(val); return tostr(val);
} }
#endif // NO_PEXTRA

View File

@ -38,7 +38,9 @@ public:
void setSpace(VSpace::vspace_kind, VSpace::vspace_kind, bool, bool); void setSpace(VSpace::vspace_kind, VSpace::vspace_kind, bool, bool);
void setAboveLength(float, float, float, LyXGlueLength::UNIT, LyXGlueLength::UNIT, LyXGlueLength::UNIT); void setAboveLength(float, float, float, LyXGlueLength::UNIT, LyXGlueLength::UNIT, LyXGlueLength::UNIT);
void setBelowLength(float, float, float, LyXGlueLength::UNIT, LyXGlueLength::UNIT, LyXGlueLength::UNIT); void setBelowLength(float, float, float, LyXGlueLength::UNIT, LyXGlueLength::UNIT, LyXGlueLength::UNIT);
#ifndef NO_PEXTRA
void setExtra(float, LyXGlueLength::UNIT, const string, int, bool, bool, LyXParagraph::PEXTRA_TYPE); void setExtra(float, LyXGlueLength::UNIT, const string, int, bool, bool, LyXParagraph::PEXTRA_TYPE);
#endif
char const * getLabelWidth() const { char const * getLabelWidth() const {
return generalpage->line_labelwidth->text(); return generalpage->line_labelwidth->text();
@ -93,6 +95,7 @@ public:
LyXGlueLength getAboveLength() const; LyXGlueLength getAboveLength() const;
LyXGlueLength getBelowLength() const; LyXGlueLength getBelowLength() const;
#ifndef NO_PEXTRA
LyXLength getExtraWidth() const; LyXLength getExtraWidth() const;
string getExtraWidthPercent() const; string getExtraWidthPercent() const;
@ -122,6 +125,8 @@ public:
bool getStartNewMinipage() const { bool getStartNewMinipage() const {
return extrapage->check_startnewminipage->isChecked(); return extrapage->check_startnewminipage->isChecked();
} }
#endif
protected: protected:
void closeEvent(QCloseEvent * e); void closeEvent(QCloseEvent * e);
@ -130,8 +135,10 @@ private:
/// the general tab page /// the general tab page
ParaGeneralDialog * generalpage; ParaGeneralDialog * generalpage;
#ifndef NO_PEXTRA
/// the extra options tab page /// the extra options tab page
ParaExtraDialog * extrapage; ParaExtraDialog * extrapage;
#endif
VSpace::vspace_kind getSpaceKind(int val) const { VSpace::vspace_kind getSpaceKind(int val) const {
switch (val) { switch (val) {

View File

@ -64,3 +64,10 @@ void PrintDialog::changedCount(char const * text)
check_sort->setEnabled(strToInt(text) > 1); check_sort->setEnabled(strToInt(text) > 1);
} }
void PrintDialog::closeEvent(QCloseEvent * e)
{
form_->CancelButton();
e->accept();
}

View File

@ -18,8 +18,6 @@
#include "lyxrc.h" #include "lyxrc.h"
#include "PrinterParams.h" #include "PrinterParams.h"
// FIXME: closeEvent
class PrintDialog : public PrintDialogData class PrintDialog : public PrintDialogData
{ {
Q_OBJECT Q_OBJECT
@ -130,6 +128,8 @@ protected slots:
form_->OKButton(); form_->OKButton();
} }
virtual void closeEvent(QCloseEvent * e);
/// open up the browser to select ps file /// open up the browser to select ps file
void clickedBrowse(); void clickedBrowse();

View File

@ -57,3 +57,10 @@ void TabularCreateDialog::clickedCancel()
{ {
form_->CancelButton(); form_->CancelButton();
} }
void TabularCreateDialog::closeEvent(QCloseEvent * e)
{
form_->CancelButton();
e->accept();
}

View File

@ -12,8 +12,6 @@
#include "FormTabularCreate.h" #include "FormTabularCreate.h"
#include "dlg/tabcreatedlgdata.h" #include "dlg/tabcreatedlgdata.h"
// FIXME: closeEvent
class TabularCreateDialog : public TabularCreateDialogData class TabularCreateDialog : public TabularCreateDialogData
{ {
Q_OBJECT Q_OBJECT
@ -26,6 +24,7 @@ protected slots:
virtual void clickedCancel(); virtual void clickedCancel();
virtual void colsChanged(unsigned int); virtual void colsChanged(unsigned int);
virtual void rowsChanged(unsigned int); virtual void rowsChanged(unsigned int);
virtual void closeEvent(QCloseEvent * e);
private: private:
FormTabularCreate * form_; FormTabularCreate * form_;

View File

@ -40,8 +40,8 @@ public:
QPushButton * buttonOk; QPushButton * buttonOk;
QPushButton * buttonCancel; QPushButton * buttonCancel;
protected: protected slots:
void closeEvent(QCloseEvent * e); virtual void closeEvent(QCloseEvent * e);
private: private:
FormUrl * form_; FormUrl * form_;

View File

@ -41,3 +41,10 @@ void VCLogDialog::updatePressed()
// FIXME: hmm // FIXME: hmm
//form_->controller().setParams(); //form_->controller().setParams();
} }
void VCLogDialog::closeEvent(QCloseEvent * e)
{
form_->CancelButton();
e->accept();
}

View File

@ -14,8 +14,6 @@
#include "dlg/logdlgdata.h" #include "dlg/logdlgdata.h"
// FIXME: closeEvent
class FormVCLog; class FormVCLog;
class VCLogDialog : public LogDialogData class VCLogDialog : public LogDialogData
@ -32,6 +30,8 @@ protected slots:
virtual void updatePressed(); virtual void updatePressed();
virtual void closeEvent(QCloseEvent * e);
private: private:
FormVCLog * form_; FormVCLog * form_;
}; };