lyx_mirror/src/frontends/qt2/QLPrintDialog.C
Jean-Marc Lasgouttes 9e25f077c3 do not use QFileDialog directly
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8871 a592a061-630c-0410-9148-cb99ea01b6c8
2004-08-08 13:17:22 +00:00

83 lines
1.4 KiB
C

/**
* \file QLPrintDialog.C
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author John Levon
* \author Edwin Leuven
*
* Full author contact details are available in file CREDITS.
*/
#include <config.h>
#include "controllers/ControlPrint.h"
#include "QLPrintDialog.h"
#include "QPrint.h"
#include "qt_helpers.h"
#include <qcheckbox.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
namespace lyx {
namespace frontend {
QLPrintDialog::QLPrintDialog(QPrint * f)
: QPrintDialogBase(0, 0, false, 0),
form_(f)
{
connect(printPB, SIGNAL(clicked()),
form_, SLOT(slotOK()));
connect(closePB, SIGNAL(clicked()),
form_, SLOT(slotClose()));
}
void QLPrintDialog::change_adaptor()
{
form_->changed();
}
void QLPrintDialog::browseClicked()
{
QString file = toqstr(form_->controller().browse(""));
if (!file.isNull()) {
fileED->setText(file);
form_->changed();
}
}
void QLPrintDialog::fileChanged()
{
if (!fileED->text().isEmpty())
fileRB->setChecked(true);
form_->changed();
}
void QLPrintDialog::copiesChanged(int i)
{
collateCB->setEnabled(i != 1);
form_->changed();
}
void QLPrintDialog::printerChanged()
{
printerRB->setChecked(true);
form_->changed();
}
void QLPrintDialog::pagerangeChanged()
{
form_->changed();
}
} // namespace frontend
} // namespace lyx