Index: /tags/0.1.1.42-alpha1/COPYING
===================================================================
--- /tags/0.1.1.42-alpha1/COPYING	(revision 44)
+++ /tags/0.1.1.42-alpha1/COPYING	(revision 44)
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  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.
+
+  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.
+
+  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.
+
+  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.
+
+  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.
+
+  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.
+
+  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.
+
+  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.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "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.
+
+  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.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  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.
+
+  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.
+
+  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.
+
+  1. Source Code.
+
+  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.
+
+  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.
+
+  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.
+
+  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.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  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.
+
+  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.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  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.
+
+  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.
+
+  4. Conveying Verbatim Copies.
+
+  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.
+
+  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.
+
+  5. Conveying Modified Source Versions.
+
+  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:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    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".
+
+    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.
+
+    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.
+
+  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.
+
+  6. Conveying Non-Source Forms.
+
+  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:
+
+    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.
+
+    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.
+
+    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.
+
+    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.
+
+    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.
+
+  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.
+
+  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.
+
+  "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.
+
+  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).
+
+  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.
+
+  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.
+
+  7. Additional Terms.
+
+  "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.
+
+  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.
+
+  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:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    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
+
+    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
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    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.
+
+  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.
+
+  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.
+
+  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.
+
+  8. Termination.
+
+  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).
+
+  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.
+
+  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.
+
+  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.
+
+  9. Acceptance Not Required for Having Copies.
+
+  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.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  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.
+
+  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.
+
+  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.
+
+  11. Patents.
+
+  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".
+
+  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.
+
+  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.
+
+  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.
+
+  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.
+
+  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.
+
+  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.
+
+  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.
+
+  12. No Surrender of Others' Freedom.
+
+  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.
+
+  13. Use with the GNU Affero General Public License.
+
+  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.
+
+  14. Revised Versions of this License.
+
+  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.
+
+  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.
+
+  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.
+
+  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.
+
+  15. Disclaimer of Warranty.
+
+  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.
+
+  16. Limitation of Liability.
+
+  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.
+
+  17. Interpretation of Sections 15 and 16.
+
+  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.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  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.
+
+  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.
+
+    <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/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <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.
+
+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".
+
+  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
+<http://www.gnu.org/licenses/>.
+
+  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
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
Index: /tags/0.1.1.42-alpha1/README
===================================================================
--- /tags/0.1.1.42-alpha1/README	(revision 44)
+++ /tags/0.1.1.42-alpha1/README	(revision 44)
@@ -0,0 +1,40 @@
+TSPSG: TSP Solver and Generator
+Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
+
+$Id$
+$URL$
+
+This software is intended to generate and solve Travelling
+Salesman Problem (TSP) tasks. It uses Branch and Bound method
+for solving. An input is a number of cities and a matrix of
+city-to-city travel prices. The matrix can be populated with
+random values in a given range (useful for generating tasks).
+The result is an optimal route, its price, step-by-step matrices
+of solving and solving graph. The task can be saved in internal
+binary format and opened later. The result can be printed without
+the answer (only input matrix) or with it.
+
+TSPSG may be useful for teachers to generate tasks for tests or
+just for regular users to solve TSPs. It is also may be used as an
+example of using Branch and bound method to solve particular task.
+
+TSPSG 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.
+
+TSPSG 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 TSPSG.  If not, see <http://www.gnu.org/licenses/>.
+
+Third parties:
+* This software is created using opensource version of Qt toolkit,
+  see http://www.qtsoftware.com/
+* The icons used in this software are part of Oxygen Icons project
+  licensed according to the GNU Lesser General Public License,
+  see http://www.oxygen-icons.org/
+
Index: /tags/0.1.1.42-alpha1/i18n/en.ts
===================================================================
--- /tags/0.1.1.42-alpha1/i18n/en.ts	(revision 44)
+++ /tags/0.1.1.42-alpha1/i18n/en.ts	(revision 44)
@@ -0,0 +1,836 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<defaultcodec>UTF-8</defaultcodec>
+<context>
+    <name>CTSPModel</name>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="51"/>
+        <source>City %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="53"/>
+        <source>%1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="147"/>
+        <source>Unexpected end of file.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="149"/>
+        <source>Corrupt data read. File possibly corrupted.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="151"/>
+        <source>Unknown error.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="152"/>
+        <location filename="../src/tspmodel.cpp" line="160"/>
+        <location filename="../src/tspmodel.cpp" line="175"/>
+        <location filename="../src/tspmodel.cpp" line="191"/>
+        <location filename="../src/tspmodel.cpp" line="204"/>
+        <location filename="../src/tspmodel.cpp" line="234"/>
+        <location filename="../src/tspmodel.cpp" line="243"/>
+        <source>Task Load</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="152"/>
+        <location filename="../src/tspmodel.cpp" line="175"/>
+        <location filename="../src/tspmodel.cpp" line="191"/>
+        <location filename="../src/tspmodel.cpp" line="204"/>
+        <location filename="../src/tspmodel.cpp" line="234"/>
+        <location filename="../src/tspmodel.cpp" line="243"/>
+        <source>Unable to load task:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="160"/>
+        <source>Unable to open task file.
+Error: %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="175"/>
+        <source>Unknown file format or file is corrupted.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="191"/>
+        <location filename="../src/tspmodel.cpp" line="234"/>
+        <source>File version is newer than application supports.
+Please, try to update application.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="204"/>
+        <location filename="../src/tspmodel.cpp" line="243"/>
+        <source>Unexpected data read.
+File is possibly corrupted.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="273"/>
+        <location filename="../src/tspmodel.cpp" line="279"/>
+        <location filename="../src/tspmodel.cpp" line="286"/>
+        <location filename="../src/tspmodel.cpp" line="293"/>
+        <location filename="../src/tspmodel.cpp" line="300"/>
+        <location filename="../src/tspmodel.cpp" line="307"/>
+        <location filename="../src/tspmodel.cpp" line="314"/>
+        <location filename="../src/tspmodel.cpp" line="324"/>
+        <source>Task Save</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="273"/>
+        <source>Unable to create task file.
+Error: %1
+Maybe, file is read-only?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="279"/>
+        <location filename="../src/tspmodel.cpp" line="286"/>
+        <location filename="../src/tspmodel.cpp" line="293"/>
+        <location filename="../src/tspmodel.cpp" line="300"/>
+        <location filename="../src/tspmodel.cpp" line="307"/>
+        <location filename="../src/tspmodel.cpp" line="314"/>
+        <location filename="../src/tspmodel.cpp" line="324"/>
+        <source>Unable to save task.
+Error: %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>CTSPSolver</name>
+    <message>
+        <location filename="../src/tspsolver.cpp" line="137"/>
+        <source>%v of %m parts found</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/tspsolver.cpp" line="141"/>
+        <source>Calculating optimal route...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/tspsolver.cpp" line="142"/>
+        <source>Solution Progress</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/tspsolver.cpp" line="210"/>
+        <source>Solution Result</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/tspsolver.cpp" line="210"/>
+        <source>This task has no solution.</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>MainWindow</name>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="141"/>
+        <location filename="../src/mainwindow.cpp" line="439"/>
+        <location filename="../src/mainwindow.cpp" line="448"/>
+        <source>Language change</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="141"/>
+        <source>Unable to load translation language.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="181"/>
+        <source>New Task</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="181"/>
+        <location filename="../src/mainwindow.cpp" line="195"/>
+        <location filename="../src/mainwindow.cpp" line="462"/>
+        <source>Would you like to save changes in current task?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="195"/>
+        <source>Task Open</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="202"/>
+        <source>All Supported Formats</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="203"/>
+        <location filename="../src/mainwindow.cpp" line="204"/>
+        <source>%1 Task Files</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="205"/>
+        <location filename="../src/mainwindow.cpp" line="232"/>
+        <location filename="../src/mainwindow.cpp" line="251"/>
+        <source>All Files</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="230"/>
+        <source>HTML Files</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="231"/>
+        <source>OpenDocument Files</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="250"/>
+        <source>%1 Task File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="273"/>
+        <source>Settings Changed</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="273"/>
+        <source>You have changed color settings.
+Do you wish to apply them to current solution text?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="337"/>
+        <source>Data error</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="337"/>
+        <source>Error in cell [Row %1; Column %2]: Invalid data format.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="350"/>
+        <source>Variant #%1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="351"/>
+        <source>Task:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="354"/>
+        <location filename="../src/mainwindow.cpp" line="380"/>
+        <source>Solution of Variant #%1 task</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="361"/>
+        <source>Step #%1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="364"/>
+        <source>This step has alternate candidates for branching.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="376"/>
+        <source>Optimal path:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="378"/>
+        <source>The price is &lt;b&gt;%1&lt;/b&gt; units.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="439"/>
+        <source>Language will be autodetected on next application start.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="448"/>
+        <source>You have language autodetection turned on.
+It needs to be off.
+Do you wish to turn it off?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="462"/>
+        <source>Application Close</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="53"/>
+        <location filename="../ui/mainwindow.ui" line="41"/>
+        <source>Task</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="74"/>
+        <location filename="../ui/mainwindow.ui" line="62"/>
+        <source>&amp;Variant:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="87"/>
+        <location filename="../ui/mainwindow.ui" line="75"/>
+        <source>Number of variant</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="97"/>
+        <location filename="../ui/mainwindow.ui" line="85"/>
+        <source>&amp;Cities:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="110"/>
+        <location filename="../ui/mainwindow.ui" line="98"/>
+        <source>Number of cities</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="141"/>
+        <location filename="../ui/mainwindow.ui" line="129"/>
+        <source>Cost of travel from city to city</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="169"/>
+        <location filename="../ui/mainwindow.ui" line="157"/>
+        <source>Fill table with random numbers</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="172"/>
+        <location filename="../ui/mainwindow.ui" line="160"/>
+        <source>Random</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="186"/>
+        <location filename="../ui/mainwindow.ui" line="174"/>
+        <source>Solve current task</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="189"/>
+        <location filename="../ui/mainwindow.ui" line="177"/>
+        <source>Solve</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="203"/>
+        <location filename="../ui/mainwindow.ui" line="191"/>
+        <source>Solution</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="212"/>
+        <location filename="../ui/mainwindow.ui" line="200"/>
+        <source>Solution steps</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="242"/>
+        <location filename="../ui/mainwindow.ui" line="230"/>
+        <source>&amp;File</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="249"/>
+        <location filename="../ui/mainwindow.ui" line="234"/>
+        <source>Save &amp;As...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="277"/>
+        <location filename="../ui/mainwindow.ui" line="265"/>
+        <source>&amp;Language</source>
+        <comment>Please, append &quot; / Language&quot; when translating this string.</comment>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="328"/>
+        <location filename="../ui/mainwindow.ui" line="351"/>
+        <source>Solution S&amp;teps</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="342"/>
+        <location filename="../ui/mainwindow.ui" line="365"/>
+        <source>Solution &amp;Graph</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="359"/>
+        <source>Solution...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="449"/>
+        <location filename="../ui/mainwindow.ui" line="469"/>
+        <source>Context &amp;Help</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="540"/>
+        <location filename="../ui/mainwindow.ui" line="556"/>
+        <source>&amp;Save</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="267"/>
+        <location filename="../ui/mainwindow.ui" line="255"/>
+        <source>&amp;Settings</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="17"/>
+        <location filename="../ui/mainwindow.ui" line="14"/>
+        <source>Travelling salesman problem[*]</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="293"/>
+        <location filename="../ui/mainwindow.ui" line="281"/>
+        <source>&amp;Help</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="331"/>
+        <location filename="../ui/mainwindow.ui" line="354"/>
+        <source>Save solution steps</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="334"/>
+        <location filename="../ui/mainwindow.ui" line="357"/>
+        <source>Save solution steps only</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="345"/>
+        <location filename="../ui/mainwindow.ui" line="368"/>
+        <source>Save solution graph</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="348"/>
+        <location filename="../ui/mainwindow.ui" line="371"/>
+        <source>Save solution graph only</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="362"/>
+        <location filename="../ui/mainwindow.ui" line="382"/>
+        <source>Save solution</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="365"/>
+        <location filename="../ui/mainwindow.ui" line="385"/>
+        <source>Save solution steps and graph</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="374"/>
+        <location filename="../ui/mainwindow.ui" line="394"/>
+        <source>&amp;New</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="377"/>
+        <location filename="../ui/mainwindow.ui" line="397"/>
+        <source>New</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="380"/>
+        <location filename="../ui/mainwindow.ui" line="400"/>
+        <source>New task</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="383"/>
+        <location filename="../ui/mainwindow.ui" line="403"/>
+        <source>Create new task</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="386"/>
+        <location filename="../ui/mainwindow.ui" line="406"/>
+        <source>Ctrl+N</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="395"/>
+        <location filename="../ui/mainwindow.ui" line="415"/>
+        <source>&amp;Open...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="398"/>
+        <location filename="../ui/mainwindow.ui" line="418"/>
+        <source>Open...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="401"/>
+        <location filename="../ui/mainwindow.ui" line="421"/>
+        <source>Open task</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="404"/>
+        <location filename="../ui/mainwindow.ui" line="424"/>
+        <source>Open saved task</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="407"/>
+        <location filename="../ui/mainwindow.ui" line="427"/>
+        <source>Ctrl+O</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="416"/>
+        <location filename="../ui/mainwindow.ui" line="436"/>
+        <source>&amp;Preferences...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="419"/>
+        <location filename="../ui/mainwindow.ui" line="439"/>
+        <source>Preferences...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="422"/>
+        <location filename="../ui/mainwindow.ui" line="442"/>
+        <source>Application preferences</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="434"/>
+        <location filename="../ui/mainwindow.ui" line="454"/>
+        <source>&amp;Contents</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="437"/>
+        <location filename="../ui/mainwindow.ui" line="457"/>
+        <source>Open help contents</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="452"/>
+        <location filename="../ui/mainwindow.ui" line="472"/>
+        <source>Open context help</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="461"/>
+        <location filename="../ui/mainwindow.ui" line="481"/>
+        <source>&amp;About...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="464"/>
+        <location filename="../ui/mainwindow.ui" line="484"/>
+        <source>About...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="467"/>
+        <location filename="../ui/mainwindow.ui" line="487"/>
+        <source>About application</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="476"/>
+        <location filename="../ui/mainwindow.ui" line="496"/>
+        <source>E&amp;xit</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="479"/>
+        <location filename="../ui/mainwindow.ui" line="499"/>
+        <source>Exit application</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="488"/>
+        <location filename="../ui/mainwindow.ui" line="504"/>
+        <source>&amp;Task...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="491"/>
+        <location filename="../ui/mainwindow.ui" line="507"/>
+        <source>Task...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="494"/>
+        <location filename="../ui/mainwindow.ce.ui" line="543"/>
+        <location filename="../ui/mainwindow.ui" line="510"/>
+        <location filename="../ui/mainwindow.ui" line="562"/>
+        <source>Save task</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="497"/>
+        <location filename="../ui/mainwindow.ui" line="513"/>
+        <source>Save task to file</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="500"/>
+        <location filename="../ui/mainwindow.ui" line="516"/>
+        <source>Ctrl+S</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="511"/>
+        <location filename="../ui/mainwindow.ui" line="527"/>
+        <source>&amp;Autodetect</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="528"/>
+        <source>English</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="546"/>
+        <location filename="../ui/mainwindow.ui" line="565"/>
+        <source>Save current task</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="555"/>
+        <location filename="../ui/mainwindow.ui" line="574"/>
+        <source>About &amp;Qt...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="558"/>
+        <location filename="../ui/mainwindow.ui" line="577"/>
+        <source>About Qt...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="561"/>
+        <source>About Qt</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="564"/>
+        <location filename="../ui/mainwindow.ui" line="580"/>
+        <source>About Qt library</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="271"/>
+        <location filename="../ui/mainwindow.ui" line="259"/>
+        <source>Select language</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="274"/>
+        <location filename="../ui/mainwindow.ui" line="262"/>
+        <source>Select application language</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="322"/>
+        <source>P&amp;rint Setup...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="325"/>
+        <source>Setup printing</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="337"/>
+        <source>&amp;Print...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="340"/>
+        <source>Print solution results</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="343"/>
+        <source>Ctrl+P</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="356"/>
+        <location filename="../ui/mainwindow.ui" line="379"/>
+        <source>&amp;Solution...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="559"/>
+        <source>Save</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="514"/>
+        <location filename="../ui/mainwindow.ui" line="530"/>
+        <source>Detect language automatically</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="517"/>
+        <location filename="../ui/mainwindow.ui" line="533"/>
+        <source>Detect language automatically based on regional settings</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>SettingsDialog</name>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="14"/>
+        <location filename="../ui/settingsdialog.ui" line="14"/>
+        <source>Preferences</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="100"/>
+        <location filename="../ui/settingsdialog.ui" line="151"/>
+        <source>Random values:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="114"/>
+        <location filename="../ui/settingsdialog.ui" line="165"/>
+        <source>&amp;Minimal:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="127"/>
+        <location filename="../ui/settingsdialog.ui" line="178"/>
+        <source>Minimum for random number generation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="150"/>
+        <location filename="../ui/settingsdialog.ui" line="201"/>
+        <source>Ma&amp;ximal:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="163"/>
+        <location filename="../ui/settingsdialog.ui" line="214"/>
+        <source>Maximum for random number generation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="184"/>
+        <location filename="../ui/settingsdialog.ui" line="235"/>
+        <source>Output settings:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="210"/>
+        <location filename="../ui/settingsdialog.ui" line="261"/>
+        <source>Font color for printing</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="213"/>
+        <location filename="../ui/settingsdialog.ui" line="264"/>
+        <source>&amp;Color...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="193"/>
+        <location filename="../ui/settingsdialog.ui" line="244"/>
+        <source>Font face for printing</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="196"/>
+        <location filename="../ui/settingsdialog.ui" line="247"/>
+        <source>&amp;Font...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="279"/>
+        <location filename="../ui/settingsdialog.ce.ui" line="285"/>
+        <location filename="../ui/settingsdialog.ui" line="331"/>
+        <location filename="../ui/settingsdialog.ui" line="337"/>
+        <source>Help</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="282"/>
+        <location filename="../ui/settingsdialog.ui" line="334"/>
+        <source>Get preferences help</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="315"/>
+        <location filename="../ui/settingsdialog.ui" line="391"/>
+        <source>Save new preferences</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="318"/>
+        <location filename="../ui/settingsdialog.ui" line="394"/>
+        <source>&amp;OK</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="335"/>
+        <location filename="../ui/settingsdialog.ui" line="411"/>
+        <source>Close without saving preferences</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="338"/>
+        <location filename="../ui/settingsdialog.ui" line="414"/>
+        <source>&amp;Cancel</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ui" line="41"/>
+        <source>background-color: #0080C0</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ui" line="283"/>
+        <source>Restore main window state and position on application restart</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ui" line="286"/>
+        <source>Save main window state and position</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ui" line="369"/>
+        <source>Hover mouse pointer over dialog elements to get additional help</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+</TS>
Index: /tags/0.1.1.42-alpha1/i18n/languages.ini
===================================================================
--- /tags/0.1.1.42-alpha1/i18n/languages.ini	(revision 44)
+++ /tags/0.1.1.42-alpha1/i18n/languages.ini	(revision 44)
@@ -0,0 +1,10 @@
+﻿
+[en]
+Name=English
+NativeName=English
+[ru]
+Name=Russian
+NativeName=Русский
+[uk]
+Name=Ukrainian
+NativeName=Українська
Index: /tags/0.1.1.42-alpha1/i18n/ru.ts
===================================================================
--- /tags/0.1.1.42-alpha1/i18n/ru.ts	(revision 44)
+++ /tags/0.1.1.42-alpha1/i18n/ru.ts	(revision 44)
@@ -0,0 +1,846 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="ru_RU" sourcelanguage="en">
+<defaultcodec>UTF-8</defaultcodec>
+<context>
+    <name>CTSPModel</name>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="51"/>
+        <source>City %1</source>
+        <translation>Город %1</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="53"/>
+        <source>%1</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="147"/>
+        <source>Unexpected end of file.</source>
+        <translation>Неожиданный конец файла.</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="149"/>
+        <source>Corrupt data read. File possibly corrupted.</source>
+        <translation>Прочитаны испорченные данные.
+Возможно, файл поврежден.</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="151"/>
+        <source>Unknown error.</source>
+        <translation>Неизвестная ошибка.</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="152"/>
+        <location filename="../src/tspmodel.cpp" line="160"/>
+        <location filename="../src/tspmodel.cpp" line="175"/>
+        <location filename="../src/tspmodel.cpp" line="191"/>
+        <location filename="../src/tspmodel.cpp" line="204"/>
+        <location filename="../src/tspmodel.cpp" line="234"/>
+        <location filename="../src/tspmodel.cpp" line="243"/>
+        <source>Task Load</source>
+        <translation>Загрузка условия</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="152"/>
+        <location filename="../src/tspmodel.cpp" line="175"/>
+        <location filename="../src/tspmodel.cpp" line="191"/>
+        <location filename="../src/tspmodel.cpp" line="204"/>
+        <location filename="../src/tspmodel.cpp" line="234"/>
+        <location filename="../src/tspmodel.cpp" line="243"/>
+        <source>Unable to load task:</source>
+        <translation>Невозможно загрузить условие:</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="160"/>
+        <source>Unable to open task file.
+Error: %1</source>
+        <translation>Невозможно открыть файл с условием.
+Ошибка: %1</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="175"/>
+        <source>Unknown file format or file is corrupted.</source>
+        <translation>Неизвестный формат файла или файл поврежден.</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="191"/>
+        <location filename="../src/tspmodel.cpp" line="234"/>
+        <source>File version is newer than application supports.
+Please, try to update application.</source>
+        <translation>Версия файла новее чем поддерживаемая приложением.
+Пожалуйста, попробуйте обновить приложение.</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="204"/>
+        <location filename="../src/tspmodel.cpp" line="243"/>
+        <source>Unexpected data read.
+File is possibly corrupted.</source>
+        <translation>Прочитано неожиданные данные.
+Возможно, файл поврежден.</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="273"/>
+        <location filename="../src/tspmodel.cpp" line="279"/>
+        <location filename="../src/tspmodel.cpp" line="286"/>
+        <location filename="../src/tspmodel.cpp" line="293"/>
+        <location filename="../src/tspmodel.cpp" line="300"/>
+        <location filename="../src/tspmodel.cpp" line="307"/>
+        <location filename="../src/tspmodel.cpp" line="314"/>
+        <location filename="../src/tspmodel.cpp" line="324"/>
+        <source>Task Save</source>
+        <translation>Сохранение условия</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="273"/>
+        <source>Unable to create task file.
+Error: %1
+Maybe, file is read-only?</source>
+        <translation>Невозможно создать файл с условием.
+Ошибка: %1
+Возможно, файл только для чтения?</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="279"/>
+        <location filename="../src/tspmodel.cpp" line="286"/>
+        <location filename="../src/tspmodel.cpp" line="293"/>
+        <location filename="../src/tspmodel.cpp" line="300"/>
+        <location filename="../src/tspmodel.cpp" line="307"/>
+        <location filename="../src/tspmodel.cpp" line="314"/>
+        <location filename="../src/tspmodel.cpp" line="324"/>
+        <source>Unable to save task.
+Error: %1</source>
+        <translation>Невозможно сохранить условие.
+Ошибка: %1</translation>
+    </message>
+</context>
+<context>
+    <name>CTSPSolver</name>
+    <message>
+        <location filename="../src/tspsolver.cpp" line="137"/>
+        <source>%v of %m parts found</source>
+        <translation>Найдено %v з %m переходов</translation>
+    </message>
+    <message>
+        <location filename="../src/tspsolver.cpp" line="141"/>
+        <source>Calculating optimal route...</source>
+        <translation>Расчет оптимального пути...</translation>
+    </message>
+    <message>
+        <location filename="../src/tspsolver.cpp" line="142"/>
+        <source>Solution Progress</source>
+        <translation>Состояние решения</translation>
+    </message>
+    <message>
+        <location filename="../src/tspsolver.cpp" line="210"/>
+        <source>Solution Result</source>
+        <translation>Результат решения</translation>
+    </message>
+    <message>
+        <location filename="../src/tspsolver.cpp" line="210"/>
+        <source>This task has no solution.</source>
+        <translation>У данной задачи нет решения.</translation>
+    </message>
+</context>
+<context>
+    <name>MainWindow</name>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="141"/>
+        <location filename="../src/mainwindow.cpp" line="439"/>
+        <location filename="../src/mainwindow.cpp" line="448"/>
+        <source>Language change</source>
+        <translation>Смена языка</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="141"/>
+        <source>Unable to load translation language.</source>
+        <translation>Невозможно загрузить перевод.</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="202"/>
+        <source>All Supported Formats</source>
+        <translation>Все поддерживаемые форматы</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="205"/>
+        <location filename="../src/mainwindow.cpp" line="232"/>
+        <location filename="../src/mainwindow.cpp" line="251"/>
+        <source>All Files</source>
+        <translation>Все файлы</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="203"/>
+        <location filename="../src/mainwindow.cpp" line="204"/>
+        <source>%1 Task Files</source>
+        <translation>Файлы условий %1</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="181"/>
+        <source>New Task</source>
+        <translation>Создать задачу</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="181"/>
+        <location filename="../src/mainwindow.cpp" line="195"/>
+        <location filename="../src/mainwindow.cpp" line="462"/>
+        <source>Would you like to save changes in current task?</source>
+        <translation>Желаете сохранить изменения в текущей задаче?</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="195"/>
+        <source>Task Open</source>
+        <translation>Открытие задания</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="230"/>
+        <source>HTML Files</source>
+        <translation>Файлы HTML</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="231"/>
+        <source>OpenDocument Files</source>
+        <translation>Файлы OpenDocument</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="250"/>
+        <source>%1 Task File</source>
+        <translation>Файл условия %1</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="273"/>
+        <source>Settings Changed</source>
+        <translation>Параметры изменены</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="273"/>
+        <source>You have changed color settings.
+Do you wish to apply them to current solution text?</source>
+        <translation>Вы изменили параметры цвета.
+Желаете применить их к текущему тексту решения?</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="337"/>
+        <source>Data error</source>
+        <translation>Ошибка в данных</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="337"/>
+        <source>Error in cell [Row %1; Column %2]: Invalid data format.</source>
+        <translation>Ошибка в ячейке [Строка %1; Колонка %2]: Неверный формат данных.</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="350"/>
+        <source>Variant #%1</source>
+        <translation>Вариант №%1</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="351"/>
+        <source>Task:</source>
+        <translation>Условие:</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="354"/>
+        <location filename="../src/mainwindow.cpp" line="380"/>
+        <source>Solution of Variant #%1 task</source>
+        <translation>Решение варианта №%1</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="361"/>
+        <source>Step #%1</source>
+        <translation>Шаг №%1</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="364"/>
+        <source>This step has alternate candidates for branching.</source>
+        <translation>У этого шага есть альтернативные кандидаты на ветвление.</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="376"/>
+        <source>Optimal path:</source>
+        <translation>Оптимальный путь:</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="378"/>
+        <source>The price is &lt;b&gt;%1&lt;/b&gt; units.</source>
+        <translation>Стоимость - &lt;b&gt;%1&lt;/b&gt; единиц.</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="439"/>
+        <source>Language will be autodetected on next application start.</source>
+        <translation>Язык будет автоматически определен при следующем запуске приложения.</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="448"/>
+        <source>You have language autodetection turned on.
+It needs to be off.
+Do you wish to turn it off?</source>
+        <translation>Включено автоматическое определение языка.
+Его необходимо выключить.
+Отключить его?</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="462"/>
+        <source>Application Close</source>
+        <translation>Закрытие приложения</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="53"/>
+        <location filename="../ui/mainwindow.ui" line="41"/>
+        <source>Task</source>
+        <translation>Условие</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="74"/>
+        <location filename="../ui/mainwindow.ui" line="62"/>
+        <source>&amp;Variant:</source>
+        <translation>&amp;Вариант:</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="87"/>
+        <location filename="../ui/mainwindow.ui" line="75"/>
+        <source>Number of variant</source>
+        <translation>Номер варианта</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="97"/>
+        <location filename="../ui/mainwindow.ui" line="85"/>
+        <source>&amp;Cities:</source>
+        <translation>&amp;Городов:</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="110"/>
+        <location filename="../ui/mainwindow.ui" line="98"/>
+        <source>Number of cities</source>
+        <translation>Количество городов, которые обходит коммивояжер</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="141"/>
+        <location filename="../ui/mainwindow.ui" line="129"/>
+        <source>Cost of travel from city to city</source>
+        <translation>Стоимости переходов из города в город</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="169"/>
+        <location filename="../ui/mainwindow.ui" line="157"/>
+        <source>Fill table with random numbers</source>
+        <translation>Заполнить таблицу случайными значениями</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="172"/>
+        <location filename="../ui/mainwindow.ui" line="160"/>
+        <source>Random</source>
+        <translation>Случайно</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="186"/>
+        <location filename="../ui/mainwindow.ui" line="174"/>
+        <source>Solve current task</source>
+        <translation>Решить текущую задачу</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="189"/>
+        <location filename="../ui/mainwindow.ui" line="177"/>
+        <source>Solve</source>
+        <translation>Решить</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="203"/>
+        <location filename="../ui/mainwindow.ui" line="191"/>
+        <source>Solution</source>
+        <translation>Решение</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="212"/>
+        <location filename="../ui/mainwindow.ui" line="200"/>
+        <source>Solution steps</source>
+        <translation>Ход решения</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="242"/>
+        <location filename="../ui/mainwindow.ui" line="230"/>
+        <source>&amp;File</source>
+        <translation>&amp;Файл</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="249"/>
+        <location filename="../ui/mainwindow.ui" line="234"/>
+        <source>Save &amp;As...</source>
+        <translation>Сохранить &amp;как...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="277"/>
+        <location filename="../ui/mainwindow.ui" line="265"/>
+        <source>&amp;Language</source>
+        <comment>Please, append &quot; / Language&quot; when translating this string.</comment>
+        <translation>Язык / &amp;Language</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="328"/>
+        <location filename="../ui/mainwindow.ui" line="351"/>
+        <source>Solution S&amp;teps</source>
+        <translation>&amp;Ход решения</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="342"/>
+        <location filename="../ui/mainwindow.ui" line="365"/>
+        <source>Solution &amp;Graph</source>
+        <translation>&amp;Граф решения</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="359"/>
+        <source>Solution...</source>
+        <translation>Решение...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="449"/>
+        <location filename="../ui/mainwindow.ui" line="469"/>
+        <source>Context &amp;Help</source>
+        <translation>&amp;Контекстная справка</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="540"/>
+        <location filename="../ui/mainwindow.ui" line="556"/>
+        <source>&amp;Save</source>
+        <translation>Со&amp;хранить</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="267"/>
+        <location filename="../ui/mainwindow.ui" line="255"/>
+        <source>&amp;Settings</source>
+        <translation>&amp;Настройки</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="17"/>
+        <location filename="../ui/mainwindow.ui" line="14"/>
+        <source>Travelling salesman problem[*]</source>
+        <translation>Задача коммивояжера[*]</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="293"/>
+        <location filename="../ui/mainwindow.ui" line="281"/>
+        <source>&amp;Help</source>
+        <translation>&amp;Помощь</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="331"/>
+        <location filename="../ui/mainwindow.ui" line="354"/>
+        <source>Save solution steps</source>
+        <translation>Сохранить ход решения</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="334"/>
+        <location filename="../ui/mainwindow.ui" line="357"/>
+        <source>Save solution steps only</source>
+        <translation>Сохранить только ход решения</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="345"/>
+        <location filename="../ui/mainwindow.ui" line="368"/>
+        <source>Save solution graph</source>
+        <translation>Сохранить граф решения</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="348"/>
+        <location filename="../ui/mainwindow.ui" line="371"/>
+        <source>Save solution graph only</source>
+        <translation>Сохранить только граф решения</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="362"/>
+        <location filename="../ui/mainwindow.ui" line="382"/>
+        <source>Save solution</source>
+        <translation>Сохранить решение</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="365"/>
+        <location filename="../ui/mainwindow.ui" line="385"/>
+        <source>Save solution steps and graph</source>
+        <translation>Сохранить ход и граф решения</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="374"/>
+        <location filename="../ui/mainwindow.ui" line="394"/>
+        <source>&amp;New</source>
+        <translation>&amp;Создать</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="377"/>
+        <location filename="../ui/mainwindow.ui" line="397"/>
+        <source>New</source>
+        <translation>Создать</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="380"/>
+        <location filename="../ui/mainwindow.ui" line="400"/>
+        <source>New task</source>
+        <translation>Создать задачу</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="383"/>
+        <location filename="../ui/mainwindow.ui" line="403"/>
+        <source>Create new task</source>
+        <translation>Создать новую задачу</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="386"/>
+        <location filename="../ui/mainwindow.ui" line="406"/>
+        <source>Ctrl+N</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="395"/>
+        <location filename="../ui/mainwindow.ui" line="415"/>
+        <source>&amp;Open...</source>
+        <translation>&amp;Открыть...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="398"/>
+        <location filename="../ui/mainwindow.ui" line="418"/>
+        <source>Open...</source>
+        <translation>Открыть...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="401"/>
+        <location filename="../ui/mainwindow.ui" line="421"/>
+        <source>Open task</source>
+        <translation>Открыть условие</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="404"/>
+        <location filename="../ui/mainwindow.ui" line="424"/>
+        <source>Open saved task</source>
+        <translation>Открыть сохраненное условие задачи</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="407"/>
+        <location filename="../ui/mainwindow.ui" line="427"/>
+        <source>Ctrl+O</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="416"/>
+        <location filename="../ui/mainwindow.ui" line="436"/>
+        <source>&amp;Preferences...</source>
+        <translation>&amp;Параметры...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="419"/>
+        <location filename="../ui/mainwindow.ui" line="439"/>
+        <source>Preferences...</source>
+        <translation>Параметры...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="422"/>
+        <location filename="../ui/mainwindow.ui" line="442"/>
+        <source>Application preferences</source>
+        <translation>Настройка параметров программмы</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="434"/>
+        <location filename="../ui/mainwindow.ui" line="454"/>
+        <source>&amp;Contents</source>
+        <translation>&amp;Содежание</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="437"/>
+        <location filename="../ui/mainwindow.ui" line="457"/>
+        <source>Open help contents</source>
+        <translation>Вызвать справку программы</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="452"/>
+        <location filename="../ui/mainwindow.ui" line="472"/>
+        <source>Open context help</source>
+        <translation>Вызвать контекстную справку</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="461"/>
+        <location filename="../ui/mainwindow.ui" line="481"/>
+        <source>&amp;About...</source>
+        <translation>&amp;Про...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="464"/>
+        <location filename="../ui/mainwindow.ui" line="484"/>
+        <source>About...</source>
+        <translation>Про...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="467"/>
+        <location filename="../ui/mainwindow.ui" line="487"/>
+        <source>About application</source>
+        <translation>О программе</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="476"/>
+        <location filename="../ui/mainwindow.ui" line="496"/>
+        <source>E&amp;xit</source>
+        <translation>В&amp;ыход</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="479"/>
+        <location filename="../ui/mainwindow.ui" line="499"/>
+        <source>Exit application</source>
+        <translation>Выйти из приложения</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="488"/>
+        <location filename="../ui/mainwindow.ui" line="504"/>
+        <source>&amp;Task...</source>
+        <translation>&amp;Условие...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="491"/>
+        <location filename="../ui/mainwindow.ui" line="507"/>
+        <source>Task...</source>
+        <translation>Условие...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="494"/>
+        <location filename="../ui/mainwindow.ce.ui" line="543"/>
+        <location filename="../ui/mainwindow.ui" line="510"/>
+        <location filename="../ui/mainwindow.ui" line="562"/>
+        <source>Save task</source>
+        <translation>Сохранить условие</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="497"/>
+        <location filename="../ui/mainwindow.ui" line="513"/>
+        <source>Save task to file</source>
+        <translation>Сохранить условие задачи в файл</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="500"/>
+        <location filename="../ui/mainwindow.ui" line="516"/>
+        <source>Ctrl+S</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="511"/>
+        <location filename="../ui/mainwindow.ui" line="527"/>
+        <source>&amp;Autodetect</source>
+        <translation>&amp;Автоопределение</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="528"/>
+        <source>English</source>
+        <translation>Английский</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="546"/>
+        <location filename="../ui/mainwindow.ui" line="565"/>
+        <source>Save current task</source>
+        <translation>Сохранить текущее условие</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="555"/>
+        <location filename="../ui/mainwindow.ui" line="574"/>
+        <source>About &amp;Qt...</source>
+        <translation>Про &amp;Qt...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="558"/>
+        <location filename="../ui/mainwindow.ui" line="577"/>
+        <source>About Qt...</source>
+        <translation>Про Qt...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="561"/>
+        <source>About Qt</source>
+        <translation>Про Qt</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="564"/>
+        <location filename="../ui/mainwindow.ui" line="580"/>
+        <source>About Qt library</source>
+        <translation>Про библиотеку Qt</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="271"/>
+        <location filename="../ui/mainwindow.ui" line="259"/>
+        <source>Select language</source>
+        <translation>Выбор языка</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="274"/>
+        <location filename="../ui/mainwindow.ui" line="262"/>
+        <source>Select application language</source>
+        <translation>Выбрать язык приложения</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="322"/>
+        <source>P&amp;rint Setup...</source>
+        <translation>&amp;Настройка печати...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="325"/>
+        <source>Setup printing</source>
+        <translation>Настроить печать</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="337"/>
+        <source>&amp;Print...</source>
+        <translation>&amp;Печать...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="340"/>
+        <source>Print solution results</source>
+        <translation>Распечатать результаты решения</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="343"/>
+        <source>Ctrl+P</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="356"/>
+        <location filename="../ui/mainwindow.ui" line="379"/>
+        <source>&amp;Solution...</source>
+        <translation>&amp;Решение...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="559"/>
+        <source>Save</source>
+        <translation>Сохранить</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="514"/>
+        <location filename="../ui/mainwindow.ui" line="530"/>
+        <source>Detect language automatically</source>
+        <translation>Определять язык автоматически</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="517"/>
+        <location filename="../ui/mainwindow.ui" line="533"/>
+        <source>Detect language automatically based on regional settings</source>
+        <translation>Определять язык автоматически, основываясь на региональных настройках</translation>
+    </message>
+</context>
+<context>
+    <name>SettingsDialog</name>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="14"/>
+        <location filename="../ui/settingsdialog.ui" line="14"/>
+        <source>Preferences</source>
+        <translation>Параметры</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="100"/>
+        <location filename="../ui/settingsdialog.ui" line="151"/>
+        <source>Random values:</source>
+        <translation>Случайные значения:</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="114"/>
+        <location filename="../ui/settingsdialog.ui" line="165"/>
+        <source>&amp;Minimal:</source>
+        <translation>&amp;Минимум:</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="127"/>
+        <location filename="../ui/settingsdialog.ui" line="178"/>
+        <source>Minimum for random number generation</source>
+        <translation>Нижняя граница для генерации случайных значений</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="150"/>
+        <location filename="../ui/settingsdialog.ui" line="201"/>
+        <source>Ma&amp;ximal:</source>
+        <translation>М&amp;аксимум:</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="163"/>
+        <location filename="../ui/settingsdialog.ui" line="214"/>
+        <source>Maximum for random number generation</source>
+        <translation>Верхняя граница для генерации случайных значений</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="184"/>
+        <location filename="../ui/settingsdialog.ui" line="235"/>
+        <source>Output settings:</source>
+        <translation>Параметры вывода:</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="210"/>
+        <location filename="../ui/settingsdialog.ui" line="261"/>
+        <source>Font color for printing</source>
+        <translation>Цвет шрифта, используемого при печати</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="213"/>
+        <location filename="../ui/settingsdialog.ui" line="264"/>
+        <source>&amp;Color...</source>
+        <translation>&amp;Цвет...</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="193"/>
+        <location filename="../ui/settingsdialog.ui" line="244"/>
+        <source>Font face for printing</source>
+        <translation>Вид шрифта, используемого при печати</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="196"/>
+        <location filename="../ui/settingsdialog.ui" line="247"/>
+        <source>&amp;Font...</source>
+        <translation>&amp;Шрифт...</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="279"/>
+        <location filename="../ui/settingsdialog.ce.ui" line="285"/>
+        <location filename="../ui/settingsdialog.ui" line="331"/>
+        <location filename="../ui/settingsdialog.ui" line="337"/>
+        <source>Help</source>
+        <translation>Помощь</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="282"/>
+        <location filename="../ui/settingsdialog.ui" line="334"/>
+        <source>Get preferences help</source>
+        <translation>Получить помощь по настройкам</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="315"/>
+        <location filename="../ui/settingsdialog.ui" line="391"/>
+        <source>Save new preferences</source>
+        <translation>Сохранить новые параметры</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="318"/>
+        <location filename="../ui/settingsdialog.ui" line="394"/>
+        <source>&amp;OK</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="335"/>
+        <location filename="../ui/settingsdialog.ui" line="411"/>
+        <source>Close without saving preferences</source>
+        <translation>Закрыть окно без сохранения параметров</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="338"/>
+        <location filename="../ui/settingsdialog.ui" line="414"/>
+        <source>&amp;Cancel</source>
+        <translation>&amp;Отмена</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ui" line="41"/>
+        <source>background-color: #0080C0</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ui" line="283"/>
+        <source>Restore main window state and position on application restart</source>
+        <translation>Восстанавливать состояние и размеры главного окна после перезапуска приложения</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ui" line="286"/>
+        <source>Save main window state and position</source>
+        <translation>Сохранять состояние и положение главного окна</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ui" line="369"/>
+        <source>Hover mouse pointer over dialog elements to get additional help</source>
+        <translation>Наведите указатель мыши на элемент диалога, чтоб получить подсказку</translation>
+    </message>
+</context>
+</TS>
Index: /tags/0.1.1.42-alpha1/i18n/uk.ts
===================================================================
--- /tags/0.1.1.42-alpha1/i18n/uk.ts	(revision 44)
+++ /tags/0.1.1.42-alpha1/i18n/uk.ts	(revision 44)
@@ -0,0 +1,846 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="uk_UA" sourcelanguage="en">
+<defaultcodec>UTF-8</defaultcodec>
+<context>
+    <name>CTSPModel</name>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="51"/>
+        <source>City %1</source>
+        <translation>Місто %1</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="53"/>
+        <source>%1</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="147"/>
+        <source>Unexpected end of file.</source>
+        <translation>Неочікуваний кінець файлу.</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="149"/>
+        <source>Corrupt data read. File possibly corrupted.</source>
+        <translation>Прочитано ушкоджені дані.
+Можливо, файл пошкоджено.</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="151"/>
+        <source>Unknown error.</source>
+        <translation>Невідома помилка.</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="152"/>
+        <location filename="../src/tspmodel.cpp" line="160"/>
+        <location filename="../src/tspmodel.cpp" line="175"/>
+        <location filename="../src/tspmodel.cpp" line="191"/>
+        <location filename="../src/tspmodel.cpp" line="204"/>
+        <location filename="../src/tspmodel.cpp" line="234"/>
+        <location filename="../src/tspmodel.cpp" line="243"/>
+        <source>Task Load</source>
+        <translation>Завантаження умови</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="152"/>
+        <location filename="../src/tspmodel.cpp" line="175"/>
+        <location filename="../src/tspmodel.cpp" line="191"/>
+        <location filename="../src/tspmodel.cpp" line="204"/>
+        <location filename="../src/tspmodel.cpp" line="234"/>
+        <location filename="../src/tspmodel.cpp" line="243"/>
+        <source>Unable to load task:</source>
+        <translation>Неможливо завантажити умову:</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="160"/>
+        <source>Unable to open task file.
+Error: %1</source>
+        <translation>Неможливо відкрити файл з умовою.
+Помилка: %1</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="175"/>
+        <source>Unknown file format or file is corrupted.</source>
+        <translation>Невідомий формат файлу або файл пошкоджено.</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="191"/>
+        <location filename="../src/tspmodel.cpp" line="234"/>
+        <source>File version is newer than application supports.
+Please, try to update application.</source>
+        <translation>Версія файлу новіша ніж підримувана додатком.
+Будь-ласка, спробуйте оновити додаток.</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="204"/>
+        <location filename="../src/tspmodel.cpp" line="243"/>
+        <source>Unexpected data read.
+File is possibly corrupted.</source>
+        <translation>Прочитано неочікувані дані.
+Можливо, файл пошкоджено.</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="273"/>
+        <location filename="../src/tspmodel.cpp" line="279"/>
+        <location filename="../src/tspmodel.cpp" line="286"/>
+        <location filename="../src/tspmodel.cpp" line="293"/>
+        <location filename="../src/tspmodel.cpp" line="300"/>
+        <location filename="../src/tspmodel.cpp" line="307"/>
+        <location filename="../src/tspmodel.cpp" line="314"/>
+        <location filename="../src/tspmodel.cpp" line="324"/>
+        <source>Task Save</source>
+        <translation>Збереження умови</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="273"/>
+        <source>Unable to create task file.
+Error: %1
+Maybe, file is read-only?</source>
+        <translation>Неможливо створити файл з умовою.
+Помилка: %1
+Можливо, файл тільки для читання?</translation>
+    </message>
+    <message>
+        <location filename="../src/tspmodel.cpp" line="279"/>
+        <location filename="../src/tspmodel.cpp" line="286"/>
+        <location filename="../src/tspmodel.cpp" line="293"/>
+        <location filename="../src/tspmodel.cpp" line="300"/>
+        <location filename="../src/tspmodel.cpp" line="307"/>
+        <location filename="../src/tspmodel.cpp" line="314"/>
+        <location filename="../src/tspmodel.cpp" line="324"/>
+        <source>Unable to save task.
+Error: %1</source>
+        <translation>Неможливо зберегти умову.
+Помилка: %1</translation>
+    </message>
+</context>
+<context>
+    <name>CTSPSolver</name>
+    <message>
+        <location filename="../src/tspsolver.cpp" line="137"/>
+        <source>%v of %m parts found</source>
+        <translation>Знайдено %v з %m переходів</translation>
+    </message>
+    <message>
+        <location filename="../src/tspsolver.cpp" line="141"/>
+        <source>Calculating optimal route...</source>
+        <translation>Обчислення оптимального шляху...</translation>
+    </message>
+    <message>
+        <location filename="../src/tspsolver.cpp" line="142"/>
+        <source>Solution Progress</source>
+        <translation>Поступ розв&apos;зку</translation>
+    </message>
+    <message>
+        <location filename="../src/tspsolver.cpp" line="210"/>
+        <source>Solution Result</source>
+        <translation>Результат розв&apos;язку</translation>
+    </message>
+    <message>
+        <location filename="../src/tspsolver.cpp" line="210"/>
+        <source>This task has no solution.</source>
+        <translation>У цієї задачі немає розв&apos;язку.</translation>
+    </message>
+</context>
+<context>
+    <name>MainWindow</name>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="87"/>
+        <location filename="../ui/mainwindow.ui" line="75"/>
+        <source>Number of variant</source>
+        <translation>Номер варіанту</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="110"/>
+        <location filename="../ui/mainwindow.ui" line="98"/>
+        <source>Number of cities</source>
+        <translation>Кількість міст, що проходить комівояжер</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="271"/>
+        <location filename="../ui/mainwindow.ui" line="259"/>
+        <source>Select language</source>
+        <translation>Вибір мови</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="274"/>
+        <location filename="../ui/mainwindow.ui" line="262"/>
+        <source>Select application language</source>
+        <translation>Обрати мову додатку</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="322"/>
+        <source>P&amp;rint Setup...</source>
+        <translation>&amp;Налагодження друку...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="325"/>
+        <source>Setup printing</source>
+        <translation>Налагодити друк</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="337"/>
+        <source>&amp;Print...</source>
+        <translation>&amp;Друк...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="340"/>
+        <source>Print solution results</source>
+        <translation>Роздрукувати результат розв&apos;язку</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="343"/>
+        <source>Ctrl+P</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="356"/>
+        <location filename="../ui/mainwindow.ui" line="379"/>
+        <source>&amp;Solution...</source>
+        <translation>&amp;Розв&apos;язок...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="559"/>
+        <source>Save</source>
+        <translation>Зберегти</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="514"/>
+        <location filename="../ui/mainwindow.ui" line="530"/>
+        <source>Detect language automatically</source>
+        <translation>Визначати мову автоматично</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="517"/>
+        <location filename="../ui/mainwindow.ui" line="533"/>
+        <source>Detect language automatically based on regional settings</source>
+        <translation>Визначати мову автоматично, використовуючи регіональні стандарти</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="500"/>
+        <location filename="../ui/mainwindow.ui" line="516"/>
+        <source>Ctrl+S</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="386"/>
+        <location filename="../ui/mainwindow.ui" line="406"/>
+        <source>Ctrl+N</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="53"/>
+        <location filename="../ui/mainwindow.ui" line="41"/>
+        <source>Task</source>
+        <translation>Умова</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="74"/>
+        <location filename="../ui/mainwindow.ui" line="62"/>
+        <source>&amp;Variant:</source>
+        <translation>&amp;Варіант:</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="97"/>
+        <location filename="../ui/mainwindow.ui" line="85"/>
+        <source>&amp;Cities:</source>
+        <translation>&amp;Міст:</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="141"/>
+        <location filename="../ui/mainwindow.ui" line="129"/>
+        <source>Cost of travel from city to city</source>
+        <translation>Вартість переїзду з міста у місто</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="169"/>
+        <location filename="../ui/mainwindow.ui" line="157"/>
+        <source>Fill table with random numbers</source>
+        <translation>Заповнити таблицю випадковими значеннями</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="172"/>
+        <location filename="../ui/mainwindow.ui" line="160"/>
+        <source>Random</source>
+        <translation>Випадково</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="186"/>
+        <location filename="../ui/mainwindow.ui" line="174"/>
+        <source>Solve current task</source>
+        <translation>Розв&apos;язати поточну задачу</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="189"/>
+        <location filename="../ui/mainwindow.ui" line="177"/>
+        <source>Solve</source>
+        <translation>Розв&apos;язати</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="203"/>
+        <location filename="../ui/mainwindow.ui" line="191"/>
+        <source>Solution</source>
+        <translation>Розв&apos;язок</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="212"/>
+        <location filename="../ui/mainwindow.ui" line="200"/>
+        <source>Solution steps</source>
+        <translation>Хід розв&apos;язку</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="242"/>
+        <location filename="../ui/mainwindow.ui" line="230"/>
+        <source>&amp;File</source>
+        <translation>&amp;Файл</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="249"/>
+        <location filename="../ui/mainwindow.ui" line="234"/>
+        <source>Save &amp;As...</source>
+        <translation>Зберегти &amp;як...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="277"/>
+        <location filename="../ui/mainwindow.ui" line="265"/>
+        <source>&amp;Language</source>
+        <comment>Please, append &quot; / Language&quot; when translating this string.</comment>
+        <translation>Мова / &amp;Language</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="328"/>
+        <location filename="../ui/mainwindow.ui" line="351"/>
+        <source>Solution S&amp;teps</source>
+        <translation>&amp;Хід розв&apos;язку</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="342"/>
+        <location filename="../ui/mainwindow.ui" line="365"/>
+        <source>Solution &amp;Graph</source>
+        <translation>&amp;Граф розв&apos;язку</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="359"/>
+        <source>Solution...</source>
+        <translation>Розв&apos;язок...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="449"/>
+        <location filename="../ui/mainwindow.ui" line="469"/>
+        <source>Context &amp;Help</source>
+        <translation>&amp;Контекстна допомога</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="540"/>
+        <location filename="../ui/mainwindow.ui" line="556"/>
+        <source>&amp;Save</source>
+        <translation>&amp;Зберегти</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="267"/>
+        <location filename="../ui/mainwindow.ui" line="255"/>
+        <source>&amp;Settings</source>
+        <translation>&amp;Налагодження</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="17"/>
+        <location filename="../ui/mainwindow.ui" line="14"/>
+        <source>Travelling salesman problem[*]</source>
+        <translation>Задача комівояжера[*]</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="293"/>
+        <location filename="../ui/mainwindow.ui" line="281"/>
+        <source>&amp;Help</source>
+        <translation>&amp;Допомога</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="331"/>
+        <location filename="../ui/mainwindow.ui" line="354"/>
+        <source>Save solution steps</source>
+        <translation>Зберегти хід розв&apos;язку</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="334"/>
+        <location filename="../ui/mainwindow.ui" line="357"/>
+        <source>Save solution steps only</source>
+        <translation>Зберегти тільки хід розв&apos;язку</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="345"/>
+        <location filename="../ui/mainwindow.ui" line="368"/>
+        <source>Save solution graph</source>
+        <translation>Зберегти граф розв&apos;язку</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="348"/>
+        <location filename="../ui/mainwindow.ui" line="371"/>
+        <source>Save solution graph only</source>
+        <translation>Зберегти тільки граф розв&apos;язку</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="362"/>
+        <location filename="../ui/mainwindow.ui" line="382"/>
+        <source>Save solution</source>
+        <translation>Зберегти розв&apos;язок</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="365"/>
+        <location filename="../ui/mainwindow.ui" line="385"/>
+        <source>Save solution steps and graph</source>
+        <translation>Зберегти хід та граф розв&apos;язку</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="374"/>
+        <location filename="../ui/mainwindow.ui" line="394"/>
+        <source>&amp;New</source>
+        <translation>&amp;Створити</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="377"/>
+        <location filename="../ui/mainwindow.ui" line="397"/>
+        <source>New</source>
+        <translation>Створити</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="380"/>
+        <location filename="../ui/mainwindow.ui" line="400"/>
+        <source>New task</source>
+        <translation>Нова задача</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="383"/>
+        <location filename="../ui/mainwindow.ui" line="403"/>
+        <source>Create new task</source>
+        <translation>Створити нову задачу</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="395"/>
+        <location filename="../ui/mainwindow.ui" line="415"/>
+        <source>&amp;Open...</source>
+        <translation>&amp;Відкрити...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="398"/>
+        <location filename="../ui/mainwindow.ui" line="418"/>
+        <source>Open...</source>
+        <translation>Відкрити...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="401"/>
+        <location filename="../ui/mainwindow.ui" line="421"/>
+        <source>Open task</source>
+        <translation>Відкрити умову</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="404"/>
+        <location filename="../ui/mainwindow.ui" line="424"/>
+        <source>Open saved task</source>
+        <translation>Відкрити збережену умову</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="407"/>
+        <location filename="../ui/mainwindow.ui" line="427"/>
+        <source>Ctrl+O</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="416"/>
+        <location filename="../ui/mainwindow.ui" line="436"/>
+        <source>&amp;Preferences...</source>
+        <translation>&amp;Параметри...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="419"/>
+        <location filename="../ui/mainwindow.ui" line="439"/>
+        <source>Preferences...</source>
+        <translation>Параметри...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="422"/>
+        <location filename="../ui/mainwindow.ui" line="442"/>
+        <source>Application preferences</source>
+        <translation>Параметри додатку</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="434"/>
+        <location filename="../ui/mainwindow.ui" line="454"/>
+        <source>&amp;Contents</source>
+        <translation>&amp;Зміст</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="437"/>
+        <location filename="../ui/mainwindow.ui" line="457"/>
+        <source>Open help contents</source>
+        <translation>Відкрити зміст допомоги</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="452"/>
+        <location filename="../ui/mainwindow.ui" line="472"/>
+        <source>Open context help</source>
+        <translation>Відкрити контекстну допомогу</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="461"/>
+        <location filename="../ui/mainwindow.ui" line="481"/>
+        <source>&amp;About...</source>
+        <translation>&amp;Про...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="464"/>
+        <location filename="../ui/mainwindow.ui" line="484"/>
+        <source>About...</source>
+        <translation>Про...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="467"/>
+        <location filename="../ui/mainwindow.ui" line="487"/>
+        <source>About application</source>
+        <translation>Про додаток</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="476"/>
+        <location filename="../ui/mainwindow.ui" line="496"/>
+        <source>E&amp;xit</source>
+        <translation>В&amp;ихід</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="479"/>
+        <location filename="../ui/mainwindow.ui" line="499"/>
+        <source>Exit application</source>
+        <translation>Вийти з додатку</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="488"/>
+        <location filename="../ui/mainwindow.ui" line="504"/>
+        <source>&amp;Task...</source>
+        <translation>&amp;Умову...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="491"/>
+        <location filename="../ui/mainwindow.ui" line="507"/>
+        <source>Task...</source>
+        <translation>Умову...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="494"/>
+        <location filename="../ui/mainwindow.ce.ui" line="543"/>
+        <location filename="../ui/mainwindow.ui" line="510"/>
+        <location filename="../ui/mainwindow.ui" line="562"/>
+        <source>Save task</source>
+        <translation>Зберегти умову</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="497"/>
+        <location filename="../ui/mainwindow.ui" line="513"/>
+        <source>Save task to file</source>
+        <translation>Зберегти умову задачі у файл</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="511"/>
+        <location filename="../ui/mainwindow.ui" line="527"/>
+        <source>&amp;Autodetect</source>
+        <translation>&amp;Автовизначення</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="528"/>
+        <source>English</source>
+        <translation>Англійська</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="546"/>
+        <location filename="../ui/mainwindow.ui" line="565"/>
+        <source>Save current task</source>
+        <translation>Зберегти поточну умову</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="555"/>
+        <location filename="../ui/mainwindow.ui" line="574"/>
+        <source>About &amp;Qt...</source>
+        <translation>Про &amp;Qt...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="558"/>
+        <location filename="../ui/mainwindow.ui" line="577"/>
+        <source>About Qt...</source>
+        <translation>Про Qt...</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="561"/>
+        <source>About Qt</source>
+        <translation>Про Qt</translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ce.ui" line="564"/>
+        <location filename="../ui/mainwindow.ui" line="580"/>
+        <source>About Qt library</source>
+        <translation>Про бібліотеку Qt</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="141"/>
+        <location filename="../src/mainwindow.cpp" line="439"/>
+        <location filename="../src/mainwindow.cpp" line="448"/>
+        <source>Language change</source>
+        <translation>Зміна мови</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="141"/>
+        <source>Unable to load translation language.</source>
+        <translation>Неможливо завантажити переклад.</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="202"/>
+        <source>All Supported Formats</source>
+        <translation>Усі підтримувані формати</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="205"/>
+        <location filename="../src/mainwindow.cpp" line="232"/>
+        <location filename="../src/mainwindow.cpp" line="251"/>
+        <source>All Files</source>
+        <translation>Усі файли</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="203"/>
+        <location filename="../src/mainwindow.cpp" line="204"/>
+        <source>%1 Task Files</source>
+        <translation>Файли умов %1</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="181"/>
+        <source>New Task</source>
+        <translation>Нова задача</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="181"/>
+        <location filename="../src/mainwindow.cpp" line="195"/>
+        <location filename="../src/mainwindow.cpp" line="462"/>
+        <source>Would you like to save changes in current task?</source>
+        <translation>Бажаете зберегти зміни у поточній задачі?</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="195"/>
+        <source>Task Open</source>
+        <translation>Відкриття завдання</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="230"/>
+        <source>HTML Files</source>
+        <translation>Файли HTML</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="231"/>
+        <source>OpenDocument Files</source>
+        <translation>Файли OpenDocument</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="250"/>
+        <source>%1 Task File</source>
+        <translation>Файл умови %1</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="273"/>
+        <source>Settings Changed</source>
+        <translation>Параметри змінено</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="273"/>
+        <source>You have changed color settings.
+Do you wish to apply them to current solution text?</source>
+        <translation>Ви змінили параметри кольору.
+Бажаєте застосувати їх до поточного тексту розв&apos;зку?</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="337"/>
+        <source>Data error</source>
+        <translation>Помилка у даних</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="337"/>
+        <source>Error in cell [Row %1; Column %2]: Invalid data format.</source>
+        <translation>Помилка у комірці  [Рядок %1; Колонка %2]: Невірний формат даних.</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="350"/>
+        <source>Variant #%1</source>
+        <translation>Варіант №%1</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="351"/>
+        <source>Task:</source>
+        <translation>Умова:</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="354"/>
+        <location filename="../src/mainwindow.cpp" line="380"/>
+        <source>Solution of Variant #%1 task</source>
+        <translation>Розв&apos;язок варіанту №%1</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="361"/>
+        <source>Step #%1</source>
+        <translation>Крок №%1</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="364"/>
+        <source>This step has alternate candidates for branching.</source>
+        <translation>У цьому кроці є альтернативні кандидати на розгалудження.</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="376"/>
+        <source>Optimal path:</source>
+        <translation>Оптимальний шлях:</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="378"/>
+        <source>The price is &lt;b&gt;%1&lt;/b&gt; units.</source>
+        <translation>Вартість - &lt;b&gt;%1&lt;/b&gt; одиниць.</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="439"/>
+        <source>Language will be autodetected on next application start.</source>
+        <translation>Мову буде автоматично визначено при наступному запуску додатку.</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="448"/>
+        <source>You have language autodetection turned on.
+It needs to be off.
+Do you wish to turn it off?</source>
+        <translation>Увімкнено автоматичне визначення мови.
+Його необхідно вимкнути.
+Вимкнути його?</translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="462"/>
+        <source>Application Close</source>
+        <translation>Закриття додатку</translation>
+    </message>
+</context>
+<context>
+    <name>SettingsDialog</name>
+    <message>
+        <location filename="../ui/settingsdialog.ui" line="41"/>
+        <source>background-color: #0080C0</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ui" line="283"/>
+        <source>Restore main window state and position on application restart</source>
+        <translation>Відновлювати стан та розмір головного вікна після перезапуску додатку</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ui" line="286"/>
+        <source>Save main window state and position</source>
+        <translation>Зберегти стан та розміщення головного вікна</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ui" line="369"/>
+        <source>Hover mouse pointer over dialog elements to get additional help</source>
+        <translation>Наведіть покажчик миші на елемент ділогу, щоб отримати підказку</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="14"/>
+        <location filename="../ui/settingsdialog.ui" line="14"/>
+        <source>Preferences</source>
+        <translation>Параметри</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="100"/>
+        <location filename="../ui/settingsdialog.ui" line="151"/>
+        <source>Random values:</source>
+        <translation>Випадкові значення:</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="114"/>
+        <location filename="../ui/settingsdialog.ui" line="165"/>
+        <source>&amp;Minimal:</source>
+        <translation>&amp;Мінімум:</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="127"/>
+        <location filename="../ui/settingsdialog.ui" line="178"/>
+        <source>Minimum for random number generation</source>
+        <translation>Нажня межа для генерації випадкових значень</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="150"/>
+        <location filename="../ui/settingsdialog.ui" line="201"/>
+        <source>Ma&amp;ximal:</source>
+        <translation>М&amp;аксимум:</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="163"/>
+        <location filename="../ui/settingsdialog.ui" line="214"/>
+        <source>Maximum for random number generation</source>
+        <translation>Верхня межа для генерації випадкових значень</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="184"/>
+        <location filename="../ui/settingsdialog.ui" line="235"/>
+        <source>Output settings:</source>
+        <translation>Параметри виводу:</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="210"/>
+        <location filename="../ui/settingsdialog.ui" line="261"/>
+        <source>Font color for printing</source>
+        <translation>Колір шрифта для друку</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="213"/>
+        <location filename="../ui/settingsdialog.ui" line="264"/>
+        <source>&amp;Color...</source>
+        <translation>&amp;Колір...</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="193"/>
+        <location filename="../ui/settingsdialog.ui" line="244"/>
+        <source>Font face for printing</source>
+        <translation>Вигляд шрифта для друку</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="196"/>
+        <location filename="../ui/settingsdialog.ui" line="247"/>
+        <source>&amp;Font...</source>
+        <translation>&amp;Шрифт...</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="279"/>
+        <location filename="../ui/settingsdialog.ce.ui" line="285"/>
+        <location filename="../ui/settingsdialog.ui" line="331"/>
+        <location filename="../ui/settingsdialog.ui" line="337"/>
+        <source>Help</source>
+        <translation>Допомога</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="282"/>
+        <location filename="../ui/settingsdialog.ui" line="334"/>
+        <source>Get preferences help</source>
+        <translation>Отримати допомогу по налагодженням</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="315"/>
+        <location filename="../ui/settingsdialog.ui" line="391"/>
+        <source>Save new preferences</source>
+        <translation>Зберегти нові параметри</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="318"/>
+        <location filename="../ui/settingsdialog.ui" line="394"/>
+        <source>&amp;OK</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="335"/>
+        <location filename="../ui/settingsdialog.ui" line="411"/>
+        <source>Close without saving preferences</source>
+        <translation>Закрити вікно без збереження параметрів</translation>
+    </message>
+    <message>
+        <location filename="../ui/settingsdialog.ce.ui" line="338"/>
+        <location filename="../ui/settingsdialog.ui" line="414"/>
+        <source>&amp;Cancel</source>
+        <translation>&amp;Скасувати</translation>
+    </message>
+</context>
+</TS>
Index: /tags/0.1.1.42-alpha1/resources/tspsg.qrc
===================================================================
--- /tags/0.1.1.42-alpha1/resources/tspsg.qrc	(revision 44)
+++ /tags/0.1.1.42-alpha1/resources/tspsg.qrc	(revision 44)
@@ -0,0 +1,27 @@
+<RCC>
+    <qresource prefix="/images" >
+        <file>About.bmp</file>
+        <file>Icon.png</file>
+        <file>Settings.png</file>
+        <file>Task.bmp</file>
+        <file>icons/button_cancel.png</file>
+        <file>icons/button_ok.png</file>
+        <file>icons/color_line.png</file>
+        <file>icons/contents.png</file>
+        <file>icons/contexthelp.png</file>
+        <file>icons/exit.png</file>
+        <file>icons/filenew.png</file>
+        <file>icons/fileopen.png</file>
+        <file>icons/fileprint.png</file>
+        <file>icons/filesave.png</file>
+        <file>icons/filesaveas.png</file>
+        <file>icons/fonts.png</file>
+        <file>icons/help_about.png</file>
+        <file>icons/help_browser.png</file>
+        <file>icons/help_hint.png</file>
+        <file>icons/locale.png</file>
+        <file>icons/preferences_system.png</file>
+        <file>icons/qtlogo-64.png</file>
+        <file>icons/roll.png</file>
+    </qresource>
+</RCC>
Index: /tags/0.1.1.42-alpha1/resources/tspsg.rc
===================================================================
--- /tags/0.1.1.42-alpha1/resources/tspsg.rc	(revision 44)
+++ /tags/0.1.1.42-alpha1/resources/tspsg.rc	(revision 44)
@@ -0,0 +1,56 @@
+/*
+ *  TSPSG: TSP Solver and Generator
+ *  Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
+ *
+ *  $Id$
+ *  $URL$
+ *
+ *  This file is part of TSPSG.
+ */
+
+#include "..\\src\\resource.h"
+#pragma code_page(65001)
+
+LANGUAGE	0x00, 0x00
+
+// Main Icon
+IDI_APPICON	ICON	"Icon.ico"
+
+// Version Info
+VS_VERSION_INFO VERSIONINFO
+	FILEVERSION BUILD_VERSION_MAJOR,BUILD_VERSION_MINOR,BUILD_RELEASE,BUILD_NUMBER
+	PRODUCTVERSION BUILD_VERSION_MAJOR,BUILD_VERSION_MINOR,BUILD_RELEASE,BUILD_NUMBER
+	FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+	FILEFLAGS 0x1L
+#else
+	FILEFLAGS 0x0L
+#endif
+#ifdef Q_OS_WINCE
+	FILEOS 0x50000L
+#else
+	FILEOS 0x4L
+#endif
+	FILETYPE 0x1L
+	FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "000004b0"
+        BEGIN
+            VALUE "Comments", BUILD_STATUS
+            VALUE "CompanyName", "..::Lёppsville::.. Homes"
+            VALUE "FileDescription", "TSPSG: TSP Solver and Generator"
+            VALUE "FileVersion", BUILD_VERSION
+            VALUE "InternalName", "TSPSG"
+            VALUE "LegalCopyright", "Copyright © 2007 - 2009 Lёppa"
+            VALUE "OriginalFilename", "tspsg.exe"
+            VALUE "ProductName", "TSPSG"
+            VALUE "ProductVersion", BUILD_VERSION
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x0, 1200
+    END
+END
Index: /tags/0.1.1.42-alpha1/src/globals.h
===================================================================
--- /tags/0.1.1.42-alpha1/src/globals.h	(revision 44)
+++ /tags/0.1.1.42-alpha1/src/globals.h	(revision 44)
@@ -0,0 +1,65 @@
+/*
+ *  TSPSG: TSP Solver and Generator
+ *  Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
+ *
+ *  $Id$
+ *  $URL$
+ *
+ *  This file is part of TSPSG.
+ *
+ *  TSPSG 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.
+ *
+ *  TSPSG 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 TSPSG.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GLOBALS_H
+#define GLOBALS_H
+
+// INCLUDES
+#include <QtCore>
+#include <QtGui>
+
+// Version info
+#include "version.h"
+// OS detection
+#include "os.h"
+
+// DEFINES
+// Default values
+#define DEF_RAND_MIN 1
+#define DEF_RAND_MAX 10
+#define DEF_OFFSET 100
+#define DEF_FONT_FAMILY "Courier New"
+#define DEF_FONT_SIZE 10
+#define DEF_FONT_COLOR Qt::black
+
+// TSPSG Task file signature - letters TSPT
+#define TSPT quint32(0x54535054)
+// TSPSG Task file version
+#define TSPT_VERSION quint8(1)
+// TSPSG Task file metadata version
+#define TSPT_META_VERSION quint8(1)
+// TSPSG Task file metadata size in bytes (incl. version)
+#define TSPT_META_SIZE 2
+// ZKomModRd Task file signature - letters ZK
+#define ZKT quint16(0x5A4B)
+// ZKomModRd Task file version
+#define ZKT_VERSION quint8(1)
+
+// This value means infinity :-)
+#ifndef INFINITY
+	#define INFINITY 1.7E+308
+#endif
+// This is string, which represents infinite value in table
+#define INFSTR "---"
+
+#endif // GLOBALS_H
Index: /tags/0.1.1.42-alpha1/src/main.cpp
===================================================================
--- /tags/0.1.1.42-alpha1/src/main.cpp	(revision 44)
+++ /tags/0.1.1.42-alpha1/src/main.cpp	(revision 44)
@@ -0,0 +1,45 @@
+/*
+ *  TSPSG: TSP Solver and Generator
+ *  Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
+ *
+ *  $Id$
+ *  $URL$
+ *
+ *  This file is part of TSPSG.
+ *
+ *  TSPSG 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.
+ *
+ *  TSPSG 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 TSPSG.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "mainwindow.h"
+#if QT_VERSION < 0x040500
+	#ifdef _MSC_VER
+		#pragma message("WARNING: You are using Qt version < 4.5. Application will not support some non-critical features.")
+	#elif (defined(__GNUC__) || defined(__MINGW32__))
+		#warning "WARNING: You are using Qt version < 4.5. Application will not support some non-critical features."
+	#endif
+#endif
+
+int main(int argc, char *argv[])
+{
+QApplication app(argc, argv);
+	QTextCodec::setCodecForLocale(QTextCodec::codecForName("utf8"));
+	QTextCodec::setCodecForCStrings(QTextCodec::codecForName("utf8"));
+	QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8"));
+	app.setOrganizationName("..::Lёppsville::..");
+	app.setOrganizationDomain("www.leppsville.com");
+	app.setApplicationName("TSPSG");
+MainWindow mainwindow;
+	mainwindow.show();
+	return app.exec();
+}
Index: /tags/0.1.1.42-alpha1/src/mainwindow.cpp
===================================================================
--- /tags/0.1.1.42-alpha1/src/mainwindow.cpp	(revision 44)
+++ /tags/0.1.1.42-alpha1/src/mainwindow.cpp	(revision 44)
@@ -0,0 +1,492 @@
+	/*
+ *  TSPSG: TSP Solver and Generator
+ *  Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
+ *
+ *  $Id$
+ *  $URL$
+ *
+ *  This file is part of TSPSG.
+ *
+ *  TSPSG 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.
+ *
+ *  TSPSG 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 TSPSG.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow(QWidget *parent)
+	: QMainWindow(parent)
+{
+	settings = new QSettings(QSettings::IniFormat,QSettings::UserScope,"TSPSG","tspsg");
+	loadLanguage();
+	setupUi(this);
+	initDocStyleSheet();
+	solutionText->document()->setDefaultFont(settings->value("Output/Font",QFont(DEF_FONT_FAMILY,DEF_FONT_SIZE)).value<QFont>());
+	solutionText->setTextColor(settings->value("Output/Color",DEF_FONT_COLOR).value<QColor>());
+	solutionText->setWordWrapMode(QTextOption::WordWrap);
+#ifdef Q_OS_WINCE
+	// A little hack for toolbar icons to have sane size.
+int s = qMin(QApplication::desktop()->screenGeometry().width(),QApplication::desktop()->screenGeometry().height());
+	toolBar->setIconSize(QSize(s / 10,s / 10));
+#endif
+#ifndef Q_OS_WINCE
+	printer = new QPrinter();
+#endif // Q_OS_WINCE
+	groupSettingsLanguageList = new QActionGroup(this);
+	actionSettingsLanguageEnglish->setData("en");
+	actionSettingsLanguageEnglish->setActionGroup(groupSettingsLanguageList);
+	loadLangList();
+	spinCities->setValue(settings->value("NumCities",5).toInt());
+	actionSettingsLanguageAutodetect->setChecked(settings->value("Language","").toString().isEmpty());
+	connect(actionFileNew,SIGNAL(triggered()),this,SLOT(actionFileNewTriggered()));
+	connect(actionFileOpen,SIGNAL(triggered()),this,SLOT(actionFileOpenTriggered()));
+	connect(actionFileSaveAsTask,SIGNAL(triggered()),this,SLOT(actionFileSaveAsTaskTriggered()));
+	connect(actionFileSaveAsSolution,SIGNAL(triggered()),this,SLOT(actionFileSaveAsSolutionTriggered()));
+	connect(actionSettingsPreferences,SIGNAL(triggered()),this,SLOT(actionSettingsPreferencesTriggered()));
+	connect(actionSettingsLanguageAutodetect,SIGNAL(triggered(bool)),this,SLOT(actionSettingsLanguageAutodetectTriggered(bool)));
+	connect(groupSettingsLanguageList,SIGNAL(triggered(QAction *)),this,SLOT(groupSettingsLanguageListTriggered(QAction *)));
+	connect(actionHelpAboutQt,SIGNAL(triggered()),qApp,SLOT(aboutQt()));
+	connect(actionHelpAbout,SIGNAL(triggered()),this,SLOT(actionHelpAboutTriggered()));
+#ifndef Q_OS_WINCE
+	connect(actionFilePrintSetup,SIGNAL(triggered()),this,SLOT(actionFilePrintSetupTriggered()));
+#endif // Q_OS_WINCE
+	connect(buttonSolve,SIGNAL(clicked()),this,SLOT(buttonSolveClicked()));
+	connect(buttonRandom,SIGNAL(clicked()),this,SLOT(buttonRandomClicked()));
+	connect(spinCities,SIGNAL(valueChanged(int)),this,SLOT(spinCitiesValueChanged(int)));
+QRect rect = geometry();
+	setCentralWidget(tabWidget);
+#ifndef Q_OS_WINCE
+	if (settings->value("SavePos",false).toBool()) {
+		// Loading of saved window state
+		settings->beginGroup("MainWindow");
+		resize(settings->value("Size",size()).toSize());
+		move(settings->value("Position",pos()).toPoint());
+		if (settings->value("Maximized",false).toBool())
+			setWindowState(windowState() | Qt::WindowMaximized);
+		settings->endGroup();
+	} else {
+		// Centering main window
+		rect.moveCenter(QApplication::desktop()->availableGeometry(this).center());
+		setGeometry(rect);
+	}
+#endif // Q_OS_WINCE
+	qsrand(QDateTime().currentDateTime().toTime_t());
+	tspmodel = new CTSPModel();
+	tspmodel->setNumCities(spinCities->value());
+	taskView->setModel(tspmodel);
+	connect(tspmodel,SIGNAL(numCitiesChanged(int)),this,SLOT(numCitiesChanged(int)));
+	connect(tspmodel,SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)),this,SLOT(dataChanged()));
+	connect(tspmodel,SIGNAL(layoutChanged()),this,SLOT(dataChanged()));
+#ifdef Q_OS_WINCE
+	taskView->resizeColumnsToContents();
+	taskView->resizeRowsToContents();
+#endif // Q_OS_WINCE
+}
+
+void MainWindow::enableSolutionActions(bool enable)
+{
+	actionFileSaveAsSolution->setEnabled(enable);
+	solutionText->setEnabled(enable);
+	if (!enable)
+		output.clear();
+}
+
+bool MainWindow::loadLanguage(QString lang)
+{
+// i18n
+bool ad = false;
+	if (lang.isEmpty()) {
+		ad = settings->value("Language","").toString().isEmpty();
+		lang = settings->value("Language",QLocale::system().name()).toString();
+	}
+static QTranslator *qtTranslator;
+	if (qtTranslator) {
+		qApp->removeTranslator(qtTranslator);
+		delete qtTranslator;
+		qtTranslator = NULL;
+	}
+	qtTranslator = new QTranslator();
+static QTranslator *translator;
+	if (translator) {
+		qApp->removeTranslator(translator);
+		delete translator;
+	}
+	translator = new QTranslator();
+	if (lang.compare("en") && !lang.startsWith("en_")) {
+		// Trying to load system Qt library translation...
+		if (qtTranslator->load("qt_" + lang,QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
+			qApp->installTranslator(qtTranslator);
+		else
+			// No luck. Let's try to load bundled one.
+			if (qtTranslator->load("qt_" + lang,"i18n"))
+				qApp->installTranslator(qtTranslator);
+			else {
+				delete qtTranslator;
+				qtTranslator = NULL;
+			}
+		// Now let's load application translation.
+		if (translator->load(lang,"i18n"))
+			qApp->installTranslator(translator);
+		else {
+			if (!ad)
+				QMessageBox(QMessageBox::Warning,trUtf8("Language change"),trUtf8("Unable to load translation language."),QMessageBox::Ok,this).exec();
+			delete translator;
+			translator = NULL;
+			return false;
+		}
+	}
+	return true;
+}
+
+void MainWindow::initDocStyleSheet()
+{
+QColor color = settings->value("Output/Color",DEF_FONT_COLOR).value<QColor>();
+QColor hilight;
+	if (color.value() < 192)
+		hilight.setHsv(color.hue(),color.saturation(),127 + qRound(color.value() / 2));
+	else
+		hilight.setHsv(color.hue(),color.saturation(),color.value() / 2);
+	solutionText->document()->setDefaultStyleSheet("* {color: " + color.name() +";} p {margin: 0px 10px;} table {margin: 5px;} td {padding: 1px 5px;} .hasalts {color: " + hilight.name() + ";} .selected {color: #A00000; font-weight: bold;} .alternate {color: #008000; font-weight: bold;}");
+	solutionText->document()->setDefaultFont(settings->value("Output/Font",QFont(DEF_FONT_FAMILY,DEF_FONT_SIZE)).value<QFont>());
+}
+
+void MainWindow::spinCitiesValueChanged(int n)
+{
+#ifdef Q_OS_WINCE
+int count = tspmodel->numCities();
+#endif // Q_OS_WINCE
+	tspmodel->setNumCities(n);
+#ifdef Q_OS_WINCE
+	if (n > count)
+		for (int k = count; k < n; k++) {
+			taskView->resizeColumnToContents(k);
+			taskView->resizeRowToContents(k);
+		}
+#endif // Q_OS_WINCE
+}
+
+
+void MainWindow::actionFileNewTriggered()
+{
+	if (isWindowModified()) {
+int res = QMessageBox(QMessageBox::Warning,trUtf8("New Task"),trUtf8("Would you like to save changes in current task?"),QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,this).exec();
+		if ((res == QMessageBox::Cancel) || ((res == QMessageBox::Yes) && !saveTask()))
+			return;
+	}
+	tspmodel->clear();
+	setWindowModified(false);
+	tabWidget->setCurrentIndex(0);
+	solutionText->clear();
+	enableSolutionActions(false);
+}
+
+void MainWindow::actionFileOpenTriggered()
+{
+	if (isWindowModified()) {
+int res = QMessageBox(QMessageBox::Warning,trUtf8("Task Open"),trUtf8("Would you like to save changes in current task?"),QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,this).exec();
+		if ((res == QMessageBox::Cancel) || ((res == QMessageBox::Yes) && !saveTask()))
+			return;
+	}
+QFileDialog od(this);
+	od.setAcceptMode(QFileDialog::AcceptOpen);
+	od.setFileMode(QFileDialog::ExistingFile);
+QStringList filters(trUtf8("All Supported Formats") + " (*.tspt *.zkt)");
+	filters.append(QString(trUtf8("%1 Task Files")).arg("TSPSG") + " (*.tspt)");
+	filters.append(QString(trUtf8("%1 Task Files")).arg("ZKomModRd") + " (*.zkt)");
+	filters.append(trUtf8("All Files") + " (*)");
+	od.setNameFilters(filters);
+	if (od.exec() != QDialog::Accepted)
+		return;
+QStringList files = od.selectedFiles();
+	if (files.size() < 1)
+		return;
+	tspmodel->loadTask(files.first());
+	setWindowModified(false);
+	solutionText->clear();
+	enableSolutionActions(false);
+}
+
+void MainWindow::actionFileSaveAsTaskTriggered()
+{
+	saveTask();
+}
+
+void MainWindow::actionFileSaveAsSolutionTriggered()
+{
+static QString selectedFile;
+	if (selectedFile.isEmpty())
+		selectedFile = "solution.html";
+QFileDialog sd(this);
+	sd.setAcceptMode(QFileDialog::AcceptSave);
+QStringList filters(trUtf8("HTML Files") + " (*.html *.htm)");
+	filters.append(trUtf8("OpenDocument Files") + " (*.odt)");
+	filters.append(trUtf8("All Files") + " (*)");
+	sd.setNameFilters(filters);
+	sd.selectFile(selectedFile);
+	if (sd.exec() != QDialog::Accepted)
+		return;
+QStringList files = sd.selectedFiles();
+	if (files.empty())
+		return;
+	selectedFile = files.first();
+QTextDocumentWriter dw(selectedFile);
+	if (!(selectedFile.endsWith(".htm",Qt::CaseInsensitive) || selectedFile.endsWith(".html",Qt::CaseInsensitive) || selectedFile.endsWith(".odt",Qt::CaseInsensitive) || selectedFile.endsWith(".txt",Qt::CaseInsensitive)))
+		dw.setFormat("plaintext");
+	dw.write(solutionText->document());
+}
+
+bool MainWindow::saveTask() {
+QFileDialog sd(this);
+	sd.setAcceptMode(QFileDialog::AcceptSave);
+QStringList filters(QString(trUtf8("%1 Task File")).arg("TSPSG") + " (*.tspt)");
+	filters.append(trUtf8("All Files") + " (*)");
+	sd.setNameFilters(filters);
+	sd.setDefaultSuffix("tspt");
+	if (sd.exec() != QDialog::Accepted)
+		return false;
+QStringList files = sd.selectedFiles();
+	if (files.size() < 1)
+		return false;
+	if (tspmodel->saveTask(files.first())) {
+		setWindowModified(false);
+		return true;
+	} else
+		return false;
+}
+
+void MainWindow::actionSettingsPreferencesTriggered()
+{
+SettingsDialog sd(this);
+	if (sd.exec() != QDialog::Accepted)
+		return;
+	if (sd.colorChanged() || sd.fontChanged()) {
+		initDocStyleSheet();
+		if (!output.isEmpty() && sd.colorChanged() && (QMessageBox(QMessageBox::Question,trUtf8("Settings Changed"),trUtf8("You have changed color settings.\nDo you wish to apply them to current solution text?"),QMessageBox::Yes | QMessageBox::No,this).exec() == QMessageBox::Yes)) {
+			QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+			solutionText->clear();
+			solutionText->setHtml(output.join(""));
+			QApplication::restoreOverrideCursor();
+		}
+	}
+}
+
+#ifndef Q_OS_WINCE
+void MainWindow::actionFilePrintSetupTriggered()
+{
+QPrintDialog pd(printer,this);
+#if QT_VERSION >= 0x040500
+	// No such methods in Qt < 4.5
+	pd.setOption(QAbstractPrintDialog::PrintSelection,false);
+	pd.setOption(QAbstractPrintDialog::PrintPageRange,false);
+#endif
+	pd.exec();
+}
+#endif // Q_OS_WINCE
+
+void MainWindow::buttonRandomClicked()
+{
+	tspmodel->randomize();
+	setWindowModified(true);
+#ifdef Q_OS_WINCE
+	taskView->resizeColumnsToContents();
+	taskView->resizeRowsToContents();
+#endif // Q_OS_WINCE
+}
+
+void MainWindow::outputMatrix(tMatrix matrix, QStringList &output, int nRow, int nCol)
+{
+int n = spinCities->value();
+QString line="";
+	output.append("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
+	for (int r = 0; r < n; r++) {
+		line = "<tr>";
+		for (int c = 0; c < n; c++) {
+			if (matrix[r][c] == INFINITY)
+				line += "<td align=\"center\">"INFSTR"</td>";
+			else if ((r == nRow) && (c == nCol))
+				line += "<td align=\"center\" class=\"selected\">" + QVariant(matrix[r][c]).toString() + "</td>";
+			else
+				line += "<td align=\"center\">" + QVariant(matrix[r][c]).toString() + "</td>";
+		}
+		line += "</tr>";
+		output.append(line);
+	}
+	output.append("</table>");
+}
+
+void MainWindow::buttonSolveClicked()
+{
+tMatrix matrix;
+QList<double> row;
+int n = spinCities->value();
+bool ok;
+	for (int r = 0; r < n; r++) {
+		row.clear();
+		for (int c = 0; c < n; c++) {
+			row.append(tspmodel->index(r,c).data(Qt::UserRole).toDouble(&ok));
+			if (!ok) {
+				QMessageBox(QMessageBox::Critical,trUtf8("Data error"),QString(trUtf8("Error in cell [Row %1; Column %2]: Invalid data format.")).arg(r + 1).arg(c + 1),QMessageBox::Ok,this).exec();
+				return;
+			}
+		}
+		matrix.append(row);
+	}
+CTSPSolver solver;
+sStep *root = solver.solve(spinCities->value(),matrix);
+	if (!root)
+		return;
+	QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+QColor color = settings->value("Output/Color",DEF_FONT_COLOR).value<QColor>();
+	output.clear();
+	output.append("<p>" + trUtf8("Variant #%1").arg(spinVariant->value()) + "</p>");
+	output.append("<p>" + trUtf8("Task:") + "</p>");
+	outputMatrix(matrix,output);
+	output.append("<hr>");
+	output.append("<p>" + trUtf8("Solution of Variant #%1 task").arg(spinVariant->value()) + "</p>");
+sStep *step = root;
+	n = 1;
+QString path = "";
+	while (n <= spinCities->value()) {
+		if (step->prNode->prNode != NULL || (step->prNode->prNode == NULL && step->plNode->prNode == NULL)) {
+			if (n != spinCities->value()) {
+				output.append("<p>" + trUtf8("Step #%1").arg(n++) + "</p>");
+				outputMatrix(step->matrix,output,step->candidate.nRow,step->candidate.nCol);
+				if (step->alts)
+					output.append("<p class=\"hasalts\">" + trUtf8("This step has alternate candidates for branching.") + "</p>");
+				output.append("<p>&nbsp;</p>");
+			}
+			path += QString(" (%1,%2)").arg(step->candidate.nRow + 1).arg(step->candidate.nCol + 1);
+		}
+		if (step->prNode->prNode != NULL)
+			step = step->prNode;
+		else if (step->plNode->prNode != NULL)
+			step = step->plNode;
+		else
+			break;
+	}
+	output.append("<p>" + trUtf8("Optimal path:") + "</p>");
+	output.append("<p>&nbsp;&nbsp;" + path + "</p>");
+	output.append("<p>" + trUtf8("The price is <b>%1</b> units.").arg(step->price) + "</p>");
+	solutionText->setHtml(output.join(""));
+	solutionText->setDocumentTitle(trUtf8("Solution of Variant #%1 task").arg(spinVariant->value()));
+	enableSolutionActions();
+	tabWidget->setCurrentIndex(1);
+	QApplication::restoreOverrideCursor();
+}
+
+void MainWindow::actionHelpAboutTriggered()
+{
+	// TODO: Normal about window :-)
+QString about = QString::fromUtf8("TSPSG - TSP Solver and Generator\n");
+	about += QString::fromUtf8("    Version: "BUILD_VERSION" ("BUILD_STATUS")\n");
+	about += QString::fromUtf8("    Copyright (C) 2007-%1 Lёppa <contacts[at]oleksii[dot]name>\n").arg(QDate::currentDate().toString("yyyy"));
+	about += QString::fromUtf8("Target OS: %1\n").arg(OS);
+	about += "Qt library:\n";
+	about += QString::fromUtf8("    Compile time: %1\n").arg(QT_VERSION_STR);
+	about += QString::fromUtf8("    Runtime: %1\n").arg(qVersion());
+	about += QString::fromUtf8("Built on %1 at %2\n").arg(__DATE__).arg(__TIME__);
+	about += "\n";
+	about += "TSPSG is licensed under the terms of the GNU General Public License. You should have received a copy of the GNU General Public License along with TSPSG.";
+	QMessageBox(QMessageBox::Information,"About",about,QMessageBox::Ok,this).exec();
+}
+
+void MainWindow::loadLangList()
+{
+QSettings langinfo("i18n/languages.ini",QSettings::IniFormat);
+#if QT_VERSION >= 0x040500
+	// In Qt < 4.5 QSettings doesn't have method setIniCodec.
+	langinfo.setIniCodec("UTF-8");
+#endif
+QDir dir("i18n","*.qm",QDir::Name | QDir::IgnoreCase,QDir::Files);
+	if (!dir.exists())
+		return;
+QFileInfoList langs = dir.entryInfoList();
+	if (langs.size() <= 0)
+		return;
+QAction *a;
+	for (int k = 0; k < langs.size(); k++) {
+		QFileInfo lang = langs.at(k);
+		if (!lang.completeBaseName().startsWith("qt_") && lang.completeBaseName().compare("en")) {
+#if QT_VERSION >= 0x040500
+			a = menuSettingsLanguage->addAction(langinfo.value(lang.completeBaseName() + "/NativeName",lang.completeBaseName()).toString());
+#else
+			// We use Name if Qt < 4.5 because NativeName is in UTF-8, QSettings
+			// reads .ini file as ASCII and there is no way to set file encoding.
+			a = menuSettingsLanguage->addAction(langinfo.value(lang.completeBaseName() + "/Name",lang.completeBaseName()).toString());
+#endif
+			a->setData(lang.completeBaseName());
+			a->setCheckable(true);
+			a->setActionGroup(groupSettingsLanguageList);
+			if (settings->value("Language",QLocale::system().name()).toString().startsWith(lang.completeBaseName()))
+				a->setChecked(true);
+		}
+	}
+}
+
+void MainWindow::actionSettingsLanguageAutodetectTriggered(bool checked)
+{
+	if (checked) {
+		settings->remove("Language");
+		QMessageBox(QMessageBox::Information,trUtf8("Language change"),trUtf8("Language will be autodetected on next application start."),QMessageBox::Ok,this).exec();
+	} else
+		settings->setValue("Language",groupSettingsLanguageList->checkedAction()->data().toString());
+}
+
+void MainWindow::groupSettingsLanguageListTriggered(QAction *action)
+{
+	if (actionSettingsLanguageAutodetect->isChecked()) {
+		// We have language autodetection. It needs to be disabled to change language.
+		if (QMessageBox(QMessageBox::Question,trUtf8("Language change"),trUtf8("You have language autodetection turned on.\nIt needs to be off.\nDo you wish to turn it off?"),QMessageBox::Yes | QMessageBox::No,this).exec() == QMessageBox::Yes) {
+			actionSettingsLanguageAutodetect->trigger();
+		} else
+			return;
+	}
+	if (loadLanguage(action->data().toString())) {
+		settings->setValue("Language",action->data().toString());
+		retranslateUi(this);
+	}
+}
+
+void MainWindow::closeEvent(QCloseEvent *event)
+{
+	if (isWindowModified()) {
+int res = QMessageBox(QMessageBox::Warning,trUtf8("Application Close"),trUtf8("Would you like to save changes in current task?"),QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,this).exec();
+		if ((res == QMessageBox::Cancel) || ((res == QMessageBox::Yes) && !saveTask())) {
+			event->ignore();
+			return;
+		}
+	}
+	settings->setValue("NumCities",spinCities->value());
+#ifndef Q_OS_WINCE
+	// Saving windows state
+	if (settings->value("SavePos",false).toBool()) {
+		settings->beginGroup("MainWindow");
+		settings->setValue("Maximized",isMaximized());
+		if (!isMaximized()) {
+			settings->setValue("Size",size());
+			settings->setValue("Position",pos());
+		}
+		settings->endGroup();
+	}
+#endif // Q_OS_WINCE
+	QMainWindow::closeEvent(event);
+}
+
+void MainWindow::dataChanged()
+{
+	setWindowModified(true);
+}
+
+void MainWindow::numCitiesChanged(int nCities)
+{
+	spinCities->setValue(nCities);
+}
Index: /tags/0.1.1.42-alpha1/src/mainwindow.h
===================================================================
--- /tags/0.1.1.42-alpha1/src/mainwindow.h	(revision 44)
+++ /tags/0.1.1.42-alpha1/src/mainwindow.h	(revision 44)
@@ -0,0 +1,74 @@
+/*
+ *  TSPSG: TSP Solver and Generator
+ *  Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
+ *
+ *  $Id$
+ *  $URL$
+ *
+ *  This file is part of TSPSG.
+ *
+ *  TSPSG 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.
+ *
+ *  TSPSG 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 TSPSG.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include "globals.h"
+#ifdef Q_OS_WINCE
+	#include "ui_mainwindow.ce.h"
+#else
+	#include "ui_mainwindow.h"
+#endif // Q_OS_WINCE
+#include "settingsdialog.h"
+#include "tspsolver.h"
+#include "tspmodel.h"
+
+class MainWindow: public QMainWindow, Ui::MainWindow
+{
+	Q_OBJECT
+public:
+	MainWindow(QWidget *parent = 0);
+	void closeEvent(QCloseEvent *);
+private slots:
+	void actionFileNewTriggered();
+	void actionFileOpenTriggered();
+	void actionFileSaveAsTaskTriggered();
+	void actionFileSaveAsSolutionTriggered();
+	void actionSettingsPreferencesTriggered();
+	void actionSettingsLanguageAutodetectTriggered(bool);
+	void groupSettingsLanguageListTriggered(QAction *);
+	void actionHelpAboutTriggered();
+	void dataChanged();
+#ifndef Q_OS_WINCE
+	void actionFilePrintSetupTriggered();
+#endif // Q_OS_WINCE
+	void buttonSolveClicked();
+	void buttonRandomClicked();
+	void spinCitiesValueChanged(int);
+	void numCitiesChanged(int);
+private:
+	QSettings *settings;
+	QPrinter *printer;
+	CTSPModel *tspmodel;
+	QActionGroup *groupSettingsLanguageList;
+	QStringList output;
+	bool loadLanguage(QString lang = "");
+	void loadLangList();
+	void initDocStyleSheet();
+	bool saveTask();
+	void outputMatrix(tMatrix, QStringList &, int nRow = -1, int nCol = -1);
+	void enableSolutionActions(bool enable = true);
+};
+
+#endif // MAINWINDOW_H
Index: /tags/0.1.1.42-alpha1/src/os.h
===================================================================
--- /tags/0.1.1.42-alpha1/src/os.h	(revision 44)
+++ /tags/0.1.1.42-alpha1/src/os.h	(revision 44)
@@ -0,0 +1,137 @@
+/*
+ *  TSPSG: TSP Solver and Generator
+ *  Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
+ *
+ *  $Id$
+ *  $URL$
+ *
+ *  This file is part of TSPSG.
+ *
+ *  TSPSG 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.
+ *
+ *  TSPSG 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 TSPSG.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef OS_H
+#define OS_H
+
+// Some target arch detection.
+// NOTE: Only for GNU C, Visual Studio, Intel C/C++ and MinGW32 compilers
+#if defined(__amd64__) || defined(_M_X64)
+	#define ARCH " (AMD 64-bit)"
+#elif defined(__ia64__) || defined(_M_IA64)
+	#define ARCH " (Intel 64-bit)"
+#elif defined(__i386__) || defined(_M_IX86) || defined(_X86_)
+	#define ARCH " (Intel x86)"
+#elif defined(__powerpc__) || defined(_M_PPC)
+	#define ARCH " (PowerPC)"
+#elif defined(__arm__) || defined(_M_ARM)
+	#define ARCH " (ARM)"
+#elif defined(__mips__) || defined(_M_MRX000)
+	#define ARCH " (MIPS)"
+#else
+	#define ARCH ""
+#endif // ARCH
+
+#ifdef Q_OS_AIX
+	#define OS "AIX"ARCH
+	#define OSID quint8(1)
+#elif defined Q_OS_BSD4
+	#define OS "BSD 4.4"ARCH
+	#define OSID quint8(2)
+#elif defined Q_OS_BSDI
+	#define OS "BSD/OS"ARCH
+	#define OSID quint8(3)
+#elif defined Q_OS_CYGWIN
+	#define OS "Cygwin"ARCH
+	#define OSID quint8(4)
+#elif defined Q_OS_DARWIN
+	#define OS "Darwin OS"ARCH
+	#define OSID quint8(5)
+#elif defined Q_OS_DGUX
+	#define OS "DG/UX"ARCH
+	#define OSID quint8(6)
+#elif defined Q_OS_DYNIX
+	#define OS "DYNIX/ptx"ARCH
+	#define OSID quint8(7)
+#elif defined Q_OS_FREEBSD
+	#define OS "FreeBSD"ARCH
+	#define OSID quint8(8)
+#elif defined Q_OS_HPUX
+	#define OS "HP-UX"ARCH
+	#define OSID quint8(9)
+#elif defined Q_OS_HURD
+	#define OS "GNU Hurd"ARCH
+	#define OSID quint8(10)
+#elif defined Q_OS_IRIX
+	#define OS "SGI Irix"ARCH
+	#define OSID quint8(11)
+#elif defined Q_OS_LINUX
+	#define OS "Linux"ARCH
+	#define OSID quint8(12)
+#elif defined Q_OS_LYNX
+	#define OS "LynxOS"ARCH
+	#define OSID quint8(13)
+#elif defined Q_OS_MSDOS
+	#define OS "MS-DOS"ARCH
+	#define OSID quint8(14)
+#elif defined Q_OS_NETBSD
+	#define OS "NetBSD"ARCH
+	#define OSID quint8(15)
+#elif defined Q_OS_OS2
+	#define OS "OS/2"ARCH
+	#define OSID quint8(16)
+#elif defined Q_OS_OPENBSD
+	#define OS "OpenBSD"ARCH
+	#define OSID quint8(17)
+#elif defined Q_OS_OS2EMX
+	#define OS "OS/2"ARCH
+	#define OSID quint8(18)
+#elif defined Q_OS_OSF
+	#define OS "HP Tru64 UNIX"ARCH
+	#define OSID quint8(19)
+#elif defined Q_OS_QNX6
+	#define OS "QNX RTP 6.1"ARCH
+	#define OSID quint8(20)
+#elif defined Q_OS_QNX
+	#define OS "QNX"ARCH
+	#define OSID quint8(21)
+#elif defined Q_OS_RELIANT
+	#define OS "Reliant UNIX"ARCH
+	#define OSID quint8(22)
+#elif defined Q_OS_SCO
+	#define OS "SCO OpenServer 5"ARCH
+	#define OSID quint8(23)
+#elif defined Q_OS_SOLARIS
+	#define OS "Sun Solaris"ARCH
+	#define OSID quint8(24)
+#elif defined Q_OS_ULTRIX
+	#define OS "DEC Ultrix"ARCH
+	#define OSID quint8(25)
+#elif defined Q_OS_UNIX
+	#define OS "UNIX BSD/SYSV"ARCH
+	#define OSID quint8(26)
+#elif defined Q_OS_UNIXWARE
+	#define OS "UnixWare 7/Open UNIX 8"ARCH
+	#define OSID quint8(27)
+#elif defined Q_OS_WIN32
+	#define OS "Windows"ARCH
+	#define OSID quint8(28)
+#elif defined Q_OS_WINCE
+	#define OS "Windows CE"ARCH
+	#define OSID quint8(29)
+#else
+	#define OS "Unknown"ARCH
+	#define OSID quint8(255)
+#endif // OS
+
+#endif // OS_H
Index: /tags/0.1.1.42-alpha1/src/resource.h
===================================================================
--- /tags/0.1.1.42-alpha1/src/resource.h	(revision 44)
+++ /tags/0.1.1.42-alpha1/src/resource.h	(revision 44)
@@ -0,0 +1,14 @@
+/*
+ *  TSPSG: TSP Solver and Generator
+ *  Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
+ *
+ *  $Id$
+ *  $URL$
+ *
+ *  This file is part of TSPSG.
+ */
+
+#include "version.h"
+
+#define VS_VERSION_INFO 1
+#define IDI_APPICON 101
Index: /tags/0.1.1.42-alpha1/src/settingsdialog.cpp
===================================================================
--- /tags/0.1.1.42-alpha1/src/settingsdialog.cpp	(revision 44)
+++ /tags/0.1.1.42-alpha1/src/settingsdialog.cpp	(revision 44)
@@ -0,0 +1,115 @@
+/*
+ *  TSPSG: TSP Solver and Generator
+ *  Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
+ *
+ *  $Id$
+ *  $URL$
+ *
+ *  This file is part of TSPSG.
+ *
+ *  TSPSG 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.
+ *
+ *  TSPSG 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 TSPSG.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "settingsdialog.h"
+
+SettingsDialog::SettingsDialog(QWidget *parent)
+	: QDialog(parent), newFont(false), newColor(false)
+{
+	setupUi(this);
+	connect(buttonOK,SIGNAL(clicked()),this,SLOT(accept()));
+	connect(buttonCancel,SIGNAL(clicked()),this,SLOT(reject()));
+	connect(spinRandMin,SIGNAL(valueChanged(int)),this,SLOT(spinRandMinValueChanged(int)));
+	connect(buttonFont,SIGNAL(clicked()),this,SLOT(buttonFontClicked()));
+	connect(buttonColor,SIGNAL(clicked()),this,SLOT(buttonColorClicked()));
+//	setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
+	setWindowFlags(windowFlags() ^ Qt::WindowContextHelpButtonHint);
+#ifndef Q_OS_WINCE
+	// Setting initial text of dialog hint label to own status tip
+	// text.
+	labelHint->setText(labelHint->statusTip());
+#endif // Q_OS_WINCE
+	settings = new QSettings(QSettings::IniFormat,QSettings::UserScope,"TSPSG","tspsg");
+	spinRandMin->setValue(settings->value("MinCost",DEF_RAND_MIN).toInt());
+	spinRandMax->setValue(settings->value("MaxCost",DEF_RAND_MAX).toInt());
+#ifndef Q_OS_WINCE
+	cbSaveState->setChecked(settings->value("SavePos",false).toBool());
+#endif // Q_OS_WINCE
+	settings->beginGroup("Output");
+	font = settings->value("Font",QFont(DEF_FONT_FAMILY,DEF_FONT_SIZE)).value<QFont>();
+	color = settings->value("Color",DEF_FONT_COLOR).value<QColor>();
+	settings->endGroup();
+}
+
+void SettingsDialog::accept()
+{
+#ifndef Q_OS_WINCE
+	settings->setValue("SavePos",cbSaveState->isChecked());
+#endif // Q_OS_WINCE
+	settings->setValue("MinCost",spinRandMin->value());
+	settings->setValue("MaxCost",spinRandMax->value());
+	settings->beginGroup("Output");
+	if (newFont)
+		settings->setValue("Font",font);
+	if (newColor)
+		settings->setValue("Color",color);
+	settings->endGroup();
+	QDialog::accept();
+}
+
+void SettingsDialog::buttonFontClicked()
+{
+bool ok;
+QFont font = QFontDialog::getFont(&ok,this->font,this);
+	if (ok && (this->font != font)) {
+		this->font = font;
+		newFont = true;
+	}
+}
+
+void SettingsDialog::buttonColorClicked()
+{
+QColor color = QColorDialog::getColor(this->color,this);
+	if (color.isValid() && (this->color != color)) {
+		this->color = color;
+		newColor = true;
+	}
+}
+
+bool SettingsDialog::colorChanged() const
+{
+	return newColor;
+}
+
+bool SettingsDialog::fontChanged() const
+{
+	return newFont;
+}
+
+#ifndef Q_OS_WINCE
+bool SettingsDialog::event(QEvent *ev)
+{
+	// Checking for StatusTip event and if tip text is not empty string
+	// setting it as text of the dialog hint label. Otherwise, setting
+	// dialog hint label text to own status tip text.
+	if (ev->type() == QEvent::StatusTip) {
+QString tip = static_cast<QStatusTipEvent *>(ev)->tip();
+		if (tip.length() != 0)
+			labelHint->setText(tip);
+		else
+			labelHint->setText(labelHint->statusTip());
+		return true;
+	} else
+		return QDialog::event(ev);
+}
+#endif // Q_OS_WINCE
Index: /tags/0.1.1.42-alpha1/src/settingsdialog.h
===================================================================
--- /tags/0.1.1.42-alpha1/src/settingsdialog.h	(revision 44)
+++ /tags/0.1.1.42-alpha1/src/settingsdialog.h	(revision 44)
@@ -0,0 +1,59 @@
+/*
+ *  TSPSG: TSP Solver and Generator
+ *  Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
+ *
+ *  $Id$
+ *  $URL$
+ *
+ *  This file is part of TSPSG.
+ *
+ *  TSPSG 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.
+ *
+ *  TSPSG 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 TSPSG.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef SETTINGSDIALOG_H
+#define SETTINGSDIALOG_H
+
+#include "globals.h"
+#ifdef Q_OS_WINCE
+	#include "ui_settingsdialog.ce.h"
+#else
+	#include "ui_settingsdialog.h"
+#endif // Q_OS_WINCE
+
+class SettingsDialog: public QDialog, public Ui::SettingsDialog
+{
+	Q_OBJECT
+public:
+	SettingsDialog(QWidget *parent = 0);
+	bool fontChanged() const;
+	bool colorChanged() const;
+
+private:
+	QSettings *settings;
+	QFont font;
+	QColor color;
+	bool newFont;
+	bool newColor;
+#ifndef Q_OS_WINCE
+	bool event(QEvent *);
+#endif
+
+private slots:
+	void accept();
+	void spinRandMinValueChanged(int val) { spinRandMax->setMinimum(val + 1); }
+	void buttonFontClicked();
+	void buttonColorClicked();
+};
+
+#endif // SETTINGSDIALOG_H
Index: /tags/0.1.1.42-alpha1/src/tspmodel.cpp
===================================================================
--- /tags/0.1.1.42-alpha1/src/tspmodel.cpp	(revision 44)
+++ /tags/0.1.1.42-alpha1/src/tspmodel.cpp	(revision 44)
@@ -0,0 +1,342 @@
+/*
+ *  TSPSG: TSP Solver and Generator
+ *  Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
+ *
+ *  $Id$
+ *  $URL$
+ *
+ *  This file is part of TSPSG.
+ *
+ *  TSPSG 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.
+ *
+ *  TSPSG 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 TSPSG.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "tspmodel.h"
+
+CTSPModel::CTSPModel(QObject *parent)
+	: QAbstractTableModel(parent), nCities(0)
+{
+	settings = new QSettings(QSettings::IniFormat,QSettings::UserScope,"TSPSG","tspsg");
+}
+
+inline int CTSPModel::rand(int min, int max) const
+{
+	return min + (int)(((float)qrand() / RAND_MAX) * max);
+}
+
+int CTSPModel::rowCount(const QModelIndex &) const
+{
+	return nCities;
+}
+
+int CTSPModel::columnCount(const QModelIndex &) const
+{
+	return nCities;
+}
+
+QVariant CTSPModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+	if (role == Qt::DisplayRole) {
+		if (orientation == Qt::Vertical)
+			return trUtf8("City %1").arg(section + 1);
+		else
+			return trUtf8("%1").arg(section + 1);
+	}
+	return QVariant();
+}
+
+QVariant CTSPModel::data(const QModelIndex &index, int role) const
+{
+	if (!index.isValid())
+		return QVariant();
+	if (role == Qt::TextAlignmentRole)
+		return int(Qt::AlignCenter);
+	else if (role == Qt::FontRole) {
+QFont font;
+		font.setBold(true);
+		return font;
+	} else if (role == Qt::DisplayRole || role == Qt::EditRole) {
+		if (index.row() < nCities && index.column() < nCities)
+			if (table[index.row()][index.column()] == INFINITY)
+				return trUtf8(INFSTR);
+			else
+				// HACK: Converting to string to prevent spinbox in edit mode
+				return QVariant(table[index.row()][index.column()]).toString();
+		else
+			return QVariant();
+	} else if (role == Qt::UserRole)
+		return table[index.row()][index.column()];
+	return QVariant();
+}
+
+bool CTSPModel::setData(const QModelIndex &index, const QVariant &value, int role)
+{
+	if (!index.isValid())
+		return false;
+	if (role == Qt::EditRole && index.row() != index.column()) {
+		if (value.toString().compare(INFSTR) == 0)
+			table[index.row()][index.column()] = INFINITY;
+		else {
+bool ok;
+double tmp = value.toDouble(&ok);
+			if (!ok || tmp < 0)
+				return false;
+			else
+				table[index.row()][index.column()] = tmp;
+		}
+		emit dataChanged(index,index);
+		return true;
+	}
+	return false;
+}
+
+Qt::ItemFlags CTSPModel::flags(const QModelIndex &index) const
+{
+Qt::ItemFlags flags = QAbstractItemModel::flags(index);
+	if (index.row() != index.column())
+		flags |= Qt::ItemIsEditable;
+	return flags;
+}
+
+quint16 CTSPModel::numCities() const
+{
+	return nCities;
+}
+
+void CTSPModel::setNumCities(int n)
+{
+	if (n == nCities)
+		return;
+	emit layoutAboutToBeChanged();
+	table.resize(n);
+	for (int k = 0; k < n; k++) {
+		table[k].resize(n);
+	}
+	if (n > nCities)
+		for (int k = nCities; k < n; k++)
+			table[k][k] = INFINITY;
+	nCities = n;
+	emit layoutChanged();
+}
+
+void CTSPModel::clear()
+{
+	for (int r = 0; r < nCities; r++)
+		for (int c = 0; c < nCities; c++)
+			if (r != c)
+				table[r][c] = 0;
+	emit dataChanged(index(0,0),index(nCities - 1,nCities - 1));
+}
+
+inline bool CTSPModel::loadError(QDataStream::Status status)
+{
+QString err;
+	if (status == QDataStream::Ok)
+		return false;
+	else if (status == QDataStream::ReadPastEnd)
+		err = trUtf8("Unexpected end of file.");
+	else if (status == QDataStream::ReadCorruptData)
+		err = trUtf8("Corrupt data read. File possibly corrupted.");
+	else
+		err = trUtf8("Unknown error.");
+	QMessageBox(QMessageBox::Critical,trUtf8("Task Load"),trUtf8("Unable to load task:") + "\n" + err,QMessageBox::Ok).exec();
+	return true;
+}
+
+void CTSPModel::loadTask(QString fname)
+{
+QFile f(fname);
+	if (!f.open(QIODevice::ReadOnly)) {
+		QMessageBox(QMessageBox::Critical,trUtf8("Task Load"),QString(trUtf8("Unable to open task file.\nError: %1")).arg(f.errorString()),QMessageBox::Ok).exec();
+		return;
+	}
+QDataStream ds(&f);
+	ds.setVersion(QDataStream::Qt_4_4);
+quint32 sig;
+	ds >> sig;
+	if (loadError(ds.status()))
+		return;
+	ds.device()->reset();
+	if (sig == TSPT)
+		loadTSPT(&ds);
+	else if ((sig >> 16) == ZKT)
+		loadZKT(&ds);
+	else
+		QMessageBox(QMessageBox::Critical,trUtf8("Task Load"),trUtf8("Unable to load task:") + "\n" + trUtf8("Unknown file format or file is corrupted."),QMessageBox::Ok).exec();
+	f.close();
+}
+
+void CTSPModel::loadTSPT(QDataStream *ds)
+{
+	// Skipping signature
+	ds->skipRawData(sizeof(TSPT));
+	if (loadError(ds->status()))
+		return;
+	// File version
+quint8 version;
+	*ds >> version;
+	if (loadError(ds->status()))
+		return;
+	if (version > TSPT_VERSION) {
+		QMessageBox(QMessageBox::Critical,trUtf8("Task Load"),trUtf8("Unable to load task:") + "\n" + trUtf8("File version is newer than application supports.\nPlease, try to update application."),QMessageBox::Ok).exec();
+		return;
+	}
+	// Skipping metadata
+	ds->skipRawData(TSPT_META_SIZE);
+	if (loadError(ds->status()))
+		return;
+	// Cities number
+quint16 size;
+	*ds >> size;
+	if (loadError(ds->status()))
+		return;
+	if (size < 3) {
+		QMessageBox(QMessageBox::Critical,trUtf8("Task Load"),trUtf8("Unable to load task:") + "\n" + trUtf8("Unexpected data read.\nFile is possibly corrupted."),QMessageBox::Ok).exec();
+		return;
+	}
+	if (nCities != size)
+		emit numCitiesChanged(size);
+	// Costs
+	for (int r = 0; r < size; r++)
+		for (int c = 0; c < size; c++)
+			if (r != c) {
+				*ds >> table[r][c];
+				if (loadError(ds->status())) {
+					clear();
+					return;
+				}
+			}
+	emit dataChanged(index(0,0),index(nCities - 1,nCities - 1));
+}
+
+void CTSPModel::loadZKT(QDataStream *ds)
+{
+	// Skipping signature
+	ds->skipRawData(sizeof(ZKT));
+	if (loadError(ds->status()))
+		return;
+	// File version
+quint16 version;
+	ds->readRawData(reinterpret_cast<char *>(&version),2);
+	if (loadError(ds->status()))
+		return;
+	if (version > ZKT_VERSION) {
+		QMessageBox(QMessageBox::Critical,trUtf8("Task Load"),trUtf8("Unable to load task:") + "\n" + trUtf8("File version is newer than application supports.\nPlease, try to update application."),QMessageBox::Ok).exec();
+		return;
+	}
+	// Cities number
+quint8 size;
+	ds->readRawData(reinterpret_cast<char *>(&size),1);
+	if (loadError(ds->status()))
+		return;
+	if ((size < 3) || (size > 5)) {
+		QMessageBox(QMessageBox::Critical,trUtf8("Task Load"),trUtf8("Unable to load task:") + "\n" + trUtf8("Unexpected data read.\nFile is possibly corrupted."),QMessageBox::Ok).exec();
+		return;
+	}
+	if (nCities != size)
+		emit numCitiesChanged(size);
+	// Costs
+double val;
+	for (int r = 0; r < 5; r++)
+		for (int c = 0; c < 5; c++)
+			if ((r != c) && (r < size)) {
+				ds->readRawData(reinterpret_cast<char *>(&val),8);
+				if (loadError(ds->status())) {
+					clear();
+					return;
+				}
+				table[r][c] = val;
+			} else {
+				ds->skipRawData(8);
+				if (loadError(ds->status())) {
+					clear();
+					return;
+				}
+			}
+	emit dataChanged(index(0,0),index(nCities - 1,nCities - 1));
+}
+
+bool CTSPModel::saveTask(QString fname)
+{
+QFile f(fname);
+	if (!f.open(QIODevice::WriteOnly)) {
+		QMessageBox(QMessageBox::Critical,trUtf8("Task Save"),QString(trUtf8("Unable to create task file.\nError: %1\nMaybe, file is read-only?")).arg(f.errorString()),QMessageBox::Ok).exec();
+		return false;
+	}
+QDataStream ds(&f);
+	ds.setVersion(QDataStream::Qt_4_4);
+	if (f.error() != QFile::NoError) {
+		QMessageBox(QMessageBox::Critical,trUtf8("Task Save"),trUtf8("Unable to save task.\nError: %1").arg(f.errorString()),QMessageBox::Ok).exec();
+		f.close();
+		return false;
+	}
+	// File signature
+	ds << TSPT;
+	if (f.error() != QFile::NoError) {
+		QMessageBox(QMessageBox::Critical,trUtf8("Task Save"),trUtf8("Unable to save task.\nError: %1").arg(f.errorString()),QMessageBox::Ok).exec();
+		f.close();
+		return false;
+	}
+	// File version
+	ds << TSPT_VERSION;
+	if (f.error() != QFile::NoError) {
+		QMessageBox(QMessageBox::Critical,trUtf8("Task Save"),trUtf8("Unable to save task.\nError: %1").arg(f.errorString()),QMessageBox::Ok).exec();
+		f.close();
+		return false;
+	}
+	// File metadata version
+	ds << TSPT_META_VERSION;
+	if (f.error() != QFile::NoError) {
+		QMessageBox(QMessageBox::Critical,trUtf8("Task Save"),trUtf8("Unable to save task.\nError: %1").arg(f.errorString()),QMessageBox::Ok).exec();
+		f.close();
+		return false;
+	}
+	// Metadata
+	ds << OSID;
+	if (f.error() != QFile::NoError) {
+		QMessageBox(QMessageBox::Critical,trUtf8("Task Save"),trUtf8("Unable to save task.\nError: %1").arg(f.errorString()),QMessageBox::Ok).exec();
+		f.close();
+		return false;
+	}
+	// Number of cities
+	ds << nCities;
+	if (f.error() != QFile::NoError) {
+		QMessageBox(QMessageBox::Critical,trUtf8("Task Save"),trUtf8("Unable to save task.\nError: %1").arg(f.errorString()),QMessageBox::Ok).exec();
+		f.close();
+		return false;
+	}
+	// Costs
+	for (int r = 0; r < nCities; r++)
+		for (int c = 0; c < nCities; c++)
+			if (r != c) {
+				ds << table[r][c];
+				if (f.error() != QFile::NoError) {
+					QMessageBox(QMessageBox::Critical,trUtf8("Task Save"),trUtf8("Unable to save task.\nError: %1").arg(f.errorString()),QMessageBox::Ok).exec();
+					f.close();
+					return false;
+				}
+			}
+	f.close();
+	return true;
+}
+
+void CTSPModel::randomize()
+{
+int randMin = settings->value("MinCost",DEF_RAND_MIN).toInt();
+int randMax = settings->value("MaxCost",DEF_RAND_MAX).toInt();
+	for (int r = 0; r < nCities; r++)
+		for (int c = 0; c < nCities; c++)
+			if (r != c)
+				table[r][c] = rand(randMin,randMax);
+	emit dataChanged(index(0,0),index(nCities - 1,nCities - 1));
+}
Index: /tags/0.1.1.42-alpha1/src/tspmodel.h
===================================================================
--- /tags/0.1.1.42-alpha1/src/tspmodel.h	(revision 44)
+++ /tags/0.1.1.42-alpha1/src/tspmodel.h	(revision 44)
@@ -0,0 +1,58 @@
+/*
+ *  TSPSG: TSP Solver and Generator
+ *  Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
+ *
+ *  $Id$
+ *  $URL$
+ *
+ *  This file is part of TSPSG.
+ *
+ *  TSPSG 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.
+ *
+ *  TSPSG 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 TSPSG.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef TSPMODEL_H
+#define TSPMODEL_H
+
+#include "globals.h"
+
+class CTSPModel: public QAbstractTableModel
+{
+	Q_OBJECT
+public:
+	CTSPModel(QObject *parent = 0);
+	int rowCount(const QModelIndex &) const;
+	int columnCount(const QModelIndex &) const;
+	QVariant headerData(int, Qt::Orientation, int) const;
+	QVariant data(const QModelIndex &, int) const;
+	bool setData(const QModelIndex &, const QVariant &, int);
+	Qt::ItemFlags flags(const QModelIndex &) const;
+	quint16 numCities() const;
+	void setNumCities(int);
+	void clear();
+	void loadTask(QString);
+	bool saveTask(QString);
+	void randomize();
+signals:
+	void numCitiesChanged(int);
+private:
+	QSettings *settings;
+	QVector<QVector<double>> table;
+	quint16 nCities;
+	int rand(int, int) const;
+	bool loadError(QDataStream::Status);
+	void loadZKT(QDataStream *);
+	void loadTSPT(QDataStream *);
+};
+
+#endif // TSPMODEL_H
Index: /tags/0.1.1.42-alpha1/src/tspsolver.cpp
===================================================================
--- /tags/0.1.1.42-alpha1/src/tspsolver.cpp	(revision 44)
+++ /tags/0.1.1.42-alpha1/src/tspsolver.cpp	(revision 44)
@@ -0,0 +1,214 @@
+/*
+ *  TSPSG: TSP Solver and Generator
+ *  Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
+ *
+ *  $Id$
+ *  $URL$
+ *
+ *  This file is part of TSPSG.
+ *
+ *  TSPSG 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.
+ *
+ *  TSPSG 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 TSPSG.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "tspsolver.h"
+#include "tspmodel.h"
+
+CTSPSolver::CTSPSolver()
+	: nCities(0)
+{
+}
+
+void CTSPSolver::cleanup()
+{
+	route.clear();
+}
+
+double CTSPSolver::findMinInRow(int nRow, tMatrix matrix, int exc)
+{
+double min = INFINITY;
+	for (int k = 0; k < nCities; k++)
+		if (((k != exc)) && (min > matrix[nRow][k]))
+			min = matrix[nRow][k];
+	return min == INFINITY ? 0 : min;
+}
+
+double CTSPSolver::findMinInCol(int nCol, tMatrix matrix, int exr)
+{
+double min = INFINITY;
+	for (int k = 0; k < nCities; k++)
+		if ((k != exr) && (min > matrix[k][nCol]))
+			min = matrix[k][nCol];
+	return min == INFINITY ? 0 : min;
+}
+
+void CTSPSolver::subRow(tMatrix &matrix, int nRow, double val)
+{
+	for (int k = 0; k < nCities; k++)
+		if (k != nRow)
+			matrix[nRow][k] -= val;
+}
+
+void CTSPSolver::subCol(tMatrix &matrix, int nCol, double val)
+{
+	for (int k = 0; k < nCities; k++)
+		if (k != nCol)
+			matrix[k][nCol] -= val;
+}
+
+double CTSPSolver::align(tMatrix &matrix)
+{
+double r = 0;
+double min;
+	for (int k = 0; k < nCities; k++) {
+		min = findMinInRow(k,matrix);
+		if (min > 0) {
+			r += min;
+			subRow(matrix,k,min);
+		}
+	}
+	for (int k = 0; k < nCities; k++) {
+		min = findMinInCol(k,matrix);
+		if (min > 0) {
+			r += min;
+			subCol(matrix,k,min);
+		}
+	}
+	return r;
+}
+
+bool CTSPSolver::findCandidate(tMatrix matrix, int &nRow, int &nCol, double &h)
+{
+	h = -1;
+	nRow = -1;
+	nCol = -1;
+bool alts = false;
+double sum;
+	for (int r = 0; r < nCities; r++)
+		for (int c = 0; c < nCities; c++)
+			if ((matrix[r][c] == 0) && !forbidden.values(r).contains(c)) {
+				sum = findMinInRow(r,matrix,c) + findMinInCol(c,matrix,r);
+				if (sum > h) {
+					h = sum;
+					nRow = r;
+					nCol = c;
+					alts = false;
+				} else if (sum == h)
+					alts = true;
+			}
+	return alts;
+}
+
+bool CTSPSolver::hasSubCycles(int nRow, int nCol)
+{
+	if ((nRow < 0) || (nCol < 0) || route.isEmpty() || !(route.size() < nCities - 1) || !route.contains(nCol))
+		return false;
+int i = nCol;
+	while (true) {
+		if ((i = route[i]) == nRow)
+			return true;
+		if (!route.contains(i))
+			return false;
+	}
+	return false;
+}
+
+// TODO: Comment the algorithm
+sStep *CTSPSolver::solve(int numCities, tMatrix task, QWidget *parent)
+{
+	if (numCities <= 1)
+		return NULL;
+	cleanup();
+	nCities = numCities;
+double s;
+QProgressDialog pd(parent);
+QProgressBar *pb = new QProgressBar(&pd);
+	pb->setAlignment(Qt::AlignCenter);
+	pb->setFormat(trUtf8("%v of %m parts found"));
+	pd.setBar(pb);
+	pd.setMaximum(nCities);
+	pd.setMinimumDuration(1000);
+	pd.setLabelText(trUtf8("Calculating optimal route..."));
+	pd.setWindowTitle(trUtf8("Solution Progress"));
+	pd.setWindowModality(Qt::ApplicationModal);
+	pd.setValue(0);
+
+sStep *step = new sStep();
+	step->matrix = task;
+
+	s = align(step->matrix);
+	step->price = s;
+	root = step;
+
+sStep *left, *right;
+int nRow, nCol;
+	while (route.size() < nCities) {
+		forbidden.clear();
+		step->alts = findCandidate(step->matrix,nRow,nCol,s);
+		while (hasSubCycles(nRow,nCol)) {
+			forbidden[nRow] = nCol;
+			step->matrix[nRow][nCol] = INFINITY;
+			step->price += align(step->matrix);
+			step->alts = findCandidate(step->matrix,nRow,nCol,s);
+		}
+		if ((nRow == -1) || (nCol == -1) || pd.wasCanceled()) {
+			root = NULL;
+			break;
+		}
+
+		// Route with (nRow,nCol) path
+		right = new sStep();
+		right->matrix = step->matrix;
+		for (int k = 0; k < nCities; k++) {
+			if (k != nCol)
+				right->matrix[nRow][k] = INFINITY;
+			if (k != nRow)
+				right->matrix[k][nCol] = INFINITY;
+		}
+		right->price = step->price + align(right->matrix);
+		// Forbid selected route to exclude its reuse in next steps.
+		right->matrix[nCol][nRow] = INFINITY;
+		right->matrix[nRow][nCol] = INFINITY;
+
+		// Route without (nRow,nCol) path
+		left = new sStep();
+		left->matrix = step->matrix;
+		left->matrix[nRow][nCol] = INFINITY;
+ 		left->price = step->price + align(left->matrix);
+
+		step->candidate.nRow = nRow;
+		step->candidate.nCol = nCol;
+		step->plNode = left;
+		step->prNode = right;
+
+		if (right->price <= left->price) {
+			// Route with (nRow,nCol) path is cheaper
+			step = right;
+			route[nRow] = nCol;
+			pd.setValue(route.size());
+		} else {
+			// Route without (nRow,nCol) path is cheaper
+			step = left;
+			qApp->processEvents();
+		}
+	}
+
+	pd.reset();
+	qApp->processEvents();
+
+	if (!root && !pd.wasCanceled()) {
+		QMessageBox(QMessageBox::Warning,trUtf8("Solution Result"),trUtf8("This task has no solution."),QMessageBox::Ok,parent).exec();
+	}
+
+	return root;
+}
Index: /tags/0.1.1.42-alpha1/src/tspsolver.h
===================================================================
--- /tags/0.1.1.42-alpha1/src/tspsolver.h	(revision 44)
+++ /tags/0.1.1.42-alpha1/src/tspsolver.h	(revision 44)
@@ -0,0 +1,66 @@
+/*
+ *  TSPSG: TSP Solver and Generator
+ *  Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
+ *
+ *  $Id$
+ *  $URL$
+ *
+ *  This file is part of TSPSG.
+ *
+ *  TSPSG 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.
+ *
+ *  TSPSG 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 TSPSG.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef TSPSOLVER_H
+#define TSPSOLVER_H
+
+#include "globals.h"
+
+typedef QList<QList<double>> tMatrix;
+
+// This structure represents one step of solving
+// The tree of such elements will represent the solving process
+struct sStep {
+	tMatrix matrix; // Steps's matrix
+	double price; // Price of travel to this step
+	struct {unsigned int nRow; unsigned int nCol;} candidate; // Candiadate for branching in current matrix
+	bool alts; // This matrix has alternative candidates
+	sStep *plNode, *prNode; // Pointers to left and right branch steps
+	sStep() { price = candidate.nRow = candidate.nCol = -1; alts = false; plNode = prNode = NULL; } // Default values
+};
+
+// TSP Solver class
+class CTSPSolver
+{
+	Q_DECLARE_TR_FUNCTIONS(CTSPSolver)
+
+public:
+	CTSPSolver();
+	sStep *solve(int, tMatrix, QWidget *parent = 0);
+
+private:
+	int nCities;
+	sStep *root;
+	QHash<int,int> route;
+	QHash<int,int> forbidden;
+	double align(tMatrix &);
+	void cleanup();
+	bool findCandidate(tMatrix, int &, int &, double &);
+	double findMinInRow(int, tMatrix, int exc = -1);
+	double findMinInCol(int, tMatrix, int exr = -1);
+	bool hasSubCycles(int, int);
+	void subCol(tMatrix &, int, double);
+	void subRow(tMatrix &, int, double);
+};
+
+#endif // TSPSOLVER_H
Index: /tags/0.1.1.42-alpha1/src/version.h
===================================================================
--- /tags/0.1.1.42-alpha1/src/version.h	(revision 44)
+++ /tags/0.1.1.42-alpha1/src/version.h	(revision 44)
@@ -0,0 +1,40 @@
+/*
+ *  TSPSG: TSP Solver and Generator
+ *  Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
+ *
+ *  $Id$
+ *  $URL$
+ *
+ *  This file is part of TSPSG.
+ *
+ *  TSPSG 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.
+ *
+ *  TSPSG 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 TSPSG.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef VERSION_H
+#define VERSION_H
+
+#define BUILD_VERSION_MAJOR 0
+#define BUILD_VERSION_MINOR 1
+#define BUILD_RELEASE 1
+// Will stick this to revision
+#define BUILD_NUMBER 42
+#define BUILD_STATUS "alpha 1"
+
+// "Converting" number to string
+#define QUOTE_X(x) #x
+#define QUOTE(x) QUOTE_X(x)
+
+#define BUILD_VERSION QUOTE(BUILD_VERSION_MAJOR.BUILD_VERSION_MINOR.BUILD_RELEASE)
+
+#endif // VERSION_H
Index: /tags/0.1.1.42-alpha1/tspsg.pri
===================================================================
--- /tags/0.1.1.42-alpha1/tspsg.pri	(revision 44)
+++ /tags/0.1.1.42-alpha1/tspsg.pri	(revision 44)
@@ -0,0 +1,43 @@
+######################################################################
+#
+# TSPSG: TSP Solver and Generator
+# Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
+#
+# $Id$
+# $URL$
+#
+# This file is part of TSPSG.
+#
+######################################################################
+
+#Header files
+HEADERS += src/globals.h \
+	src/version.h \
+	src/os.h \
+	src/mainwindow.h \
+	src/settingsdialog.h \
+	src/tspmodel.h \
+	src/tspsolver.h \
+	src/resource.h
+
+#Source files
+SOURCES += src/main.cpp \
+	src/mainwindow.cpp \
+	src/settingsdialog.cpp \
+	src/tspmodel.cpp \
+	src/tspsolver.cpp
+
+#Forms
+FORMS += ui/mainwindow.ce.ui \
+	ui/mainwindow.ui \
+	ui/settingsdialog.ui \
+	ui/settingsdialog.ce.ui
+
+#Resource file(s)
+RESOURCES += resources/tspsg.qrc
+
+#Translations
+CODECFORTR = UTF-8
+TRANSLATIONS += i18n/en.ts \
+	i18n/ru.ts \
+	i18n/uk.ts
Index: /tags/0.1.1.42-alpha1/tspsg.pro
===================================================================
--- /tags/0.1.1.42-alpha1/tspsg.pro	(revision 44)
+++ /tags/0.1.1.42-alpha1/tspsg.pro	(revision 44)
@@ -0,0 +1,42 @@
+######################################################################
+#
+# TSPSG: TSP Solver and Generator
+# Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
+#
+# $Id$
+# $URL$
+#
+# This file is part of TSPSG.
+#
+######################################################################
+
+TEMPLATE = app
+TARGET = tspsg
+DEPENDPATH += .
+INCLUDEPATH += .
+
+CONFIG(release, debug|release) {
+	OBJECTS_DIR = release
+	DESTDIR = release
+} else {
+	OBJECTS_DIR = debug
+	DESTDIR = debug
+}
+
+# Saving all intermediate files to tmp directory.
+MOC_DIR = ./tmp
+RCC_DIR = ./tmp
+UI_DIR = ./tmp
+
+#Include file(s)
+include(tspsg.pri)
+
+# For wince: we are deploying to storage card because Qt libraries
+# (especially debug) are big enough for internal memory.
+deploy.path = "\Storage Card\tspsg"
+i18n.sources = i18n\languages.ini i18n\*.qm
+i18n.path = "\Storage Card\tspsg\i18n"
+DEPLOYMENT += deploy i18n
+
+#Windows resource file
+win32:RC_FILE = resources/tspsg.rc
Index: /tags/0.1.1.42-alpha1/ui/mainwindow.ce.ui
===================================================================
--- /tags/0.1.1.42-alpha1/ui/mainwindow.ce.ui	(revision 44)
+++ /tags/0.1.1.42-alpha1/ui/mainwindow.ce.ui	(revision 44)
@@ -0,0 +1,589 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="enabled">
+   <bool>true</bool>
+  </property>
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>225</width>
+    <height>322</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Travelling salesman problem[*]</string>
+  </property>
+  <property name="windowIcon">
+   <iconset resource="../resources/tspsg.qrc">
+    <normaloff>:/images/Icon.png</normaloff>:/images/Icon.png</iconset>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <widget class="QTabWidget" name="tabWidget">
+    <property name="enabled">
+     <bool>true</bool>
+    </property>
+    <property name="geometry">
+     <rect>
+      <x>9</x>
+      <y>9</y>
+      <width>207</width>
+      <height>248</height>
+     </rect>
+    </property>
+    <property name="sizePolicy">
+     <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+      <horstretch>0</horstretch>
+      <verstretch>0</verstretch>
+     </sizepolicy>
+    </property>
+    <property name="tabPosition">
+     <enum>QTabWidget::North</enum>
+    </property>
+    <property name="tabShape">
+     <enum>QTabWidget::Rounded</enum>
+    </property>
+    <property name="currentIndex">
+     <number>0</number>
+    </property>
+    <widget class="QWidget" name="tabTask">
+     <attribute name="title">
+      <string>Task</string>
+     </attribute>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <layout class="QHBoxLayout" name="_2">
+        <item>
+         <spacer>
+          <property name="orientation">
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>40</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+        <item>
+         <widget class="QLabel" name="labelVariant">
+          <property name="text">
+           <string>&amp;Variant:</string>
+          </property>
+          <property name="buddy">
+           <cstring>spinVariant</cstring>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QSpinBox" name="spinVariant">
+          <property name="cursor">
+           <cursorShape>PointingHandCursor</cursorShape>
+          </property>
+          <property name="statusTip">
+           <string>Number of variant</string>
+          </property>
+          <property name="minimum">
+           <number>1</number>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLabel" name="labelCities">
+          <property name="text">
+           <string>&amp;Cities:</string>
+          </property>
+          <property name="buddy">
+           <cstring>spinCities</cstring>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QSpinBox" name="spinCities">
+          <property name="cursor">
+           <cursorShape>PointingHandCursor</cursorShape>
+          </property>
+          <property name="statusTip">
+           <string>Number of cities</string>
+          </property>
+          <property name="minimum">
+           <number>3</number>
+          </property>
+          <property name="maximum">
+           <number>5</number>
+          </property>
+          <property name="value">
+           <number>5</number>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <spacer>
+          <property name="orientation">
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>40</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <widget class="QTableView" name="taskView">
+        <property name="statusTip">
+         <string>Cost of travel from city to city</string>
+        </property>
+        <property name="selectionMode">
+         <enum>QAbstractItemView::NoSelection</enum>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <layout class="QHBoxLayout" name="_3">
+        <item>
+         <spacer>
+          <property name="orientation">
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>40</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+        <item>
+         <widget class="QPushButton" name="buttonRandom">
+          <property name="cursor">
+           <cursorShape>PointingHandCursor</cursorShape>
+          </property>
+          <property name="statusTip">
+           <string>Fill table with random numbers</string>
+          </property>
+          <property name="text">
+           <string>Random</string>
+          </property>
+          <property name="icon">
+           <iconset resource="../resources/tspsg.qrc">
+            <normaloff>:/images/icons/roll.png</normaloff>:/images/icons/roll.png</iconset>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="buttonSolve">
+          <property name="cursor">
+           <cursorShape>PointingHandCursor</cursorShape>
+          </property>
+          <property name="statusTip">
+           <string>Solve current task</string>
+          </property>
+          <property name="text">
+           <string>Solve</string>
+          </property>
+          <property name="icon">
+           <iconset resource="../resources/tspsg.qrc">
+            <normaloff>:/images/icons/button_ok.png</normaloff>:/images/icons/button_ok.png</iconset>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+    <widget class="QWidget" name="tabSolution">
+     <attribute name="title">
+      <string>Solution</string>
+     </attribute>
+     <layout class="QVBoxLayout" name="verticalLayout_2">
+      <item>
+       <widget class="QTextEdit" name="solutionText">
+        <property name="enabled">
+         <bool>false</bool>
+        </property>
+        <property name="statusTip">
+         <string>Solution steps</string>
+        </property>
+        <property name="readOnly">
+         <bool>true</bool>
+        </property>
+        <property name="textInteractionFlags">
+         <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </widget>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>225</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuFile">
+    <property name="windowIcon">
+     <iconset>
+      <normaloff/>
+     </iconset>
+    </property>
+    <property name="title">
+     <string>&amp;File</string>
+    </property>
+    <widget class="QMenu" name="menuFileSaveAs">
+     <property name="statusTip">
+      <string/>
+     </property>
+     <property name="title">
+      <string>Save &amp;As...</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../resources/tspsg.qrc">
+       <normaloff>:/images/icons/filesaveas.png</normaloff>:/images/icons/filesaveas.png</iconset>
+     </property>
+     <addaction name="actionFileSaveAsTask"/>
+     <addaction name="actionFileSaveAsSolution"/>
+    </widget>
+    <addaction name="actionFileNew"/>
+    <addaction name="actionFileOpen"/>
+    <addaction name="actionFileSave"/>
+    <addaction name="menuFileSaveAs"/>
+    <addaction name="separator"/>
+    <addaction name="actionFileExit"/>
+   </widget>
+   <widget class="QMenu" name="menuSettings">
+    <property name="title">
+     <string>&amp;Settings</string>
+    </property>
+    <widget class="QMenu" name="menuSettingsLanguage">
+     <property name="toolTip">
+      <string>Select language</string>
+     </property>
+     <property name="statusTip">
+      <string>Select application language</string>
+     </property>
+     <property name="title">
+      <string comment="Please, append &quot; / Language&quot; when translating this string.">&amp;Language</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../resources/tspsg.qrc">
+       <normaloff>:/images/icons/locale.png</normaloff>:/images/icons/locale.png</iconset>
+     </property>
+     <addaction name="actionSettingsLanguageAutodetect"/>
+     <addaction name="separator"/>
+     <addaction name="actionSettingsLanguageEnglish"/>
+    </widget>
+    <addaction name="menuSettingsLanguage"/>
+    <addaction name="separator"/>
+    <addaction name="actionSettingsPreferences"/>
+   </widget>
+   <widget class="QMenu" name="menuHelp">
+    <property name="title">
+     <string>&amp;Help</string>
+    </property>
+    <addaction name="actionHelpContents"/>
+    <addaction name="actionHelpContextual"/>
+    <addaction name="separator"/>
+    <addaction name="actionHelpAboutQt"/>
+    <addaction name="actionHelpAbout"/>
+   </widget>
+   <addaction name="menuFile"/>
+   <addaction name="menuSettings"/>
+   <addaction name="menuHelp"/>
+  </widget>
+  <widget class="QToolBar" name="toolBar">
+   <property name="cursor">
+    <cursorShape>ArrowCursor</cursorShape>
+   </property>
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+   <addaction name="actionFileNew"/>
+   <addaction name="actionFileOpen"/>
+   <addaction name="actionFileSave"/>
+   <addaction name="separator"/>
+   <addaction name="actionSettingsPreferences"/>
+   <addaction name="separator"/>
+   <addaction name="actionFileExit"/>
+  </widget>
+  <action name="actionFileSaveResultMatrices">
+   <property name="enabled">
+    <bool>false</bool>
+   </property>
+   <property name="text">
+    <string>Solution S&amp;teps</string>
+   </property>
+   <property name="toolTip">
+    <string>Save solution steps</string>
+   </property>
+   <property name="statusTip">
+    <string>Save solution steps only</string>
+   </property>
+  </action>
+  <action name="actionFileSaveResultGraph">
+   <property name="enabled">
+    <bool>false</bool>
+   </property>
+   <property name="text">
+    <string>Solution &amp;Graph</string>
+   </property>
+   <property name="toolTip">
+    <string>Save solution graph</string>
+   </property>
+   <property name="statusTip">
+    <string>Save solution graph only</string>
+   </property>
+  </action>
+  <action name="actionFileSaveAsSolution">
+   <property name="enabled">
+    <bool>false</bool>
+   </property>
+   <property name="text">
+    <string>&amp;Solution...</string>
+   </property>
+   <property name="iconText">
+    <string>Solution...</string>
+   </property>
+   <property name="toolTip">
+    <string>Save solution</string>
+   </property>
+   <property name="statusTip">
+    <string>Save solution steps and graph</string>
+   </property>
+  </action>
+  <action name="actionFileNew">
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/filenew.png</normaloff>:/images/icons/filenew.png</iconset>
+   </property>
+   <property name="text">
+    <string>&amp;New</string>
+   </property>
+   <property name="iconText">
+    <string>New</string>
+   </property>
+   <property name="toolTip">
+    <string>New task</string>
+   </property>
+   <property name="statusTip">
+    <string>Create new task</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+N</string>
+   </property>
+  </action>
+  <action name="actionFileOpen">
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/fileopen.png</normaloff>:/images/icons/fileopen.png</iconset>
+   </property>
+   <property name="text">
+    <string>&amp;Open...</string>
+   </property>
+   <property name="iconText">
+    <string>Open...</string>
+   </property>
+   <property name="toolTip">
+    <string>Open task</string>
+   </property>
+   <property name="statusTip">
+    <string>Open saved task</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+O</string>
+   </property>
+  </action>
+  <action name="actionSettingsPreferences">
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/preferences_system.png</normaloff>:/images/icons/preferences_system.png</iconset>
+   </property>
+   <property name="text">
+    <string>&amp;Preferences...</string>
+   </property>
+   <property name="iconText">
+    <string>Preferences...</string>
+   </property>
+   <property name="statusTip">
+    <string>Application preferences</string>
+   </property>
+  </action>
+  <action name="actionHelpContents">
+   <property name="enabled">
+    <bool>false</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/contents.png</normaloff>:/images/icons/contents.png</iconset>
+   </property>
+   <property name="text">
+    <string>&amp;Contents</string>
+   </property>
+   <property name="statusTip">
+    <string>Open help contents</string>
+   </property>
+  </action>
+  <action name="actionHelpContextual">
+   <property name="enabled">
+    <bool>false</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/help_browser.png</normaloff>:/images/icons/help_browser.png</iconset>
+   </property>
+   <property name="text">
+    <string>Context &amp;Help</string>
+   </property>
+   <property name="statusTip">
+    <string>Open context help</string>
+   </property>
+  </action>
+  <action name="actionHelpAbout">
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/help_about.png</normaloff>:/images/icons/help_about.png</iconset>
+   </property>
+   <property name="text">
+    <string>&amp;About...</string>
+   </property>
+   <property name="iconText">
+    <string>About...</string>
+   </property>
+   <property name="statusTip">
+    <string>About application</string>
+   </property>
+  </action>
+  <action name="actionFileExit">
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/exit.png</normaloff>:/images/icons/exit.png</iconset>
+   </property>
+   <property name="text">
+    <string>E&amp;xit</string>
+   </property>
+   <property name="statusTip">
+    <string>Exit application</string>
+   </property>
+  </action>
+  <action name="actionFileSaveAsTask">
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/filesaveas.png</normaloff>:/images/icons/filesaveas.png</iconset>
+   </property>
+   <property name="text">
+    <string>&amp;Task...</string>
+   </property>
+   <property name="iconText">
+    <string>Task...</string>
+   </property>
+   <property name="toolTip">
+    <string>Save task</string>
+   </property>
+   <property name="statusTip">
+    <string>Save task to file</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+S</string>
+   </property>
+  </action>
+  <action name="actionSettingsLanguageAutodetect">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>&amp;Autodetect</string>
+   </property>
+   <property name="toolTip">
+    <string>Detect language automatically</string>
+   </property>
+   <property name="statusTip">
+    <string>Detect language automatically based on regional settings</string>
+   </property>
+  </action>
+  <action name="actionSettingsLanguageEnglish">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>English</string>
+   </property>
+  </action>
+  <action name="actionFileSave">
+   <property name="enabled">
+    <bool>false</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/filesave.png</normaloff>:/images/icons/filesave.png</iconset>
+   </property>
+   <property name="text">
+    <string>&amp;Save</string>
+   </property>
+   <property name="toolTip">
+    <string>Save task</string>
+   </property>
+   <property name="statusTip">
+    <string>Save current task</string>
+   </property>
+  </action>
+  <action name="actionHelpAboutQt">
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/qtlogo-64.png</normaloff>:/images/icons/qtlogo-64.png</iconset>
+   </property>
+   <property name="text">
+    <string>About &amp;Qt...</string>
+   </property>
+   <property name="iconText">
+    <string>About Qt...</string>
+   </property>
+   <property name="toolTip">
+    <string>About Qt</string>
+   </property>
+   <property name="statusTip">
+    <string>About Qt library</string>
+   </property>
+  </action>
+ </widget>
+ <resources>
+  <include location="../resources/tspsg.qrc"/>
+ </resources>
+ <connections>
+  <connection>
+   <sender>actionFileExit</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>251</x>
+     <y>229</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
Index: /tags/0.1.1.42-alpha1/ui/mainwindow.ui
===================================================================
--- /tags/0.1.1.42-alpha1/ui/mainwindow.ui	(revision 44)
+++ /tags/0.1.1.42-alpha1/ui/mainwindow.ui	(revision 44)
@@ -0,0 +1,605 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>491</width>
+    <height>400</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Travelling salesman problem[*]</string>
+  </property>
+  <property name="windowIcon">
+   <iconset resource="../resources/tspsg.qrc">
+    <normaloff>:/images/Icon.png</normaloff>:/images/Icon.png</iconset>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <widget class="QTabWidget" name="tabWidget">
+    <property name="geometry">
+     <rect>
+      <x>0</x>
+      <y>0</y>
+      <width>481</width>
+      <height>311</height>
+     </rect>
+    </property>
+    <property name="sizePolicy">
+     <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+      <horstretch>0</horstretch>
+      <verstretch>0</verstretch>
+     </sizepolicy>
+    </property>
+    <property name="currentIndex">
+     <number>0</number>
+    </property>
+    <widget class="QWidget" name="tabTask">
+     <attribute name="title">
+      <string>Task</string>
+     </attribute>
+     <layout class="QVBoxLayout">
+      <item>
+       <layout class="QHBoxLayout">
+        <item>
+         <spacer>
+          <property name="orientation">
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>40</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+        <item>
+         <widget class="QLabel" name="labelVariant">
+          <property name="text">
+           <string>&amp;Variant:</string>
+          </property>
+          <property name="buddy">
+           <cstring>spinVariant</cstring>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QSpinBox" name="spinVariant">
+          <property name="cursor">
+           <cursorShape>PointingHandCursor</cursorShape>
+          </property>
+          <property name="statusTip">
+           <string>Number of variant</string>
+          </property>
+          <property name="minimum">
+           <number>1</number>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLabel" name="labelCities">
+          <property name="text">
+           <string>&amp;Cities:</string>
+          </property>
+          <property name="buddy">
+           <cstring>spinCities</cstring>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QSpinBox" name="spinCities">
+          <property name="cursor">
+           <cursorShape>PointingHandCursor</cursorShape>
+          </property>
+          <property name="statusTip">
+           <string>Number of cities</string>
+          </property>
+          <property name="minimum">
+           <number>3</number>
+          </property>
+          <property name="maximum">
+           <number>5</number>
+          </property>
+          <property name="value">
+           <number>5</number>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <spacer>
+          <property name="orientation">
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>40</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <widget class="QTableView" name="taskView">
+        <property name="statusTip">
+         <string>Cost of travel from city to city</string>
+        </property>
+        <property name="selectionMode">
+         <enum>QAbstractItemView::NoSelection</enum>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <layout class="QHBoxLayout">
+        <item>
+         <spacer>
+          <property name="orientation">
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>40</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+        <item>
+         <widget class="QPushButton" name="buttonRandom">
+          <property name="cursor">
+           <cursorShape>PointingHandCursor</cursorShape>
+          </property>
+          <property name="statusTip">
+           <string>Fill table with random numbers</string>
+          </property>
+          <property name="text">
+           <string>Random</string>
+          </property>
+          <property name="icon">
+           <iconset resource="../resources/tspsg.qrc">
+            <normaloff>:/images/icons/roll.png</normaloff>:/images/icons/roll.png</iconset>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="buttonSolve">
+          <property name="cursor">
+           <cursorShape>PointingHandCursor</cursorShape>
+          </property>
+          <property name="statusTip">
+           <string>Solve current task</string>
+          </property>
+          <property name="text">
+           <string>Solve</string>
+          </property>
+          <property name="icon">
+           <iconset resource="../resources/tspsg.qrc">
+            <normaloff>:/images/icons/button_ok.png</normaloff>:/images/icons/button_ok.png</iconset>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+    <widget class="QWidget" name="tabSolution">
+     <attribute name="title">
+      <string>Solution</string>
+     </attribute>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <widget class="QTextEdit" name="solutionText">
+        <property name="enabled">
+         <bool>false</bool>
+        </property>
+        <property name="statusTip">
+         <string>Solution steps</string>
+        </property>
+        <property name="readOnly">
+         <bool>true</bool>
+        </property>
+        <property name="textInteractionFlags">
+         <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </widget>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>491</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuFile">
+    <property name="windowIcon">
+     <iconset>
+      <normaloff/>
+     </iconset>
+    </property>
+    <property name="title">
+     <string>&amp;File</string>
+    </property>
+    <widget class="QMenu" name="menuFileSaveAs">
+     <property name="title">
+      <string>Save &amp;As...</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../resources/tspsg.qrc">
+       <normaloff>:/images/icons/filesaveas.png</normaloff>:/images/icons/filesaveas.png</iconset>
+     </property>
+     <addaction name="actionFileSaveAsTask"/>
+     <addaction name="actionFileSaveAsSolution"/>
+    </widget>
+    <addaction name="actionFileNew"/>
+    <addaction name="actionFileOpen"/>
+    <addaction name="actionFileSave"/>
+    <addaction name="menuFileSaveAs"/>
+    <addaction name="separator"/>
+    <addaction name="actionFilePrintSetup"/>
+    <addaction name="actionFilePrint"/>
+    <addaction name="separator"/>
+    <addaction name="actionFileExit"/>
+   </widget>
+   <widget class="QMenu" name="menuSettings">
+    <property name="title">
+     <string>&amp;Settings</string>
+    </property>
+    <widget class="QMenu" name="menuSettingsLanguage">
+     <property name="toolTip">
+      <string>Select language</string>
+     </property>
+     <property name="statusTip">
+      <string>Select application language</string>
+     </property>
+     <property name="title">
+      <string comment="Please, append &quot; / Language&quot; when translating this string.">&amp;Language</string>
+     </property>
+     <property name="icon">
+      <iconset resource="../resources/tspsg.qrc">
+       <normaloff>:/images/icons/locale.png</normaloff>:/images/icons/locale.png</iconset>
+     </property>
+     <addaction name="actionSettingsLanguageAutodetect"/>
+     <addaction name="separator"/>
+     <addaction name="actionSettingsLanguageEnglish"/>
+    </widget>
+    <addaction name="menuSettingsLanguage"/>
+    <addaction name="separator"/>
+    <addaction name="actionSettingsPreferences"/>
+   </widget>
+   <widget class="QMenu" name="menuHelp">
+    <property name="title">
+     <string>&amp;Help</string>
+    </property>
+    <addaction name="actionHelpContents"/>
+    <addaction name="actionHelpContextual"/>
+    <addaction name="separator"/>
+    <addaction name="actionHelpAboutQt"/>
+    <addaction name="actionHelpAbout"/>
+   </widget>
+   <addaction name="menuFile"/>
+   <addaction name="menuSettings"/>
+   <addaction name="menuHelp"/>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+  <widget class="QToolBar" name="toolBar">
+   <property name="cursor">
+    <cursorShape>ArrowCursor</cursorShape>
+   </property>
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+   <addaction name="actionFileNew"/>
+   <addaction name="actionFileOpen"/>
+   <addaction name="actionFileSave"/>
+   <addaction name="separator"/>
+   <addaction name="actionFilePrint"/>
+   <addaction name="actionSettingsPreferences"/>
+   <addaction name="separator"/>
+   <addaction name="actionFileExit"/>
+  </widget>
+  <action name="actionFilePrintSetup">
+   <property name="enabled">
+    <bool>false</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/fileprint.png</normaloff>:/images/icons/fileprint.png</iconset>
+   </property>
+   <property name="text">
+    <string>P&amp;rint Setup...</string>
+   </property>
+   <property name="statusTip">
+    <string>Setup printing</string>
+   </property>
+  </action>
+  <action name="actionFilePrint">
+   <property name="enabled">
+    <bool>false</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/fileprint.png</normaloff>:/images/icons/fileprint.png</iconset>
+   </property>
+   <property name="text">
+    <string>&amp;Print...</string>
+   </property>
+   <property name="statusTip">
+    <string>Print solution results</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+P</string>
+   </property>
+  </action>
+  <action name="actionFileSaveSolutionMatrices">
+   <property name="enabled">
+    <bool>false</bool>
+   </property>
+   <property name="text">
+    <string>Solution S&amp;teps</string>
+   </property>
+   <property name="toolTip">
+    <string>Save solution steps</string>
+   </property>
+   <property name="statusTip">
+    <string>Save solution steps only</string>
+   </property>
+  </action>
+  <action name="actionFileSaveSolutionGraph">
+   <property name="enabled">
+    <bool>false</bool>
+   </property>
+   <property name="text">
+    <string>Solution &amp;Graph</string>
+   </property>
+   <property name="toolTip">
+    <string>Save solution graph</string>
+   </property>
+   <property name="statusTip">
+    <string>Save solution graph only</string>
+   </property>
+  </action>
+  <action name="actionFileSaveAsSolution">
+   <property name="enabled">
+    <bool>false</bool>
+   </property>
+   <property name="text">
+    <string>&amp;Solution...</string>
+   </property>
+   <property name="toolTip">
+    <string>Save solution</string>
+   </property>
+   <property name="statusTip">
+    <string>Save solution steps and graph</string>
+   </property>
+  </action>
+  <action name="actionFileNew">
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/filenew.png</normaloff>:/images/icons/filenew.png</iconset>
+   </property>
+   <property name="text">
+    <string>&amp;New</string>
+   </property>
+   <property name="iconText">
+    <string>New</string>
+   </property>
+   <property name="toolTip">
+    <string>New task</string>
+   </property>
+   <property name="statusTip">
+    <string>Create new task</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+N</string>
+   </property>
+  </action>
+  <action name="actionFileOpen">
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/fileopen.png</normaloff>:/images/icons/fileopen.png</iconset>
+   </property>
+   <property name="text">
+    <string>&amp;Open...</string>
+   </property>
+   <property name="iconText">
+    <string>Open...</string>
+   </property>
+   <property name="toolTip">
+    <string>Open task</string>
+   </property>
+   <property name="statusTip">
+    <string>Open saved task</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+O</string>
+   </property>
+  </action>
+  <action name="actionSettingsPreferences">
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/preferences_system.png</normaloff>:/images/icons/preferences_system.png</iconset>
+   </property>
+   <property name="text">
+    <string>&amp;Preferences...</string>
+   </property>
+   <property name="iconText">
+    <string>Preferences...</string>
+   </property>
+   <property name="statusTip">
+    <string>Application preferences</string>
+   </property>
+  </action>
+  <action name="actionHelpContents">
+   <property name="enabled">
+    <bool>false</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/contents.png</normaloff>:/images/icons/contents.png</iconset>
+   </property>
+   <property name="text">
+    <string>&amp;Contents</string>
+   </property>
+   <property name="statusTip">
+    <string>Open help contents</string>
+   </property>
+  </action>
+  <action name="actionHelpContextual">
+   <property name="enabled">
+    <bool>false</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/help_browser.png</normaloff>:/images/icons/help_browser.png</iconset>
+   </property>
+   <property name="text">
+    <string>Context &amp;Help</string>
+   </property>
+   <property name="statusTip">
+    <string>Open context help</string>
+   </property>
+  </action>
+  <action name="actionHelpAbout">
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/help_about.png</normaloff>:/images/icons/help_about.png</iconset>
+   </property>
+   <property name="text">
+    <string>&amp;About...</string>
+   </property>
+   <property name="iconText">
+    <string>About...</string>
+   </property>
+   <property name="statusTip">
+    <string>About application</string>
+   </property>
+  </action>
+  <action name="actionFileExit">
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/exit.png</normaloff>:/images/icons/exit.png</iconset>
+   </property>
+   <property name="text">
+    <string>E&amp;xit</string>
+   </property>
+   <property name="statusTip">
+    <string>Exit application</string>
+   </property>
+  </action>
+  <action name="actionFileSaveAsTask">
+   <property name="text">
+    <string>&amp;Task...</string>
+   </property>
+   <property name="iconText">
+    <string>Task...</string>
+   </property>
+   <property name="toolTip">
+    <string>Save task</string>
+   </property>
+   <property name="statusTip">
+    <string>Save task to file</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+S</string>
+   </property>
+  </action>
+  <action name="actionSettingsLanguageAutodetect">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>&amp;Autodetect</string>
+   </property>
+   <property name="toolTip">
+    <string>Detect language automatically</string>
+   </property>
+   <property name="statusTip">
+    <string>Detect language automatically based on regional settings</string>
+   </property>
+  </action>
+  <action name="actionSettingsLanguageEnglish">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string notr="true">English</string>
+   </property>
+  </action>
+  <action name="actionFileSave">
+   <property name="enabled">
+    <bool>false</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/filesave.png</normaloff>:/images/icons/filesave.png</iconset>
+   </property>
+   <property name="text">
+    <string>&amp;Save</string>
+   </property>
+   <property name="iconText">
+    <string>Save</string>
+   </property>
+   <property name="toolTip">
+    <string>Save task</string>
+   </property>
+   <property name="statusTip">
+    <string>Save current task</string>
+   </property>
+  </action>
+  <action name="actionHelpAboutQt">
+   <property name="icon">
+    <iconset resource="../resources/tspsg.qrc">
+     <normaloff>:/images/icons/qtlogo-64.png</normaloff>:/images/icons/qtlogo-64.png</iconset>
+   </property>
+   <property name="text">
+    <string>About &amp;Qt...</string>
+   </property>
+   <property name="iconText">
+    <string>About Qt...</string>
+   </property>
+   <property name="statusTip">
+    <string>About Qt library</string>
+   </property>
+  </action>
+ </widget>
+ <resources>
+  <include location="../resources/tspsg.qrc"/>
+ </resources>
+ <connections>
+  <connection>
+   <sender>actionFileExit</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>294</x>
+     <y>229</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
Index: /tags/0.1.1.42-alpha1/ui/settingsdialog.ce.ui
===================================================================
--- /tags/0.1.1.42-alpha1/ui/settingsdialog.ce.ui	(revision 44)
+++ /tags/0.1.1.42-alpha1/ui/settingsdialog.ce.ui	(revision 44)
@@ -0,0 +1,354 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SettingsDialog</class>
+ <widget class="QWidget" name="SettingsDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>205</width>
+    <height>212</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Preferences</string>
+  </property>
+  <property name="windowIcon">
+   <iconset resource="../resources/tspsg.qrc">
+    <normaloff>:/images/icons/preferences_system.png</normaloff>:/images/icons/preferences_system.png</iconset>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_2">
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <item>
+    <widget class="QWidget" name="background" native="true">
+     <property name="palette">
+      <palette>
+       <active>
+        <colorrole role="Base">
+         <brush brushstyle="SolidPattern">
+          <color alpha="255">
+           <red>255</red>
+           <green>255</green>
+           <blue>255</blue>
+          </color>
+         </brush>
+        </colorrole>
+        <colorrole role="Window">
+         <brush brushstyle="SolidPattern">
+          <color alpha="255">
+           <red>255</red>
+           <green>255</green>
+           <blue>255</blue>
+          </color>
+         </brush>
+        </colorrole>
+       </active>
+       <inactive>
+        <colorrole role="Base">
+         <brush brushstyle="SolidPattern">
+          <color alpha="255">
+           <red>255</red>
+           <green>255</green>
+           <blue>255</blue>
+          </color>
+         </brush>
+        </colorrole>
+        <colorrole role="Window">
+         <brush brushstyle="SolidPattern">
+          <color alpha="255">
+           <red>255</red>
+           <green>255</green>
+           <blue>255</blue>
+          </color>
+         </brush>
+        </colorrole>
+       </inactive>
+       <disabled>
+        <colorrole role="Base">
+         <brush brushstyle="SolidPattern">
+          <color alpha="255">
+           <red>255</red>
+           <green>255</green>
+           <blue>255</blue>
+          </color>
+         </brush>
+        </colorrole>
+        <colorrole role="Window">
+         <brush brushstyle="SolidPattern">
+          <color alpha="255">
+           <red>255</red>
+           <green>255</green>
+           <blue>255</blue>
+          </color>
+         </brush>
+        </colorrole>
+       </disabled>
+      </palette>
+     </property>
+     <property name="autoFillBackground">
+      <bool>true</bool>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <widget class="QGroupBox" name="groupRandomSettings">
+        <property name="title">
+         <string>Random values:</string>
+        </property>
+        <layout class="QVBoxLayout" name="_5">
+         <item>
+          <layout class="QHBoxLayout" name="_6">
+           <item>
+            <widget class="QLabel" name="labelRandMin">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="text">
+              <string>&amp;Minimal:</string>
+             </property>
+             <property name="buddy">
+              <cstring>spinRandMin</cstring>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QSpinBox" name="spinRandMin">
+             <property name="cursor">
+              <cursorShape>PointingHandCursor</cursorShape>
+             </property>
+             <property name="statusTip">
+              <string>Minimum for random number generation</string>
+             </property>
+             <property name="maximum">
+              <number>1000</number>
+             </property>
+             <property name="value">
+              <number>1</number>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <layout class="QHBoxLayout" name="_7">
+           <item>
+            <widget class="QLabel" name="labelRandMax">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="text">
+              <string>Ma&amp;ximal:</string>
+             </property>
+             <property name="buddy">
+              <cstring>spinRandMax</cstring>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QSpinBox" name="spinRandMax">
+             <property name="cursor">
+              <cursorShape>PointingHandCursor</cursorShape>
+             </property>
+             <property name="statusTip">
+              <string>Maximum for random number generation</string>
+             </property>
+             <property name="minimum">
+              <number>1</number>
+             </property>
+             <property name="maximum">
+              <number>1000</number>
+             </property>
+             <property name="value">
+              <number>10</number>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QGroupBox" name="groupOutputSettings">
+        <property name="title">
+         <string>Output settings:</string>
+        </property>
+        <layout class="QHBoxLayout" name="horizontalLayout">
+         <item>
+          <widget class="QPushButton" name="buttonFont">
+           <property name="cursor">
+            <cursorShape>PointingHandCursor</cursorShape>
+           </property>
+           <property name="statusTip">
+            <string>Font face for printing</string>
+           </property>
+           <property name="text">
+            <string>&amp;Font...</string>
+           </property>
+           <property name="icon">
+            <iconset resource="../resources/tspsg.qrc">
+             <normaloff>:/images/icons/fonts.png</normaloff>:/images/icons/fonts.png</iconset>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="buttonColor">
+           <property name="cursor">
+            <cursorShape>PointingHandCursor</cursorShape>
+           </property>
+           <property name="statusTip">
+            <string>Font color for printing</string>
+           </property>
+           <property name="text">
+            <string>&amp;Color...</string>
+           </property>
+           <property name="icon">
+            <iconset resource="../resources/tspsg.qrc">
+             <normaloff>:/images/icons/color_line.png</normaloff>:/images/icons/color_line.png</iconset>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <spacer name="verticalSpacer">
+        <property name="orientation">
+         <enum>Qt::Vertical</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>20</width>
+          <height>41</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="Line" name="lineHorizontal">
+     <property name="maximumSize">
+      <size>
+       <width>16777215</width>
+       <height>2</height>
+      </size>
+     </property>
+     <property name="frameShadow">
+      <enum>QFrame::Plain</enum>
+     </property>
+     <property name="lineWidth">
+      <number>2</number>
+     </property>
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout">
+     <property name="spacing">
+      <number>6</number>
+     </property>
+     <property name="sizeConstraint">
+      <enum>QLayout::SetFixedSize</enum>
+     </property>
+     <property name="margin">
+      <number>6</number>
+     </property>
+     <item>
+      <widget class="QToolButton" name="buttonHelp">
+       <property name="enabled">
+        <bool>false</bool>
+       </property>
+       <property name="cursor">
+        <cursorShape>PointingHandCursor</cursorShape>
+       </property>
+       <property name="toolTip">
+        <string>Help</string>
+       </property>
+       <property name="statusTip">
+        <string>Get preferences help</string>
+       </property>
+       <property name="text">
+        <string>Help</string>
+       </property>
+       <property name="icon">
+        <iconset resource="../resources/tspsg.qrc">
+         <normaloff>:/images/icons/help_hint.png</normaloff>:/images/icons/help_hint.png</iconset>
+       </property>
+       <property name="autoRaise">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer_4">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="buttonOK">
+       <property name="cursor">
+        <cursorShape>PointingHandCursor</cursorShape>
+       </property>
+       <property name="statusTip">
+        <string>Save new preferences</string>
+       </property>
+       <property name="text">
+        <string>&amp;OK</string>
+       </property>
+       <property name="icon">
+        <iconset resource="../resources/tspsg.qrc">
+         <normaloff>:/images/icons/button_ok.png</normaloff>:/images/icons/button_ok.png</iconset>
+       </property>
+       <property name="default">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="buttonCancel">
+       <property name="cursor">
+        <cursorShape>PointingHandCursor</cursorShape>
+       </property>
+       <property name="statusTip">
+        <string>Close without saving preferences</string>
+       </property>
+       <property name="text">
+        <string>&amp;Cancel</string>
+       </property>
+       <property name="icon">
+        <iconset resource="../resources/tspsg.qrc">
+         <normaloff>:/images/icons/button_cancel.png</normaloff>:/images/icons/button_cancel.png</iconset>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="../resources/tspsg.qrc"/>
+ </resources>
+ <connections/>
+</ui>
Index: /tags/0.1.1.42-alpha1/ui/settingsdialog.ui
===================================================================
--- /tags/0.1.1.42-alpha1/ui/settingsdialog.ui	(revision 44)
+++ /tags/0.1.1.42-alpha1/ui/settingsdialog.ui	(revision 44)
@@ -0,0 +1,438 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SettingsDialog</class>
+ <widget class="QWidget" name="SettingsDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>415</width>
+    <height>176</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Preferences</string>
+  </property>
+  <property name="windowIcon">
+   <iconset resource="../resources/tspsg.qrc">
+    <normaloff>:/images/icons/preferences_system.png</normaloff>:/images/icons/preferences_system.png</iconset>
+  </property>
+  <layout class="QVBoxLayout">
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <item>
+    <layout class="QHBoxLayout">
+     <property name="spacing">
+      <number>0</number>
+     </property>
+     <item>
+      <widget class="QLabel" name="imageSide">
+       <property name="minimumSize">
+        <size>
+         <width>130</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="styleSheet">
+        <string>background-color: #0080C0</string>
+       </property>
+       <property name="frameShape">
+        <enum>QFrame::StyledPanel</enum>
+       </property>
+       <property name="lineWidth">
+        <number>0</number>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+       <property name="pixmap">
+        <pixmap resource="../resources/tspsg.qrc">:/images/icons/preferences_system.png</pixmap>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignCenter</set>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="Line" name="lineVertical">
+       <property name="frameShadow">
+        <enum>QFrame::Plain</enum>
+       </property>
+       <property name="lineWidth">
+        <number>2</number>
+       </property>
+       <property name="orientation">
+        <enum>Qt::Vertical</enum>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QWidget" name="background" native="true">
+       <property name="palette">
+        <palette>
+         <active>
+          <colorrole role="Base">
+           <brush brushstyle="SolidPattern">
+            <color alpha="255">
+             <red>255</red>
+             <green>255</green>
+             <blue>255</blue>
+            </color>
+           </brush>
+          </colorrole>
+          <colorrole role="Window">
+           <brush brushstyle="SolidPattern">
+            <color alpha="255">
+             <red>255</red>
+             <green>255</green>
+             <blue>255</blue>
+            </color>
+           </brush>
+          </colorrole>
+         </active>
+         <inactive>
+          <colorrole role="Base">
+           <brush brushstyle="SolidPattern">
+            <color alpha="255">
+             <red>255</red>
+             <green>255</green>
+             <blue>255</blue>
+            </color>
+           </brush>
+          </colorrole>
+          <colorrole role="Window">
+           <brush brushstyle="SolidPattern">
+            <color alpha="255">
+             <red>255</red>
+             <green>255</green>
+             <blue>255</blue>
+            </color>
+           </brush>
+          </colorrole>
+         </inactive>
+         <disabled>
+          <colorrole role="Base">
+           <brush brushstyle="SolidPattern">
+            <color alpha="255">
+             <red>255</red>
+             <green>255</green>
+             <blue>255</blue>
+            </color>
+           </brush>
+          </colorrole>
+          <colorrole role="Window">
+           <brush brushstyle="SolidPattern">
+            <color alpha="255">
+             <red>255</red>
+             <green>255</green>
+             <blue>255</blue>
+            </color>
+           </brush>
+          </colorrole>
+         </disabled>
+        </palette>
+       </property>
+       <property name="autoFillBackground">
+        <bool>true</bool>
+       </property>
+       <layout class="QVBoxLayout">
+        <item>
+         <layout class="QHBoxLayout">
+          <property name="spacing">
+           <number>6</number>
+          </property>
+          <item>
+           <widget class="QGroupBox" name="groupRandomSettings">
+            <property name="title">
+             <string>Random values:</string>
+            </property>
+            <layout class="QVBoxLayout">
+             <item>
+              <layout class="QHBoxLayout">
+               <item>
+                <widget class="QLabel" name="labelRandMin">
+                 <property name="sizePolicy">
+                  <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+                   <horstretch>0</horstretch>
+                   <verstretch>0</verstretch>
+                  </sizepolicy>
+                 </property>
+                 <property name="text">
+                  <string>&amp;Minimal:</string>
+                 </property>
+                 <property name="buddy">
+                  <cstring>spinRandMin</cstring>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="QSpinBox" name="spinRandMin">
+                 <property name="cursor">
+                  <cursorShape>PointingHandCursor</cursorShape>
+                 </property>
+                 <property name="statusTip">
+                  <string>Minimum for random number generation</string>
+                 </property>
+                 <property name="maximum">
+                  <number>1000</number>
+                 </property>
+                 <property name="value">
+                  <number>1</number>
+                 </property>
+                </widget>
+               </item>
+              </layout>
+             </item>
+             <item>
+              <layout class="QHBoxLayout">
+               <item>
+                <widget class="QLabel" name="labelRandMax">
+                 <property name="sizePolicy">
+                  <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+                   <horstretch>0</horstretch>
+                   <verstretch>0</verstretch>
+                  </sizepolicy>
+                 </property>
+                 <property name="text">
+                  <string>Ma&amp;ximal:</string>
+                 </property>
+                 <property name="buddy">
+                  <cstring>spinRandMax</cstring>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="QSpinBox" name="spinRandMax">
+                 <property name="cursor">
+                  <cursorShape>PointingHandCursor</cursorShape>
+                 </property>
+                 <property name="statusTip">
+                  <string>Maximum for random number generation</string>
+                 </property>
+                 <property name="minimum">
+                  <number>1</number>
+                 </property>
+                 <property name="maximum">
+                  <number>1000</number>
+                 </property>
+                 <property name="value">
+                  <number>10</number>
+                 </property>
+                </widget>
+               </item>
+              </layout>
+             </item>
+            </layout>
+           </widget>
+          </item>
+          <item>
+           <widget class="QGroupBox" name="groupOutputSettings">
+            <property name="title">
+             <string>Output settings:</string>
+            </property>
+            <layout class="QVBoxLayout" name="verticalLayout">
+             <item>
+              <widget class="QPushButton" name="buttonFont">
+               <property name="cursor">
+                <cursorShape>PointingHandCursor</cursorShape>
+               </property>
+               <property name="statusTip">
+                <string>Font face for printing</string>
+               </property>
+               <property name="text">
+                <string>&amp;Font...</string>
+               </property>
+               <property name="icon">
+                <iconset resource="../resources/tspsg.qrc">
+                 <normaloff>:/images/icons/fonts.png</normaloff>:/images/icons/fonts.png</iconset>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QPushButton" name="buttonColor">
+               <property name="cursor">
+                <cursorShape>PointingHandCursor</cursorShape>
+               </property>
+               <property name="statusTip">
+                <string>Font color for printing</string>
+               </property>
+               <property name="text">
+                <string>&amp;Color...</string>
+               </property>
+               <property name="icon">
+                <iconset resource="../resources/tspsg.qrc">
+                 <normaloff>:/images/icons/color_line.png</normaloff>:/images/icons/color_line.png</iconset>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </widget>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <widget class="QCheckBox" name="cbSaveState">
+          <property name="cursor">
+           <cursorShape>PointingHandCursor</cursorShape>
+          </property>
+          <property name="statusTip">
+           <string>Restore main window state and position on application restart</string>
+          </property>
+          <property name="text">
+           <string>Save main window state and position</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <widget class="Line" name="lineHorizontal">
+     <property name="maximumSize">
+      <size>
+       <width>16777215</width>
+       <height>2</height>
+      </size>
+     </property>
+     <property name="frameShadow">
+      <enum>QFrame::Plain</enum>
+     </property>
+     <property name="lineWidth">
+      <number>2</number>
+     </property>
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout">
+     <property name="spacing">
+      <number>6</number>
+     </property>
+     <property name="margin">
+      <number>6</number>
+     </property>
+     <item>
+      <widget class="QToolButton" name="buttonHelp">
+       <property name="enabled">
+        <bool>false</bool>
+       </property>
+       <property name="cursor">
+        <cursorShape>PointingHandCursor</cursorShape>
+       </property>
+       <property name="toolTip">
+        <string>Help</string>
+       </property>
+       <property name="statusTip">
+        <string>Get preferences help</string>
+       </property>
+       <property name="text">
+        <string>Help</string>
+       </property>
+       <property name="icon">
+        <iconset resource="../resources/tspsg.qrc">
+         <normaloff>:/images/icons/help_hint.png</normaloff>:/images/icons/help_hint.png</iconset>
+       </property>
+       <property name="autoRaise">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLabel" name="labelHint">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="minimumSize">
+        <size>
+         <width>0</width>
+         <height>28</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>16777215</width>
+         <height>28</height>
+        </size>
+       </property>
+       <property name="statusTip">
+        <string>Hover mouse pointer over dialog elements to get additional help</string>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+       <property name="textFormat">
+        <enum>Qt::PlainText</enum>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignJustify|Qt::AlignTop</set>
+       </property>
+       <property name="wordWrap">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="buttonOK">
+       <property name="cursor">
+        <cursorShape>PointingHandCursor</cursorShape>
+       </property>
+       <property name="statusTip">
+        <string>Save new preferences</string>
+       </property>
+       <property name="text">
+        <string>&amp;OK</string>
+       </property>
+       <property name="icon">
+        <iconset resource="../resources/tspsg.qrc">
+         <normaloff>:/images/icons/button_ok.png</normaloff>:/images/icons/button_ok.png</iconset>
+       </property>
+       <property name="default">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="buttonCancel">
+       <property name="cursor">
+        <cursorShape>PointingHandCursor</cursorShape>
+       </property>
+       <property name="statusTip">
+        <string>Close without saving preferences</string>
+       </property>
+       <property name="text">
+        <string>&amp;Cancel</string>
+       </property>
+       <property name="icon">
+        <iconset resource="../resources/tspsg.qrc">
+         <normaloff>:/images/icons/button_cancel.png</normaloff>:/images/icons/button_cancel.png</iconset>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="../resources/tspsg.qrc"/>
+  <include location="../resources/tspsg.qrc"/>
+  <include location="../resources/tspsg.qrc"/>
+  <include location="../resources/tspsg.qrc"/>
+  <include location="../resources/tspsg.qrc"/>
+  <include location="../resources/tspsg.qrc"/>
+  <include location="../resources/tspsg.qrc"/>
+  <include location="../resources/tspsg.qrc"/>
+  <include location="../resources/tspsg.qrc"/>
+ </resources>
+ <connections/>
+</ui>
