add print dialog back

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2622 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2001-08-29 21:11:30 +00:00
parent 37278639f6
commit 075eb92607
7 changed files with 385 additions and 407 deletions

View File

@ -1,3 +1,10 @@
2001-08-29 John Levon <moz@compsoc.man.ac.uk>
* Dialogs.C:
* QPrint.[Ch]:
* QPrintDialog.[Ch]:
* ui/QPrintDialog.ui: add print dialog back
2001-08-29 John Levon <moz@compsoc.man.ac.uk> 2001-08-29 John Levon <moz@compsoc.man.ac.uk>
* Makefile.am: * Makefile.am:

View File

@ -26,6 +26,7 @@
#include "QLogDialog.h" #include "QLogDialog.h"
#include "QMinipageDialog.h" #include "QMinipageDialog.h"
#include "QPreambleDialog.h" #include "QPreambleDialog.h"
#include "QPrintDialog.h"
#include "QRefDialog.h" #include "QRefDialog.h"
#include "QTabularCreateDialog.h" #include "QTabularCreateDialog.h"
#include "QThesaurusDialog.h" #include "QThesaurusDialog.h"
@ -77,6 +78,7 @@
#include "controllers/ControlLog.h" #include "controllers/ControlLog.h"
#include "controllers/ControlMinipage.h" #include "controllers/ControlMinipage.h"
#include "controllers/ControlPreamble.h" #include "controllers/ControlPreamble.h"
#include "controllers/ControlPrint.h"
#include "controllers/ControlRef.h" #include "controllers/ControlRef.h"
#include "controllers/ControlSplash.h" #include "controllers/ControlSplash.h"
#include "controllers/ControlTabularCreate.h" #include "controllers/ControlTabularCreate.h"
@ -88,7 +90,6 @@
#include "controllers/ControlCitation.h" #include "controllers/ControlCitation.h"
#include "controllers/ControlFloat.h" #include "controllers/ControlFloat.h"
#include "controllers/ControlLabel.h" #include "controllers/ControlLabel.h"
#include "controllers/ControlPrint.h"
#include "controllers/ControlRef.h" #include "controllers/ControlRef.h"
#include "controllers/ControlSearch.h" #include "controllers/ControlSearch.h"
#include "controllers/ControlSpellchecker.h" #include "controllers/ControlSpellchecker.h"
@ -120,6 +121,7 @@ Dialogs::Dialogs(LyXView * lv)
add(new GUILog<QLog, Qt2BC>(*lv, *this)); add(new GUILog<QLog, Qt2BC>(*lv, *this));
add(new GUIMinipage<QMinipage, Qt2BC>(*lv, *this)); add(new GUIMinipage<QMinipage, Qt2BC>(*lv, *this));
add(new GUIPreamble<QPreamble, Qt2BC>(*lv, *this)); add(new GUIPreamble<QPreamble, Qt2BC>(*lv, *this));
add(new GUIPrint<QPrint, Qt2BC>(*lv, *this));
add(new GUIRef<QRef, Qt2BC>(*lv, *this)); add(new GUIRef<QRef, Qt2BC>(*lv, *this));
add(new GUITabularCreate<QTabularCreate, Qt2BC>(*lv, *this)); add(new GUITabularCreate<QTabularCreate, Qt2BC>(*lv, *this));
add(new GUIThesaurus<QThesaurus, Qt2BC>(*lv, *this)); add(new GUIThesaurus<QThesaurus, Qt2BC>(*lv, *this));

View File

