2001-02-14 19:43:56 +00:00
|
|
|
/**
|
2002-10-30 19:47:15 +00:00
|
|
|
* \file QLPrintDialog.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-02-14 19:43:56 +00:00
|
|
|
*
|
2002-09-24 13:57:09 +00:00
|
|
|
* \author John Levon
|
|
|
|
* \author Edwin Leuven
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2001-02-14 19:43:56 +00:00
|
|
|
*/
|
|
|
|
|
2002-06-19 03:38:44 +00:00
|
|
|
#include <config.h>
|
2002-09-24 13:57:09 +00:00
|
|
|
|
2004-08-08 13:17:22 +00:00
|
|
|
#include "controllers/ControlPrint.h"
|
2002-10-30 19:47:15 +00:00
|
|
|
#include "QLPrintDialog.h"
|
2004-05-20 09:36:28 +00:00
|
|
|
#include "QPrint.h"
|
|
|
|
#include "qt_helpers.h"
|
2002-06-19 03:38:44 +00:00
|
|
|
|
2001-08-19 13:25:15 +00:00
|
|
|
#include <qcheckbox.h>
|
|
|
|
#include <qlineedit.h>
|
|
|
|
#include <qpushbutton.h>
|
|
|
|
#include <qradiobutton.h>
|
2001-02-14 19:43:56 +00:00
|
|
|
|
2004-05-19 15:11:37 +00:00
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
2002-10-20 01:48:28 +00:00
|
|
|
|
2002-10-30 19:47:15 +00:00
|
|
|
QLPrintDialog::QLPrintDialog(QPrint * f)
|
2004-06-02 20:13:18 +00:00
|
|
|
: QPrintDialogBase(0, 0, false, 0),
|
2001-08-19 13:25:15 +00:00
|
|
|
form_(f)
|
2001-02-14 19:43:56 +00:00
|
|
|
{
|
2001-08-29 21:11:30 +00:00
|
|
|
connect(printPB, SIGNAL(clicked()),
|
|
|
|
form_, SLOT(slotOK()));
|
|
|
|
connect(closePB, SIGNAL(clicked()),
|
|
|
|
form_, SLOT(slotClose()));
|
2001-02-14 19:43:56 +00:00
|
|
|
}
|
|
|
|
|
2002-09-24 13:57:09 +00:00
|
|
|
|
2002-10-30 19:47:15 +00:00
|
|
|
void QLPrintDialog::change_adaptor()
|
2001-02-14 19:43:56 +00:00
|
|
|
{
|
2001-08-29 21:11:30 +00:00
|
|
|
form_->changed();
|
2001-02-14 19:43:56 +00:00
|
|
|
}
|
2002-03-21 21:21:28 +00:00
|
|
|
|
|
|
|
|
2002-10-30 19:47:15 +00:00
|
|
|
void QLPrintDialog::browseClicked()
|
2001-08-29 21:11:30 +00:00
|
|
|
{
|
2004-08-08 13:17:22 +00:00
|
|
|
QString file = toqstr(form_->controller().browse(""));
|
2001-08-29 21:11:30 +00:00
|
|
|
if (!file.isNull()) {
|
|
|
|
fileED->setText(file);
|
|
|
|
form_->changed();
|
2001-06-05 17:05:51 +00:00
|
|
|
}
|
2001-02-14 19:43:56 +00:00
|
|
|
}
|
|
|
|
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2002-10-30 19:47:15 +00:00
|
|
|
void QLPrintDialog::fileChanged()
|
2001-02-14 19:43:56 +00:00
|
|
|
{
|
2001-08-29 21:11:30 +00:00
|
|
|
if (!fileED->text().isEmpty())
|
|
|
|
fileRB->setChecked(true);
|
|
|
|
form_->changed();
|
2001-02-14 19:43:56 +00:00
|
|
|
}
|
|
|
|
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2002-10-30 19:47:15 +00:00
|
|
|
void QLPrintDialog::copiesChanged(int i)
|
2001-02-14 19:43:56 +00:00
|
|
|
{
|
2001-08-29 21:11:30 +00:00
|
|
|
collateCB->setEnabled(i != 1);
|
|
|
|
form_->changed();
|
2001-02-14 19:43:56 +00:00
|
|
|
}
|
|
|
|
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2002-10-30 19:47:15 +00:00
|
|
|
void QLPrintDialog::printerChanged()
|
2001-02-14 19:43:56 +00:00
|
|
|
{
|
2001-08-29 21:11:30 +00:00
|
|
|
printerRB->setChecked(true);
|
|
|
|
form_->changed();
|
2001-02-14 19:43:56 +00:00
|
|
|
}
|
|
|
|
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2002-10-30 19:47:15 +00:00
|
|
|
void QLPrintDialog::pagerangeChanged()
|
2001-02-14 19:43:56 +00:00
|
|
|
{
|
2001-08-29 21:11:30 +00:00
|
|
|
form_->changed();
|
2001-02-14 19:43:56 +00:00
|
|
|
}
|
2004-05-19 15:11:37 +00:00
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|