mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
printer fixe
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5275 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
60a6e6d346
commit
5f5672e088
@ -1,3 +1,9 @@
|
||||
2002-09-11 John Levon <levon@movementarian.org>
|
||||
|
||||
* QPrint.h:
|
||||
* QPrint.C:
|
||||
* ui/QPrintDialog.ui: update for odd/even changes
|
||||
|
||||
2002-09-11 John Levon <levon@movementarian.org>
|
||||
|
||||
* QCitationDialog.C: show right info when selecting a cite
|
||||
|
@ -60,52 +60,28 @@ void QPrint::update_contents()
|
||||
|
||||
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);
|
||||
|
||||
dialog_->oddCB->setChecked(pp.odd_pages);
|
||||
dialog_->evenCB->setChecked(pp.even_pages);
|
||||
|
||||
if (pp.all_pages) {
|
||||
dialog_->allRB->setChecked(true);
|
||||
return;
|
||||
}
|
||||
|
||||
dialog_->rangeRB->setChecked(true);
|
||||
|
||||
QString s;
|
||||
s.setNum(pp.from_page);
|
||||
dialog_->fromED->setText(s);
|
||||
s.setNum(pp.to_page);
|
||||
dialog_->toED->setText(s);
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
int to(0);
|
||||
if (!dialog_->fromED->text().isEmpty()) {
|
||||
// we have at least one page requested
|
||||
from = dialog_->fromED->text().latin1();
|
||||
if (!dialog_->toED->text().isEmpty())
|
||||
to = strToInt(dialog_->toED->text().latin1());
|
||||
}
|
||||
|
||||
PrinterParams::Target t = PrinterParams::PRINTER;
|
||||
if (dialog_->fileRB->isChecked())
|
||||
t = PrinterParams::FILE;
|
||||
@ -113,10 +89,14 @@ void QPrint::apply()
|
||||
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()));
|
||||
dialog_->allRB->isChecked(),
|
||||
dialog_->fromED->text().toUInt(),
|
||||
dialog_->toED->text().toUInt(),
|
||||
dialog_->oddCB->isChecked(),
|
||||
dialog_->evenCB->isChecked(),
|
||||
dialog_->copiesSB->text().toUInt(),
|
||||
dialog_->collateCB->isChecked(),
|
||||
dialog_->reverseCB->isChecked());
|
||||
|
||||
controller().params() = pp;
|
||||
}
|
||||
|
@ -13,8 +13,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>327</width>
|
||||
<height>342</height>
|
||||
<width>225</width>
|
||||
<height>395</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
@ -54,8 +54,76 @@
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>spacing</name>
|
||||
<number>3</number>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<widget row="1" column="1" >
|
||||
<class>QLineEdit</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>fileED</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>enabled</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Send output to a file</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="2" column="1" >
|
||||
<class>QLayoutWidget</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>Layout5</cstring>
|
||||
</property>
|
||||
<hbox>
|
||||
<property stdset="1">
|
||||
<name>margin</name>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>spacing</name>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<widget>
|
||||
<class>QPushButton</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>browsePB</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>enabled</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>&Browse ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
<spacer>
|
||||
<property>
|
||||
<name>name</name>
|
||||
<cstring>Spacer15</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>orientation</name>
|
||||
<enum>Horizontal</enum>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>sizeType</name>
|
||||
<enum>Expanding</enum>
|
||||
</property>
|
||||
<property>
|
||||
<name>sizeHint</name>
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</hbox>
|
||||
</widget>
|
||||
<widget row="0" column="0" >
|
||||
<class>QRadioButton</class>
|
||||
<property stdset="1">
|
||||
@ -75,6 +143,17 @@
|
||||
<string>Send output to the printer</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="0" column="1" >
|
||||
<class>QLineEdit</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>printerED</cstring>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Send output to the given printer</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="1" column="0" >
|
||||
<class>QRadioButton</class>
|
||||
<property stdset="1">
|
||||
@ -90,47 +169,6 @@
|
||||
<string>Send output to a file</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="0" column="1" >
|
||||
<class>QLineEdit</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>printerED</cstring>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Send output to the given printer</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="1" column="1" >
|
||||
<class>QLineEdit</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>fileED</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>enabled</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Send output to a file</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="1" column="2" >
|
||||
<class>QPushButton</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>browsePB</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>enabled</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>&Browse ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<widget>
|
||||
@ -146,7 +184,7 @@
|
||||
<property>
|
||||
<name>layoutSpacing</name>
|
||||
</property>
|
||||
<grid>
|
||||
<vbox>
|
||||
<property stdset="1">
|
||||
<name>margin</name>
|
||||
<number>11</number>
|
||||
@ -155,90 +193,154 @@
|
||||
<name>spacing</name>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<widget row="0" column="0" >
|
||||
<class>QRadioButton</class>
|
||||
<widget>
|
||||
<class>QLayoutWidget</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>allRB</cstring>
|
||||
<cstring>Layout3</cstring>
|
||||
</property>
|
||||
<grid>
|
||||
<property stdset="1">
|
||||
<name>margin</name>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>spacing</name>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<widget row="1" column="1" >
|
||||
<class>QLayoutWidget</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>Layout2</cstring>
|
||||
</property>
|
||||
<hbox>
|
||||
<property stdset="1">
|
||||
<name>margin</name>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>spacing</name>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<widget>
|
||||
<class>QLineEdit</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>fromED</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>enabled</name>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Page number to print from</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget>
|
||||
<class>QLabel</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>toLA</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>&to</string>
|
||||
</property>
|
||||
<property>
|
||||
<name>buddy</name>
|
||||
<cstring>toED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget>
|
||||
<class>QLineEdit</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>toED</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>enabled</name>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Page number to print to</string>
|
||||
</property>
|
||||
</widget>
|
||||
</hbox>
|
||||
</widget>
|
||||
<widget row="1" column="0" >
|
||||
<class>QRadioButton</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>rangeRB</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>Fro&m</string>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>checked</name>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Print all pages</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="0" column="0" >
|
||||
<class>QRadioButton</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>allRB</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>&All</string>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>checked</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Print all pages</string>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<widget>
|
||||
<class>QCheckBox</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>oddCB</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>&All</string>
|
||||
<string>Print &odd-numbered pages</string>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>checked</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Print all pages</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="1" column="0" >
|
||||
<class>QRadioButton</class>
|
||||
<widget>
|
||||
<class>QCheckBox</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>oddRB</cstring>
|
||||
<cstring>evenCB</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>&Odd</string>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Print odd pages only</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="2" column="0" >
|
||||
<class>QRadioButton</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>evenRB</cstring>
|
||||
<string>Print &even-numbered pages</string>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>&Even</string>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Print even pages only</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="3" column="2" >
|
||||
<class>QLabel</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>toPageL</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>enabled</name>
|
||||
<name>checked</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>&Last page:</string>
|
||||
</property>
|
||||
<property>
|
||||
<name>buddy</name>
|
||||
<cstring>toED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="4" column="2" >
|
||||
<class>QLineEdit</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>toED</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>enabled</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Page number to print to</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="0" column="2" >
|
||||
<widget>
|
||||
<class>QCheckBox</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
@ -253,60 +355,7 @@
|
||||
<string>Print in reverse order</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="4" column="1" >
|
||||
<class>QLineEdit</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>fromED</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>enabled</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Page number to print from</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="4" column="0" >
|
||||
<class>QLabel</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>rangeLA</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>Ran&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>enabled</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>&Starting range:</string>
|
||||
</property>
|
||||
<property>
|
||||
<name>buddy</name>
|
||||
<cstring>fromED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</vbox>
|
||||
</widget>
|
||||
<widget>
|
||||
<class>QGroupBox</class>
|
||||
@ -485,18 +534,6 @@
|
||||
<receiver>QPrintDialogBase</receiver>
|
||||
<slot>change_adaptor()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>oddRB</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>QPrintDialogBase</receiver>
|
||||
<slot>change_adaptor()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>evenRB</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>QPrintDialogBase</receiver>
|
||||
<slot>change_adaptor()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>reverseCB</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
@ -545,6 +582,18 @@
|
||||
<receiver>QPrintDialogBase</receiver>
|
||||
<slot>change_adaptor()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>rangeRB</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>fromED</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>rangeRB</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>toED</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
</connection>
|
||||
<slot access="protected">browseClicked()</slot>
|
||||
<slot access="public">change_adaptor()</slot>
|
||||
<slot access="public">copiesChanged(int)</slot>
|
||||
@ -559,8 +608,6 @@
|
||||
<tabstop>fileED</tabstop>
|
||||
<tabstop>browsePB</tabstop>
|
||||
<tabstop>allRB</tabstop>
|
||||
<tabstop>oddRB</tabstop>
|
||||
<tabstop>evenRB</tabstop>
|
||||
<tabstop>fromED</tabstop>
|
||||
<tabstop>toED</tabstop>
|
||||
<tabstop>reverseCB</tabstop>
|
||||
|
Loading…
Reference in New Issue
Block a user