@ -1,131 +1,121 @@
/** /**
* \file QPrint.C * \file QPrint.C
* Copyright 2001 LyX Team * Copyright 2001 the LyX Team
* see the file COPYING * Read the file COPYING
* *
* \author John Levon, moz@compsoc.man.ac.uk * \author John Levon <moz@compsoc.man.ac.uk>
* \author Edwin Leuven, leuven@fee.uva.nl
*/ */
#include <config.h> #include <config.h>
#ifdef __GNUG__
#pragma implementation
#endif
#include <qlineedit.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qspinbox.h>
#include <qpushbutton.h>
#include "QPrintDialog.h" #include "QPrintDialog.h"
#include "QPrint.h" #include "QPrint.h"
#include "Dialogs.h" #include "Qt2BC.h"
#include "gettext.h" #include "gettext.h"
#include "buffer.h"
#include "lyxrc.h"
#include "QtLyXView.h"
#include "PrinterParams.h"
#include "Liason.h"
#include "BufferView.h"
#include "support/lstrings.h"
#include "qmessagebox.h"
using Liason::printBuffer;
using Liason::getPrinterParams;
using std::max;
QPrint::QPrint(LyXView *v, Dialogs *d)
: dialog_(0), lv_(v), d_(d), h_(0), u_(0)
{
d->showPrint.connect(SigC::slot(this, &QPrint::show));
}
QPrint::~QPrint()
{
delete dialog_;
}
// we can safely ignore the parameter because we can always update
void QPrint::update(bool)
{
if (!lv_->view()->available())
return;
PrinterParams pp(getPrinterParams(lv_->buffer()));
dialog_->setTarget(pp.target);
dialog_->setPrinter(pp.printer_name.c_str());
dialog_->setFile(pp.file_name.c_str());
dialog_->setWhichPages(pp.which_pages);
dialog_->setReverse(pp.reverse_order);
dialog_->setSort(pp.unsorted_copies);
dialog_->setCount(pp.count_copies);
if (!pp.from_page.empty()) {
dialog_->setFrom(pp.from_page.c_str());
if (pp.to_page)
dialog_->setTo(tostr(pp.to_page).c_str());
else
dialog_->setTo("");
} else {
dialog_->setFrom("");
dialog_->setTo("");
}
}
void QPrint::print() #include "QtLyXView.h"
#include "ControlPrint.h"
#include "support/lstrings.h"
typedef Qt2CB<ControlPrint, Qt2DB<QPrintDialog> > base_class;
QPrint::QPrint(ControlPrint & c)
: base_class(c, _("Print"))
{ {
if (!lv_->view()->available()) }
return;
void QPrint::build_dialog()
{
dialog_.reset(new QPrintDialog(this));
bc().setOK(dialog_->printPB);
bc().setCancel(dialog_->closePB);
}
void QPrint::update_contents()
{
PrinterParams & pp = controller().params();
dialog_->printerED->setText(pp.printer_name.c_str());
dialog_->fileED->setText(pp.file_name.c_str());
dialog_->printerRB->setChecked(true);
if (pp.target == PrinterParams::FILE)
dialog_->fileRB->setChecked(true);
dialog_->reverseCB->setChecked(pp.reverse_order);
QRadioButton * button;
switch (pp.which_pages) {
case PrinterParams::ALL: button = dialog_->allRB; break;
case PrinterParams::ODD: button = dialog_->oddRB; break;
case PrinterParams::EVEN: button = dialog_->evenRB; break;
}
button->setChecked(true);
// hmmm... maybe a bit weird but maybe not
// we might just be remembering the last
// time this was printed.
if (!pp.from_page.empty()) {
dialog_->fromED->setText(pp.from_page.c_str());
dialog_->toED->setText("");
if (pp.to_page)
dialog_->toED->setText(tostr(pp.to_page).c_str());
} else {
dialog_->fromED->setText("");
dialog_->toED->setText("");
}
dialog_->copiesSB->setValue(pp.count_copies);
}
void QPrint::apply()
{
PrinterParams::WhichPages wp;
if (dialog_->allRB->isChecked())
wp = PrinterParams::ALL;
else if (dialog_->oddRB->isChecked())
wp = PrinterParams::ODD;
else
wp = PrinterParams::EVEN;
string from; string from;
int to(0); int to(0);
if (!dialog_->fromED->text().isEmpty()) {
if (strlen(dialog_->getFrom())) { // we have at least one page requested
from = dialog_->getFrom(); from = dialog_->fromED->text().latin1();
if (strlen(dialog_->getTo())) if (!dialog_->toED->text().isEmpty())
to = strToInt(dialog_->getTo()); to = strToInt(dialog_->toED->text().latin1());
}
int retval = printBuffer(lv_->buffer(), PrinterParams(dialog_->getTarget(),
string(dialog_->getPrinter()), string(dialog_->getFile()),
dialog_->getWhichPages(), from, to, dialog_->getReverse(),
dialog_->getSort(), max(strToInt(dialog_->getCount()),1)));
if (!retval) {
// FIXME: should have a utility class for this
string message(_("An error occured while printing.\n\n"));
message += _("Check the parameters are correct.\n");
QMessageBox msg( _("LyX: Print Error"), message.c_str(), QMessageBox::Warning, 1,0,0);
msg.raise();
msg.setActiveWindow();
msg.show();
}
}
void QPrint::show()
{
if (!dialog_)
dialog_ = new QPrintDialog(this, 0, _("LyX: Print"));
if (!dialog_->isVisible()) {
h_ = d_->hideBufferDependent.connect(SigC::slot(this, &QPrint::hide));
u_ = d_->updateBufferDependent.connect(SigC::slot(this, &QPrint::update));
} }
dialog_->raise(); PrinterParams::Target t = PrinterParams::PRINTER;
dialog_->setActiveWindow(); if (dialog_->fileRB->isChecked())
t = PrinterParams::FILE;
PrinterParams const pp(t,
dialog_->printerED->text().latin1(),
dialog_->fileED->text().latin1(),
wp, from, to,
dialog_->reverseCB->isChecked(),
!dialog_->collateCB->isChecked(),
strToInt(dialog_->copiesSB->text().latin1()));
update(); controller().params() = pp;
dialog_->show();
}
void QPrint::close()
{
h_.disconnect();
u_.disconnect();
}
void QPrint::hide()
{
dialog_->hide();
close();
} }

