--- /dev/null
+#############################################################################
+# Makefile for building: urpo
+# Generated by qmake (2.01a) (Qt 4.6.2) on: ma kesä 21 21:28:22 2010
+# Project: urpo.pro
+# Template: app
+# Command: /usr/bin/qmake-qt4 -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile urpo.pro
+#############################################################################
+
+####### Compiler, tools and options
+
+CC = gcc
+CXX = g++
+DEFINES = -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
+CFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
+CXXFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
+INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I.
+LINK = g++
+LFLAGS =
+LIBS = $(SUBLIBS) -L/usr/lib -lQtGui -lQtCore -lpthread
+AR = ar cqs
+RANLIB =
+QMAKE = /usr/bin/qmake-qt4
+TAR = tar -cf
+COMPRESS = gzip -9f
+COPY = cp -f
+SED = sed
+COPY_FILE = $(COPY)
+COPY_DIR = $(COPY) -r
+STRIP = strip
+INSTALL_FILE = install -m 644 -p
+INSTALL_DIR = $(COPY_DIR)
+INSTALL_PROGRAM = install -m 755 -p
+DEL_FILE = rm -f
+SYMLINK = ln -f -s
+DEL_DIR = rmdir
+MOVE = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+
+####### Output directory
+
+OBJECTS_DIR = ./
+
+####### Files
+
+SOURCES = main.cpp \
+ urpomainwindow.cpp \
+ urpoconnection.cpp \
+ urpoconnectionsettings.cpp \
+ urpoprocess.cpp \
+ urpojob.cpp \
+ printerlistjob.cpp \
+ cerrdebugmonitor.cpp \
+ printwidget.cpp \
+ debugconsole.cpp \
+ settingsdialog.cpp \
+ printjob.cpp moc_urpomainwindow.cpp \
+ moc_urpoprocess.cpp \
+ moc_urpojob.cpp \
+ moc_printerlistjob.cpp \
+ moc_cerrdebugmonitor.cpp \
+ moc_printwidget.cpp \
+ moc_debugconsole.cpp \
+ moc_settingsdialog.cpp \
+ moc_printjob.cpp \
+ qrc_urpo.cpp
+OBJECTS = main.o \
+ urpomainwindow.o \
+ urpoconnection.o \
+ urpoconnectionsettings.o \
+ urpoprocess.o \
+ urpojob.o \
+ printerlistjob.o \
+ cerrdebugmonitor.o \
+ printwidget.o \
+ debugconsole.o \
+ settingsdialog.o \
+ printjob.o \
+ moc_urpomainwindow.o \
+ moc_urpoprocess.o \
+ moc_urpojob.o \
+ moc_printerlistjob.o \
+ moc_cerrdebugmonitor.o \
+ moc_printwidget.o \
+ moc_debugconsole.o \
+ moc_settingsdialog.o \
+ moc_printjob.o \
+ qrc_urpo.o
+DIST = /usr/share/qt4/mkspecs/common/g++.conf \
+ /usr/share/qt4/mkspecs/common/unix.conf \
+ /usr/share/qt4/mkspecs/common/linux.conf \
+ /usr/share/qt4/mkspecs/qconfig.pri \
+ /usr/share/qt4/mkspecs/features/qt_functions.prf \
+ /usr/share/qt4/mkspecs/features/qt_config.prf \
+ /usr/share/qt4/mkspecs/features/exclusive_builds.prf \
+ /usr/share/qt4/mkspecs/features/default_pre.prf \
+ /usr/share/qt4/mkspecs/features/debug.prf \
+ /usr/share/qt4/mkspecs/features/default_post.prf \
+ /usr/share/qt4/mkspecs/features/warn_on.prf \
+ /usr/share/qt4/mkspecs/features/qt.prf \
+ /usr/share/qt4/mkspecs/features/unix/thread.prf \
+ /usr/share/qt4/mkspecs/features/moc.prf \
+ /usr/share/qt4/mkspecs/features/resources.prf \
+ /usr/share/qt4/mkspecs/features/uic.prf \
+ /usr/share/qt4/mkspecs/features/yacc.prf \
+ /usr/share/qt4/mkspecs/features/lex.prf \
+ /usr/share/qt4/mkspecs/features/include_source_dir.prf \
+ urpo.pro
+QMAKE_TARGET = urpo
+DESTDIR =
+TARGET = urpo
+
+first: all
+####### Implicit rules
+
+.SUFFIXES: .o .c .cpp .cc .cxx .C
+
+.cpp.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cc.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cxx.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.C.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.c.o:
+ $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
+
+####### Build rules
+
+all: Makefile $(TARGET)
+
+$(TARGET): $(OBJECTS)
+ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
+
+Makefile: urpo.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/g++.conf \
+ /usr/share/qt4/mkspecs/common/unix.conf \
+ /usr/share/qt4/mkspecs/common/linux.conf \
+ /usr/share/qt4/mkspecs/qconfig.pri \
+ /usr/share/qt4/mkspecs/features/qt_functions.prf \
+ /usr/share/qt4/mkspecs/features/qt_config.prf \
+ /usr/share/qt4/mkspecs/features/exclusive_builds.prf \
+ /usr/share/qt4/mkspecs/features/default_pre.prf \
+ /usr/share/qt4/mkspecs/features/debug.prf \
+ /usr/share/qt4/mkspecs/features/default_post.prf \
+ /usr/share/qt4/mkspecs/features/warn_on.prf \
+ /usr/share/qt4/mkspecs/features/qt.prf \
+ /usr/share/qt4/mkspecs/features/unix/thread.prf \
+ /usr/share/qt4/mkspecs/features/moc.prf \
+ /usr/share/qt4/mkspecs/features/resources.prf \
+ /usr/share/qt4/mkspecs/features/uic.prf \
+ /usr/share/qt4/mkspecs/features/yacc.prf \
+ /usr/share/qt4/mkspecs/features/lex.prf \
+ /usr/share/qt4/mkspecs/features/include_source_dir.prf \
+ /usr/lib/libQtGui.prl \
+ /usr/lib/libQtCore.prl
+ $(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile urpo.pro
+/usr/share/qt4/mkspecs/common/g++.conf:
+/usr/share/qt4/mkspecs/common/unix.conf:
+/usr/share/qt4/mkspecs/common/linux.conf:
+/usr/share/qt4/mkspecs/qconfig.pri:
+/usr/share/qt4/mkspecs/features/qt_functions.prf:
+/usr/share/qt4/mkspecs/features/qt_config.prf:
+/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
+/usr/share/qt4/mkspecs/features/default_pre.prf:
+/usr/share/qt4/mkspecs/features/debug.prf:
+/usr/share/qt4/mkspecs/features/default_post.prf:
+/usr/share/qt4/mkspecs/features/warn_on.prf:
+/usr/share/qt4/mkspecs/features/qt.prf:
+/usr/share/qt4/mkspecs/features/unix/thread.prf:
+/usr/share/qt4/mkspecs/features/moc.prf:
+/usr/share/qt4/mkspecs/features/resources.prf:
+/usr/share/qt4/mkspecs/features/uic.prf:
+/usr/share/qt4/mkspecs/features/yacc.prf:
+/usr/share/qt4/mkspecs/features/lex.prf:
+/usr/share/qt4/mkspecs/features/include_source_dir.prf:
+/usr/lib/libQtGui.prl:
+/usr/lib/libQtCore.prl:
+qmake: FORCE
+ @$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile urpo.pro
+
+dist:
+ @$(CHK_DIR_EXISTS) .tmp/urpo1.0.0 || $(MKDIR) .tmp/urpo1.0.0
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/urpo1.0.0/ && $(COPY_FILE) --parents urpomainwindow.h urpoconnection.h urpoconnectionsettings.h urpoprocess.h urpojob.h printerlistjob.h cerrdebugmonitor.h printwidget.h debugconsole.h settingsdialog.h printjob.h .tmp/urpo1.0.0/ && $(COPY_FILE) --parents urpo.qrc .tmp/urpo1.0.0/ && $(COPY_FILE) --parents main.cpp urpomainwindow.cpp urpoconnection.cpp urpoconnectionsettings.cpp urpoprocess.cpp urpojob.cpp printerlistjob.cpp cerrdebugmonitor.cpp printwidget.cpp debugconsole.cpp settingsdialog.cpp printjob.cpp .tmp/urpo1.0.0/ && $(COPY_FILE) --parents urpo_fi.ts .tmp/urpo1.0.0/ && (cd `dirname .tmp/urpo1.0.0` && $(TAR) urpo1.0.0.tar urpo1.0.0 && $(COMPRESS) urpo1.0.0.tar) && $(MOVE) `dirname .tmp/urpo1.0.0`/urpo1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/urpo1.0.0
+
+
+clean:compiler_clean
+ -$(DEL_FILE) $(OBJECTS)
+ -$(DEL_FILE) *~ core *.core
+
+
+####### Sub-libraries
+
+distclean: clean
+ -$(DEL_FILE) $(TARGET)
+ -$(DEL_FILE) Makefile
+
+
+mocclean: compiler_moc_header_clean compiler_moc_source_clean
+
+mocables: compiler_moc_header_make_all compiler_moc_source_make_all
+
+compiler_moc_header_make_all: moc_urpomainwindow.cpp moc_urpoprocess.cpp moc_urpojob.cpp moc_printerlistjob.cpp moc_cerrdebugmonitor.cpp moc_printwidget.cpp moc_debugconsole.cpp moc_settingsdialog.cpp moc_printjob.cpp
+compiler_moc_header_clean:
+ -$(DEL_FILE) moc_urpomainwindow.cpp moc_urpoprocess.cpp moc_urpojob.cpp moc_printerlistjob.cpp moc_cerrdebugmonitor.cpp moc_printwidget.cpp moc_debugconsole.cpp moc_settingsdialog.cpp moc_printjob.cpp
+moc_urpomainwindow.cpp: urpomainwindow.h
+ /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) urpomainwindow.h -o moc_urpomainwindow.cpp
+
+moc_urpoprocess.cpp: urpoprocess.h
+ /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) urpoprocess.h -o moc_urpoprocess.cpp
+
+moc_urpojob.cpp: urpoprocess.h \
+ urpojob.h
+ /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) urpojob.h -o moc_urpojob.cpp
+
+moc_printerlistjob.cpp: urpojob.h \
+ urpoprocess.h \
+ printerlistjob.h
+ /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) printerlistjob.h -o moc_printerlistjob.cpp
+
+moc_cerrdebugmonitor.cpp: cerrdebugmonitor.h
+ /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) cerrdebugmonitor.h -o moc_cerrdebugmonitor.cpp
+
+moc_printwidget.cpp: printwidget.h
+ /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) printwidget.h -o moc_printwidget.cpp
+
+moc_debugconsole.cpp: debugconsole.h
+ /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) debugconsole.h -o moc_debugconsole.cpp
+
+moc_settingsdialog.cpp: settingsdialog.h
+ /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) settingsdialog.h -o moc_settingsdialog.cpp
+
+moc_printjob.cpp: urpojob.h \
+ urpoprocess.h \
+ printjob.h
+ /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) printjob.h -o moc_printjob.cpp
+
+compiler_rcc_make_all: qrc_urpo.cpp
+compiler_rcc_clean:
+ -$(DEL_FILE) qrc_urpo.cpp
+qrc_urpo.cpp: urpo.qrc \
+ urpo_fi.qm \
+ help/gpl.html \
+ help/index.html \
+ help/index_fi.html
+ /usr/bin/rcc -name urpo urpo.qrc -o qrc_urpo.cpp
+
+compiler_image_collection_make_all: qmake_image_collection.cpp
+compiler_image_collection_clean:
+ -$(DEL_FILE) qmake_image_collection.cpp
+compiler_moc_source_make_all:
+compiler_moc_source_clean:
+compiler_uic_make_all:
+compiler_uic_clean:
+compiler_yacc_decl_make_all:
+compiler_yacc_decl_clean:
+compiler_yacc_impl_make_all:
+compiler_yacc_impl_clean:
+compiler_lex_make_all:
+compiler_lex_clean:
+compiler_clean: compiler_moc_header_clean compiler_rcc_clean
+
+####### Compile
+
+main.o: main.cpp urpomainwindow.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
+
+urpomainwindow.o: urpomainwindow.cpp urpomainwindow.h \
+ urpoconnectionsettings.h \
+ urpoconnection.h \
+ printerlistjob.h \
+ urpojob.h \
+ urpoprocess.h \
+ debugconsole.h \
+ printwidget.h \
+ printjob.h \
+ settingsdialog.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o urpomainwindow.o urpomainwindow.cpp
+
+urpoconnection.o: urpoconnection.cpp urpoconnection.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o urpoconnection.o urpoconnection.cpp
+
+urpoconnectionsettings.o: urpoconnectionsettings.cpp urpoconnectionsettings.h \
+ urpoconnection.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o urpoconnectionsettings.o urpoconnectionsettings.cpp
+
+urpoprocess.o: urpoprocess.cpp urpoprocess.h \
+ urpoconnection.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o urpoprocess.o urpoprocess.cpp
+
+urpojob.o: urpojob.cpp urpojob.h \
+ urpoprocess.h \
+ urpoconnection.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o urpojob.o urpojob.cpp
+
+printerlistjob.o: printerlistjob.cpp printerlistjob.h \
+ urpojob.h \
+ urpoprocess.h \
+ urpoconnection.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o printerlistjob.o printerlistjob.cpp
+
+cerrdebugmonitor.o: cerrdebugmonitor.cpp cerrdebugmonitor.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o cerrdebugmonitor.o cerrdebugmonitor.cpp
+
+printwidget.o: printwidget.cpp printwidget.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o printwidget.o printwidget.cpp
+
+debugconsole.o: debugconsole.cpp debugconsole.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debugconsole.o debugconsole.cpp
+
+settingsdialog.o: settingsdialog.cpp settingsdialog.h \
+ urpoconnectionsettings.h \
+ urpoconnection.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o settingsdialog.o settingsdialog.cpp
+
+printjob.o: printjob.cpp printjob.h \
+ urpojob.h \
+ urpoprocess.h \
+ urpoconnection.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o printjob.o printjob.cpp
+
+moc_urpomainwindow.o: moc_urpomainwindow.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_urpomainwindow.o moc_urpomainwindow.cpp
+
+moc_urpoprocess.o: moc_urpoprocess.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_urpoprocess.o moc_urpoprocess.cpp
+
+moc_urpojob.o: moc_urpojob.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_urpojob.o moc_urpojob.cpp
+
+moc_printerlistjob.o: moc_printerlistjob.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_printerlistjob.o moc_printerlistjob.cpp
+
+moc_cerrdebugmonitor.o: moc_cerrdebugmonitor.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_cerrdebugmonitor.o moc_cerrdebugmonitor.cpp
+
+moc_printwidget.o: moc_printwidget.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_printwidget.o moc_printwidget.cpp
+
+moc_debugconsole.o: moc_debugconsole.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_debugconsole.o moc_debugconsole.cpp
+
+moc_settingsdialog.o: moc_settingsdialog.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_settingsdialog.o moc_settingsdialog.cpp
+
+moc_printjob.o: moc_printjob.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_printjob.o moc_printjob.cpp
+
+qrc_urpo.o: qrc_urpo.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_urpo.o qrc_urpo.cpp
+
+####### Install
+
+install: FORCE
+
+uninstall: FORCE
+
+FORCE:
+
--- /dev/null
+#include "cerrdebugmonitor.h"
+#include <iostream>
+
+CerrDebugMonitor::CerrDebugMonitor(QObject *parent) :
+ QObject(parent)
+{
+
+}
+
+void CerrDebugMonitor::debugMessage(QString message)
+{
+ std::cout << message.toStdString();
+ std::cout << "\n";
+ std::cout.flush();
+}
--- /dev/null
+#ifndef CERRDEBUGMONITOR_H
+#define CERRDEBUGMONITOR_H
+
+#include <QObject>
+
+/*! Debug monitor to stardart output (cout)
+
+ Temperary, not used in final program
+
+ @see DebugConsole
+
+ @author Arto Hyvättinen
+ @version 0
+ @date 2010-06-12
+
+ */
+class CerrDebugMonitor : public QObject
+{
+ Q_OBJECT
+public:
+ explicit CerrDebugMonitor(QObject *parent = 0);
+
+signals:
+
+public slots:
+ void debugMessage(QString message);
+
+};
+
+#endif // CERRDEBUGMONITOR_H
--- /dev/null
+/**************************************************************************
+
+ URPO
+
+ Unix Remote Printing Operation
+ Copyright (c) Arto Hyvättinen 2010
+
+ This file is part of URPO.
+
+ URPO is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ URPO is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+#include "debugconsole.h"
+
+DebugConsole::DebugConsole(QWidget *parent) :
+ QTextBrowser(parent)
+{
+ // Set window
+ setWindowTitle("URPO Debug");
+ append( tr("This window shows information for resolving error situations\n"));
+}
+
+void DebugConsole::debugMessage(QString message)
+{
+ // Show everything sent by this slot.
+ append( message );
+}
--- /dev/null
+/**************************************************************************
+
+ URPO
+
+ Unix Remote Printing Operation
+ Copyright (c) Arto Hyvättinen 2010
+
+ This file is part of URPO.
+
+ URPO is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ URPO is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+#ifndef DEBUGCONSOLE_H
+#define DEBUGCONSOLE_H
+
+#include <QTextBrowser>
+
+/*! Show debug messages
+
+ @author Arto Hyvättinen
+ @date 2010-06-13
+ @version 0.1
+
+ Show debug messages in QTextBrowser.
+ Show everything received via debugMessage() slot.
+
+
+ */
+
+class DebugConsole : public QTextBrowser
+{
+ Q_OBJECT
+public:
+ explicit DebugConsole(QWidget *parent = 0);
+
+signals:
+
+public slots:
+ void debugMessage(QString message);
+
+};
+
+#endif // DEBUGCONSOLE_H
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
+
+
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>GNU General Public License - GNU Project - Free Software
+Foundation (FSF)</title>
+ <link rel="alternate" type="application/rdf+xml"
+href="http://www.gnu.org/licenses/gpl-3.0.rdf">
+</head><body>
+<h3 style="text-align: center;">GNU GENERAL PUBLIC LICENSE</h3>
+<p style="text-align: center;">Version 3, 29 June 2007</p>
+
+<p>Copyright © 2007 Free Software Foundation, Inc.
+ <<a href="http://fsf.org/">http://fsf.org/</a>></p><p>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.</p>
+
+<h3><a name="preamble"></a>Preamble</h3>
+
+<p>The GNU General Public License is a free, copyleft license for
+software and other kinds of works.</p>
+
+<p>The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.</p>
+
+<p>When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.</p>
+
+<p>To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.</p>
+
+<p>For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.</p>
+
+<p>Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.</p>
+
+<p>For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.</p>
+
+<p>Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.</p>
+
+<p>Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.</p>
+
+<p>The precise terms and conditions for copying, distribution and
+modification follow.</p>
+
+<h3><a name="terms"></a>TERMS AND CONDITIONS</h3>
+
+<h4><a name="section0"></a>0. Definitions.</h4>
+
+<p>“This License” refers to version 3 of the GNU General Public License.</p>
+
+<p>“Copyright” also means copyright-like laws that apply to other kinds
+of
+works, such as semiconductor masks.</p>
+
+<p>“The Program” refers to any copyrightable work licensed under this
+License. Each licensee is addressed as “you”. “Licensees” and
+“recipients” may be individuals or organizations.</p>
+
+<p>To “modify” a work means to copy from or adapt all or part of the
+work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a “modified version” of the
+earlier work or a work “based on” the earlier work.</p>
+
+<p>A “covered work” means either the unmodified Program or a work based
+on the Program.</p>
+
+<p>To “propagate” a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.</p>
+
+<p>To “convey” a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.</p>
+
+<p>An interactive user interface displays “Appropriate Legal Notices”
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.</p>
+
+<h4><a name="section1"></a>1. Source Code.</h4>
+
+<p>The “source code” for a work means the preferred form of the work
+for making modifications to it. “Object code” means any non-source
+form of a work.</p>
+
+<p>A “Standard Interface” means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.</p>
+
+<p>The “System Libraries” of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+“Major Component”, in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.</p>
+
+<p>The “Corresponding Source” for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.</p>
+
+<p>The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.</p>
+
+<p>The Corresponding Source for a work in source code form is that
+same work.</p>
+
+<h4><a name="section2"></a>2. Basic Permissions.</h4>
+
+<p>All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.</p>
+
+<p>You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.</p>
+
+<p>Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.</p>
+
+<h4><a name="section3"></a>3. Protecting Users' Legal Rights From
+Anti-Circumvention Law.</h4>
+
+<p>No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.</p>
+
+<p>When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.</p>
+
+<h4><a name="section4"></a>4. Conveying Verbatim Copies.</h4>
+
+<p>You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.</p>
+
+<p>You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.</p>
+
+<h4><a name="section5"></a>5. Conveying Modified Source Versions.</h4>
+
+<p>You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:</p>
+
+<ul>
+<li>a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.</li>
+
+<li>b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ “keep intact all notices”.</li>
+
+<li>c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.</li>
+
+<li>d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.</li>
+</ul>
+
+<p>A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+“aggregate” if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.</p>
+
+<h4><a name="section6"></a>6. Conveying Non-Source Forms.</h4>
+
+<p>You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:</p>
+
+<ul>
+<li>a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.</li>
+
+<li>b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.</li>
+
+<li>c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.</li>
+
+<li>d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.</li>
+
+<li>e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.</li>
+</ul>
+
+<p>A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.</p>
+
+<p>A “User Product” is either (1) a “consumer product”, which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for
+incorporation
+into a dwelling. In determining whether a product is a consumer
+product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, “normally used” refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.</p>
+
+<p>“Installation Information” for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product
+from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.</p>
+
+<p>If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).</p>
+
+<p>The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.</p>
+
+<p>Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.</p>
+
+<h4><a name="section7"></a>7. Additional Terms.</h4>
+
+<p>“Additional permissions” are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.</p>
+
+<p>When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.</p>
+
+<p>Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders
+of
+that material) supplement the terms of this License with terms:</p>
+
+<ul>
+<li>a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or</li>
+
+<li>b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or</li>
+
+<li>c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or</li>
+
+<li>d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or</li>
+
+<li>e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or</li>
+
+<li>f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.</li>
+</ul>
+
+<p>All other non-permissive additional terms are considered “further
+restrictions” within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.</p>
+
+<p>If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.</p>
+
+<p>Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.</p>
+
+<h4><a name="section8"></a>8. Termination.</h4>
+
+<p>You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).</p>
+
+<p>However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.</p>
+
+<p>Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.</p>
+
+<p>Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.</p>
+
+<h4><a name="section9"></a>9. Acceptance Not Required for Having Copies.</h4>
+
+<p>You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.</p>
+
+<h4><a name="section10"></a>10. Automatic Licensing of Downstream
+Recipients.</h4>
+
+<p>Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.</p>
+
+<p>An “entity transaction” is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.</p>
+
+<p>You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.</p>
+
+<h4><a name="section11"></a>11. Patents.</h4>
+
+<p>A “contributor” is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's “contributor version”.</p>
+
+<p>A contributor's “essential patent claims” are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, “control” includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.</p>
+
+<p>Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.</p>
+
+<p>In the following three paragraphs, a “patent license” is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To “grant” such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.</p>
+
+<p>If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. “Knowingly relying” means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.</p>
+
+<p>If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.</p>
+
+<p>A patent license is “discriminatory” if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.</p>
+
+<p>Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.</p>
+
+<h4><a name="section12"></a>12. No Surrender of Others' Freedom.</h4>
+
+<p>If conditions are imposed on you (whether by court order, agreement
+or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may
+not convey it at all. For example, if you agree to terms that obligate
+you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.</p>
+
+<h4><a name="section13"></a>13. Use with the GNU Affero General Public
+License.</h4>
+
+<p>Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.</p>
+
+<h4><a name="section14"></a>14. Revised Versions of this License.</h4>
+
+<p>The Free Software Foundation may publish revised and/or new versions
+of
+the GNU General Public License from time to time. Such new versions
+will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.</p>
+
+<p>Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License “or any later version” applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.</p>
+
+<p>If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.</p>
+
+<p>Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.</p>
+
+<h4><a name="section15"></a>15. Disclaimer of Warranty.</h4>
+
+<p>THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT
+WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</p>
+
+<h4><a name="section16"></a>16. Limitation of Liability.</h4>
+
+<p>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
+CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING
+ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS
+OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
+THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY
+OF
+SUCH DAMAGES.</p>
+
+<h4><a name="section17"></a>17. Interpretation of Sections 15 and 16.</h4>
+
+<p>If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.</p>
+
+<p>END OF TERMS AND CONDITIONS</p>
+
+<h3><a name="howto"></a>How to Apply These Terms to Your New Programs</h3>
+
+<p>If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these
+terms.</p>
+
+<p>To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the “copyright” line and a pointer to where the full notice is found.</p>
+
+<pre> <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+</pre>
+
+<p>Also add information on how to contact you by electronic and paper
+mail.</p>
+
+<p>If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:</p>
+
+<pre> <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+</pre>
+
+<p>The hypothetical commands `show w' and `show c' should show the
+appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an “about box”.</p>
+
+<p>You should also get your employer (if you work as a programmer) or
+school,
+if any, to sign a “copyright disclaimer” for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL,
+see
+<<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>>.</p>
+
+<p>The GNU General Public License does not permit incorporating your
+program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications
+with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<<a href="http://www.gnu.org/philosophy/why-not-lgpl.html">http://www.gnu.org/philosophy/why-not-lgpl.html</a>>.</p>
+
+</body></html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html><head>
+
+ <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
+ <title>URPO help</title>
+
+
+</head><body>
+<h1>URPO 0.9</h1>
+
+<br>
+
+<a href="#features">Features</a> <a href="#requiremets">Requirements</a>
+<a href="#keygen">Generating SSH-keys</a> <a href="#Settings">Settings</a>
+<a href="#Printing">Printing</a> <a href="#Debug">Debug</a><br>
+
+<br>
+
+Unix Remote Printing Operation<br>
+
+A Program for printing files via a server<br>
+
+© Arto Hyvättinen 2010<br>
+
+<br>
+
+URPO is free to use according to GPL 3. No guarantees. See <a href="gpl.html">the lisence</a>.<br>
+
+<h3><a name="features"></a>Features<br>
+</h3>
+
+With URPO you can print files to a printer attached to a
+linux/unix-computer. URPO uses the<a href="http://www.cups.org/"> CUPS</a>-system
+on the computer for printing. It is designed for use on a Maemo 5
+device.<br>
+
+<br>
+
+You can print files in all formats supported by CUPS:<br>
+
+<ul>
+
+ <li>Text files</li>
+ <li>PDF</li>
+ <li>PostScript</li>
+ <li>HP-GL/2</li>
+ <li>Image files: BMP, GIF, JPG, PhotoCD, PIX, PNG, PNM, TIFF</li>
+</ul>
+
+<h3><a name="requiremets"></a>Requirements<br>
+</h3>
+
+You need an <a href="http://www.openssh.org/"><span style="font-weight: bold;">openssh</span>-</a>program on your maemo
+device.<br>
+
+On the computer to which the printer is attached to, you need the <span style="font-weight: bold;">cups</span> and <span style="font-weight: bold;">ssh</span>-servers.
+CUPS (Common Unix Printing System) is a printing server, installed by
+default in several linux distributions. The ssh server is needed to
+safely connect to the computer. The port 22 needs to be opened from the
+computer's firewall. There is no need to open a port for cups.<br>
+
+<h3><a name="keygen"></a>Generating SSH-keys</h3>
+
+A SSH key pair is needed to identify the user. The key pair is created
+in the maemo device:<br>
+
+<code>ssh-keygen -t rsa</code><br>
+
+The password is left empty. Remember where you have saved the keys! You
+cannot save them in the MyDocs folder, since the private key must not
+be accessible to others than the user.<br>
+
+<br>
+
+The access rights of the file need to be set:<br>
+
+<code>chmod 600 ~/.ssh/id_urpo</code><br>
+
+<br>
+
+The public key is added to the server (computer) in the home
+folder's .ssh folder's file authorized_keys . You can use
+ssh for transferring it:<br>
+
+<code>cat ~/.ssh/id_urpo | ssh user@computer 'cat >>
+~./ssh/authorized_keys'</code><br>
+
+<br>
+
+The location of the private key is set in the settings of URPO.<br>
+
+<h3><a name="Settings"></a> Settings<br>
+</h3>
+
+When used for the first time URPO asks for settings. You can access
+these settings later by choosing "Settings" from the menu. <span style="font-weight: bold;"></span><br>
+
+<span style="font-weight: bold;">Host name or ip address:</span> The
+computer's (server's) ip address, or its name if the device can
+find it by name.<br>
+
+<span style="font-weight: bold;">Username: </span>The user account on
+the server .<br>
+
+<span style="font-weight: bold;">Identity file</span>: The private
+ssh-key.<br>
+
+<h3><a name="Printing"></a>Printing</h3>
+
+Choose the file to be printed (<span style="font-weight: bold;">Browse</span>).<br>
+
+Choose the printer.<br>
+
+If desired, limit what pages are to be printed, e.g 1,2 or 3-6 or 1,5-7
+.<br>
+
+You can choose 1, 2 or 4 pages to be printed per sheet.<br>
+
+You can print 1-99 copies.<br>
+
+Printing is started with the <span style="font-weight: bold;">Print</span>-button.<br>
+
+<br>
+
+<h3><a name="Debug"></a>Debug-window</h3>
+
+When<span style="font-weight: bold;"> "Debug</span>" is chosen from the
+menu, a debug window opens. Information useful in solving problems,
+such as the commands given to server trough ssh and their output, is
+printed on that window. <br>
+
+<br>
+
+</body></html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html><head>
+
+
+
+
+ <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>URPO help</title></head><body>
+<h1>URPO 0.9</h1>
+<a href="#features">Ominaisuudet</a> <a href="#requiremets">Vaatimukset</a> <a href="#keygen">Avainten luonti</a> <a href="#Settings">Asetukset</a> <a href="#Printing">Tulostaminen</a> <a href="#Debug">Debug</a><br>
+<br>
+Unix Remote Printing Operation<br>
+
+
+Ohjelmisto tiedostojen tulostamiseen palvelimella<br>
+
+
+© Arto Hyvättinen 2010<br>
+
+
+<br>
+
+
+URPO on GPL 3:n mukaan vapaasti käytettävä ohjelmisto. Ohjelmalle ei anneta takuuta. Katso <a href="gpl.html">lisenssi</a>.<br>
+
+
+
+<h3><a name="features"></a>Mitä URPOlla tehdään?</h3>
+
+
+
+Urpolla voit tulostaa tiedostoja linux/unix-tietokoneeseen liitettyyn
+kirjoittimeen. Urpo käyttää tulostimeen tietokoneen <a href="http://www.cups.org">CUPS</a>-järjestelmää. Urpo on suunniteltu käytettäväksi Maemo 5-laitteella.<br>
+
+<br>
+
+Voit tulostaa kaikkia CUPS:n tukemia tiedostomuotoja:<br>
+
+<ul>
+<li>Tekstitiedostot</li><li>PDF</li><li>PostScript</li><li>HP-GL/2</li><li>Kuvatiedostoja: BMP, GIF, JPG, PhotoCD, PIX, PNG, PNM, TIFF</li>
+</ul>
+
+
+
+<h3><a name="requiremets"></a>Tarvittavat ohjelmat <br>
+</h3>
+
+Tähän laitteeseen tarvitset <a href="http://www.openssh.org"><span style="font-weight: bold;">openssh</span>-</a>ohjelmiston.<br>
+
+Tietokoneeseen, johon tulostin on liitetty, tarvitset <span style="font-weight: bold;">cups</span> ja <span style="font-weight: bold;">ssh</span>-palvelimet.
+CUPS (Common Unix Printing System) on tulostuspalvelin, joka on
+oletuksena useissa linux-jakeluissa; ssh on suojattuun pääteyhteyteen
+tarvittava palvelin. Tietokoneen palomuurista on avattava <span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"></span></span></span>ssh-portti 22, cups:in porttia ei tarvitse avata.<br>
+
+<h3><a name="keygen"></a>SSH-avaimen luominen</h3>
+Käyttäjän tunnistamista varten tarvitaan ssh-avainpari. Avainpari luodaan maemo-laitteessa:<br>
+<code>ssh-keygen -t rsa</code><br>
+Salasana jätetään tyhjäksi. Muista, minne avaimet tallennetaan! Avainta
+ei voi tallettaa MyDocs-hakemistoon, koska avain ei saa olla muiden
+kuin käyttäjän luettavissa.<br>
+<code>chmod 600 ~/.ssh/id_urpo</code><br>
+Julkinen avain lisätään palvelimelle (tietokoneelle) kotihakemiston
+.ssh-hakemiston tiedostoon authorized_keys. Voit käyttää ssh:ta avaimen
+siirtämiseen.<br>
+<code>cat ~/.ssh/id_urpo | ssh käyttäjä@tietokone 'cat >> ~./ssh/authorized_keys'</code><br>
+Yksityisen avaimen sijainti asetetaan URPOn asetuksissa.<br>
+<h3><a name="Settings"></a>Asetukset</h3>
+Käynnistyessään ensimmäistä kertaa Urpo kysyy asetuksia. Asetuksiin pääsee myöhemmin valikon <span style="font-weight: bold;">Asetukset</span> -valinnalla.<br>
+<span style="font-weight: bold;">Tietokoneen nimi tai ip-osoite:</span> Tietokoneen (palvelin) ip-osoite tai nimi, jos laite löytää tietokoneen nimellä.<br>
+<span style="font-weight: bold;">Käyttäjätunnus: </span>Käyttäjätunnus palvelimessa.<br>
+<span style="font-weight: bold;">Yksityinen avaintiedosto</span>: Yksityinen ssh-avaintiedosto (private key).<br>
+<h3><a name="Printing"></a>Tulostaminen</h3>
+Valitse tulostettava tiedosto (<span style="font-weight: bold;">Selaa</span>).<br>
+Valitse tulostin.<br>
+Rajaa halutessasi tulostettavia sivuja, esim. 1,2 tai 3-6 tai 1,5-7 .<br>
+Voit valita 1,2 tai 4 sivua tulostettavaksi yhdelle arkille.<br>
+Voit tulostaa kerralla 1-99 kopiota<br>
+Tulostus käynnistyy <span style="font-weight: bold;">Tulosta</span>-napilla.<br>
+<br>
+<h3><a name="Debug"></a>Debug-ikkuna</h3>
+Valikon <span style="font-weight: bold;">Debug</span>-valinnalla aukeaa
+ikkuna, jonne tulostuu ongelmien ratkaisemisessa hyödyllistä tietoa,
+kuten ssh:n kautta ajettavien ohjelmien käynnistyskomennot ja
+tulostukset.<br>
+<br>
+<br>
+</body></html>
\ No newline at end of file
--- /dev/null
+#include <QtGui/QApplication>
+#include <QTranslator>
+#include "urpomainwindow.h"
+#include <QLocale>
+
+/*! @mainpage Urpo - Unix Remote Printing Operation
+
+
+ @author Arto Hyvättinen
+ @version 0.9
+ @date 2010-06
+
+ Urpo prints to remote computer via cups and ssh. Urpo is designed for Maemo.
+
+ Urpo uses Qt library. It it translated into Finnish.
+
+ */
+
+
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+
+ QTranslator appTranslator;
+ appTranslator.load("urpo_" + QLocale::system().name(),":/");
+ a.installTranslator(&appTranslator);
+
+ UrpoMainWindow w;
+#if defined(Q_WS_S60)
+ w.showMaximized();
+#else
+ w.show();
+#endif
+
+ return a.exec();
+}
--- /dev/null
+/**************************************************************************
+
+ URPO
+
+ Unix Remote Printing Operation
+ Copyright (c) Arto Hyvättinen 2010
+
+ This file is part of URPO.
+
+ URPO is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ URPO is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+#include "printerlistjob.h"
+#include "urpoconnection.h"
+
+PrinterListJob::PrinterListJob(UrpoConnection* connection) :
+ UrpoJob(connection)
+{
+ process_=0;
+}
+
+
+void PrinterListJob::startJob()
+{
+ process_= newProcess();
+
+ // ssh command getting printers of cups
+ QString command = "ssh ";
+ command.append(getConnection()->getKeyOption());
+ command.append(getConnection()->getHostString());
+ command.append(" env LANG=en lpstat -p");
+
+ // When finished, call doList
+ connect( process_, SIGNAL(finished(bool)), this, SLOT(doList(bool)));
+ process_->start(command);
+}
+
+void PrinterListJob::cancelJob()
+{
+ if(process_)
+ process_->terminate();
+ finish(Cancelled);
+}
+
+void PrinterListJob::doList(bool success)
+{
+ if( process_ && success )
+ {
+ foreach(QString line, process_->getOutput())
+ {
+ if(!line.section(' ',1,1).isEmpty())
+ printers_.append( line.section(' ',1,1));
+ // List of printers!
+ }
+ finish(Successed);
+ }
+ else
+ {
+ // Error!
+ // Set error message
+ switch( process_->getError() )
+ {
+ case UrpoProcess::ProcessError :
+ fail( tr("Failed to run ssh client.")); break;
+ case UrpoProcess::ConnectionError:
+ fail( tr("Failed to connect host")); break;
+ case UrpoProcess::Timeout:
+ fail( tr("Time out or authentication error")); break;
+ case UrpoProcess::Cancelled:
+ fail( tr("User cancelled")); break;
+ default:
+ fail( tr("Connection failed"));
+ }
+ }
+}
--- /dev/null
+/**************************************************************************
+
+ URPO
+
+ Unix Remote Printing Operation
+ Copyright (c) Arto Hyvättinen 2010
+
+ This file is part of URPO.
+
+ URPO is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ URPO is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+#ifndef PRINTERLISTJOB_H
+#define PRINTERLISTJOB_H
+
+
+#include "urpojob.h"
+#include <QStringList>
+
+/*! Get list of available printers
+
+ @author Arto Hyvättinen
+ @version 0
+ @date 2010-06-11
+
+ connect finished() and call start().
+ getPrinters() tell printers of remote host.
+
+ */
+
+class PrinterListJob : public UrpoJob
+{
+ Q_OBJECT
+public:
+ explicit PrinterListJob(UrpoConnection* connection);
+ /*! List of printers in system */
+ QStringList getPrinters() const { return printers_; }
+
+signals:
+
+public slots:
+ /*! Read output and do printer list */
+ void doList(bool success);
+
+protected:
+ void startJob();
+ void cancelJob();
+
+private:
+ QStringList printers_;
+ UrpoProcess* process_;
+};
+
+#endif // PRINTERLISTJOB_H
--- /dev/null
+/**************************************************************************
+
+ URPO
+
+ Unix Remote Printing Operation
+ Copyright (c) Arto Hyvättinen 2010
+
+ This file is part of URPO.
+
+ URPO is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ URPO is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+#include "printjob.h"
+#include "urpoconnection.h"
+#include <QFileInfo>
+#include <stdexcept> // Thowing execption for start()
+#include <cstdlib> // For random numbers generating temp file name
+
+PrintJob::PrintJob(UrpoConnection* connection) :
+ UrpoJob(connection)
+{
+ currentProcess_ = 0;
+}
+
+PrintJob::~PrintJob()
+{
+ if( currentProcess_ )
+ delete currentProcess_;
+}
+
+
+void PrintJob::freeProcess()
+{
+ if( currentProcess_)
+ {
+ // Delete current process when event loop
+ //
+ // If we are processing a signal from this process
+ // (process is finished), we can't delete process
+ // (actually, we can delete, but we get null pointer
+ // and segmentation fault !)
+ currentProcess_->deleteLater();
+
+ // disvalidate pointer
+ currentProcess_ = 0;
+ }
+}
+
+void PrintJob::startJob()
+{
+ // See API documentation on header...
+ throw( new std::logic_error("PrintJob::starJob() NOT for use!") );
+}
+
+
+void PrintJob::printFile(const QString& path, const QString& printOptions)
+{
+ // Get information about file
+ QFileInfo fileInfo(path);
+ if( fileInfo.exists() == false)
+ {
+ // File not found!
+ sendDebugMessage( tr("File %1 not exists.").arg(path));
+ fail( tr("File not found") );
+ return;
+ }
+
+ // new process for use
+ freeProcess();
+ currentProcess_= newProcess();
+
+
+ // Copy temperary file to temperary directory
+ pathToPrint_ = "/var/tmp/urpo-";
+
+ // Securing unique of temperary files, add random
+ // number between 0 and ffffff
+ pathToPrint_.append( QString::number( rand() % 0xffffff, 16));
+
+ // In server path, replace space with _
+ pathToPrint_.append( fileInfo.fileName().replace(QChar(' '),QChar('_')));
+
+ printOptions_ = printOptions;
+
+ // Copy command
+ QString command = "scp ";
+ command.append( getConnection()->getKeyOption());
+ command.append(fileInfo.absoluteFilePath().replace(QString(" "),QString("\\ ")) );
+ command.append(" ");
+ command.append( getConnection()->getHostString() );
+ command.append(":");
+ command.append(pathToPrint_);
+
+ // Next Copy Ready
+ connect( currentProcess_, SIGNAL(finished(bool)), this, SLOT(copyReady(bool)));
+
+ currentProcess_->start(command);
+}
+
+void PrintJob::copyReady(bool success)
+{
+ freeProcess();
+
+ if( success == false)
+ {
+ fail( tr("Failed copying file"));
+ return;
+ }
+
+ // Running remote printing command
+ currentProcess_ = newProcess();
+ QString command = " ssh ";
+ command.append( getConnection()->getKeyOption()) ;
+ command.append(getConnection()->getHostString());
+ command.append(" lp ");
+ command.append(printOptions_);
+ command.append(" ");
+ command.append(pathToPrint_);
+
+ // Next print ready
+ connect( currentProcess_, SIGNAL(finished(bool)), this, SLOT(printReady(bool)));
+ currentProcess_->start(command);
+
+}
+
+void PrintJob::printReady(bool success)
+{
+ // Print step is ready
+ freeProcess();
+
+ if( success == false )
+ {
+ fail( tr("Print failed"));
+ return;
+ }
+
+ // delete temperary file
+ currentProcess_ = newProcess();
+ QString command = " ssh ";
+ command.append( getConnection()->getKeyOption()) ;
+ command.append(getConnection()->getHostString());
+ command.append(" rm ");
+ command.append(pathToPrint_);
+
+ // Next delete ready
+ connect( currentProcess_, SIGNAL(finished(bool)),this,SLOT(deleteReady(bool)));
+ currentProcess_->start(command);
+}
+
+void PrintJob::deleteReady(bool success)
+{
+ // All done!
+ freeProcess();
+ if( success == false )
+ {
+ fail(tr("Failed deleting file"));
+ }
+ else
+ {
+ // Successed !!!
+ finish( Successed );
+ }
+}
+
+void PrintJob::cancelJob()
+{
+ // Cancelled by user.
+ if( currentProcess_ )
+ {
+ currentProcess_->terminate();
+ freeProcess();
+ }
+ finish( Cancelled );
+}
+
--- /dev/null
+/**************************************************************************
+
+ URPO
+
+ Unix Remote Printing Operation
+ Copyright (c) Arto Hyvättinen 2010
+
+ This file is part of URPO.
+
+ URPO is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ URPO is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+#ifndef PRINTJOB_H
+#define PRINTJOB_H
+
+#include <urpojob.h>
+
+
+/*! File printing job'
+
+ @author Arto Hyvättinen
+ @date 2010-06-17
+ @version 0.1
+
+ Job for printing files.
+ First, connect finished()-signal (called when ready)
+ Then, printFile()
+
+ @note start() is not for use!
+
+ */
+class PrintJob : public UrpoJob
+{
+ Q_OBJECT
+public:
+ explicit PrintJob(UrpoConnection* connection);
+ ~PrintJob();
+
+signals:
+
+public slots:
+ /*! When file has copied (internal use only) */
+ void copyReady(bool success);
+ /*! When files has printed (internal use only) */
+ void printReady(bool success);
+ /*! When file has deleted (internal use only) */
+ void deleteReady(bool success);
+
+ /*! Print sigle file
+
+ @arg path Path to file
+ @arg printOptions cups print options for lp command
+
+ When finished, emit finished() signal
+
+ */
+ void printFile(const QString& path, const QString& printOptions);
+
+ /*! Do not use, thows execption!
+
+ This function exits only because of bad class planning.
+ @note Do NOT use!
+
+ @throw std::logic_error Thow error becouse this function is not for use!*/
+ void startJob();
+ /*! Cancel printing job */
+ void cancelJob();
+
+private:
+ inline void freeProcess();
+
+private:
+ UrpoProcess* currentProcess_;
+ QString pathToPrint_;
+ QString printOptions_;
+
+
+};
+
+#endif // PRINTJOB_H
--- /dev/null
+/**************************************************************************
+
+ URPO
+
+ Unix Remote Printing Operation
+ Copyright (c) Arto Hyvättinen 2010
+
+ This file is part of URPO.
+
+ URPO is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ URPO is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+#include "printwidget.h"
+
+
+#include <QLineEdit>
+#include <QComboBox>
+#include <QPushButton>
+#include <QLabel>
+#include <QProgressBar>
+#include <QHBoxLayout>
+#include <QVBoxLayout>
+#include <QFileDialog>
+#include <QSpinBox>
+
+
+PrintWidget::PrintWidget(QWidget *parent) :
+ QWidget(parent)
+{
+
+ filenameEdit = new QLineEdit();
+ browseButton = new QPushButton( tr("Browse"));
+ connect(browseButton, SIGNAL(clicked()), this, SLOT(browseFile()));
+
+ printerCombo = new QComboBox();
+ printerCombo->setEnabled(false);
+
+ rangeEdit = new QLineEdit();
+ // Page ranges in format 1-3,5,8-10
+ // Valid characters: 0123456789 , +
+ QRegExpValidator* rangeSensor = new QRegExpValidator( QRegExp("[0-9\\-,]+"), this );
+ rangeEdit->setValidator( rangeSensor);
+
+ // Copies: Spin 0..99
+ copiesSpin = new QSpinBox();
+ copiesSpin->setRange(1,99);
+ copiesSpin->setValue(1);
+
+ // Pages per sheet
+ persheetCombo = new QComboBox();
+ persheetCombo->insertItem(0,"1",1);
+ persheetCombo->insertItem(1,"2",2);
+ persheetCombo->insertItem(2,"4",4);
+
+ printButton = new QPushButton( tr("Print"));
+ printButton->setEnabled(false);
+ connect( printButton, SIGNAL(clicked()), this, SLOT(doPrint()));
+
+ statusLabel = new QLabel();
+ progressBar = new QProgressBar();
+ progressBar->setRange(0,0);
+ cancelButton = new QPushButton(tr("Cancel"));
+ connect(cancelButton,SIGNAL(clicked()),this,SIGNAL(cancel()));
+
+ reconnectButton = new QPushButton( tr("Reconnect"));
+ connect(reconnectButton, SIGNAL(clicked()), this, SIGNAL(reconnect()));
+
+
+ QVBoxLayout* mainLayout = new QVBoxLayout();
+ QHBoxLayout* fileLayout = new QHBoxLayout();
+ fileLayout->addWidget( new QLabel( tr ("File") ));
+ fileLayout->addWidget(filenameEdit);
+ fileLayout->addWidget(browseButton);
+ mainLayout->addLayout(fileLayout);
+
+ QHBoxLayout* printerLayout = new QHBoxLayout();
+ printerLayout->addWidget(new QLabel( tr("Printer")));
+ printerLayout->addWidget(printerCombo);
+ printerLayout->addStretch();
+ mainLayout->addLayout(printerLayout);
+
+ QHBoxLayout* rangeLayout = new QHBoxLayout();
+ rangeLayout->addWidget(new QLabel(tr("Page range")));
+ rangeLayout->addWidget(rangeEdit);
+ mainLayout->addLayout(rangeLayout);
+
+ QHBoxLayout* sheetLayout = new QHBoxLayout();
+ sheetLayout->addWidget( new QLabel(tr("Pages per sheet")) );
+ sheetLayout->addWidget(persheetCombo);
+ sheetLayout->addStretch();
+ sheetLayout->addWidget(new QLabel(tr("Copies")));
+ sheetLayout->addWidget(copiesSpin);
+ mainLayout->addLayout(sheetLayout);
+
+ mainLayout->addStretch();
+
+ mainLayout->addWidget(statusLabel);
+ QHBoxLayout* barLayout = new QHBoxLayout;
+ barLayout->addWidget(progressBar);
+ barLayout->addStretch();
+ barLayout->addWidget(cancelButton);
+ barLayout->addWidget(reconnectButton);
+ barLayout->addWidget(printButton);
+ mainLayout->addLayout(barLayout);
+
+ setLayout(mainLayout);
+
+ progressBar->setVisible(false);
+
+}
+
+void PrintWidget::setStatus(QString message, bool busy)
+{
+ statusLabel->setText(message);
+ if(busy)
+ {
+ // Busy: show progress bar, enable Cancel, disable others.
+ progressBar->setVisible(true);
+ cancelButton->setEnabled(true);
+ reconnectButton->setEnabled(false);
+ }
+ else
+ {
+ progressBar->setVisible(false);
+ reconnectButton->setEnabled(true);
+ cancelButton->setEnabled(false);
+ }
+}
+
+void PrintWidget::setPrinters(QStringList printers)
+{
+ printerCombo->clear();
+ if(printers.isEmpty())
+ {
+ printerCombo->setEnabled(false);
+ }
+ else
+ {
+ printerCombo->addItems(printers);
+ printerCombo->setEnabled(true);
+ printerCombo->setCurrentIndex(0);
+ }
+}
+
+void PrintWidget::setReady(bool ready)
+{
+ if(ready)
+ {
+ setStatus( tr("Ready"), false);
+ printButton->setEnabled(true);
+ }
+ else
+ printButton->setEnabled(false);
+}
+
+
+void PrintWidget::browseFile()
+{
+ QString path = QFileDialog::getOpenFileName(this, tr("Print file"));
+ if(!path.isNull())
+ filenameEdit->setText(path);
+
+}
+
+void PrintWidget::doPrint()
+{
+ // Make cups lp options
+ QString options = QString("-d %1 -o number-up=").arg(printerCombo->currentText());
+ options.append(persheetCombo->currentText());
+ if( !rangeEdit->text().isEmpty())
+ options += " -o page-ranges=" + rangeEdit->text();
+ if( copiesSpin->value() > 1)
+ options += QString(" -n %1").arg(copiesSpin->value());
+ emit print(filenameEdit->text(), options);
+}
--- /dev/null
+/**************************************************************************
+
+ URPO
+
+ Unix Remote Printing Operation
+ Copyright (c) Arto Hyvättinen 2010
+
+ This file is part of URPO.
+
+ URPO is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ URPO is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+#ifndef PRINTWIDGET_H
+#define PRINTWIDGET_H
+
+#include <QWidget>
+
+class QLineEdit;
+class QPushButton;
+class QComboBox;
+class QProgressBar;
+class QLabel;
+class QSpinBox;
+
+/*! GUI Widget of Urpo printing
+
+ @author Arto Hyvättinen
+ @date 2010-06-17
+ @version 0.1
+
+
+ */
+class PrintWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ explicit PrintWidget(QWidget *parent = 0);
+ /*! Set printers
+
+ Set printers and enable printing if printer exists
+
+ @arg printers List of printer names
+ */
+ void setPrinters(QStringList printers);
+
+signals:
+ /*! User press Cancel button */
+ void cancel();
+ /*! User press Reconnect button */
+ void reconnect();
+ /*! User press Print button */
+ void print(QString file, QString options);
+
+public slots:
+ /*! Set status information
+
+ @arg message Message to show. Use html tags for red error color
+ @arg busy Show busy progress bar
+ */
+ void setStatus(QString message=QString(), bool busy=false);
+ /*! Set ready to print
+
+ Enable print button and set status message to ready
+
+ @arg ready Is ready to print
+ */
+ void setReady(bool ready);
+ void browseFile(); /*! Press browse button */
+ void doPrint(); /*! Press print button */
+ void doCancel() { emit cancel(); } /*! Press cancel button */
+
+
+private:
+ QLineEdit* filenameEdit;
+ QPushButton* browseButton;
+ QComboBox* printerCombo;
+ QComboBox* persheetCombo;
+ QLineEdit* rangeEdit;
+ QSpinBox* copiesSpin;
+ QPushButton* printButton;
+ QLabel* statusLabel;
+ QProgressBar* progressBar;
+ QPushButton* cancelButton;
+ QPushButton* reconnectButton;
+};
+
+#endif // PRINTWIDGET_H
--- /dev/null
+/**************************************************************************
+
+ URPO
+
+ Unix Remote Printing Operation
+ Copyright (c) Arto Hyvättinen 2010
+
+ This file is part of URPO.
+
+ URPO is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ URPO is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+#include "settingsdialog.h"
+
+#include <QLineEdit>
+#include <QPushButton>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QVBoxLayout>
+#include <QFileDialog>
+#include <QGroupBox>
+#include "urpoconnectionsettings.h"
+
+SettingsDialog::SettingsDialog(QWidget *parent) :
+ QDialog(parent)
+{
+ settings_ = 0;
+ helpWidget_ = 0;
+
+
+ setWindowTitle(tr("Urpo Settings"));
+
+ serverEdit = new QLineEdit;
+ connect(serverEdit, SIGNAL(textChanged(QString)), this, SLOT(serverChanged(QString)));
+
+ userEdit = new QLineEdit;
+ identityEdit = new QLineEdit;
+
+ browseButton = new QPushButton(tr("Browse"));
+ connect(browseButton, SIGNAL(clicked()),this,SLOT(browse()));
+ okButton = new QPushButton(tr("Done"));
+ connect(okButton, SIGNAL(clicked()), this, SLOT(okay()) );
+ okButton->setEnabled(false);
+
+ helpButton = new QPushButton( tr("Help"));
+
+
+ QVBoxLayout* mainLayout = new QVBoxLayout;
+
+ QHBoxLayout* helpLayout = new QHBoxLayout;
+ helpLayout->addWidget( new QLabel(tr("Remote printing utility "
+ "via ssh and cups. "
+ "Please read help.")));
+ helpLayout->addWidget(helpButton);
+ QGroupBox* helpBox = new QGroupBox();
+ helpBox->setLayout(helpLayout);
+ helpBox->setFlat(false);
+ mainLayout->addWidget(helpBox);
+
+
+ QHBoxLayout* serverLayout = new QHBoxLayout;
+ serverLayout->addWidget( new QLabel(tr("Host name or ip address")));
+ serverLayout->addWidget( serverEdit );
+ mainLayout->addLayout(serverLayout);
+
+ QHBoxLayout* userLayout = new QHBoxLayout;
+ userLayout->addWidget( new QLabel(tr("Username")));
+ userLayout->addWidget( userEdit );
+ mainLayout->addLayout(userLayout);
+
+ QHBoxLayout* idLayout = new QHBoxLayout;
+ idLayout->addWidget( new QLabel( tr("Identity file")));
+ idLayout->addWidget(identityEdit);
+ idLayout->addWidget( browseButton);
+ mainLayout->addLayout(idLayout);
+
+ mainLayout->addStretch();
+
+ QHBoxLayout* okLayout = new QHBoxLayout;
+ okLayout->addStretch();
+ okLayout->addWidget(okButton);
+ mainLayout->addLayout(okLayout);
+
+ setLayout(mainLayout);
+
+}
+
+
+void SettingsDialog::setSettings(UrpoConnectionSettings *settings)
+{
+ // Init dialog from UrpoConnectionSetting
+ settings_ = settings;
+ serverEdit->setText( settings_->getHost());
+ userEdit->setText(settings_->getUserid());
+ identityEdit->setText(settings_->getIdentity());
+
+}
+
+void SettingsDialog::setHelp(QTextBrowser *helpWidget)
+{
+ // Set widget activated in help button
+ helpWidget_ = helpWidget;
+ connect( helpButton, SIGNAL(clicked()), this, SLOT(showHelp()));
+}
+
+void SettingsDialog::okay()
+{
+ if( settings_ )
+ {
+ // Store settings
+ settings_->setHost( serverEdit->text());
+ settings_->setUserid( userEdit->text());
+ settings_->setIdentity( identityEdit->text());
+
+ settings_->store();
+
+ done(QDialog::Accepted);
+ }
+ else
+ done(QDialog::Rejected);
+}
+
+void SettingsDialog::showHelp()
+{
+ // Activate help window
+ helpWidget_->home();
+ helpWidget_->show();
+ helpWidget_->raise();
+ helpWidget_->activateWindow();
+}
+
+void SettingsDialog::serverChanged(const QString& text)
+{
+ // If there is a server setting, dialog will be accepted
+ // (if you have same userid in server and ssh key defined...)
+
+ okButton->setDisabled( text.isEmpty() );
+}
+
+void SettingsDialog::browse()
+{
+ QString path = QFileDialog::getOpenFileName(this, tr("Identity file"));
+ if(!path.isNull())
+ identityEdit->setText(path);
+}
--- /dev/null
+/**************************************************************************
+
+ URPO
+
+ Unix Remote Printing Operation
+ Copyright (c) Arto Hyvättinen 2010
+
+ This file is part of URPO.
+
+ URPO is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ URPO is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+#ifndef SETTINGSDIALOG_H
+#define SETTINGSDIALOG_H
+
+#include <QDialog>
+#include <QTextBrowser>
+class QLineEdit;
+class QPushButton;
+class UrpoConnectionSettings;
+
+/*! GUI dialog for Urpo Setting
+
+ @author Arto Hyvättinen
+ @date 2010-06-13
+ @version 0.1
+
+ Dialog for settings. Remember to set setSettings() and setHelp().
+ Designed for modeless use (in modal can't show help
+
+ */
+class SettingsDialog : public QDialog
+{
+ Q_OBJECT
+public:
+ explicit SettingsDialog(QWidget *parent = 0);
+ /*! Set UrpoConnection having connection settings */
+ void setSettings(UrpoConnectionSettings* settings);
+ /*! Set QTextBrowser showing help */
+ void setHelp(QTextBrowser* helpWidget);
+signals:
+
+public slots:
+ void okay();
+ void serverChanged(const QString& text);
+ void browse();
+ void showHelp();
+
+private:
+ QLineEdit* serverEdit;
+ QLineEdit* userEdit;
+ QLineEdit* identityEdit;
+ QPushButton* browseButton;
+ QPushButton* okButton;
+ QPushButton* helpButton;
+ UrpoConnectionSettings* settings_;
+ QTextBrowser* helpWidget_;
+
+};
+
+#endif // SETTINGSDIALOG_H
--- /dev/null
+#-------------------------------------------------
+#
+# Project created by QtCreator 2010-06-11T18:32:51
+#
+#-------------------------------------------------
+
+QT += core gui
+
+TARGET = urpo
+TEMPLATE = app
+
+
+SOURCES += main.cpp\
+ urpomainwindow.cpp \
+ urpoconnection.cpp \
+ urpoconnectionsettings.cpp \
+ urpoprocess.cpp \
+ urpojob.cpp \
+ printerlistjob.cpp \
+ cerrdebugmonitor.cpp \
+ printwidget.cpp \
+ debugconsole.cpp \
+ settingsdialog.cpp \
+ printjob.cpp
+
+HEADERS += urpomainwindow.h \
+ urpoconnection.h \
+ urpoconnectionsettings.h \
+ urpoprocess.h \
+ urpojob.h \
+ printerlistjob.h \
+ cerrdebugmonitor.h \
+ printwidget.h \
+ debugconsole.h \
+ settingsdialog.h \
+ printjob.h
+
+CONFIG += mobility
+MOBILITY =
+
+symbian {
+ TARGET.UID3 = 0xece65166
+ # TARGET.CAPABILITY +=
+ TARGET.EPOCSTACKSIZE = 0x14000
+ TARGET.EPOCHEAPSIZE = 0x020000 0x800000
+}
+
+OTHER_FILES +=
+
+RESOURCES += \
+ urpo.qrc
+
+TRANSLATIONS = urpo_fi.ts
--- /dev/null
+<!DOCTYPE QtCreatorProject>
+<qtcreator>
+ <data>
+ <variable>ProjectExplorer.Project.ActiveTarget</variable>
+ <value type="int">1</value>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.EditorSettings</variable>
+ <valuemap type="QVariantMap">
+ <value key="EditorConfiguration.Codec" type="QByteArray">System</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Target.0</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Desktop</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value>
+ <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
+ <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+ <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
+ <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+ <value type="QString">clean</value>
+ </valuelist>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/holvi/arto/ohjelmointi/urpo-0.0/urpo-build-desktop</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+ <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
+ <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Release</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/holvi/arto/ohjelmointi/urpo-0.0/urpo-build-desktop</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
+ <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">urpo</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase" type="int">2</value>
+ <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.ProFile" type="QString">urpo.pro</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetName" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetWorkingDirectory" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Target.1</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Maemo</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.MaemoDeviceTarget</value>
+ <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">1</value>
+ <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+ <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.2" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MaemoPackageCreationStep</value>
+ <valuelist key="Qt4ProjectManager.BuildStep.MaemoPackage.LocalFiles" type="QVariantList"/>
+ <value key="Qt4ProjectManager.BuildStep.MaemoPackage.Modified" type="bool">false</value>
+ <value key="Qt4ProjectManager.BuildStep.MaemoPackage.RemoteExe" type="QString">/usr/local/bin/urpo</value>
+ <valuelist key="Qt4ProjectManager.BuildStep.MaemoPackage.RemoteFiles" type="QVariantList"/>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">3</value>
+ <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+ <value type="QString">clean</value>
+ </valuelist>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/holvi/arto/ohjelmointi/urpo-0.0/urpo-build-maemo</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">5</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">9</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+ <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.2" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MaemoPackageCreationStep</value>
+ <valuelist key="Qt4ProjectManager.BuildStep.MaemoPackage.LocalFiles" type="QVariantList"/>
+ <value key="Qt4ProjectManager.BuildStep.MaemoPackage.Modified" type="bool">false</value>
+ <value key="Qt4ProjectManager.BuildStep.MaemoPackage.RemoteExe" type="QString">/home/opt/urpo</value>
+ <valuelist key="Qt4ProjectManager.BuildStep.MaemoPackage.RemoteFiles" type="QVariantList"/>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">3</value>
+ <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+ <value type="QString">clean</value>
+ </valuelist>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Release</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/holvi/arto/ohjelmointi/urpo-0.0/urpo-build-maemo</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">5</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">9</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
+ <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
+ <value key=".ProFile" type="QString">urpo.pro</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">New Maemo Run Configuration</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MaemoRunConfiguration</value>
+ <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.Arguments" type="QVariantList"/>
+ <valuemap key="Qt4ProjectManager.MaemoRunConfiguration.DebuggingHelpersLastDeployed" type="QVariantMap"/>
+ <value key="Qt4ProjectManager.MaemoRunConfiguration.DeviceId" type="qulonglong">1</value>
+ <valuemap key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployed" type="QVariantMap">
+ <value key="192.168.2.15" type="QDateTime">2010-06-18T10:35:02</value>
+ </valuemap>
+ </valuemap>
+ <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Target.2</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Qt Simulator</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.QtSimulatorTarget</value>
+ <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
+ <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+ <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
+ <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+ <value type="QString">clean</value>
+ </valuelist>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/holvi/arto/ohjelmointi/urpo-0.0/urpo-build-simulator</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">4</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+ <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
+ </valuemap>
+ <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
+ <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+ <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+ <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+ <value type="QString">clean</value>
+ </valuelist>
+ <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+ <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+ <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Release</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/holvi/arto/ohjelmointi/urpo-0.0/urpo-build-simulator</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">4</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
+ <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">urpo</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase" type="int">2</value>
+ <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments" type="QVariantList"/>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.ProFile" type="QString">urpo.pro</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
+ <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetName" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetWorkingDirectory" type="bool">false</value>
+ <value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.TargetCount</variable>
+ <value type="int">3</value>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
+ <value type="int">4</value>
+ </data>
+</qtcreator>
--- /dev/null
+<!DOCTYPE QtCreatorProject>
+<qtcreator>
+ <data>
+ <variable>RunConfiguration0-BaseEnvironmentBase</variable>
+ <value type="int">2</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-CommandLineArguments</variable>
+ <valuelist type="QVariantList"/>
+ </data>
+ <data>
+ <variable>RunConfiguration0-ProFile</variable>
+ <value type="QString">urpo.pro</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-RunConfiguration.name</variable>
+ <value type="QString">urpo</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-UseDyldImageSuffix</variable>
+ <value type="bool">false</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-UseTerminal</variable>
+ <value type="bool">false</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-UserEnvironmentChanges</variable>
+ <valuelist type="QVariantList"/>
+ </data>
+ <data>
+ <variable>RunConfiguration0-UserSetName</variable>
+ <value type="bool">false</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-UserSetWorkingDirectory</variable>
+ <value type="bool">false</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-UserWorkingDirectory</variable>
+ <value type="QString"></value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-type</variable>
+ <value type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
+ </data>
+ <data>
+ <variable>activeRunConfiguration</variable>
+ <value type="int">0</value>
+ </data>
+ <data>
+ <variable>activebuildconfiguration</variable>
+ <value type="QString">Debug</value>
+ </data>
+ <data>
+ <variable>buildConfiguration-Debug</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+ <value key="QtVersionId" type="int">0</value>
+ <value key="ToolChain" type="int">0</value>
+ <value key="buildConfiguration" type="int">2</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildConfiguration-Release</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+ <value key="QtVersionId" type="int">0</value>
+ <value key="buildConfiguration" type="int">0</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-buildstep0</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+ <valuelist key="abstractProcess.Environment" type="QVariantList">
+ <value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-WltRgqY6FP,guid=04ecfc95bb3bd6fe64c843cb4c132539</value>
+ <value type="QString">DESKTOP_SESSION=default</value>
+ <value type="QString">DISPLAY=:0.0</value>
+ <value type="QString">DM_CONTROL=/var/run/xdmctl</value>
+ <value type="QString">GS_LIB=/home/arto/.fonts</value>
+ <value type="QString">GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/arto/.gtkrc-2.0:/home/arto/.gtkrc-2.0-kde4:/home/arto/.kde/share/config/gtkrc-2.0</value>
+ <value type="QString">GTK_MODULES=canberra-gtk-module</value>
+ <value type="QString">GTK_RC_FILES=/etc/gtk/gtkrc:/home/arto/.gtkrc::/home/arto/.kde/share/config/gtkrc</value>
+ <value type="QString">HOME=/home/arto</value>
+ <value type="QString">KDE_FULL_SESSION=true</value>
+ <value type="QString">KDE_MULTIHEAD=false</value>
+ <value type="QString">KDE_SESSION_UID=1000</value>
+ <value type="QString">KDE_SESSION_VERSION=4</value>
+ <value type="QString">LANG=fi_FI.UTF-8</value>
+ <value type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator:</value>
+ <value type="QString">LIBGL_DRIVERS_PATH=/usr/lib/fglrx/dri:/usr/lib32/fglrx/dri</value>
+ <value type="QString">LOGNAME=arto</value>
+ <value type="QString">PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
+ <value type="QString">PWD=/home/arto/Asiakirjat</value>
+ <value type="QString">QTDIR=/usr/share/qt4</value>
+ <value type="QString">QT_PLUGIN_PATH=/home/arto/.kde/lib/kde4/plugins/:/usr/lib/kde4/plugins/</value>
+ <value type="QString">SESSION_MANAGER=local/pantteri:@/tmp/.ICE-unix/1475,unix/pantteri:/tmp/.ICE-unix/1475</value>
+ <value type="QString">SHELL=/bin/bash</value>
+ <value type="QString">SHLVL=0</value>
+ <value type="QString">SSH_AGENT_PID=1336</value>
+ <value type="QString">SSH_AUTH_SOCK=/tmp/ssh-pRlSkS1289/agent.1289</value>
+ <value type="QString">USER=arto</value>
+ <value type="QString">WINDOWPATH=7</value>
+ <value type="QString">XCURSOR_THEME=oxy-white</value>
+ <value type="QString">XDG_DATA_DIRS=/usr/share:/usr/share:/usr/local/share</value>
+ <value type="QString">XDG_SESSION_COOKIE=cb827d99e40c6d02e87590704bdc168b-1276323128.888201-1168136822</value>
+ <value type="QString">XDM_MANAGED=method=classic</value>
+ </valuelist>
+ <valuelist key="abstractProcess.arguments" type="QVariantList">
+ <value type="QString">/holvi/arto/ohjelmointi/urpo-0.0/urpo/urpo.pro</value>
+ <value type="QString">-spec</value>
+ <value type="QString">linux-g++</value>
+ <value type="QString">-r</value>
+ <value type="QString">CONFIG+=debug</value>
+ </valuelist>
+ <value key="abstractProcess.command" type="QString">/usr/bin/qmake-qt4</value>
+ <value key="abstractProcess.enabled" type="bool">false</value>
+ <value key="abstractProcess.workingDirectory" type="QString">/holvi/arto/ohjelmointi/urpo-0.0/urpo</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-buildstep1</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+ <valuelist key="abstractProcess.Environment" type="QVariantList">
+ <value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-WltRgqY6FP,guid=04ecfc95bb3bd6fe64c843cb4c132539</value>
+ <value type="QString">DESKTOP_SESSION=default</value>
+ <value type="QString">DISPLAY=:0.0</value>
+ <value type="QString">DM_CONTROL=/var/run/xdmctl</value>
+ <value type="QString">GS_LIB=/home/arto/.fonts</value>
+ <value type="QString">GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/arto/.gtkrc-2.0:/home/arto/.gtkrc-2.0-kde4:/home/arto/.kde/share/config/gtkrc-2.0</value>
+ <value type="QString">GTK_MODULES=canberra-gtk-module</value>
+ <value type="QString">GTK_RC_FILES=/etc/gtk/gtkrc:/home/arto/.gtkrc::/home/arto/.kde/share/config/gtkrc</value>
+ <value type="QString">HOME=/home/arto</value>
+ <value type="QString">KDE_FULL_SESSION=true</value>
+ <value type="QString">KDE_MULTIHEAD=false</value>
+ <value type="QString">KDE_SESSION_UID=1000</value>
+ <value type="QString">KDE_SESSION_VERSION=4</value>
+ <value type="QString">LANG=fi_FI.UTF-8</value>
+ <value type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator:</value>
+ <value type="QString">LIBGL_DRIVERS_PATH=/usr/lib/fglrx/dri:/usr/lib32/fglrx/dri</value>
+ <value type="QString">LOGNAME=arto</value>
+ <value type="QString">PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
+ <value type="QString">PWD=/home/arto/Asiakirjat</value>
+ <value type="QString">QTDIR=/usr/share/qt4</value>
+ <value type="QString">QT_PLUGIN_PATH=/home/arto/.kde/lib/kde4/plugins/:/usr/lib/kde4/plugins/</value>
+ <value type="QString">SESSION_MANAGER=local/pantteri:@/tmp/.ICE-unix/1475,unix/pantteri:/tmp/.ICE-unix/1475</value>
+ <value type="QString">SHELL=/bin/bash</value>
+ <value type="QString">SHLVL=0</value>
+ <value type="QString">SSH_AGENT_PID=1336</value>
+ <value type="QString">SSH_AUTH_SOCK=/tmp/ssh-pRlSkS1289/agent.1289</value>
+ <value type="QString">USER=arto</value>
+ <value type="QString">WINDOWPATH=7</value>
+ <value type="QString">XCURSOR_THEME=oxy-white</value>
+ <value type="QString">XDG_DATA_DIRS=/usr/share:/usr/share:/usr/local/share</value>
+ <value type="QString">XDG_SESSION_COOKIE=cb827d99e40c6d02e87590704bdc168b-1276323128.888201-1168136822</value>
+ <value type="QString">XDM_MANAGED=method=classic</value>
+ </valuelist>
+ <value key="abstractProcess.IgnoreReturnValue" type="bool">false</value>
+ <valuelist key="abstractProcess.arguments" type="QVariantList">
+ <value type="QString">-w</value>
+ </valuelist>
+ <value key="abstractProcess.command" type="QString">/usr/bin/make</value>
+ <value key="abstractProcess.enabled" type="bool">true</value>
+ <value key="abstractProcess.workingDirectory" type="QString">/holvi/arto/ohjelmointi/urpo-0.0/urpo</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-cleanstep0</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+ <value key="cleanConfig" type="bool">true</value>
+ <valuelist key="makeargs" type="QVariantList">
+ <value type="QString">clean</value>
+ </valuelist>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-buildstep0</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-buildstep1</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-cleanstep0</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfigurations</variable>
+ <valuelist type="QVariantList">
+ <value type="QString">Debug</value>
+ <value type="QString">Release</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>buildstep0</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
+ <value key="mkspec" type="QString"></value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildstep1</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildsteps</variable>
+ <valuelist type="QVariantList">
+ <value type="QString">trolltech.qt4projectmanager.qmake</value>
+ <value type="QString">trolltech.qt4projectmanager.make</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>cleanstep0</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
+ <value key="clean" type="bool">true</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>cleansteps</variable>
+ <valuelist type="QVariantList">
+ <value type="QString">trolltech.qt4projectmanager.make</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>defaultFileEncoding</variable>
+ <value type="QByteArray">System</value>
+ </data>
+ <data>
+ <variable>project</variable>
+ <valuemap type="QVariantMap"/>
+ </data>
+</qtcreator>
--- /dev/null
+<RCC>
+ <qresource prefix="/">
+ <file>help/gpl.html</file>
+ <file>help/index_fi.html</file>
+ <file>help/index.html</file>
+ <file>urpo_fi.qm</file>
+ </qresource>
+</RCC>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="fi_FI">
+<context>
+ <name>DebugConsole</name>
+ <message>
+ <location filename="debugconsole.cpp" line="30"/>
+ <source>This window shows information for resolving error situations
+</source>
+ <translation>Tässä ikkunassa on tietoa, jonka avulla voi selvittää virhetilanteita</translation>
+ </message>
+</context>
+<context>
+ <name>PrintJob</name>
+ <message>
+ <location filename="printjob.cpp" line="73"/>
+ <source>File %1 not exists.</source>
+ <translation>Tiedostoa %1 ei löydy.</translation>
+ </message>
+ <message>
+ <location filename="printjob.cpp" line="74"/>
+ <source>File not found</source>
+ <translation>Tiedostoa ei löydy</translation>
+ </message>
+ <message>
+ <location filename="printjob.cpp" line="115"/>
+ <source>Failed copying file</source>
+ <translation>Tiedoston kopiointi epäonnistui</translation>
+ </message>
+ <message>
+ <location filename="printjob.cpp" line="142"/>
+ <source>Print failed</source>
+ <translation>Tulostus epäonnistui</translation>
+ </message>
+ <message>
+ <location filename="printjob.cpp" line="165"/>
+ <source>Failed deleting file</source>
+ <translation>Tiedoston poistaminen epäonnistui</translation>
+ </message>
+</context>
+<context>
+ <name>PrintWidget</name>
+ <message>
+ <location filename="printwidget.cpp" line="42"/>
+ <source>Browse</source>
+ <translation>Selaa</translation>
+ </message>
+ <message>
+ <location filename="printwidget.cpp" line="65"/>
+ <source>Print</source>
+ <translation>Tulosta</translation>
+ </message>
+ <message>
+ <location filename="printwidget.cpp" line="72"/>
+ <source>Cancel</source>
+ <translation>Peruuta</translation>
+ </message>
+ <message>
+ <location filename="printwidget.cpp" line="75"/>
+ <source>Reconnect</source>
+ <translation>Yhdistä uudelleen</translation>
+ </message>
+ <message>
+ <location filename="printwidget.cpp" line="81"/>
+ <source>File</source>
+ <translation>Tiedosto</translation>
+ </message>
+ <message>
+ <location filename="printwidget.cpp" line="87"/>
+ <source>Printer</source>
+ <translation>Tulostin</translation>
+ </message>
+ <message>
+ <location filename="printwidget.cpp" line="93"/>
+ <source>Page range</source>
+ <translation>Tulostettavat sivut</translation>
+ </message>
+ <message>
+ <location filename="printwidget.cpp" line="98"/>
+ <source>Pages per sheet</source>
+ <translation>Sivuja arkilla</translation>
+ </message>
+ <message>
+ <location filename="printwidget.cpp" line="101"/>
+ <source>Copies</source>
+ <translation>Kopioita</translation>
+ </message>
+ <message>
+ <location filename="printwidget.cpp" line="159"/>
+ <source>Ready</source>
+ <translation>Valmis</translation>
+ </message>
+ <message>
+ <location filename="printwidget.cpp" line="169"/>
+ <source>Print file</source>
+ <translation>Tulosta tiedosto</translation>
+ </message>
+</context>
+<context>
+ <name>PrinterListJob</name>
+ <message>
+ <location filename="printerlistjob.cpp" line="74"/>
+ <source>Failed to run ssh client.</source>
+ <translation>ssh-ohjelman suorittaminen epäonnistui.</translation>
+ </message>
+ <message>
+ <location filename="printerlistjob.cpp" line="76"/>
+ <source>Failed to connect host</source>
+ <translation>Tietokoneeseen yhdistäminen epäonnistui</translation>
+ </message>
+ <message>
+ <location filename="printerlistjob.cpp" line="78"/>
+ <source>Time out or authentication error</source>
+ <translation>Aikakatkaisu tai autentikointivirhe</translation>
+ </message>
+ <message>
+ <location filename="printerlistjob.cpp" line="80"/>
+ <source>User cancelled</source>
+ <translation>Peruutettu</translation>
+ </message>
+ <message>
+ <location filename="printerlistjob.cpp" line="82"/>
+ <source>Connection failed</source>
+ <translation>Yhteys epäonnistui</translation>
+ </message>
+</context>
+<context>
+ <name>SettingsDialog</name>
+ <message>
+ <location filename="settingsdialog.cpp" line="41"/>
+ <source>Urpo Settings</source>
+ <translation>Urpon asetukset</translation>
+ </message>
+ <message>
+ <location filename="settingsdialog.cpp" line="49"/>
+ <source>Browse</source>
+ <translation>Selaa</translation>
+ </message>
+ <message>
+ <location filename="settingsdialog.cpp" line="51"/>
+ <source>Done</source>
+ <translation>Valmis</translation>
+ </message>
+ <message>
+ <location filename="settingsdialog.cpp" line="55"/>
+ <source>Help</source>
+ <translation>Ohje</translation>
+ </message>
+ <message>
+ <location filename="settingsdialog.cpp" line="61"/>
+ <source>Remote printing utility via ssh and cups. Please read help.</source>
+ <translation type="unfinished">Etätulostus ssh:n ja cups:n avulla. Ole hyvä ja lue ohje.</translation>
+ </message>
+ <message>
+ <location filename="settingsdialog.cpp" line="72"/>
+ <source>Host name or ip address</source>
+ <translation>Tietokoneen nimi tai ip-osoite</translation>
+ </message>
+ <message>
+ <location filename="settingsdialog.cpp" line="77"/>
+ <source>Username</source>
+ <translation>Käyttäjätunnus</translation>
+ </message>
+ <message>
+ <location filename="settingsdialog.cpp" line="82"/>
+ <location filename="settingsdialog.cpp" line="151"/>
+ <source>Identity file</source>
+ <translation>Yksityinen avaintiedosto</translation>
+ </message>
+</context>
+<context>
+ <name>UrpoMainWindow</name>
+ <message>
+ <location filename="urpomainwindow.cpp" line="100"/>
+ <source>Connecting...</source>
+ <translation>Yhdistetään...</translation>
+ </message>
+ <message>
+ <location filename="urpomainwindow.cpp" line="110"/>
+ <source>Settings</source>
+ <translation>Asetukset</translation>
+ </message>
+ <message>
+ <location filename="urpomainwindow.cpp" line="114"/>
+ <source>Debug</source>
+ <translation>Debug</translation>
+ </message>
+ <message>
+ <location filename="urpomainwindow.cpp" line="115"/>
+ <source>Open debug console</source>
+ <translation>Avaa debug-ikkuna</translation>
+ </message>
+ <message>
+ <location filename="urpomainwindow.cpp" line="119"/>
+ <source>About</source>
+ <translation>Tietoja</translation>
+ </message>
+ <message>
+ <location filename="urpomainwindow.cpp" line="123"/>
+ <source>About Qt</source>
+ <translation>Tietoja Qt:sta</translation>
+ </message>
+ <message>
+ <location filename="urpomainwindow.cpp" line="128"/>
+ <source>Help</source>
+ <translation>Ohje</translation>
+ </message>
+ <message>
+ <location filename="urpomainwindow.cpp" line="138"/>
+ <source>Urpo Help</source>
+ <translation>Urpon ohje</translation>
+ </message>
+ <message>
+ <location filename="urpomainwindow.cpp" line="153"/>
+ <source>No printers found</source>
+ <translation>Tulostimia ei löytynyt</translation>
+ </message>
+ <message>
+ <location filename="urpomainwindow.cpp" line="173"/>
+ <source>About Urpo</source>
+ <translation>Tietoja Urposta</translation>
+ </message>
+ <message>
+ <location filename="urpomainwindow.cpp" line="174"/>
+ <source><b>Unix Remote Printing Operation %1 </b><p>Copyright &copy; Arto Hyv&auml;ttinen 2010<p>License: General Public License v3</source>
+ <translation><b>Etätulostus Unix-järjestelmille %1</b><p>Copyright &copy; Arto Hyvättinen 2010<p>Linsenssoitu General Public License v3</translation>
+ </message>
+ <message>
+ <location filename="urpomainwindow.cpp" line="224"/>
+ <source>Printing...</source>
+ <translation>Tulostaa...</translation>
+ </message>
+</context>
+<context>
+ <name>UrpoProcess</name>
+ <message>
+ <location filename="urpoprocess.cpp" line="87"/>
+ <source>Process exited with code %1</source>
+ <translation>Prosessi päättyi paluuarvolla %1</translation>
+ </message>
+ <message>
+ <location filename="urpoprocess.cpp" line="117"/>
+ <source>External program calling error</source>
+ <translation>Ohjelman suorittamisessa virhe</translation>
+ </message>
+ <message>
+ <location filename="urpoprocess.cpp" line="119"/>
+ <source>Connection error</source>
+ <translation>Yhdistämisessä virhe</translation>
+ </message>
+ <message>
+ <location filename="urpoprocess.cpp" line="121"/>
+ <source>Authentication error</source>
+ <translation>Autentikoimisessa virhe</translation>
+ </message>
+ <message>
+ <location filename="urpoprocess.cpp" line="123"/>
+ <source>Time out</source>
+ <translation>Aikakatkaisu</translation>
+ </message>
+ <message>
+ <location filename="urpoprocess.cpp" line="125"/>
+ <source>User cancelled</source>
+ <translation>Peruttu</translation>
+ </message>
+</context>
+</TS>
--- /dev/null
+/**************************************************************************
+
+ URPO
+
+ Unix Remote Printing Operation
+ Copyright (c) Arto Hyvättinen 2010
+
+ This file is part of URPO.
+
+ URPO is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ URPO is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+#include "urpoconnection.h"
+
+
+UrpoConnection::UrpoConnection()
+{
+ debugMonitor_ = 0;
+}
+
+UrpoConnection::~UrpoConnection()
+{
+
+}
+
+
+QObject* UrpoConnection::getDebugMonitor() const
+{
+ return debugMonitor_;
+}
+
+void UrpoConnection::setDebugMonitor(QObject *monitor)
+{
+ debugMonitor_ = monitor;
+}
+
+QString UrpoConnection::getHostString()
+{
+ // Get string user@host OR host (if userid empty)
+ QString hostString;
+ if( !getUserid().isEmpty())
+ hostString=getUserid() + "@";
+ hostString.append( getHost());
+ return hostString;
+}
+
+QString UrpoConnection::getKeyOption()
+{
+ if( getIdentity().isEmpty())
+ return QString(); // No identity
+ else
+ return QString("-i ").append(getIdentity() + " ");
+}
--- /dev/null
+/**************************************************************************
+
+ URPO
+
+ Unix Remote Printing Operation
+ Copyright (c) Arto Hyvättinen 2010
+
+ This file is part of URPO.
+
+ URPO is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ URPO is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+#ifndef URPOCONNECTION_H
+#define URPOCONNECTION_H
+
+
+#include <QString>
+class QObject;
+
+/*! Information about ssh connection (abstract)
+
+@author Arto Hyvättinen
+@date 2010-06-11
+@version 1
+@abstract
+
+
+ */
+class UrpoConnection
+{
+protected:
+ UrpoConnection();
+public:
+ virtual ~UrpoConnection();
+
+ /*! Host name or ip address
+
+ @return Server host name of ip address */
+ virtual QString getHost() const = 0;
+
+ /*! Userid in server
+
+ @return userid in server */
+ virtual QString getUserid() const = 0;
+
+ /*! Identity file
+
+ ssh identity file (private key)
+
+ @return ssh identity file path */
+ virtual QString getIdentity() const = 0;
+
+ /*! Default time out in connection
+
+ Connection fais if connecting or commanding lasts
+ more than timeout.
+
+ @return default timeout in msecs */
+
+
+ /*! Set Debug monitor
+
+ Debug monitor is QObject receiving debugMsg(QString&) signals.
+ @param monitor QObject receiving debug messages */
+ void setDebugMonitor(QObject* monitor);
+
+ /*! Get pointer to Debug monitor
+
+ Debug monitor is QObject receiving debugMsg(QString&) signals.
+ @return QObject receiving debug messages */
+ QObject* getDebugMonitor() const;
+
+ /*! user@@host -string
+
+
+ @return user@@host -string
+ */
+ QString getHostString();
+
+ /*! Key option needed for ssh
+
+
+ @return -i key_file or empty if no keyfile
+ */
+ QString getKeyOption();
+
+private:
+ /*! Receiver for debugMsg(QString&) signals */
+ QObject* debugMonitor_;
+};
+
+#endif // URPOCONNECTION_H
--- /dev/null
+/**************************************************************************
+
+ URPO
+
+ Unix Remote Printing Operation
+ Copyright (c) Arto Hyvättinen 2010
+
+ This file is part of URPO.
+
+ URPO is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ URPO is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+#include "urpoconnectionsettings.h"
+#include <QSettings>
+
+
+UrpoConnectionSettings::UrpoConnectionSettings(const QString organization, const QString application)
+{
+ storePassword_ = false;
+ organization_ = organization;
+ application_ = application;
+}
+
+QString UrpoConnectionSettings::getHost() const
+{
+ return host_;
+}
+
+QString UrpoConnectionSettings::getIdentity() const
+{
+ return identity_;
+}
+
+QString UrpoConnectionSettings::getUserid() const
+{
+ return userid_;
+}
+
+void UrpoConnectionSettings::setHost(const QString &host)
+{
+ host_ = host;
+}
+
+void UrpoConnectionSettings::setIdentity(const QString &identity)
+{
+ identity_ = identity;
+}
+
+void UrpoConnectionSettings::setUserid(const QString &userid)
+{
+ userid_ = userid;
+}
+
+void UrpoConnectionSettings::store() const
+{
+ // Store settings using QSettings
+ QSettings settings(organization_, application_);
+ settings.setValue("host",host_);
+ settings.setValue("userid",userid_);
+ settings.setValue("identity",identity_);
+
+}
+
+void UrpoConnectionSettings::load()
+{
+ // Load settings using QSettings
+ QSettings settings(organization_,application_);
+
+ host_ = settings.value("host").toString();
+ userid_ = settings.value("userid").toString();
+ identity_ = settings.value("identity").toString();
+
+
+}
--- /dev/null
+/**************************************************************************
+
+ URPO
+
+ Unix Remote Printing Operation
+ Copyright (c) Arto Hyvättinen 2010
+
+ This file is part of URPO.
+
+ URPO is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ URPO is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+#ifndef URPOCONNECTIONSETTINGS_H
+#define URPOCONNECTIONSETTINGS_H
+
+#include "urpoconnection.h"
+
+/*! Connection information, support storing settings
+
+ Setting are stored/loaded using QSettings
+
+ @author Arto Hyvättinen
+ @date 2010-06-11
+ @version 1
+ */
+class UrpoConnectionSettings : public UrpoConnection
+{
+public:
+ /*!
+ @param organization Organization key for storing settings
+ @param application Application key for storing settings
+ */
+ UrpoConnectionSettings(const QString organization = QString(), const QString application=QString());
+
+
+ QString getHost() const;
+ QString getIdentity() const;
+ QString getUserid() const;
+
+ void setHost(const QString &host);
+ void setIdentity(const QString &password);
+ void setUserid(const QString &userid);
+
+ /*! Store settings via QSettings */
+ void store() const;
+ /*! Load settings via QSettings */
+ void load();
+
+private:
+ QString host_; /*! Host name or ip address */
+ QString identity_; /*! Identity (private key) file path */
+ QString userid_; /*! Userid in remote host */
+
+ bool storePassword_; /*! Allow to store password */
+
+ QString organization_; /*! Organization key storing settings */
+ QString application_; /*! Application key storing settings */
+
+
+};
+
+#endif // URPOCONNECTIONSETTINGS_H
--- /dev/null
+/**************************************************************************
+
+ URPO
+
+ Unix Remote Printing Operation
+ Copyright (c) Arto Hyvättinen 2010
+
+ This file is part of URPO.
+
+ URPO is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ URPO is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+#include "urpojob.h"
+
+#include "urpoconnection.h"
+
+UrpoJob::UrpoJob(UrpoConnection* connection) :
+ QObject(0)
+{
+ connection_=connection;
+ // Connect debug monitor
+ if( connection_->getDebugMonitor())
+ connect(this,SIGNAL(debugMessage(QString)),connection_->getDebugMonitor(),SLOT(debugMessage(QString)));
+
+ status_ = Ready;
+}
+
+
+void UrpoJob::sendDebugMessage(QString message)
+{
+ emit debugMessage(message);
+}
+
+UrpoProcess* UrpoJob::newProcess()
+{
+ UrpoProcess* process = new UrpoProcess( this );
+ // Connect debug monitor
+ connect( process, SIGNAL(debugMessage(QString)), connection_->getDebugMonitor(), SLOT(debugMessage(QString)));
+ return process;
+}
+
+void UrpoJob::finish(JobStatus status)
+{
+ setStatus( status );
+ if( status == Successed )
+ emit finished(true);
+ else
+ emit finished(false);
+}
+
+void UrpoJob::fail(QString errorString)
+{
+ setStatus( Failed );
+ emit finished(false, errorString);
+}
--- /dev/null
+/**************************************************************************
+
+ URPO
+
+ Unix Remote Printing Operation
+ Copyright (c) Arto Hyvättinen 2010
+
+ This file is part of URPO.
+
+ URPO is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ URPO is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+#ifndef URPOJOB_H
+#define URPOJOB_H
+
+#include <QObject>
+
+#include "urpoprocess.h"
+class UrpoConnection;
+
+/*! Base class for jobs (abstract)
+
+ @author Arto Hyvättinen
+ @version 0
+ @date 2010-06-11
+
+
+
+ */
+class UrpoJob : public QObject
+{
+ Q_OBJECT
+public:
+ explicit UrpoJob(UrpoConnection* connection);
+
+
+ enum JobStatus {
+ Ready,
+ Running,
+ Successed,
+ Failed,
+ Cancelled
+ };
+
+ /*! Job status
+
+ @return Job status (Ready, Running, Successed, Failed
+ */
+ JobStatus getStatus() const { return status_; }
+
+signals:
+ void debugMessage(QString message);
+ /*! Job finished (successed of failed)
+
+ @param successed True if job successed, false if failed */
+ void finished(bool successed, QString errorStr = QString());
+
+public slots:
+ /*! Start job */
+ void start() { startJob(); }
+ /*! Cancel job */
+ void cancel() { cancelJob(); }
+
+
+protected:
+ virtual void startJob() = 0;
+ virtual void cancelJob() = 0;
+ /*! Finish job
+ @arg status Job status (Successed, Failed, Cancelled) */
+ void finish(JobStatus status);
+ /*! Finish failed job
+
+ emit finished() with error status and message */
+ void fail(QString errorString);
+ /*! Get connection pointer */
+ UrpoConnection* getConnection() { return connection_; }
+
+ /*! Send debug message
+
+ @param message Message to debug monitor
+
+ If debug monitor has been connected, send message to debug monitor
+
+ */
+ void sendDebugMessage(QString message);
+
+ /*! Create new UrpoProcess */
+ UrpoProcess* newProcess();
+
+ /*! Set job status */
+ void setStatus(JobStatus status) { status_ = status; }
+
+private:
+ UrpoConnection* connection_;
+ JobStatus status_;
+
+};
+
+#endif // URPOJOB_H
--- /dev/null
+/**************************************************************************
+
+ URPO
+
+ Unix Remote Printing Operation
+ Copyright (c) Arto Hyvättinen 2010
+
+ This file is part of URPO.
+
+ URPO is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ URPO is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+#include "urpomainwindow.h"
+
+
+#include "urpoconnectionsettings.h"
+#include "printerlistjob.h"
+#include "debugconsole.h"
+#include "printwidget.h"
+#include "printjob.h"
+
+#include <QMenuBar>
+#include <QMessageBox>
+#include <QApplication>
+#include <QTextBrowser>
+#include <QUrl>
+#include <QLocale>
+#include <QFile>
+#include "settingsdialog.h"
+
+#define VERSION "0.9" /*! Program version */
+
+UrpoMainWindow::UrpoMainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ setWindowTitle(QString("URPO ") + VERSION );
+
+ // Load connection settings
+ settings_ = new UrpoConnectionSettings("Urpo","Urpo");
+ settings_->load();
+
+ // Connect to debug monitor
+ monitor_ = new DebugConsole();
+ settings_->setDebugMonitor(monitor_);
+
+ // Init central widget
+ printWidget_ = new PrintWidget;
+ setCentralWidget(printWidget_);
+
+ // Init Help
+ initHelp();
+ // Init menu
+ initMenu();
+
+ // Connect buttons
+ connect( printWidget_, SIGNAL(reconnect()), this, SLOT(getPrinters()));
+ connect( printWidget_, SIGNAL(print(QString,QString)), this, SLOT(print(QString,QString)));
+
+ // Init jobs
+
+ // Init printers list job to get printers list
+ printerListJob_ = new PrinterListJob( settings_);
+ // Connect finished to printersReceives:
+ // - if success, enable printing
+ // - if fail, go to Settings dialog
+ connect( printerListJob_, SIGNAL(finished(bool,QString)), this, SLOT(printersReceived(bool,QString)));
+
+ // Init print job
+ printJob_ = new PrintJob(settings_);
+ connect( printJob_, SIGNAL(finished(bool,QString)), this, SLOT(printFinished(bool,QString)));
+
+ if( settings_->getHost().isEmpty())
+ // If no host settings, go first to settings
+ settings();
+ else
+ // Try to get printers list
+ getPrinters();
+
+
+}
+
+UrpoMainWindow::~UrpoMainWindow()
+{
+
+}
+
+void UrpoMainWindow::getPrinters()
+{
+
+ printWidget_->setStatus(tr("Connecting..."),true);
+ connect(printWidget_, SIGNAL(cancel()), printerListJob_, SLOT(cancel()));
+ printerListJob_->start();
+
+}
+
+
+void UrpoMainWindow::initMenu()
+{
+
+ QAction* settingsAction = new QAction( tr("Settings"), this);
+ connect(settingsAction, SIGNAL(triggered()), this, SLOT(settings()) );
+ menuBar()->addAction(settingsAction);
+
+ QAction* debugAction = new QAction( tr("Debug"), this);
+ debugAction->setStatusTip(tr("Open debug console"));
+ connect(debugAction, SIGNAL(triggered()), this, SLOT(debugWindow() ));
+ menuBar()->addAction(debugAction);
+
+ QAction* aboutAction = new QAction( tr("About"), this);
+ connect(aboutAction, SIGNAL(triggered()), this, SLOT(about()));
+ menuBar()->addAction(aboutAction);
+
+ QAction* aboutQtAction = new QAction( tr("About Qt"), this );
+ connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+ menuBar()->addAction(aboutQtAction);
+
+
+ QAction* helpAction = new QAction( tr("Help"), this );
+ connect( helpAction, SIGNAL(triggered()), this, SLOT(helpWindow()));
+ menuBar()->addAction(helpAction);
+
+}
+
+void UrpoMainWindow::initHelp()
+{
+
+ // Init help
+ helpBrowser_ = new QTextBrowser();
+ helpBrowser_->setWindowTitle(tr("Urpo Help"));
+
+ // Load help file
+ // Try to load locale version index_fi etc.
+ QString language=QLocale::system().name().left(2);
+ QString helpfilename = QString(":/help/index_") + language + QString(".html");
+
+ QFile helpfile( helpfilename );
+ if( helpfile.exists() )
+ helpBrowser_->setSource(QUrl( QString("qrc") + helpfilename ));
+ else
+ // Not find, load general
+ helpBrowser_->setSource(QUrl("qrc:/help/index.html"));
+
+ helpBrowser_->setOpenExternalLinks(true);
+
+}
+
+void UrpoMainWindow::printersReceived(bool success, QString error)
+{
+ // Disconnect cancel button out of printerListJob
+ disconnect(printWidget_, SIGNAL(cancel()), printerListJob_, SLOT(cancel()));
+ if(success)
+ {
+ // PrinterListJob successed
+ printWidget_->setPrinters( printerListJob_->getPrinters());
+ if( printerListJob_->getPrinters().isEmpty())
+ {
+ // No printers, can't print
+ printWidget_->setStatus( QString("<font color=red>") + tr("No printers found") + QString("</font>"),false);
+ printWidget_->setReady(false);
+ }
+ else
+ {
+ // Ready to print
+ printWidget_->setReady( true );
+ }
+
+ }
+ else
+ {
+ // Unsuccess!
+ printWidget_->setStatus( QString("<font color=red>") + error + QString("</font>") );
+ printWidget_->setReady(false);
+ }
+}
+
+void UrpoMainWindow::about()
+{
+ QMessageBox::about(this, tr("About Urpo"),
+ tr("<b>Unix Remote Printing Operation %1 </b>"
+ "<p>Copyright © Arto Hyvättinen 2010"
+ "<p>License: General Public License v3"
+ ).arg(VERSION));
+}
+
+void UrpoMainWindow::settings()
+{
+ printWidget_->doCancel(); // Cancel current process
+
+ SettingsDialog* dialog = new SettingsDialog(this);
+ dialog->setSettings(settings_);
+ dialog->setHelp(helpBrowser_);
+ dialog->show();
+
+ // Dialog done -> get printers
+ connect( dialog, SIGNAL(accepted()), this, SLOT(getPrinters()));
+
+}
+
+void UrpoMainWindow::debugWindow()
+{
+ monitor_->show();
+ monitor_->raise();
+ monitor_->activateWindow();
+}
+
+void UrpoMainWindow::helpWindow()
+{
+
+ // Show help
+ helpBrowser_->home();
+ helpBrowser_->show();
+ helpBrowser_->raise();
+ helpBrowser_->activateWindow();
+}
+
+void UrpoMainWindow::print(QString file, QString options)
+{
+ printWidget_->setStatus( tr("Printing..."), true );
+ connect( printWidget_, SIGNAL(cancel()), printJob_, SLOT(cancel()));
+ printJob_->printFile(file,options);
+}
+
+void UrpoMainWindow::printFinished(bool success, QString errorStr)
+{
+ disconnect( printWidget_, SIGNAL(cancel()), printJob_, SLOT(cancel()));
+ printWidget_->setReady(true); // Ready to print again!
+ if( success == false ) // Error -- set error message!
+ {
+ printWidget_->setReady(true);
+ printWidget_->setStatus( QString("<font color=red>") + errorStr + QString("</font>"));
+ }
+}
--- /dev/null
+/**************************************************************************
+
+ URPO
+
+ Unix Remote Printing Operation
+ Copyright (c) Arto Hyvättinen 2010
+
+ This file is part of URPO.
+
+ URPO is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ URPO is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+#ifndef URPOMAINWINDOW_H
+#define URPOMAINWINDOW_H
+
+#include <QtGui/QMainWindow>
+
+class PrintWidget;
+class PrintJob;
+class PrinterListJob;
+class UrpoConnectionSettings;
+class DebugConsole;
+class QTextBrowser;
+
+/*! GUI class for URPO main window
+
+ @author Arto Hyvättinen
+ @version 0.1
+ @date 2010-06-17
+
+ */
+class UrpoMainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ UrpoMainWindow(QWidget *parent = 0);
+ ~UrpoMainWindow();
+
+public slots:
+ /*! Populate printer QCombo and enable printing */
+ void printersReceived(bool success, QString error);
+ /*! Start printers getting */
+ void getPrinters();
+ /*! Show about dialog */
+ void about();
+ /*! Show settings dialog */
+ void settings();
+ /*! Show help window */
+ void helpWindow();
+ /*! Show debug window */
+ void debugWindow();
+ /*! Print file */
+ void print(QString file, QString options);
+ /*! Print finished, enable buttons */
+ void printFinished(bool success, QString errorStr);
+
+private:
+ void initMenu();
+ void initHelp();
+
+private:
+ PrintWidget* printWidget_;
+ PrinterListJob* printerListJob_;
+ PrintJob* printJob_;
+ UrpoConnectionSettings* settings_;
+ DebugConsole* monitor_;
+ QTextBrowser* helpBrowser_;
+
+
+};
+
+#endif // URPOMAINWINDOW_H
--- /dev/null
+/**************************************************************************
+
+ URPO
+
+ Unix Remote Printing Operation
+ Copyright (c) Arto Hyvättinen 2010
+
+ This file is part of URPO.
+
+ URPO is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ URPO is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+#include "urpoprocess.h"
+#include "urpoconnection.h"
+#include <QTimer>
+
+
+int const UrpoProcess::DEFAULTTIMEOUT;
+
+UrpoProcess::UrpoProcess(QObject* parent) :
+ QObject(parent)
+{
+ status_ = Ready;
+ error_ = NoError;
+ setTimeout( DEFAULTTIMEOUT );
+}
+
+void UrpoProcess::terminate()
+{
+ fail(Cancelled);
+}
+
+QStringList UrpoProcess::getOutput()
+{
+ return output_;
+}
+
+void UrpoProcess::fail(UrpoError error)
+{
+ status_=Failed;
+ error_=error;
+ qprocess_.terminate();
+ emit finished(false);
+ sendDebugMessage( getErrorString() );
+}
+
+
+void UrpoProcess::timeout()
+{
+ // If process is still running, it means timeout!
+ if( status_ == Running)
+ fail(Timeout);
+}
+
+void UrpoProcess::start(const QString &command)
+{
+ sendDebugMessage(QString("[Running command %1 ]").arg(command));
+
+ // Process finished handling
+ connect( &qprocess_, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(processFinished(int,QProcess::ExitStatus)));
+
+ // Timer for timeout
+ // use UrpoConnection's default timeout settings
+ QTimer::singleShot( getTimeout(), this, SLOT(timeout()) );
+
+ // Start process
+ status_ = Running;
+
+ qprocess_.start(command);
+
+}
+
+void UrpoProcess::processFinished(int exitCode,QProcess::ExitStatus exitStatus)
+{
+ if( exitCode)
+ {
+ sendDebugMessage( QString( tr("Process exited with code %1") ).arg(exitCode));
+ // Get data from ssh server
+ QByteArray newData = qprocess_.readAllStandardError();
+ sendDebugMessage( QString(newData) );
+
+ fail(ConnectionError);
+ }
+ else if( exitStatus == QProcess::CrashExit)
+ // Process failed
+ fail(ProcessError);
+ else
+ {
+ // Read output
+ QByteArray bytes = qprocess_.readAllStandardOutput();
+ QString string(bytes);
+ sendDebugMessage(string);
+ // Split to lines and store to output_
+ output_=string.split("\n");
+ status_=Successed;
+ emit finished(true);
+ }
+}
+
+QString UrpoProcess::getErrorString() const
+{
+ switch( getError() )
+ {
+ case NoError:
+ return QString();
+ case ProcessError:
+ return tr("External program calling error");
+ case ConnectionError:
+ return tr("Connection error");
+ case AuthError:
+ return tr("Authentication error");
+ case Timeout:
+ return tr("Time out");
+ case Cancelled:
+ return tr("User cancelled");
+ }
+ return QString();
+}
+
+
--- /dev/null
+/**************************************************************************
+
+ URPO
+
+ Unix Remote Printing Operation
+ Copyright (c) Arto Hyvättinen 2010
+
+ This file is part of URPO.
+
+ URPO is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ URPO is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+**************************************************************************/
+
+#ifndef URPOPROCESS_H
+#define URPOPROCESS_H
+
+#include <QObject>
+#include <QStringList>
+#include <QProcess>
+class UrpoConnection;
+
+/*! Process running ssh/scp command
+
+ @author Arto Hyvättinen
+ @version 0
+ @date 2010-06-11 - 2010-06-12
+
+ Run ssh/scp etc. command.
+
+ Read setting using UrpoConnect settings information object.
+ Support debug monitoring using debugMessage-signals, monitor defined in settings object
+
+ First, connect finished()-signal. Then, run command.
+ Command is run asynchronosly.
+
+ @code
+ ...
+ // Get list of available printers
+
+ QString command = "ssh ";
+ command.append(getConnection()->getKeyOption());
+ command.append(getConnection()->getHostString());
+ command.append(" env LANG=en lpstat -p");
+
+ process = new UrpoProcess( connect );
+
+ connect( process, SIGNAL(finished(bool)), this, SLOT( readOutput(bool) ) );
+ process.start(command);
+
+ ...
+ ::readOutput(bool success)
+ {
+ if( success )
+ {
+ foreach(QString line, process->getOutput() )
+ cout << line << "\n";
+ }
+ else
+ cout << "Error " << process->getError();
+ }
+ @endcode
+
+ @see UrpoConnect
+
+ */
+class UrpoProcess : public QObject
+{
+ Q_OBJECT
+public:
+ /*!
+ @param connection Pointer to connection settings information
+ */
+ explicit UrpoProcess(QObject* parent = 0);
+
+
+ enum UrpoStatus {
+ Ready /*! Ready for connecting */ = 0,
+ Running /*! Command running */ = 1,
+ Successed /*! Command successed */ = 2,
+ Failed /*! Command failed */ = 3
+ };
+
+ enum UrpoError {
+ NoError /*! No errors happends */ = 0,
+ ProcessError /*! Error running process */ = 1,
+ ConnectionError /*! Error connecting host */ = 2,
+ AuthError /*! Authentication failed */ = 3,
+ Timeout /*! Timed out */ = 4,
+ Cancelled /*! User cancelled operation */ = 5
+ };
+
+ /*! Get output of command
+ @return Output of command, list of QStrings
+ */
+ QStringList getOutput();
+
+ /*! Run command
+
+ Start process running command. When process finish
+ (successed/failed), finished() signal will be emitted
+
+ @param command Command to execute
+ */
+ void start(const QString& command);
+
+ /*! Error of process
+
+ If process failed, get error code
+ @return Error code
+ */
+ UrpoError getError() const { return error_; }
+ /*! Error of process (in string)
+
+ If process failed, return error string readable by user
+
+ @return Error string
+
+ */
+ QString getErrorString() const;
+
+ /*! Process status
+
+ @return Status (Ready, Running, Successed, Failed)
+ */
+ UrpoStatus getStatus() const { return status_; }
+
+
+ /*! Send debug message
+
+ @param message Message to debug monitor
+
+ If debug monitor has been connected, send message to debug monitor
+
+ */
+ void sendDebugMessage(QString message) { emit debugMessage(message); }
+
+ /*! Set timeout
+
+ Process time out, if running command last more than timeout
+
+
+ @param msecs Timeout in msecs
+ */
+ void setTimeout(int msecs) { timeout_=msecs; }
+
+ /*! Return timeout
+
+ @return Timeout in msecs */
+ int getTimeout() { return timeout_; }
+
+signals:
+ /*! Process finished (successed of failed)
+
+ @param success True if process successed, false if failed
+
+ Emitted when process finished.
+ Output of process can be reader throught getOutput() */
+ void finished(bool success);
+ /** Send debug messages
+
+ UrpoConnection can set up a debug monitor, a QObject receiving
+ debugMsg signals. Debug messages contains information about
+ process output, errors etc.
+
+ @param message Message send to debug monitor */
+ void debugMessage(QString message);
+
+public slots:
+ /*! Cancel process
+
+ Terminate process. Emit finished(false) signal and set Cancelled error */
+ void terminate();
+
+ /*! SSH client has finished */
+ void processFinished(int exitCode,QProcess::ExitStatus exitStatus);
+ /*! Timeout during connecting */
+ void timeout();
+
+
+protected:
+
+
+private:
+
+ static int const DEFAULTTIMEOUT = 15000;
+
+ void fail(UrpoError error);
+
+ QStringList output_;
+
+ QProcess qprocess_;
+
+ UrpoStatus status_;
+ UrpoError error_;
+ int timeout_; /*! Timeout in msecs */
+};
+
+#endif // URPOPROCESS_H