2001-08-28 01:27:35 +00:00
|
|
|
/**
|
|
|
|
* \file QIncludeDialog.C
|
|
|
|
* Copyright 2001 the LyX Team
|
|
|
|
* Read the file COPYING
|
|
|
|
*
|
|
|
|
* \author John Levon <moz@compsoc.man.ac.uk>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include <qwidget.h>
|
|
|
|
#include <qpushbutton.h>
|
|
|
|
#include <qcheckbox.h>
|
|
|
|
|
2002-03-21 21:21:28 +00:00
|
|
|
#include "LString.h"
|
|
|
|
|
2001-08-28 01:27:35 +00:00
|
|
|
#include "QIncludeDialog.h"
|
2002-03-21 21:21:28 +00:00
|
|
|
#include "ControlInclude.h"
|
2001-08-28 01:27:35 +00:00
|
|
|
#include "Dialogs.h"
|
|
|
|
#include "QInclude.h"
|
2002-03-21 21:21:28 +00:00
|
|
|
#include "debug.h"
|
2001-08-28 01:27:35 +00:00
|
|
|
|
|
|
|
QIncludeDialog::QIncludeDialog(QInclude * form)
|
|
|
|
: QIncludeDialogBase(0, 0, false, 0),
|
|
|
|
form_(form)
|
|
|
|
{
|
|
|
|
connect(okPB, SIGNAL(clicked()),
|
|
|
|
form, SLOT(slotOK()));
|
|
|
|
connect(closePB, SIGNAL(clicked()),
|
|
|
|
form, SLOT(slotClose()));
|
|
|
|
}
|
|
|
|
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-08-28 01:27:35 +00:00
|
|
|
void QIncludeDialog::change_adaptor()
|
|
|
|
{
|
|
|
|
form_->changed();
|
|
|
|
}
|
|
|
|
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-08-28 01:27:35 +00:00
|
|
|
void QIncludeDialog::closeEvent(QCloseEvent * e)
|
|
|
|
{
|
|
|
|
form_->slotWMHide();
|
|
|
|
e->accept();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void QIncludeDialog::typeChanged(int v)
|
|
|
|
{
|
|
|
|
switch (v) {
|
|
|
|
case 0:
|
|
|
|
case 1:
|
|
|
|
visiblespaceCB->setEnabled(false);
|
|
|
|
visiblespaceCB->setChecked(false);
|
|
|
|
break;
|
2002-03-21 21:21:28 +00:00
|
|
|
default:
|
2001-08-28 01:27:35 +00:00
|
|
|
visiblespaceCB->setEnabled(true);
|
|
|
|
break;
|
2002-03-21 21:21:28 +00:00
|
|
|
}
|
2001-08-28 01:27:35 +00:00
|
|
|
}
|
|
|
|
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-08-28 01:27:35 +00:00
|
|
|
void QIncludeDialog::loadClicked()
|
|
|
|
{
|
|
|
|
form_->load();
|
|
|
|
}
|
|
|
|
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-08-28 01:27:35 +00:00
|
|
|
void QIncludeDialog::browseClicked()
|
|
|
|
{
|
|
|
|
form_->browse();
|
|
|
|
}
|