View File

@ -1,54 +1,42 @@
// -*- C++ -*- // -*- C++ -*-
/** /**
* \file QPrint.h * \file QPrint.h
* Copyright 2001 LyX Team * Copyright 2001 the LyX Team
* see the file COPYING * Read the file COPYING
* *
* \author John Levon, moz@compsoc.man.ac.uk * \author John Levon <moz@compsoc.man.ac.uk>
* \author Edwin Leuven, leuven@fee.uva.nl
*/ */
#ifndef QPRINT_H #ifndef QPRINT_H
#define QPRINT_H #define QPRINT_H
#include "DialogBase.h" #ifdef __GNUG__
#include "boost/utility.hpp" #pragma interface
#endif
class Dialogs; #include "Qt2Base.h"
class LyXView;
class ControlPrint;
class QPrintDialog; class QPrintDialog;
class QPrint : public DialogBase { ///
public: class QPrint
QPrint(LyXView *, Dialogs *); : public Qt2CB<ControlPrint, Qt2DB<QPrintDialog> >
~QPrint(); {
public:
///
friend class QPrintDialog;
///
QPrint(ControlPrint &);
/// start print private:
void print(); /// Apply changes
/// close virtual void apply();
void close(); /// update
virtual void update_contents();
private: /// build the dialog
/// Create the dialog if necessary, update it and display it. virtual void build_dialog();
void show();
/// Hide the dialog.
void hide();
/// Update the dialog.
void update(bool = false);
/// Real GUI implementation.
QPrintDialog * dialog_;
/// the LyXView we belong to
LyXView * lv_;
/** Which Dialogs do we belong to?
Used so we can get at the signals we have to connect to.
*/
Dialogs * d_;
/// Hide connection.
SigC::Connection h_;
/// Update connection.
SigC::Connection u_;
}; };
#endif // QPRINT_H #endif // QPRINT_H

View File

