2001-08-19 13:25:15 +00:00
|
|
|
/**
|
|
|
|
* \file QIndexDialog.C
|
2002-09-24 13:57:09 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2001-08-19 13:25:15 +00:00
|
|
|
*
|
2002-10-20 01:48:28 +00:00
|
|
|
* \author John Levon
|
2002-09-24 13:57:09 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
2001-08-19 13:25:15 +00:00
|
|
|
*/
|
|
|
|
|
2001-08-29 02:29:26 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
2002-09-24 13:57:09 +00:00
|
|
|
|
2002-12-17 20:37:13 +00:00
|
|
|
#include "qt_helpers.h"
|
2001-08-19 13:25:15 +00:00
|
|
|
|
2002-06-19 03:38:44 +00:00
|
|
|
#include "QIndex.h"
|
|
|
|
#include "QIndexDialog.h"
|
2002-10-20 01:48:28 +00:00
|
|
|
|
2001-08-25 03:00:19 +00:00
|
|
|
#include <qpushbutton.h>
|
2001-08-29 02:29:26 +00:00
|
|
|
#include <qlineedit.h>
|
|
|
|
#include <qwhatsthis.h>
|
2001-08-25 03:00:19 +00:00
|
|
|
|
2002-10-20 01:48:28 +00:00
|
|
|
|
2001-08-21 01:14:54 +00:00
|
|
|
QIndexDialog::QIndexDialog(QIndex * form)
|
|
|
|
: QIndexDialogBase(0, 0, false, 0),
|
2001-08-19 13:25:15 +00:00
|
|
|
form_(form)
|
|
|
|
{
|
2001-08-25 03:00:19 +00:00
|
|
|
connect(okPB, SIGNAL(clicked()),
|
|
|
|
form, SLOT(slotOK()));
|
|
|
|
connect(closePB, SIGNAL(clicked()),
|
|
|
|
form, SLOT(slotClose()));
|
2001-08-29 02:29:26 +00:00
|
|
|
|
2002-12-17 20:37:13 +00:00
|
|
|
QWhatsThis::add(keywordED, qt_(
|
2001-08-29 02:29:26 +00:00
|
|
|
"The format of the entry in the index.\n"
|
|
|
|
"\n"
|
|
|
|
"An entry can be specified as a sub-entry of\n"
|
2003-01-06 14:02:24 +00:00
|
|
|
"another with \"!\":\n"
|
2001-08-29 02:29:26 +00:00
|
|
|
"\n"
|
|
|
|
"cars!mileage\n"
|
|
|
|
"\n"
|
2003-01-06 14:02:24 +00:00
|
|
|
"You can cross-refer to another entry like so:\n"
|
2001-08-29 02:29:26 +00:00
|
|
|
"\n"
|
|
|
|
"cars!mileage|see{economy}\n"
|
|
|
|
"\n"
|
|
|
|
"For further details refer to the local LaTeX\n"
|
|
|
|
"documentation.\n"));
|
2001-08-19 13:25:15 +00:00
|
|
|
}
|
|
|
|
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2002-09-11 17:42:45 +00:00
|
|
|
void QIndexDialog::show()
|
|
|
|
{
|
2002-10-20 01:48:28 +00:00
|
|
|
QIndexDialogBase::show();
|
2002-09-11 17:42:45 +00:00
|
|
|
keywordED->setFocus();
|
|
|
|
}
|
|
|
|
|
2002-10-20 01:48:28 +00:00
|
|
|
|
2001-08-23 21:21:50 +00:00
|
|
|
void QIndexDialog::change_adaptor()
|
|
|
|
{
|
|
|
|
form_->changed();
|
|
|
|
}
|
|
|
|
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-08-26 18:49:33 +00:00
|
|
|
void QIndexDialog::closeEvent(QCloseEvent * e)
|
2001-08-19 13:25:15 +00:00
|
|
|
{
|
2001-08-21 01:14:54 +00:00
|
|
|
form_->slotWMHide();
|
2001-08-19 13:25:15 +00:00
|
|
|
e->accept();
|
|
|
|
}
|