Remove printing support from LyX.

This was bug #6747.
This commit is contained in:
Richard Heck 2015-05-27 18:10:38 -04:00
parent 266a047249
commit 3c2b3e6907
23 changed files with 259 additions and 1921 deletions

View File

@ -60,7 +60,6 @@ Format 2
\bind "M-~S-i e l" "file-insert-plaintext"
\bind "M-~S-i e p" "file-insert-plaintext-para"
\bind "M-~S-f p" "buffer-print"
\bind "M-~S-f n" "buffer-new"
\bind "M-~S-f t" "buffer-new-template"
\bind "M-~S-f o" "file-open"

View File

@ -42,7 +42,6 @@ Format 2
\bind "C-w" "view-close"
\bind "C-s" "buffer-write"
\bind "C-S-S" "buffer-write-as"
\bind "C-p" "dialog-show print"
\bind "C-r" "buffer-view"
\bind "C-d" "buffer-view dvi" # 'd' for dvi
\bind "C-t" "buffer-view ps"

View File

@ -165,8 +165,6 @@ Format 2
\bind "C-S-N" "buffer-new-template"
# +: "Command-O" # Display a dialog for choosing a document to open in the frontmost application
\bind "C-o" "file-open"
# +: "Command-P" # Display the Print dialog
\bind "C-p" "dialog-show print"
# -: "Shift-Command-P" # Display a dialog for specifying printing parameters (Page Setup)
\bind "C-S-P" "font-typewriter" # 'P' for Program
# +: "Command-Q" # Quit the frontmost application

View File

@ -342,7 +342,6 @@ Format 2
## Start TeX mode, some overlap with AucTeX mode
#
\bind "C-c C-b" "buffer-update dvi"
\bind "C-c C-p" "dialog-show print"
\bind "C-c C-r" "buffer-update dvi" # tex region
#
## End TeX mode

View File