@ -22,161 +22,66 @@
#include "support/filetools.h" #include "support/filetools.h"
#include "support/lstrings.h" #include "support/lstrings.h"
#include "lyxrc.h"
#include "PrinterParams.h"
#include <gettext.h> #include <gettext.h>
#include <cstring>
QPrintDialog::QPrintDialog(QPrint * f, QWidget * parent, const char * name, bool modal, WFlags fl) QPrintDialog::QPrintDialog(QPrint * f)
: QPrintDialogBase(parent, name, modal, fl), : QPrintDialogBase(0, 0, false, 0),
form_(f) form_(f)
{ {
setCaption(name); connect(printPB, SIGNAL(clicked()),
form_, SLOT(slotOK()));
connect(closePB, SIGNAL(clicked()),
form_, SLOT(slotClose()));
} }
void QPrintDialog::change_adaptor()
QPrintDialog::~QPrintDialog()
{ {
form_->changed();
} }
const char * QPrintDialog::getFrom() { void QPrintDialog::browseClicked()
return fromPage->text(); {
} QString file = QFileDialog::getOpenFileName(QString::null,
_("PostScript files (*.ps)"), this, 0, _("Select a file to print to"));
if (!file.isNull()) {
const char * QPrintDialog::getTo() { fileED->setText(file);
return toPage->text(); form_->changed();
}
PrinterParams::Target QPrintDialog::getTarget() {
if (toPrinter->isChecked())
return PrinterParams::PRINTER;
else
return PrinterParams::FILE;
}
const char * QPrintDialog::getPrinter() {
return printerName->text();
}
const char * QPrintDialog::getFile() {
return fileName->text();
}
PrinterParams::WhichPages QPrintDialog::getWhichPages() {
if (oddPages->isChecked())
return PrinterParams::ODD;
else if (evenPages->isChecked())
return PrinterParams::EVEN;
else
return PrinterParams::ALL;
}
bool QPrintDialog::getReverse() {
return reverse->isChecked();
}
bool QPrintDialog::getSort() {
return collate->isChecked();
}
const char * QPrintDialog::getCount() {
return copies->text();
}
void QPrintDialog::setTarget(PrinterParams::Target t) {
toPrinter->setChecked(t==PrinterParams::PRINTER);
toFile->setChecked(t!=PrinterParams::PRINTER);
}
void QPrintDialog::setPrinter(const char * name) {
printerName->setText(name);
}
void QPrintDialog::setFile(const char * name) {
fileName->setText(name);
}
void QPrintDialog::setWhichPages(PrinterParams::WhichPages wp) {
switch (wp) {
case PrinterParams::ALL:
allPages->setChecked(true);
break;
case PrinterParams::EVEN:
evenPages->setChecked(true);
break;
case PrinterParams::ODD:
oddPages->setChecked(true);
break;
} }
} }
void QPrintDialog::setReverse(bool on) { void QPrintDialog::fileChanged()
reverse->setChecked(on); {
} if (!fileED->text().isEmpty())
fileRB->setChecked(true);
form_->changed();
void QPrintDialog::setSort(bool on) {
collate->setChecked(on);
}
void QPrintDialog::setCount(int num) {
copies->setValue(num);
collate->setEnabled(num > 1);
}
void QPrintDialog::setFrom(const char * text) {
fromPage->setText(text);
}
void QPrintDialog::setTo(const char * text) {
toPage->setText(text);
} }
void QPrintDialog::browse_file() void QPrintDialog::copiesChanged(int i)
{ {
QString d( OnlyPath(tostr(fileName->text())).c_str()); collateCB->setEnabled(i != 1);
QString s( QFileDialog::getOpenFileName(d, "PostScript Files (*.ps)", this)); form_->changed();
if (!s.isNull())
fileName->setText(s);
} }
void QPrintDialog::print() void QPrintDialog::printerChanged()
{ {
form_->print(); printerRB->setChecked(true);
form_->close(); form_->changed();
hide();
} }
void QPrintDialog::cancel_adaptor() void QPrintDialog::pagerangeChanged()
{ {
form_->close(); int from = strToUnsignedInt(fromED->text().latin1());
hide(); int to = strToUnsignedInt(toED->text().latin1());
}
void QPrintDialog::set_collate(int copies) if (!toED->text().isEmpty() && from > to)
{ fromED->setText(toED->text());
collate->setEnabled(copies > 1);
form_->changed();
} }

View File

@ -22,35 +22,15 @@ class QPrintDialog : public QPrintDialogBase
{ Q_OBJECT { Q_OBJECT
public: public:
QPrintDialog(QPrint * f, QWidget * parent = 0, const char * name = 0, bool modal = FALSE, WFlags fl = 0); QPrintDialog(QPrint * f);
~QPrintDialog();
// FIXME: these should return std::string !
const char * getFrom();
const char * getTo();
const char * getPrinter();
const char * getFile();
const char * getCount();
PrinterParams::Target getTarget();
PrinterParams::WhichPages getWhichPages();
bool getReverse();
bool getSort();
void setFrom(const char *);
void setTo(const char *);
void setPrinter(const char *);
void setFile(const char *);
void setCount(int);
void setTarget(PrinterParams::Target);
void setWhichPages(PrinterParams::WhichPages);
void setReverse(bool);
void setSort(bool);
protected slots: protected slots:
void cancel_adaptor(); virtual void change_adaptor();
void browse_file(); virtual void browseClicked();
void print(); virtual void fileChanged();
void set_collate(int); virtual void copiesChanged(int);
virtual void printerChanged();
virtual void pagerangeChanged();
private: private:
QPrint * form_; QPrint * form_;

View File

@ -13,13 +13,13 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>359</width> <width>331</width>
<height>342</height> <height>342</height>
</rect> </rect>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>caption</name> <name>caption</name>
<string>Form1</string> <string>Print</string>
</property> </property>
<vbox> <vbox>
<property stdset="1"> <property stdset="1">
@ -56,44 +56,60 @@
<class>QRadioButton</class> <class>QRadioButton</class>
<property stdset="1"> <property stdset="1">
<name>name</name> <name>name</name>
<cstring>toPrinter</cstring> <cstring>printerRB</cstring>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>&amp;Printer</string> <string>P&amp;rinter</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>checked</name> <name>checked</name>
<bool>true</bool> <bool>true</bool>
</property> </property>
<property>
<name>toolTip</name>
<string>Send output to the printer</string>
</property>
</widget> </widget>
<widget row="1" column="0" > <widget row="1" column="0" >
<class>QRadioButton</class> <class>QRadioButton</class>
<property stdset="1"> <property stdset="1">
<name>name</name> <name>name</name>
<cstring>toFile</cstring> <cstring>fileRB</cstring>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>&amp;File</string> <string>&amp;File</string>
</property> </property>
<property>
<name>toolTip</name>
<string>Send output to a file</string>
</property>
</widget> </widget>
<widget row="0" column="1" > <widget row="0" column="1" >
<class>QLineEdit</class> <class>QLineEdit</class>
<property stdset="1"> <property stdset="1">
<name>name</name> <name>name</name>
<cstring>printerName</cstring> <cstring>printerED</cstring>
</property>
<property>
<name>toolTip</name>
<string>Send output to the given printer</string>
</property> </property>
</widget> </widget>
<widget row="1" column="1" > <widget row="1" column="1" >
<class>QLineEdit</class> <class>QLineEdit</class>
<property stdset="1"> <property stdset="1">
<name>name</name> <name>name</name>
<cstring>fileName</cstring> <cstring>fileED</cstring>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>enabled</name> <name>enabled</name>
<bool>false</bool> <bool>true</bool>
</property>
<property>
<name>toolTip</name>
<string>Send output to a file</string>
</property> </property>
</widget> </widget>
<widget row="1" column="2" > <widget row="1" column="2" >
@ -104,11 +120,11 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>&amp;Browse...</string> <string>&amp;Browse ...</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>enabled</name> <name>enabled</name>
<bool>false</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</grid> </grid>
@ -133,58 +149,55 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>spacing</name> <name>spacing</name>
<number>3</number> <number>6</number>
</property> </property>
<widget row="0" column="0" > <widget row="0" column="0" >
<class>QRadioButton</class> <class>QRadioButton</class>
<property stdset="1"> <property stdset="1">
<name>name</name> <name>name</name>
<cstring>allPages</cstring> <cstring>allRB</cstring>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>All</string> <string>&amp;All</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>checked</name> <name>checked</name>
<bool>true</bool> <bool>true</bool>
</property> </property>
<property>
<name>toolTip</name>
<string>Print all pages</string>
</property>
</widget> </widget>
<widget row="1" column="0" > <widget row="1" column="0" >
<class>QRadioButton</class> <class>QRadioButton</class>
<property stdset="1"> <property stdset="1">
<name>name</name> <name>name</name>
<cstring>oddPages</cstring> <cstring>oddRB</cstring>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>Odd</string> <string>&amp;Odd</string>
</property>
<property>
<name>toolTip</name>
<string>Print odd pages only</string>
</property> </property>
</widget> </widget>
<widget row="2" column="0" > <widget row="2" column="0" >
<class>QRadioButton</class> <class>QRadioButton</class>
<property stdset="1"> <property stdset="1">
<name>name</name> <name>name</name>
<cstring>evenPages</cstring> <cstring>evenRB</cstring>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>Even</string> <string>&amp;Even</string>
</property> </property>
</widget> <property>
<widget row="3" column="1" > <name>toolTip</name>
<class>QLabel</class> <string>Print even pages only</string>
<property stdset="1">
<name>name</name>
<cstring>fromPageL</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Starting range:</string>
</property>
<property stdset="1">
<name>enabled</name>
<bool>false</bool>
</property> </property>
</widget> </widget>
<widget row="3" column="2" > <widget row="3" column="2" >
@ -195,55 +208,98 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>Last page:</string> <string>&amp;Last page:</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>enabled</name> <name>enabled</name>
<bool>false</bool> <bool>true</bool>
</property>
<property>
<name>buddy</name>
<cstring>toED</cstring>
</property> </property>
</widget> </widget>
<widget row="4" column="2" > <widget row="4" column="2" >
<class>QLineEdit</class> <class>QLineEdit</class>
<property stdset="1"> <property stdset="1">
<name>name</name> <name>name</name>
<cstring>toPage</cstring> <cstring>toED</cstring>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>enabled</name> <name>enabled</name>
<bool>false</bool> <bool>true</bool>
</property>
<property>
<name>toolTip</name>
<string>Page number to print to</string>
</property> </property>
</widget> </widget>
<widget row="0" column="2" > <widget row="0" column="2" >
<class>QCheckBox</class> <class>QCheckBox</class>
<property stdset="1"> <property stdset="1">
<name>name</name> <name>name</name>
<cstring>reverse</cstring> <cstring>reverseCB</cstring>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>&amp;Reverse order</string> <string>Re&amp;verse order</string>
</property>
<property>
<name>toolTip</name>
<string>Print in reverse order</string>
</property> </property>
</widget> </widget>
<widget row="4" column="1" > <widget row="4" column="1" >
<class>QLineEdit</class> <class>QLineEdit</class>
<property stdset="1"> <property stdset="1">
<name>name</name> <name>name</name>
<cstring>fromPage</cstring> <cstring>fromED</cstring>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>enabled</name> <name>enabled</name>
<bool>false</bool> <bool>true</bool>
</property>
<property>
<name>toolTip</name>
<string>Page number to print from</string>
</property> </property>
</widget> </widget>
<widget row="4" column="0" > <widget row="4" column="0" >
<class>QRadioButton</class> <class>QLabel</class>
<property stdset="1"> <property stdset="1">
<name>name</name> <name>name</name>
<cstring>customPages</cstring> <cstring>rangeLA</cstring>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>Pages:</string> <string>Ran&amp;ge</string>
</property>
<property>
<name>buddy</name>
<cstring>fromED</cstring>
</property>
<property>
<name>toolTip</name>
<string>Set a range of pages to print</string>
</property>
</widget>
<widget row="3" column="1" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>fromPageL</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;Starting range:</string>
</property>
<property stdset="1">
<name>enabled</name>
<bool>true</bool>
</property>
<property>
<name>buddy</name>
<cstring>fromED</cstring>
</property> </property>
</widget> </widget>
</grid> </grid>
@ -271,7 +327,7 @@
<class>QSpinBox</class> <class>QSpinBox</class>
<property stdset="1"> <property stdset="1">
<name>name</name> <name>name</name>
<cstring>copies</cstring> <cstring>copiesSB</cstring>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>minValue</name> <name>minValue</name>
@ -281,21 +337,29 @@
<name>value</name> <name>value</name>
<number>1</number> <number>1</number>
</property> </property>
<property>
<name>toolTip</name>
<string>Number of copies</string>
</property>
</widget> </widget>
<widget> <widget>
<class>QCheckBox</class> <class>QCheckBox</class>
<property stdset="1"> <property stdset="1">
<name>name</name> <name>name</name>
<cstring>collate</cstring> <cstring>collateCB</cstring>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>Co&amp;llate</string> <string>&amp;Collate</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>enabled</name> <name>enabled</name>
<bool>false</bool> <bool>false</bool>
</property> </property>
<property>
<name>toolTip</name>
<string>Collate copies</string>
</property>
</widget> </widget>
<spacer> <spacer>
<property> <property>
@ -371,11 +435,11 @@
<class>QPushButton</class> <class>QPushButton</class>
<property stdset="1"> <property stdset="1">
<name>name</name> <name>name</name>
<cstring>cancelPB</cstring> <cstring>closePB</cstring>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>&amp;Cancel</string> <string>Close</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>default</name> <name>default</name>
@ -388,75 +452,117 @@
</widget> </widget>
<connections> <connections>
<connection> <connection>
<sender>toFile</sender> <sender>copiesSB</sender>
<signal>toggled(bool)</signal>
<receiver>browsePB</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>toFile</sender>
<signal>toggled(bool)</signal>
<receiver>fileName</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>toFile</sender>
<signal>toggled(bool)</signal>
<receiver>printerName</receiver>
<slot>setDisabled(bool)</slot>
</connection>
<connection>
<sender>printPB</sender>
<signal>clicked()</signal>
<receiver>QPrintDialogBase</receiver>
<slot>print()</slot>
</connection>
<connection>
<sender>cancelPB</sender>
<signal>clicked()</signal>
<receiver>QPrintDialogBase</receiver>
<slot>cancel_adaptor()</slot>
</connection>
<connection>
<sender>copies</sender>
<signal>valueChanged(int)</signal> <signal>valueChanged(int)</signal>
<receiver>QPrintDialogBase</receiver> <receiver>QPrintDialogBase</receiver>
<slot>set_collate(int)</slot> <slot>copiesChanged(int)</slot>
</connection>
<connection>
<sender>printerED</sender>
<signal>textChanged(const QString&amp;)</signal>
<receiver>QPrintDialogBase</receiver>
<slot>printerChanged()</slot>
</connection>
<connection>
<sender>fileED</sender>
<signal>textChanged(const QString&amp;)</signal>
<receiver>QPrintDialogBase</receiver>
<slot>fileChanged()</slot>
</connection> </connection>
<connection> <connection>
<sender>browsePB</sender> <sender>browsePB</sender>
<signal>clicked()</signal> <signal>clicked()</signal>
<receiver>QPrintDialogBase</receiver> <receiver>QPrintDialogBase</receiver>
<slot>browse_file()</slot> <slot>browseClicked()</slot>
</connection> </connection>
<connection> <connection>
<sender>customPages</sender> <sender>allRB</sender>
<signal>toggled(bool)</signal> <signal>toggled(bool)</signal>
<receiver>fromPage</receiver> <receiver>QPrintDialogBase</receiver>
<slot>setEnabled(bool)</slot> <slot>change_adaptor()</slot>
</connection> </connection>
<connection> <connection>
<sender>customPages</sender> <sender>oddRB</sender>
<signal>toggled(bool)</signal> <signal>toggled(bool)</signal>
<receiver>fromPageL</receiver> <receiver>QPrintDialogBase</receiver>
<slot>setEnabled(bool)</slot> <slot>change_adaptor()</slot>
</connection> </connection>
<connection> <connection>
<sender>customPages</sender> <sender>evenRB</sender>
<signal>toggled(bool)</signal> <signal>toggled(bool)</signal>
<receiver>toPage</receiver> <receiver>QPrintDialogBase</receiver>
<slot>setEnabled(bool)</slot> <slot>change_adaptor()</slot>
</connection> </connection>
<connection> <connection>
<sender>customPages</sender> <sender>reverseCB</sender>
<signal>toggled(bool)</signal> <signal>toggled(bool)</signal>
<receiver>toPageL</receiver> <receiver>QPrintDialogBase</receiver>
<slot>setEnabled(bool)</slot> <slot>change_adaptor()</slot>
</connection> </connection>
<slot access="protected">cancel_adaptor()</slot> <connection>
<slot access="protected">enable_pagerange(int)</slot> <sender>collateCB</sender>
<slot access="protected">browse_file()</slot> <signal>toggled(bool)</signal>
<slot access="protected">print()</slot> <receiver>QPrintDialogBase</receiver>
<slot access="protected">set_collate(int)</slot> <slot>change_adaptor()</slot>
</connection>
<connection>
<sender>fromED</sender>
<signal>textChanged(const QString&amp;)</signal>
<receiver>QPrintDialogBase</receiver>
<slot>pagerangeChanged()</slot>
</connection>
<connection>
<sender>fromED</sender>
<signal>textChanged(const QString&amp;)</signal>
<receiver>QPrintDialogBase</receiver>
<slot>change_adaptor()</slot>
</connection>
<connection>
<sender>toED</sender>
<signal>textChanged(const QString&amp;)</signal>
<receiver>QPrintDialogBase</receiver>
<slot>pagerangeChanged()</slot>
</connection>
<connection>
<sender>toED</sender>
<signal>textChanged(const QString&amp;)</signal>
<receiver>QPrintDialogBase</receiver>
<slot>change_adaptor()</slot>
</connection>
<connection>
<sender>fileRB</sender>
<signal>toggled(bool)</signal>
<receiver>QPrintDialogBase</receiver>
<slot>change_adaptor()</slot>
</connection>
<connection>
<sender>printerRB</sender>
<signal>toggled(bool)</signal>
<receiver>QPrintDialogBase</receiver>
<slot>change_adaptor()</slot>
</connection>
<slot access="protected">browseClicked()</slot>
<slot access="public">change_adaptor()</slot>
<slot access="public">copiesChanged(int)</slot>
<slot access="public">fileChanged()</slot>
<slot access="protected">pagerangeChanged()</slot>
<slot access="public">printerChanged()</slot>
</connections> </connections>
<tabstops>
<tabstop>printerRB</tabstop>
<tabstop>printerED</tabstop>
<tabstop>fileRB</tabstop>
<tabstop>fileED</tabstop>
<tabstop>browsePB</tabstop>
<tabstop>allRB</tabstop>
<tabstop>oddRB</tabstop>
<tabstop>evenRB</tabstop>
<tabstop>fromED</tabstop>
<tabstop>toED</tabstop>
<tabstop>reverseCB</tabstop>
<tabstop>copiesSB</tabstop>
<tabstop>collateCB</tabstop>
<tabstop>printPB</tabstop>
<tabstop>closePB</tabstop>
</tabstops>
</UI> </UI>