@ -1099,13 +1099,6 @@ def checkOtherEntries():
# path, OCTAVE = checkProg('Octave', ['octave'])
## FIXME: MAPLE is not used anywhere
# path, MAPLE = checkProg('Maple', ['maple'])
checkProg('a spool command', ['lp', 'lpr'],
rc_entry = [
r'''\print_spool_printerprefix "-d "
\print_spool_command "lp"''',
r'''\print_spool_printerprefix "-P",
\print_spool_command "lpr"''',
''])
# Add the rest of the entries (no checkProg is required)
addToRC(r'''\copier fig "python -tt $$s/scripts/fig_copy.py $$i $$o"
\copier pstex "python -tt $$s/scripts/tex_copy.py $$i $$o $$l"
@ -1491,7 +1484,7 @@ if __name__ == '__main__':
lyx_check_config = True
lyx_kpsewhich = True
outfile = 'lyxrc.defaults'
lyxrc_fileformat = 18
lyxrc_fileformat = 19
rc_entries = ''
lyx_keep_temps = False
version_suffix = ''

View File

@ -126,10 +126,10 @@ no_match = (False, [])
def remove_obsolete(line):
tags = ("\\use_tempdir", "\\spell_command", "\\personal_dictionary",
"\\plaintext_roff_command", "\\use_alt_language",
"\\use_escape_chars", "\\use_input_encoding",
"\\use_personal_dictionary", "\\use_pspell",
"\\use_spell_lib")
"\\plaintext_roff_command", "\\use_alt_language",
"\\use_escape_chars", "\\use_input_encoding",
"\\use_personal_dictionary", "\\use_pspell",
"\\use_spell_lib")
line = line.lower().lstrip()
for tag in tags:
if line.lower().startswith(tag):
@ -333,6 +333,17 @@ def remove_rtl(line):
return no_match
return (True, "")
def remove_print_support(line):
tags = ("\\printer", "\\print_adapt_output", "\\print_command",
"\\print_evenpage_flag", "\\print_oddpage_flag", "\\print_pagerange_flag",
"\\print_copies_flag", "\\print_collcopies_flag", "\\print_reverse_flag",
"\\print_to_printer", "\\print_to_file", "\\print_file_extension")
line = line.lower().lstrip()
for tag in tags:
if line.lower().startswith(tag):
return (True, "")
return no_match
# End conversions for LyX 2.1 to 2.2
####################################
@ -360,5 +371,6 @@ conversions = [
[ 15, []],
[ 16, [remove_force_paint_single_char]],
[ 17, [remove_rtl]],
[ 18, []]
[ 18, []],
[ 19, [remove_print_support]]
]

View File

@ -57,7 +57,6 @@ Menuset
Separator
Submenu "Import|I" "file_import"
Submenu "Export|E" "file_export"
Item "Print...|P" "dialog-show print"
OptItem "Fax...|F" "buffer-export fax"
Separator
Item "New Window|W" "window-new"

View File

@ -71,7 +71,6 @@ ToolbarSet
Item "New document" "buffer-new"
Item "Open document" "file-open"
Item "Save document" "buffer-write"
Item "Print document" "dialog-show print"
Separator
Item "Check spelling" "dialog-show spellchecker"
Item "Spellcheck continuously" "spelling-continuously"

View File

@ -2446,7 +2446,6 @@ bool Buffer::getStatus(FuncRequest const & cmd, FuncStatus & flag)
case LFUN_BRANCH_ADD:
case LFUN_BRANCHES_RENAME:
case LFUN_BUFFER_PRINT:
// if no Buffer is present, then of course we won't be called!
break;
@ -2681,125 +2680,6 @@ void Buffer::dispatch(FuncRequest const & func, DispatchResult & dr)
break;
}
case LFUN_BUFFER_PRINT: {
// we'll assume there's a problem until we succeed
dr.setError(true);
string target = func.getArg(0);
string target_name = func.getArg(1);
string command = func.getArg(2);
if (target.empty()
|| target_name.empty()
|| command.empty()) {
LYXERR0("Unable to parse " << func.argument());
docstring const msg =
bformat(_("Unable to parse \"%1$s\""), func.argument());
dr.setMessage(msg);
break;
}
if (target != "printer" && target != "file") {
LYXERR0("Unrecognized target \"" << target << '"');
docstring const msg =
bformat(_("Unrecognized target \"%1$s\""), from_utf8(target));
dr.setMessage(msg);
break;
}
if (doExport("dvi", true) != ExportSuccess) {
showPrintError(absFileName());
dr.setMessage(_("Error exporting to DVI."));
break;
}
// Push directory path.
string const path = temppath();
// Prevent the compiler from optimizing away p
FileName pp(path);
PathChanger p(pp);
// there are three cases here:
// 1. we print to a file
// 2. we print directly to a printer
// 3. we print using a spool command (print to file first)
Systemcall one;
int res = 0;
string const dviname = changeExtension(latexName(true), "dvi");
if (target == "printer") {
if (!lyxrc.print_spool_command.empty()) {
// case 3: print using a spool
string const psname = changeExtension(dviname,".ps");
command += ' ' + lyxrc.print_to_file
+ quoteName(psname)
+ ' '
+ quoteName(dviname);
string command2 = lyxrc.print_spool_command + ' ';
if (target_name != "default") {
command2 += lyxrc.print_spool_printerprefix
+ target_name
+ ' ';
}
command2 += quoteName(psname);
// First run dvips.
// If successful, then spool command
res = one.startscript(Systemcall::Wait, command,
filePath(), layoutPos());
if (res == 0) {
// If there's no GUI, we have to wait on this command. Otherwise,
// LyX deletes the temporary directory, and with it the spooled
// file, before it can be printed!!
Systemcall::Starttype stype = use_gui ?
Systemcall::DontWait : Systemcall::Wait;
res = one.startscript(stype, command2,
filePath(),
layoutPos());
}
} else {
// case 2: print directly to a printer
if (target_name != "default")
command += ' ' + lyxrc.print_to_printer + target_name + ' ';
// as above....
Systemcall::Starttype stype = use_gui ?
Systemcall::DontWait : Systemcall::Wait;
res = one.startscript(stype,
command + quoteName(dviname),
filePath(), layoutPos());
}
} else {
// case 1: print to a file
FileName const filename(makeAbsPath(target_name, filePath()));
FileName const dvifile(makeAbsPath(dviname, path));
if (filename.exists()) {
docstring text = bformat(
_("The file %1$s already exists.\n\n"
"Do you want to overwrite that file?"),
makeDisplayPath(filename.absFileName()));
if (Alert::prompt(_("Overwrite file?"),
text, 0, 1, _("&Overwrite"), _("&Cancel")) != 0)
break;
}
command += ' ' + lyxrc.print_to_file
+ quoteName(filename.toFilesystemEncoding())
+ ' '
+ quoteName(dvifile.toFilesystemEncoding());
// as above....
Systemcall::Starttype stype = use_gui ?
Systemcall::DontWait : Systemcall::Wait;
res = one.startscript(stype, command, filePath(), layoutPos());
}
if (res == 0)
dr.setError(false);
else {
dr.setMessage(_("Error running external commands."));
showPrintError(absFileName());
}
break;
}
case LFUN_BUFFER_VIEW_CACHE:
if (!formats.view(*this, d->preview_file_,
d->preview_format_))

View File

@ -321,88 +321,88 @@ enum FuncCode
LFUN_WORD_FIND,
LFUN_WORD_REPLACE,
LFUN_BUFFER_EXPORT_CUSTOM,
LFUN_BUFFER_PRINT,
LFUN_BUFFER_CLOSE_ALL, // vfr 20090806
// 245
LFUN_BUFFER_LANGUAGE,
// 245
LFUN_TEXTCLASS_APPLY,
LFUN_TEXTCLASS_LOAD,
LFUN_BUFFER_SAVE_AS_DEFAULT,
LFUN_BUFFER_PARAMS_APPLY,
// 250
LFUN_LYXRC_APPLY,
// 250
LFUN_BUFFER_NEXT,
LFUN_BUFFER_PREVIOUS,
LFUN_STATISTICS,
LFUN_CHANGES_OUTPUT, // jspitzm 20050121
// 255
LFUN_BIBTEX_DATABASE_ADD,
// 255
LFUN_BIBTEX_DATABASE_DEL,
LFUN_CITATION_INSERT,
LFUN_OUTLINE_UP,
LFUN_OUTLINE_DOWN,
// 260
LFUN_OUTLINE_IN,
// 260
LFUN_OUTLINE_OUT,
LFUN_PARAGRAPH_MOVE_DOWN,
LFUN_PARAGRAPH_MOVE_UP,
LFUN_CURSOR_FOLLOWS_SCROLLBAR_TOGGLE, // ARRae 971202
// 265
LFUN_CLIPBOARD_PASTE,
// 265
LFUN_INSET_DISSOLVE, // jspitzm 20060807
LFUN_CHANGE_NEXT,
LFUN_CHANGE_PREVIOUS, // vfr 20090404
LFUN_WINDOW_NEW, // Abdel 20061021
// 270
LFUN_WINDOW_CLOSE, // Abdel 20061023
// 270
LFUN_UNICODE_INSERT, // Lgb 20061022
LFUN_BOOKMARK_CLEAR, // bpeng 20061031
LFUN_NOMENCL_INSERT, // Ugras
LFUN_NOMENCL_PRINT, // Ugras
// 275
LFUN_LISTING_INSERT, // Herbert 20011110, bpeng 20070502
// 275
LFUN_TOOLBAR_TOGGLE, // Edwin 20070521
LFUN_BUFFER_WRITE_ALL, // rgh, gpothier 200707XX
LFUN_PARAGRAPH_PARAMS,
LFUN_LAYOUT_MODULES_CLEAR,
// 280
LFUN_LAYOUT_MODULE_ADD,
// 280
LFUN_LAYOUT_RELOAD,
LFUN_MASTER_BUFFER_VIEW, // Tommaso, 20070920
LFUN_MASTER_BUFFER_UPDATE, // Tommaso, 20070920
LFUN_INFO_INSERT, // bpeng, 20071007
// 285
LFUN_CALL, // broider, 20071002
// 285
LFUN_CHAR_LEFT, // dov, 20071022
LFUN_CHAR_LEFT_SELECT, // dov, 20071022
LFUN_CHAR_RIGHT, // dov, 20071022
LFUN_CHAR_RIGHT_SELECT, // dov, 20071022
// 290
LFUN_FINISHED_BACKWARD, // dov, 20071022
// 290
LFUN_FINISHED_FORWARD, // dov, 20071022
LFUN_WORD_LEFT, // dov, 20071028
LFUN_WORD_LEFT_SELECT, // dov, 20071028
LFUN_WORD_RIGHT, // dov, 20071028
// 295
LFUN_WORD_RIGHT_SELECT, // dov, 20071028
// 295
LFUN_MATH_MACRO_FOLD,
LFUN_MATH_MACRO_UNFOLD,
LFUN_MATH_MACRO_ADD_PARAM,
LFUN_MATH_MACRO_REMOVE_PARAM,
// 300
LFUN_MATH_MACRO_APPEND_GREEDY_PARAM,
// 300
LFUN_MATH_MACRO_REMOVE_GREEDY_PARAM,
LFUN_MATH_MACRO_MAKE_OPTIONAL,
LFUN_MATH_MACRO_MAKE_NONOPTIONAL,
LFUN_MATH_MACRO_ADD_OPTIONAL_PARAM,
// 305
LFUN_MATH_MACRO_REMOVE_OPTIONAL_PARAM,
// 305
LFUN_MATH_MACRO_ADD_GREEDY_OPTIONAL_PARAM,
LFUN_IN_MATHMACROTEMPLATE,
LFUN_COMPLETION_POPUP,
LFUN_COMPLETION_INLINE,
// 310
LFUN_COMPLETE,
// 310
LFUN_COMPLETION_COMPLETE,
LFUN_SET_GRAPHICS_GROUP,
LFUN_COMPLETION_CANCEL,
LFUN_COMPLETION_ACCEPT,

View File

@ -3127,19 +3127,6 @@ void LyXAction::init()
* \endvar
*/
{ LFUN_BUFFER_EXPORT_AS, "buffer-export-as", ReadOnly, Buffer },
/*!
* \var lyx::FuncCode lyx::LFUN_BUFFER_PRINT
* \li Action: Prints the current document.
* \li Notion: Many settings can be given via the preferences dialog.
* \li Syntax: buffer-print <TARGET> <TARGET-NAME> <COMMAND>
* \li Params: <TARGET> is either "printer" or "file".\n
<TARGER-NAME> is either "default" or file name or printer name.\n
<COMMAND> command ensuring the printing job.
* \li Sample: buffer-print file "/trash/newfile1.ps" "dvips"
* \li Origin: leeming, 28 Mar 2004
* \endvar
*/
{ LFUN_BUFFER_PRINT, "buffer-print", ReadOnly, Buffer },
/*!
* \var lyx::FuncCode lyx::LFUN_BUFFER_IMPORT
* \li Action: Import a given file as a lyx document.

View File

@ -58,7 +58,7 @@ namespace {
// The format should also be updated in configure.py, and conversion code
// should be added to prefs2prefs_prefs.py.
static unsigned int const LYXRC_FILEFORMAT = 18; // ef: save_origin
static unsigned int const LYXRC_FILEFORMAT = 19; // rgh: remove print support
// when adding something to this array keep it sorted!
LexerKeyword lyxrcTags[] = {
@ -153,24 +153,9 @@ LexerKeyword lyxrcTags[] = {
{ "\\preview", LyXRC::RC_PREVIEW },
{ "\\preview_hashed_labels", LyXRC::RC_PREVIEW_HASHED_LABELS },
{ "\\preview_scale_factor", LyXRC::RC_PREVIEW_SCALE_FACTOR },
{ "\\print_adapt_output", LyXRC::RC_PRINT_ADAPTOUTPUT },
{ "\\print_collcopies_flag", LyXRC::RC_PRINTCOLLCOPIESFLAG },
{ "\\print_command", LyXRC::RC_PRINT_COMMAND },
{ "\\print_copies_flag", LyXRC::RC_PRINTCOPIESFLAG },
{ "\\print_evenpage_flag", LyXRC::RC_PRINTEVENPAGEFLAG },
{ "\\print_extra_options", LyXRC::RC_PRINTEXSTRAOPTIONS },
{ "\\print_file_extension", LyXRC::RC_PRINTFILEEXTENSION },
{ "\\print_landscape_flag", LyXRC::RC_PRINTLANDSCAPEFLAG },
{ "\\print_oddpage_flag", LyXRC::RC_PRINTODDPAGEFLAG },
{ "\\print_pagerange_flag", LyXRC::RC_PRINTPAGERANGEFLAG },
{ "\\print_paper_dimension_flag", LyXRC::RC_PRINTPAPERDIMENSIONFLAG },
{ "\\print_paper_flag", LyXRC::RC_PRINTPAPERFLAG },
{ "\\print_reverse_flag", LyXRC::RC_PRINTREVERSEFLAG },
{ "\\print_spool_command", LyXRC::RC_PRINTSPOOL_COMMAND },
{ "\\print_spool_printerprefix", LyXRC::RC_PRINTSPOOL_PRINTERPREFIX },
{ "\\print_to_file", LyXRC::RC_PRINTTOFILE },
{ "\\print_to_printer", LyXRC::RC_PRINTTOPRINTER },
{ "\\printer", LyXRC::RC_PRINTER },
{ "\\save_compressed", LyXRC::RC_SAVE_COMPRESSED },
{ "\\save_origin", LyXRC::RC_SAVE_ORIGIN },
{ "\\screen_dpi", LyXRC::RC_SCREEN_DPI },
@ -240,21 +225,7 @@ void LyXRC::setDefaults()
ui_file = "default";
// The current document directory
texinputs_prefix = ".";
// Get printer from the environment. If fail, use default "",
// assuming that everything is set up correctly.
printer = getEnv("PRINTER");
print_adapt_output = false;
print_command = "dvips";
print_evenpage_flag = "-B";
print_oddpage_flag = "-A";
print_pagerange_flag = "-pp";
print_copies_flag = "-c";
print_collcopies_flag = "-C";
print_reverse_flag = "-r";
print_landscape_flag = "-t landscape";
print_to_printer = "-P";
print_to_file = "-o ";
print_file_extension = ".ps";
print_paper_flag = "-t";
print_paper_dimension_flag = "-T";
document_path.erase();
@ -553,76 +524,10 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format)
lexrc >> fontenc;
break;
case RC_PRINTER:
lexrc >> printer;
break;
case RC_PRINT_COMMAND:
if (lexrc.next(true)) {
print_command = lexrc.getString();
}
break;
case RC_PRINTEVENPAGEFLAG:
lexrc >> print_evenpage_flag;
break;
case RC_PRINTODDPAGEFLAG:
lexrc >> print_oddpage_flag;
break;
case RC_PRINTPAGERANGEFLAG:
lexrc >> print_pagerange_flag;
break;
case RC_PRINTCOPIESFLAG:
lexrc >> print_copies_flag;
break;
case RC_PRINTCOLLCOPIESFLAG:
lexrc >> print_collcopies_flag;
break;
case RC_PRINTREVERSEFLAG:
lexrc >> print_reverse_flag;
break;
case RC_PRINTLANDSCAPEFLAG:
lexrc >> print_landscape_flag;
break;
case RC_PRINTTOPRINTER:
lexrc >> print_to_printer;
break;
case RC_PRINT_ADAPTOUTPUT:
lexrc >> print_adapt_output;
break;
case RC_PRINTTOFILE:
if (lexrc.next()) {
print_to_file = os::internal_path(lexrc.getString());
}
break;
case RC_PRINTFILEEXTENSION:
lexrc >> print_file_extension;
break;
case RC_PRINTEXSTRAOPTIONS:
lexrc >> print_extra_options;
break;
case RC_PRINTSPOOL_COMMAND:
if (lexrc.next(true)) {
print_spool_command = lexrc.getString();
}
break;
case RC_PRINTSPOOL_PRINTERPREFIX:
lexrc >> print_spool_printerprefix;
break;
case RC_PRINTPAPERDIMENSIONFLAG:
lexrc >> print_paper_dimension_flag;
break;
@ -2049,82 +1954,10 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
if (tag != RC_LAST)
break;
os << "\n#\n"
<< "# PRINTER SECTION ###################################\n"
<< "#\n\n";
os << "\n#\n"
<< "# PRINTER SECTION ###################################\n"
<< "#\n\n";
case RC_PRINTER:
if (ignore_system_lyxrc ||
printer != system_lyxrc.printer) {
os << "\\printer \"" << printer << "\"\n";
}
if (tag != RC_LAST)
break;
case RC_PRINT_ADAPTOUTPUT:
if (ignore_system_lyxrc ||
print_adapt_output != system_lyxrc.print_adapt_output) {
os << "\\print_adapt_output "
<< convert<string>(print_adapt_output)
<< '\n';
}
if (tag != RC_LAST)
break;
case RC_PRINT_COMMAND:
if (ignore_system_lyxrc ||
print_command != system_lyxrc.print_command) {
os << "\\print_command \"" << escapeCommand(print_command) << "\"\n";
}
if (tag != RC_LAST)
break;
case RC_PRINTEXSTRAOPTIONS:
if (ignore_system_lyxrc ||
print_extra_options != system_lyxrc.print_extra_options) {
os << "\\print_extra_options \"" << print_extra_options
<< "\"\n";
}
if (tag != RC_LAST)
break;
case RC_PRINTSPOOL_COMMAND:
if (ignore_system_lyxrc ||
print_spool_command != system_lyxrc.print_spool_command) {
os << "\\print_spool_command \"" << escapeCommand(print_spool_command)
<< "\"\n";
}
if (tag != RC_LAST)
break;
case RC_PRINTSPOOL_PRINTERPREFIX:
if (ignore_system_lyxrc ||
print_spool_printerprefix
!= system_lyxrc.print_spool_printerprefix) {
os << "\\print_spool_printerprefix \""
<< print_spool_printerprefix << "\"\n";
}
if (tag != RC_LAST)
break;
case RC_PRINTEVENPAGEFLAG:
if (ignore_system_lyxrc ||
print_evenpage_flag != system_lyxrc.print_evenpage_flag) {
os << "\\print_evenpage_flag \"" << print_evenpage_flag
<< "\"\n";
}
if (tag != RC_LAST)
break;
case RC_PRINTODDPAGEFLAG:
if (ignore_system_lyxrc ||
print_oddpage_flag != system_lyxrc.print_oddpage_flag) {
os << "\\print_oddpage_flag \"" << print_oddpage_flag
<< "\"\n";
}
if (tag != RC_LAST)
break;
case RC_PRINTREVERSEFLAG:
if (ignore_system_lyxrc ||
print_reverse_flag != system_lyxrc.print_reverse_flag) {
os << "\\print_reverse_flag \"" << print_reverse_flag
<< "\"\n";
}
if (tag != RC_LAST)
break;
case RC_PRINTLANDSCAPEFLAG:
if (ignore_system_lyxrc ||
print_landscape_flag != system_lyxrc.print_landscape_flag) {
@ -2133,32 +1966,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
}
if (tag != RC_LAST)
break;
case RC_PRINTPAGERANGEFLAG:
if (ignore_system_lyxrc ||
print_pagerange_flag != system_lyxrc.print_pagerange_flag) {
os << "\\print_pagerange_flag \"" << print_pagerange_flag
<< "\"\n";
}
if (tag != RC_LAST)
break;
case RC_PRINTCOPIESFLAG:
if (ignore_system_lyxrc ||
print_copies_flag != system_lyxrc.print_copies_flag) {
os << "\\print_copies_flag \"" << print_copies_flag
<< "\"\n";
}
if (tag != RC_LAST)
break;
case RC_PRINTCOLLCOPIESFLAG:
if (ignore_system_lyxrc ||
print_collcopies_flag
!= system_lyxrc.print_collcopies_flag) {
os << "\\print_collcopies_flag \""
<< print_collcopies_flag
<< "\"\n";
}
if (tag != RC_LAST)
break;
case RC_PRINTPAPERFLAG:
if (ignore_system_lyxrc ||
print_paper_flag != system_lyxrc.print_paper_flag) {
@ -2167,6 +1975,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
}
if (tag != RC_LAST)
break;
case RC_PRINTPAPERDIMENSIONFLAG:
if (ignore_system_lyxrc ||
print_paper_dimension_flag
@ -2176,35 +1985,10 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
}
if (tag != RC_LAST)
break;
case RC_PRINTTOPRINTER:
if (ignore_system_lyxrc ||
print_to_printer != system_lyxrc.print_to_printer) {
os << "\\print_to_printer \"" << print_to_printer
<< "\"\n";
}
if (tag != RC_LAST)
break;
case RC_PRINTTOFILE:
if (ignore_system_lyxrc ||
print_to_file != system_lyxrc.print_to_file) {
string const path = os::external_path(print_to_file);
os << "\\print_to_file \"" << path << "\"\n";
}
if (tag != RC_LAST)
break;
case RC_PRINTFILEEXTENSION:
if (ignore_system_lyxrc ||
print_file_extension != system_lyxrc.print_file_extension) {
os << "\\print_file_extension \""
<< print_file_extension
<< "\"\n";
}
if (tag != RC_LAST)
break;
os << "\n#\n"
<< "# TEX SECTION #######################################\n"
<< "#\n\n";
os << "\n#\n"
<< "# TEX SECTION #######################################\n"
<< "#\n\n";
case RC_TEXINPUTS_PREFIX:
if (ignore_system_lyxrc ||
@ -3015,24 +2799,9 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new)
case LyXRC::RC_PREVIEW:
case LyXRC::RC_PREVIEW_HASHED_LABELS:
case LyXRC::RC_PREVIEW_SCALE_FACTOR:
case LyXRC::RC_PRINTCOLLCOPIESFLAG:
case LyXRC::RC_PRINTCOPIESFLAG:
case LyXRC::RC_PRINTER:
case LyXRC::RC_PRINTEVENPAGEFLAG:
case LyXRC::RC_PRINTEXSTRAOPTIONS:
case LyXRC::RC_PRINTFILEEXTENSION:
case LyXRC::RC_PRINTLANDSCAPEFLAG:
case LyXRC::RC_PRINTODDPAGEFLAG:
case LyXRC::RC_PRINTPAGERANGEFLAG:
case LyXRC::RC_PRINTPAPERDIMENSIONFLAG:
case LyXRC::RC_PRINTPAPERFLAG:
case LyXRC::RC_PRINTREVERSEFLAG:
case LyXRC::RC_PRINTSPOOL_COMMAND:
case LyXRC::RC_PRINTSPOOL_PRINTERPREFIX:
case LyXRC::RC_PRINTTOFILE:
case LyXRC::RC_PRINTTOPRINTER:
case LyXRC::RC_PRINT_ADAPTOUTPUT:
case LyXRC::RC_PRINT_COMMAND:
case LyXRC::RC_SAVE_COMPRESSED:
case LyXRC::RC_SAVE_ORIGIN:
case LyXRC::RC_SCREEN_DPI:
@ -3369,78 +3138,18 @@ string const LyXRC::getDescription(LyXRCTags tag)
str = _("Scale the preview size to suit.");
break;
case RC_PRINTCOLLCOPIESFLAG:
str = _("The option for specifying whether the copies should be collated.");
break;
case RC_PRINTCOPIESFLAG:
str = _("The option for specifying the number of copies to print.");
break;
case RC_PRINTER:
str = _("The default printer to print on. If none is specified, LyX will use the environment variable PRINTER.");
break;
case RC_PRINTEVENPAGEFLAG:
str = _("The option to print only even pages.");
break;
case RC_PRINTEXSTRAOPTIONS:
str = _("Extra options to pass to printing program after everything else, but before the filename of the DVI file to be printed.");
break;
case RC_PRINTFILEEXTENSION:
str = _("Extension of printer program output file. Usually \".ps\".");
break;
case RC_PRINTLANDSCAPEFLAG:
str = _("The option to print out in landscape.");
break;
case RC_PRINTODDPAGEFLAG:
str = _("The option to print only odd pages.");
break;
case RC_PRINTPAGERANGEFLAG:
str = _("The option for specifying a comma-separated list of pages to print.");
break;
case RC_PRINTPAPERDIMENSIONFLAG:
str = _("Option to specify the dimensions of the print paper.");
str = _("Option to specify the dimensions of the print paper.");
break;
case RC_PRINTPAPERFLAG:
str = _("The option to specify paper type.");
break;
case RC_PRINTREVERSEFLAG:
str = _("The option to reverse the order of the pages printed.");
break;
case RC_PRINTSPOOL_COMMAND:
str = _("When set, this printer option automatically prints to a file and then calls a separate print spooling program on that file with the given name and arguments.");
break;
case RC_PRINTSPOOL_PRINTERPREFIX:
str = _("If you specify a printer name in the print dialog, the following argument is prepended along with the printer name after the spool command.");
break;
case RC_PRINTTOFILE:
str = _("Option to pass to the print program to print to a file.");
break;
case RC_PRINTTOPRINTER:
str = _("Option to pass to the print program to print on a specific printer.");
break;
case RC_PRINT_ADAPTOUTPUT:
str = _("Select for LyX to pass the name of the destination printer to your print command.");
break;
case RC_PRINT_COMMAND:
str = _("Your favorite print program, e.g. \"dvips\", \"dvilj4\".");
break;
case RC_VISUAL_CURSOR:
str = _("Select to have visual bidi cursor movement, unselect for logical movement.");
break;

View File

@ -129,24 +129,9 @@ public:
RC_PREVIEW,
RC_PREVIEW_HASHED_LABELS,
RC_PREVIEW_SCALE_FACTOR,
RC_PRINTCOLLCOPIESFLAG,
RC_PRINTCOPIESFLAG,
RC_PRINTER,
RC_PRINTEVENPAGEFLAG,
RC_PRINTEXSTRAOPTIONS,
RC_PRINTFILEEXTENSION,
RC_PRINTLANDSCAPEFLAG,
RC_PRINTODDPAGEFLAG,
RC_PRINTPAGERANGEFLAG,
RC_PRINTPAPERDIMENSIONFLAG,
RC_PRINTPAPERFLAG,
RC_PRINTREVERSEFLAG,
RC_PRINTSPOOL_COMMAND,
RC_PRINTSPOOL_PRINTERPREFIX,
RC_PRINTTOFILE,
RC_PRINTTOPRINTER,
RC_PRINT_ADAPTOUTPUT,
RC_PRINT_COMMAND,
RC_SAVE_COMPRESSED,
RC_SAVE_ORIGIN,
RC_SCREEN_DPI,
@ -237,38 +222,8 @@ public:
///
std::string ui_file;
///
std::string printer;
///
std::string print_command;
///
std::string print_evenpage_flag;
///
std::string print_oddpage_flag;
///
std::string print_pagerange_flag;
///
std::string print_copies_flag;
///
std::string print_collcopies_flag;
///
std::string print_reverse_flag;
///
std::string print_landscape_flag;
///
std::string print_to_printer;
///
bool print_adapt_output;
///
std::string print_to_file;
///
std::string print_file_extension;
///
std::string print_extra_options;
///
std::string print_spool_command;
///
std::string print_spool_printerprefix;
///
std::string print_paper_flag;
///
std::string print_paper_dimension_flag;

View File

@ -23,7 +23,6 @@ namespace lyx {
PrinterParams::PrinterParams()
{
target = PRINTER;
printer_name = lyxrc.printer;
file_name = std::string();
all_pages = true;
from_page = 1;

View File

@ -403,6 +403,17 @@ PrefOutput::PrefOutput(GuiPreferences * form)
this, SIGNAL(changed()));
connect(pdfCB, SIGNAL(editTextChanged(QString)),
this, SIGNAL(changed()));
connect(printerPaperTypeED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
connect(printerLandscapeED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
connect(printerPaperSizeED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
printerPaperTypeED->setValidator(new NoNewLineValidator(printerPaperTypeED));
printerLandscapeED->setValidator(new NoNewLineValidator(printerLandscapeED));
printerPaperSizeED->setValidator(new NoNewLineValidator(printerPaperSizeED));
dviCB->addItem("");
dviCB->addItem("xdvi -sourceposition '$$n:\\ $$t' $$o");
dviCB->addItem("yap -1 -s \"$$n $$t\" $$o");
@ -447,6 +458,10 @@ void PrefOutput::applyRC(LyXRC & rc) const
rc.export_overwrite = ALL_FILES;
break;
}
rc.print_paper_flag = fromqstr(printerPaperTypeED->text());
rc.print_landscape_flag = fromqstr(printerLandscapeED->text());
rc.print_paper_dimension_flag = fromqstr(printerPaperSizeED->text());
}
@ -468,6 +483,10 @@ void PrefOutput::updateRC(LyXRC const & rc)
overwriteCO->setCurrentIndex(2);
break;
}
printerPaperTypeED->setText(toqstr(rc.print_paper_flag));
printerLandscapeED->setText(toqstr(rc.print_landscape_flag));
printerPaperSizeED->setText(toqstr(rc.print_paper_dimension_flag));
}
@ -2407,122 +2426,6 @@ void PrefLanguage::updateRC(LyXRC const & rc)
}
/////////////////////////////////////////////////////////////////////
//
// PrefPrinter
//
/////////////////////////////////////////////////////////////////////
PrefPrinter::PrefPrinter(GuiPreferences * form)
: PrefModule(catOutput, N_("Printer"), form)
{
setupUi(this);
connect(printerAdaptCB, SIGNAL(clicked()),
this, SIGNAL(changed()));
connect(printerCommandED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
connect(printerNameED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
connect(printerPageRangeED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
connect(printerCopiesED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
connect(printerReverseED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
connect(printerToPrinterED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
connect(printerExtensionED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
connect(printerSpoolCommandED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
connect(printerPaperTypeED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
connect(printerEvenED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
connect(printerOddED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
connect(printerCollatedED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
connect(printerLandscapeED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
connect(printerToFileED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
connect(printerExtraED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
connect(printerSpoolPrefixED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
connect(printerPaperSizeED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
printerNameED->setValidator(new NoNewLineValidator(printerNameED));
printerCommandED->setValidator(new NoNewLineValidator(printerCommandED));
printerEvenED->setValidator(new NoNewLineValidator(printerEvenED));
printerPageRangeED->setValidator(new NoNewLineValidator(printerPageRangeED));
printerCopiesED->setValidator(new NoNewLineValidator(printerCopiesED));
printerReverseED->setValidator(new NoNewLineValidator(printerReverseED));
printerToFileED->setValidator(new NoNewLineValidator(printerToFileED));
printerPaperTypeED->setValidator(new NoNewLineValidator(printerPaperTypeED));
printerExtraED->setValidator(new NoNewLineValidator(printerExtraED));
printerOddED->setValidator(new NoNewLineValidator(printerOddED));
printerCollatedED->setValidator(new NoNewLineValidator(printerCollatedED));
printerLandscapeED->setValidator(new NoNewLineValidator(printerLandscapeED));
printerToPrinterED->setValidator(new NoNewLineValidator(printerToPrinterED));
printerExtensionED->setValidator(new NoNewLineValidator(printerExtensionED));
printerPaperSizeED->setValidator(new NoNewLineValidator(printerPaperSizeED));
printerSpoolCommandED->setValidator(new NoNewLineValidator(printerSpoolCommandED));
printerSpoolPrefixED->setValidator(new NoNewLineValidator(printerSpoolPrefixED));
}
void PrefPrinter::applyRC(LyXRC & rc) const
{
rc.print_adapt_output = printerAdaptCB->isChecked();
rc.print_command = fromqstr(printerCommandED->text());
rc.printer = fromqstr(printerNameED->text());
rc.print_pagerange_flag = fromqstr(printerPageRangeED->text());
rc.print_copies_flag = fromqstr(printerCopiesED->text());
rc.print_reverse_flag = fromqstr(printerReverseED->text());
rc.print_to_printer = fromqstr(printerToPrinterED->text());
rc.print_file_extension = fromqstr(printerExtensionED->text());
rc.print_spool_command = fromqstr(printerSpoolCommandED->text());
rc.print_paper_flag = fromqstr(printerPaperTypeED->text());
rc.print_evenpage_flag = fromqstr(printerEvenED->text());
rc.print_oddpage_flag = fromqstr(printerOddED->text());
rc.print_collcopies_flag = fromqstr(printerCollatedED->text());
rc.print_landscape_flag = fromqstr(printerLandscapeED->text());
rc.print_to_file = internal_path(fromqstr(printerToFileED->text()));
rc.print_extra_options = fromqstr(printerExtraED->text());
rc.print_spool_printerprefix = fromqstr(printerSpoolPrefixED->text());
rc.print_paper_dimension_flag = fromqstr(printerPaperSizeED->text());
}
void PrefPrinter::updateRC(LyXRC const & rc)
{
printerAdaptCB->setChecked(rc.print_adapt_output);
printerCommandED->setText(toqstr(rc.print_command));
printerNameED->setText(toqstr(rc.printer));
printerPageRangeED->setText(toqstr(rc.print_pagerange_flag));
printerCopiesED->setText(toqstr(rc.print_copies_flag));
printerReverseED->setText(toqstr(rc.print_reverse_flag));
printerToPrinterED->setText(toqstr(rc.print_to_printer));
printerExtensionED->setText(toqstr(rc.print_file_extension));
printerSpoolCommandED->setText(toqstr(rc.print_spool_command));
printerPaperTypeED->setText(toqstr(rc.print_paper_flag));
printerEvenED->setText(toqstr(rc.print_evenpage_flag));
printerOddED->setText(toqstr(rc.print_oddpage_flag));
printerCollatedED->setText(toqstr(rc.print_collcopies_flag));
printerLandscapeED->setText(toqstr(rc.print_landscape_flag));
printerToFileED->setText(toqstr(external_path(rc.print_to_file)));
printerExtraED->setText(toqstr(rc.print_extra_options));
printerSpoolPrefixED->setText(toqstr(rc.print_spool_printerprefix));
printerPaperSizeED->setText(toqstr(rc.print_paper_dimension_flag));
}
/////////////////////////////////////////////////////////////////////
//
// PrefUserInterface
@ -3348,7 +3251,6 @@ GuiPreferences::GuiPreferences(GuiView & lv)
//for strftime validator
PrefOutput * output = new PrefOutput(this);
addModule(output);
addModule(new PrefPrinter(this));
addModule(new PrefLatex(this));
PrefConverters * converters = new PrefConverters(this);

View File

@ -39,7 +39,6 @@
#include "ui_PrefConvertersUi.h"
#include "ui_PrefFileformatsUi.h"
#include "ui_PrefLanguageUi.h"
#include "ui_PrefPrinterUi.h"
#include "ui_PrefUi.h"
#include "ui_PrefIdentityUi.h"
#include "ui_ShortcutUi.h"
@ -396,17 +395,6 @@ private Q_SLOTS:
};
class PrefPrinter : public PrefModule, public Ui::PrefPrinterUi
{
Q_OBJECT
public:
PrefPrinter(GuiPreferences * form);
void applyRC(LyXRC & rc) const;
void updateRC(LyXRC const & rc);
};
class PrefUserInterface : public PrefModule, public Ui::PrefUi
{
Q_OBJECT

View File

@ -1,255 +0,0 @@
/**
* \file GuiPrint.cpp
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author John Levon
* \author Edwin Leuven
* \author Angus Leeming
*
* Full author contact details are available in file CREDITS.
*/
#include <config.h>
#include "GuiPrint.h"
#include "qt_helpers.h"
#include "PrinterParams.h"
#include "Buffer.h"
#include "BufferParams.h"
#include "FuncRequest.h"
#include "LyXRC.h"
#include "support/convert.h"
#include "support/filetools.h"
#include "support/os.h"
#include <QLineEdit>
#include <QCheckBox>
#include <QRadioButton>
#include <QSpinBox>
#include <QPushButton>
using namespace std;
using namespace lyx::support;
namespace lyx {
namespace frontend {
GuiPrint::GuiPrint(GuiView & lv)
: GuiDialog(lv, "print", qt_("Print Document"))
{
setupUi(this);
connect(printPB, SIGNAL(clicked()), this, SLOT(slotOK()));
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
connect(copiesSB, SIGNAL(valueChanged(int)), this, SLOT(copiesChanged(int)));
connect(printerED, SIGNAL(textChanged(QString)),
this, SLOT(printerChanged()));
connect(fileED, SIGNAL(textChanged(QString)),
this, SLOT(fileChanged() ));
connect(browsePB, SIGNAL(clicked()), this, SLOT(browseClicked()));
connect(allRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
connect(reverseCB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
connect(collateCB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
connect(fromED, SIGNAL(textChanged(QString)),
this, SLOT(pagerangeChanged()));
connect(fromED, SIGNAL(textChanged(QString)),
this, SLOT(change_adaptor()));
connect(toED, SIGNAL(textChanged(QString)),
this, SLOT(pagerangeChanged()));
connect(toED, SIGNAL(textChanged(QString)),
this, SLOT(change_adaptor()));
connect(fileRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
connect(printerRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
connect(rangeRB, SIGNAL(toggled(bool)), fromED, SLOT(setEnabled(bool)));
connect(rangeRB, SIGNAL(toggled(bool)), toED, SLOT(setEnabled(bool)));
bc().setPolicy(ButtonPolicy::OkApplyCancelPolicy);
bc().setOK(printPB);
bc().setCancel(closePB);
}
void GuiPrint::change_adaptor()
{
changed();
}
void GuiPrint::browseClicked()
{
QString file =
browseRelToParent(QString(), bufferFilePath(), qt_("Print to file"),
QStringList(qt_("PostScript files (*.ps)")), true);
if (!file.isEmpty()) {
fileED->setText(file);
changed();
}
}
void GuiPrint::fileChanged()
{
if (!fileED->text().isEmpty())
fileRB->setChecked(true);
changed();
}
void GuiPrint::copiesChanged(int i)
{
collateCB->setEnabled(i != 1);
changed();
}
void GuiPrint::printerChanged()
{
printerRB->setChecked(true);
changed();
}
void GuiPrint::pagerangeChanged()
{
changed();
}
void GuiPrint::updateContents()
{
// only reset params if a different buffer
if (!params_.file_name.empty()
&& params_.file_name == fromqstr(fileED->text()))
return;
printerED->setText(toqstr(params_.printer_name));
fileED->setText(toqstr(params_.file_name));
printerRB->setChecked(true);
if (params_.target == PrinterParams::FILE)
fileRB->setChecked(true);
reverseCB->setChecked(params_.reverse_order);
copiesSB->setValue(params_.count_copies);
oddCB->setChecked(params_.odd_pages);
evenCB->setChecked(params_.even_pages);
collateCB->setChecked(params_.sorted_copies);
if (params_.all_pages)
allRB->setChecked(true);
else {
rangeRB->setChecked(true);
fromED->setText(QString::number(params_.from_page));
toED->setText(QString::number(params_.to_page));
}
}
void GuiPrint::applyView()
{
params_.target = fileRB->isChecked()
? PrinterParams::FILE : PrinterParams::PRINTER;
params_.printer_name = fromqstr(printerED->text());
params_.file_name = os::internal_path(fromqstr(fileED->text()));
params_.all_pages = allRB->isChecked();
params_.from_page = fromED->text().toUInt();
params_.to_page = toED->text().toUInt();
params_.odd_pages = oddCB->isChecked();
params_.even_pages = evenCB->isChecked();
params_.count_copies = copiesSB->text().toUInt();
params_.sorted_copies = collateCB->isChecked();
params_.reverse_order = reverseCB->isChecked();
}
bool GuiPrint::initialiseParams(string const &)
{
/// get global printer parameters
params_ = PrinterParams();
params_.file_name = support::changeExtension(buffer().absFileName(),
lyxrc.print_file_extension);
setButtonsValid(true); // so that the user can press Ok
return true;
}
void GuiPrint::clearParams()
{
params_ = PrinterParams();
}
/// print the current buffer
void GuiPrint::dispatchParams()
{
string command = lyxrc.print_command + ' ';
if (params_.target == PrinterParams::PRINTER
&& lyxrc.print_adapt_output // dvips wants a printer name
&& !params_.printer_name.empty()) {// printer name given
command += lyxrc.print_to_printer + params_.printer_name + ' ';
}
if (!params_.all_pages && params_.from_page) {
command += lyxrc.print_pagerange_flag + ' ';
command += convert<string>(params_.from_page);
if (params_.to_page) {
// we have a range "from-to"
command += '-' + convert<string>(params_.to_page);
}
command += ' ';
}
// If both are, or both are not selected, then skip the odd/even printing
if (params_.odd_pages != params_.even_pages) {
if (params_.odd_pages)
command += lyxrc.print_oddpage_flag + ' ';
else if (params_.even_pages)
command += lyxrc.print_evenpage_flag + ' ';
}
if (params_.count_copies > 1) {
if (params_.sorted_copies)
command += lyxrc.print_collcopies_flag;
else
command += lyxrc.print_copies_flag;
command += ' ' + convert<string>(params_.count_copies) + ' ';
}
if (params_.reverse_order)
command += lyxrc.print_reverse_flag + ' ';
if (!lyxrc.print_extra_options.empty())
command += lyxrc.print_extra_options + ' ';
command += buffer().params().dvips_options();
string const target = (params_.target == PrinterParams::PRINTER) ?
"printer" : "file";
string const target_name = (params_.target == PrinterParams::PRINTER) ?
(params_.printer_name.empty() ? "default" : params_.printer_name) :
params_.file_name;
string const data = target + " \"" + target_name + "\" \"" + command + '"';
dispatch(FuncRequest(getLfun(), data));
}
Dialog * createGuiPrint(GuiView & lv) { return new GuiPrint(lv); }
} // namespace frontend
} // namespace lyx
#include "moc_GuiPrint.cpp"

View File

@ -1,66 +0,0 @@
// -*- C++ -*-
/**
* \file GuiPrint.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author Allan Rae
* \author Angus Leeming
* \author John Levon
* \author Edwin Leuven
*
* Full author contact details are available in file CREDITS.
*/
#ifndef GUIPRINT_H
#define GUIPRINT_H
#include "GuiDialog.h"
#include "ui_PrintUi.h"
#include "PrinterParams.h"
namespace lyx {
namespace frontend {
class GuiPrint : public GuiDialog, public Ui::PrintUi
{
Q_OBJECT
public:
GuiPrint(GuiView & lv);
private Q_SLOTS:
void change_adaptor();
void browseClicked();
void fileChanged();
void copiesChanged(int);
void printerChanged();
void pagerangeChanged();
private:
/// Apply changes
void applyView();
/// update
void updateContents();
///
bool initialiseParams(std::string const & data);
///
void clearParams();
///
void dispatchParams();
///
bool isBufferDependent() const { return true; }
///
bool canApplyToReadOnly() const { return true; }
///
FuncCode getLfun() const { return LFUN_BUFFER_PRINT; }
///
PrinterParams params_;
};
} // namespace frontend
} // namespace lyx
#endif // GUIPRINT_H

View File

@ -1894,9 +1894,6 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
|| name == "texinfo"
|| name == "progress"
|| name == "compare";
else if (name == "print")
enable = doc_buffer->params().isExportable("dvi")
&& lyxrc.print_command != "none";
else if (name == "character" || name == "symbols"
|| name == "mathdelimiter" || name == "mathmatrix") {
if (!buf || buf->isReadonly())
@ -4424,8 +4421,6 @@ Dialog * GuiView::build(string const & name)
return createGuiPhantom(*this);
if (name == "prefs")
return createGuiPreferences(*this);
if (name == "print")
return createGuiPrint(*this);
if (name == "ref")
return createGuiRef(*this);
if (name == "sendto")

View File

@ -113,7 +113,6 @@ SOURCEFILES = \
GuiParagraph.cpp \
GuiPhantom.cpp \
GuiPrefs.cpp \
GuiPrint.cpp \
GuiPrintindex.cpp \
GuiPrintNomencl.cpp \
GuiProgress.cpp \
@ -222,7 +221,6 @@ MOCHEADER = \
GuiParagraph.h \
GuiPhantom.h \
GuiPrefs.h \
GuiPrint.h \
GuiPrintindex.h \
GuiPrintNomencl.h \
GuiProgress.h \
@ -329,13 +327,11 @@ UIFILES = \
PrefLanguageUi.ui \
PrefLatexUi.ui \
PrefPathsUi.ui \
PrefPrinterUi.ui \
PrefScreenFontsUi.ui \
PrefShortcutsUi.ui \
PrefSpellcheckerUi.ui \
PrefsUi.ui \
PrefUi.ui \
PrintUi.ui \
PrintindexUi.ui \
PrintNomenclUi.ui \
ProgressViewUi.ui \

View File

@ -1,192 +1,61 @@
<ui version="4.0" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PrefOutputUi</class>
<widget class="QWidget" name="PrefOutputUi" >
<property name="geometry" >
<widget class="QWidget" name="PrefOutputUi">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>307</width>
<height>234</height>
<width>356</width>
<height>393</height>
</rect>
</property>
<property name="windowTitle" >
<property name="windowTitle">
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" >
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2" >
<item>
<widget class="QLabel" name="plaintextLinelengthLA" >
<property name="text" >
<string>Output &amp;line length:</string>
</property>
<property name="buddy" >
<cstring>plaintextLinelengthSB</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="plaintextLinelengthSB" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip" >
<string>The maximum line length of exported plain text/LaTeX/SGML files. If set to 0, paragraphs are output in a single line; if the line length is > 0, paragraphs are separated by a blank line.</string>
</property>
<property name="maximum" >
<number>120</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout" >
<item>
<widget class="QLabel" name="DateLA" >
<property name="text" >
<string>&amp;Date format:</string>
</property>
<property name="buddy" >
<cstring>DateED</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="DateED" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip" >
<string>Date format for strftime output</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>&amp;Overwrite on export:</string>
</property>
<property name="buddy">
<cstring>overwriteCO</cstring>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="overwriteCO">
<item>
<property name="text">
<string>Ask permission</string>
</property>
</item>
<item>
<property name="text">
<string>Main file only</string>
</property>
</item>
<item>
<property name="text">
<string>All files</string>
</property>
</item>
<property name="toolTip" >
<string>What to do when existing files are going to be overwritten on export.</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Forward Search</string>
</property>
<property name="flat" >
<property name="flat">
<bool>true</bool>
</property>
<property name="checkable" >
<property name="checkable">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout" >
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3" >
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="label" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<property name="text">
<string>DV&amp;I command:</string>
</property>
<property name="buddy" >
<property name="buddy">
<cstring>dviCB</cstring>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="dviCB" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
<widget class="QComboBox" name="dviCB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editable" >
<property name="editable">
<bool>true</bool>
</property>
<property name="sizeAdjustPolicy" >
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
</property>
</widget>
@ -194,35 +63,35 @@
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5" >
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="label_2" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<property name="text">
<string>&amp;PDF command:</string>
</property>
<property name="buddy" >
<property name="buddy">
<cstring>pdfCB</cstring>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="pdfCB" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
<widget class="QComboBox" name="pdfCB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editable" >
<property name="editable">
<bool>true</bool>
</property>
<property name="sizeAdjustPolicy" >
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
</property>
</widget>
@ -233,14 +102,171 @@
</widget>
</item>
<item>
<spacer name="verticalSpacer" >
<property name="orientation" >
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>DVI-PS Options</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="2">
<widget class="QLineEdit" name="printerPaperTypeED">
<property name="toolTip">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="printerPaperTypeLA">
<property name="text">
<string>Paper t&amp;ype:</string>
</property>
<property name="buddy">
<cstring>printerPaperTypeED</cstring>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLineEdit" name="printerPaperSizeED"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="printerPaperSizeLA">
<property name="text">
<string>Paper si&amp;ze:</string>
</property>
<property name="buddy">
<cstring>printerPaperSizeED</cstring>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLineEdit" name="printerLandscapeED"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="printerLandscapeLA">
<property name="text">
<string>Lan&amp;dscape:</string>
</property>
<property name="buddy">
<cstring>printerLandscapeED</cstring>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Other Options</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="plaintextLinelengthLA">
<property name="text">
<string>Output &amp;line length:</string>
</property>
<property name="buddy">
<cstring>plaintextLinelengthSB</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="plaintextLinelengthSB">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>The maximum line length of exported plain text/LaTeX/SGML files. If set to 0, paragraphs are output in a single line; if the line length is &gt; 0, paragraphs are separated by a blank line.</string>
</property>
<property name="maximum">
<number>120</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="DateLA">
<property name="text">
<string>&amp;Date format:</string>
</property>
<property name="buddy">
<cstring>DateED</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="DateED">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Date format for strftime output</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>&amp;Overwrite on export:</string>
</property>
<property name="buddy">
<cstring>overwriteCO</cstring>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="overwriteCO">
<property name="toolTip">
<string>What to do when existing files are going to be overwritten on export.</string>
</property>
<item>
<property name="text">
<string>Ask permission</string>
</property>
</item>
<item>
<property name="text">
<string>Main file only</string>
</property>
</item>
<item>
<property name="text">
<string>All files</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<height>43</height>
</size>
</property>
</spacer>
@ -248,7 +274,7 @@
</layout>
</widget>
<includes>
<include location="local" >qt_i18n.h</include>
<include location="local">qt_i18n.h</include>
</includes>
<resources/>
<connections/>

View File

@ -1,365 +0,0 @@
<ui version="4.0" >
<class>PrefPrinterUi</class>
<widget class="QWidget" name="PrefPrinterUi" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>380</width>
<height>445</height>
</rect>
</property>
<property name="windowTitle" >
<string/>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="4" column="0" colspan="2" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>323</width>
<height>41</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0" colspan="2" >
<widget class="QGroupBox" name="GroupBox1" >
<property name="title" >
<string>Printer Command Options</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="5" column="1" >
<widget class="QLineEdit" name="printerPaperTypeED" >
<property name="toolTip" >
<string/>
</property>
</widget>
</item>
<item row="6" column="1" >
<widget class="QLineEdit" name="printerExtraED" />
</item>
<item row="3" column="3" >
<widget class="QLineEdit" name="printerToPrinterED" />
</item>
<item row="4" column="3" >
<widget class="QLineEdit" name="printerExtensionED" />
</item>
<item row="4" column="2" >
<widget class="QLabel" name="printerExtensionLA" >
<property name="toolTip" >
<string>Extension to be used when printing to file.</string>
</property>
<property name="text" >
<string>File ex&amp;tension:</string>
</property>
<property name="buddy" >
<cstring>printerExtensionED</cstring>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QLineEdit" name="printerToFileED" />
</item>
<item row="4" column="0" >
<widget class="QLabel" name="printerToFileLA" >
<property name="toolTip" >
<string>Option used to print to a file.</string>
</property>
<property name="text" >
<string>Print to &amp;file:</string>
</property>
<property name="buddy" >
<cstring>printerToFileED</cstring>
</property>
</widget>
</item>
<item row="3" column="2" >
<widget class="QLabel" name="printerToPrinterLA" >
<property name="toolTip" >
<string>Option used to print to non-default printer.</string>
</property>
<property name="text" >
<string>Set &amp;printer:</string>
</property>
<property name="buddy" >
<cstring>printerToPrinterED</cstring>
</property>
</widget>
</item>
<item row="8" column="3" >
<widget class="QLineEdit" name="printerSpoolPrefixED" />
</item>
<item row="8" column="2" >
<widget class="QLabel" name="printerSpoolPrefixLA" >
<property name="toolTip" >
<string>Option used with spool command to set printer.</string>
</property>
<property name="text" >
<string>Spool &amp;printer:</string>
</property>
<property name="buddy" >
<cstring>printerSpoolPrefixED</cstring>
</property>
</widget>
</item>
<item row="8" column="1" >
<widget class="QLineEdit" name="printerSpoolCommandED" />
</item>
<item row="8" column="0" >
<widget class="QLabel" name="printerSpoolCommandLA" >
<property name="toolTip" >
<string>Command transmitted to the system to actually print the postscript file.</string>
</property>
<property name="whatsThis" >
<string/>
</property>
<property name="text" >
<string>Spool co&amp;mmand:</string>
</property>
<property name="buddy" >
<cstring>printerSpoolCommandED</cstring>
</property>
</widget>
</item>
<item row="7" column="0" colspan="4" >
<widget class="Line" name="line" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="printerReverseLA" >
<property name="toolTip" >
<string>Option used to reverse page order.</string>
</property>
<property name="text" >
<string>Re&amp;verse pages:</string>
</property>
<property name="buddy" >
<cstring>printerReverseED</cstring>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QLineEdit" name="printerReverseED" />
</item>
<item row="2" column="2" >
<widget class="QLabel" name="printerLandscapeLA" >
<property name="text" >
<string>Lan&amp;dscape:</string>
</property>
<property name="buddy" >
<cstring>printerLandscapeED</cstring>
</property>
</widget>
</item>
<item row="2" column="3" >
<widget class="QLineEdit" name="printerLandscapeED" />
</item>
<item row="2" column="0" >
<widget class="QLabel" name="printerCopiesLA" >
<property name="text" >
<string>&amp;Number of copies:</string>
</property>
<property name="buddy" >
<cstring>printerCopiesED</cstring>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLineEdit" name="printerCopiesED" >
<property name="toolTip" >
<string>Option used to set number of copies.</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="printerPageRangeED" >
<property name="toolTip" >
<string>Option used to print a range of pages.</string>
</property>
</widget>
</item>
<item row="1" column="2" >
<widget class="QLabel" name="printerCollatedLA" >
<property name="text" >
<string>Co&amp;llated:</string>
</property>
<property name="buddy" >
<cstring>printerCollatedED</cstring>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="printerPageRangeLA" >
<property name="text" >
<string>Pa&amp;ge range:</string>
</property>
<property name="buddy" >
<cstring>printerPageRangeED</cstring>
</property>
</widget>
</item>
<item row="1" column="3" >
<widget class="QLineEdit" name="printerCollatedED" >
<property name="toolTip" >
<string>Option used to collate multiple copies.</string>
</property>
</widget>
</item>
<item row="0" column="2" >
<widget class="QLabel" name="printerOddLA" >
<property name="text" >
<string>&amp;Odd pages:</string>
</property>
<property name="buddy" >
<cstring>printerOddED</cstring>
</property>
</widget>
</item>
<item row="0" column="3" >
<widget class="QLineEdit" name="printerOddED" />
</item>
<item row="0" column="0" >
<widget class="QLabel" name="printerEvenLA" >
<property name="text" >
<string>&amp;Even pages:</string>
</property>
<property name="buddy" >
<cstring>printerEvenED</cstring>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QLabel" name="printerPaperTypeLA" >
<property name="text" >
<string>Paper t&amp;ype:</string>
</property>
<property name="buddy" >
<cstring>printerPaperTypeED</cstring>
</property>
</widget>
</item>
<item row="5" column="2" >
<widget class="QLabel" name="printerPaperSizeLA" >
<property name="text" >
<string>Paper si&amp;ze:</string>
</property>
<property name="buddy" >
<cstring>printerPaperSizeED</cstring>
</property>
</widget>
</item>
<item row="5" column="3" >
<widget class="QLineEdit" name="printerPaperSizeED" />
</item>
<item row="6" column="0" >
<widget class="QLabel" name="printerExtraLA" >
<property name="toolTip" >
<string>Any other options you'd like to use with the printer command.</string>
</property>
<property name="text" >
<string>E&amp;xtra options:</string>
</property>
<property name="buddy" >
<cstring>printerExtraED</cstring>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="printerEvenED" />
</item>
</layout>
</widget>
</item>
<item row="3" column="0" colspan="2" >
<widget class="QCheckBox" name="printerAdaptCB" >
<property name="toolTip" >
<string>Customizes output to a given printer. Expert option.</string>
</property>
<property name="whatsThis" >
<string>Normally, this needs to be checked only if you are using dvips as your printer command and you have config.&lt;printer> files installed for all your printers.</string>
</property>
<property name="text" >
<string>Adapt &amp;output to printer</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="printerNameED" >
<property name="toolTip" >
<string>Name of the default printer</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="printerNameLA" >
<property name="text" >
<string>Default &amp;printer:</string>
</property>
<property name="buddy" >
<cstring>printerNameED</cstring>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="printerCommandED" />
</item>
<item row="1" column="0" >
<widget class="QLabel" name="printerCommandLA" >
<property name="text" >
<string>Printer co&amp;mmand:</string>
</property>
<property name="buddy" >
<cstring>printerCommandED</cstring>
</property>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>printerNameED</tabstop>
<tabstop>printerCommandED</tabstop>
<tabstop>printerEvenED</tabstop>
<tabstop>printerOddED</tabstop>
<tabstop>printerPageRangeED</tabstop>
<tabstop>printerCollatedED</tabstop>
<tabstop>printerCopiesED</tabstop>
<tabstop>printerLandscapeED</tabstop>
<tabstop>printerReverseED</tabstop>
<tabstop>printerToPrinterED</tabstop>
<tabstop>printerToFileED</tabstop>
<tabstop>printerExtensionED</tabstop>
<tabstop>printerPaperTypeED</tabstop>
<tabstop>printerPaperSizeED</tabstop>
<tabstop>printerExtraED</tabstop>
<tabstop>printerSpoolCommandED</tabstop>
<tabstop>printerSpoolPrefixED</tabstop>
<tabstop>printerAdaptCB</tabstop>
</tabstops>
<includes>
<include location="local" >qt_i18n.h</include>
</includes>
<resources/>
<connections/>
</ui>

View File

@ -1,411 +0,0 @@
<ui version="4.0" >
<class>PrintUi</class>
<widget class="QDialog" name="PrintUi" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>403</width>
<height>366</height>
</rect>
</property>
<property name="windowTitle" >
<string/>
</property>
<property name="sizeGripEnabled" >
<bool>true</bool>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>11</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="1" column="0" >
<widget class="QGroupBox" name="ButtonGroup3" >
<property name="title" >
<string>Pages</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>11</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="1" column="1" >
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLineEdit" name="fromED" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="toolTip" >
<string>Page number to print from</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="toLA" >
<property name="text" >
<string>&amp;To:[[as in 'From page x to page y']]</string>
</property>
<property name="buddy" >
<cstring>toED</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="toED" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="toolTip" >
<string>Page number to print to</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" >
<widget class="QRadioButton" name="rangeRB" >
<property name="toolTip" >
<string>Print all pages</string>
</property>
<property name="text" >
<string>Fro&amp;m</string>
</property>
<property name="checked" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QRadioButton" name="allRB" >
<property name="toolTip" >
<string>Print all pages</string>
</property>
<property name="text" >
<string>&amp;All</string>
</property>
<property name="checked" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="oddCB" >
<property name="text" >
<string>Print &amp;odd-numbered pages</string>
</property>
<property name="checked" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="evenCB" >
<property name="text" >
<string>Print &amp;even-numbered pages</string>
</property>
<property name="checked" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="reverseCB" >
<property name="toolTip" >
<string>Print in reverse order</string>
</property>
<property name="text" >
<string>Re&amp;verse order</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0" >
<widget class="QGroupBox" name="copiesGB" >
<property name="title" >
<string>Copie&amp;s</string>
</property>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>11</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QSpinBox" name="copiesSB" >
<property name="toolTip" >
<string>Number of copies</string>
</property>
<property name="minimum" >
<number>1</number>
</property>
<property name="value" >
<number>1</number>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="collateCB" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="toolTip" >
<string>Collate copies</string>
</property>
<property name="text" >
<string>&amp;Collate</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="3" column="0" >
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="printPB" >
<property name="text" >
<string>&amp;Print</string>
</property>
<property name="autoDefault" >
<bool>false</bool>
</property>
<property name="default" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="closePB" >
<property name="text" >
<string>Close</string>
</property>
<property name="autoDefault" >
<bool>false</bool>
</property>
<property name="default" >
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0" >
<widget class="QGroupBox" name="ButtonGroup1" >
<property name="title" >
<string>Print Destination</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>11</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QRadioButton" name="printerRB" >
<property name="toolTip" >
<string>Send output to the printer</string>
</property>
<property name="text" >
<string>P&amp;rinter:</string>
</property>
<property name="checked" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2" >
<widget class="QLineEdit" name="printerED" >
<property name="toolTip" >
<string>Send output to the given printer</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QRadioButton" name="fileRB" >
<property name="toolTip" >
<string>Send output to a file</string>
</property>
<property name="text" >
<string>&amp;File:</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="fileED" >
<property name="enabled" >
<bool>true</bool>
</property>
<property name="toolTip" >
<string>Send output to a file</string>
</property>
</widget>
</item>
<item row="1" column="2" >
<widget class="QPushButton" name="browsePB" >
<property name="enabled" >
<bool>true</bool>
</property>
<property name="text" >
<string>&amp;Browse...</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<pixmapfunction></pixmapfunction>
<includes>
<include location="local" >qt_i18n.h</include>
</includes>
<tabstops>
<tabstop>printerRB</tabstop>
<tabstop>printerED</tabstop>
<tabstop>fileRB</tabstop>
<tabstop>fileED</tabstop>
<tabstop>browsePB</tabstop>
<tabstop>allRB</tabstop>
<tabstop>rangeRB</tabstop>
<tabstop>fromED</tabstop>
<tabstop>toED</tabstop>
<tabstop>oddCB</tabstop>
<tabstop>evenCB</tabstop>
<tabstop>reverseCB</tabstop>
<tabstop>copiesSB</tabstop>
<tabstop>collateCB</tabstop>
<tabstop>printPB</tabstop>
<tabstop>closePB</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>printerRB</sender>
<signal>clicked()</signal>
<receiver>printerED</receiver>
<slot>setFocus()</slot>
<hints>
<hint type="sourcelabel" >
<x>60</x>
<y>56</y>
</hint>
<hint type="destinationlabel" >
<x>254</x>
<y>56</y>
</hint>
</hints>
</connection>
<connection>
<sender>fileRB</sender>
<signal>clicked()</signal>
<receiver>fileED</receiver>
<slot>setFocus()</slot>
<hints>
<hint type="sourcelabel" >
<x>60</x>
<y>91</y>
</hint>
<hint type="destinationlabel" >
<x>213</x>
<y>91</y>
</hint>
</hints>
</connection>
<connection>
<sender>rangeRB</sender>
<signal>clicked()</signal>
<receiver>fromED</receiver>
<slot>setFocus()</slot>
<hints>
<hint type="sourcelabel" >
<x>55</x>
<y>206</y>
</hint>
<hint type="destinationlabel" >
<x>108</x>
<y>206</y>
</hint>
</hints>
</connection>
<connection>
<sender>copiesGB</sender>
<signal>clicked()</signal>
<receiver>copiesSB</receiver>
<slot>setFocus()</slot>
<hints>
<hint type="sourcelabel" >
<x>214</x>
<y>373</y>
</hint>
<hint type="destinationlabel" >
<x>52</x>
<y>384</y>
</hint>
</hints>
</connection>
</connections>
</ui>