OSDN Git Service

add ConfigDialog
authornogu <nogu@3964cfc2-352b-0410-b06c-9ff7d3e98643>
Sun, 16 Sep 2007 12:18:37 +0000 (12:18 +0000)
committernogu <nogu@3964cfc2-352b-0410-b06c-9ff7d3e98643>
Sun, 16 Sep 2007 12:18:37 +0000 (12:18 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/cueplot/trunk@562 3964cfc2-352b-0410-b06c-9ff7d3e98643

186 files changed:
COPYING [new file with mode: 0644]
INSTALL [new file with mode: 0644]
README [new file with mode: 0644]
TODO [new file with mode: 0644]
doc/doxygen/doxygen.conf [new file with mode: 0644]
src/command/Command.cpp [new file with mode: 0644]
src/command/Command.h [new file with mode: 0644]
src/command/CommandOption.cpp [new file with mode: 0644]
src/command/CommandOption.h [new file with mode: 0644]
src/command/Fit.cpp [new file with mode: 0644]
src/command/Fit.h [new file with mode: 0644]
src/command/FitModifier.cpp [new file with mode: 0644]
src/command/FitModifier.h [new file with mode: 0644]
src/command/FitRange.cpp [new file with mode: 0644]
src/command/FitRange.h [new file with mode: 0644]
src/command/Plot.cpp [new file with mode: 0644]
src/command/Plot.h [new file with mode: 0644]
src/command/PlotModifier.cpp [new file with mode: 0644]
src/command/PlotModifier.h [new file with mode: 0644]
src/command/PlotRange.cpp [new file with mode: 0644]
src/command/PlotRange.h [new file with mode: 0644]
src/command/PlotStyle.cpp [new file with mode: 0644]
src/command/PlotStyle.h [new file with mode: 0644]
src/command/PlotTitle.cpp [new file with mode: 0644]
src/command/PlotTitle.h [new file with mode: 0644]
src/command/Splot.cpp [new file with mode: 0644]
src/command/Splot.h [new file with mode: 0644]
src/conv4mac.sh [new file with mode: 0755]
src/cueplot.desktop [new file with mode: 0644]
src/cueplot.pro [new file with mode: 0644]
src/cueplot.qrc [new file with mode: 0644]
src/cueplot.spec [new file with mode: 0644]
src/cueplot_ja_JP.qm [new file with mode: 0644]
src/cueplot_ja_JP.ts [new file with mode: 0644]
src/gui/ConfigDialog.cpp [new file with mode: 0644]
src/gui/ConfigDialog.h [new file with mode: 0644]
src/gui/ConsoleDialog.cpp [new file with mode: 0644]
src/gui/ConsoleDialog.h [new file with mode: 0644]
src/gui/FitDialog.cpp [new file with mode: 0644]
src/gui/FitDialog.h [new file with mode: 0644]
src/gui/MainWindow.cpp [new file with mode: 0644]
src/gui/MainWindow.h [new file with mode: 0644]
src/gui/OptionDialog.cpp [new file with mode: 0644]
src/gui/OptionDialog.h [new file with mode: 0644]
src/gui/PlotOptionDialog.cpp [new file with mode: 0644]
src/gui/PlotOptionDialog.h [new file with mode: 0644]
src/gui/Process.cpp [new file with mode: 0644]
src/gui/Process.h [new file with mode: 0644]
src/gui/RawCommandDialog.cpp [new file with mode: 0644]
src/gui/RawCommandDialog.h [new file with mode: 0644]
src/gui/fit/FitBasicWidget.cpp [new file with mode: 0644]
src/gui/fit/FitBasicWidget.h [new file with mode: 0644]
src/gui/fit/FitModifierWidget.cpp [new file with mode: 0644]
src/gui/fit/FitModifierWidget.h [new file with mode: 0644]
src/gui/fit/FitOthersWidget.cpp [new file with mode: 0644]
src/gui/fit/FitOthersWidget.h [new file with mode: 0644]
src/gui/fit/FitRangeWidget.cpp [new file with mode: 0644]
src/gui/fit/FitRangeWidget.h [new file with mode: 0644]
src/gui/opt/AnglesOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/AnglesOptionWidget.h [new file with mode: 0644]
src/gui/opt/AxisDataOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/AxisDataOptionWidget.h [new file with mode: 0644]
src/gui/opt/AxisLabelOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/AxisLabelOptionWidget.h [new file with mode: 0644]
src/gui/opt/AxisOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/AxisOptionWidget.h [new file with mode: 0644]
src/gui/opt/AxisRangeOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/AxisRangeOptionWidget.h [new file with mode: 0644]
src/gui/opt/AxisTicsOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/AxisTicsOptionWidget.h [new file with mode: 0644]
src/gui/opt/BarOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/BarOptionWidget.h [new file with mode: 0644]
src/gui/opt/BoxWidthOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/BoxWidthOptionWidget.h [new file with mode: 0644]
src/gui/opt/DummyOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/DummyOptionWidget.h [new file with mode: 0644]
src/gui/opt/EncodingOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/EncodingOptionWidget.h [new file with mode: 0644]
src/gui/opt/FormatOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/FormatOptionWidget.h [new file with mode: 0644]
src/gui/opt/GridOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/GridOptionWidget.h [new file with mode: 0644]
src/gui/opt/KeyOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/KeyOptionWidget.h [new file with mode: 0644]
src/gui/opt/LogScaleOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/LogScaleOptionWidget.h [new file with mode: 0644]
src/gui/opt/MAxisTicsOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/MAxisTicsOptionWidget.h [new file with mode: 0644]
src/gui/opt/MappingOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/MappingOptionWidget.h [new file with mode: 0644]
src/gui/opt/OptionWidget.cpp [new file with mode: 0644]
src/gui/opt/OptionWidget.h [new file with mode: 0644]
src/gui/opt/OutputOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/OutputOptionWidget.h [new file with mode: 0644]
src/gui/opt/ParametricOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/ParametricOptionWidget.h [new file with mode: 0644]
src/gui/opt/SamplesOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/SamplesOptionWidget.h [new file with mode: 0644]
src/gui/opt/SizeOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/SizeOptionWidget.h [new file with mode: 0644]
src/gui/opt/TerminalOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/TerminalOptionWidget.h [new file with mode: 0644]
src/gui/opt/TitleOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/TitleOptionWidget.h [new file with mode: 0644]
src/gui/opt/ViewOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/ViewOptionWidget.h [new file with mode: 0644]
src/gui/opt/terminal/TerminalEmtexOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/terminal/TerminalEmtexOptionWidget.h [new file with mode: 0644]
src/gui/opt/terminal/TerminalLatexEmtexOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/terminal/TerminalLatexEmtexOptionWidget.h [new file with mode: 0644]
src/gui/opt/terminal/TerminalLatexOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/terminal/TerminalLatexOptionWidget.h [new file with mode: 0644]
src/gui/opt/terminal/TerminalPbmOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/terminal/TerminalPbmOptionWidget.h [new file with mode: 0644]
src/gui/opt/terminal/TerminalPostScriptOptionWidget.cpp [new file with mode: 0644]
src/gui/opt/terminal/TerminalPostScriptOptionWidget.h [new file with mode: 0644]
src/gui/plot/PlotModifierWidget.cpp [new file with mode: 0644]
src/gui/plot/PlotModifierWidget.h [new file with mode: 0644]
src/gui/plot/PlotOthersWidget.cpp [new file with mode: 0644]
src/gui/plot/PlotOthersWidget.h [new file with mode: 0644]
src/gui/plot/PlotStyleWidget.cpp [new file with mode: 0644]
src/gui/plot/PlotStyleWidget.h [new file with mode: 0644]
src/gui/plot/PlotTitleWidget.cpp [new file with mode: 0644]
src/gui/plot/PlotTitleWidget.h [new file with mode: 0644]
src/images/configure.png [new file with mode: 0644]
src/images/contexthelp.png [new file with mode: 0644]
src/images/exit.png [new file with mode: 0644]
src/images/fileopen.png [new file with mode: 0644]
src/images/filesave.png [new file with mode: 0644]
src/images/filesaveas.png [new file with mode: 0644]
src/images/run.png [new file with mode: 0644]
src/main.cpp [new file with mode: 0644]
src/opt/Angles.cpp [new file with mode: 0644]
src/opt/Angles.h [new file with mode: 0644]
src/opt/AxisData.cpp [new file with mode: 0644]
src/opt/AxisData.h [new file with mode: 0644]
src/opt/AxisLabel.cpp [new file with mode: 0644]
src/opt/AxisLabel.h [new file with mode: 0644]
src/opt/AxisRange.cpp [new file with mode: 0644]
src/opt/AxisRange.h [new file with mode: 0644]
src/opt/AxisTics.cpp [new file with mode: 0644]
src/opt/AxisTics.h [new file with mode: 0644]
src/opt/Bar.cpp [new file with mode: 0644]
src/opt/Bar.h [new file with mode: 0644]
src/opt/BoxWidth.cpp [new file with mode: 0644]
src/opt/BoxWidth.h [new file with mode: 0644]
src/opt/Dummy.cpp [new file with mode: 0644]
src/opt/Dummy.h [new file with mode: 0644]
src/opt/Encoding.cpp [new file with mode: 0644]
src/opt/Encoding.h [new file with mode: 0644]
src/opt/Format.cpp [new file with mode: 0644]
src/opt/Format.h [new file with mode: 0644]
src/opt/Grid.cpp [new file with mode: 0644]
src/opt/Grid.h [new file with mode: 0644]
src/opt/Key.cpp [new file with mode: 0644]
src/opt/Key.h [new file with mode: 0644]
src/opt/LogScale.cpp [new file with mode: 0644]
src/opt/LogScale.h [new file with mode: 0644]
src/opt/MAxisTics.cpp [new file with mode: 0644]
src/opt/MAxisTics.h [new file with mode: 0644]
src/opt/Mapping.cpp [new file with mode: 0644]
src/opt/Mapping.h [new file with mode: 0644]
src/opt/Option.cpp [new file with mode: 0644]
src/opt/Option.h [new file with mode: 0644]
src/opt/Output.cpp [new file with mode: 0644]
src/opt/Output.h [new file with mode: 0644]
src/opt/Parametric.cpp [new file with mode: 0644]
src/opt/Parametric.h [new file with mode: 0644]
src/opt/Samples.cpp [new file with mode: 0644]
src/opt/Samples.h [new file with mode: 0644]
src/opt/Size.cpp [new file with mode: 0644]
src/opt/Size.h [new file with mode: 0644]
src/opt/Terminal.cpp [new file with mode: 0644]
src/opt/Terminal.h [new file with mode: 0644]
src/opt/Title.cpp [new file with mode: 0644]
src/opt/Title.h [new file with mode: 0644]
src/opt/View.cpp [new file with mode: 0644]
src/opt/View.h [new file with mode: 0644]
src/opt/terminal/TerminalLatexEmtex.cpp [new file with mode: 0644]
src/opt/terminal/TerminalLatexEmtex.h [new file with mode: 0644]
src/opt/terminal/TerminalPbm.cpp [new file with mode: 0644]
src/opt/terminal/TerminalPbm.h [new file with mode: 0644]
src/opt/terminal/TerminalPostScript.cpp [new file with mode: 0644]
src/opt/terminal/TerminalPostScript.h [new file with mode: 0644]
src/qt_ja_JP.qm [new file with mode: 0644]
src/qt_ja_JP.ts [new file with mode: 0644]

diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..d511905
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,339 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  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
+this service 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 make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  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.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+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
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the 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 a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE 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.
+
+                    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
+convey 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 2 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, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision 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, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This 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.
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..5363a63
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,71 @@
+コンパイル
+
+ 1. Qt 4.0以上とgnuplot 4.0以上がインストールされていることを確認してください。
+
+ 2. `cd'コマンドでカレントディレクトリをsrcディレクトリに変更してください。
+
+       cd src
+
+ 3. `qmake'コマンドを実行してください。
+
+       qmake
+
+ 4. `make'コマンドでコンパイルしてください。
+
+       make
+
+インストール
+
+ 1. 実行可能ファイルを好きなディレクトリ(フォルダ)内に置いてください。ファイル名は以下の通りです。
+
+       * Linux: cueplot
+       * Mac OS X: Cueplot.app
+       * Windows: cueplot.exe
+
+ 2. Mac OS X版以外のCueplotを日本語で使う人は、cueplot_ja_JP.qmとqt_ja_JP.qmを実行可能ファイルと同じディレクトリ内に置いてください。ただし、Linux を使っていて Qt 4.3 以降をインストールしている場合には、qt_ja_JP.qm は必要ありません。
+
+アンインストール
+
+ 1. 実行可能ファイルを削除してください。インストール時にcueplot_ja_JP.qmとqt_ja_JP.qmを置いた人は、それらのファイルも削除してください。
+
+ 2. 気になる人は設定データを削除してください。データの場所はOSによって異なります。
+
+       * Linux: $HOME/.config/SourceForge/Cueplot.conf
+       * Mac OS X: $HOME/Library/Preferences/jp.sourceforge.cueplot.Cueplot.plist
+       * Windows: HKEY_CURRENT_USER\Software\SourceForge\Cueplot
+
+COMPILATION
+
+ 1.  Make sure Qt 4.0 (or greater) and gnuplot 4.0 (or greater) are installed.
+
+ 2. `cd' to the src directory.
+
+       cd src
+
+ 3. `qmake'.
+
+       qmake
+
+ 4. `make' to compile.
+
+       make
+
+INSTALLATION
+
+ 1. Put a executable file in a directory (folder) where you like. The name of the file is as follows:
+
+       * Linux: cueplot
+       * Mac OS X: Cueplot.app
+       * Windows: cueplot.exe
+
+ 2. Put cueplot_ja_JP.qm and qt_ja_JP.qm in the same directory as the executable file if you want to use non-Mac OS X version of Cueplot in Japanese. But if you are using Linux and Qt 4.3 or greater is installed, qt_ja_JP.qm isn't necessary.
+
+UNINSTALLATION
+
+ 1. Remove the executable file. If you installed cueplot_jp_JP.qm and qt_ja_JP.qm when you installed Cueplot, remove them, too.
+
+ 2. Remove configuration data if you care. The place of the data depends on the OS.
+
+       * Linux: $HOME/.config/SourceForge/Cueplot.conf
+       * Mac OS X: $HOME/Library/Preferences/jp.sourceforge.cueplot.Cueplot.plist 
+       * Windows: HKEY_CURRENT_USER\Software\SourceForge\Cueplot
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..5ac804f
--- /dev/null
+++ b/README
@@ -0,0 +1,15 @@
+CueplotはgnuplotのGUIフロントエンドであり、gnuplotのコマンドを直接入力しなくても容易にグラフを作成できるようにすることを目標として開発されています。
+
+バグを見つけたら、プロジェクトページhttp://sourceforge.jp/projects/cueplot/のバグトラッキングシステムでバグの登録してください。nogu@users.sourceforge.jpにメールを送ってもいいです。
+
+INSTALLというファイルではCueplotのインストール方法とアンインストール方法を記述しています。
+
+Cueplot PukiWiki http://cueplot.sourceforge.jp/wiki/も参照してください。
+
+Cueplot is a GUI front end to gnuplot and the aim is to enable gnuplot users to create graphs easily without inputting commands directly.
+
+If you find bugs, register the bugs using bug tracking system at a project page http://sourceforge.jp/projects/cueplot/. You can also send mails to nogu@users.sourceforge.jp
+
+The file INSTALL describes how to install and uninstall Cueplot.
+
+See also Cueplot PukiWiki http://cueplot.sourceforge.jp/wiki/.
diff --git a/TODO b/TODO
new file mode 100644 (file)
index 0000000..2bb114b
--- /dev/null
+++ b/TODO
@@ -0,0 +1,35 @@
+* gnuplotのプロットファイルをパースできるようにする。
+* メニューを編集できるようにする。
+* undo/redo機能の追加
+* アイコン作成
+* 以下オプションに対応させる
+  * set [axis]zeroaxis
+  * set [lbrt]margin
+  * set arrow
+  * set border
+  * set clip
+  * set cntrparam
+  * set colorbox
+  * set contour
+  * set datafile
+  * set decimalsign
+  * set fit
+  * set fontpath
+  * set hidden3d
+  * set isosamples
+  * set label
+  * set loadpath
+  * set locale
+  * set offsets
+  * set origin
+  * set palette
+  * set pm3d
+  * set pointsize
+  * set polar
+  * set style
+  * set surface
+  * set ticscale
+  * set ticslevel
+  * set timefmt
+  * set timestamp
+  * set zero
diff --git a/doc/doxygen/doxygen.conf b/doc/doxygen/doxygen.conf
new file mode 100644 (file)
index 0000000..a188951
--- /dev/null
@@ -0,0 +1,1257 @@
+# Doxyfile 1.5.2
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file that 
+# follow. The default is UTF-8 which is also the encoding used for all text before 
+# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into 
+# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of 
+# possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = Cueplot
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 0.0.3
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = .
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
+# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, 
+# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, 
+# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, 
+# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE        = Japanese
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = 
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like the Qt-style comments (thus requiring an 
+# explicit @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member 
+# documentation.
+
+DETAILS_AT_TOP         = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
+# sources only. Doxygen will then generate output that is more tailored for Java. 
+# For instance, namespaces will be presented as packages, qualified scopes 
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to 
+# include (a tag file for) the STL sources as input, then you should 
+# set this tag to YES in order to let doxygen match functions declarations and 
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
+# func(std::string) {}). This also make the inheritance and collaboration 
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = NO
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from the 
+# version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the program writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = ../../src/
+
+# This tag can be used to specify the character encoding of the source files that 
+# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default 
+# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. 
+# See http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
+
+FILE_PATTERNS          = 
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = moc_* qrc_*
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
+# (namespaces, classes, functions, etc.) that should be excluded from the output. 
+# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, 
+# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.  Otherwise they will link to the documentstion.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = 
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = 
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc 
+# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to 
+# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to 
+# specify the directory where the mscgen tool resides. If left empty the tool is assumed to 
+# be found in the default search path.
+
+MSCGEN_PATH            = 
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = YES
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
+# generate a call dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable call graphs for selected 
+# functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
+# generate a caller dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable caller graphs for selected 
+# functions only using the \callergraph command.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
+# nodes that will be shown in the graph. If the number of nodes in a graph 
+# becomes larger than this value, doxygen will truncate the graph, which is 
+# visualized by representing a node as a red box. Note that doxygen will always 
+# show the root nodes and its direct children regardless of this setting.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, which results in a white background. 
+# Warning: Depending on the platform used, enabling this option may lead to 
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
+# read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = NO
diff --git a/src/command/Command.cpp b/src/command/Command.cpp
new file mode 100644 (file)
index 0000000..d8e9063
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "Command.h"
+
+Command::Command()
+{
+}
+
+Command::~Command()
+{
+}
diff --git a/src/command/Command.h b/src/command/Command.h
new file mode 100644 (file)
index 0000000..4bed260
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef COMMAND_INCLUDED
+#define COMMAND_INCLUDED
+
+class QString;
+
+//! コマンド
+class Command
+{
+       public:
+               Command();
+               virtual ~Command();
+
+               virtual QString command() const = 0;
+};
+
+#endif // COMMAND_INCLUDED
diff --git a/src/command/CommandOption.cpp b/src/command/CommandOption.cpp
new file mode 100644 (file)
index 0000000..5dbf983
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "CommandOption.h"
+
+CommandOption::CommandOption()
+{
+}
+
+CommandOption::~CommandOption()
+{
+}
diff --git a/src/command/CommandOption.h b/src/command/CommandOption.h
new file mode 100644 (file)
index 0000000..6740773
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef COMMAND_OPTION_INCLUDED
+#define COMMAND_OPTION_INCLUDED
+
+class QString;
+
+//! コマンドのオプション
+class CommandOption
+{
+       public:
+               CommandOption();
+               virtual ~CommandOption();
+
+               virtual QString option() const = 0;
+};
+#endif // COMMAND_OPTION_INCLUDED
diff --git a/src/command/Fit.cpp b/src/command/Fit.cpp
new file mode 100644 (file)
index 0000000..5f0e849
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "Fit.h"
+
+const double Fit::DEFAULT_FIT_LIMIT = 1e-5;
+
+Fit::Fit() : fitLimit_(DEFAULT_FIT_LIMIT), fitMaxIter_(DEFAULT_FIT_MAX_ITER)
+{
+}
+
+void Fit::setRange(const FitRange &range)
+{
+       range_ = range;
+}
+
+const FitRange &Fit::range() const
+{
+       return range_;
+}
+
+void Fit::setFunction(const QString &function)
+{
+       function_ = function;
+}
+
+const QString &Fit::function() const
+{
+       return function_;
+}
+
+void Fit::setDataFile(const QString &file)
+{
+       dataFile_ = file;
+}
+
+const QString &Fit::dataFile() const
+{
+       return dataFile_;
+}
+
+void Fit::setDataFileModifier(const FitModifier &mod)
+{
+       dataFileModifier_ = mod;
+}
+
+const FitModifier &Fit::dataFileModifier() const
+{
+       return dataFileModifier_;
+}
+
+void Fit::setParameterFile(bool isFile)
+{
+       isParameterFile_ = isFile;
+}
+
+bool Fit::isParameterFile() const
+{
+       return isParameterFile_;
+}
+
+void Fit::setParameterFile(const QString &file)
+{
+       parameterFile_ = file;
+}
+
+const QString &Fit::parameterFile() const
+{
+       return parameterFile_;
+}
+
+void Fit::setVariable(const QStringList &var)
+{
+       variable_ = var;
+}
+
+const QStringList &Fit::variable() const
+{
+       return variable_;
+}
+
+void Fit::setFitLimit(double limit)
+{
+       fitLimit_ = limit;
+}
+
+double Fit::fitLimit() const
+{
+       return fitLimit_;
+}
+
+void Fit::setFitMaxIter(int iter)
+{
+       fitMaxIter_ = iter;
+}
+
+int Fit::fitMaxIter() const
+{
+       return fitMaxIter_;
+}
+
+QString Fit::command() const
+{
+       QStringList commandList;
+       if (fitLimit_ != DEFAULT_FIT_LIMIT) {
+               commandList << "FIT_LIMIT = " + QString::number(fitLimit_);
+       }
+       if (fitMaxIter_ != DEFAULT_FIT_MAX_ITER) {
+               commandList << "FIT_MAXITER = " + QString::number(fitMaxIter_);
+       }
+       commandList << "f(x)=" + function_;
+       QString str = "fit " + range_.option() + " f(x) '" + dataFile_ +
+               "' " + dataFileModifier_.option() + " via ";
+       if (isParameterFile_) {
+               str += "'" + parameterFile_ + "'";
+       } else {
+               str += variable_.join(",");
+       }
+       commandList << str;
+       return commandList.join("\n");
+}
diff --git a/src/command/Fit.h b/src/command/Fit.h
new file mode 100644 (file)
index 0000000..c5cc893
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef FIT_INCLUDED
+#define FIT_INCLUDED
+
+#include "Command.h"
+#include "FitRange.h"
+#include "FitModifier.h"
+
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+
+//! fit コマンド
+class Fit : public Command
+{
+       public:
+               Fit();
+
+               void setRange(const FitRange &range);
+               const FitRange &range() const;
+
+               void setFunction(const QString &function);
+               const QString &function() const;
+
+               void setDataFile(const QString &file);
+               const QString &dataFile() const;
+
+               void setDataFileModifier(const FitModifier &mod);
+               const FitModifier &dataFileModifier() const;
+
+               void setParameterFile(bool isFile);
+               bool isParameterFile() const;
+
+               void setParameterFile(const QString &file);
+               const QString &parameterFile() const;
+
+               void setVariable(const QStringList &var);
+               const QStringList &variable() const;
+
+               void setFitLimit(double limit);
+               double fitLimit() const;
+
+               void setFitMaxIter(int iter);
+               int fitMaxIter() const;
+
+               QString command() const;
+
+       private:
+               static const double DEFAULT_FIT_LIMIT;
+               static const int DEFAULT_FIT_MAX_ITER = 0;
+               FitRange range_;
+               QString function_;
+               QString dataFile_;
+               FitModifier dataFileModifier_;
+               bool isParameterFile_;
+               QString parameterFile_;
+               QStringList variable_;
+               double fitLimit_;
+               int fitMaxIter_;
+};
+
+#endif // FIT_INCLUDED
diff --git a/src/command/FitModifier.cpp b/src/command/FitModifier.cpp
new file mode 100644 (file)
index 0000000..bff9fea
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "FitModifier.h"
+
+FitModifier::FitModifier()
+{
+}
+
+void FitModifier::setIndex(int m, int n, int p)
+{
+       plotModifier.setIndex(m, n, p);
+}
+
+int FitModifier::m() const
+{
+       return plotModifier.m();
+}
+
+int FitModifier::n() const
+{
+       return plotModifier.n();
+}
+
+int FitModifier::p() const
+{
+       return plotModifier.p();
+}
+
+void FitModifier::setEvery(int pointIncr, int blockIncr,
+               int startPoint, int startBlock,
+               int endPoint, int endBlock)
+{
+       plotModifier.setEvery(pointIncr, blockIncr,
+                       startPoint, startBlock,
+                       endPoint, endBlock);
+}
+
+int FitModifier::pointIncrement() const
+{
+       return plotModifier.pointIncrement();
+}
+
+int FitModifier::blockIncrement() const
+{
+       return plotModifier.blockIncrement();
+}
+
+int FitModifier::startPoint() const
+{
+       return plotModifier.startPoint();
+}
+
+int FitModifier::startBlock() const
+{
+       return plotModifier.startBlock();
+}
+
+int FitModifier::endPoint() const
+{
+       return plotModifier.endPoint();
+}
+
+int FitModifier::endBlock() const
+{
+       return plotModifier.endBlock();
+}
+
+void FitModifier::setUsing(const QStringList &entry, const QString &format)
+{
+       plotModifier.setUsing(entry, format);
+}
+
+const QStringList &FitModifier::entry() const
+{
+       return plotModifier.entry();
+}
+
+const QString &FitModifier::format() const
+{
+       return plotModifier.format();
+}
+
+QString FitModifier::option() const
+{
+       return plotModifier.option();
+}
diff --git a/src/command/FitModifier.h b/src/command/FitModifier.h
new file mode 100644 (file)
index 0000000..216dcf8
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef FIT_MODIFIER_INCLUDED
+#define FIT_MODIFIER_INCLUDED
+
+#include "CommandOption.h"
+#include "PlotModifier.h"
+
+class QString;
+
+//! fit コマンドのオプション
+class FitModifier : public CommandOption
+{
+       public:
+               FitModifier();
+
+               void setIndex(int m, int n = -1, int p = -1);
+               int m() const;
+               int n() const;
+               int p() const;
+
+               void setEvery(int pointIncr, int blockIncr,
+                               int startPoint, int startBlock,
+                               int endPoint, int endBlock);
+               int pointIncrement() const;
+               int blockIncrement() const;
+               int startPoint() const;
+               int startBlock() const;
+               int endPoint() const;
+               int endBlock() const;
+
+               void setUsing(const QStringList &entry, const QString &format);
+               const QStringList &entry() const;
+               const QString &format() const;
+
+               QString option() const;
+       private:
+               PlotModifier plotModifier;
+};
+#endif // FIT_MODIFIER_INCLUDED
diff --git a/src/command/FitRange.cpp b/src/command/FitRange.cpp
new file mode 100644 (file)
index 0000000..2954ba8
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "FitRange.h"
+
+FitRange::FitRange()
+{
+}
+
+void FitRange::setDummyVariable(int axis, const QString &var)
+{
+       plotRange.setDummyVariable(axis + 1, var);
+}
+
+const QString &FitRange::dummyVariable(int axis) const
+{
+       return plotRange.dummyVariable(axis + 1);
+}
+
+void FitRange::setMinimum(int axis, const QString &min)
+{
+       plotRange.setMinimum(axis + 1, min);
+}
+
+const QString &FitRange::minimum(int axis) const
+{
+       return plotRange.minimum(axis + 1);
+}
+
+void FitRange::setMaximum(int axis, const QString &max)
+{
+       plotRange.setMaximum(axis + 1, max);
+}
+
+const QString &FitRange::maximum(int axis) const
+{
+       return plotRange.maximum(axis + 1);
+}
+
+QString FitRange::option() const
+{
+       return plotRange.option();
+}
diff --git a/src/command/FitRange.h b/src/command/FitRange.h
new file mode 100644 (file)
index 0000000..e57e601
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef FIT_RANGE_INCLUDED
+#define FIT_RANGE_INCLUDED
+
+#include "CommandOption.h"
+#include "PlotRange.h"
+
+class QString;
+
+//! fit コマンドのオプション
+class FitRange : public CommandOption
+{
+       public:
+               FitRange();
+
+               void setDummyVariable(int axis, const QString &var);
+               const QString &dummyVariable(int axis) const;
+
+               void setMinimum(int axis, const QString &min);
+               const QString &minimum(int axis) const;
+
+               void setMaximum(int axis, const QString &max);
+               const QString &maximum(int axis) const;
+
+               QString option() const;
+       private:
+               PlotRange plotRange;
+};
+#endif // FIT_RANGE_INCLUDED
diff --git a/src/command/Plot.cpp b/src/command/Plot.cpp
new file mode 100644 (file)
index 0000000..f0c379b
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "Plot.h"
+
+const QString Plot::AXIS[] = {
+       "x1y1", "x2y2", "x1y2", "x2y1", ""
+};
+
+Plot::Plot() : isFunction_(true), axis_(-1)
+{
+}
+
+void Plot::setRange(const PlotRange &range)
+{
+       range_ = range;
+}
+
+const PlotRange &Plot::range() const
+{
+       return range_;
+}
+
+void Plot::setFunction(bool isFunction)
+{
+       isFunction_ = isFunction;
+}
+
+bool Plot::isFunction() const
+{
+       return isFunction_;
+}
+
+void Plot::setFunction(const QString &name)
+{
+       function_ = name;
+}
+
+const QString &Plot::function() const
+{
+       return function_;
+}
+
+void Plot::setDataFile(const QString &name)
+{
+       dataFile_ = name;
+}
+
+const QString &Plot::dataFile() const
+{
+       return dataFile_;
+}
+
+void Plot::setDataFileModifier(const PlotModifier &mod)
+{
+       dataFileModifier_ = mod;
+}
+
+const PlotModifier &Plot::dataFileModifier() const
+{
+       return dataFileModifier_;
+}
+
+void Plot::setAxis(int axis)
+{
+       axis_ = axis;
+}
+
+int Plot::axis() const
+{
+       return axis_;
+}
+
+void Plot::setTitleSpecification(const PlotTitle &title)
+{
+       titleSpecification_ = title;
+}
+
+const PlotTitle &Plot::titleSpecification() const
+{
+       return titleSpecification_;
+}
+
+void Plot::setStyle(const PlotStyle &style)
+{
+       style_ = style;
+}
+
+const PlotStyle &Plot::style() const
+{
+       return style_;
+}
+
+QString Plot::command() const
+{
+       QString str = range_.option() + " ";
+       if (isFunction_) {
+               str = function_;
+       } else {
+               str = "\"" + dataFile_ + "\" " + dataFileModifier_.option();
+       }
+       str += " ";
+       if (axis_ >= 0) {
+               str += "axes " + AXIS[axis_] + " ";
+       }
+       str += titleSpecification_.option();
+       str += " ";
+       str += style_.option();
+
+       return str.trimmed();
+}
diff --git a/src/command/Plot.h b/src/command/Plot.h
new file mode 100644 (file)
index 0000000..b46ef6d
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef PLOT_INCLUDED
+#define PLOT_INCLUDED
+
+#include "Command.h"
+#include "PlotRange.h"
+#include "PlotModifier.h"
+#include "PlotTitle.h"
+#include "PlotStyle.h"
+
+#include <QtCore/QString>
+
+//! plot コマンド
+class Plot : public Command
+{
+       public:
+               Plot();
+
+               void setRange(const PlotRange &range);
+               const PlotRange &range() const;
+
+               void setFunction(bool isFunction);
+               bool isFunction() const;
+
+               void setFunction(const QString &name);
+               const QString &function() const;
+
+               void setDataFile(const QString &name);
+               const QString &dataFile() const;
+
+               void setDataFileModifier(const PlotModifier &mod);
+               const PlotModifier &dataFileModifier() const;
+
+               void setAxis(int axis);
+               int axis() const;
+
+               void setTitleSpecification(const PlotTitle &title);
+               const PlotTitle &titleSpecification() const;
+
+               void setStyle(const PlotStyle &style);
+               const PlotStyle &style() const;
+
+               QString command() const;
+
+               static const QString AXIS[];
+       private:
+               PlotRange range_;
+               bool isFunction_;
+               QString function_;
+               QString dataFile_;
+               PlotModifier dataFileModifier_;
+               int axis_;
+               PlotTitle titleSpecification_;
+               PlotStyle style_;
+};
+#endif // PLOT_INCLUDED
diff --git a/src/command/PlotModifier.cpp b/src/command/PlotModifier.cpp
new file mode 100644 (file)
index 0000000..740d167
--- /dev/null
@@ -0,0 +1,167 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "PlotModifier.h"
+
+const QString PlotModifier::SMOOTH[] = { "unique", "frequency", "csplines",
+       "acsplines", "bezier", "sbezier", ""
+};
+
+PlotModifier::PlotModifier() : m_(-1), n_(-1), p_(-1), smooth_(-1)
+{
+       for (int i = 0; i < EVERY_NUM; i++) {
+               everyArray[i] = -1;
+       }
+}
+
+void PlotModifier::setIndex(int m, int n, int p)
+{
+       m_ = m;
+       n_ = n;
+       p_ = p;
+}
+
+int PlotModifier::m() const
+{
+       return m_;
+}
+
+int PlotModifier::n() const
+{
+       return n_;
+}
+
+int PlotModifier::p() const
+{
+       return p_;
+}
+
+void PlotModifier::setEvery(int pointIncr, int blockIncr,
+               int startPoint, int startBlock,
+               int endPoint, int endBlock)
+{
+       everyArray[0] = pointIncr;
+       everyArray[1] = blockIncr;
+       everyArray[2] = startPoint;
+       everyArray[3] = startBlock;
+       everyArray[4] = endPoint;
+       everyArray[5] = endBlock;
+}
+
+int PlotModifier::pointIncrement() const
+{
+       return everyArray[0];
+}
+
+int PlotModifier::blockIncrement() const
+{
+       return everyArray[1];
+}
+
+int PlotModifier::startPoint() const
+{
+       return everyArray[2];
+}
+
+int PlotModifier::startBlock() const
+{
+       return everyArray[3];
+}
+
+int PlotModifier::endPoint() const
+{
+       return everyArray[4];
+}
+
+int PlotModifier::endBlock() const
+{
+       return everyArray[5];
+}
+
+void PlotModifier::setUsing(const QStringList &entry, const QString &format)
+{
+       entry_ = entry;
+       format_ = format;
+}
+
+const QStringList &PlotModifier::entry() const
+{
+       return entry_;
+}
+
+const QString &PlotModifier::format() const
+{
+       return format_;
+}
+
+void PlotModifier::setSmooth(int smooth)
+{
+       smooth_ = smooth;
+}
+
+int PlotModifier::smooth() const
+{
+       return smooth_;
+}
+
+QString PlotModifier::option() const
+{
+       QString str;
+       // index
+       if (m_ >= 0) {
+               str += "index " + QString::number(m_);
+               if (n_ >= 0) {
+                       str += ":" + QString::number(n_);
+                       if (p_ > 0) {
+                               str += ":" + QString::number(p_);
+                       }
+               }
+               str += " ";
+       }
+       // every
+       QString everyStr;
+       bool flag = false;
+       for (int i = 0; i < EVERY_NUM; i++) {
+               if (everyArray[i] >= 0) {
+                       everyStr += QString::number(everyArray[i]);
+                       flag = true;
+               }
+               everyStr += ":";
+       }
+       if (flag) {
+               while (everyStr.endsWith(":")) {
+                       everyStr.chop(1);
+               }
+               str += "every " + everyStr + " ";
+       }
+       // using
+       if (entry_.size() || !format_.isEmpty()) {
+               str += "using ";
+               if (entry_.size()) {
+                       str += entry_.join(":");
+               }
+               if (!format_.isEmpty()) {
+                       str += " '" + format_ + "' ";
+               }
+       }
+       // smooth
+       if (smooth_ >= 0) {
+               str += "smooth " + SMOOTH[smooth_];
+       }
+       return str;
+}
diff --git a/src/command/PlotModifier.h b/src/command/PlotModifier.h
new file mode 100644 (file)
index 0000000..f5a1e3b
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef PLOT_MODIFIER_INCLUDED
+#define PLOT_MODIFIER_INCLUDED
+
+#include "CommandOption.h"
+
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+
+//! plot コマンドのオプション
+class PlotModifier : public CommandOption
+{
+       public:
+               PlotModifier();
+
+               void setIndex(int m, int n = -1, int p = -1);
+               int m() const;
+               int n() const;
+               int p() const;
+
+               void setEvery(int pointIncr, int blockIncr,
+                               int startPoint, int startBlock,
+                               int endPoint, int endBlock);
+               int pointIncrement() const;
+               int blockIncrement() const;
+               int startPoint() const;
+               int startBlock() const;
+               int endPoint() const;
+               int endBlock() const;
+
+               void setUsing(const QStringList &entry, const QString &format);
+               const QStringList &entry() const;
+               const QString &format() const;
+
+               void setSmooth(int smooth);
+               int smooth() const;
+
+               QString option() const;
+
+               static const QString SMOOTH[];
+       private:
+               static const int EVERY_NUM = 6;
+               int m_;
+               int n_;
+               int p_;
+               int everyArray[EVERY_NUM];
+               QStringList entry_;
+               QString format_;
+               int smooth_;
+};
+#endif // PLOT_MODIFIER_INCLUDED
diff --git a/src/command/PlotRange.cpp b/src/command/PlotRange.cpp
new file mode 100644 (file)
index 0000000..ed9a5e7
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "PlotRange.h"
+
+PlotRange::PlotRange() : isParametric_(false)
+{
+       for (int i = 0; i < 3; i++) {
+               dummyVarArray[i] = "";
+               minArray[i] = "";
+               maxArray[i] = "";
+       }
+}
+
+void PlotRange::setParametric(bool isParametric)
+{
+       isParametric_ = isParametric;
+}
+
+bool PlotRange::isParametric() const
+{
+       return isParametric_;
+}
+
+void PlotRange::setDummyVariable(int axis, const QString &var)
+{
+       dummyVarArray[axis] = var;
+}
+
+const QString &PlotRange::dummyVariable(int axis) const
+{
+       return dummyVarArray[axis];
+}
+
+void PlotRange::setMinimum(int axis, const QString &min)
+{
+       minArray[axis] = min;
+}
+
+const QString &PlotRange::minimum(int axis) const
+{
+       return minArray[axis];
+}
+
+void PlotRange::setMaximum(int axis, const QString &max)
+{
+       maxArray[axis] = max;
+}
+
+const QString &PlotRange::maximum(int axis) const
+{
+       return maxArray[axis];
+}
+
+QString PlotRange::option() const
+{
+       QString str;
+       int beginNum = !isParametric_;
+       for (int i = beginNum; i < AXIS_NUM; i++) {
+               bool hasDummy = ((i == beginNum) && !dummyVarArray[i].isEmpty());
+               bool hasEnd = (!minArray[i].isEmpty() || !maxArray[i].isEmpty());
+               if (!hasDummy && !hasEnd) {
+                       continue;
+               }
+               str += "[";
+               if (hasDummy) {
+                       str += dummyVarArray[i] + "=";
+               }
+               if (hasEnd) {
+                       str += minArray[i] + ":" + maxArray[i];
+               }
+               str += "]";
+       }
+       return str;
+}
diff --git a/src/command/PlotRange.h b/src/command/PlotRange.h
new file mode 100644 (file)
index 0000000..4907538
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef PLOT_RANGE_INCLUDED
+#define PLOT_RANGE_INCLUDED
+
+#include "CommandOption.h"
+
+#include <QtCore/QString>
+
+//! plot コマンドのオプション
+class PlotRange : public CommandOption
+{
+       public:
+               PlotRange();
+
+               void setParametric(bool isParametric);
+               bool isParametric() const;
+
+               void setDummyVariable(int axis, const QString &var);
+               const QString &dummyVariable(int axis) const;
+
+               void setMinimum(int axis, const QString &min);
+               const QString &minimum(int axis) const;
+
+               void setMaximum(int axis, const QString &max);
+               const QString &maximum(int axis) const;
+
+               QString option() const;
+       private:
+               bool isParametric_;
+               // 0 -> t, 1 -> x, 2 -> y
+               static const int AXIS_NUM = 3;
+               QString dummyVarArray[AXIS_NUM];
+               QString minArray[AXIS_NUM];
+               QString maxArray[AXIS_NUM];
+};
+#endif // PLOT_RANGE_INCLUDED
diff --git a/src/command/PlotStyle.cpp b/src/command/PlotStyle.cpp
new file mode 100644 (file)
index 0000000..b47b3f6
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "PlotStyle.h"
+
+const QString PlotStyle::STYLE[] = { "lines", "points", "linespoints",
+       "impulses", "dots", "steps", "fsteps", "histeps", "errorbars",
+       "xerrorbars", "yerrorbars", "xyerrorbars", "errorlines", 
+       "xerrorlines", "yerrorlines", "boxes", "filledcurves",
+       "boxerrorbars", "boxxyerrorbars", "financebars", "candlesticks",
+       "vectors", ""
+};
+
+PlotStyle::PlotStyle() : style_(-1), lineType_(-1), lineWidth_(-1),
+       pointType_(-1), pointSize_(-1), isPalette_(false)
+{
+}
+
+void PlotStyle::setStyle(int style)
+{
+       style_ = style;
+}
+
+int PlotStyle::style() const
+{
+       return style_;
+}
+
+void PlotStyle::setLineType(int lt)
+{
+       lineType_ = lt;
+}
+
+int PlotStyle::lineType() const
+{
+       return lineType_;
+}
+
+void PlotStyle::setLineWidth(double lw)
+{
+       lineWidth_ = lw;
+}
+
+double PlotStyle::lineWidth() const
+{
+       return lineWidth_;
+}
+
+void PlotStyle::setPointType(int pt)
+{
+       pointType_ = pt;
+}
+
+int PlotStyle::pointType() const
+{
+       return pointType_;
+}
+
+void PlotStyle::setPointSize(double ps)
+{
+       pointSize_ = ps;
+}
+
+double PlotStyle::pointSize() const
+{
+       return pointSize_;
+}
+
+void PlotStyle::setFill(const QString &fs)
+{
+       fill_ = fs;
+}
+
+const QString &PlotStyle::fill() const
+{
+       return fill_;
+}
+
+void PlotStyle::setPalette(bool palette)
+{
+       isPalette_ = palette;
+}
+
+bool PlotStyle::isPalette() const
+{
+       return isPalette_;
+}
+
+QString PlotStyle::option() const
+{
+       if (style_ < 0) {
+               return "";
+       }
+       QString str = "with " + STYLE[style_] + " ";
+       if (lineType_ >= 0) {
+               str += "linetype " + QString::number(lineType_) + " ";
+       }
+       if (lineWidth_ >= 0) {
+               str += "linewidth " + QString::number(lineWidth_) + " ";
+       }
+       if (pointType_ >= 0) {
+               str += "pointtype " + QString::number(pointType_) + " ";
+       }
+       if (pointSize_ >= 0) {
+               str += "pointsize " + QString::number(pointSize_) + " ";
+       }
+       if (!fill_.isEmpty()) {
+               str += "fill " + fill_ + " ";
+       }
+       if (isPalette_) {
+               str += "palette";
+       }
+       return str;
+}
diff --git a/src/command/PlotStyle.h b/src/command/PlotStyle.h
new file mode 100644 (file)
index 0000000..b10e454
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef PLOT_STYLE_INCLUDED
+#define PLOT_STYLE_INCLUDED
+
+#include "CommandOption.h"
+
+#include <QtCore/QString>
+
+//! plot コマンドのオプション
+class PlotStyle : public CommandOption
+{
+       public:
+               PlotStyle();
+
+               void setStyle(int style);
+               int style() const;
+
+               void setLineType(int lt);
+               int lineType() const;
+
+               void setLineWidth(double lw);
+               double lineWidth() const;
+
+               void setPointType(int pt);
+               int pointType() const;
+
+               void setPointSize(double ps);
+               double pointSize() const;
+
+               void setFill(const QString &fs);
+               const QString &fill() const;
+
+               void setPalette(bool palette);
+               bool isPalette() const;
+
+               QString option() const;
+
+               static const QString STYLE[];
+       private:
+               int style_;
+               int lineType_;
+               double lineWidth_;
+               int pointType_;
+               double pointSize_;
+               QString fill_;
+               bool isPalette_;
+};
+
+#endif // PLOT_STYLE_INCLUDED
diff --git a/src/command/PlotTitle.cpp b/src/command/PlotTitle.cpp
new file mode 100644 (file)
index 0000000..ec89ab0
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "PlotTitle.h"
+
+PlotTitle::PlotTitle() : isNoTitle_(false)
+{
+}
+
+void PlotTitle::setTitle(const QString &title)
+{
+       title_ = title;
+}
+
+const QString &PlotTitle::title() const
+{
+       return title_;
+}
+
+void PlotTitle::setNoTitle(bool flag)
+{
+       isNoTitle_ = flag;
+}
+
+bool PlotTitle::isNoTitle() const
+{
+       return isNoTitle_;
+}
+
+QString PlotTitle::option() const
+{
+       QString str;
+       if (isNoTitle_) {
+               return "notitle";
+       }
+       if (title_.isEmpty()) {
+               return "";
+       }
+       return "title \"" + title_ + "\"";
+}
diff --git a/src/command/PlotTitle.h b/src/command/PlotTitle.h
new file mode 100644 (file)
index 0000000..1599b7d
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef PLOT_TITLE_INCLUDED
+#define PLOT_TITLE_INCLUDED
+
+#include "CommandOption.h"
+
+#include <QtCore/QString>
+
+//! plot コマンドのオプション
+class PlotTitle : public CommandOption
+{
+       public:
+               PlotTitle();
+
+               void setTitle(const QString &title);
+               const QString &title() const;
+
+               void setNoTitle(bool flag);
+               bool isNoTitle() const;
+
+               QString option() const;
+       private:
+               QString title_;
+               bool isNoTitle_;
+};
+#endif // PLOT_TITLE_INCLUDED
diff --git a/src/command/Splot.cpp b/src/command/Splot.cpp
new file mode 100644 (file)
index 0000000..25b5b21
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "Splot.h"
+
+Splot::Splot()
+{
+}
+
+Splot::~Splot()
+{
+}
diff --git a/src/command/Splot.h b/src/command/Splot.h
new file mode 100644 (file)
index 0000000..d61d553
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef SPLOT_INCLUDED
+#define SPLOT_INCLUDED
+
+#include "Command.h"
+#include "Plot.h"
+
+//! splot コマンド
+class Splot : public Command
+{
+       public:
+               Splot();
+               virtual ~Splot();
+       private:
+               Plot plot;
+};
+#endif // SPLOT_INCLUDED
diff --git a/src/conv4mac.sh b/src/conv4mac.sh
new file mode 100755 (executable)
index 0000000..81b13a6
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+for file in *.ts
+do
+       sed 's/(&amp;[[:upper:]])//' $file > tmp && mv -f tmp $file
+done
+lrelease *.ts
+mv *.qm Cueplot.app/Contents/MacOS
diff --git a/src/cueplot.desktop b/src/cueplot.desktop
new file mode 100644 (file)
index 0000000..5750581
--- /dev/null
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Version=0.0.3
+Name=Cueplot
+Comment=A GUI front-end to gnuplot
+Comment[ja]=gnuplot の GUI フロントエンド
+TryExec=cueplot
+Exec=cueplot
+Categories=Graphics;2DGraphics;3DGraphics;Qt
diff --git a/src/cueplot.pro b/src/cueplot.pro
new file mode 100644 (file)
index 0000000..afd4dd2
--- /dev/null
@@ -0,0 +1,193 @@
+######################################################################
+# Automatically generated by qmake (2.01a) ? 9 ? 15 15:47:59 2007
+######################################################################
+
+TEMPLATE = app
+TARGET = cueplot
+DEPENDPATH += . \
+              command \
+              gui \
+              opt \
+              gui/fit \
+              gui/opt \
+              gui/plot \
+              opt/terminal \
+              gui/opt/terminal
+INCLUDEPATH += . \
+               gui \
+               command \
+               gui/fit \
+               gui/opt \
+               gui/plot \
+               opt \
+               gui/opt/terminal \
+               opt/terminal
+
+# Input
+HEADERS += command/Command.h \
+           command/CommandOption.h \
+           command/Fit.h \
+           command/FitModifier.h \
+           command/FitRange.h \
+           command/Plot.h \
+           command/PlotModifier.h \
+           command/PlotRange.h \
+           command/PlotStyle.h \
+           command/PlotTitle.h \
+           command/Splot.h \
+           gui/ConfigDialog.h \
+           gui/ConsoleDialog.h \
+           gui/FitDialog.h \
+           gui/MainWindow.h \
+           gui/OptionDialog.h \
+           gui/PlotOptionDialog.h \
+           gui/Process.h \
+           gui/RawCommandDialog.h \
+           opt/Angles.h \
+           opt/AxisData.h \
+           opt/AxisLabel.h \
+           opt/AxisRange.h \
+           opt/AxisTics.h \
+           opt/Bar.h \
+           opt/BoxWidth.h \
+           opt/Dummy.h \
+           opt/Encoding.h \
+           opt/Format.h \
+           opt/Grid.h \
+           opt/Key.h \
+           opt/LogScale.h \
+           opt/Mapping.h \
+           opt/MAxisTics.h \
+           opt/Option.h \
+           opt/Output.h \
+           opt/Parametric.h \
+           opt/Samples.h \
+           opt/Size.h \
+           opt/Terminal.h \
+           opt/Title.h \
+           opt/View.h \
+           gui/fit/FitBasicWidget.h \
+           gui/fit/FitModifierWidget.h \
+           gui/fit/FitOthersWidget.h \
+           gui/fit/FitRangeWidget.h \
+           gui/opt/AnglesOptionWidget.h \
+           gui/opt/AxisDataOptionWidget.h \
+           gui/opt/AxisLabelOptionWidget.h \
+           gui/opt/AxisOptionWidget.h \
+           gui/opt/AxisRangeOptionWidget.h \
+           gui/opt/AxisTicsOptionWidget.h \
+           gui/opt/BarOptionWidget.h \
+           gui/opt/BoxWidthOptionWidget.h \
+           gui/opt/DummyOptionWidget.h \
+           gui/opt/EncodingOptionWidget.h \
+           gui/opt/FormatOptionWidget.h \
+           gui/opt/GridOptionWidget.h \
+           gui/opt/KeyOptionWidget.h \
+           gui/opt/LogScaleOptionWidget.h \
+           gui/opt/MappingOptionWidget.h \
+           gui/opt/MAxisTicsOptionWidget.h \
+           gui/opt/OptionWidget.h \
+           gui/opt/OutputOptionWidget.h \
+           gui/opt/ParametricOptionWidget.h \
+           gui/opt/SamplesOptionWidget.h \
+           gui/opt/SizeOptionWidget.h \
+           gui/opt/TerminalOptionWidget.h \
+           gui/opt/TitleOptionWidget.h \
+           gui/opt/ViewOptionWidget.h \
+           gui/plot/PlotModifierWidget.h \
+           gui/plot/PlotOthersWidget.h \
+           gui/plot/PlotStyleWidget.h \
+           gui/plot/PlotTitleWidget.h \
+           opt/terminal/TerminalLatexEmtex.h \
+           opt/terminal/TerminalPbm.h \
+           opt/terminal/TerminalPostScript.h \
+           gui/opt/terminal/TerminalEmtexOptionWidget.h \
+           gui/opt/terminal/TerminalLatexEmtexOptionWidget.h \
+           gui/opt/terminal/TerminalLatexOptionWidget.h \
+           gui/opt/terminal/TerminalPbmOptionWidget.h \
+           gui/opt/terminal/TerminalPostScriptOptionWidget.h
+SOURCES += main.cpp \
+           command/Command.cpp \
+           command/CommandOption.cpp \
+           command/Fit.cpp \
+           command/FitModifier.cpp \
+           command/FitRange.cpp \
+           command/Plot.cpp \
+           command/PlotModifier.cpp \
+           command/PlotRange.cpp \
+           command/PlotStyle.cpp \
+           command/PlotTitle.cpp \
+           command/Splot.cpp \
+           gui/ConfigDialog.cpp \
+           gui/ConsoleDialog.cpp \
+           gui/FitDialog.cpp \
+           gui/MainWindow.cpp \
+           gui/OptionDialog.cpp \
+           gui/PlotOptionDialog.cpp \
+           gui/Process.cpp \
+           gui/RawCommandDialog.cpp \
+           opt/Angles.cpp \
+           opt/AxisData.cpp \
+           opt/AxisLabel.cpp \
+           opt/AxisRange.cpp \
+           opt/AxisTics.cpp \
+           opt/Bar.cpp \
+           opt/BoxWidth.cpp \
+           opt/Dummy.cpp \
+           opt/Encoding.cpp \
+           opt/Format.cpp \
+           opt/Grid.cpp \
+           opt/Key.cpp \
+           opt/LogScale.cpp \
+           opt/Mapping.cpp \
+           opt/MAxisTics.cpp \
+           opt/Option.cpp \
+           opt/Output.cpp \
+           opt/Parametric.cpp \
+           opt/Samples.cpp \
+           opt/Size.cpp \
+           opt/Terminal.cpp \
+           opt/Title.cpp \
+           opt/View.cpp \
+           gui/fit/FitBasicWidget.cpp \
+           gui/fit/FitModifierWidget.cpp \
+           gui/fit/FitOthersWidget.cpp \
+           gui/fit/FitRangeWidget.cpp \
+           gui/opt/AnglesOptionWidget.cpp \
+           gui/opt/AxisDataOptionWidget.cpp \
+           gui/opt/AxisLabelOptionWidget.cpp \
+           gui/opt/AxisOptionWidget.cpp \
+           gui/opt/AxisRangeOptionWidget.cpp \
+           gui/opt/AxisTicsOptionWidget.cpp \
+           gui/opt/BarOptionWidget.cpp \
+           gui/opt/BoxWidthOptionWidget.cpp \
+           gui/opt/DummyOptionWidget.cpp \
+           gui/opt/EncodingOptionWidget.cpp \
+           gui/opt/FormatOptionWidget.cpp \
+           gui/opt/GridOptionWidget.cpp \
+           gui/opt/KeyOptionWidget.cpp \
+           gui/opt/LogScaleOptionWidget.cpp \
+           gui/opt/MappingOptionWidget.cpp \
+           gui/opt/MAxisTicsOptionWidget.cpp \
+           gui/opt/OptionWidget.cpp \
+           gui/opt/OutputOptionWidget.cpp \
+           gui/opt/ParametricOptionWidget.cpp \
+           gui/opt/SamplesOptionWidget.cpp \
+           gui/opt/SizeOptionWidget.cpp \
+           gui/opt/TerminalOptionWidget.cpp \
+           gui/opt/TitleOptionWidget.cpp \
+           gui/opt/ViewOptionWidget.cpp \
+           gui/plot/PlotModifierWidget.cpp \
+           gui/plot/PlotOthersWidget.cpp \
+           gui/plot/PlotStyleWidget.cpp \
+           gui/plot/PlotTitleWidget.cpp \
+           opt/terminal/TerminalLatexEmtex.cpp \
+           opt/terminal/TerminalPbm.cpp \
+           opt/terminal/TerminalPostScript.cpp \
+           gui/opt/terminal/TerminalEmtexOptionWidget.cpp \
+           gui/opt/terminal/TerminalLatexEmtexOptionWidget.cpp \
+           gui/opt/terminal/TerminalLatexOptionWidget.cpp \
+           gui/opt/terminal/TerminalPbmOptionWidget.cpp \
+           gui/opt/terminal/TerminalPostScriptOptionWidget.cpp
+RESOURCES += cueplot.qrc
+TRANSLATIONS += cueplot_ja_JP.ts qt_ja_JP.ts
diff --git a/src/cueplot.qrc b/src/cueplot.qrc
new file mode 100644 (file)
index 0000000..ee17f81
--- /dev/null
@@ -0,0 +1,11 @@
+<!DOCTYPE RCC><RCC version="1.0">
+       <qresource>
+               <file>images/configure.png</file>
+               <file>images/contexthelp.png</file>
+               <file>images/exit.png</file>
+               <file>images/fileopen.png</file>
+               <file>images/filesave.png</file>
+               <file>images/filesaveas.png</file>
+               <file>images/run.png</file>
+       </qresource>
+</RCC>
diff --git a/src/cueplot.spec b/src/cueplot.spec
new file mode 100644 (file)
index 0000000..f3890e9
--- /dev/null
@@ -0,0 +1,53 @@
+Summary: A GUI front-end to gnuplot
+Summary(ja): gnuplot の GUI フロントエンド
+Name: cueplot
+Version: 0.0.3
+Release: 1
+URL: http://www.sourceforge.jp/projects/cueplot/
+Source: %{name}-%{version}-src.tar.gz
+License: GPL
+Group: Applications/Engineering
+Packager: Muneyuki Noguchi <nogu@users.sourceforge.jp>
+buildroot: %{_tmppath}/%{name}-%{version}-root
+Requires: qt4
+Requires: gnuplot >= 4
+BuildRequires: qt4-devel
+
+%description
+Cueplot is a GUI front-end to gnuplot.
+
+%description -l ja
+Cueplot は gnuplot の GUI フロントエンドです。
+
+%prep
+%setup -q -n %{name}-%{version}-src
+%build
+qmake-qt4
+make
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}/%{_libdir}/%{name}
+install -m 755 %{name} %{buildroot}/%{_libdir}/%{name}/
+lrelease-qt4 %{name}.pro
+install -m 644 *.qm %{buildroot}/%{_libdir}/%{name}/
+mkdir %{buildroot}/%{_bindir}/
+ln -s %{_libdir}/%{name}/%{name} %{buildroot}/%{_bindir}/
+mkdir -p %{buildroot}/%{_datadir}/applications/
+install -m 644 %{name}.desktop %{buildroot}/%{_datadir}/applications/%{name}.desktop
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root)
+%{_bindir}/%{name}
+%{_libdir}/%{name}/
+%{_datadir}/applications/%{name}.desktop
+
+%changelog
+* Sat Jul 21 2007 Muneyuki Noguchi <nogu@users.sourceforge.jp>
+- change Group from Applications/Graphics to Applications/Engineering
+
+* Fri Jul 20 2007 Muneyuki Noguchi <nogu@users.sourceforge.jp>
+- initial RPM build.
diff --git a/src/cueplot_ja_JP.qm b/src/cueplot_ja_JP.qm
new file mode 100644 (file)
index 0000000..65b2e20
Binary files /dev/null and b/src/cueplot_ja_JP.qm differ
diff --git a/src/cueplot_ja_JP.ts b/src/cueplot_ja_JP.ts
new file mode 100644 (file)
index 0000000..8ec1789
--- /dev/null
@@ -0,0 +1,1604 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1" language="ja">
+<context>
+    <name>AnglesOptionWidget</name>
+    <message>
+        <location filename="gui/opt/AnglesOptionWidget.cpp" line="28"/>
+        <source>Angles</source>
+        <translation>角度</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AnglesOptionWidget.cpp" line="40"/>
+        <source>D&amp;egrees</source>
+        <translation>度(&amp;E)</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AnglesOptionWidget.cpp" line="45"/>
+        <source>&amp;Radians</source>
+        <translation>ラジアン(&amp;R)</translation>
+    </message>
+</context>
+<context>
+    <name>AxisDataOptionWidget</name>
+    <message>
+        <location filename="gui/opt/AxisDataOptionWidget.cpp" line="54"/>
+        <source> Axis</source>
+        <translation> 軸</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisDataOptionWidget.cpp" line="45"/>
+        <source>Time/Date</source>
+        <translation>時間/日付</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisDataOptionWidget.cpp" line="29"/>
+        <source>Data</source>
+        <translation>データ</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisDataOptionWidget.cpp" line="30"/>
+        <source>set &lt;i&gt;axis&lt;/i&gt;data</source>
+        <translation>set &lt;i&gt;軸&lt;/i&gt; data</translation>
+    </message>
+</context>
+<context>
+    <name>AxisLabelOptionWidget</name>
+    <message>
+        <location filename="gui/opt/AxisLabelOptionWidget.cpp" line="31"/>
+        <source>Label</source>
+        <translation>ラベル</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisLabelOptionWidget.cpp" line="68"/>
+        <source>T&amp;ext:</source>
+        <translation>テキスト(&amp;E):</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisLabelOptionWidget.cpp" line="77"/>
+        <source>X O&amp;ffset:</source>
+        <translation>X オフセット(&amp;F):</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisLabelOptionWidget.cpp" line="86"/>
+        <source>&amp;Y Offset:</source>
+        <translation>&amp;Y オフセット:</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisLabelOptionWidget.cpp" line="94"/>
+        <source>Fo&amp;nt Name:</source>
+        <translation>フォントの名前(&amp;N):</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisLabelOptionWidget.cpp" line="32"/>
+        <source>set &lt;i&gt;axis&lt;/i&gt;label</source>
+        <translation>set &lt;i&gt;軸&lt;/i&gt; label</translation>
+    </message>
+</context>
+<context>
+    <name>AxisOptionWidget</name>
+    <message>
+        <location filename="gui/opt/AxisOptionWidget.cpp" line="42"/>
+        <source>A&amp;xis:</source>
+        <translation>軸(&amp;X):</translation>
+    </message>
+</context>
+<context>
+    <name>AxisRangeOptionWidget</name>
+    <message>
+        <location filename="gui/opt/AxisRangeOptionWidget.cpp" line="30"/>
+        <source>Range</source>
+        <translation>範囲</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisRangeOptionWidget.cpp" line="31"/>
+        <source>set &lt;i&gt;axis&lt;/i&gt;range</source>
+        <translation>set &lt;i&gt;軸&lt;/i&gt; range</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisRangeOptionWidget.cpp" line="67"/>
+        <source>&amp;Minimum:</source>
+        <translation>最小値(&amp;M):</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisRangeOptionWidget.cpp" line="75"/>
+        <source>Max&amp;imum:</source>
+        <translation>最大値(&amp;I):</translation>
+    </message>
+</context>
+<context>
+    <name>AxisTics</name>
+    <message>
+        <location filename="opt/AxisTics.cpp" line="30"/>
+        <source>border</source>
+        <translation>縁</translation>
+    </message>
+    <message>
+        <location filename="opt/AxisTics.cpp" line="31"/>
+        <source>axis</source>
+        <translation>軸</translation>
+    </message>
+</context>
+<context>
+    <name>AxisTicsOptionWidget</name>
+    <message>
+        <location filename="gui/opt/AxisTicsOptionWidget.cpp" line="33"/>
+        <source>Tics</source>
+        <translation>目盛り</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisTicsOptionWidget.cpp" line="66"/>
+        <source>Ac&amp;tivation</source>
+        <translation>有効化(&amp;T)</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisTicsOptionWidget.cpp" line="79"/>
+        <source>&amp;Mirroring</source>
+        <translation>ミラー(&amp;M)</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisTicsOptionWidget.cpp" line="84"/>
+        <source>&amp;Rotation</source>
+        <translation>回転(&amp;R)</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisTicsOptionWidget.cpp" line="93"/>
+        <source>&amp;Start:</source>
+        <translation>開始(&amp;S):</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisTicsOptionWidget.cpp" line="101"/>
+        <source>&amp;Increment:</source>
+        <translation>増分(&amp;I):</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisTicsOptionWidget.cpp" line="109"/>
+        <source>&amp;End:</source>
+        <translation>終了(&amp;E):</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisTicsOptionWidget.cpp" line="172"/>
+        <source>&amp;Position</source>
+        <translation>位置(&amp;P)</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisTicsOptionWidget.cpp" line="173"/>
+        <source>O&amp;thers</source>
+        <translation>その他(&amp;T)</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisTicsOptionWidget.cpp" line="34"/>
+        <source>set &lt;i&gt;axis&lt;/i&gt;tics</source>
+        <translation>set &lt;i&gt;軸&lt;/i&gt; tics</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisTicsOptionWidget.cpp" line="142"/>
+        <source>Auto</source>
+        <translation>自動</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisTicsOptionWidget.cpp" line="143"/>
+        <source>Start/Increment/End</source>
+        <translation>開始/増分/終了</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/AxisTicsOptionWidget.cpp" line="144"/>
+        <source>Labels/Positions</source>
+        <translation>ラベル/位置</translation>
+    </message>
+</context>
+<context>
+    <name>BarOptionWidget</name>
+    <message>
+        <location filename="gui/opt/BarOptionWidget.cpp" line="42"/>
+        <source>Quantitative</source>
+        <translation>定量的</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/BarOptionWidget.cpp" line="53"/>
+        <source>Qualitative</source>
+        <translation>定性的</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/BarOptionWidget.cpp" line="56"/>
+        <source>small</source>
+        <translation>小</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/BarOptionWidget.cpp" line="57"/>
+        <source>large</source>
+        <translation>大</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/BarOptionWidget.cpp" line="30"/>
+        <source>Bar Size</source>
+        <translation>棒のサイズ</translation>
+    </message>
+</context>
+<context>
+    <name>BoxWidthOptionWidget</name>
+    <message>
+        <location filename="gui/opt/BoxWidthOptionWidget.cpp" line="47"/>
+        <source>&quot;A&amp;bsolute&quot; Value</source>
+        <translation>絶対的な値(&amp;B)</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/BoxWidthOptionWidget.cpp" line="30"/>
+        <source>Box Width</source>
+        <translation>棒の幅</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/BoxWidthOptionWidget.cpp" line="42"/>
+        <source>&amp;Specify</source>
+        <translation>指定する(&amp;S)</translation>
+    </message>
+</context>
+<context>
+    <name>ConfigDialog</name>
+    <message>
+        <location filename="gui/ConfigDialog.cpp" line="56"/>
+        <source>Configure</source>
+        <translation>設定</translation>
+    </message>
+    <message>
+        <location filename="gui/ConfigDialog.cpp" line="69"/>
+        <source>Path:</source>
+        <translation>パス:</translation>
+    </message>
+    <message>
+        <location filename="gui/ConfigDialog.cpp" line="76"/>
+        <source>O&amp;pen...</source>
+        <translation>開く(&amp;P)...</translation>
+    </message>
+    <message>
+        <location filename="gui/ConfigDialog.cpp" line="94"/>
+        <source>Encoding:</source>
+        <translation>エンコーディング:</translation>
+    </message>
+    <message>
+        <location filename="gui/ConfigDialog.cpp" line="104"/>
+        <source>&amp;OK</source>
+        <translation>&amp;OK</translation>
+    </message>
+    <message>
+        <location filename="gui/ConfigDialog.cpp" line="110"/>
+        <source>&amp;Apply</source>
+        <translation>適用(&amp;A)</translation>
+    </message>
+    <message>
+        <location filename="gui/ConfigDialog.cpp" line="114"/>
+        <source>&amp;Cancel</source>
+        <translation>キャンセル(&amp;C)</translation>
+    </message>
+    <message>
+        <location filename="gui/ConfigDialog.cpp" line="206"/>
+        <source>Open gnuplot</source>
+        <translation>gnuplot を開く</translation>
+    </message>
+    <message>
+        <location filename="gui/ConfigDialog.cpp" line="191"/>
+        <source>Restart Required</source>
+        <translation>再起動が必要です</translation>
+    </message>
+    <message>
+        <location filename="gui/ConfigDialog.cpp" line="195"/>
+        <source>You will have to restart %1 for the change to take effect.</source>
+        <translation>変更を反映するには %1 を再起動してください。</translation>
+    </message>
+    <message>
+        <location filename="gui/ConfigDialog.cpp" line="90"/>
+        <source>Path to gnuplot</source>
+        <translation>gnuplot へのパス</translation>
+    </message>
+    <message>
+        <location filename="gui/ConfigDialog.cpp" line="60"/>
+        <source>gnuplot which is in %1</source>
+        <translation>%1 上の gnuplot</translation>
+    </message>
+</context>
+<context>
+    <name>ConsoleDialog</name>
+    <message>
+        <location filename="gui/ConsoleDialog.cpp" line="29"/>
+        <source>Console</source>
+        <translation>コンソール</translation>
+    </message>
+</context>
+<context>
+    <name>DummyOptionWidget</name>
+    <message>
+        <location filename="gui/opt/DummyOptionWidget.cpp" line="53"/>
+        <source>Variable</source>
+        <translation>変数</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/DummyOptionWidget.cpp" line="29"/>
+        <source>Dummy Variable</source>
+        <translation>ダミー変数</translation>
+    </message>
+</context>
+<context>
+    <name>Encoding</name>
+    <message>
+        <location filename="opt/Encoding.cpp" line="22"/>
+        <source>default</source>
+        <translation>標準設定</translation>
+    </message>
+</context>
+<context>
+    <name>EncodingOptionWidget</name>
+    <message>
+        <location filename="gui/opt/EncodingOptionWidget.cpp" line="29"/>
+        <source>Encoding</source>
+        <translation>エンコーディング</translation>
+    </message>
+</context>
+<context>
+    <name>FitBasicWidget</name>
+    <message>
+        <location filename="gui/fit/FitBasicWidget.cpp" line="69"/>
+        <source>&amp;Open...</source>
+        <translation>開く(&amp;O)...</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitBasicWidget.cpp" line="72"/>
+        <source>&amp;Parameter File:</source>
+        <translation>パラメータファイル(&amp;P):</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitBasicWidget.cpp" line="85"/>
+        <source>Op&amp;en...</source>
+        <translation>開く(&amp;E)...</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitBasicWidget.cpp" line="92"/>
+        <source>Co&amp;mma Seperated List:</source>
+        <translation>カンマ区切りリスト(&amp;M):</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitBasicWidget.cpp" line="120"/>
+        <source>Parameters</source>
+        <translation>パラメータ</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitBasicWidget.cpp" line="189"/>
+        <source>Open a data file</source>
+        <translation>データファイルを開く</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitBasicWidget.cpp" line="201"/>
+        <source>Open a parameter file</source>
+        <translation>パラメータファイルを開く</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitBasicWidget.cpp" line="34"/>
+        <source>Basic</source>
+        <translation>基本</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitBasicWidget.cpp" line="46"/>
+        <source>F&amp;unction:</source>
+        <translation>関数(&amp;U):</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitBasicWidget.cpp" line="61"/>
+        <source>&amp;Data File:</source>
+        <translation>データファイル(&amp;D):</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitBasicWidget.cpp" line="37"/>
+        <source>fit &amp;lt;function&amp;gt; &apos;&amp;lt;datafile&amp;gt;&apos;&lt;br&gt;via &apos;&amp;lt;parameter file&amp;gt;&apos;&lt;br&gt;| &amp;lt;var1&amp;gt;{,&amp;lt;var2&amp;gt;,...}</source>
+        <translation>fit &amp;lt;関数&amp;gt; &apos;&amp;lt;データファイル&amp;gt;&apos;&lt;br&gt;via &apos;&amp;lt;パラメータファイル&amp;gt;&apos;&lt;br&gt;| &amp;lt;変数1&amp;gt;{,&amp;lt;変数2&amp;gt;,...}</translation>
+    </message>
+</context>
+<context>
+    <name>FitDialog</name>
+    <message>
+        <location filename="gui/FitDialog.cpp" line="88"/>
+        <source>&amp;Fit</source>
+        <translation>フィット(&amp;F)</translation>
+    </message>
+    <message>
+        <location filename="gui/FitDialog.cpp" line="91"/>
+        <source>&amp;Close</source>
+        <translation>閉じる(&amp;C)</translation>
+    </message>
+    <message>
+        <location filename="gui/FitDialog.cpp" line="55"/>
+        <source>Fittings</source>
+        <translation>フィッティング</translation>
+    </message>
+</context>
+<context>
+    <name>FitModifierWidget</name>
+    <message>
+        <location filename="gui/fit/FitModifierWidget.cpp" line="44"/>
+        <source> Column:</source>
+        <translation> 列:</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitModifierWidget.cpp" line="55"/>
+        <source>Specify a S&amp;tarting Index</source>
+        <translation>開始インデックスを指定する(&amp;T)</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitModifierWidget.cpp" line="64"/>
+        <source>Specify a &amp;Ending Index</source>
+        <translation>終了インデックスを指定する(&amp;E)</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitModifierWidget.cpp" line="73"/>
+        <source>Specify I&amp;ncrement of Index</source>
+        <translation>インデックスの増分を指定する(&amp;N)</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitModifierWidget.cpp" line="82"/>
+        <source>Specify Point Increment</source>
+        <translation>点の増分を指定する</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitModifierWidget.cpp" line="89"/>
+        <source>Specify Line Increment</source>
+        <translation>線の増分を指定する</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitModifierWidget.cpp" line="96"/>
+        <source>Specify a Start Point</source>
+        <translation>開始点を指定する</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitModifierWidget.cpp" line="103"/>
+        <source>Specify a Start Line</source>
+        <translation>開始線を指定する</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitModifierWidget.cpp" line="110"/>
+        <source>Specify a End Point</source>
+        <translation>終了点を指定する</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitModifierWidget.cpp" line="117"/>
+        <source>Specify a End Line</source>
+        <translation>終了線を指定する</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitModifierWidget.cpp" line="181"/>
+        <source>&amp;Sampling</source>
+        <translation>サンプリング(&amp;S)</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitModifierWidget.cpp" line="182"/>
+        <source>C&amp;olumns</source>
+        <translation>列(&amp;O)</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitModifierWidget.cpp" line="33"/>
+        <source>Data File</source>
+        <translation>データファイル</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitModifierWidget.cpp" line="180"/>
+        <source>&amp;Indexes</source>
+        <translation>インデックス(&amp;I)</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitModifierWidget.cpp" line="51"/>
+        <source>Fo&amp;rmat:</source>
+        <translation>フォーマット(&amp;R):</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitModifierWidget.cpp" line="36"/>
+        <source>fit {index &amp;lt;index list&amp;gt;}&lt;br&gt;{every &amp;lt;every list&amp;gt;}&lt;br&gt;{using &amp;lt;using list&amp;gt;}</source>
+        <translation>fit {index &amp;lt;index リスト&amp;gt;}&lt;br&gt;{every &amp;lt;every リスト&amp;gt;}&lt;br&gt;{using &amp;lt;using リスト&amp;gt;}</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitModifierWidget.cpp" line="138"/>
+        <source>fit {index &amp;lt;index list&amp;gt;}</source>
+        <translation>fit {index &amp;lt;index リスト&amp;gt;}</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitModifierWidget.cpp" line="160"/>
+        <source>fit {every &amp;lt;every list&amp;gt;}</source>
+        <translation>fit {every &amp;lt;every リスト&amp;gt;}</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitModifierWidget.cpp" line="176"/>
+        <source>fit {using &amp;lt;using list&amp;gt;}</source>
+        <translation>fit {using &amp;lt;using リスト&amp;gt;}</translation>
+    </message>
+</context>
+<context>
+    <name>FitOthersWidget</name>
+    <message>
+        <location filename="gui/fit/FitOthersWidget.cpp" line="35"/>
+        <source>Fit Limit:</source>
+        <translation>フィット限界:</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitOthersWidget.cpp" line="47"/>
+        <source>Fit Max Iterations:</source>
+        <translation>フィット最大繰り返し:</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitOthersWidget.cpp" line="61"/>
+        <source>Special Variables</source>
+        <translation>特別変数</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitOthersWidget.cpp" line="32"/>
+        <source>Others</source>
+        <translation>その他</translation>
+    </message>
+</context>
+<context>
+    <name>FitRangeWidget</name>
+    <message>
+        <location filename="gui/fit/FitRangeWidget.cpp" line="43"/>
+        <source>Variable Name:</source>
+        <translation>変数名:</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitRangeWidget.cpp" line="48"/>
+        <source>Min:</source>
+        <translation>最小:</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitRangeWidget.cpp" line="53"/>
+        <source>Max:</source>
+        <translation>最大:</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitRangeWidget.cpp" line="67"/>
+        <source> Range</source>
+        <translation> の範囲</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitRangeWidget.cpp" line="30"/>
+        <source>Range</source>
+        <translation>範囲</translation>
+    </message>
+    <message>
+        <location filename="gui/fit/FitRangeWidget.cpp" line="31"/>
+        <source>fit {[xrange] {[yrange]}}</source>
+        <translation>fit {[x の範囲] {[y の範囲]}}</translation>
+    </message>
+</context>
+<context>
+    <name>FormatOptionWidget</name>
+    <message>
+        <location filename="gui/opt/FormatOptionWidget.cpp" line="29"/>
+        <source>Format</source>
+        <translation>フォーマット</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/FormatOptionWidget.cpp" line="53"/>
+        <source> Axis</source>
+        <translation> 軸</translation>
+    </message>
+</context>
+<context>
+    <name>GridOptionWidget</name>
+    <message>
+        <location filename="gui/opt/GridOptionWidget.cpp" line="28"/>
+        <source>Grid</source>
+        <translation>格子</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/GridOptionWidget.cpp" line="44"/>
+        <source> Axis</source>
+        <translation> 軸</translation>
+    </message>
+</context>
+<context>
+    <name>Key</name>
+    <message>
+        <location filename="opt/Key.cpp" line="30"/>
+        <source>left</source>
+        <translation>左</translation>
+    </message>
+    <message>
+        <location filename="opt/Key.cpp" line="31"/>
+        <source>right</source>
+        <translation>右</translation>
+    </message>
+    <message>
+        <location filename="opt/Key.cpp" line="32"/>
+        <source>top</source>
+        <translation>上</translation>
+    </message>
+    <message>
+        <location filename="opt/Key.cpp" line="33"/>
+        <source>bottom</source>
+        <translation>中の下</translation>
+    </message>
+    <message>
+        <location filename="opt/Key.cpp" line="34"/>
+        <source>outside</source>
+        <translation>外側</translation>
+    </message>
+    <message>
+        <location filename="opt/Key.cpp" line="35"/>
+        <source>below</source>
+        <translation>外の下</translation>
+    </message>
+</context>
+<context>
+    <name>KeyOptionWidget</name>
+    <message>
+        <location filename="gui/opt/KeyOptionWidget.cpp" line="120"/>
+        <source>Left Justify</source>
+        <translation>左寄せ</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/KeyOptionWidget.cpp" line="125"/>
+        <source>Reverse</source>
+        <translation>逆</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/KeyOptionWidget.cpp" line="130"/>
+        <source>Auto Titles</source>
+        <translation>自動タイトル</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/KeyOptionWidget.cpp" line="135"/>
+        <source>Enhanced</source>
+        <translation>強化</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/KeyOptionWidget.cpp" line="140"/>
+        <source>Sample Length:</source>
+        <translation>サンプルの長さ:</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/KeyOptionWidget.cpp" line="147"/>
+        <source>Spacing:</source>
+        <translation>スペース:</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/KeyOptionWidget.cpp" line="154"/>
+        <source>Width Increment:</source>
+        <translation>幅の増分:</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/KeyOptionWidget.cpp" line="162"/>
+        <source>Height Increment:</source>
+        <translation>高さの増分:</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/KeyOptionWidget.cpp" line="170"/>
+        <source>Legend Title:</source>
+        <translation>凡例のタイトル:</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/KeyOptionWidget.cpp" line="41"/>
+        <source>Legend</source>
+        <translation>凡例</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/KeyOptionWidget.cpp" line="59"/>
+        <source>Ac&amp;tivation</source>
+        <translation>有効化(&amp;T)</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/KeyOptionWidget.cpp" line="256"/>
+        <source>&amp;Position</source>
+        <translation>位置(&amp;P)</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/KeyOptionWidget.cpp" line="181"/>
+        <source>&amp;Line Type:</source>
+        <translation>線の種類(&amp;L):</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/KeyOptionWidget.cpp" line="189"/>
+        <source>L&amp;ine Width:</source>
+        <translation>線の幅(&amp;I):</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/KeyOptionWidget.cpp" line="208"/>
+        <source>Bo&amp;x</source>
+        <translation>ボックス(&amp;X)</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/KeyOptionWidget.cpp" line="258"/>
+        <source>Ot&amp;hers</source>
+        <translation>その他(&amp;H)</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/KeyOptionWidget.cpp" line="112"/>
+        <source>Corner</source>
+        <translation>角</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/KeyOptionWidget.cpp" line="113"/>
+        <source>Coordinate</source>
+        <translation>座標</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/KeyOptionWidget.cpp" line="257"/>
+        <source>&amp;Box and Title</source>
+        <translation>ボックスとタイトル(&amp;B)</translation>
+    </message>
+</context>
+<context>
+    <name>LogScaleOptionWidget</name>
+    <message>
+        <location filename="gui/opt/LogScaleOptionWidget.cpp" line="29"/>
+        <source>Log Scale</source>
+        <translation>対数スケール</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/LogScaleOptionWidget.cpp" line="46"/>
+        <source> Axis</source>
+        <translation> 軸</translation>
+    </message>
+</context>
+<context>
+    <name>MAxisTicsOptionWidget</name>
+    <message>
+        <location filename="gui/opt/MAxisTicsOptionWidget.cpp" line="30"/>
+        <source>Mini Tics</source>
+        <translation>小目盛り</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/MAxisTicsOptionWidget.cpp" line="63"/>
+        <source>D&amp;efault</source>
+        <translation>標準設定(&amp;E)</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/MAxisTicsOptionWidget.cpp" line="68"/>
+        <source>&amp;Interval</source>
+        <translation>間隔(&amp;I)</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/MAxisTicsOptionWidget.cpp" line="31"/>
+        <source>set m&lt;i&gt;axis&lt;/i&gt;tics</source>
+        <translation>set m&lt;i&gt;軸&lt;/i&gt; tics</translation>
+    </message>
+</context>
+<context>
+    <name>MainWindow</name>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="60"/>
+        <source>File Name</source>
+        <translation>ファイル名</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="49"/>
+        <source>Function</source>
+        <translation>関数</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="78"/>
+        <source>&amp;Add</source>
+        <translation>追加(&amp;A)</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="88"/>
+        <source>O&amp;ption...</source>
+        <translation>オプション(&amp;P)...</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="96"/>
+        <source>&amp;Up</source>
+        <translation>上(&amp;U)</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="102"/>
+        <source>&amp;Down</source>
+        <translation>下(&amp;D)</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="108"/>
+        <source>D&amp;elete</source>
+        <translation>削除(&amp;E)</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="583"/>
+        <source>&amp;Quit</source>
+        <translation>終了(&amp;Q)</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="193"/>
+        <source>&amp;2D Plot</source>
+        <translation>&amp;2D プロット</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="200"/>
+        <source>&amp;3D Plot</source>
+        <translation>&amp;3D プロット</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="246"/>
+        <source>&amp;About</source>
+        <translation>Cueplot について(&amp;A)</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="263"/>
+        <source>&amp;File</source>
+        <translation>ファイル(&amp;F)</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="270"/>
+        <source>&amp;Command</source>
+        <translation>コマンド(&amp;C)</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="285"/>
+        <source>&amp;Help</source>
+        <translation>ヘルプ(&amp;H)</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="253"/>
+        <source>About &amp;Qt</source>
+        <translation>&amp;Qt について</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="159"/>
+        <source>&amp;Open...</source>
+        <translation>開く(&amp;O)...</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="173"/>
+        <source>Save &amp;As...</source>
+        <translation>名前を付けて保存(&amp;A)...</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="207"/>
+        <source>&amp;Raw Commands...</source>
+        <translation>生のコマンド(&amp;R)...</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="212"/>
+        <source>&amp;Fittings...</source>
+        <translation>フィッティング(&amp;F)...</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="217"/>
+        <source>&amp;Settings...</source>
+        <translation>設定(&amp;S)...</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="166"/>
+        <source>&amp;Save</source>
+        <translation>保存(&amp;S)</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="429"/>
+        <source>Save under a file name</source>
+        <translation>名前を付けて保存する</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="441"/>
+        <source>Open a file</source>
+        <translation>ファイルを開く</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="408"/>
+        <source>Open a data file</source>
+        <translation>データファイルを開く</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="544"/>
+        <source>About %1</source>
+        <translation>%1 について</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="194"/>
+        <source>F2</source>
+        <translation>F2</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="201"/>
+        <source>F3</source>
+        <translation>F3</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="160"/>
+        <source>Ctrl+O</source>
+        <translation>Ctrl+O</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="294"/>
+        <source>Tool Bar</source>
+        <translation>ツールバー</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="277"/>
+        <source>&amp;Settings</source>
+        <translation>設定(&amp;S)</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="226"/>
+        <source>&amp;Tool Bar</source>
+        <translation>ツールバー(&amp;T)</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="579"/>
+        <source>Confirmation</source>
+        <translation>確認</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="582"/>
+        <source>Function(s) and/or data exist in the list.
+Are you sure you want to quit?</source>
+        <translation>関数やデータがリスト中にあります。
+本当に終了しますか?</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="583"/>
+        <source>&amp;Cancel</source>
+        <translation>キャンセル(&amp;C)</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="161"/>
+        <source>load &quot;&amp;lt;input-file&amp;gt;&quot;</source>
+        <translation>load &quot;&amp;lt;入力ファイル&amp;gt;&quot;</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="174"/>
+        <source>save &apos;&amp;lt;filename&amp;gt;&apos;</source>
+        <translation>save &apos;&amp;lt;ファイル名&amp;gt;&apos;</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="240"/>
+        <source>What&apos;s &amp;This?</source>
+        <translation>これは何?(&amp;T)</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="241"/>
+        <source>Shift+F1</source>
+        <translation>Shift+F1</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="167"/>
+        <source>Ctrl+S</source>
+        <translation>Ctrl+S</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="180"/>
+        <source>Ctrl+Q</source>
+        <translation>Ctrl+Q</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="559"/>
+        <source>: a GUI front-end to gnuplot&lt;br&gt;Copyright (C) 2007 Muneyuki Noguchi&lt;/p&gt;&lt;p&gt;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 2 of the License, or (at your option) any later version.&lt;/p&gt;&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.&lt;/p&gt;</source>
+        <translation>: gnuplot の GUI フロントエンド&lt;br&gt;Copyright (C) 2007 Muneyuki Noguchi&lt;/p&gt;&lt;p&gt;このプログラムはフリーソフトウェアです。あなたはこれを、フリーソフトウェア財団によって発行された GNU 一般公衆利用許諾契約書(バージョン2か、希望によってはそれ以降のバージョンのうちどれか)の定める条件の下で再頒布または改変することができます。&lt;/p&gt;&lt;p&gt;このプログラムは有用であることを願って頒布されますが、*全くの無保証* です。商業可能性の保証や特定の目的への適合性は、言外に示されたものも含め全く存在しません。詳しくはGNU 一般公衆利用許諾契約書をご覧ください。&lt;/p&gt;&lt;p&gt;あなたはこのプログラムと共に、GNU 一般公衆利用許諾契約書の複製物を一部受け取ったはずです。もし受け取っていなければ、フリーソフトウェア財団まで請求してください(宛先は the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA)。&lt;/p&gt;</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="229"/>
+        <source>C&amp;onsole...</source>
+        <translation>コンソール(&amp;O)...</translation>
+    </message>
+    <message>
+        <location filename="gui/MainWindow.cpp" line="235"/>
+        <source>&amp;Configure %1...</source>
+        <translation>%1 を設定(&amp;C)...</translation>
+    </message>
+</context>
+<context>
+    <name>Mapping</name>
+    <message>
+        <location filename="opt/Mapping.cpp" line="22"/>
+        <source>cartesian</source>
+        <translation>直交</translation>
+    </message>
+    <message>
+        <location filename="opt/Mapping.cpp" line="23"/>
+        <source>spherical</source>
+        <translation>極</translation>
+    </message>
+    <message>
+        <location filename="opt/Mapping.cpp" line="24"/>
+        <source>cylindrical</source>
+        <translation>円筒</translation>
+    </message>
+</context>
+<context>
+    <name>MappingOptionWidget</name>
+    <message>
+        <location filename="gui/opt/MappingOptionWidget.cpp" line="29"/>
+        <source>Coordinate</source>
+        <translation>座標</translation>
+    </message>
+</context>
+<context>
+    <name>OptionDialog</name>
+    <message>
+        <location filename="gui/OptionDialog.cpp" line="130"/>
+        <source>&amp;Default</source>
+        <translation>標準設定(&amp;D)</translation>
+    </message>
+    <message>
+        <location filename="gui/OptionDialog.cpp" line="137"/>
+        <source>&amp;OK</source>
+        <translation>&amp;OK</translation>
+    </message>
+    <message>
+        <location filename="gui/OptionDialog.cpp" line="230"/>
+        <source>&amp;Apply</source>
+        <translation>適用(&amp;A)</translation>
+    </message>
+    <message>
+        <location filename="gui/OptionDialog.cpp" line="230"/>
+        <source>&amp;Cancel</source>
+        <translation>キャンセル(&amp;C)</translation>
+    </message>
+    <message>
+        <location filename="gui/OptionDialog.cpp" line="76"/>
+        <source>Settings</source>
+        <translation>設定</translation>
+    </message>
+    <message>
+        <location filename="gui/OptionDialog.cpp" line="225"/>
+        <source>Unsaved Changes</source>
+        <translation>未保存の変更</translation>
+    </message>
+    <message>
+        <location filename="gui/OptionDialog.cpp" line="229"/>
+        <source>There are unsaved changes in this option.
+Do you want to apply the changes before opening the new option?</source>
+        <translation>このオプションには未保存の変更があります。
+新しいオプションを開く前に変更を適用しますか?</translation>
+    </message>
+    <message>
+        <location filename="gui/OptionDialog.cpp" line="230"/>
+        <source>&amp;Discard</source>
+        <translation>破棄(&amp;D)</translation>
+    </message>
+</context>
+<context>
+    <name>OutputOptionWidget</name>
+    <message>
+        <location filename="gui/opt/OutputOptionWidget.cpp" line="33"/>
+        <source>Output</source>
+        <translation>出力</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/OutputOptionWidget.cpp" line="45"/>
+        <source>&amp;Specify</source>
+        <translation>指定する(&amp;S)</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/OutputOptionWidget.cpp" line="56"/>
+        <source>&amp;Open...</source>
+        <translation>開く(&amp;O)...</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/OutputOptionWidget.cpp" line="102"/>
+        <source>Set output</source>
+        <translation>出力を設定</translation>
+    </message>
+</context>
+<context>
+    <name>ParametricOptionWidget</name>
+    <message>
+        <location filename="gui/opt/ParametricOptionWidget.cpp" line="28"/>
+        <source>Parameter</source>
+        <translation>媒介変数</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/ParametricOptionWidget.cpp" line="40"/>
+        <source>Parametric Functions</source>
+        <translation>媒介変数表示</translation>
+    </message>
+</context>
+<context>
+    <name>PlotModifierWidget</name>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="45"/>
+        <source> Column:</source>
+        <translation> 列:</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="56"/>
+        <source>Specify a S&amp;tarting Index</source>
+        <translation>開始インデックスを指定する(&amp;T)</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="65"/>
+        <source>Specify a &amp;Ending Index</source>
+        <translation>終了インデックスを指定する(&amp;E)</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="74"/>
+        <source>Specify I&amp;ncrement of Index</source>
+        <translation>インデックスの増分を指定する(&amp;N)</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="83"/>
+        <source>Specify Point Increment</source>
+        <translation>点の増分を指定する</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="90"/>
+        <source>Specify Line Increment</source>
+        <translation>線の増分を指定する</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="97"/>
+        <source>Specify a Start Point</source>
+        <translation>開始点を指定する</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="104"/>
+        <source>Specify a Start Line</source>
+        <translation>開始線を指定する</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="111"/>
+        <source>Specify a End Point</source>
+        <translation>終了点を指定する</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="118"/>
+        <source>Specify a End Line</source>
+        <translation>終了線を指定する</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="125"/>
+        <source>Specify</source>
+        <translation>指定する</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="206"/>
+        <source>Co&amp;lumns</source>
+        <translation>列(&amp;L)</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="33"/>
+        <source>Data File</source>
+        <translation>データファイル</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="205"/>
+        <source>&amp;Sampling</source>
+        <translation>サンプリング(&amp;S)</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="204"/>
+        <source>&amp;Indexes</source>
+        <translation>インデックス(&amp;I)</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="207"/>
+        <source>S&amp;moothing</source>
+        <translation>平滑化(&amp;M)</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="52"/>
+        <source>Fo&amp;rmat:</source>
+        <translation>フォーマット(&amp;R):</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="37"/>
+        <source>plot {index &amp;lt;index list&amp;gt;}&lt;br&gt;{every &amp;lt;every list&amp;gt;}&lt;br&gt;{using &amp;lt;using list&amp;gt;}&lt;br&gt;{smooth &amp;lt;option&amp;gt;}</source>
+        <translation>plot {index &amp;lt;index リスト&amp;gt;}&lt;br&gt;{every &amp;lt;every リスト&amp;gt;}&lt;br&gt;{using &amp;lt;using リスト&amp;gt;}&lt;br&gt;{smooth &amp;lt;オプション&amp;gt;}</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="150"/>
+        <source>plot {index &amp;lt;index list&amp;gt;}</source>
+        <translation>plot {index &amp;lt;index リスト&amp;gt;}</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="172"/>
+        <source>plot {every &amp;lt;every list&amp;gt;}</source>
+        <translation>plot {every &amp;lt;every リスト&amp;gt;}</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="188"/>
+        <source>plot {using &amp;lt;using list&amp;gt;}</source>
+        <translation>plot {using &amp;lt;using リスト&amp;gt;}</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotModifierWidget.cpp" line="200"/>
+        <source>plot {smooth &amp;lt;option&amp;gt;}</source>
+        <translation>plot {smooth &amp;lt;オプション&amp;gt;}</translation>
+    </message>
+</context>
+<context>
+    <name>PlotOptionDialog</name>
+    <message>
+        <location filename="gui/PlotOptionDialog.cpp" line="83"/>
+        <source>&amp;Apply</source>
+        <translation>適用(&amp;A)</translation>
+    </message>
+    <message>
+        <location filename="gui/PlotOptionDialog.cpp" line="87"/>
+        <source>&amp;Cancel</source>
+        <translation>キャンセル(&amp;C)</translation>
+    </message>
+    <message>
+        <location filename="gui/PlotOptionDialog.cpp" line="77"/>
+        <source>&amp;OK</source>
+        <translation>&amp;OK</translation>
+    </message>
+    <message>
+        <location filename="gui/PlotOptionDialog.cpp" line="113"/>
+        <source>Options of %1 %2</source>
+        <translation>%1 %2 のオプション</translation>
+    </message>
+    <message>
+        <location filename="gui/PlotOptionDialog.cpp" line="113"/>
+        <source>Function</source>
+        <translation>関数</translation>
+    </message>
+    <message>
+        <location filename="gui/PlotOptionDialog.cpp" line="113"/>
+        <source>Data File</source>
+        <translation>データファイル</translation>
+    </message>
+    <message>
+        <location filename="gui/PlotOptionDialog.cpp" line="65"/>
+        <source>&amp;2D Plot Test</source>
+        <translation>&amp;2D プロットテスト</translation>
+    </message>
+    <message>
+        <location filename="gui/PlotOptionDialog.cpp" line="73"/>
+        <source>&amp;3D Plot Test</source>
+        <translation>&amp;3D プロットテスト</translation>
+    </message>
+</context>
+<context>
+    <name>PlotOthersWidget</name>
+    <message>
+        <location filename="gui/plot/PlotOthersWidget.cpp" line="30"/>
+        <source>Others</source>
+        <translation>その他</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotOthersWidget.cpp" line="41"/>
+        <source>A&amp;xes</source>
+        <translation>軸(&amp;X)</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotOthersWidget.cpp" line="42"/>
+        <source>plot {axes &amp;lt;axes&amp;gt;}</source>
+        <translation>plot {axes &amp;lt;軸&amp;gt;}</translation>
+    </message>
+</context>
+<context>
+    <name>PlotStyleWidget</name>
+    <message>
+        <location filename="gui/plot/PlotStyleWidget.cpp" line="35"/>
+        <source>Specify</source>
+        <translation>指定する</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotStyleWidget.cpp" line="31"/>
+        <source>Style</source>
+        <translation>スタイル</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotStyleWidget.cpp" line="45"/>
+        <source>Specify a Line Type</source>
+        <translation>線の種類を指定する</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotStyleWidget.cpp" line="52"/>
+        <source>Specify Line Width</source>
+        <translation>線の幅を指定する</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotStyleWidget.cpp" line="59"/>
+        <source>Specify a Point Type</source>
+        <translation>点の種類を指定する</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotStyleWidget.cpp" line="66"/>
+        <source>Specify Point Size</source>
+        <translation>点のサイズを指定する</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotStyleWidget.cpp" line="32"/>
+        <source>plot {with &amp;lt;style&amp;gt;}</source>
+        <translation>plot {with &amp;lt;スタイル&amp;gt;}</translation>
+    </message>
+</context>
+<context>
+    <name>PlotTitleWidget</name>
+    <message>
+        <location filename="gui/plot/PlotTitleWidget.cpp" line="33"/>
+        <source>&amp;Default</source>
+        <translation>標準設定(&amp;D)</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotTitleWidget.cpp" line="37"/>
+        <source>&amp;No Title</source>
+        <translation>タイトルなし(&amp;N)</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotTitleWidget.cpp" line="40"/>
+        <source>C&amp;ustom Title</source>
+        <translation>カスタムタイトル(&amp;U)</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotTitleWidget.cpp" line="29"/>
+        <source>Title</source>
+        <translation>タイトル</translation>
+    </message>
+    <message>
+        <location filename="gui/plot/PlotTitleWidget.cpp" line="30"/>
+        <source>plot {&amp;lt;title-spec&amp;gt;}</source>
+        <translation>plot {&amp;lt;タイトル指定&amp;gt;}</translation>
+    </message>
+</context>
+<context>
+    <name>Process</name>
+    <message>
+        <location filename="gui/Process.cpp" line="87"/>
+        <source>Open gnuplot</source>
+        <translation>gnuplot を開く</translation>
+    </message>
+    <message>
+        <location filename="gui/Process.cpp" line="48"/>
+        <source>Gnuplot could not be started</source>
+        <translation>Gnuplot を起動できませんでした</translation>
+    </message>
+</context>
+<context>
+    <name>RawCommandDialog</name>
+    <message>
+        <location filename="gui/RawCommandDialog.cpp" line="48"/>
+        <source>Raw Commands</source>
+        <translation>生のコマンド</translation>
+    </message>
+    <message>
+        <location filename="gui/RawCommandDialog.cpp" line="55"/>
+        <source>&amp;Execute</source>
+        <translation>実行(&amp;E)</translation>
+    </message>
+    <message>
+        <location filename="gui/RawCommandDialog.cpp" line="63"/>
+        <source>&amp;Close</source>
+        <translation>閉じる(&amp;C)</translation>
+    </message>
+</context>
+<context>
+    <name>SamplesOptionWidget</name>
+    <message>
+        <location filename="gui/opt/SamplesOptionWidget.cpp" line="29"/>
+        <source>Sampling</source>
+        <translation>サンプリング</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/SamplesOptionWidget.cpp" line="55"/>
+        <source>Samples</source>
+        <translation>サンプル</translation>
+    </message>
+</context>
+<context>
+    <name>SizeOptionWidget</name>
+    <message>
+        <location filename="gui/opt/SizeOptionWidget.cpp" line="30"/>
+        <source>Size</source>
+        <translation>サイズ</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/SizeOptionWidget.cpp" line="42"/>
+        <source>&amp;Specify Ratio</source>
+        <translation>比率を指定する(&amp;S)</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/SizeOptionWidget.cpp" line="58"/>
+        <source>&amp;Horizontal Size:</source>
+        <translation>水平サイズ(&amp;H):</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/SizeOptionWidget.cpp" line="66"/>
+        <source>&amp;Vertical Size:</source>
+        <translation>垂直サイズ(&amp;V):</translation>
+    </message>
+</context>
+<context>
+    <name>TerminalLatexEmtex</name>
+    <message>
+        <location filename="opt/terminal/TerminalLatexEmtex.cpp" line="23"/>
+        <source>default</source>
+        <translation>標準設定</translation>
+    </message>
+</context>
+<context>
+    <name>TerminalLatexEmtexOptionWidget</name>
+    <message>
+        <location filename="gui/opt/terminal/TerminalLatexEmtexOptionWidget.cpp" line="49"/>
+        <source>&amp;Font:</source>
+        <translation>フォント(&amp;F):</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/terminal/TerminalLatexEmtexOptionWidget.cpp" line="57"/>
+        <source>&amp;Size:</source>
+        <translation>サイズ(&amp;S):</translation>
+    </message>
+</context>
+<context>
+    <name>TerminalOptionWidget</name>
+    <message>
+        <location filename="gui/opt/TerminalOptionWidget.cpp" line="58"/>
+        <source>Terminal</source>
+        <translation>端末</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/TerminalOptionWidget.cpp" line="92"/>
+        <source>&amp;Initialize Terminal Options</source>
+        <translation>端末のオプションを初期化(&amp;I)</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/TerminalOptionWidget.cpp" line="79"/>
+        <source>&amp;Terminal Type:</source>
+        <translation>端末の種類(&amp;T):</translation>
+    </message>
+</context>
+<context>
+    <name>TerminalPbm</name>
+    <message>
+        <location filename="opt/terminal/TerminalPbm.cpp" line="22"/>
+        <source>small</source>
+        <translation>小</translation>
+    </message>
+    <message>
+        <location filename="opt/terminal/TerminalPbm.cpp" line="23"/>
+        <source>medium</source>
+        <translation>中</translation>
+    </message>
+    <message>
+        <location filename="opt/terminal/TerminalPbm.cpp" line="24"/>
+        <source>large</source>
+        <translation>大</translation>
+    </message>
+    <message>
+        <location filename="opt/terminal/TerminalPbm.cpp" line="29"/>
+        <source>monochrome</source>
+        <translation>モノクロ</translation>
+    </message>
+    <message>
+        <location filename="opt/terminal/TerminalPbm.cpp" line="30"/>
+        <source>gray</source>
+        <translation>グレー</translation>
+    </message>
+    <message>
+        <location filename="opt/terminal/TerminalPbm.cpp" line="31"/>
+        <source>color</source>
+        <translation>カラー</translation>
+    </message>
+</context>
+<context>
+    <name>TerminalPbmOptionWidget</name>
+    <message>
+        <location filename="gui/opt/terminal/TerminalPbmOptionWidget.cpp" line="48"/>
+        <source>&amp;Font Size:</source>
+        <translation>フォントのサイズ(&amp;F):</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/terminal/TerminalPbmOptionWidget.cpp" line="60"/>
+        <source>Co&amp;lormode:</source>
+        <translation>色モード(&amp;L):</translation>
+    </message>
+</context>
+<context>
+    <name>TerminalPostScript</name>
+    <message>
+        <location filename="opt/terminal/TerminalPostScript.cpp" line="22"/>
+        <source>landscape</source>
+        <translation>横方向</translation>
+    </message>
+    <message>
+        <location filename="opt/terminal/TerminalPostScript.cpp" line="23"/>
+        <source>portrait</source>
+        <translation>縦方向</translation>
+    </message>
+    <message>
+        <location filename="opt/terminal/TerminalPostScript.cpp" line="29"/>
+        <source>color</source>
+        <translation>カラー</translation>
+    </message>
+    <message>
+        <location filename="opt/terminal/TerminalPostScript.cpp" line="30"/>
+        <source>monochrome</source>
+        <translation>モノクロ</translation>
+    </message>
+    <message>
+        <location filename="opt/terminal/TerminalPostScript.cpp" line="35"/>
+        <source>solid</source>
+        <translation>実線</translation>
+    </message>
+    <message>
+        <location filename="opt/terminal/TerminalPostScript.cpp" line="36"/>
+        <source>dashed</source>
+        <translation>破線</translation>
+    </message>
+</context>
+<context>
+    <name>TerminalPostScriptOptionWidget</name>
+    <message>
+        <location filename="gui/opt/terminal/TerminalPostScriptOptionWidget.cpp" line="51"/>
+        <source>&amp;Mode:</source>
+        <translation>モード(&amp;M):</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/terminal/TerminalPostScriptOptionWidget.cpp" line="63"/>
+        <source>Co&amp;lor:</source>
+        <translation>色(&amp;L):</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/terminal/TerminalPostScriptOptionWidget.cpp" line="75"/>
+        <source>Da&amp;shed:</source>
+        <translation>破線(&amp;S):</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/terminal/TerminalPostScriptOptionWidget.cpp" line="83"/>
+        <source>&amp;Font Name:</source>
+        <translation>フォントの名前(&amp;F):</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/terminal/TerminalPostScriptOptionWidget.cpp" line="91"/>
+        <source>Fo&amp;nt Size:</source>
+        <translation>フォントのサイズ(&amp;N):</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/terminal/TerminalPostScriptOptionWidget.cpp" line="95"/>
+        <source>&amp;Enhanced</source>
+        <translation>強化(&amp;E)</translation>
+    </message>
+</context>
+<context>
+    <name>TitleOptionWidget</name>
+    <message>
+        <location filename="gui/opt/TitleOptionWidget.cpp" line="30"/>
+        <source>Title</source>
+        <translation>タイトル</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/TitleOptionWidget.cpp" line="46"/>
+        <source>T&amp;ext:</source>
+        <translation>テキスト(&amp;E):</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/TitleOptionWidget.cpp" line="55"/>
+        <source>&amp;X Offset:</source>
+        <translation>&amp;X オフセット:</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/TitleOptionWidget.cpp" line="64"/>
+        <source>&amp;Y Offset:</source>
+        <translation>&amp;Y オフセット:</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/TitleOptionWidget.cpp" line="72"/>
+        <source>&amp;Font Name:</source>
+        <translation>フォントの名前(&amp;F):</translation>
+    </message>
+</context>
+<context>
+    <name>ViewOptionWidget</name>
+    <message>
+        <location filename="gui/opt/ViewOptionWidget.cpp" line="30"/>
+        <source>View</source>
+        <translation>視点</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/ViewOptionWidget.cpp" line="42"/>
+        <source>&amp;Map</source>
+        <translation>地図(&amp;M)</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/ViewOptionWidget.cpp" line="54"/>
+        <source>&amp;X Axis</source>
+        <translation>&amp;X 軸</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/ViewOptionWidget.cpp" line="67"/>
+        <source>&amp;Z Axis</source>
+        <translation>&amp;Z 軸</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/ViewOptionWidget.cpp" line="79"/>
+        <source>&amp;Scale</source>
+        <translation>縮尺(&amp;S)</translation>
+    </message>
+    <message>
+        <location filename="gui/opt/ViewOptionWidget.cpp" line="91"/>
+        <source>Sca&amp;le of Z Axis</source>
+        <translation>Z 軸の縮尺(&amp;L)</translation>
+    </message>
+</context>
+</TS>
diff --git a/src/gui/ConfigDialog.cpp b/src/gui/ConfigDialog.cpp
new file mode 100644 (file)
index 0000000..5ca186f
--- /dev/null
@@ -0,0 +1,219 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "ConfigDialog.h"
+#include "Process.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtCore/QSettings>
+#include <QtCore/QTextCodec>
+#include <QtGui/QComboBox>
+#include <QtGui/QFileDialog>
+#include <QtGui/QGridLayout>
+#include <QtGui/QGroupBox>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QMessageBox>
+#include <QtGui/QPushButton>
+#include <QtGui/QRadioButton>
+
+ConfigDialog *ConfigDialog::instance_ = 0;
+
+ConfigDialog &ConfigDialog::instance(QWidget *parent)
+{
+       if (!instance_) {
+               instance_ = new ConfigDialog(parent);
+       }
+       return *instance_;
+}
+
+void ConfigDialog::destroyInstance()
+{
+       if (instance_) {
+               delete instance_;
+               instance_ = 0;
+       }
+}
+
+ConfigDialog::ConfigDialog(QWidget *parent)
+: QDialog(parent)
+{
+       setWindowTitle(tr("Configure") + " - "
+                       + QCoreApplication::applicationName());
+
+       defaultRadioButton = new QRadioButton;
+       defaultRadioButton->setText(tr("gnuplot which is in %1").arg(
+#ifdef Q_OS_WIN32
+                               "%PATH%"
+#else
+                               "$PATH"
+#endif
+                               ));
+
+       pathRadioButton = new QRadioButton;
+       pathRadioButton->setText(tr("Path:"));
+
+       pathLineEdit = new QLineEdit;
+       connect(pathRadioButton, SIGNAL(toggled(bool)),
+                       pathLineEdit, SLOT(setEnabled(bool)));
+
+       pathPushButton = new QPushButton;
+       pathPushButton->setText(tr("O&pen..."));
+       pathPushButton->setAutoDefault(false);
+       pathPushButton->setDefault(false);
+       connect(pathRadioButton, SIGNAL(toggled(bool)),
+                       pathPushButton, SLOT(setEnabled(bool)));
+       connect(pathPushButton, SIGNAL(clicked()),
+                       this, SLOT(openFile()));
+
+       QGridLayout *pathLayout = new QGridLayout;
+       pathLayout->addWidget(defaultRadioButton, 0, 0, 1, 3);
+       pathLayout->addWidget(pathRadioButton, 1, 0);
+       pathLayout->addWidget(pathLineEdit, 1, 1);
+       pathLayout->addWidget(pathPushButton, 1, 2);
+
+       QGroupBox *pathGroupBox = new QGroupBox(tr("Path to gnuplot"));
+       pathGroupBox->setLayout(pathLayout);
+
+       QLabel *encodingLabel = new QLabel;
+       encodingLabel->setText(tr("Encoding:"));
+
+       encodingComboBox = new QComboBox;
+       QList<QByteArray> list = QTextCodec::availableCodecs();
+       qSort(list.begin(), list.end());
+       for (int i = 0, j = list.size(); i < j; i++) {
+               encodingComboBox->addItem(list.at(i).data());
+       }
+
+       QPushButton *acceptPushButton = new QPushButton;
+       acceptPushButton->setText(tr("&OK"));
+       acceptPushButton->setAutoDefault(true);
+       acceptPushButton->setDefault(true);
+       connect(acceptPushButton, SIGNAL(clicked()), this, SLOT(accept()));
+
+       QPushButton *applyPushButton = new QPushButton;
+       applyPushButton->setText(tr("&Apply"));
+       connect(applyPushButton, SIGNAL(clicked()), this, SLOT(apply()));
+
+       QPushButton *cancelPushButton = new QPushButton;
+       cancelPushButton->setText(tr("&Cancel"));
+       connect(cancelPushButton, SIGNAL(clicked()), this, SLOT(reject()));
+
+       // ------------------------ create layouts
+       // ----------- assemble layouts and widgets
+
+       QHBoxLayout *encodingLayout = new QHBoxLayout;
+       encodingLayout->addWidget(encodingLabel);
+       encodingLayout->addWidget(encodingComboBox);
+
+       QHBoxLayout *buttonLayout = new QHBoxLayout;
+       buttonLayout->addStretch();
+       buttonLayout->addWidget(acceptPushButton);
+       buttonLayout->addWidget(applyPushButton);
+       buttonLayout->addWidget(cancelPushButton);
+
+       QVBoxLayout *mainLayout = new QVBoxLayout;
+       mainLayout->addWidget(pathGroupBox);
+       mainLayout->addLayout(encodingLayout);
+       mainLayout->addLayout(buttonLayout);
+
+       setLayout(mainLayout);
+}
+
+void ConfigDialog::setProcess(Process &process)
+{
+       process_ = &process;
+
+       QSettings settings;
+       settings.beginGroup("Process");
+
+       QString path = settings.value("path").toString();
+       if (path ==
+#ifdef Q_OS_WIN32
+                       "pgnuplot.exe"
+#else
+                       "gnuplot"
+#endif
+          ) {
+               defaultRadioButton->setChecked(true);
+               pathLineEdit->setEnabled(false);
+               pathPushButton->setEnabled(false);
+       } else {
+               pathRadioButton->setChecked(true);
+               pathLineEdit->setText(path);
+       }
+
+       settings.endGroup();
+
+       encodingComboBox->setCurrentIndex(encodingComboBox->findText(
+                               process_->textCodec().name().data()));
+}
+
+void ConfigDialog::accept()
+{
+       apply();
+       QDialog::accept();
+}
+
+void ConfigDialog::apply()
+{
+       QSettings settings;
+       settings.beginGroup("Process");
+       QString path;
+       if (defaultRadioButton->isChecked()) {
+               path =
+#ifdef Q_OS_WIN32
+                       "pgnuplot.exe"
+#else
+                       "gnuplot"
+#endif
+                       ;
+       } else {
+               path = pathLineEdit->text();
+       }
+       if (path != settings.value("path").toString()) {
+               settings.setValue("path", path);
+               QMessageBox::information(this, tr("Restart Required") + " - " 
+                               + QCoreApplication::applicationName(), 
+                               tr("You will have to restart %1 for the change "
+                                       "to take effect.")
+                               .arg(QCoreApplication::applicationName()));
+       }
+       settings.endGroup();
+
+       QByteArray encoding = encodingComboBox->currentText().toUtf8();
+       process_->setTextCodec(*QTextCodec::codecForName(encoding));
+}
+
+void ConfigDialog::openFile()
+{
+       QString path = QFileDialog::getOpenFileName(0,
+                       tr("Open gnuplot") + " - "
+                       + QCoreApplication::applicationName(), pathLineEdit->text(),
+                       "gnuplot (" 
+#ifdef Q_OS_WIN32
+                       "pgnuplot.exe"
+#else
+                       "gnuplot"
+#endif
+                       ")");
+       if (!path.isNull()) {
+               pathLineEdit->setText(path);
+
+       }
+}
diff --git a/src/gui/ConfigDialog.h b/src/gui/ConfigDialog.h
new file mode 100644 (file)
index 0000000..8a581c4
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef CONFIG_DIALOG_INCLUDED
+#define CONFIG_DIALOG_INCLUDED
+
+class Process;
+
+#include <QtGui/QDialog>
+class QComboBox;
+class QLineEdit;
+class QRadioButton;
+
+class ConfigDialog : public QDialog
+{
+       Q_OBJECT
+
+       public:
+               static ConfigDialog &instance(QWidget *parent = 0);
+               static void destroyInstance();
+
+               void setProcess(Process &process);
+
+       private slots:
+               void accept();
+               void apply();
+               void openFile();
+
+       private:
+               ConfigDialog(QWidget *parent = 0);
+               // don't implement these
+               ConfigDialog(const ConfigDialog &);
+               ConfigDialog &operator=(const ConfigDialog &);
+
+               static ConfigDialog *instance_;
+
+               Process *process_;
+               QRadioButton *defaultRadioButton;
+               QRadioButton *pathRadioButton;
+               QLineEdit *pathLineEdit;
+               QPushButton *pathPushButton;
+               QComboBox *encodingComboBox;
+};
+#endif // CONFIG_DIALOG_INCLUDED
diff --git a/src/gui/ConsoleDialog.cpp b/src/gui/ConsoleDialog.cpp
new file mode 100644 (file)
index 0000000..97fcfa8
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "ConsoleDialog.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtGui/QApplication>
+#include <QtGui/QTextEdit>
+#include <QtGui/QVBoxLayout>
+
+ConsoleDialog::ConsoleDialog(QWidget *parent)
+: QDialog(parent)
+{
+       setWindowTitle(tr("Console") + " - " 
+                       + QCoreApplication::applicationName());
+
+       consoleTextEdit = new QTextEdit;
+       consoleTextEdit->setReadOnly(true);
+
+       QVBoxLayout *mainLayout = new QVBoxLayout;
+       mainLayout->addWidget(consoleTextEdit);
+
+       setLayout(mainLayout);
+}
+
+namespace {
+       //! '&lt;' などをエスケープし、改行を &lt;br&gt; に置き換える
+       QString escape(const QString &str)
+       {
+               QString escapedStr = str;
+               escapedStr.replace("<", "&lt;");
+               escapedStr.replace(">", "&gt;");
+               escapedStr.replace("\r\n", "<br>");
+               escapedStr.replace("\r", "<br>");
+               escapedStr.replace("\n", "<br>");
+
+               return escapedStr;
+       }
+}
+
+void ConsoleDialog::execute(const QString &command)
+{
+       QString escapedCommand = escape(command);
+       consoleTextEdit->append("<kbd>" + escapedCommand + "</kbd>");
+}
+
+void ConsoleDialog::readStandardError(const QByteArray &output)
+{
+       QString command = QString(output.data());
+       if (!command.trimmed().isEmpty()) {
+               command = escape(command);
+               // エラー出力は赤で表示
+               consoleTextEdit->append("<kbd><font color=\"red\">" +
+                               command + "</font></kbd>");
+       }
+}
diff --git a/src/gui/ConsoleDialog.h b/src/gui/ConsoleDialog.h
new file mode 100644 (file)
index 0000000..184b4ca
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef CONSOLE_DIALOG_INCLUDED
+#define CONSOLE_DIALOG_INCLUDED
+
+#include <QtGui/QDialog>
+class QTextEdit;
+
+//! 実行されたコマンドや出力されたエラーメッセージを表示するダイアログ
+class ConsoleDialog : public QDialog
+{
+       Q_OBJECT
+
+       public:
+               explicit ConsoleDialog(QWidget *parent = 0);
+
+               //! 実行されたコマンドを表示する
+               void execute(const QString &command);
+               //! 出力されたエラーメッセージを表示する
+               void readStandardError(const QByteArray &output);
+
+       private:
+               // don't implement these
+               ConsoleDialog(const ConsoleDialog &);
+               ConsoleDialog &operator=(const ConsoleDialog &);
+
+               QTextEdit *consoleTextEdit;
+};
+#endif // CONSOLE_DIALOG_INCLUDED
diff --git a/src/gui/FitDialog.cpp b/src/gui/FitDialog.cpp
new file mode 100644 (file)
index 0000000..20b843f
--- /dev/null
@@ -0,0 +1,155 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "FitDialog.h"
+#include "FitBasicWidget.h"
+#include "FitModifierWidget.h"
+#include "FitOthersWidget.h"
+#include "FitRangeWidget.h"
+#include "Fit.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtGui/QListWidget>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QPushButton>
+#include <QtGui/QSplitter>
+#include <QtGui/QStackedWidget>
+
+FitDialog *FitDialog::instance_ = 0;
+
+FitDialog &FitDialog::instance(QWidget *parent)
+{
+       if (!instance_) {
+               instance_ = new FitDialog(parent);
+               instance_->init();
+       }
+       return *instance_;
+}
+
+void FitDialog::destroyInstance()
+{
+       if (instance_) {
+               delete instance_;
+               instance_ = 0;
+       }
+}
+
+FitDialog::FitDialog(QWidget *parent)
+: QDialog(parent)
+{
+       setWindowTitle(tr("Fittings") + " - " 
+                       + QCoreApplication::applicationName());
+
+       fitBasicWidget = new FitBasicWidget;
+       connect(fitBasicWidget, SIGNAL(optionChanged()),
+                       this, SLOT(setPushButton()));
+       fitRangeWidget = new FitRangeWidget;
+       fitModifierWidget = new FitModifierWidget;
+       fitOthersWidget = new FitOthersWidget;
+
+       pagesStackedWidget = new QStackedWidget;
+       pagesStackedWidget->addWidget(fitBasicWidget);
+       pagesStackedWidget->addWidget(fitRangeWidget);
+       pagesStackedWidget->addWidget(fitModifierWidget);
+       pagesStackedWidget->addWidget(fitOthersWidget);
+
+       contentsListWidget = new QListWidget;
+       for (int i = 0, j = pagesStackedWidget->count(); i < j; i++) {
+               QWidget *widget = pagesStackedWidget->widget(i);
+               contentsListWidget->addItem(widget->windowTitle());
+               contentsListWidget->item(i)->setWhatsThis(widget->whatsThis());
+       }
+       contentsListWidget->setCurrentRow(0);
+       connect(contentsListWidget,
+                       SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)),
+                       this, SLOT(changePage(QListWidgetItem *, QListWidgetItem *)));
+
+       QSplitter *centerSplitter = new QSplitter;
+       centerSplitter->addWidget(contentsListWidget);
+       centerSplitter->addWidget(pagesStackedWidget);
+
+       fitPushButton = new QPushButton;
+       connect(fitPushButton, SIGNAL(clicked()), SLOT(fit()));
+       fitPushButton->setText(tr("&Fit"));
+
+       QPushButton *closeButton = new QPushButton;
+       closeButton->setText(tr("&Close"));
+       connect(closeButton, SIGNAL(clicked()), this, SLOT(accept()));
+
+       // create layouts
+
+       QHBoxLayout *buttonLayout = new QHBoxLayout;
+       buttonLayout->addStretch();
+       buttonLayout->addWidget(fitPushButton);
+       buttonLayout->addWidget(closeButton);
+
+       QVBoxLayout *mainLayout = new QVBoxLayout;
+       mainLayout->addWidget(centerSplitter);
+       mainLayout->addLayout(buttonLayout);
+
+       setLayout(mainLayout);
+}
+
+void FitDialog::init()
+{
+       Fit fit;
+       fitBasicWidget->setFitFunction(fit.function());
+       fitBasicWidget->setFitDataFile(fit.dataFile());
+       fitBasicWidget->setFitParameterFile(fit.isParameterFile());
+       fitBasicWidget->setFitParameterFile(fit.parameterFile());
+       fitBasicWidget->setFitVariable(fit.variable());
+
+       fitModifierWidget->setFitModifier(fit.dataFileModifier());
+
+       fitOthersWidget->setFitLimit(fit.fitLimit());
+       fitOthersWidget->setFitMaxIter(fit.fitMaxIter());
+
+       setPushButton();
+}
+
+void FitDialog::fit()
+{
+       Fit fit;
+
+       fit.setFunction(fitBasicWidget->fitFunction());
+       fit.setDataFile(fitBasicWidget->fitDataFile());
+       fit.setParameterFile(fitBasicWidget->isFitParameterFile());
+       fit.setParameterFile(fitBasicWidget->fitParameterFile());
+       fit.setVariable(fitBasicWidget->fitVariable());
+
+       fit.setDataFileModifier(fitModifierWidget->fitModifier());
+
+       fit.setFitLimit(fitOthersWidget->fitLimit());
+       fit.setFitMaxIter(fitOthersWidget->fitMaxIter());
+
+       emit executed(fit.command());
+}
+
+void FitDialog::setPushButton()
+{
+       fitPushButton->setEnabled(fitBasicWidget->canFit());
+}
+
+void FitDialog::changePage(QListWidgetItem *current,
+               QListWidgetItem *previous)
+{
+       if (!current) {
+               current = previous;
+       }
+       pagesStackedWidget->setCurrentIndex(contentsListWidget->row(current));
+}
diff --git a/src/gui/FitDialog.h b/src/gui/FitDialog.h
new file mode 100644 (file)
index 0000000..2ab55d5
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef FIT_DIALOG_INCLUDED
+#define FIT_DIALOG_INCLUDED
+
+class FitBasicWidget;
+class FitModifierWidget;
+class FitOthersWidget;
+class FitRangeWidget;
+
+#include <QtGui/QDialog>
+class QListWidget;
+class QListWidgetItem;
+class QPushButton;
+class QStackedWidget;
+
+//! fit コマンドを実行するダイアログ (Singleton)
+class FitDialog : public QDialog
+{
+       Q_OBJECT
+
+       public:
+               static FitDialog &instance(QWidget *parent = 0);
+               static void destroyInstance();
+
+       private slots:
+               //! フィッティングを行う
+               void fit();
+               void setPushButton();
+               void changePage(QListWidgetItem *current, QListWidgetItem *previous);
+
+       signals:
+               //! コマンドを実行する
+               /*!
+                * \param command 実行するコマンド
+                */
+               void executed(const QString &command);
+
+       private:
+               FitDialog(QWidget *parent = 0);
+               // don't implement these
+               FitDialog(const FitDialog &);
+               FitDialog &operator=(const FitDialog &);
+
+               //! 初期化する
+               void init();
+               static FitDialog *instance_;
+
+               QStackedWidget *pagesStackedWidget;
+               QListWidget *contentsListWidget;
+               FitBasicWidget *fitBasicWidget;
+               FitModifierWidget *fitModifierWidget;
+               FitOthersWidget *fitOthersWidget;
+               FitRangeWidget *fitRangeWidget;
+               QPushButton *fitPushButton;
+};
+#endif // FIT_DIALOG_INCLUDED
diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp
new file mode 100644 (file)
index 0000000..af807e7
--- /dev/null
@@ -0,0 +1,610 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "MainWindow.h"
+#include "ConfigDialog.h"
+#include "FitDialog.h"
+#include "OptionDialog.h"
+#include "Plot.h"
+#include "PlotOptionDialog.h"
+#include "Process.h"
+#include "RawCommandDialog.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtGui/QCloseEvent>
+#include <QtGui/QLineEdit>
+#include <QtGui/QListWidget>
+#include <QtGui/QFileDialog>
+#include <QtGui/QMenu>
+#include <QtGui/QMenuBar>
+#include <QtGui/QMessageBox>
+#include <QtGui/QPushButton>
+#include <QtGui/QRadioButton>
+#include <QtGui/QToolBar>
+#include <QtGui/QVBoxLayout>
+#include <QtGui/QWhatsThis>
+
+MainWindow::MainWindow(QWidget *parent)
+: QMainWindow(parent), process(new Process)
+{
+       setWindowTitle(QCoreApplication::applicationName());
+
+       functionRadioButton = new QRadioButton;
+       functionRadioButton->setChecked(true);
+       functionRadioButton->setText(tr("Function"));
+       connect(functionRadioButton, SIGNAL(toggled(bool)),
+                       this, SLOT(setAddPushButton(bool)));
+
+       functionEdit = new QLineEdit;
+       connect(functionRadioButton, SIGNAL(toggled(bool)), 
+                       functionEdit, SLOT(setEnabled(bool)));
+       connect(functionEdit, SIGNAL(returnPressed()),
+                       this, SLOT(addData()));
+
+       filenameRadioButton = new QRadioButton;
+       filenameRadioButton->setText(tr("File Name"));
+
+       filenameEdit = new QLineEdit;
+       filenameEdit->setEnabled(false);
+       connect(filenameRadioButton, SIGNAL(toggled(bool)), 
+                       filenameEdit, SLOT(setEnabled(bool)));
+       connect(filenameEdit, SIGNAL(returnPressed()),
+                       this, SLOT(addData()));
+
+       QPushButton *filenamePushButton = new QPushButton;
+       filenamePushButton->setText(tr("&Open..."));
+       filenamePushButton->setEnabled(false);
+       connect(filenameRadioButton, SIGNAL(toggled(bool)), 
+                       filenamePushButton, SLOT(setEnabled(bool)));
+       connect(filenamePushButton, SIGNAL(clicked()),
+                       this, SLOT(openDataFile()));
+
+       addPushButton = new QPushButton;
+       addPushButton->setText(tr("&Add"));
+       addPushButton->setEnabled(false);
+       connect(addPushButton, SIGNAL(clicked()),
+                       this, SLOT(addData()));
+       connect(filenameEdit, SIGNAL(textChanged(const QString &)),
+                       this, SLOT(setAddPushButton(const QString &)));
+       connect(functionEdit, SIGNAL(textChanged(const QString &)),
+                       this, SLOT(setAddPushButton(const QString &)));
+
+       optionPushButton = new QPushButton;
+       optionPushButton->setText(tr("O&ption..."));
+       optionPushButton->setEnabled(false);
+       optionPushButton->setSizePolicy(
+                       QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+       connect(optionPushButton, SIGNAL(clicked()),
+                       this, SLOT(setPlotOptions()));
+
+       upPushButton = new QPushButton;
+       upPushButton->setText(tr("&Up"));
+       upPushButton->setEnabled(false);
+       connect(upPushButton, SIGNAL(clicked()),
+                       this, SLOT(setDataUp()));
+
+       downPushButton = new QPushButton;
+       downPushButton->setText(tr("&Down"));
+       downPushButton->setEnabled(false);
+       connect(downPushButton, SIGNAL(clicked()),
+                       this, SLOT(setDataDown()));
+
+       deletePushButton = new QPushButton;
+       deletePushButton->setText(tr("D&elete"));
+       deletePushButton->setEnabled(false);
+       deletePushButton->setSizePolicy(
+                       QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+       connect(deletePushButton, SIGNAL(clicked()),
+                       this, SLOT(deleteData()));
+
+       plotListWidget = new QListWidget;
+       connect(plotListWidget, SIGNAL(itemSelectionChanged()),
+                       this, SLOT(setPushButton()));
+       connect(plotListWidget, SIGNAL(itemChanged(QListWidgetItem *)),
+                       this, SLOT(changeItem(QListWidgetItem *)));
+
+       // ----------- assemble layouts and widgets
+       // ------------------------ create layouts
+
+       QGridLayout *singleLayout = new QGridLayout;
+       singleLayout->addWidget(functionRadioButton, 0, 0);
+       singleLayout->addWidget(functionEdit, 0, 1, 1, 2);
+       singleLayout->addWidget(filenameRadioButton, 1, 0);
+       singleLayout->addWidget(filenameEdit, 1, 1);
+       singleLayout->addWidget(filenamePushButton, 1, 2);
+
+       QGridLayout *listLayout = new QGridLayout;
+       listLayout->addWidget(addPushButton, 0, 0);
+       listLayout->addWidget(optionPushButton, 1, 0);
+       listLayout->addWidget(upPushButton, 2, 0);
+       listLayout->addWidget(downPushButton, 3, 0);
+       // ウィンドウを最大化したときのことを考えて、QSpacerItem を入れる
+       listLayout->addItem(new QSpacerItem(20, 0, 
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 4, 0);
+       listLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 5, 0, 1, 2);
+       listLayout->addWidget(deletePushButton, 5, 2);
+       listLayout->addWidget(plotListWidget, 0, 1, 5, 2);
+
+       QVBoxLayout *mainLayout = new QVBoxLayout;
+       mainLayout->addLayout(singleLayout);
+       mainLayout->addLayout(listLayout);
+
+       QWidget *mainWidget = new QWidget;
+       mainWidget->setLayout(mainLayout);
+       setCentralWidget(mainWidget);
+
+       createActions();
+       createMenus();
+       createToolBars();
+}
+
+void MainWindow::createActions()
+{
+       loadAct = new QAction(tr("&Open..."), this);
+       loadAct->setShortcut(tr("Ctrl+O"));
+       loadAct->setWhatsThis(tr("load \"&lt;input-file&gt;\""));
+       loadAct->setIcon(QIcon(":/images/fileopen.png"));
+       connect(loadAct, SIGNAL(triggered()),
+                       this, SLOT(load()));
+
+       saveAct = new QAction(tr("&Save"), this);
+       saveAct->setShortcut(tr("Ctrl+S"));
+       saveAct->setWhatsThis(tr("save '&lt;filename&gt;'"));
+       saveAct->setIcon(QIcon(":/images/filesave.png"));
+       connect(saveAct, SIGNAL(triggered()),
+                       this, SLOT(save()));
+
+       saveAsAct = new QAction(tr("Save &As..."), this);
+       saveAsAct->setWhatsThis(tr("save '&lt;filename&gt;'"));
+       saveAsAct->setIcon(QIcon(":/images/filesaveas.png"));
+       connect(saveAsAct, SIGNAL(triggered()),
+                       this, SLOT(saveAs()));
+
+       quitAct = new QAction(tr("&Quit"), this);
+       quitAct->setShortcut(tr("Ctrl+Q"));
+       quitAct->setWhatsThis("quit");
+       quitAct->setIcon(QIcon(":/images/exit.png"));
+#if QT_VERSION >= 0x040200 && defined(Q_OS_DARWIN)
+       // Mac OS X 環境で、使用している言語によりメニューの場所が変わるのを
+       // 防ぐための処理
+       // setMenuRole() は Qt 4.2 で導入された
+       quitAct->setMenuRole(QAction::QuitRole);
+#endif
+       connect(quitAct, SIGNAL(triggered()),
+                       this, SLOT(close()));
+
+
+       plotAct = new QAction(tr("&2D Plot"), this);
+       plotAct->setShortcut(tr("F2"));
+       plotAct->setWhatsThis("plot");
+       plotAct->setEnabled(false);
+       connect(plotAct, SIGNAL(triggered()),
+                       this, SLOT(plot()));
+
+       splotAct = new QAction(tr("&3D Plot"), this);
+       splotAct->setShortcut(tr("F3"));
+       splotAct->setWhatsThis("splot");
+       splotAct->setEnabled(false);
+       connect(splotAct, SIGNAL(triggered()),
+                       this, SLOT(splot()));
+
+       rawCommandAct = new QAction(tr("&Raw Commands..."), this);
+       rawCommandAct->setIcon(QIcon(":/images/run.png"));
+       connect(rawCommandAct, SIGNAL(triggered()),
+                       this, SLOT(rawCommand()));
+
+       fitAct = new QAction(tr("&Fittings..."), this);
+       fitAct->setWhatsThis("fit");
+       connect(fitAct, SIGNAL(triggered()),
+                       this, SLOT(fit()));
+
+       setAct = new QAction(tr("&Settings..."), this);
+       setAct->setWhatsThis("set");
+#if QT_VERSION >= 0x040200 && defined(Q_OS_DARWIN)
+       setAct->setMenuRole(QAction::TextHeuristicRole);
+#endif
+       connect(setAct, SIGNAL(triggered()),
+                       this, SLOT(set()));
+
+
+       toolBarAct = new QAction(tr("&Tool Bar"), this);
+       toolBarAct->setCheckable(true);
+
+       consoleAct = new QAction(tr("C&onsole..."), this);
+       consoleAct->setCheckable(true);
+       connect(consoleAct, SIGNAL(toggled(bool)),
+                       this, SLOT(console(bool)));
+
+       configAct = new QAction(tr("&Configure %1...")
+                       .arg(QCoreApplication::applicationName()), this);
+       configAct->setIcon(QIcon(":/images/configure.png"));
+       connect(configAct, SIGNAL(triggered()),
+                       this, SLOT(config()));
+
+       whatsThisAct = new QAction(tr("What's &This?"), this);
+       whatsThisAct->setShortcut(tr("Shift+F1"));
+       whatsThisAct->setIcon(QIcon(":/images/contexthelp.png"));
+       connect(whatsThisAct, SIGNAL(triggered()),
+                       this, SLOT(whatsThis()));
+
+       aboutAct = new QAction(tr("&About"), this);
+#if QT_VERSION >= 0x040200 && defined(Q_OS_DARWIN)
+       aboutAct->setMenuRole(QAction::AboutRole);
+#endif
+       connect(aboutAct, SIGNAL(triggered()),
+                       this, SLOT(about()));
+
+       aboutQtAct = new QAction(tr("About &Qt"), this);
+#if QT_VERSION >= 0x040200 && defined(Q_OS_DARWIN)
+       aboutQtAct->setMenuRole(QAction::AboutQtRole);
+#endif
+       connect(aboutQtAct, SIGNAL(triggered()),
+                       QCoreApplication::instance(), SLOT(aboutQt()));
+}
+
+void MainWindow::createMenus()
+{
+       QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
+       fileMenu->addAction(loadAct);
+       fileMenu->addAction(saveAct);
+       fileMenu->addAction(saveAsAct);
+       fileMenu->addSeparator();
+       fileMenu->addAction(quitAct);
+
+       QMenu *commandMenu = menuBar()->addMenu(tr("&Command"));
+       commandMenu->addAction(plotAct);
+       commandMenu->addAction(splotAct);
+       commandMenu->addAction(rawCommandAct);
+       commandMenu->addAction(fitAct);
+       commandMenu->addAction(setAct);
+
+       QMenu *settingsMenu = menuBar()->addMenu(tr("&Settings"));
+       settingsMenu->addAction(toolBarAct);
+       settingsMenu->addAction(consoleAct);
+       settingsMenu->addSeparator();
+       settingsMenu->addAction(configAct);
+       connect(settingsMenu, SIGNAL(aboutToShow()),
+                       this, SLOT(setSettingsAction()));
+
+       QMenu *helpMenu = menuBar()->addMenu(tr("&Help"));
+       helpMenu->addAction(whatsThisAct);
+       helpMenu->addSeparator();
+       helpMenu->addAction(aboutAct);
+       helpMenu->addAction(aboutQtAct);
+}
+
+void MainWindow::createToolBars()
+{
+       toolBar = addToolBar(tr("Tool Bar"));
+       toolBar->addAction(loadAct);
+       toolBar->addAction(saveAct);
+       toolBar->addAction(plotAct);
+       toolBar->addAction(splotAct);
+       connect(toolBarAct, SIGNAL(toggled(bool)),
+                       toolBar, SLOT(setVisible(bool)));
+}
+
+MainWindow::~MainWindow()
+{
+       while (!plotList.isEmpty()) {
+               delete plotList.takeFirst();
+       }
+}
+
+void MainWindow::addData()
+{
+       // 関数が選択されていれば関数を追加し、
+       // ファイルが選択されていればファイルを追加する
+       bool isFunction = functionRadioButton->isChecked();
+       QLineEdit *lineEdit = isFunction ? functionEdit : filenameEdit;
+       QString data = lineEdit->text();
+       if (data.isEmpty()) {
+               return;
+       }
+       Plot *plot = new Plot;
+       plot->setFunction(isFunction);
+       isFunction ? plot->setFunction(data) : plot->setDataFile(data);
+       if (plotListWidget->currentRow() < 0) {
+               // リスト中に項目がないとき
+               plotListWidget->addItem(data);
+               plotListWidget->setCurrentRow(plotListWidget->count() - 1);
+
+               plotList.append(plot);
+       } else {
+               // 項目があるとき、選択されている項目の次に追加
+               int row = plotListWidget->currentRow() + 1;
+               plotListWidget->insertItem(row, data);
+               plotListWidget->setCurrentRow(row);
+
+               plotList.insert(row, plot);
+       }
+       QListWidgetItem *item = plotListWidget->currentItem();
+       item->setFlags(item->flags() | Qt::ItemIsEditable 
+                       | Qt::ItemIsUserCheckable);
+       item->setCheckState(Qt::Checked);
+       lineEdit->clear();
+       plotAct->setEnabled(true);
+       splotAct->setEnabled(true);
+       setPushButton();
+}
+
+void MainWindow::setDataUp()
+{
+       int row = plotListWidget->currentRow();
+       if (row > 0) {
+               QListWidgetItem *item = plotListWidget->takeItem(row);
+               plotListWidget->insertItem(row - 1, item);
+               plotListWidget->setCurrentRow(row - 1);
+
+               Plot *plot = plotList.takeAt(row);
+               plotList.insert(row - 1, plot);
+       }
+}
+
+void MainWindow::setDataDown()
+{
+       int row = plotListWidget->currentRow();
+       if (row < plotListWidget->count() - 1) {
+               QListWidgetItem *item = plotListWidget->takeItem(row);
+               plotListWidget->insertItem(row + 1, item);
+               plotListWidget->setCurrentRow(row + 1);
+
+               Plot *plot = plotList.takeAt(row);
+               plotList.insert(row + 1, plot);
+       }
+}
+
+void MainWindow::deleteData()
+{
+       int row = plotListWidget->currentRow();
+       delete plotListWidget->takeItem(row);
+       delete plotList.takeAt(row);
+       setAction();
+       setPushButton();
+}
+
+void MainWindow::plot()
+{
+       QStringList commandList;
+       for (int i = 0, j = plotList.size(); i < j; i++) {
+               if (plotListWidget->item(i)->checkState() == Qt::Checked) {
+                       commandList << plotList.at(i)->command();
+               }
+       }
+       process->execute("plot " + commandList.join(", "));
+}
+
+// TODO use Splot object
+void MainWindow::splot()
+{
+       QStringList commandList;
+       for (int i = 0, j = plotList.size(); i < j; i++) {
+               if (plotListWidget->item(i)->checkState() == Qt::Checked) {
+                       commandList << plotList.at(i)->command();
+               }
+       }
+       process->execute("splot " + commandList.join(", "));
+}
+
+void MainWindow::openDataFile()
+{
+       QString file = QFileDialog::getOpenFileName(this,
+                       tr("Open a data file") + " - " 
+                       + QCoreApplication::applicationName(),
+                       currentDataFile);
+       if (!file.isEmpty()) {
+               filenameEdit->setText(file);
+               currentDataFile = file;
+       }
+}
+
+void MainWindow::save()
+{
+       if (currentFile.isEmpty()) {
+               saveAs();
+       } else {
+               process->execute("save '" + currentFile + "'");
+       }
+}
+
+void MainWindow::saveAs()
+{
+       QString file = QFileDialog::getSaveFileName(this,
+                       tr("Save under a file name") + " - " 
+                       + QCoreApplication::applicationName(),
+                       currentFile); 
+       if (!file.isEmpty()) {
+               process->execute("save '" + file + "'");
+               currentFile = file;
+       }
+}
+
+void MainWindow::load()
+{
+       QString file = QFileDialog::getOpenFileName(this,
+                       tr("Open a file") + " - " + QCoreApplication::applicationName(),
+                       currentFile); 
+       if (!file.isEmpty()) {
+               process->execute("load \"" + file + "\"");
+               currentFile = file;
+       }
+}
+
+void MainWindow::rawCommand()
+{
+       RawCommandDialog *rawCommandDialog = &RawCommandDialog::instance();
+       rawCommandDialog->disconnect();
+       connect(rawCommandDialog, SIGNAL(executed(const QString &)),
+                       process, SLOT(execute(const QString &)));
+       rawCommandDialog->show();
+       rawCommandDialog->raise();
+       rawCommandDialog->activateWindow();
+}
+
+void MainWindow::fit()
+{
+       FitDialog *fitDialog  = &FitDialog::instance();
+       fitDialog->disconnect();
+       connect(fitDialog, SIGNAL(executed(const QString &)),
+                       process, SLOT(execute(const QString &)));
+       fitDialog->show();
+       fitDialog->raise();
+       fitDialog->activateWindow();
+}
+
+void MainWindow::set()
+{
+       OptionDialog *optionDialog = &OptionDialog::instance();
+       optionDialog->disconnect();
+       connect(optionDialog, SIGNAL(executed(const QString &)),
+                       process, SLOT(execute(const QString &)));
+       optionDialog->show();
+       optionDialog->raise();
+       optionDialog->activateWindow();
+}
+
+void MainWindow::setPushButton()
+{
+       // 項目が一つでも選択されていたら、
+       // オプションボタンと削除ボタンを有効にする
+       bool isSelected = (plotListWidget->currentRow() >= 0);
+       optionPushButton->setEnabled(isSelected);
+       deletePushButton->setEnabled(isSelected);
+       // 選択された項目があり、複数の項目がリスト中にあれば、
+       // 上ボタンと下ボタンを有効にする
+       bool isMulti = isSelected && (plotListWidget->count() > 1);
+       upPushButton->setEnabled(isMulti);
+       downPushButton->setEnabled(isMulti);
+}
+
+void MainWindow::setAddPushButton(const QString &text)
+{
+       addPushButton->setEnabled(!text.isEmpty());
+}
+
+void MainWindow::setAddPushButton(bool checked)
+{
+       setAddPushButton(
+                       (checked ? functionEdit : filenameEdit)->text());
+}
+
+void MainWindow::setPlotOptions()
+{
+       PlotOptionDialog *plotOptionDialog = new PlotOptionDialog;
+       connect(plotOptionDialog, SIGNAL(executed(const QString &)),
+                       process, SLOT(execute(const QString &)));
+       plotOptionDialog->setPlot(*plotList[plotListWidget->currentRow()]);
+       plotOptionDialog->show();
+}
+
+void MainWindow::setSettingsAction()
+{
+       consoleAct->setChecked(process->isDialogVisible());
+       toolBarAct->setChecked(toolBar->isVisible());
+}
+
+void MainWindow::console(bool visible)
+{
+       process->setDialogVisible(visible);
+}
+
+void MainWindow::config()
+{
+       ConfigDialog *configDialog = &ConfigDialog::instance();
+       configDialog->setProcess(*process);
+       configDialog->show();
+       configDialog->raise();
+       configDialog->activateWindow();
+}
+
+void MainWindow::whatsThis()
+{
+       QWhatsThis::enterWhatsThisMode();
+}
+
+void MainWindow::about()
+{
+       QMessageBox::about(this, tr("About %1")
+                       .arg(QCoreApplication::applicationName()), 
+                       "<h3>" + QCoreApplication::applicationName() + " 0.0.3</h3>"
+                       "<p>" + QCoreApplication::applicationName() 
+                       + tr(": a GUI front-end to gnuplot<br>"
+                               "Copyright (C) 2007 Muneyuki Noguchi</p>"
+                               "<p>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 2 "
+                               "of the License, or (at your option) any later version.</p>"
+                               "<p>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.</p>"
+                               "<p>You should have received a copy of the GNU General Public License "
+                               "along with this program; if not, write to the Free Software "
+                               "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>"));
+}
+
+void MainWindow::changeItem(QListWidgetItem *item)
+{
+       plotListWidget->setCurrentItem(item);
+       Plot *plot = plotList[plotListWidget->currentRow()];
+       QString text = item->text();
+       if (plot->isFunction()) {
+               plot->setFunction(text);
+       } else {
+               plot->setDataFile(text);
+       }
+       setAction();
+}
+
+void MainWindow::closeEvent(QCloseEvent *event)
+{
+       // 一つでも項目がリスト中にあれば、終了させるか確認ダイアログを表示
+       if (plotListWidget->count() > 0) {
+               switch (QMessageBox::warning(this, tr("Confirmation") + " - "
+                                       + QCoreApplication::applicationName(),
+                                       tr("Function(s) and/or data exist in the list.\n"
+                                               "Are you sure you want to quit?"),
+                                       tr("&Quit"), tr("&Cancel"), 0, 0, 1)) {
+               case 1:
+                       event->ignore();
+                       return;
+               }
+       }
+       // すべてのダイアログを閉じる
+       ConfigDialog::destroyInstance();
+       FitDialog::destroyInstance();
+       OptionDialog::destroyInstance();
+       RawCommandDialog::destroyInstance();
+       process->closeDialog();
+       event->accept();
+}
+
+void MainWindow::setAction()
+{
+       // チェックされている項目があるか調べる
+       bool isChecked = false;
+       for (int i = 0, j = plotListWidget->count(); i < j; i++) {
+               if (plotListWidget->item(i)->checkState() == Qt::Checked) {
+                       isChecked = true;
+                       break;
+               }
+       }
+       plotAct->setEnabled(isChecked);
+       splotAct->setEnabled(isChecked);
+}
diff --git a/src/gui/MainWindow.h b/src/gui/MainWindow.h
new file mode 100644 (file)
index 0000000..bf7631b
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef MAIN_WINDOW_INCLUDED
+#define MAIN_WINDOW_INCLUDED
+
+class Plot;
+class Process;
+
+#include <QtGui/QMainWindow>
+class QCloseEvent;
+class QLineEdit;
+class QListWidget;
+class QListWidgetItem;
+class QPushButton;
+class QRadioButton;
+
+//! メインウィンドウ
+class MainWindow : public QMainWindow
+{
+       Q_OBJECT
+
+       public:
+               explicit MainWindow(QWidget *parent = 0);
+               ~MainWindow();
+
+       private slots:
+               void plot();
+               void splot();
+               void openDataFile();
+               void save();
+               void saveAs();
+               void load();
+               void rawCommand();
+               void setPlotOptions();
+               void fit();
+               void set();
+               void setSettingsAction();
+               void console(bool visible);
+               void config();
+               void whatsThis();
+               void about();
+               void addData();
+               void setDataUp();
+               void setDataDown();
+               void deleteData();
+               void setAddPushButton(const QString &text);
+               void setAddPushButton(bool checked);
+               void changeItem(QListWidgetItem *item);
+               void setPushButton();
+
+       private:
+               // don't implement these
+               MainWindow(const MainWindow &);
+               MainWindow &operator=(const MainWindow &);
+
+               void createActions();
+               void createMenus();
+               void createToolBars();
+               void closeEvent(QCloseEvent *event);
+               void setAction();
+               Process *process;
+               QList<Plot *> plotList;
+               QString currentFile;
+               QString currentDataFile;
+               QRadioButton *filenameRadioButton;
+               QLineEdit *filenameEdit;
+               QRadioButton *functionRadioButton;
+               QLineEdit *functionEdit;
+               QPushButton *addPushButton;
+               QPushButton *optionPushButton;
+               QPushButton *upPushButton;
+               QPushButton *downPushButton;
+               QPushButton *deletePushButton;
+               QListWidget *plotListWidget;
+               QToolBar *toolBar;
+               QAction *loadAct;
+               QAction *saveAct;
+               QAction *saveAsAct;
+               QAction *quitAct;
+               QAction *plotAct;
+               QAction *splotAct;
+               QAction *rawCommandAct;
+               QAction *fitAct;
+               QAction *setAct;
+               QAction *toolBarAct;
+               QAction *consoleAct;
+               QAction *configAct;
+               QAction *whatsThisAct;
+               QAction *aboutAct;
+               QAction *aboutQtAct;
+};
+#endif // MAIN_WINDOW_INCLUDED
diff --git a/src/gui/OptionDialog.cpp b/src/gui/OptionDialog.cpp
new file mode 100644 (file)
index 0000000..88f5123
--- /dev/null
@@ -0,0 +1,278 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "AnglesOptionWidget.h"
+#include "AxisDataOptionWidget.h"
+#include "AxisLabelOptionWidget.h"
+#include "AxisRangeOptionWidget.h"
+#include "AxisTicsOptionWidget.h"
+#include "OptionDialog.h"
+#include "BarOptionWidget.h"
+#include "BoxWidthOptionWidget.h"
+#include "DummyOptionWidget.h"
+#include "EncodingOptionWidget.h"
+#include "FormatOptionWidget.h"
+#include "GridOptionWidget.h"
+#include "KeyOptionWidget.h"
+#include "LogScaleOptionWidget.h"
+#include "MappingOptionWidget.h"
+#include "MAxisTicsOptionWidget.h"
+#include "OutputOptionWidget.h"
+#include "ParametricOptionWidget.h"
+#include "SamplesOptionWidget.h"
+#include "SizeOptionWidget.h"
+#include "TerminalOptionWidget.h"
+#include "TitleOptionWidget.h"
+#include "ViewOptionWidget.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtGui/QCloseEvent>
+#include <QtGui/QListWidget>
+#include <QtGui/QListWidgetItem>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QMessageBox>
+#include <QtGui/QPushButton>
+#include <QtGui/QScrollArea>
+#include <QtGui/QSplitter>
+#include <QtGui/QStackedWidget>
+#include <QtGui/QVBoxLayout>
+
+OptionDialog *OptionDialog::instance_ = 0;
+
+OptionDialog &OptionDialog::instance(QWidget *parent)
+{
+       if (!instance_) {
+               instance_ = new OptionDialog(parent);
+       }
+       return *instance_;
+}
+
+void OptionDialog::destroyInstance()
+{
+       if (instance_) {
+               delete instance_;
+               instance_ = 0;
+       }
+}
+
+OptionDialog::OptionDialog(QWidget *parent)
+: QDialog(parent)
+{
+       setWindowTitle(tr("Settings") + "[*] - " 
+                       + QCoreApplication::applicationName());
+
+       pagesStackedWidget = new QStackedWidget;
+       pagesStackedWidget->addWidget(new AnglesOptionWidget);
+       pagesStackedWidget->addWidget(new AxisDataOptionWidget);
+       pagesStackedWidget->addWidget(new AxisLabelOptionWidget);
+       pagesStackedWidget->addWidget(new AxisRangeOptionWidget);
+       pagesStackedWidget->addWidget(new AxisTicsOptionWidget);
+       pagesStackedWidget->addWidget(new BarOptionWidget);
+       pagesStackedWidget->addWidget(new BoxWidthOptionWidget);
+       pagesStackedWidget->addWidget(new DummyOptionWidget);
+       pagesStackedWidget->addWidget(new EncodingOptionWidget);
+       pagesStackedWidget->addWidget(new FormatOptionWidget);
+       pagesStackedWidget->addWidget(new GridOptionWidget);
+       pagesStackedWidget->addWidget(new KeyOptionWidget);
+       pagesStackedWidget->addWidget(new LogScaleOptionWidget);
+       pagesStackedWidget->addWidget(new MappingOptionWidget);
+       pagesStackedWidget->addWidget(new MAxisTicsOptionWidget);
+       pagesStackedWidget->addWidget(new OutputOptionWidget);
+       pagesStackedWidget->addWidget(new ParametricOptionWidget);
+       pagesStackedWidget->addWidget(new SamplesOptionWidget);
+       pagesStackedWidget->addWidget(new SizeOptionWidget);
+       pagesStackedWidget->addWidget(new TerminalOptionWidget);
+       pagesStackedWidget->addWidget(new TitleOptionWidget);
+       pagesStackedWidget->addWidget(new ViewOptionWidget);
+
+       const int count = pagesStackedWidget->count();
+       initBitArray.resize(count);
+
+       contentsListWidget = new QListWidget;
+       for (int i = 0; i < count; i++) {
+               QWidget *widget = pagesStackedWidget->widget(i);
+               contentsListWidget->addItem(widget->windowTitle());
+               contentsListWidget->item(i)->setWhatsThis(widget->whatsThis());
+       }
+       connect(contentsListWidget,
+                       SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)),
+                       this, SLOT(changePage(QListWidgetItem *, QListWidgetItem*)));
+       // FIXME
+       contentsListWidget->setCurrentRow(1);
+       contentsListWidget->setCurrentRow(0);
+
+       QScrollArea *scrollArea = new QScrollArea;
+       scrollArea->setWidget(pagesStackedWidget);
+       scrollArea->setWidgetResizable(true);
+       scrollArea->setFrameShadow(QFrame::Plain);
+       scrollArea->setFrameShape(QFrame::NoFrame);
+       
+       QFrame *lineFrame = new QFrame;
+       lineFrame->setFrameShape(QFrame::HLine);
+       lineFrame->setFrameShadow(QFrame::Sunken);
+
+       QPushButton *initPushButton = new QPushButton;
+       initPushButton->setText(tr("&Default"));
+       initPushButton->setAutoDefault(false);
+       initPushButton->setDefault(false);
+       connect(initPushButton, SIGNAL(clicked()),
+                       this, SLOT(init()));
+
+       QPushButton *acceptPushButton = new QPushButton;
+       acceptPushButton->setText(tr("&OK"));
+       acceptPushButton->setAutoDefault(true);
+       acceptPushButton->setDefault(true);
+       connect(acceptPushButton, SIGNAL(clicked()),
+                       this, SLOT(accept()));
+
+       QPushButton *applyPushButton = new QPushButton;
+       applyPushButton->setText(tr("&Apply"));
+       connect(applyPushButton, SIGNAL(clicked()),
+                       this, SLOT(apply()));
+
+       QPushButton *rejectPushButton = new QPushButton;
+       rejectPushButton->setText(tr("&Cancel"));
+       connect(rejectPushButton, SIGNAL(clicked()),
+                       this, SLOT(reject()));
+
+       QHBoxLayout *buttonLayout = new QHBoxLayout;
+       buttonLayout->addWidget(initPushButton);
+       buttonLayout->addStretch();
+       buttonLayout->addWidget(acceptPushButton);
+       buttonLayout->addWidget(applyPushButton);
+       buttonLayout->addWidget(rejectPushButton);
+
+       QVBoxLayout *pagesLayout = new QVBoxLayout;
+       pagesLayout->addWidget(scrollArea);
+       pagesLayout->addWidget(lineFrame);
+       pagesLayout->addLayout(buttonLayout);
+
+       QWidget *pagesWidget = new QWidget;
+       pagesWidget->setLayout(pagesLayout);
+
+       QSplitter *centerSplitter = new QSplitter;
+       centerSplitter->addWidget(contentsListWidget);
+       centerSplitter->addWidget(pagesWidget);
+
+       QVBoxLayout *mainLayout = new QVBoxLayout;
+       mainLayout->addWidget(centerSplitter);
+
+       setLayout(mainLayout);
+}
+
+void OptionDialog::accept()
+{
+       apply();
+       QDialog::accept();
+}
+
+void OptionDialog::apply()
+{
+       qobject_cast<OptionWidget *>(pagesStackedWidget->currentWidget())
+               ->apply();
+       setWindowModified(false);
+}
+
+void OptionDialog::reject()
+{
+       // 変更を破棄
+       if (isWindowModified()) {
+               discard(qobject_cast<OptionWidget *>(pagesStackedWidget->
+                                       currentWidget()));
+       }
+       QDialog::reject();
+}
+
+void OptionDialog::init()
+{
+       qobject_cast<OptionWidget *>(pagesStackedWidget->currentWidget())
+               ->init();
+       setWindowModified(true);
+}
+
+void OptionDialog::discard(OptionWidget *optionWidget)
+{
+       optionWidget->disconnect(SIGNAL(modified()));
+       qobject_cast<OptionWidget *>(pagesStackedWidget->currentWidget())
+               ->discard();
+       connect(optionWidget, SIGNAL(modified()),
+                       this, SLOT(setModified()));
+       setWindowModified(false);
+}
+
+void OptionDialog::changePage(QListWidgetItem *current, 
+               QListWidgetItem *previous)
+{
+       if (!current) {
+               current = previous;
+       } else if (isWindowModified()) {
+               // 設定を保存せずに、別の項目に移動しようとした場合に確認する
+               switch (QMessageBox::warning(this, tr("Unsaved Changes") + " - "
+                                       + QCoreApplication::applicationName(),
+                                       tr("There are unsaved changes in this option.\n"
+                                               "Do you want to apply the changes "
+                                               "before opening the new option?"),
+                                       tr("&Apply"), tr("&Discard"), tr("&Cancel"), 0, 2)) {
+               case 0:
+                       apply();
+                       break;
+               case 1:
+                       {
+                               int index = contentsListWidget->row(previous);
+                               discard(qobject_cast<OptionWidget *>(pagesStackedWidget
+                                                       ->widget(index)));
+                       }
+                       break;
+               case 2:
+                       setWindowModified(false);
+                       contentsListWidget->setCurrentRow(
+                                       contentsListWidget->row(previous));
+                       setWindowModified(true);
+                       return;
+               }
+       }
+       int index = contentsListWidget->row(current);
+       // 以前に表示した項目でなければ、ウィジェットを初期化する
+       if (!initBitArray.at(index)) {
+               OptionWidget *optionWidget 
+                       = qobject_cast<OptionWidget *>(pagesStackedWidget->widget(index));
+               optionWidget->construct();
+               optionWidget->init();
+               connect(optionWidget, SIGNAL(executed(const QString &)),
+                               this, SIGNAL(executed(const QString &)));
+               connect(optionWidget, SIGNAL(modified()),
+                               this, SLOT(setModified()));
+               initBitArray.setBit(index);
+       }
+       pagesStackedWidget->setCurrentIndex(index);
+}
+
+void OptionDialog::setModified()
+{
+       setWindowModified(true);
+}
+
+void OptionDialog::closeEvent(QCloseEvent *e)
+{
+       // ダイアログが閉じられたときに、設定を破棄する
+       if (isWindowModified()) {
+               discard(qobject_cast<OptionWidget *>(pagesStackedWidget->
+                                       currentWidget()));
+       }
+       e->accept();
+}
diff --git a/src/gui/OptionDialog.h b/src/gui/OptionDialog.h
new file mode 100644 (file)
index 0000000..c210e68
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef OPTION_DIALOG_INCLUDED
+#define OPTION_DIALOG_INCLUDED
+
+class OptionWidget;
+
+#include <QtCore/QBitArray>
+#include <QtGui/QDialog>
+class QCloseEvent;
+class QListWidget;
+class QListWidgetItem;
+class QDialog;
+class QStackedWidget;
+
+//! 設定ダイアログ (Singleton)
+class OptionDialog : public QDialog
+{
+       Q_OBJECT
+
+       public:
+               static OptionDialog &instance(QWidget *parent = 0);
+               static void destroyInstance();
+
+    private slots:
+               //! 設定を適用してダイアログを閉じる
+               void accept();
+               //! 設定を適用する
+               void apply();
+               //! 設定を破棄してダイアログを閉じる
+               void reject();
+               //! 設定を初期化する
+               void init();
+        void changePage(QListWidgetItem *current, QListWidgetItem *previous);
+               //! 設定に変更が加えられたことにする
+               void setModified();
+
+       signals:
+               //! コマンドを実行する
+               /*!
+                * \param command 実行するコマンド
+                */
+               void executed(const QString &command);
+
+       private:
+               OptionDialog(QWidget *parent = 0);
+               // don't implement these
+               OptionDialog(const OptionDialog &);
+               OptionDialog &operator=(const OptionDialog &);
+
+               //! 設定を破棄する
+               void discard(OptionWidget *optionWidget);
+               void closeEvent(QCloseEvent *e);
+               static OptionDialog *instance_;
+               QListWidget *contentsListWidget;
+               QStackedWidget *pagesStackedWidget;
+               //! 設定項目のウィジェットが初期化済みか調べるのに使う配列
+               QBitArray initBitArray;
+};
+
+#endif // OPTION_DIALOG_INCLUDED
diff --git a/src/gui/PlotOptionDialog.cpp b/src/gui/PlotOptionDialog.cpp
new file mode 100644 (file)
index 0000000..9ae3e63
--- /dev/null
@@ -0,0 +1,169 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "PlotOptionDialog.h"
+#include "Plot.h"
+#include "PlotModifierWidget.h"
+#include "PlotOthersWidget.h"
+#include "PlotStyleWidget.h"
+#include "PlotTitleWidget.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtGui/QListWidget>
+#include <QtGui/QPushButton>
+#include <QtGui/QSplitter>
+#include <QtGui/QStackedWidget>
+#include <QtGui/QVBoxLayout>
+
+PlotOptionDialog::PlotOptionDialog(QWidget *parent)
+: QDialog(parent)
+{
+       setModal(true);
+
+       plotOthersWidget = new PlotOthersWidget;
+       plotTitleWidget = new PlotTitleWidget;
+       plotStyleWidget = new PlotStyleWidget;
+       plotModifierWidget = new PlotModifierWidget;
+
+       pagesStackedWidget = new QStackedWidget;
+       pagesStackedWidget->addWidget(plotModifierWidget);
+       pagesStackedWidget->addWidget(plotTitleWidget);
+       pagesStackedWidget->addWidget(plotStyleWidget);
+       pagesStackedWidget->addWidget(plotOthersWidget);
+
+       contentsListWidget = new QListWidget;
+       for (int i = 0, j = pagesStackedWidget->count(); i < j; i++) {
+               QWidget *widget = pagesStackedWidget->widget(i);
+               contentsListWidget->addItem(widget->windowTitle());
+               contentsListWidget->item(i)->setWhatsThis(widget->whatsThis());
+       }
+       contentsListWidget->setCurrentRow(0);
+       connect(contentsListWidget,
+                       SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)),
+                       this, SLOT(changePage(QListWidgetItem *, QListWidgetItem *)));
+
+       QSplitter *centerSplitter = new QSplitter;
+       centerSplitter->addWidget(contentsListWidget);
+       centerSplitter->addWidget(pagesStackedWidget);
+
+       QPushButton *plotPushButton = new QPushButton;
+       plotPushButton->setText(tr("&2D Plot Test"));
+       plotPushButton->setAutoDefault(false);
+       plotPushButton->setDefault(false);
+       connect(plotPushButton, SIGNAL(clicked()), this, SLOT(plot()));
+
+       QPushButton *splotPushButton = new QPushButton;
+       splotPushButton->setAutoDefault(false);
+       splotPushButton->setDefault(false);
+       splotPushButton->setText(tr("&3D Plot Test"));
+       connect(splotPushButton, SIGNAL(clicked()), this, SLOT(splot()));
+
+       QPushButton *acceptPushButton = new QPushButton;
+       acceptPushButton->setText(tr("&OK"));
+       acceptPushButton->setAutoDefault(true);
+       acceptPushButton->setDefault(true);
+       connect(acceptPushButton, SIGNAL(clicked()), this, SLOT(accept()));
+
+       QPushButton *applyPushButton = new QPushButton;
+       applyPushButton->setText(tr("&Apply"));
+       connect(applyPushButton, SIGNAL(clicked()), this, SLOT(apply()));
+
+       QPushButton *cancelPushButton = new QPushButton;
+       cancelPushButton->setText(tr("&Cancel"));
+       connect(cancelPushButton, SIGNAL(clicked()), this, SLOT(reject()));
+
+       // ------------------------ create layouts
+       // ----------- assemble layouts and widgets
+
+       QHBoxLayout *buttonLayout = new QHBoxLayout;
+       buttonLayout->addStretch();
+       buttonLayout->addWidget(plotPushButton);
+       buttonLayout->addWidget(splotPushButton);
+       buttonLayout->addWidget(acceptPushButton);
+       buttonLayout->addWidget(applyPushButton);
+       buttonLayout->addWidget(cancelPushButton);
+
+       QVBoxLayout *mainLayout = new QVBoxLayout;
+       mainLayout->addWidget(centerSplitter);
+       mainLayout->addLayout(buttonLayout);
+
+       setLayout(mainLayout);
+}
+
+void PlotOptionDialog::setPlot(Plot &plot)
+{
+       plot_ = &plot;
+       bool isFunction = plot.isFunction();
+       setWindowTitle(tr("Options of %1 %2")
+                       .arg(isFunction ? tr("Function") : tr("Data File"))
+                       .arg(isFunction ? plot.function() : plot.dataFile())
+                       + " - " + QCoreApplication::applicationName());
+       plotOthersWidget->setPlotAxis(plot.axis());
+       plotTitleWidget->setPlotTitle(plot.titleSpecification());
+       plotStyleWidget->setPlotStyle(plot.style());
+       if (plot.isFunction()) {
+               plotModifierWidget->setEnabled(false);
+       } else {
+               plotModifierWidget->setPlotModifier(plot.dataFileModifier());
+       }
+}
+
+void PlotOptionDialog::accept()
+{
+       apply();
+       QDialog::accept();
+}
+
+void PlotOptionDialog::apply()
+{
+       setPlotOption(*plot_);
+}
+
+void PlotOptionDialog::plot()
+{
+       Plot plot = *plot_;
+       setPlotOption(plot);
+       emit executed("plot " + plot.command());
+}
+
+// TODO use Splot
+void PlotOptionDialog::splot()
+{
+       Plot plot = *plot_;
+       setPlotOption(plot);
+       emit executed("splot " + plot.command());
+}
+
+void PlotOptionDialog::setPlotOption(Plot &plot)
+{
+       plot.setAxis(plotOthersWidget->plotAxis());
+       plot.setTitleSpecification(plotTitleWidget->plotTitle());
+       plot.setStyle(plotStyleWidget->plotStyle());
+       if (!plot.isFunction()) {
+               plot.setDataFileModifier(plotModifierWidget->plotModifier());
+       }
+}
+
+void PlotOptionDialog::changePage(QListWidgetItem *current,
+               QListWidgetItem *previous)
+{
+       if (!current) {
+               current = previous;
+       }
+       pagesStackedWidget->setCurrentIndex(contentsListWidget->row(current));
+}
diff --git a/src/gui/PlotOptionDialog.h b/src/gui/PlotOptionDialog.h
new file mode 100644 (file)
index 0000000..dbe8369
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef PLOT_OPTION_DIALOG_INCLUDED
+#define PLOT_OPTION_DIALOG_INCLUDED
+
+class Plot;
+class PlotModifierWidget;
+class PlotOthersWidget;
+class PlotStyleWidget;
+class PlotTitleWidget;
+
+#include <QtGui/QDialog>
+class QListWidget;
+class QListWidgetItem;
+class QStackedWidget;
+
+//! plot コマンドのオプションを設定するダイアログ
+class PlotOptionDialog : public QDialog
+{
+       Q_OBJECT
+
+       public:
+               explicit PlotOptionDialog(QWidget *parent = 0);
+
+               void setPlot(Plot &plot);
+
+       private slots:
+               //! 設定を保存して、ダイアログを閉じる
+               void accept();
+               //! 設定を保存する
+               void apply();
+               //! 二次元のプロットをする
+               void plot();
+               //! 三次元のプロットをする
+               void splot();
+               void changePage(QListWidgetItem *current, QListWidgetItem *previous);
+
+       signals:
+               //! コマンドを実行する
+               /*!
+                * \param 実行するコマンド
+                */
+               void executed(const QString &);
+
+       private:
+               // don't implement these
+               PlotOptionDialog(const PlotOptionDialog &);
+               PlotOptionDialog &operator=(const PlotOptionDialog &);
+
+               void setPlotOption(Plot &plot);
+               //! オプションを設定する項目に対応するオブジェクト
+               Plot *plot_;
+               QStackedWidget *pagesStackedWidget;
+               QListWidget *contentsListWidget;
+               PlotModifierWidget *plotModifierWidget;
+               PlotOthersWidget *plotOthersWidget;
+               PlotTitleWidget *plotTitleWidget;
+               PlotStyleWidget *plotStyleWidget;
+};
+#endif // PLOT_OPTION_DIALOG_INCLUDED
diff --git a/src/gui/Process.cpp b/src/gui/Process.cpp
new file mode 100644 (file)
index 0000000..a875fac
--- /dev/null
@@ -0,0 +1,160 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "Process.h"
+#include "ConsoleDialog.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtCore/QProcess>
+#include <QtCore/QSettings>
+#include <QtCore/QTextCodec>
+#include <QtGui/QFileDialog>
+#include <QtGui/QMessageBox>
+
+Process::Process(QObject *parent)
+: QObject(parent), process(new QProcess)
+{
+       QSettings settings;
+       settings.beginGroup("Process");
+       QByteArray encoding = settings.value("encoding").toByteArray();
+       if (encoding.isEmpty() && !QTextCodec::codecForName(encoding)) {
+               textCodec_ = QTextCodec::codecForLocale();
+       } else {
+               textCodec_ = QTextCodec::codecForName(encoding);
+       }
+       QByteArray name = textCodec_->name(); 
+       if (encoding != name) {
+               settings.setValue("encoding", name);
+       }
+       settings.endGroup();
+
+       if (!startProcess()) {
+               QMessageBox::critical(0, QCoreApplication::applicationName(),
+                               tr("Gnuplot could not be started"));
+               exit(1);
+       }
+       connect(process, SIGNAL(readyReadStandardError()),
+                       this, SLOT(readStandardError()));
+
+       consoleDialog = new ConsoleDialog;
+}
+
+bool Process::startProcess()
+{
+       // 設定ファイルから gnuplot のバスを読み込むことを試みる
+       QSettings settings;
+       settings.beginGroup("Process");
+       QString path = settings.value("path").toString();
+       settings.endGroup();
+
+       // 1st attempt
+       if (!path.isEmpty() && canStart(path)) {
+               return true;
+       }
+
+       path = 
+#ifdef Q_OS_WIN32
+               // Windows の場合は、pgnuplot.exe を介して wgnuplot.exe を起動
+               "pgnuplot.exe"
+#else
+               // それ以外は実行可能ファイル gnuplot を起動
+               "gnuplot"
+#endif
+               ;
+
+       // 2nd attempt
+       if (canStart(path)) {
+               return true;
+       }
+
+       // ユーザにダイアログで gnuplot の場所を指定させる
+       path = QFileDialog::getOpenFileName(0, 
+                       tr("Open gnuplot") + " - "
+                       + QCoreApplication::applicationName(), QString(),
+                       "gnuplot (" + path + ")");
+
+       // 3rd attempt
+       if (path.isNull()) {
+               return false;
+       }
+       return canStart(path);
+}
+
+bool Process::canStart(const QString &path)
+{
+       process->start(path, QStringList());
+       // 起動に成功したらパスを設定ファイルに保存
+       if (process->waitForStarted()) {
+               QSettings settings;
+               settings.beginGroup("Process");
+               if (path != settings.value("path").toString()) {
+                       settings.setValue("path", path);
+               }
+               settings.endGroup();
+               return true;
+       } 
+       return false;
+}
+
+void Process::execute(const QString &command)
+{
+       // コマンドに改行文字を追加し、日本語などが使えるように
+       // デフォルトエンコーディングに変換して実行する
+       process->write(textCodec_->fromUnicode(command).append('\n'));
+       consoleDialog->execute(command);
+}
+
+void Process::readStandardError()
+{
+       // エラーが出力された場合は
+       // エラーメッセージを表示するダイアログをユーザに見せる
+       consoleDialog->show();
+       consoleDialog->readStandardError(process->readAllStandardError());
+}
+
+void Process::setTextCodec(const QTextCodec &codec)
+{
+       QSettings settings;
+       settings.beginGroup("Process");
+       QByteArray name = codec.name();
+       if (name != settings.value("encoding").toByteArray()) {
+               settings.setValue("encoding", name);
+               textCodec_ = QTextCodec::codecForName(name);
+       }
+       settings.endGroup();
+}
+
+const QTextCodec &Process::textCodec() const
+{
+       return *textCodec_;
+}
+
+void Process::closeDialog()
+{
+       consoleDialog->close();
+}
+
+void Process::setDialogVisible(bool visible)
+{
+       consoleDialog->setVisible(visible);
+}
+
+bool Process::isDialogVisible()
+{
+       return consoleDialog->isVisible();
+}
diff --git a/src/gui/Process.h b/src/gui/Process.h
new file mode 100644 (file)
index 0000000..6a60da2
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef PROCESS_INCLUDED
+#define PROCESS_INCLUDED
+
+class ConsoleDialog;
+
+#include <QtCore/QObject>
+class QProcess;
+class QString;
+class QTextCodec;
+
+//! gnuplot のプロセスを扱うクラス
+class Process : public QObject
+{
+       Q_OBJECT
+
+       public:
+               explicit Process(QObject *parent = 0);
+
+               void setTextCodec(const QTextCodec &codec);
+               const QTextCodec &textCodec() const;
+
+               void closeDialog();
+               void setDialogVisible(bool visible);
+               bool isDialogVisible();
+
+       public slots:
+               //! コマンドを実行する
+               /*!
+                * \param command 実行するコマンド
+                */
+               void execute(const QString &command);
+
+       private slots:
+               void readStandardError();
+
+       private:
+               // don't implement these 
+               Process(const Process &);
+               Process &operator=(const Process &);
+
+               //! gnuplot のプロセスを起動する
+               /*!
+                * \return 起動に成功したら true
+                */
+               bool startProcess();
+               //! 起動できるか調べる
+               /*!
+                * \param path gnuplot のパス
+                * \return 起動できたら true
+                */
+               bool canStart(const QString &path);
+
+               QProcess *process;
+               QTextCodec *textCodec_;
+               ConsoleDialog *consoleDialog;
+};
+
+#endif // PROCESS_INCLUDED
diff --git a/src/gui/RawCommandDialog.cpp b/src/gui/RawCommandDialog.cpp
new file mode 100644 (file)
index 0000000..333ddd5
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "RawCommandDialog.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QPushButton>
+#include <QtGui/QTextEdit>
+#include <QtGui/QVBoxLayout>
+
+RawCommandDialog *RawCommandDialog::instance_ = 0;
+
+RawCommandDialog &RawCommandDialog::instance(QWidget *parent)
+{
+       if (!instance_) {
+               instance_ = new RawCommandDialog(parent);
+       }
+       return *instance_;
+}
+
+void RawCommandDialog::destroyInstance()
+{
+       if (instance_) {
+               delete instance_;
+               instance_ = 0;
+       }
+}
+
+RawCommandDialog::RawCommandDialog(QWidget *parent)
+: QDialog(parent)
+{
+       setWindowTitle(tr("Raw Commands") + " - " 
+                       + QCoreApplication::applicationName());
+
+       rawTextEdit = new QTextEdit;
+
+       execPushButton = new QPushButton;
+       connect(execPushButton, SIGNAL(clicked()), SLOT(accept()));
+       execPushButton->setText(tr("&Execute"));
+       execPushButton->setDefault(true);
+       execPushButton->setEnabled(false);
+       connect(rawTextEdit, SIGNAL(textChanged()),
+                       this, SLOT(setButton()));
+
+       QPushButton *cancelPushButton = new QPushButton;
+       connect(cancelPushButton, SIGNAL(clicked()), SLOT(reject()));
+       cancelPushButton->setText(tr("&Close"));
+
+       // create layouts
+       // assemble layouts
+       QHBoxLayout *buttonLayout = new QHBoxLayout;
+       buttonLayout->addStretch();
+       buttonLayout->addWidget(execPushButton);
+       buttonLayout->addWidget(cancelPushButton);
+
+       QVBoxLayout *mainLayout = new QVBoxLayout;
+       mainLayout->addWidget(rawTextEdit);
+       mainLayout->addLayout(buttonLayout);
+
+       setLayout(mainLayout);
+}
+
+void RawCommandDialog::accept()
+{
+       emit executed(rawTextEdit->toPlainText());
+}
+
+void RawCommandDialog::setButton()
+{
+       // テキストエディット内が空でなければ、実行ボタンを有効にする
+       execPushButton->setEnabled(!rawTextEdit->toPlainText().isEmpty());
+}
diff --git a/src/gui/RawCommandDialog.h b/src/gui/RawCommandDialog.h
new file mode 100644 (file)
index 0000000..1f71aab
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef RAW_COMMAND_DIALOG_INCLUDED
+#define RAW_COMMAND_DIALOG_INCLUDED
+
+#include <QtGui/QDialog>
+class QTextEdit;
+
+//! コマンドをそのまま gnuplot に対して送るためのダイアログ (Singleton)
+class RawCommandDialog : public QDialog
+{
+       Q_OBJECT
+
+       public:
+               static RawCommandDialog &instance(QWidget *parent = 0);
+               static void destroyInstance();
+
+       private slots:
+               void setButton();
+
+       signals:
+               //! コマンドを実行する
+               /*!
+                * \param command 実行するコマンド
+                */
+               void executed(const QString &command);
+
+       private:
+               RawCommandDialog(QWidget *parent = 0);
+               // don't implement these
+               RawCommandDialog(const RawCommandDialog &);
+               RawCommandDialog &operator=(const RawCommandDialog &);
+
+               void accept();
+               static RawCommandDialog *instance_;
+               QTextEdit *rawTextEdit;
+               QPushButton *execPushButton;
+};
+#endif // RAW_COMMAND_DIALOG_INCLUDED
diff --git a/src/gui/fit/FitBasicWidget.cpp b/src/gui/fit/FitBasicWidget.cpp
new file mode 100644 (file)
index 0000000..77716c7
--- /dev/null
@@ -0,0 +1,228 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "FitBasicWidget.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QFileDialog>
+#include <QtGui/QGroupBox>
+#include <QtGui/QGridLayout>
+#include <QtGui/QPushButton>
+#include <QtGui/QRadioButton>
+#include <QtGui/QVBoxLayout>
+
+FitBasicWidget::FitBasicWidget(QWidget *parent)
+: QWidget(parent)
+{
+       setWindowTitle(tr("Basic"));
+       setWhatsThis(tr("fit &lt;function&gt; '&lt;datafile&gt;'<br>"
+                               "via '&lt;parameter file&gt;'<br>"
+                               "| &lt;var1&gt;{,&lt;var2&gt;,...}"));
+
+       functionLineEdit = new QLineEdit;
+       connect(functionLineEdit, SIGNAL(textChanged(const QString &)),
+                       this, SIGNAL(optionChanged()));
+
+       QLabel *functionLabel = new QLabel;
+       functionLabel->setSizePolicy(
+                       QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed));
+       functionLabel->setText(tr("F&unction:"));
+       functionLabel->setBuddy(functionLineEdit);
+
+       QLabel *lvalueLabel = new QLabel;
+       lvalueLabel->setText("<big><strong>f(x) =</strong></big>");
+       lvalueLabel->setSizePolicy(
+                       QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+
+       dataFileLineEdit = new QLineEdit;
+       connect(dataFileLineEdit, SIGNAL(textChanged(const QString &)),
+                       this, SIGNAL(optionChanged()));
+
+       QLabel *dataFileLabel = new QLabel;
+       dataFileLabel->setSizePolicy(
+                       QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed));
+       dataFileLabel->setText(tr("&Data File:"));
+       dataFileLabel->setBuddy(dataFileLineEdit);
+
+       QPushButton *getDatafilePushButton = new QPushButton;
+       getDatafilePushButton->setSizePolicy(
+                       QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+       connect(getDatafilePushButton, SIGNAL(clicked()),
+                       SLOT(openDataFile()));
+       getDatafilePushButton->setText(tr("&Open..."));
+
+       paramFileRadioButton = new QRadioButton;
+       paramFileRadioButton->setText(tr("&Parameter File:"));
+       connect(paramFileRadioButton, SIGNAL(toggled(bool)),
+                       this, SIGNAL(optionChanged()));
+
+       paramFileLineEdit = new QLineEdit;
+       paramFileLineEdit->setEnabled(false);
+       connect(paramFileRadioButton, SIGNAL(toggled(bool)),
+                       paramFileLineEdit, SLOT(setEnabled(bool)));
+       connect(paramFileLineEdit, SIGNAL(textChanged(const QString &)),
+                       this, SIGNAL(optionChanged()));
+
+       QPushButton *getParamFilePushButton = new QPushButton;
+       getParamFilePushButton->setEnabled(false);
+       getParamFilePushButton->setText(tr("Op&en..."));
+       connect(paramFileRadioButton, SIGNAL(toggled(bool)),
+                       getParamFilePushButton, SLOT(setEnabled(bool)));
+       connect(getParamFilePushButton, SIGNAL(clicked()),
+                       SLOT(openParamFile()));
+
+       paramCSLRadioButton = new QRadioButton;
+       paramCSLRadioButton->setText(tr("Co&mma Seperated List:"));
+       paramCSLRadioButton->setChecked(true);
+
+       paramCSLLineEdit = new QLineEdit;
+       connect(paramCSLRadioButton, SIGNAL(toggled(bool)),
+                       paramCSLLineEdit, SLOT(setEnabled(bool)));
+       connect(paramCSLLineEdit, SIGNAL(textChanged(const QString &)),
+                       this, SIGNAL(optionChanged()));
+
+       QGridLayout *funcFileLayout = new QGridLayout;
+       funcFileLayout->addWidget(functionLabel, 0, 0);
+       funcFileLayout->addWidget(lvalueLabel, 0, 1);
+       funcFileLayout->addWidget(functionLineEdit, 0, 2, 1, 2);
+       funcFileLayout->addWidget(dataFileLabel, 1, 0);
+       funcFileLayout->addWidget(dataFileLineEdit, 1, 1, 1, 2);
+       funcFileLayout->addWidget(getDatafilePushButton, 1, 3);
+
+       QGridLayout *paramLayout = new QGridLayout;
+       paramLayout->addWidget(paramFileRadioButton, 0, 0, 1, 3);
+       paramLayout->addItem(new QSpacerItem(20, 20, 
+                               QSizePolicy::Fixed, QSizePolicy::Minimum), 1, 0);
+       paramLayout->addWidget(paramFileLineEdit, 1, 1);
+       paramLayout->addWidget(getParamFilePushButton, 1, 2);
+       paramLayout->addWidget(paramCSLRadioButton, 2, 0, 1, 2);
+       paramLayout->addItem(new QSpacerItem(20, 20,
+                               QSizePolicy::Fixed, QSizePolicy::Minimum), 3, 0);
+       paramLayout->addWidget(paramCSLLineEdit, 3, 1, 1, 2);
+
+       QGroupBox *paramGroupBox = new QGroupBox(tr("Parameters"));
+       paramGroupBox->setLayout(paramLayout);
+
+       QVBoxLayout *mainLayout = new QVBoxLayout;
+       mainLayout->setMargin(0);
+       mainLayout->addLayout(funcFileLayout);
+       mainLayout->addWidget(paramGroupBox);
+       mainLayout->addStretch();
+
+       setLayout(mainLayout);
+}
+
+void FitBasicWidget::setFitFunction(const QString &function)
+{
+       functionLineEdit->setText(function);
+}
+
+QString FitBasicWidget::fitFunction() const
+{
+       return functionLineEdit->text();
+}
+
+void FitBasicWidget::setFitDataFile(const QString &file)
+{
+       dataFileLineEdit->setText(file);
+}
+
+QString FitBasicWidget::fitDataFile() const
+{
+       return dataFileLineEdit->text();
+}
+
+void FitBasicWidget::setFitParameterFile(bool isFile)
+{
+       if (isFile) {
+               paramFileRadioButton->setChecked(true);
+       } else {
+               paramCSLRadioButton->setChecked(true);
+       }
+}
+
+bool FitBasicWidget::isFitParameterFile() const
+{
+       return paramFileRadioButton->isChecked();
+}
+
+void FitBasicWidget::setFitParameterFile(const QString &file)
+{
+       paramFileLineEdit->setText(file);
+}
+
+QString FitBasicWidget::fitParameterFile() const
+{
+       return paramFileLineEdit->text();
+}
+
+void FitBasicWidget::setFitVariable(const QStringList &var)
+{
+       paramCSLLineEdit->setText(var.join(","));
+}
+
+QStringList FitBasicWidget::fitVariable() const
+{
+       return paramCSLLineEdit->text().split(",");
+}
+
+void FitBasicWidget::openDataFile()
+{
+       QString file = QFileDialog::getOpenFileName(this,
+                       tr("Open a data file") + " - "
+                       + QCoreApplication::applicationName(),
+                       currentDataFile);
+       if (!file.isEmpty()) {
+               dataFileLineEdit->setText(file);
+               currentDataFile = file;
+       }
+}
+
+void FitBasicWidget::openParamFile()
+{
+       QString file = QFileDialog::getOpenFileName(this,
+                       tr("Open a parameter file") + " - " 
+                       + QCoreApplication::applicationName(),
+                       currentParamFile);
+       if (!file.isEmpty()) {
+               paramFileLineEdit->setText(file);
+               currentParamFile = file;
+       }
+}
+
+bool FitBasicWidget::canFit() const
+{
+       bool flag = true;
+       if (functionLineEdit->text().isEmpty() 
+                       || dataFileLineEdit->text().isEmpty()) {
+               flag = false;
+       } else {
+               if (paramFileRadioButton->isChecked()) {
+                       if (paramFileLineEdit->text().isEmpty()) {
+                               flag = false;
+                       }
+               } else if (paramCSLRadioButton->isChecked()) {
+                       if (paramCSLLineEdit->text().isEmpty()) {
+                               flag = false;
+                       }
+               }
+       }
+       return flag;
+}
diff --git a/src/gui/fit/FitBasicWidget.h b/src/gui/fit/FitBasicWidget.h
new file mode 100644 (file)
index 0000000..eafd092
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef FIT_BASIC_WIDGET_INCLUDED
+#define FIT_BASIC_WIDGET_INCLUDED
+
+#include <QtGui/QWidget>
+class QLineEdit;
+class QRadioButton;
+
+class FitBasicWidget : public QWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit FitBasicWidget(QWidget *parent = 0);
+
+               void setFitFunction(const QString &function);
+               QString fitFunction() const;
+
+               void setFitDataFile(const QString &file);
+               QString fitDataFile() const;
+
+               void setFitParameterFile(bool isFile);
+               bool isFitParameterFile() const;
+
+               void setFitParameterFile(const QString &file);
+               QString fitParameterFile() const;
+
+               void setFitVariable(const QStringList &var);
+               QStringList fitVariable() const;
+
+               bool canFit() const;
+
+       private slots:
+               void openDataFile();
+               void openParamFile();
+
+       signals:
+               void optionChanged();
+
+       private:
+               // don't implement these
+               FitBasicWidget(const FitBasicWidget &);
+               FitBasicWidget &operator=(const FitBasicWidget &);
+
+               QString currentDataFile;
+               QString currentParamFile;
+               QLineEdit *functionLineEdit;
+               QLineEdit *dataFileLineEdit;
+               QRadioButton *paramFileRadioButton;
+               QLineEdit *paramFileLineEdit;
+               QRadioButton *paramCSLRadioButton;
+               QLineEdit *paramCSLLineEdit;
+};
+#endif // PLOT_BASIC_WIDGET_INCLUDED
diff --git a/src/gui/fit/FitModifierWidget.cpp b/src/gui/fit/FitModifierWidget.cpp
new file mode 100644 (file)
index 0000000..552f6b6
--- /dev/null
@@ -0,0 +1,337 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "FitModifierWidget.h"
+#include "FitModifier.h"
+
+#include <QtGui/QCheckBox>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QGridLayout>
+#include <QtGui/QSpinBox>
+#include <QtGui/QTabWidget>
+#include <QtGui/QVBoxLayout>
+
+FitModifierWidget::FitModifierWidget(QWidget *parent)
+: QWidget(parent)
+{
+       setWindowTitle(tr("Data File"));
+       setWhatsThis(tr("fit {index &lt;index list&gt;}<br>"
+                               "{every &lt;every list&gt;}<br>"
+                               "{using &lt;using list&gt;}"));
+
+       const QString AXIS[] = { "&X", "&Y", "&Z" };
+       QLabel *columnLabel[AXIS_NUM];
+       for (int i = 0; i < AXIS_NUM; i++) {
+               columnLineEdit[i] = new QLineEdit;
+
+               columnLabel[i] = new QLabel;
+               columnLabel[i]->setText(AXIS[i] + tr(" Column:"));
+               columnLabel[i]->setBuddy(columnLineEdit[i]);
+       }
+
+       formatLineEdit = new QLineEdit;
+
+       QLabel *formatLabel = new QLabel;
+       formatLabel->setText(tr("Fo&rmat:"));
+       formatLabel->setBuddy(formatLineEdit);
+
+       dataSetStartCheckBox = new QCheckBox;
+       dataSetStartCheckBox->setText(tr("Specify a S&tarting Index"));
+       connect(dataSetStartCheckBox, SIGNAL(toggled(bool)),
+                       this, SLOT(setIndex()));
+
+       dataSetStartSpinBox = new QSpinBox;
+       connect(dataSetStartCheckBox, SIGNAL(toggled(bool)),
+                       dataSetStartSpinBox, SLOT(setEnabled(bool)));
+
+       dataSetEndCheckBox = new QCheckBox;
+       dataSetEndCheckBox->setText(tr("Specify a &Ending Index"));
+       connect(dataSetEndCheckBox, SIGNAL(toggled(bool)),
+                       this, SLOT(setIndex()));
+
+       dataSetEndSpinBox = new QSpinBox;
+       connect(dataSetEndCheckBox, SIGNAL(toggled(bool)),
+                       dataSetEndSpinBox, SLOT(setEnabled(bool)));
+
+       dataSetIncCheckBox = new QCheckBox;
+       dataSetIncCheckBox->setText(tr("Specify I&ncrement of Index"));
+       connect(dataSetIncCheckBox, SIGNAL(toggled(bool)),
+                       this, SLOT(setIndex()));
+
+       dataSetIncSpinBox = new QSpinBox;
+       connect(dataSetIncCheckBox, SIGNAL(toggled(bool)),
+                       dataSetIncSpinBox, SLOT(setEnabled(bool)));
+
+       pointIncCheckBox = new QCheckBox;
+       pointIncCheckBox->setText(tr("Specify Point Increment"));
+
+       pointIncSpinBox = new QSpinBox;
+       connect(pointIncCheckBox, SIGNAL(toggled(bool)),
+                       pointIncSpinBox, SLOT(setEnabled(bool)));
+
+       lineIncCheckBox = new QCheckBox;
+       lineIncCheckBox->setText(tr("Specify Line Increment"));
+
+       lineIncSpinBox = new QSpinBox;
+       connect(lineIncCheckBox, SIGNAL(toggled(bool)),
+                       lineIncSpinBox, SLOT(setEnabled(bool)));
+
+       startPointCheckBox = new QCheckBox;
+       startPointCheckBox->setText(tr("Specify a Start Point"));
+
+       startPointSpinBox = new QSpinBox;
+       connect(startPointCheckBox, SIGNAL(toggled(bool)),
+                       startPointSpinBox, SLOT(setEnabled(bool)));
+
+       startLineCheckBox = new QCheckBox;
+       startLineCheckBox->setText(tr("Specify a Start Line"));
+
+       startLineSpinBox = new QSpinBox;
+       connect(startLineCheckBox, SIGNAL(toggled(bool)),
+                       startLineSpinBox, SLOT(setEnabled(bool)));
+
+       endPointCheckBox = new QCheckBox;
+       endPointCheckBox->setText(tr("Specify a End Point"));
+
+       endPointSpinBox = new QSpinBox;
+       connect(endPointCheckBox, SIGNAL(toggled(bool)),
+                       endPointSpinBox, SLOT(setEnabled(bool)));
+
+       endLineCheckBox = new QCheckBox;
+       endLineCheckBox->setText(tr("Specify a End Line"));
+
+       endLineSpinBox = new QSpinBox;
+       connect(endLineCheckBox, SIGNAL(toggled(bool)),
+                       endLineSpinBox, SLOT(setEnabled(bool)));
+
+       // assemble layouts and widgets
+
+       QGridLayout *dataSetLayout = new QGridLayout;
+       dataSetLayout->addWidget(dataSetStartCheckBox, 0, 0);
+       dataSetLayout->addWidget(dataSetStartSpinBox, 0, 1);
+       dataSetLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+       dataSetLayout->addWidget(dataSetEndCheckBox, 1, 0);
+       dataSetLayout->addWidget(dataSetEndSpinBox, 1, 1);
+       dataSetLayout->addWidget(dataSetIncCheckBox, 2, 0);
+       dataSetLayout->addWidget(dataSetIncSpinBox, 2, 1);
+       dataSetLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 3, 0);
+
+       QWidget *dataSetWidget = new QWidget;
+       dataSetWidget->setWhatsThis(tr("fit {index &lt;index list&gt;}"));
+       dataSetWidget->setLayout(dataSetLayout);
+
+       QGridLayout *periodLayout = new QGridLayout;
+       periodLayout->addWidget(pointIncCheckBox, 0, 0);
+       periodLayout->addWidget(pointIncSpinBox, 0, 1);
+       periodLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+       periodLayout->addWidget(startPointCheckBox, 1, 0);
+       periodLayout->addWidget(startPointSpinBox, 1, 1);
+       periodLayout->addWidget(endPointCheckBox, 2, 0);
+       periodLayout->addWidget(endPointSpinBox, 2, 1);
+       periodLayout->addWidget(lineIncCheckBox, 3, 0);
+       periodLayout->addWidget(lineIncSpinBox, 3, 1);
+       periodLayout->addWidget(startLineCheckBox, 4, 0);
+       periodLayout->addWidget(startLineSpinBox, 4, 1);
+       periodLayout->addWidget(endLineCheckBox, 5, 0);
+       periodLayout->addWidget(endLineSpinBox, 5, 1);
+       periodLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 6, 0);
+
+       QWidget *periodWidget = new QWidget;
+       periodWidget->setWhatsThis(tr("fit {every &lt;every list&gt;}"));
+       periodWidget->setLayout(periodLayout);
+
+       QGridLayout *colFormatLayout = new QGridLayout;
+       for (int i = 0; i < AXIS_NUM; i++) {
+               colFormatLayout->addWidget(columnLabel[i], i, 0);
+               colFormatLayout->addWidget(columnLineEdit[i], i, 1);
+       }
+       colFormatLayout->addItem(new QSpacerItem(40, 20,
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+       colFormatLayout->addWidget(formatLabel, 3, 0);
+       colFormatLayout->addWidget(formatLineEdit, 3, 1, 1, 2);
+       colFormatLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 4, 0);
+
+       QWidget *colFormatWidget = new QWidget;
+       colFormatWidget->setWhatsThis(tr("fit {using &lt;using list&gt;}"));
+       colFormatWidget->setLayout(colFormatLayout);
+
+       QTabWidget *modTabWidget = new QTabWidget;
+       modTabWidget->addTab(dataSetWidget, tr("&Indexes"));
+       modTabWidget->addTab(periodWidget, tr("&Sampling"));
+       modTabWidget->addTab(colFormatWidget, tr("C&olumns"));
+
+       QVBoxLayout *mainLayout = new QVBoxLayout;
+       mainLayout->addWidget(modTabWidget);
+
+       setLayout(mainLayout);
+}
+
+void FitModifierWidget::setIndex()
+{
+       if (!dataSetEndCheckBox->isChecked()) {
+               dataSetIncCheckBox->setChecked(false);
+       } else if (!dataSetStartCheckBox->isChecked()) {
+               dataSetEndCheckBox->setChecked(false);
+               dataSetIncCheckBox->setChecked(false);
+       }
+}
+
+void FitModifierWidget::setFitModifier(const FitModifier &fitModifier)
+{
+       int m = fitModifier.m();
+       int n = fitModifier.n();
+       int p = fitModifier.p();
+       if (m < 0) {
+               dataSetStartSpinBox->setEnabled(false);
+               dataSetEndSpinBox->setEnabled(false);
+               dataSetIncSpinBox->setEnabled(false);
+       } else {
+               dataSetStartCheckBox->setChecked(true);
+               dataSetStartSpinBox->setValue(m);
+               if (n < 0) {
+                       dataSetEndSpinBox->setEnabled(false);
+                       dataSetIncSpinBox->setEnabled(false);
+               } else {
+                       dataSetEndCheckBox->setChecked(true);
+                       dataSetEndSpinBox->setValue(n);
+                       if (p < 0) {
+                               dataSetIncSpinBox->setEnabled(false);
+                       } else {
+                               dataSetIncCheckBox->setChecked(true);
+                               dataSetIncSpinBox->setValue(p);
+                       }
+               }
+       }
+       int num = fitModifier.pointIncrement();
+       if (num < 0) {
+               pointIncSpinBox->setEnabled(false);
+       } else {
+               pointIncCheckBox->setChecked(true);
+               pointIncSpinBox->setValue(num);
+       }
+       num = fitModifier.blockIncrement();
+       if (num < 0) {
+               lineIncSpinBox->setEnabled(false);
+       } else {
+               lineIncCheckBox->setChecked(true);
+               lineIncSpinBox->setValue(num);
+       }
+       num = fitModifier.startPoint();
+       if (num < 0) {
+               startPointSpinBox->setEnabled(false);
+       } else {
+               startPointCheckBox->setChecked(true);
+               startPointSpinBox->setValue(num);
+       }
+       num = fitModifier.startBlock();
+       if (num < 0) {
+               startLineSpinBox->setEnabled(false);
+       } else {
+               startLineCheckBox->setChecked(true);
+               startLineSpinBox->setValue(num);
+       }
+       num = fitModifier.endPoint();
+       if (num < 0) {
+               endPointSpinBox->setEnabled(false);
+       } else {
+               endPointCheckBox->setChecked(true);
+               endPointSpinBox->setValue(num);
+       }
+       num = fitModifier.endBlock();
+       if (num < 0) {
+               endLineSpinBox->setEnabled(false);
+       } else {
+               endLineCheckBox->setChecked(true);
+               endLineSpinBox->setValue(num);
+       }
+       QStringList entry = fitModifier.entry();
+       int size = entry.size();
+       for (int i = 0; i < AXIS_NUM; i++) {
+               columnLineEdit[i]->setText((size > i) ? entry[i] : "");
+       }
+       formatLineEdit->setText(fitModifier.format());
+}
+
+FitModifier FitModifierWidget::fitModifier() const
+{
+       FitModifier fitModifier;
+       int m = -1, n = -1 , p = -1;
+       if (dataSetStartCheckBox->isChecked()) {
+               m = dataSetStartSpinBox->value();
+               if (dataSetEndCheckBox->isChecked()) {
+                       n = dataSetEndSpinBox->value();
+                       if (dataSetIncCheckBox->isChecked()) {
+                               p = dataSetIncSpinBox->value();
+                       }
+               }
+       }
+       fitModifier.setIndex(m, n, p);
+       int num[6];
+       if (!pointIncCheckBox->isChecked()) {
+               num[0] = -1;
+       } else {
+               num[0] = pointIncSpinBox->value();
+       }
+       if (!lineIncCheckBox->isChecked()) {
+               num[1] = -1;
+       } else {
+               num[1] = lineIncSpinBox->value();
+       }
+       if (!startPointCheckBox->isChecked()) {
+               num[2] = -1;
+       } else {
+               num[2] = startPointSpinBox->value();
+       }
+       if (!startLineCheckBox->isChecked()) {
+               num[3] = -1;
+       } else {
+               num[3] = startLineSpinBox->value();
+       }
+       if (!endPointCheckBox->isChecked()) {
+               num[4] = -1;
+       } else {
+               num[4] = endPointSpinBox->value();
+       }
+       if (!endLineCheckBox->isChecked()) {
+               num[5] = -1;
+       } else {
+               num[5] = endLineSpinBox->value();
+       }
+       fitModifier.setEvery(num[0], num[1], num[2], num[3],
+                       num[4], num[5]);
+
+       QStringList entry;
+       for (int i = 0; i < AXIS_NUM; i++) {
+               QString text = columnLineEdit[i]->text();
+               if (text.isEmpty()) {
+                       break;
+               } else {
+                       entry << text;
+               }
+       }
+       QString format = formatLineEdit->text();
+       fitModifier.setUsing(entry, format);
+
+       return fitModifier;
+}
diff --git a/src/gui/fit/FitModifierWidget.h b/src/gui/fit/FitModifierWidget.h
new file mode 100644 (file)
index 0000000..0d472b1
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef FIT_MODIFIER_WIDGET_INCLUDED
+#define FIT_MODIFIER_WIDGET_INCLUDED
+
+class FitModifier;
+
+#include <QtGui/QWidget>
+class QCheckBox;
+class QLineEdit;
+class QSpinBox;
+
+class FitModifierWidget : public QWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit FitModifierWidget(QWidget *parent = 0);
+
+               void setFitModifier(const FitModifier &fitModifier);
+               FitModifier fitModifier() const;
+
+       private slots:
+               void setIndex();
+
+       private:
+               // don't implement these
+               FitModifierWidget(const FitModifierWidget &);
+               FitModifierWidget &operator=(const FitModifierWidget &);
+
+               static const int AXIS_NUM = 3;
+               QLineEdit *columnLineEdit[AXIS_NUM];
+               QLineEdit *formatLineEdit;
+               QCheckBox *dataSetStartCheckBox;
+               QSpinBox *dataSetStartSpinBox;
+               QCheckBox *dataSetEndCheckBox;
+               QSpinBox *dataSetEndSpinBox;
+               QCheckBox *dataSetIncCheckBox;
+               QSpinBox *dataSetIncSpinBox;
+               QCheckBox *pointIncCheckBox;
+               QSpinBox *pointIncSpinBox;
+               QCheckBox *lineIncCheckBox;
+               QSpinBox *lineIncSpinBox;
+               QCheckBox *startPointCheckBox;
+               QSpinBox *startPointSpinBox;
+               QCheckBox *startLineCheckBox;
+               QSpinBox *startLineSpinBox;
+               QCheckBox *endPointCheckBox;
+               QSpinBox *endPointSpinBox;
+               QCheckBox *endLineCheckBox;
+               QSpinBox *endLineSpinBox;
+};
+#endif // FIT_MODIFIER_WIDGET_INCLUDED
diff --git a/src/gui/fit/FitOthersWidget.cpp b/src/gui/fit/FitOthersWidget.cpp
new file mode 100644 (file)
index 0000000..765c745
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "FitOthersWidget.h"
+
+#include <QtGui/QDoubleSpinBox>
+#include <QtGui/QLabel>
+#include <QtGui/QGroupBox>
+#include <QtGui/QGridLayout>
+#include <QtGui/QVBoxLayout>
+
+#include <cmath> // pow(), floor()
+
+FitOthersWidget::FitOthersWidget(QWidget *parent)
+: QWidget(parent)
+{
+       setWindowTitle(tr("Others"));
+
+       QLabel *fitLimitLabel = new QLabel;
+       fitLimitLabel->setText(tr("Fit Limit:"));
+
+       fitLimitMantissaDoubleSpinBox = new QDoubleSpinBox;
+
+       QLabel *fitLimitMiddleLabel = new QLabel;
+       fitLimitMiddleLabel->setText(" x 10^");
+
+       fitLimitExponentSpinBox = new QSpinBox;
+       fitLimitExponentSpinBox->setMinimum(-99);
+       fitLimitExponentSpinBox->setMaximum(0);
+
+       QLabel *fitMaxIterLabel = new QLabel;
+       fitMaxIterLabel->setText(tr("Fit Max Iterations:"));
+
+       fitMaxIterSpinBox = new QSpinBox;
+
+       QGridLayout *svLayout = new QGridLayout;
+       svLayout->addWidget(fitLimitLabel, 0, 0);
+       svLayout->addWidget(fitLimitMantissaDoubleSpinBox, 0, 1);
+       svLayout->addWidget(fitLimitMiddleLabel, 0, 2);
+       svLayout->addWidget(fitLimitExponentSpinBox, 0, 3);
+       svLayout->addItem(new QSpacerItem(40, 20,
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 4);
+       svLayout->addWidget(fitMaxIterLabel, 1, 0);
+       svLayout->addWidget(fitMaxIterSpinBox, 1, 1);
+
+       QGroupBox *svGroupBox = new QGroupBox(tr("Special Variables"));
+       svGroupBox->setLayout(svLayout);
+
+       QVBoxLayout *mainLayout = new QVBoxLayout;
+       mainLayout->setMargin(0);
+       mainLayout->addWidget(svGroupBox);
+       mainLayout->addStretch();
+
+       setLayout(mainLayout);
+}
+
+void FitOthersWidget::setFitLimit(double limit)
+{
+       int limitExponent = static_cast<int>(std::floor(log10(limit)));
+       fitLimitExponentSpinBox->setValue(limitExponent);
+       double limitMantissa = limit 
+               / std::pow(static_cast<double>(10), limitExponent);
+       fitLimitMantissaDoubleSpinBox->setValue(limitMantissa);
+}
+
+double FitOthersWidget::fitLimit() const
+{
+       return fitLimitMantissaDoubleSpinBox->value()
+                       * std::pow(static_cast<double>(10), 
+                                       fitLimitExponentSpinBox->value());
+}
+
+void FitOthersWidget::setFitMaxIter(int iter)
+{
+       fitMaxIterSpinBox->setValue(iter);
+}
+
+int FitOthersWidget::fitMaxIter() const
+{
+       return fitMaxIterSpinBox->value();
+}
diff --git a/src/gui/fit/FitOthersWidget.h b/src/gui/fit/FitOthersWidget.h
new file mode 100644 (file)
index 0000000..0b014b0
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef FIT_OTHERS_WIDGET_INCLUDED
+#define FIT_OTHERS_WIDGET_INCLUDED
+
+#include <QtGui/QWidget>
+class QDoubleSpinBox;
+class QSpinBox;
+
+class FitOthersWidget : public QWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit FitOthersWidget(QWidget *parent = 0);
+
+               void setFitLimit(double limit);
+               double fitLimit() const;
+
+               void setFitMaxIter(int iter);
+               int fitMaxIter() const;
+
+       private:
+               // don't implement these
+               FitOthersWidget(const FitOthersWidget &);
+               FitOthersWidget &operator=(const FitOthersWidget &);
+
+               QDoubleSpinBox *fitLimitMantissaDoubleSpinBox;
+               QSpinBox *fitLimitExponentSpinBox;
+               QSpinBox *fitMaxIterSpinBox;
+};
+#endif // PLOT_OTHERS_WIDGET_INCLUDED
diff --git a/src/gui/fit/FitRangeWidget.cpp b/src/gui/fit/FitRangeWidget.cpp
new file mode 100644 (file)
index 0000000..b7439c0
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "FitRangeWidget.h"
+#include "FitRange.h"
+
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QGroupBox>
+#include <QtGui/QVBoxLayout>
+
+FitRangeWidget::FitRangeWidget(QWidget *parent)
+: QWidget(parent)
+{
+       setWindowTitle(tr("Range"));
+       setWhatsThis(tr("fit {[xrange] {[yrange]}}"));
+
+       const QString RANGE[] = { "X", "Y" };
+       QLabel *dummyVariableLabel[AXIS_NUM];
+       QLabel *minimumLabel[AXIS_NUM];
+       QLabel *maximumLabel[AXIS_NUM];
+       QGridLayout *rangeLayout[AXIS_NUM];
+       QGroupBox *rangeGroupBox[AXIS_NUM];
+       QVBoxLayout *mainLayout = new QVBoxLayout;
+       mainLayout->setMargin(0);
+       for (int i = 0; i < AXIS_NUM; i++) {
+               dummyVariableLabel[i] = new QLabel;
+               dummyVariableLabel[i]->setText(tr("Variable Name:"));
+
+               dummyVariableLineEdit[i] = new QLineEdit;
+
+               minimumLabel[i] = new QLabel;
+               minimumLabel[i]->setText(tr("Min:"));
+
+               minimumLineEdit[i] = new QLineEdit;
+
+               maximumLabel[i] = new QLabel;
+               maximumLabel[i]->setText(tr("Max:"));
+
+               maximumLineEdit[i] = new QLineEdit;
+
+               rangeLayout[i] = new QGridLayout;
+               rangeLayout[i]->addWidget(dummyVariableLabel[i], 0, 0);
+               rangeLayout[i]->addWidget(dummyVariableLineEdit[i], 0, 1);
+               rangeLayout[i]->addItem(new QSpacerItem(40, 20, 
+                                       QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+               rangeLayout[i]->addWidget(minimumLabel[i], 1, 0);
+               rangeLayout[i]->addWidget(minimumLineEdit[i], 1, 1);
+               rangeLayout[i]->addWidget(maximumLabel[i], 2, 0);
+               rangeLayout[i]->addWidget(maximumLineEdit[i], 2, 1);
+
+               rangeGroupBox[i] = new QGroupBox(RANGE[i] + tr(" Range"));
+               rangeGroupBox[i]->setLayout(rangeLayout[i]);
+               
+               mainLayout->addWidget(rangeGroupBox[i]);
+       }
+       mainLayout->addStretch();
+
+       setLayout(mainLayout);
+}
+
+void FitRangeWidget::setFitRange(const FitRange &fitRange)
+{
+       for (int i = 0; i < AXIS_NUM; i++) {
+               dummyVariableLineEdit[i]->
+                       setText(fitRange.dummyVariable(i));
+               minimumLineEdit[i]->setText(fitRange.minimum(i));
+               maximumLineEdit[i]->setText(fitRange.maximum(i));
+       }
+}
+
+FitRange FitRangeWidget::fitRange() const
+{
+       FitRange fitRange;
+       for (int i = 0; i < AXIS_NUM; i++) {
+               fitRange.setDummyVariable(i, dummyVariableLineEdit[i]->text());
+               fitRange.setMinimum(i, minimumLineEdit[i]->text());
+               fitRange.setMaximum(i, maximumLineEdit[i]->text());
+       }
+       return fitRange;
+}
diff --git a/src/gui/fit/FitRangeWidget.h b/src/gui/fit/FitRangeWidget.h
new file mode 100644 (file)
index 0000000..e357566
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef FIT_RANGE_WIDGET_INCLUDED
+#define FIT_RANGE_WIDGET_INCLUDED
+
+class FitRange;
+
+#include <QtGui/QWidget>
+class QLineEdit;
+
+class FitRangeWidget : public QWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit FitRangeWidget(QWidget *parent = 0);
+
+               void setFitRange(const FitRange &fitRange);
+               FitRange fitRange() const;
+
+       private:
+               // don't implement these
+               FitRangeWidget(const FitRangeWidget &);
+               FitRangeWidget &operator=(const FitRangeWidget &);
+
+               static const int AXIS_NUM = 2;
+               QLineEdit *dummyVariableLineEdit[AXIS_NUM];
+               QLineEdit *minimumLineEdit[AXIS_NUM];
+               QLineEdit *maximumLineEdit[AXIS_NUM];
+};
+#endif // PLOT_RANGE_WIDGET_INCLUDED
diff --git a/src/gui/opt/AnglesOptionWidget.cpp b/src/gui/opt/AnglesOptionWidget.cpp
new file mode 100644 (file)
index 0000000..4256169
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "AnglesOptionWidget.h"
+#include "Angles.h"
+
+#include <QtGui/QRadioButton>
+#include <QtGui/QVBoxLayout>
+
+AnglesOptionWidget::AnglesOptionWidget(QWidget *parent)
+: OptionWidget(parent), angles(0)
+{
+       setWindowTitle(tr("Angles"));
+       setWhatsThis("set angles");
+}
+
+AnglesOptionWidget::~AnglesOptionWidget()
+{
+       delete angles;
+}
+
+void AnglesOptionWidget::construct()
+{
+       degreesRadioButton = new QRadioButton;
+       degreesRadioButton->setText(tr("D&egrees"));
+       connect(degreesRadioButton, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       radiansRadioButton = new QRadioButton;
+       radiansRadioButton->setText(tr("&Radians"));
+       connect(radiansRadioButton, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       QVBoxLayout *mainLayout = new QVBoxLayout;
+       mainLayout->addWidget(degreesRadioButton);
+       mainLayout->addWidget(radiansRadioButton);
+       mainLayout->addStretch();
+
+       setLayout(mainLayout);
+}
+
+void AnglesOptionWidget::init()
+{
+       delete angles;
+       angles = new Angles;
+       setWidget();
+}
+
+void AnglesOptionWidget::apply()
+{
+       angles->setDegrees(degreesRadioButton->isChecked());
+
+       emit executed(angles->command());
+}
+
+void AnglesOptionWidget::setWidget()
+{
+       bool isDegrees = angles->isDegrees();
+       degreesRadioButton->setChecked(isDegrees);
+       radiansRadioButton->setChecked(!isDegrees);
+}
diff --git a/src/gui/opt/AnglesOptionWidget.h b/src/gui/opt/AnglesOptionWidget.h
new file mode 100644 (file)
index 0000000..e49ecff
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef ANGLES_OPTION_INCLUDED
+#define ANGLES_OPTION_INCLUDED
+
+#include "OptionWidget.h"
+
+class Angles;
+
+class QRadioButton;
+class QDoubleSpinBox;
+
+class AnglesOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit AnglesOptionWidget(QWidget *parent = 0);
+               ~AnglesOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               AnglesOptionWidget(const AnglesOptionWidget &);
+               AnglesOptionWidget &operator=(const AnglesOptionWidget &);
+
+               void init();
+               void apply();
+               void setWidget();
+               Angles *angles;
+               QRadioButton *degreesRadioButton;
+               QRadioButton *radiansRadioButton;
+};
+#endif // ANGLES_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/AxisDataOptionWidget.cpp b/src/gui/opt/AxisDataOptionWidget.cpp
new file mode 100644 (file)
index 0000000..3223ac5
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "AxisDataOptionWidget.h"
+#include "AxisData.h"
+
+#include <QtGui/QCheckBox>
+#include <QtGui/QLabel>
+#include <QtGui/QGridLayout>
+
+AxisDataOptionWidget::AxisDataOptionWidget(QWidget *parent)
+: OptionWidget(parent), axisData(0)
+{
+       setWindowTitle(tr("Data"));
+       setWhatsThis(tr("set <i>axis</i>data"));
+}
+
+AxisDataOptionWidget::~AxisDataOptionWidget()
+{
+       while (!timeCheckBoxList.isEmpty()) {
+               delete timeCheckBoxList.takeFirst();
+       }
+       delete axisData;
+}
+
+void AxisDataOptionWidget::construct()
+{
+       for (int i = 0; !AxisData::AXIS[i].isEmpty(); i++) {
+               QCheckBox *timeCheckBox = new QCheckBox;
+               timeCheckBox->setText(tr("Time/Date"));
+               connect(timeCheckBox, SIGNAL(toggled(bool)),
+                               this, SIGNAL(modified()));
+               timeCheckBoxList.append(timeCheckBox);
+       }
+
+       QGridLayout *mainLayout = new QGridLayout;
+       for (int i = 0; !AxisData::AXIS[i].isEmpty(); i++) {
+               QLabel *timeLabel = new QLabel;
+               timeLabel->setText(AxisData::AXIS[i] + tr(" Axis"));
+
+               mainLayout->addWidget(timeLabel, i, 0);
+               mainLayout->addWidget(timeCheckBoxList[i], i, 1);
+       }
+       mainLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1);
+       mainLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding),
+                       timeCheckBoxList.size(), 0);
+
+       setLayout(mainLayout);
+}
+
+void AxisDataOptionWidget::init()
+{
+       delete axisData;
+       axisData = new AxisData;
+       setWidget();
+}
+void AxisDataOptionWidget::apply()
+{
+       for (int i = 0; !AxisData::AXIS[i].isEmpty(); i++) {
+               axisData->setTime(i, timeCheckBoxList.at(i)->isChecked());
+       }
+       emit executed(axisData->command());
+}
+
+void AxisDataOptionWidget::setWidget()
+{
+       for (int i = 0; !AxisData::AXIS[i].isEmpty(); i++) {
+               timeCheckBoxList[i]->setChecked(axisData->isTime(i));
+       }
+}
diff --git a/src/gui/opt/AxisDataOptionWidget.h b/src/gui/opt/AxisDataOptionWidget.h
new file mode 100644 (file)
index 0000000..f275acd
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef AXIS_DATA_OPTION_WIDGET_INCLUDED
+#define AXIS_DATA_OPTION_WIDGET_INCLUDED
+
+#include "OptionWidget.h"
+
+class AxisData;
+
+#include <QtCore/QList>
+class QCheckBox;
+
+class AxisDataOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit AxisDataOptionWidget(QWidget *parent = 0);
+               ~AxisDataOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               AxisDataOptionWidget(const AxisDataOptionWidget &);
+               AxisDataOptionWidget &operator=(const AxisDataOptionWidget &);
+
+               void init();
+               void apply();
+               void setWidget();
+               AxisData *axisData;
+               QList<QCheckBox *> timeCheckBoxList;
+};
+#endif // AXIS_DATA_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/AxisLabelOptionWidget.cpp b/src/gui/opt/AxisLabelOptionWidget.cpp
new file mode 100644 (file)
index 0000000..7547636
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "AxisLabelOptionWidget.h"
+#include "AxisLabel.h"
+
+#include <QtGui/QComboBox>
+#include <QtGui/QDoubleSpinBox>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QGridLayout>
+
+AxisLabelOptionWidget::AxisLabelOptionWidget(QWidget *parent)
+: AxisOptionWidget(parent), axisLabel(0)
+{
+       setWindowTitle(tr("Label"));
+       setWhatsThis(tr("set <i>axis</i>label"));
+}
+
+AxisLabelOptionWidget::~AxisLabelOptionWidget()
+{
+       delete axisLabel;
+}
+
+void AxisLabelOptionWidget::construct()
+{
+       AxisOptionWidget::construct();
+       for (int i = 0; !AxisLabel::AXIS[i].isEmpty(); i++) {
+               axisComboBox->addItem(AxisLabel::AXIS[i]);
+       }
+}
+
+void AxisLabelOptionWidget::init()
+{
+       delete axisLabel;
+       axisLabel = new AxisLabel;
+       AxisOptionWidget::setWidget();
+}
+
+void AxisLabelOptionWidget::apply()
+{
+       AxisOptionWidget::apply();
+       emit executed(axisLabel->command());
+}
+
+void AxisLabelOptionWidget::constructWidget(QWidget *widget)
+{
+       labelLineEdit = new QLineEdit;
+       connect(labelLineEdit, SIGNAL(textChanged(const QString &)),
+                       this, SIGNAL(modified()));
+
+       QLabel *textLabel = new QLabel;
+       textLabel->setText(tr("T&ext:"));
+       textLabel->setBuddy(labelLineEdit);
+
+       xOffsetDoubleSpinBox = new QDoubleSpinBox;
+       xOffsetDoubleSpinBox->setMinimum(-99);
+       connect(xOffsetDoubleSpinBox, SIGNAL(valueChanged(double)),
+                       this, SIGNAL(modified()));
+
+       QLabel *xOffsetLabel = new QLabel;
+       xOffsetLabel->setText(tr("X O&ffset:"));
+       xOffsetLabel->setBuddy(xOffsetDoubleSpinBox);
+
+       yOffsetDoubleSpinBox = new QDoubleSpinBox;
+       yOffsetDoubleSpinBox->setMinimum(-99);
+       connect(yOffsetDoubleSpinBox, SIGNAL(valueChanged(double)),
+                       this, SIGNAL(modified()));
+
+       QLabel *yOffsetLabel = new QLabel;
+       yOffsetLabel->setText(tr("&Y Offset:"));
+       yOffsetLabel->setBuddy(yOffsetDoubleSpinBox);
+
+       fontNameLineEdit = new QLineEdit;
+       connect(fontNameLineEdit, SIGNAL(textChanged(const QString &)),
+                       this, SIGNAL(modified()));
+
+       QLabel *fontNameLabel = new QLabel;
+       fontNameLabel->setText(tr("Fo&nt Name:"));
+       fontNameLabel->setBuddy(fontNameLineEdit);
+
+       QGridLayout *mainLayout = new QGridLayout;
+       mainLayout->addWidget(textLabel, 0, 0);
+       mainLayout->addWidget(labelLineEdit, 0, 1, 1, 2);
+       mainLayout->addWidget(xOffsetLabel, 1, 0);
+       mainLayout->addWidget(xOffsetDoubleSpinBox, 1, 1);
+       mainLayout->addItem(new QSpacerItem(40, 20,
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 1, 2);
+       mainLayout->addWidget(yOffsetLabel, 2, 0);
+       mainLayout->addWidget(yOffsetDoubleSpinBox, 2, 1);
+       mainLayout->addWidget(fontNameLabel, 3, 0);
+       mainLayout->addWidget(fontNameLineEdit, 3, 1, 1, 2);
+
+       widget->setLayout(mainLayout);
+}
+
+void AxisLabelOptionWidget::setOption(int axis)
+{
+       axisLabel->setLabel(axis, labelLineEdit->text());
+       axisLabel->setXOffset(axis, xOffsetDoubleSpinBox->value());
+       axisLabel->setYOffset(axis, yOffsetDoubleSpinBox->value());
+       axisLabel->setFontName(axis, fontNameLineEdit->text());
+}
+
+void AxisLabelOptionWidget::setWidget(int axis)
+{
+       labelLineEdit->setText(axisLabel->label(axis));
+       xOffsetDoubleSpinBox->setValue(axisLabel->xOffset(axis));
+       yOffsetDoubleSpinBox->setValue(axisLabel->yOffset(axis));
+       fontNameLineEdit->setText(axisLabel->fontName(axis));
+}
diff --git a/src/gui/opt/AxisLabelOptionWidget.h b/src/gui/opt/AxisLabelOptionWidget.h
new file mode 100644 (file)
index 0000000..0ecbacb
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef AXIS_LABEL_OPTION_WIDGET_INCLUDED
+#define AXIS_LABEL_OPTION_WIDGET_INCLUDED
+
+#include "AxisOptionWidget.h"
+
+class AxisLabel;
+
+class QDoubleSpinBox;
+class QLineEdit;
+
+class AxisLabelOptionWidget : public AxisOptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit AxisLabelOptionWidget(QWidget *parent = 0);
+               ~AxisLabelOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               AxisLabelOptionWidget(const AxisLabelOptionWidget &);
+               AxisLabelOptionWidget &operator=(const AxisLabelOptionWidget &);
+
+               void init();
+               void apply();
+               void constructWidget(QWidget *widget);
+               void setOption(int axis);
+               void setWidget(int axis);
+               AxisLabel *axisLabel;
+               QLineEdit *labelLineEdit;
+               QDoubleSpinBox *xOffsetDoubleSpinBox;
+               QDoubleSpinBox *yOffsetDoubleSpinBox;
+               QLineEdit *fontNameLineEdit;
+};
+#endif // AXIS_LABEL_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/AxisOptionWidget.cpp b/src/gui/opt/AxisOptionWidget.cpp
new file mode 100644 (file)
index 0000000..a5bee66
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "AxisOptionWidget.h"
+
+#include <QtGui/QComboBox>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QGridLayout>
+
+AxisOptionWidget::AxisOptionWidget(QWidget *parent)
+: OptionWidget(parent), prevAxis(0)
+{
+}
+
+AxisOptionWidget::~AxisOptionWidget()
+{
+}
+
+void AxisOptionWidget::construct()
+{
+       axisComboBox = new QComboBox;
+       connect(axisComboBox, SIGNAL(activated(int)),
+                       this, SLOT(changeAxis(int)));
+
+       QLabel *axisLabel = new QLabel;
+       axisLabel->setText(tr("A&xis:"));
+       axisLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+       axisLabel->setBuddy(axisComboBox);
+
+       QWidget *widget = new QWidget;
+       constructWidget(widget);
+
+       QHBoxLayout *selectLayout = new QHBoxLayout;
+       selectLayout->addWidget(axisLabel);
+       selectLayout->addWidget(axisComboBox);
+
+       QVBoxLayout *mainLayout = new QVBoxLayout;
+       mainLayout->addLayout(selectLayout);
+       mainLayout->addWidget(widget);
+       mainLayout->addStretch();
+       setLayout(mainLayout);
+}
+
+void AxisOptionWidget::changeAxis(int axis)
+{
+       setOption(prevAxis);
+       blockSignals(true);
+       setWidget(axis);
+       blockSignals(false);
+       prevAxis = axis;
+}
+
+void AxisOptionWidget::apply()
+{
+       setOption(axisComboBox->currentIndex());
+}
+
+void AxisOptionWidget::setWidget()
+{
+       setWidget(axisComboBox->currentIndex());
+}
diff --git a/src/gui/opt/AxisOptionWidget.h b/src/gui/opt/AxisOptionWidget.h
new file mode 100644 (file)
index 0000000..96e7bf2
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef AXIS_OPTION_WIDGET_INCLUDED
+#define AXIS_OPTION_WIDGET_INCLUDED
+
+#include "OptionWidget.h"
+
+class QComboBox;
+
+class AxisOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit AxisOptionWidget(QWidget *parent = 0);
+               virtual ~AxisOptionWidget();
+
+               virtual void construct();
+
+       protected:
+               virtual void apply();
+               void setWidget();
+               virtual void constructWidget(QWidget *widget) = 0;
+               virtual void setOption(int axis) = 0;
+               virtual void setWidget(int axis) = 0;
+               int prevAxis;
+               QComboBox *axisComboBox;
+
+       private slots:
+                void changeAxis(int axis);
+
+       private:
+               // don't implement these
+               AxisOptionWidget(const AxisOptionWidget &);
+               AxisOptionWidget &operator=(const AxisOptionWidget &);
+};
+#endif // AXIS_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/AxisRangeOptionWidget.cpp b/src/gui/opt/AxisRangeOptionWidget.cpp
new file mode 100644 (file)
index 0000000..704c207
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "AxisRangeOptionWidget.h"
+#include "AxisRange.h"
+
+#include <QtGui/QComboBox>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QGridLayout>
+
+AxisRangeOptionWidget::AxisRangeOptionWidget(QWidget *parent)
+: AxisOptionWidget(parent), axisRange(0)
+{
+       setWindowTitle(tr("Range"));
+       setWhatsThis(tr("set <i>axis</i>range"));
+}
+
+AxisRangeOptionWidget::~AxisRangeOptionWidget()
+{
+       delete axisRange;
+}
+
+void AxisRangeOptionWidget::init()
+{
+       delete axisRange;
+       axisRange = new AxisRange;
+       AxisOptionWidget::setWidget();
+}
+
+void AxisRangeOptionWidget::construct()
+{
+       AxisOptionWidget::construct();
+       for (int i = 0; !AxisRange::AXIS[i].isEmpty(); i++) {
+               axisComboBox->addItem(AxisRange::AXIS[i]);
+       }
+}
+
+void AxisRangeOptionWidget::apply()
+{
+       AxisOptionWidget::apply();
+       emit executed(axisRange->command());
+}
+
+void AxisRangeOptionWidget::constructWidget(QWidget *widget)
+{
+       minLineEdit = new QLineEdit;
+       connect(minLineEdit, SIGNAL(textChanged(const QString &)),
+                       this, SIGNAL(modified()));
+
+       QLabel *minLabel = new QLabel;
+       minLabel->setText(tr("&Minimum:"));
+       minLabel->setBuddy(minLineEdit);
+
+       maxLineEdit = new QLineEdit;
+       connect(maxLineEdit, SIGNAL(textChanged(const QString &)),
+                       this, SIGNAL(modified()));
+
+       QLabel *maxLabel = new QLabel;
+       maxLabel->setText(tr("Max&imum:"));
+       maxLabel->setBuddy(maxLineEdit);
+
+       QGridLayout *mainLayout = new QGridLayout;
+       mainLayout->addWidget(minLabel, 0, 0);
+       mainLayout->addWidget(minLineEdit, 0, 1);
+       mainLayout->addItem(new QSpacerItem(40, 20,
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+       mainLayout->addWidget(maxLabel, 1, 0);
+       mainLayout->addWidget(maxLineEdit, 1, 1);
+       mainLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 2, 0);
+
+       widget->setLayout(mainLayout);
+}
+
+
+void AxisRangeOptionWidget::setOption(int axis)
+{
+       axisRange->setMinimum(axis, minLineEdit->text());
+       axisRange->setMaximum(axis, maxLineEdit->text());
+}
+
+void AxisRangeOptionWidget::setWidget(int axis)
+{
+       minLineEdit->setText(axisRange->minimum(axis));
+       maxLineEdit->setText(axisRange->maximum(axis));
+}
diff --git a/src/gui/opt/AxisRangeOptionWidget.h b/src/gui/opt/AxisRangeOptionWidget.h
new file mode 100644 (file)
index 0000000..3fe235a
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef AXIS_RANGE_OPTION_WIDGET_INCLUDED
+#define AXIS_RANGE_OPTION_WIDGET_INCLUDED
+
+#include "AxisOptionWidget.h"
+
+class AxisRange;
+
+class QLineEdit;
+
+class AxisRangeOptionWidget : public AxisOptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit AxisRangeOptionWidget(QWidget *parent = 0);
+               ~AxisRangeOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               AxisRangeOptionWidget(const AxisRangeOptionWidget &);
+               AxisRangeOptionWidget &operator=(const AxisRangeOptionWidget &);
+
+               void init();
+               void apply();
+               void constructWidget(QWidget *widget);
+               void setOption(int axis);
+               void setWidget(int axis);
+               AxisRange *axisRange;
+               QLineEdit *minLineEdit;
+               QLineEdit *maxLineEdit;
+};
+#endif // AXIS_RANGE_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/AxisTicsOptionWidget.cpp b/src/gui/opt/AxisTicsOptionWidget.cpp
new file mode 100644 (file)
index 0000000..7592c21
--- /dev/null
@@ -0,0 +1,233 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "AxisTicsOptionWidget.h"
+#include "AxisTics.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtGui/QCheckBox>
+#include <QtGui/QComboBox>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QStackedWidget>
+#include <QtGui/QVBoxLayout>
+
+AxisTicsOptionWidget::AxisTicsOptionWidget(QWidget *parent)
+: AxisOptionWidget(parent), axisTics(0)
+{
+       setWindowTitle(tr("Tics"));
+       setWhatsThis(tr("set <i>axis</i>tics"));
+}
+
+AxisTicsOptionWidget::~AxisTicsOptionWidget()
+{
+       delete axisTics;
+}
+
+void AxisTicsOptionWidget::construct()
+{
+       AxisOptionWidget::construct();
+       for (int i = 0; !AxisTics::AXIS[i].isEmpty(); i++) {
+               axisComboBox->addItem(AxisTics::AXIS[i]);
+       }
+}
+
+void AxisTicsOptionWidget::init()
+{
+       delete axisTics;
+       axisTics = new AxisTics;
+       AxisOptionWidget::setWidget();
+}
+
+void AxisTicsOptionWidget::apply()
+{
+       AxisOptionWidget::apply();
+       emit executed(axisTics->command());
+}
+
+void AxisTicsOptionWidget::constructWidget(QWidget *widget)
+{
+       onCheckBox = new QCheckBox;
+       onCheckBox->setText(tr("Ac&tivation"));
+       connect(onCheckBox, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       locationComboBox = new QComboBox;
+       for (int i = 0; AxisTics::LOCATION[i][0]; i++) {
+               locationComboBox->addItem(QCoreApplication::translate(
+                                       "AxisTics", AxisTics::LOCATION[i]));
+       }
+       connect(locationComboBox, SIGNAL(activated(int)),
+                       this, SIGNAL(modified()));
+
+       mirrorCheckBox = new QCheckBox;
+       mirrorCheckBox->setText(tr("&Mirroring"));
+       connect(mirrorCheckBox, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       rotationCheckBox = new QCheckBox;
+       rotationCheckBox->setText(tr("&Rotation"));
+       connect(rotationCheckBox, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       startPosLineEdit = new QLineEdit;
+       connect(startPosLineEdit, SIGNAL(textChanged(const QString &)),
+                       this, SIGNAL(modified()));
+
+       QLabel *startPosLabel = new QLabel;
+       startPosLabel->setText(tr("&Start:"));
+       startPosLabel->setBuddy(startPosLineEdit);
+
+       incPosLineEdit = new QLineEdit;
+       connect(incPosLineEdit, SIGNAL(textChanged(const QString &)),
+                       this, SIGNAL(modified()));
+
+       QLabel *incPosLabel = new QLabel;
+       incPosLabel->setText(tr("&Increment:"));
+       incPosLabel->setBuddy(incPosLineEdit);
+
+       endPosLineEdit = new QLineEdit;
+       connect(endPosLineEdit, SIGNAL(textChanged(const QString &)),
+                       this, SIGNAL(modified()));
+
+       QLabel *endPosLabel = new QLabel;
+       endPosLabel->setText(tr("&End:"));
+       endPosLabel->setBuddy(endPosLineEdit);
+
+       QGridLayout *sieLayout = new QGridLayout;
+       sieLayout->addWidget(startPosLabel, 0, 0);
+       sieLayout->addWidget(startPosLineEdit, 0, 1);
+       sieLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+       sieLayout->addWidget(incPosLabel, 1, 0);
+       sieLayout->addWidget(incPosLineEdit, 1, 1);
+       sieLayout->addWidget(endPosLabel, 2, 0);
+       sieLayout->addWidget(endPosLineEdit, 2, 1);
+
+       QWidget *sieWidget = new QWidget;
+       sieWidget->setLayout(sieLayout);
+
+       labelsPosLineEdit = new QLineEdit;
+       connect(labelsPosLineEdit, SIGNAL(textChanged(const QString &)),
+                       this, SIGNAL(modified()));
+
+       QVBoxLayout *labelsPosLayout = new QVBoxLayout;
+       labelsPosLayout->addWidget(labelsPosLineEdit);
+       labelsPosLayout->addStretch();
+
+       QWidget *labelsPosWidget = new QWidget;
+       labelsPosWidget->setLayout(labelsPosLayout);
+
+       QStackedWidget *positionStackedWidget = new QStackedWidget;
+       positionStackedWidget->addWidget(new QWidget);
+       positionStackedWidget->addWidget(sieWidget);
+       positionStackedWidget->addWidget(labelsPosWidget);
+
+       positionComboBox = new QComboBox;
+       positionComboBox->addItem(tr("Auto"));
+       positionComboBox->addItem(tr("Start/Increment/End"));
+       positionComboBox->addItem(tr("Labels/Positions"));
+       connect(positionComboBox, SIGNAL(activated(int)),
+                       positionStackedWidget, SLOT(setCurrentIndex(int)));
+       connect(positionComboBox, SIGNAL(activated(int)),
+                       this, SIGNAL(modified()));
+
+       // create and assemble layouts
+
+       QVBoxLayout *posLayout = new QVBoxLayout;
+       posLayout->addWidget(positionComboBox);
+       posLayout->addWidget(positionStackedWidget);
+
+       QWidget *posWidget = new QWidget;
+       posWidget->setLayout(posLayout);
+
+       QGridLayout *othersLayout = new QGridLayout;
+       othersLayout->addWidget(locationComboBox, 0, 0);
+       othersLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1);
+       othersLayout->addWidget(mirrorCheckBox, 1, 0);
+       othersLayout->addWidget(rotationCheckBox, 2, 0);
+       othersLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 3, 0);
+
+       QWidget *othersWidget = new QWidget;
+       othersWidget->setLayout(othersLayout);
+
+       ticsTabWidget = new QTabWidget;
+       ticsTabWidget->addTab(posWidget, tr("&Position"));
+       ticsTabWidget->addTab(othersWidget, tr("O&thers"));
+       connect(onCheckBox, SIGNAL(toggled(bool)),
+                       ticsTabWidget, SLOT(setEnabled(bool)));
+
+       QVBoxLayout *mainLayout = new QVBoxLayout;
+       mainLayout->addWidget(onCheckBox);
+       mainLayout->addWidget(ticsTabWidget);
+       mainLayout->addStretch();
+
+       widget->setLayout(mainLayout);
+}
+
+
+void AxisTicsOptionWidget::setOption(int axis)
+{
+       axisTics->setFlag(axis, onCheckBox->isChecked());
+       axisTics->setMirror(axis, mirrorCheckBox->isChecked());
+       axisTics->setBorder(axis, !locationComboBox->currentIndex());
+       axisTics->setRotate(axis, rotationCheckBox->isChecked());
+
+       switch (positionComboBox->currentIndex()) {
+       case 0:
+               axisTics->setAutofreq(axis);
+               break;
+       case 1:
+               axisTics->setIncrement(axis, incPosLineEdit->text(),
+                               startPosLineEdit->text(),
+                               endPosLineEdit->text());
+               break;
+       case 2:
+               axisTics->setPosition(axis, labelsPosLineEdit->text().split(","));
+       }
+}
+
+
+void AxisTicsOptionWidget::setWidget(int axis)
+{
+       onCheckBox->setChecked(axisTics->flag(axis));
+
+       ticsTabWidget->setEnabled(axisTics->flag(axis));
+
+       mirrorCheckBox->setChecked(axisTics->mirrors(axis));
+
+       locationComboBox->setCurrentIndex(!axisTics->isBorder(axis));
+
+       rotationCheckBox->setChecked(axisTics->rotates(axis));
+
+       if (axisTics->isAutofreq(axis)) {
+               positionComboBox->setCurrentIndex(0);
+       } else if (axisTics->isIncrement(axis)) {
+               positionComboBox->setCurrentIndex(1);
+
+               startPosLineEdit->setText(axisTics->start(axis));
+               incPosLineEdit->setText(axisTics->increment(axis));
+               endPosLineEdit->setText(axisTics->end(axis));
+       } else if (axisTics->isPosition(axis)) {
+               positionComboBox->setCurrentIndex(2);
+
+               labelsPosLineEdit->setText(axisTics->position(axis).join(","));
+       }
+}
diff --git a/src/gui/opt/AxisTicsOptionWidget.h b/src/gui/opt/AxisTicsOptionWidget.h
new file mode 100644 (file)
index 0000000..0c37df0
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef AXIS_TICS_OPTION_WIDGET_INCLUDED
+#define AXIS_TICS_OPTION_WIDGET_INCLUDED
+
+#include "AxisOptionWidget.h"
+
+class AxisTics;
+
+class QCheckBox;
+class QComboBox;
+class QGroupBox;
+class QLineEdit;
+class QRadioButton;
+class QTabWidget;
+
+class AxisTicsOptionWidget : public AxisOptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit AxisTicsOptionWidget(QWidget *parent = 0);
+               ~AxisTicsOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               AxisTicsOptionWidget(const AxisTicsOptionWidget &);
+               AxisTicsOptionWidget &operator=(const AxisTicsOptionWidget &);
+
+               void init();
+               void apply();
+               void constructWidget(QWidget *widget);
+               void setOption(int axis);
+               void setWidget(int axis);
+               AxisTics *axisTics;
+               QCheckBox *onCheckBox;
+               QTabWidget *ticsTabWidget;
+               QComboBox *locationComboBox;
+               QCheckBox *mirrorCheckBox;
+               QCheckBox *rotationCheckBox;
+               QComboBox *positionComboBox;
+               QLineEdit *startPosLineEdit;
+               QLineEdit *incPosLineEdit;
+               QLineEdit *endPosLineEdit;
+               QLineEdit *labelsPosLineEdit;
+               QGroupBox *posGroupBox;
+};
+#endif // AXIS_TICS_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/BarOptionWidget.cpp b/src/gui/opt/BarOptionWidget.cpp
new file mode 100644 (file)
index 0000000..1f0fb0d
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "BarOptionWidget.h"
+#include "Bar.h"
+
+#include <QtGui/QComboBox>
+#include <QtGui/QDoubleSpinBox>
+#include <QtGui/QGridLayout>
+#include <QtGui/QRadioButton>
+
+BarOptionWidget::BarOptionWidget(QWidget *parent)
+: OptionWidget(parent), bar(0)
+{
+       setWindowTitle(tr("Bar Size"));
+       setWhatsThis("set bar");
+}
+
+BarOptionWidget::~BarOptionWidget()
+{
+       delete bar;
+}
+
+void BarOptionWidget::construct() 
+{
+       barSizeRadioButton = new QRadioButton;
+       barSizeRadioButton->setText(tr("Quantitative"));
+       connect(barSizeRadioButton, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       barSizeDoubleSpinBox = new QDoubleSpinBox;
+       connect(barSizeRadioButton, SIGNAL(toggled(bool)),
+                       barSizeDoubleSpinBox, SLOT(setEnabled(bool)));
+       connect(barSizeDoubleSpinBox, SIGNAL(valueChanged(double)),
+                       this, SIGNAL(modified()));
+
+       synRadioButton = new QRadioButton;
+       synRadioButton->setText(tr("Qualitative"));
+
+       synComboBox = new QComboBox;
+       synComboBox->addItem(tr("small"));
+       synComboBox->addItem(tr("large"));
+       connect(synRadioButton, SIGNAL(toggled(bool)),
+                       synComboBox, SLOT(setEnabled(bool)));
+       connect(synComboBox, SIGNAL(activated(int)),
+                       this, SIGNAL(modified()));
+
+       QGridLayout *mainLayout = new QGridLayout;
+       mainLayout->addWidget(barSizeRadioButton, 0, 0);
+       mainLayout->addWidget(barSizeDoubleSpinBox, 0, 1);
+       mainLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+       mainLayout->addWidget(synRadioButton, 1, 0);
+       mainLayout->addWidget(synComboBox, 1, 1);
+       mainLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 2, 0);
+
+       setLayout(mainLayout);
+}
+
+void BarOptionWidget::init()
+{
+       delete bar;
+       bar = new Bar;
+       setWidget();
+}
+
+void BarOptionWidget::apply()
+{
+       if (synRadioButton->isChecked()) {
+               bar->setSize(synComboBox->currentIndex());
+       } else {
+               bar->setSize(barSizeDoubleSpinBox->value());
+       }
+       emit executed(bar->command());
+}
+
+void BarOptionWidget::setWidget()
+{
+       if (bar->isSmall() || bar->isBig()) {
+               synComboBox->setCurrentIndex(static_cast<int>(bar->size()));
+               synRadioButton->setChecked(true);
+               barSizeDoubleSpinBox->setEnabled(false);
+       } else {
+               barSizeRadioButton->setChecked(true);
+               synComboBox->setEnabled(false);
+       }
+       barSizeDoubleSpinBox->setValue(bar->size());
+}
diff --git a/src/gui/opt/BarOptionWidget.h b/src/gui/opt/BarOptionWidget.h
new file mode 100644 (file)
index 0000000..ab2a697
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef BAR_OPTION_WIDGET_INCLUDED
+#define BAR_OPTION_WIDGET_INCLUDED
+
+#include "OptionWidget.h"
+
+class Bar;
+
+class QComboBox;
+class QDoubleSpinBox;
+class QRadioButton;
+
+class BarOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit BarOptionWidget(QWidget *parent = 0);
+               ~BarOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               BarOptionWidget(const BarOptionWidget &);
+               BarOptionWidget &operator=(const BarOptionWidget &);
+
+               void init();
+               void apply();
+               void setWidget();
+               Bar *bar;
+               QRadioButton *barSizeRadioButton;
+               QDoubleSpinBox *barSizeDoubleSpinBox;
+               QRadioButton *synRadioButton;
+               QComboBox *synComboBox;
+};
+#endif // BAR_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/BoxWidthOptionWidget.cpp b/src/gui/opt/BoxWidthOptionWidget.cpp
new file mode 100644 (file)
index 0000000..169c010
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "BoxWidthOptionWidget.h"
+#include "BoxWidth.h"
+
+#include <QtGui/QCheckBox>
+#include <QtGui/QDoubleSpinBox>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QVBoxLayout>
+
+BoxWidthOptionWidget::BoxWidthOptionWidget(QWidget *parent)
+: OptionWidget(parent), boxWidth(0)
+{
+       setWindowTitle(tr("Box Width"));
+       setWhatsThis("set boxwidth");
+}
+
+BoxWidthOptionWidget::~BoxWidthOptionWidget()
+{
+       delete boxWidth;
+}
+
+void BoxWidthOptionWidget::construct()
+{
+       defaultCheckBox = new QCheckBox;
+       defaultCheckBox->setText(tr("&Specify"));
+       connect(defaultCheckBox, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       absoluteCheckBox = new QCheckBox;
+       absoluteCheckBox->setText(tr("\"A&bsolute\" Value"));
+       connect(defaultCheckBox, SIGNAL(toggled(bool)),
+                       absoluteCheckBox, SLOT(setEnabled(bool)));
+       connect(absoluteCheckBox, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       boxWidthDoubleSpinBox = new QDoubleSpinBox;
+       boxWidthDoubleSpinBox->setMinimum(-99);
+       connect(defaultCheckBox, SIGNAL(toggled(bool)),
+                       boxWidthDoubleSpinBox, SLOT(setEnabled(bool)));
+       connect(boxWidthDoubleSpinBox, SIGNAL(valueChanged(double)),
+                       this, SIGNAL(modified()));
+
+       QHBoxLayout *boxWidthLayout = new QHBoxLayout;
+       boxWidthLayout->addWidget(defaultCheckBox);
+       boxWidthLayout->addWidget(absoluteCheckBox);
+       boxWidthLayout->addWidget(boxWidthDoubleSpinBox);
+       boxWidthLayout->addStretch();
+
+       QVBoxLayout *mainLayout = new QVBoxLayout;
+       mainLayout->addLayout(boxWidthLayout);
+       mainLayout->addStretch();
+
+       setLayout(mainLayout);
+}
+
+void BoxWidthOptionWidget::init()
+{
+       delete boxWidth;
+       boxWidth = new BoxWidth;
+       setWidget();
+}
+
+void BoxWidthOptionWidget::apply()
+{
+       boxWidth->setWidth(boxWidthDoubleSpinBox->value());
+       boxWidth->setAbsolute(absoluteCheckBox->isChecked());
+       boxWidth->setAuto(!defaultCheckBox->isChecked());
+
+       emit executed(boxWidth->command());
+}
+
+void BoxWidthOptionWidget::setWidget()
+{      
+       bool flag = boxWidth->isAuto();
+       defaultCheckBox->setChecked(!flag);
+       boxWidthDoubleSpinBox->setEnabled(!flag);
+       absoluteCheckBox->setEnabled(!flag);
+
+       boxWidthDoubleSpinBox->setValue(boxWidth->width());
+       absoluteCheckBox->setChecked(boxWidth->isAbsolute());
+}
diff --git a/src/gui/opt/BoxWidthOptionWidget.h b/src/gui/opt/BoxWidthOptionWidget.h
new file mode 100644 (file)
index 0000000..0d39774
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef BOX_WIDTH_OPTION_WIDGET_INCLUDED
+#define BOX_WIDTH_OPTION_WIDGET_INCLUDED
+
+#include "OptionWidget.h"
+
+class BoxWidth;
+
+class QCheckBox;
+class QDoubleSpinBox;
+
+class BoxWidthOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit BoxWidthOptionWidget(QWidget *parent = 0);
+               ~BoxWidthOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               BoxWidthOptionWidget(const BoxWidthOptionWidget &);
+               BoxWidthOptionWidget &operator=(const BoxWidthOptionWidget &);
+
+               void init();
+               void apply();
+               void setWidget();
+               BoxWidth *boxWidth;
+               QCheckBox *defaultCheckBox;
+               QDoubleSpinBox *boxWidthDoubleSpinBox;
+               QCheckBox *absoluteCheckBox;
+};
+#endif // BOX_WIDTH_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/DummyOptionWidget.cpp b/src/gui/opt/DummyOptionWidget.cpp
new file mode 100644 (file)
index 0000000..bd68637
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "DummyOptionWidget.h"
+#include "Dummy.h"
+
+#include <QtGui/QGridLayout>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+
+DummyOptionWidget::DummyOptionWidget(QWidget *parent)
+: OptionWidget(parent), dummy(0)
+{
+       setWindowTitle(tr("Dummy Variable"));
+       setWhatsThis("set dummy");
+}
+
+DummyOptionWidget::~DummyOptionWidget()
+{
+       delete dummy;
+}
+
+void DummyOptionWidget::construct()
+{
+       xDummyLineEdit = new QLineEdit;
+       connect(xDummyLineEdit, SIGNAL(textChanged(const QString &)),
+                       this, SIGNAL(modified()));
+
+       QLabel *xVarLabel = new QLabel;
+       xVarLabel->setText(tr("Variable") + " &X:");
+       xVarLabel->setBuddy(xDummyLineEdit);
+
+       yDummyLineEdit = new QLineEdit;
+       connect(yDummyLineEdit, SIGNAL(textChanged(const QString &)),
+                       this, SIGNAL(modified()));
+
+       QLabel *yVarLabel = new QLabel;
+       yVarLabel->setText(tr("Variable") + " &Y:");
+       yVarLabel->setBuddy(yDummyLineEdit);
+
+       QGridLayout *mainLayout = new QGridLayout;
+       mainLayout->addWidget(xVarLabel, 0, 0);
+       mainLayout->addWidget(xDummyLineEdit, 0, 1);
+       mainLayout->addWidget(yVarLabel, 1, 0);
+       mainLayout->addWidget(yDummyLineEdit, 1, 1);
+       mainLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+       mainLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 2, 0);
+
+       setLayout(mainLayout);
+}
+
+void DummyOptionWidget::init()
+{
+       delete dummy;
+       dummy = new Dummy;
+       setWidget();
+}
+
+void DummyOptionWidget::apply()
+{
+       dummy->setDummyVar1(xDummyLineEdit->text());
+       dummy->setDummyVar2(yDummyLineEdit->text());
+       emit executed(dummy->command());
+}
+
+void DummyOptionWidget::setWidget()
+{
+       xDummyLineEdit->setText(dummy->dummyVar1());
+       yDummyLineEdit->setText(dummy->dummyVar2());
+}
diff --git a/src/gui/opt/DummyOptionWidget.h b/src/gui/opt/DummyOptionWidget.h
new file mode 100644 (file)
index 0000000..28f04d9
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef DUMMY_OPTION_WIDGET_INCLUDED
+#define DUMMY_OPTION_WIDGET_INCLUDED
+
+#include "OptionWidget.h"
+
+class Dummy;
+
+class QLineEdit;
+
+class DummyOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit DummyOptionWidget(QWidget *parent = 0);
+               ~DummyOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               DummyOptionWidget(const DummyOptionWidget &);
+               DummyOptionWidget &operator=(const DummyOptionWidget &);
+
+               void init();
+               void apply();
+               void setWidget();
+               Dummy *dummy;
+               QLineEdit *xDummyLineEdit;
+               QLineEdit *yDummyLineEdit;
+};
+#endif // DUMMY_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/EncodingOptionWidget.cpp b/src/gui/opt/EncodingOptionWidget.cpp
new file mode 100644 (file)
index 0000000..d5fc077
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "EncodingOptionWidget.h"
+#include "Encoding.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtGui/QGridLayout>
+#include <QtGui/QComboBox>
+
+EncodingOptionWidget::EncodingOptionWidget(QWidget *parent)
+: OptionWidget(parent), encoding(0)
+{
+       setWindowTitle(tr("Encoding"));
+       setWhatsThis("set encoding");
+}
+
+EncodingOptionWidget::~EncodingOptionWidget()
+{
+       delete encoding;
+}
+
+void EncodingOptionWidget::construct()
+{
+       encodingComboBox = new QComboBox;
+       for (int i = 0; Encoding::VALUE[i][0]; i++) {
+               encodingComboBox->addItem(QCoreApplication::translate(
+                               "Encoding", Encoding::VALUE[i]));
+       }
+       connect(encodingComboBox, SIGNAL(activated(int)),
+                       this, SIGNAL(modified()));
+
+       QGridLayout *mainLayout = new QGridLayout;
+       mainLayout->addWidget(encodingComboBox, 0, 0);
+       mainLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1);
+       mainLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 1, 0);
+
+       setLayout(mainLayout);
+}
+
+void EncodingOptionWidget::init()
+{
+       delete encoding;
+       encoding = new Encoding;
+       setWidget();
+}
+
+void EncodingOptionWidget::apply()
+{
+       encoding->setValue(encodingComboBox->currentIndex());
+       emit executed(encoding->command());
+}
+
+void EncodingOptionWidget::setWidget()
+{
+       encodingComboBox->setCurrentIndex(encoding->value());
+}
diff --git a/src/gui/opt/EncodingOptionWidget.h b/src/gui/opt/EncodingOptionWidget.h
new file mode 100644 (file)
index 0000000..8c05a4d
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef ENCODING_OPTION_WIDGET_INCLUDED
+#define ENCODING_OPTION_WIDGET_INCLUDED
+
+#include "OptionWidget.h"
+
+class Encoding;
+
+class QComboBox;
+
+class EncodingOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit EncodingOptionWidget(QWidget *parent = 0);
+               ~EncodingOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               EncodingOptionWidget(const EncodingOptionWidget &);
+               EncodingOptionWidget &operator=(const EncodingOptionWidget &);
+
+               void init();
+               void apply();
+               void setWidget();
+               Encoding *encoding;
+               QComboBox *encodingComboBox;
+};
+#endif // ENCODING_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/FormatOptionWidget.cpp b/src/gui/opt/FormatOptionWidget.cpp
new file mode 100644 (file)
index 0000000..617b948
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "FormatOptionWidget.h"
+#include "Format.h"
+
+#include <QtGui/QGridLayout>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+
+FormatOptionWidget::FormatOptionWidget(QWidget *parent)
+: OptionWidget(parent), format(0)
+{
+       setWindowTitle(tr("Format"));
+       setWhatsThis("set format");
+}
+
+FormatOptionWidget::~FormatOptionWidget()
+{
+       while (!formatLineEditList.isEmpty()) {
+               delete formatLineEditList.takeFirst();
+       }
+       delete format;
+}
+
+void FormatOptionWidget::construct()
+{
+       for (int i = 0; !Format::AXIS[i].isEmpty(); i++) {
+               QLineEdit *formatLineEdit = new QLineEdit;
+               connect(formatLineEdit, SIGNAL(textChanged(const QString &)),
+                               this, SIGNAL(modified()));
+               formatLineEditList.append(formatLineEdit);
+       }
+
+       QGridLayout *mainLayout = new QGridLayout;
+       for (int i = 0; !Format::AXIS[i].isEmpty(); i++) {
+               QLabel *formatLabel = new QLabel;
+               formatLabel->setText(Format::AXIS[i] + tr(" Axis"));
+
+               mainLayout->addWidget(formatLabel, i, 0);
+               mainLayout->addWidget(formatLineEditList[i], i, 1);
+       }
+       mainLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+       mainLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding),
+                       formatLineEditList.size(), 0);
+
+       setLayout(mainLayout);
+}
+
+void FormatOptionWidget::init()
+{
+       delete format;
+       format = new Format;
+       setWidget();
+}
+void FormatOptionWidget::apply()
+{
+       for (int i = 0; !Format::AXIS[i].isEmpty(); i++) {
+               format->setFormatString(i, formatLineEditList.at(i)->text());
+       }
+       emit executed(format->command());
+}
+
+void FormatOptionWidget::setWidget()
+{
+       for (int i = 0; !Format::AXIS[i].isEmpty(); i++) {
+               formatLineEditList[i]->setText(format->formatString(i));
+       }
+}
diff --git a/src/gui/opt/FormatOptionWidget.h b/src/gui/opt/FormatOptionWidget.h
new file mode 100644 (file)
index 0000000..4b9f6b0
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef FORMAT_OPTION_WIDGET_INCLUDED
+#define FORMAT_OPTION_WIDGET_INCLUDED
+
+#include "OptionWidget.h"
+
+class Format;
+
+#include <QtCore/QList>
+class QCheckBox;
+class QLineEdit;
+
+class FormatOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit FormatOptionWidget(QWidget *parent = 0);
+               ~FormatOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               FormatOptionWidget(const FormatOptionWidget &);
+               FormatOptionWidget &operator=(const FormatOptionWidget &);
+
+               void init();
+               void apply();
+               void setWidget();
+               Format *format;
+               QList<QLineEdit *> formatLineEditList;
+};
+#endif // FORMAT_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/GridOptionWidget.cpp b/src/gui/opt/GridOptionWidget.cpp
new file mode 100644 (file)
index 0000000..002138a
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "GridOptionWidget.h"
+#include "Grid.h"
+
+#include <QtGui/QCheckBox>
+#include <QtGui/QGridLayout>
+
+GridOptionWidget::GridOptionWidget(QWidget *parent)
+: OptionWidget(parent), grid(0)
+{
+       setWindowTitle(tr("Grid"));
+       setWhatsThis("set grid");
+}
+
+GridOptionWidget::~GridOptionWidget()
+{
+       while (!gridCheckBoxList.isEmpty()) {
+               delete gridCheckBoxList.takeFirst();
+       }
+       delete grid;
+}
+
+void GridOptionWidget::construct()
+{
+       for (int i = 0; !Grid::AXIS[i].isEmpty(); i++) {
+               QCheckBox *gridCheckBox = new QCheckBox;
+               gridCheckBox->setText(Grid::AXIS[i] + tr(" Axis"));
+               connect(gridCheckBox, SIGNAL(toggled(bool)),
+                               this, SIGNAL(modified()));
+               gridCheckBoxList.append(gridCheckBox);
+       }
+
+       const int num = 2;
+
+       QGridLayout *mainLayout = new QGridLayout;
+       for (int i = 0; !Grid::AXIS[i].isEmpty(); i++) {
+               mainLayout->addWidget(gridCheckBoxList[i], i / num, i % num);
+       }
+       mainLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, num + 1);
+       mainLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding),
+                       gridCheckBoxList.size() / num, 0);
+
+       setLayout(mainLayout);
+}
+
+void GridOptionWidget::init()
+{
+       delete grid;
+       grid = new Grid;
+       setWidget();
+}
+void GridOptionWidget::apply()
+{
+       for (int i = 0; !Grid::AXIS[i].isEmpty(); i++) {
+               grid->setGrid(i, gridCheckBoxList.at(i)->isChecked());
+       }
+       emit executed(grid->command());
+}
+
+void GridOptionWidget::setWidget()
+{
+       for (int i = 0; !Grid::AXIS[i].isEmpty(); i++) {
+               gridCheckBoxList[i]->setChecked(grid->isGrid(i));
+       }
+}
diff --git a/src/gui/opt/GridOptionWidget.h b/src/gui/opt/GridOptionWidget.h
new file mode 100644 (file)
index 0000000..dcb8789
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef GRID_OPTION_WIDGET_INCLUDED
+#define GRID_OPTION_WIDGET_INCLUDED
+
+#include "OptionWidget.h"
+
+class Grid;
+
+#include <QtCore/QList>
+class QCheckBox;
+
+class GridOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit GridOptionWidget(QWidget *parent = 0);
+               ~GridOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               GridOptionWidget(const GridOptionWidget &);
+               GridOptionWidget &operator=(const GridOptionWidget &);
+
+               void init();
+               void apply();
+               void setWidget();
+               Grid *grid;
+               QList<QCheckBox *> gridCheckBoxList;
+};
+#endif // GRID_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/KeyOptionWidget.cpp b/src/gui/opt/KeyOptionWidget.cpp
new file mode 100644 (file)
index 0000000..c364c41
--- /dev/null
@@ -0,0 +1,351 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "KeyOptionWidget.h"
+#include "Key.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtGui/QCheckBox>
+#include <QtGui/QComboBox>
+#include <QtGui/QDoubleSpinBox>
+#include <QtGui/QGridLayout>
+#include <QtGui/QGroupBox>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QRadioButton>
+#include <QtGui/QSpinBox>
+#include <QtGui/QStackedWidget>
+#include <QtGui/QTabWidget>
+#include <QtGui/QVBoxLayout>
+
+#include <cmath> // pow()
+
+KeyOptionWidget::KeyOptionWidget(QWidget *parent)
+: OptionWidget(parent), key(0)
+{
+       setWindowTitle(tr("Legend"));
+       setWhatsThis("set key");
+}
+
+KeyOptionWidget::~KeyOptionWidget()
+{
+       while (!positionCheckBoxList.isEmpty()) {
+               delete positionCheckBoxList.takeFirst();
+       }
+       while (!positionDoubleSpinBoxList.isEmpty()) {
+               delete positionDoubleSpinBoxList.takeFirst();
+       }
+       delete key;
+}
+
+void KeyOptionWidget::construct()
+{
+       keyCheckBox = new QCheckBox;
+       keyCheckBox->setText(tr("Ac&tivation"));
+       connect(keyCheckBox, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       for (int i = 0; Key::POSITION[i][0]; i++) {
+               QCheckBox *positionCheckBox = new QCheckBox;
+               positionCheckBox->setText(QCoreApplication::translate(
+                                       "Key", Key::POSITION[i]));
+               connect(positionCheckBox, SIGNAL(toggled(bool)),
+                               this, SIGNAL(modified()));
+               positionCheckBoxList.append(positionCheckBox);
+       }
+
+       const int num = 3;
+       QGridLayout *cornerLayout = new QGridLayout;
+       for (int i = 0; Key::POSITION[i][0]; i++) {
+               cornerLayout->addWidget(positionCheckBoxList[i], i / num, i % num);
+       }
+       cornerLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, num);
+
+       QWidget *cornerWidget = new QWidget;
+       cornerWidget->setLayout(cornerLayout);
+
+       for (int i = 0; !Key::AXIS[i].isEmpty(); i++) {
+               QDoubleSpinBox *positionDoubleSpinBox = new QDoubleSpinBox;
+               positionDoubleSpinBox->setMaximum(std::numeric_limits<double>::max());
+               positionDoubleSpinBox->setMinimum(-std::numeric_limits<double>::max());
+               connect(positionDoubleSpinBox, SIGNAL(valueChanged(double)),
+                               this, SIGNAL(modified()));
+               positionDoubleSpinBoxList.append(positionDoubleSpinBox);
+       }
+
+       QGridLayout *coordinateLayout = new QGridLayout;
+       for (int i = 0; !Key::AXIS[i].isEmpty(); i++) {
+               QLabel *positionLabel = new QLabel;
+               positionLabel->setText(Key::AXIS[i]);
+               positionLabel->setBuddy(positionDoubleSpinBoxList[i]);
+
+               coordinateLayout->addWidget(positionLabel, i, 0);
+               coordinateLayout->addWidget(positionDoubleSpinBoxList[i], i, 1);
+       }
+       coordinateLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+
+       QWidget *coordinateWidget = new QWidget;
+       coordinateWidget->setLayout(coordinateLayout);
+
+       QStackedWidget *positionStackedWidget = new QStackedWidget;
+       positionStackedWidget->addWidget(cornerWidget);
+       positionStackedWidget->addWidget(coordinateWidget);
+
+       positionComboBox = new QComboBox;
+       positionComboBox->addItem(tr("Corner"));
+       positionComboBox->addItem(tr("Coordinate"));
+       connect(positionComboBox, SIGNAL(activated(int)),
+                       positionStackedWidget, SLOT(setCurrentIndex(int)));
+       connect(positionComboBox, SIGNAL(activated(int)),
+                       this, SIGNAL(modified()));
+
+       textJustifyCheckBox = new QCheckBox;
+       textJustifyCheckBox->setText(tr("Left Justify"));
+       connect(textJustifyCheckBox, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       reverseCheckBox = new QCheckBox;
+       reverseCheckBox->setText(tr("Reverse"));
+       connect(reverseCheckBox, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       autoTitlesCheckBox = new QCheckBox;
+       autoTitlesCheckBox->setText(tr("Auto Titles"));
+       connect(autoTitlesCheckBox, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       enhancedCheckBox = new QCheckBox;
+       enhancedCheckBox->setText(tr("Enhanced"));
+       connect(enhancedCheckBox, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       QLabel *sampleLengthLabel = new QLabel;
+       sampleLengthLabel->setText(tr("Sample Length:"));
+
+       sampleLengthDoubleSpinBox = new QDoubleSpinBox;
+       connect(sampleLengthDoubleSpinBox, SIGNAL(valueChanged(double)),
+                       this, SIGNAL(modified()));
+
+       QLabel *spacingLabel = new QLabel;
+       spacingLabel->setText(tr("Spacing:"));
+
+       spacingDoubleSpinBox = new QDoubleSpinBox;
+       connect(spacingDoubleSpinBox, SIGNAL(valueChanged(double)),
+                       this, SIGNAL(modified()));
+
+       QLabel *widthIncrementLabel = new QLabel;
+       widthIncrementLabel->setText(tr("Width Increment:"));
+
+       widthIncrementDoubleSpinBox = new QDoubleSpinBox;
+       widthIncrementDoubleSpinBox->setMinimum(-99);
+       connect(widthIncrementDoubleSpinBox, SIGNAL(valueChanged(double)),
+                       this, SIGNAL(modified()));
+
+       QLabel *heightIncrementLabel = new QLabel;
+       heightIncrementLabel->setText(tr("Height Increment:"));
+
+       heightIncrementDoubleSpinBox = new QDoubleSpinBox;
+       heightIncrementDoubleSpinBox->setMinimum(-99);
+       connect(heightIncrementDoubleSpinBox, SIGNAL(valueChanged(double)),
+                       this, SIGNAL(modified()));
+
+       QLabel *legendTitleLabel = new QLabel;
+       legendTitleLabel->setText(tr("Legend Title:"));
+
+       legendTitleLineEdit = new QLineEdit;
+       connect(legendTitleLineEdit, SIGNAL(textChanged(const QString &)),
+                       this, SIGNAL(modified()));
+
+       lineTypeSpinBox = new QSpinBox;
+       connect(lineTypeSpinBox, SIGNAL(valueChanged(int)),
+                       this, SIGNAL(modified()));
+
+       lineTypeLabel = new QLabel;
+       lineTypeLabel->setText(tr("&Line Type:"));
+       lineTypeLabel->setBuddy(lineTypeSpinBox);
+
+       lineWidthDoubleSpinBox = new QDoubleSpinBox;
+       connect(lineWidthDoubleSpinBox, SIGNAL(valueChanged(double)),
+                       this, SIGNAL(modified()));
+
+       lineWidthLabel = new QLabel;
+       lineWidthLabel->setText(tr("L&ine Width:"));
+       lineWidthLabel->setBuddy(lineWidthDoubleSpinBox);
+
+       QVBoxLayout *positionLayout = new QVBoxLayout;
+       positionLayout->addWidget(positionComboBox);
+       positionLayout->addWidget(positionStackedWidget);
+       positionLayout->addStretch();
+
+       QWidget *positionWidget = new QWidget;
+       positionWidget->setLayout(positionLayout);
+
+       QGridLayout *boxLayout = new QGridLayout;
+       boxLayout->addWidget(lineTypeLabel, 0, 0);
+       boxLayout->addWidget(lineTypeSpinBox, 0, 1);
+       boxLayout->addItem(new QSpacerItem(40, 20, 
+                                       QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+       boxLayout->addWidget(lineWidthLabel, 1, 0);
+       boxLayout->addWidget(lineWidthDoubleSpinBox, 1, 1);
+
+       boxGroupBox = new QGroupBox(tr("Bo&x"));
+       boxGroupBox->setCheckable(true);
+       boxGroupBox->setLayout(boxLayout);
+       connect(boxGroupBox, SIGNAL(toggled(bool)),
+                       lineTypeLabel, SLOT(setEnabled(bool)));
+       connect(boxGroupBox, SIGNAL(toggled(bool)),
+                       lineTypeSpinBox, SLOT(setEnabled(bool)));
+       connect(boxGroupBox, SIGNAL(toggled(bool)),
+                       lineWidthLabel, SLOT(setEnabled(bool)));
+       connect(boxGroupBox, SIGNAL(toggled(bool)),
+                       lineWidthDoubleSpinBox, SLOT(setEnabled(bool)));
+       connect(boxGroupBox, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       QHBoxLayout *titleLayout = new QHBoxLayout;
+       titleLayout->addWidget(legendTitleLabel);
+       titleLayout->addWidget(legendTitleLineEdit);
+
+       QVBoxLayout *boxTabLayout = new QVBoxLayout;
+       boxTabLayout->addWidget(boxGroupBox);
+       boxTabLayout->addLayout(titleLayout);
+       boxTabLayout->addStretch();
+
+       QWidget *boxWidget = new QWidget;
+       boxWidget->setLayout(boxTabLayout);
+
+       QGridLayout *othersLayout = new QGridLayout;
+       othersLayout->addWidget(textJustifyCheckBox, 0, 0);
+       othersLayout->addWidget(reverseCheckBox, 0, 1);
+       othersLayout->addWidget(autoTitlesCheckBox, 1, 0);
+       othersLayout->addWidget(enhancedCheckBox, 1, 1);
+       othersLayout->addWidget(sampleLengthLabel, 2, 0);
+       othersLayout->addWidget(sampleLengthDoubleSpinBox, 2, 1);
+       othersLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 2, 2);
+       othersLayout->addWidget(spacingLabel, 3, 0);
+       othersLayout->addWidget(spacingDoubleSpinBox, 3, 1);
+       othersLayout->addWidget(widthIncrementLabel, 4, 0);
+       othersLayout->addWidget(widthIncrementDoubleSpinBox, 4, 1);
+       othersLayout->addWidget(heightIncrementLabel, 5, 0);
+       othersLayout->addWidget(heightIncrementDoubleSpinBox, 5, 1);
+       othersLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 7, 0);
+
+       QWidget *othersWidget = new QWidget;
+       othersWidget->setLayout(othersLayout);
+
+       QTabWidget *tabWidget = new QTabWidget;
+       tabWidget->addTab(positionWidget, tr("&Position"));
+       tabWidget->addTab(boxWidget, tr("&Box and Title"));
+       tabWidget->addTab(othersWidget, tr("Ot&hers"));
+       connect(keyCheckBox, SIGNAL(toggled(bool)), 
+                       tabWidget, SLOT(setEnabled(bool)));
+
+       QVBoxLayout *mainLayout = new QVBoxLayout;
+       mainLayout->addWidget(keyCheckBox);
+       mainLayout->addWidget(tabWidget);
+
+       setLayout(mainLayout);
+}
+
+void KeyOptionWidget::init()
+{
+       delete key;
+       key = new Key;
+       setWidget();
+}
+
+void KeyOptionWidget::apply()
+{
+       key->setOn(keyCheckBox->isChecked());
+
+       switch (positionComboBox->currentIndex()) {
+       case 0:
+               {
+                       int pos = 0;
+                       for (int i = 0; Key::POSITION[i][0]; i++) {
+                               if (positionCheckBoxList.at(i)->isChecked()) {
+                                       pos |= static_cast<int>(
+                                                       std::pow(static_cast<double>(2), i));
+                               }
+                       }
+                       key->setPosition(pos);
+               }
+               break;
+       case 1:
+               for (int i = 0; !Key::AXIS[i].isEmpty(); i++) {
+                       key->setPosition(i, positionDoubleSpinBoxList.at(i)->value());
+               }
+       }
+
+       key->setLeftJustification(textJustifyCheckBox->isChecked());
+       key->setReverse(reverseCheckBox->isChecked());
+       key->setSampleLength(sampleLengthDoubleSpinBox->value());
+       key->setVerticalSpacing(spacingDoubleSpinBox->value());
+       key->setWidthIncrement(widthIncrementDoubleSpinBox->value());
+       key->setHeightIncrement(heightIncrementDoubleSpinBox->value());
+       key->setAutoTitles(autoTitlesCheckBox->isChecked());
+       key->setTitle(legendTitleLineEdit->text());
+       key->setEnhanced(enhancedCheckBox->isChecked());
+       key->setBox(boxGroupBox->isChecked());
+       if (boxGroupBox->isChecked()) {
+               key->setLineType(lineTypeSpinBox->value());
+               key->setLineWidth(lineWidthDoubleSpinBox->value());
+       }
+
+       emit executed(key->command());
+}
+
+void KeyOptionWidget::setWidget()
+{
+       keyCheckBox->setChecked(key->isOn());
+
+       int pos = key->position();
+       positionComboBox->setCurrentIndex(pos == 0);
+       for (int i = 0; Key::POSITION[i][0]; i++) {
+               positionCheckBoxList[i]->setChecked(pos 
+                               & static_cast<int>(std::pow(static_cast<double>(2), i)));
+       }
+       for (int i = 0; !Key::AXIS[i].isEmpty(); i++) {
+               positionDoubleSpinBoxList[i]->setValue(key->position(i));
+       }
+
+       textJustifyCheckBox->setChecked(key->leftJustification());
+       reverseCheckBox->setChecked(key->isReverse());
+       sampleLengthDoubleSpinBox->setValue(key->sampleLength());
+       spacingDoubleSpinBox->setValue(key->verticalSpacing());
+       widthIncrementDoubleSpinBox->setValue(key->widthIncrement());
+       heightIncrementDoubleSpinBox->setValue(key->heightIncrement());
+       autoTitlesCheckBox->setChecked(key->isAutoTitles());
+       legendTitleLineEdit->setText(key->title());
+       enhancedCheckBox->setChecked(key->enhances());
+
+       boxGroupBox->setChecked(key->isBox());
+       if (key->isBox()) {
+               lineTypeSpinBox->setValue(key->lineType());
+               lineWidthDoubleSpinBox->setValue(key->lineWidth());
+       } else {
+               lineTypeSpinBox->setEnabled(false);
+               lineTypeLabel->setEnabled(false);
+               lineWidthDoubleSpinBox->setEnabled(false);
+               lineWidthLabel->setEnabled(false);
+       }
+}
diff --git a/src/gui/opt/KeyOptionWidget.h b/src/gui/opt/KeyOptionWidget.h
new file mode 100644 (file)
index 0000000..2e1df66
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef KEY_OPTION_WIDGET_INCLUDED
+#define KEY_OPTION_WIDGET_INCLUDED
+
+#include "OptionWidget.h"
+
+class Key;
+
+#include <QtCore/QList>
+class QCheckBox;
+class QComboBox;
+class QDoubleSpinBox;
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QRadioButton;
+class QSpinBox;
+
+class KeyOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit KeyOptionWidget(QWidget *parent = 0);
+               ~KeyOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               KeyOptionWidget(const KeyOptionWidget &);
+               KeyOptionWidget &operator=(const KeyOptionWidget &);
+
+               void init();
+               void apply();
+               void setWidget();
+               Key *key;
+               QCheckBox *keyCheckBox;
+               QComboBox *positionComboBox;
+               QList<QCheckBox *> positionCheckBoxList;
+               QList<QDoubleSpinBox *> positionDoubleSpinBoxList;
+               QGroupBox *boxGroupBox;
+               QCheckBox *textJustifyCheckBox;
+               QCheckBox *reverseCheckBox;
+               QDoubleSpinBox *sampleLengthDoubleSpinBox;
+               QDoubleSpinBox *spacingDoubleSpinBox;
+               QDoubleSpinBox *widthIncrementDoubleSpinBox;
+               QDoubleSpinBox *heightIncrementDoubleSpinBox;
+               QCheckBox *autoTitlesCheckBox;
+               QLineEdit *legendTitleLineEdit;
+               QCheckBox *enhancedCheckBox;
+               QSpinBox *lineTypeSpinBox;
+               QLabel *lineTypeLabel;
+               QDoubleSpinBox *lineWidthDoubleSpinBox;
+               QLabel *lineWidthLabel;
+};
+#endif // KEY_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/LogScaleOptionWidget.cpp b/src/gui/opt/LogScaleOptionWidget.cpp
new file mode 100644 (file)
index 0000000..b76f2ee
--- /dev/null
@@ -0,0 +1,95 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "LogScaleOptionWidget.h"
+#include "LogScale.h"
+
+#include <QtGui/QCheckBox>
+#include <QtGui/QGridLayout>
+#include <QtGui/QLineEdit>
+
+LogScaleOptionWidget::LogScaleOptionWidget(QWidget *parent)
+: OptionWidget(parent), logScale(0)
+{
+       setWindowTitle(tr("Log Scale"));
+       setWhatsThis("set logscale");
+}
+
+LogScaleOptionWidget::~LogScaleOptionWidget()
+{
+       while (!logScaleCheckBoxList.isEmpty()) {
+               delete logScaleCheckBoxList.takeFirst();
+               delete baseLineEditList.takeFirst();
+       }
+       delete logScale;
+}
+
+void LogScaleOptionWidget::construct()
+{
+       for (int i = 0; !LogScale::AXIS[i].isEmpty(); i++) {
+               QCheckBox *logScaleCheckBox = new QCheckBox;
+               logScaleCheckBox->setText(LogScale::AXIS[i] + tr(" Axis"));
+               connect(logScaleCheckBox, SIGNAL(toggled(bool)),
+                               this, SIGNAL(modified()));
+               logScaleCheckBoxList.append(logScaleCheckBox);
+
+               QLineEdit *baseLineEdit = new QLineEdit;
+               connect(logScaleCheckBox, SIGNAL(toggled(bool)),
+                               baseLineEdit, SLOT(setEnabled(bool)));
+               connect(baseLineEdit, SIGNAL(textChanged(const QString &)),
+                               this, SIGNAL(modified()));
+               baseLineEditList.append(baseLineEdit);
+       }
+
+       QGridLayout *mainLayout = new QGridLayout;
+       for (int i = 0; !LogScale::AXIS[i].isEmpty(); i++) {
+               mainLayout->addWidget(logScaleCheckBoxList[i], i, 0);
+               mainLayout->addWidget(baseLineEditList[i], i, 1);
+       }
+       mainLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+       mainLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding),
+                       logScaleCheckBoxList.size(), 0);
+
+       setLayout(mainLayout);
+}
+
+void LogScaleOptionWidget::init()
+{
+       delete logScale;
+       logScale = new LogScale;
+       setWidget();
+}
+void LogScaleOptionWidget::apply()
+{
+       for (int i = 0; !LogScale::AXIS[i].isEmpty(); i++) {
+               logScale->setLogScale(i, logScaleCheckBoxList.at(i)->isChecked());
+               logScale->setBase(i, baseLineEditList.at(i)->text());
+       }
+       emit executed(logScale->command());
+}
+
+void LogScaleOptionWidget::setWidget()
+{
+       for (int i = 0; !LogScale::AXIS[i].isEmpty(); i++) {
+               logScaleCheckBoxList[i]->setChecked(logScale->isLogScale(i));
+               baseLineEditList[i]->setEnabled(logScale->isLogScale(i));
+               baseLineEditList[i]->setText(logScale->base(i));
+       }
+}
diff --git a/src/gui/opt/LogScaleOptionWidget.h b/src/gui/opt/LogScaleOptionWidget.h
new file mode 100644 (file)
index 0000000..f5e686e
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef LOG_SCALE_OPTION_WIDGET_INCLUDED
+#define LOG_SCALE_OPTION_WIDGET_INCLUDED
+
+#include "OptionWidget.h"
+
+class LogScale;
+
+#include <QtCore/QList>
+class QCheckBox;
+class QLineEdit;
+
+class LogScaleOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit LogScaleOptionWidget(QWidget *parent = 0);
+               ~LogScaleOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               LogScaleOptionWidget(const LogScaleOptionWidget &);
+               LogScaleOptionWidget &operator=(const LogScaleOptionWidget &);
+
+               void init();
+               void apply();
+               void setWidget();
+               LogScale *logScale;
+               QList<QCheckBox *> logScaleCheckBoxList;
+               QList<QLineEdit *> baseLineEditList;
+};
+#endif // LOG_SCALE_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/MAxisTicsOptionWidget.cpp b/src/gui/opt/MAxisTicsOptionWidget.cpp
new file mode 100644 (file)
index 0000000..e7d9be0
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "MAxisTicsOptionWidget.h"
+#include "MAxisTics.h"
+
+#include <QtGui/QComboBox>
+#include <QtGui/QLineEdit>
+#include <QtGui/QRadioButton>
+#include <QtGui/QGridLayout>
+
+MAxisTicsOptionWidget::MAxisTicsOptionWidget(QWidget *parent)
+: AxisOptionWidget(parent), mAxisTics(0)
+{
+       setWindowTitle(tr("Mini Tics"));
+       setWhatsThis(tr("set m<i>axis</i>tics"));
+}
+
+MAxisTicsOptionWidget::~MAxisTicsOptionWidget()
+{
+       delete mAxisTics;
+}
+
+void MAxisTicsOptionWidget::construct()
+{
+       AxisOptionWidget::construct();
+       for (int i = 0; !MAxisTics::AXIS[i].isEmpty(); i++) {
+               axisComboBox->addItem(MAxisTics::AXIS[i]);
+       }
+}
+
+void MAxisTicsOptionWidget::init()
+{
+       delete mAxisTics;
+       mAxisTics = new MAxisTics;
+       AxisOptionWidget::setWidget();
+}
+
+void MAxisTicsOptionWidget::apply()
+{
+       AxisOptionWidget::apply();
+       emit executed(mAxisTics->command());
+}
+
+void MAxisTicsOptionWidget::constructWidget(QWidget *widget)
+{
+       defaultRadioButton = new QRadioButton;
+       defaultRadioButton->setText(tr("D&efault"));
+       connect(defaultRadioButton, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       freqRadioButton = new QRadioButton;
+       freqRadioButton->setText(tr("&Interval"));
+       connect(freqRadioButton, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       freqLineEdit = new QLineEdit;
+       connect(freqRadioButton, SIGNAL(toggled(bool)),
+                       freqLineEdit, SLOT(setEnabled(bool)));
+       connect(freqLineEdit, SIGNAL(textChanged(const QString &)),
+                       this, SIGNAL(modified()));
+
+       // create and assemble layouts
+
+       QGridLayout *mainLayout = new QGridLayout;
+       mainLayout->addWidget(defaultRadioButton, 0, 0);
+       mainLayout->addWidget(freqRadioButton, 1, 0);
+       mainLayout->addWidget(freqLineEdit, 1, 1);
+       mainLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 1, 2);
+       mainLayout->addItem(new QSpacerItem(20, 40, 
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 2, 0);
+
+       widget->setLayout(mainLayout);
+}
+
+
+void MAxisTicsOptionWidget::setOption(int axis)
+{
+       mAxisTics->setDefault(axis, defaultRadioButton->isChecked());
+       mAxisTics->setFrequency(axis, freqLineEdit->text());
+}
+
+void MAxisTicsOptionWidget::setWidget(int axis)
+{
+       bool isDefault = mAxisTics->isDefault(axis);
+       defaultRadioButton->setChecked(isDefault);
+       freqRadioButton->setChecked(!isDefault);
+       freqLineEdit->setEnabled(!isDefault);
+       freqLineEdit->setText(mAxisTics->frequency(axis));
+}
diff --git a/src/gui/opt/MAxisTicsOptionWidget.h b/src/gui/opt/MAxisTicsOptionWidget.h
new file mode 100644 (file)
index 0000000..e071453
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef M_AXIS_TICS_OPTION_WIDGET_INCLUDED
+#define M_AXIS_TICS_OPTION_WIDGET_INCLUDED
+
+#include "AxisOptionWidget.h"
+
+class MAxisTics;
+
+class QLineEdit;
+class QRadioButton;
+
+class MAxisTicsOptionWidget : public AxisOptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit MAxisTicsOptionWidget(QWidget *parent = 0);
+               ~MAxisTicsOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               MAxisTicsOptionWidget(const MAxisTicsOptionWidget &);
+               MAxisTicsOptionWidget &operator=(const MAxisTicsOptionWidget &);
+
+               void init();
+               void apply();
+               void constructWidget(QWidget *widget);
+               void setOption(int axis);
+               void setWidget(int axis);
+               MAxisTics *mAxisTics;
+               QRadioButton *defaultRadioButton;
+               QRadioButton *freqRadioButton;
+               QLineEdit *freqLineEdit;
+};
+#endif // M_AXIS_TICS_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/MappingOptionWidget.cpp b/src/gui/opt/MappingOptionWidget.cpp
new file mode 100644 (file)
index 0000000..1965e30
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "MappingOptionWidget.h"
+#include "Mapping.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtGui/QGridLayout>
+#include <QtGui/QComboBox>
+
+MappingOptionWidget::MappingOptionWidget(QWidget *parent)
+: OptionWidget(parent), mapping(0)
+{
+       setWindowTitle(tr("Coordinate"));
+       setWhatsThis("set mapping");
+}
+
+MappingOptionWidget::~MappingOptionWidget()
+{
+       delete mapping;
+}
+
+void MappingOptionWidget::construct()
+{
+       coordComboBox = new QComboBox;
+       for (int i = 0; Mapping::COORDINATE[i][0]; i++) {
+               coordComboBox->addItem(QCoreApplication::translate(
+                                       "Mapping", Mapping::COORDINATE[i]));
+       }
+       connect(coordComboBox, SIGNAL(activated(int)),
+                       this, SIGNAL(modified()));
+
+       QGridLayout *mainLayout = new QGridLayout;
+       mainLayout->addWidget(coordComboBox, 0, 0);
+       mainLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1);
+       mainLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 1, 0);
+
+       setLayout(mainLayout);
+}
+
+void MappingOptionWidget::init()
+{
+       delete mapping;
+       mapping = new Mapping;
+       setWidget();
+}
+
+void MappingOptionWidget::apply()
+{
+       mapping->setCoordinate(coordComboBox->currentIndex());
+       emit executed(mapping->command());
+}
+
+void MappingOptionWidget::setWidget()
+{
+       coordComboBox->setCurrentIndex(mapping->coordinate());
+}
diff --git a/src/gui/opt/MappingOptionWidget.h b/src/gui/opt/MappingOptionWidget.h
new file mode 100644 (file)
index 0000000..6160913
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef MAPPING_OPTION_WIDGET_INCLUDED
+#define MAPPING_OPTION_WIDGET_INCLUDED
+
+#include "OptionWidget.h"
+
+class Mapping;
+
+class QComboBox;
+
+class MappingOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit MappingOptionWidget(QWidget *parent = 0);
+               ~MappingOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               MappingOptionWidget(const MappingOptionWidget &);
+               MappingOptionWidget &operator=(const MappingOptionWidget &);
+
+               void init();
+               void apply();
+               void setWidget();
+               Mapping *mapping;
+               QComboBox *coordComboBox;
+};
+#endif // MAPPING_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/OptionWidget.cpp b/src/gui/opt/OptionWidget.cpp
new file mode 100644 (file)
index 0000000..d487f18
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "OptionWidget.h"
+
+OptionWidget::OptionWidget(QWidget *parent)
+: QWidget(parent)
+{
+}
+
+OptionWidget::~OptionWidget()
+{
+}
+
+void OptionWidget::discard()
+{
+       setWidget();
+}
diff --git a/src/gui/opt/OptionWidget.h b/src/gui/opt/OptionWidget.h
new file mode 100644 (file)
index 0000000..485b393
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef OPTION_WIDGET_INCLUDED
+#define OPTION_WIDGET_INCLUDED
+
+#include <QtGui/QWidget>
+
+//! set コマンドのオプションを扱うウィジェット
+class OptionWidget : public QWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit OptionWidget(QWidget *parent = 0);
+               virtual ~OptionWidget();
+
+               //! ウィジェット内の要素を構築
+               virtual void construct() = 0;
+               //! ウィジェットを初期化
+               virtual void init() = 0;
+               //! ウィジェットの状態をもとにコマンドを実行
+               virtual void apply() = 0;
+               //! ウィジェットの状態の変化を破棄
+               void discard();
+
+       signals:
+               //! コマンドを実行する
+               /*!
+                * \param command 実行するコマンド
+                */
+               void executed(const QString &command);
+               void modified();
+
+       protected:
+               virtual void setWidget() = 0;
+
+       private:
+               // don't implement these
+               OptionWidget(const OptionWidget &);
+               OptionWidget &operator=(const OptionWidget &);
+};
+
+#endif // OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/OutputOptionWidget.cpp b/src/gui/opt/OutputOptionWidget.cpp
new file mode 100644 (file)
index 0000000..e9f67e8
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "OutputOptionWidget.h"
+#include "Output.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtGui/QCheckBox>
+#include <QtGui/QLineEdit>
+#include <QtGui/QFileDialog>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QPushButton>
+#include <QtGui/QVBoxLayout>
+
+OutputOptionWidget::OutputOptionWidget(QWidget *parent)
+: OptionWidget(parent), output(0)
+{
+       setWindowTitle(tr("Output"));
+       setWhatsThis("set output");
+}
+
+OutputOptionWidget::~OutputOptionWidget()
+{
+       delete output;
+}
+
+void OutputOptionWidget::construct()
+{
+       defaultCheckBox = new QCheckBox;
+       defaultCheckBox->setText(tr("&Specify"));
+       connect(defaultCheckBox, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       fileNameLineEdit = new QLineEdit;
+       connect(defaultCheckBox, SIGNAL(toggled(bool)),
+                       fileNameLineEdit, SLOT(setEnabled(bool)));
+       connect(fileNameLineEdit, SIGNAL(textChanged(const QString &)),
+                       this, SIGNAL(modified()));
+
+       fileNamePushButton = new QPushButton;
+       fileNamePushButton->setText(tr("&Open..."));
+       connect(defaultCheckBox, SIGNAL(toggled(bool)),
+                       fileNamePushButton, SLOT(setEnabled(bool)));
+       connect(fileNamePushButton, SIGNAL(clicked(bool)),
+                       this, SLOT(setOutput()));
+
+       QHBoxLayout *outputLayout = new QHBoxLayout;
+       outputLayout->addWidget(defaultCheckBox);
+       outputLayout->addWidget(fileNameLineEdit);
+       outputLayout->addWidget(fileNamePushButton);
+       outputLayout->addStretch();
+
+       QVBoxLayout *mainLayout = new QVBoxLayout;
+       mainLayout->addLayout(outputLayout);
+       mainLayout->addStretch();
+
+       setLayout(mainLayout);
+}
+
+void OutputOptionWidget::init()
+{
+       delete output;
+       output = new Output;
+       setWidget();
+}
+
+void OutputOptionWidget::apply()
+{
+       if (defaultCheckBox->isChecked()) {
+               output->setFileName(fileNameLineEdit->text());
+       }
+       emit executed(output->command());
+}
+
+void OutputOptionWidget::setWidget()
+{
+       QString fileName = output->fileName();
+       bool isEmpty = fileName.isEmpty();
+       defaultCheckBox->setChecked(!isEmpty);
+       fileNameLineEdit->setText(fileName);
+       fileNameLineEdit->setEnabled(!isEmpty);
+       fileNamePushButton->setEnabled(!isEmpty);
+}
+
+void OutputOptionWidget::setOutput()
+{
+       QString file = QFileDialog::getSaveFileName(this, tr("Set output") + " - " 
+                       + QCoreApplication::applicationName(), currentFile);
+       if (!file.isEmpty()) {
+               fileNameLineEdit->setText(file);
+               currentFile = file;
+       }
+}
diff --git a/src/gui/opt/OutputOptionWidget.h b/src/gui/opt/OutputOptionWidget.h
new file mode 100644 (file)
index 0000000..a592c4a
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef OUTPUT_OPTION_WIDGET_INCLUDED
+#define OUTPUT_OPTION_WIDGET_INCLUDED
+
+#include "OptionWidget.h"
+
+class Output;
+
+class QCheckBox;
+class QLineEdit;
+class QPushButton;
+
+class OutputOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit OutputOptionWidget(QWidget *parent = 0);
+               ~OutputOptionWidget();
+
+               void construct();
+
+       private slots:
+               void setOutput();
+
+       private:
+               // don't implement these
+               OutputOptionWidget(const OutputOptionWidget &);
+               OutputOptionWidget &operator=(const OutputOptionWidget &);
+
+               void init();
+               void apply();
+               void setWidget();
+               Output *output;
+               QString currentFile;
+               QCheckBox *defaultCheckBox;
+               QLineEdit *fileNameLineEdit;
+               QPushButton *fileNamePushButton;
+};
+#endif // OUTPUT_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/ParametricOptionWidget.cpp b/src/gui/opt/ParametricOptionWidget.cpp
new file mode 100644 (file)
index 0000000..8bae8a0
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "ParametricOptionWidget.h"
+#include "Parametric.h"
+
+#include <QtGui/QGridLayout>
+#include <QtGui/QCheckBox>
+
+ParametricOptionWidget::ParametricOptionWidget(QWidget *parent)
+: OptionWidget(parent), parametric(0)
+{
+       setWindowTitle(tr("Parameter"));
+       setWhatsThis("set parametric");
+}
+
+ParametricOptionWidget::~ParametricOptionWidget()
+{
+       delete parametric;
+}
+
+void ParametricOptionWidget::construct()
+{
+       parametricCheckBox = new QCheckBox;
+       parametricCheckBox->setText(tr("Parametric Functions"));
+       connect(parametricCheckBox, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       QGridLayout *mainLayout = new QGridLayout;
+       mainLayout->addWidget(parametricCheckBox, 0, 0);
+       mainLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1);
+       mainLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 1, 0);
+
+       setLayout(mainLayout);
+}
+
+void ParametricOptionWidget::init()
+{
+       delete parametric;
+       parametric = new Parametric;
+       setWidget();
+}
+
+void ParametricOptionWidget::apply()
+{
+       parametric->setParametric(parametricCheckBox->isChecked());
+       emit executed(parametric->command());
+}
+
+void ParametricOptionWidget::setWidget()
+{
+       parametricCheckBox->setChecked(parametric->isParametric());
+}
diff --git a/src/gui/opt/ParametricOptionWidget.h b/src/gui/opt/ParametricOptionWidget.h
new file mode 100644 (file)
index 0000000..509c19a
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef PARAMETRIC_OPTION_WIDGET_INCLUDED
+#define PARAMETRIC_OPTION_WIDGET_INCLUDED
+
+#include "OptionWidget.h"
+
+class Parametric;
+
+class QCheckBox;
+
+class ParametricOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit ParametricOptionWidget(QWidget *parent = 0);
+               ~ParametricOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               ParametricOptionWidget(const ParametricOptionWidget &);
+               ParametricOptionWidget &operator=(const ParametricOptionWidget &);
+
+               void init();
+               void apply();
+               void setWidget();
+               Parametric *parametric;
+               QCheckBox *parametricCheckBox;
+};
+#endif // PARAMETRIC_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/SamplesOptionWidget.cpp b/src/gui/opt/SamplesOptionWidget.cpp
new file mode 100644 (file)
index 0000000..a228b23
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "SamplesOptionWidget.h"
+#include "Samples.h"
+
+#include <QtGui/QGridLayout>
+#include <QtGui/QLabel>
+#include <QtGui/QSpinBox>
+
+SamplesOptionWidget::SamplesOptionWidget(QWidget *parent)
+: OptionWidget(parent), samples(0)
+{
+       setWindowTitle(tr("Sampling"));
+       setWhatsThis("set samples");
+}
+
+SamplesOptionWidget::~SamplesOptionWidget()
+{
+       delete samples;
+}
+
+void SamplesOptionWidget::construct()
+{
+       oneSpinBox = new QSpinBox;
+       oneSpinBox->setMaximum(std::numeric_limits<int>::max());
+       connect(oneSpinBox, SIGNAL(valueChanged(int)),
+                       this, SIGNAL(modified()));
+
+       QLabel *oneLabel = new QLabel;
+       oneLabel->setText(tr("Samples") + " &1:");
+       oneLabel->setBuddy(oneSpinBox);
+
+       twoSpinBox = new QSpinBox;
+       twoSpinBox->setMaximum(std::numeric_limits<int>::max());
+       connect(twoSpinBox, SIGNAL(valueChanged(int)),
+                       this, SIGNAL(modified()));
+
+       QLabel *twoLabel = new QLabel;
+       twoLabel->setText(tr("Samples") + " &2:");
+       twoLabel->setBuddy(twoSpinBox);
+
+       QGridLayout *mainLayout = new QGridLayout;
+       mainLayout->addWidget(oneLabel, 0, 0);
+       mainLayout->addWidget(oneSpinBox, 0, 1);
+       mainLayout->addWidget(twoLabel, 1, 0);
+       mainLayout->addWidget(twoSpinBox, 1, 1);
+       mainLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+       mainLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 2, 0);
+
+       setLayout(mainLayout);
+}
+
+void SamplesOptionWidget::init()
+{
+       delete samples;
+       samples = new Samples;
+       setWidget();
+}
+
+void SamplesOptionWidget::apply()
+{
+       samples->setSamples1(oneSpinBox->value());
+       samples->setSamples2(twoSpinBox->value());
+       emit executed(samples->command());
+}
+
+void SamplesOptionWidget::setWidget()
+{
+       oneSpinBox->setValue(samples->samples1());
+       twoSpinBox->setValue(samples->samples2());
+}
diff --git a/src/gui/opt/SamplesOptionWidget.h b/src/gui/opt/SamplesOptionWidget.h
new file mode 100644 (file)
index 0000000..26876cb
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef SAMPLES_OPTION_WIDGET_INCLUDED
+#define SAMPLES_OPTION_WIDGET_INCLUDED
+
+#include "OptionWidget.h"
+
+class Samples;
+
+class QSpinBox;
+
+class SamplesOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit SamplesOptionWidget(QWidget *parent = 0);
+               ~SamplesOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               SamplesOptionWidget(const SamplesOptionWidget &);
+               SamplesOptionWidget &operator=(const SamplesOptionWidget &);
+
+               void init();
+               void apply();
+               void setWidget();
+               Samples *samples;
+               QSpinBox *oneSpinBox;
+               QSpinBox *twoSpinBox;
+};
+#endif // SAMPLES_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/SizeOptionWidget.cpp b/src/gui/opt/SizeOptionWidget.cpp
new file mode 100644 (file)
index 0000000..0cf8d3d
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "SizeOptionWidget.h"
+#include "Size.h"
+
+#include <QtGui/QCheckBox>
+#include <QtGui/QDoubleSpinBox>
+#include <QtGui/QLabel>
+#include <QtGui/QGridLayout>
+
+SizeOptionWidget::SizeOptionWidget(QWidget *parent)
+: OptionWidget(parent), size(0)
+{
+       setWindowTitle(tr("Size"));
+       setWhatsThis("set size");
+}
+
+SizeOptionWidget::~SizeOptionWidget()
+{
+       delete size;
+}
+
+void SizeOptionWidget::construct()
+{
+       ratioCheckBox = new QCheckBox;
+       ratioCheckBox->setText(tr("&Specify Ratio"));
+       connect(ratioCheckBox, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       ratioDoubleSpinBox = new QDoubleSpinBox;
+       ratioDoubleSpinBox->setMinimum(-99);
+       connect(ratioCheckBox, SIGNAL(toggled(bool)),
+                       ratioDoubleSpinBox, SLOT(setEnabled(bool)));
+       connect(ratioDoubleSpinBox, SIGNAL(valueChanged(double)),
+                       this, SIGNAL(modified()));
+
+       hSizeDoubleSpinBox = new QDoubleSpinBox;
+       connect(hSizeDoubleSpinBox, SIGNAL(valueChanged(double)),
+                       this, SIGNAL(modified()));
+
+       QLabel *hLabel = new QLabel;
+       hLabel->setText(tr("&Horizontal Size:"));
+       hLabel->setBuddy(hSizeDoubleSpinBox);
+
+       vSizeDoubleSpinBox = new QDoubleSpinBox;
+       connect(vSizeDoubleSpinBox, SIGNAL(valueChanged(double)),
+                       this, SIGNAL(modified()));
+
+       QLabel *vLabel = new QLabel;
+       vLabel->setText(tr("&Vertical Size:"));
+       vLabel->setBuddy(vSizeDoubleSpinBox);
+
+       QGridLayout *mainLayout = new QGridLayout;
+       mainLayout->addWidget(ratioCheckBox, 0, 0);
+       mainLayout->addWidget(ratioDoubleSpinBox, 0, 1);
+       mainLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+       mainLayout->addWidget(hLabel, 1, 0);
+       mainLayout->addWidget(hSizeDoubleSpinBox, 1, 1);
+       mainLayout->addWidget(vLabel, 2, 0);
+       mainLayout->addWidget(vSizeDoubleSpinBox, 2, 1);
+       mainLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 3, 0);
+
+       setLayout(mainLayout);
+}
+
+void SizeOptionWidget::init()
+{
+       delete size;
+       size = new Size;
+       setWidget();
+}
+
+void SizeOptionWidget::apply()
+{
+       bool hasRatio = ratioCheckBox->isChecked();
+       size->setNoRatio(hasRatio);
+       if (hasRatio) {
+               size->setRatio(ratioDoubleSpinBox->value());
+       }
+       size->setXScale(hSizeDoubleSpinBox->value());
+       size->setYScale(vSizeDoubleSpinBox->value());
+
+       emit executed(size->command());
+}
+
+void SizeOptionWidget::setWidget()
+{
+       bool flag = size->isNoRatio();
+       ratioCheckBox->setChecked(!flag);
+       ratioDoubleSpinBox->setEnabled(!flag);
+       ratioDoubleSpinBox->setValue(size->ratio());
+       hSizeDoubleSpinBox->setValue(size->xScale());
+       vSizeDoubleSpinBox->setValue(size->yScale());
+}
diff --git a/src/gui/opt/SizeOptionWidget.h b/src/gui/opt/SizeOptionWidget.h
new file mode 100644 (file)
index 0000000..6d9733d
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef SIZE_OPTION_INCLUDED
+#define SIZE_OPTION_INCLUDED
+
+#include "OptionWidget.h"
+
+class Size;
+
+class QCheckBox;
+class QDoubleSpinBox;
+
+class SizeOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit SizeOptionWidget(QWidget *parent = 0);
+               ~SizeOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               SizeOptionWidget(const SizeOptionWidget &);
+               SizeOptionWidget &operator=(const SizeOptionWidget &);
+
+               void init();
+               void apply();
+               void setWidget();
+               Size *size;
+               QCheckBox *ratioCheckBox;
+               QDoubleSpinBox *ratioDoubleSpinBox;
+               QDoubleSpinBox *hSizeDoubleSpinBox;
+               QDoubleSpinBox *vSizeDoubleSpinBox;
+};
+#endif // SIZE_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/TerminalOptionWidget.cpp b/src/gui/opt/TerminalOptionWidget.cpp
new file mode 100644 (file)
index 0000000..4a878b0
--- /dev/null
@@ -0,0 +1,195 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "TerminalOptionWidget.h"
+#include "Terminal.h"
+#include "TerminalEmtexOptionWidget.h"
+#include "TerminalLatexOptionWidget.h"
+#include "TerminalPbmOptionWidget.h"
+#include "TerminalPostScriptOptionWidget.h"
+
+#include <QtGui/QComboBox>
+#include <QtGui/QLabel>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QPushButton>
+#include <QtGui/QScrollArea>
+#include <QtGui/QStackedWidget>
+#include <QtGui/QVBoxLayout>
+
+const QString TerminalOptionWidget::TERMINAL[] = {
+       "aifm",
+#ifdef Q_OS_DARWIN
+       "aqua",
+#endif
+       "cgm", "corel", "dumb", "dxf", "eepic", "emf", "emtex", "epslatex",
+       "fig", "hp2623A", "hp2648", "hp500c", "hpgl", "hpljii", "imagen", "latex",
+       "mif", "pbm", "postscript", "pslatex", "pstricks", "qms", "svg", "table", 
+       "texdraw", "tgif", "tkcanvas", "tpic", "unknown", 
+#if defined(Q_OS_WIN32)
+       "windows",
+#elif defined(Q_OS_UNIX)
+       "x11",
+#endif
+       ""
+};
+
+const QString TerminalOptionWidget::TERMINAL_WITH_OPTION[] = {
+       "emtex", "latex", "pbm", "postscript", ""
+};
+
+TerminalOptionWidget::TerminalOptionWidget(QWidget *parent)
+: OptionWidget(parent), terminal(0)
+{
+       setWindowTitle(tr("Terminal"));
+       setWhatsThis("set terminal");
+}
+
+TerminalOptionWidget::~TerminalOptionWidget()
+{
+       delete terminal;
+}
+
+void TerminalOptionWidget::construct()
+{
+       typeComboBox = new QComboBox;
+       for (int i = 0; !TERMINAL[i].isEmpty(); i++) {
+               typeComboBox->addItem(TERMINAL[i]);
+       }
+       connect(typeComboBox, SIGNAL(activated(int)),
+                       this, SIGNAL(modified()));
+       connect(typeComboBox, SIGNAL(activated(int)),
+                       this, SLOT(changeTerminal(int)));
+
+       QLabel *typeLabel = new QLabel;
+       typeLabel->setText(tr("&Terminal Type:"));
+       typeLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+       typeLabel->setBuddy(typeComboBox);
+
+       typeStackedWidget = new QStackedWidget;
+       typeStackedWidget->addWidget(new TerminalEmtexOptionWidget);
+       typeStackedWidget->addWidget(new TerminalLatexOptionWidget);
+       typeStackedWidget->addWidget(new TerminalPbmOptionWidget);
+       typeStackedWidget->addWidget(new TerminalPostScriptOptionWidget);
+
+       initBitArray.resize(typeStackedWidget->count());
+
+       initPushButton = new QPushButton;
+       initPushButton->setText(tr("&Initialize Terminal Options"));
+       connect(initPushButton, SIGNAL(clicked()),
+                       this, SLOT(initOption()));
+       int index = typeComboBox->findText(TERMINAL_WITH_OPTION[0]);
+       if (index >= 0) {
+               changeTerminal(index);
+       }
+
+       QScrollArea *scrollArea = new QScrollArea;
+       scrollArea->setWidget(typeStackedWidget);
+       scrollArea->setWidgetResizable(true);
+       scrollArea->setFrameShadow(QFrame::Plain);
+       scrollArea->setFrameShape(QFrame::NoFrame);
+
+       QHBoxLayout *buttonLayout = new QHBoxLayout;
+       buttonLayout->addStretch();
+       buttonLayout->addWidget(initPushButton);
+
+       QHBoxLayout *listLayout = new QHBoxLayout;
+       listLayout->addWidget(typeLabel);
+       listLayout->addWidget(typeComboBox);
+
+       QVBoxLayout *mainLayout = new QVBoxLayout;
+       mainLayout->addLayout(listLayout);
+       mainLayout->addWidget(scrollArea);
+       mainLayout->addLayout(buttonLayout);
+
+       setLayout(mainLayout);
+}
+
+void TerminalOptionWidget::init()
+{
+       delete terminal;
+       terminal = new Terminal;
+       setWidget();
+}
+
+void TerminalOptionWidget::initOption()
+{
+       qobject_cast<OptionWidget *>(typeStackedWidget->currentWidget())
+               ->init();
+}
+
+void TerminalOptionWidget::apply()
+{
+       terminal->setTerminalType(typeComboBox->currentText());
+
+       if (hasOption(terminal->terminalType())) {
+               qobject_cast<OptionWidget *>(typeStackedWidget->currentWidget())
+                       ->apply();
+       } else {
+               emit executed(terminal->command());
+       }
+}
+
+void TerminalOptionWidget::setWidget()
+{
+       QString type = terminal->terminalType();
+       int index = typeComboBox->findText(type);
+       bool flag = false;
+       if (index >= 0) {
+               typeComboBox->setCurrentIndex(index);
+               changeTerminal(index);
+               flag = hasOption(type);
+       }
+       typeStackedWidget->setEnabled(flag);
+       initPushButton->setEnabled(flag);
+}
+
+bool TerminalOptionWidget::hasOption(const QString &type)
+{
+       for (int i = 0; !TERMINAL_WITH_OPTION[i].isEmpty(); i++) {
+               if (type == TERMINAL_WITH_OPTION[i]) {
+                       return true;
+               }
+       }
+       return false;
+}
+
+void TerminalOptionWidget::changeTerminal(int index)
+{
+       QString type = typeComboBox->itemText(index);
+       for (int i = 0; !TERMINAL_WITH_OPTION[i].isEmpty(); i++) {
+               if (type == TERMINAL_WITH_OPTION[i]) {
+                       typeStackedWidget->setEnabled(true);
+                       initPushButton->setEnabled(true);
+                       if (!initBitArray.at(i)) {
+                               OptionWidget *optionWidget =
+                                       qobject_cast<OptionWidget *>(typeStackedWidget->widget(i));
+                               optionWidget->construct();
+                               optionWidget->init();
+                               connect(optionWidget, SIGNAL(executed(const QString &)),
+                                               this, SIGNAL(executed(const QString &)));
+                               connect(optionWidget, SIGNAL(modified()),
+                                               this, SIGNAL(modified()));
+                               initBitArray.setBit(i);
+                       }
+                       typeStackedWidget->setCurrentIndex(i);
+                       return;
+               }
+       }
+       typeStackedWidget->setEnabled(false);
+       initPushButton->setEnabled(false);
+}
diff --git a/src/gui/opt/TerminalOptionWidget.h b/src/gui/opt/TerminalOptionWidget.h
new file mode 100644 (file)
index 0000000..46c846f
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef TERMINAL_OPTION_WIDGET_INCLUDED
+#define TERMINAL_OPTION_WIDGET_INCLUDED
+
+#include "OptionWidget.h"
+
+class Terminal;
+
+#include <QtCore/QBitArray>
+class QComboBox;
+class QPushButton;
+class QStackedWidget;
+
+class TerminalOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit TerminalOptionWidget(QWidget *parent = 0);
+               ~TerminalOptionWidget();
+
+               void construct();
+
+       private slots:
+               void initOption();
+               void changeTerminal(int index);
+
+       private:
+               // don't implement these
+               TerminalOptionWidget(const TerminalOptionWidget &);
+               TerminalOptionWidget &operator=(const TerminalOptionWidget &);
+
+               void init();
+               void apply();
+               void setWidget();
+               bool hasOption(const QString &type);
+               static const QString TERMINAL[];
+               static const QString TERMINAL_WITH_OPTION[];
+               Terminal *terminal;
+               QComboBox *typeComboBox;
+               QStackedWidget *typeStackedWidget;
+               QPushButton *initPushButton;
+               QBitArray initBitArray;
+};
+#endif // TERMINAL_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/TitleOptionWidget.cpp b/src/gui/opt/TitleOptionWidget.cpp
new file mode 100644 (file)
index 0000000..1a5a971
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "TitleOptionWidget.h"
+#include "Title.h"
+
+#include <QtGui/QDoubleSpinBox>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QGridLayout>
+
+TitleOptionWidget::TitleOptionWidget(QWidget *parent)
+: OptionWidget(parent), title(0)
+{
+       setWindowTitle(tr("Title"));
+       setWhatsThis("set title");
+}
+
+TitleOptionWidget::~TitleOptionWidget()
+{
+       delete title;
+}
+
+void TitleOptionWidget::construct()
+{
+       labelLineEdit = new QLineEdit;
+       connect(labelLineEdit, SIGNAL(textChanged(const QString &)),
+                       this, SIGNAL(modified()));
+
+       QLabel *textLabel = new QLabel;
+       textLabel->setText(tr("T&ext:"));
+       textLabel->setBuddy(labelLineEdit);
+
+       xOffsetDoubleSpinBox = new QDoubleSpinBox;
+       xOffsetDoubleSpinBox->setMinimum(-99);
+       connect(xOffsetDoubleSpinBox, SIGNAL(valueChanged(double)),
+                       this, SIGNAL(modified()));
+
+       QLabel *xOffsetLabel = new QLabel;
+       xOffsetLabel->setText(tr("&X Offset:"));
+       xOffsetLabel->setBuddy(xOffsetDoubleSpinBox);
+
+       yOffsetDoubleSpinBox = new QDoubleSpinBox;
+       yOffsetDoubleSpinBox->setMinimum(-99);
+       connect(yOffsetDoubleSpinBox, SIGNAL(valueChanged(double)),
+                       this, SIGNAL(modified()));
+
+       QLabel *yOffsetLabel = new QLabel;
+       yOffsetLabel->setText(tr("&Y Offset:"));
+       yOffsetLabel->setBuddy(yOffsetDoubleSpinBox);
+
+       fontNameLineEdit = new QLineEdit;
+       connect(fontNameLineEdit, SIGNAL(textChanged(const QString &)),
+                       this, SIGNAL(modified()));
+
+       QLabel *fontNameLabel = new QLabel;
+       fontNameLabel->setText(tr("&Font Name:"));
+       fontNameLabel->setBuddy(fontNameLineEdit);
+
+       QGridLayout *mainLayout = new QGridLayout;
+       mainLayout->addWidget(textLabel, 0, 0);
+       mainLayout->addWidget(labelLineEdit, 0, 1, 1, 2);
+       mainLayout->addWidget(xOffsetLabel, 1, 0);
+       mainLayout->addWidget(xOffsetDoubleSpinBox, 1, 1);
+       mainLayout->addItem(new QSpacerItem(40, 20,
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 1, 2);
+       mainLayout->addWidget(yOffsetLabel, 2, 0);
+       mainLayout->addWidget(yOffsetDoubleSpinBox, 2, 1);
+       mainLayout->addWidget(fontNameLabel, 3, 0);
+       mainLayout->addWidget(fontNameLineEdit, 3, 1, 1, 2);
+       mainLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 4, 0);
+
+       setLayout(mainLayout);
+}
+
+void TitleOptionWidget::init()
+{
+       delete title;
+       title = new Title;
+       setWidget();
+}
+
+void TitleOptionWidget::apply()
+{
+       title->setTitleText(labelLineEdit->text());
+       title->setXOffset(xOffsetDoubleSpinBox->value());
+       title->setYOffset(yOffsetDoubleSpinBox->value());
+       title->setFontName(fontNameLineEdit->text());
+       emit executed(title->command());
+}
+
+void TitleOptionWidget::setWidget()
+{
+       labelLineEdit->setText(title->titleText());
+       xOffsetDoubleSpinBox->setValue(title->xOffset());
+       yOffsetDoubleSpinBox->setValue(title->yOffset());
+       fontNameLineEdit->setText(title->fontName());
+}
diff --git a/src/gui/opt/TitleOptionWidget.h b/src/gui/opt/TitleOptionWidget.h
new file mode 100644 (file)
index 0000000..e91ec06
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef TITLE_OPTION_WIDGET_INCLUDED
+#define TITLE_OPTION_WIDGET_INCLUDED
+
+#include "OptionWidget.h"
+
+class Title;
+
+class QDoubleSpinBox;
+class QLineEdit;
+
+class TitleOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit TitleOptionWidget(QWidget *parent = 0);
+               ~TitleOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               TitleOptionWidget(const TitleOptionWidget &);
+               TitleOptionWidget &operator=(const TitleOptionWidget &);
+
+               void init();
+               void apply();
+               void setWidget();
+               Title *title;
+               QLineEdit *labelLineEdit;
+               QDoubleSpinBox *xOffsetDoubleSpinBox;
+               QDoubleSpinBox *yOffsetDoubleSpinBox;
+               QLineEdit *fontNameLineEdit;
+};
+#endif // TITLE_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/ViewOptionWidget.cpp b/src/gui/opt/ViewOptionWidget.cpp
new file mode 100644 (file)
index 0000000..d10f620
--- /dev/null
@@ -0,0 +1,147 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "ViewOptionWidget.h"
+#include "View.h"
+
+#include <QtGui/QCheckBox>
+#include <QtGui/QDoubleSpinBox>
+#include <QtGui/QLabel>
+#include <QtGui/QGridLayout>
+
+ViewOptionWidget::ViewOptionWidget(QWidget *parent)
+: OptionWidget(parent), view(0)
+{
+       setWindowTitle(tr("View"));
+       setWhatsThis("set view");
+}
+
+ViewOptionWidget::~ViewOptionWidget()
+{
+       delete view;
+}
+
+void ViewOptionWidget::construct()
+{
+       mapCheckBox = new QCheckBox;
+       mapCheckBox->setText(tr("&Map"));
+       connect(mapCheckBox, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       rotationXDoubleSpinBox = new QDoubleSpinBox;
+       rotationXDoubleSpinBox->setMaximum(180);
+       connect(mapCheckBox, SIGNAL(toggled(bool)),
+                       rotationXDoubleSpinBox, SLOT(setDisabled(bool)));
+       connect(rotationXDoubleSpinBox, SIGNAL(valueChanged(double)),
+                       this, SIGNAL(modified()));
+
+       rotationXLabel = new QLabel;
+       rotationXLabel->setText(tr("&X Axis"));
+       rotationXLabel->setBuddy(rotationXDoubleSpinBox);
+       connect(mapCheckBox, SIGNAL(toggled(bool)),
+                       rotationXLabel, SLOT(setDisabled(bool)));
+
+       rotationZDoubleSpinBox = new QDoubleSpinBox;
+       rotationZDoubleSpinBox->setMaximum(360);
+       connect(mapCheckBox, SIGNAL(toggled(bool)),
+                       rotationZDoubleSpinBox, SLOT(setDisabled(bool)));
+       connect(rotationZDoubleSpinBox, SIGNAL(valueChanged(double)),
+                       this, SIGNAL(modified()));
+
+       rotationZLabel = new QLabel;
+       rotationZLabel->setText(tr("&Z Axis"));
+       rotationZLabel->setBuddy(rotationZDoubleSpinBox);
+       connect(mapCheckBox, SIGNAL(toggled(bool)),
+                       rotationZLabel, SLOT(setDisabled(bool)));
+
+       scalingDoubleSpinBox = new QDoubleSpinBox;
+       connect(mapCheckBox, SIGNAL(toggled(bool)),
+                       scalingDoubleSpinBox, SLOT(setDisabled(bool)));
+       connect(scalingDoubleSpinBox, SIGNAL(valueChanged(double)),
+                       this, SIGNAL(modified()));
+
+       scalingLabel = new QLabel;
+       scalingLabel->setText(tr("&Scale"));
+       scalingLabel->setBuddy(scalingDoubleSpinBox);
+       connect(mapCheckBox, SIGNAL(toggled(bool)),
+                       scalingLabel, SLOT(setDisabled(bool)));
+
+       scalingZDoubleSpinBox = new QDoubleSpinBox;
+       connect(mapCheckBox, SIGNAL(toggled(bool)),
+                       scalingZDoubleSpinBox, SLOT(setDisabled(bool)));
+       connect(scalingZDoubleSpinBox, SIGNAL(valueChanged(double)),
+                       this, SIGNAL(modified()));
+
+       scalingZLabel = new QLabel;
+       scalingZLabel->setText(tr("Sca&le of Z Axis"));
+       scalingZLabel->setBuddy(scalingZDoubleSpinBox);
+       connect(mapCheckBox, SIGNAL(toggled(bool)),
+                       scalingZLabel, SLOT(setDisabled(bool)));
+
+       QGridLayout *mainLayout = new QGridLayout;
+       mainLayout->addWidget(mapCheckBox, 0, 0);
+       mainLayout->addWidget(rotationXLabel, 1, 0);
+       mainLayout->addWidget(rotationXDoubleSpinBox, 1, 1);
+       mainLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 1, 2);
+       mainLayout->addWidget(rotationZLabel, 2, 0);
+       mainLayout->addWidget(rotationZDoubleSpinBox, 2, 1);
+       mainLayout->addWidget(scalingLabel, 3, 0);
+       mainLayout->addWidget(scalingDoubleSpinBox, 3, 1);
+       mainLayout->addWidget(scalingZLabel, 4, 0);
+       mainLayout->addWidget(scalingZDoubleSpinBox, 4, 1);
+       mainLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 5, 0);
+
+       setLayout(mainLayout);
+}
+
+void ViewOptionWidget::init()
+{
+       delete view;
+       view = new View;
+       setWidget();
+}
+
+void ViewOptionWidget::apply()
+{
+       view->setMap(mapCheckBox->isChecked());
+       view->setRotationX(rotationXDoubleSpinBox->value());
+       view->setRotationZ(rotationZDoubleSpinBox->value());
+       view->setScaling(scalingDoubleSpinBox->value());
+       view->setScalingZ(scalingZDoubleSpinBox->value());
+       emit executed(view->command());
+}
+
+void ViewOptionWidget::setWidget()
+{
+       bool isMap = view->isMap();
+       mapCheckBox->setChecked(isMap);
+       rotationXDoubleSpinBox->setValue(view->rotationX());
+       rotationXDoubleSpinBox->setEnabled(!isMap);
+       rotationXLabel->setEnabled(!isMap);
+       rotationZDoubleSpinBox->setValue(view->rotationZ());
+       rotationZDoubleSpinBox->setEnabled(!isMap);
+       rotationZLabel->setEnabled(!isMap);
+       scalingDoubleSpinBox->setValue(view->scaling());
+       scalingDoubleSpinBox->setEnabled(!isMap);
+       scalingLabel->setEnabled(!isMap);
+       scalingZDoubleSpinBox->setValue(view->scalingZ());
+       scalingZDoubleSpinBox->setEnabled(!isMap);
+       scalingZLabel->setEnabled(!isMap);
+}
diff --git a/src/gui/opt/ViewOptionWidget.h b/src/gui/opt/ViewOptionWidget.h
new file mode 100644 (file)
index 0000000..e783e5a
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef VIEW_OPTION_WIDGET_INCLUDED
+#define VIEW_OPTION_WIDGET_INCLUDED
+
+#include "OptionWidget.h"
+
+class View;
+
+class QCheckBox;
+class QDoubleSpinBox;
+class QLabel;
+
+class ViewOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               ViewOptionWidget(QWidget *parent = 0);
+               ~ViewOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               ViewOptionWidget(const ViewOptionWidget &);
+               ViewOptionWidget &operator=(const ViewOptionWidget &);
+
+               void init();
+               void apply();
+               void setWidget();
+               View *view;
+               QCheckBox *mapCheckBox;
+               QDoubleSpinBox *rotationXDoubleSpinBox;
+               QLabel *rotationXLabel;
+               QDoubleSpinBox *rotationZDoubleSpinBox;
+               QLabel *rotationZLabel;
+               QDoubleSpinBox *scalingDoubleSpinBox;
+               QLabel *scalingLabel;
+               QDoubleSpinBox *scalingZDoubleSpinBox;
+               QLabel *scalingZLabel;
+};
+#endif // VIEW_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/terminal/TerminalEmtexOptionWidget.cpp b/src/gui/opt/terminal/TerminalEmtexOptionWidget.cpp
new file mode 100644 (file)
index 0000000..0b66523
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "TerminalEmtexOptionWidget.h"
+#include "TerminalLatexEmtex.h"
+
+#include <QtGui/QComboBox>
+
+TerminalEmtexOptionWidget::TerminalEmtexOptionWidget(QWidget *parent)
+: TerminalLatexEmtexOptionWidget(parent)
+{
+}
+
+void TerminalEmtexOptionWidget::init()
+{
+       TerminalLatexEmtexOptionWidget::init();
+       terminalLatexEmtex->setLatex(false);
+}
diff --git a/src/gui/opt/terminal/TerminalEmtexOptionWidget.h b/src/gui/opt/terminal/TerminalEmtexOptionWidget.h
new file mode 100644 (file)
index 0000000..5f632a5
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef TERMINAL_EMTEX_OPTION_WIDGET_INCLUDED
+#define TERMINAL_EMTEX_OPTION_WIDGET_INCLUDED
+
+#include "TerminalLatexEmtexOptionWidget.h"
+
+class TerminalEmtexOptionWidget : public TerminalLatexEmtexOptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit TerminalEmtexOptionWidget(QWidget *parent = 0);
+
+       private:
+               // don't implement these
+               TerminalEmtexOptionWidget(const TerminalEmtexOptionWidget &);
+               TerminalEmtexOptionWidget &operator=(const TerminalEmtexOptionWidget &);
+
+               void init();
+};
+#endif // TERMINAL_EMTEX_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/terminal/TerminalLatexEmtexOptionWidget.cpp b/src/gui/opt/terminal/TerminalLatexEmtexOptionWidget.cpp
new file mode 100644 (file)
index 0000000..8808b96
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "TerminalLatexEmtexOptionWidget.h"
+#include "TerminalLatexEmtex.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtGui/QComboBox>
+#include <QtGui/QGridLayout>
+#include <QtGui/QLabel>
+#include <QtGui/QSpinBox>
+
+TerminalLatexEmtexOptionWidget::TerminalLatexEmtexOptionWidget(QWidget *parent)
+: OptionWidget(parent), terminalLatexEmtex(0)
+{
+}
+
+TerminalLatexEmtexOptionWidget::~TerminalLatexEmtexOptionWidget()
+{
+       delete terminalLatexEmtex;
+}
+
+void TerminalLatexEmtexOptionWidget::construct()
+{
+       fontNameComboBox = new QComboBox;
+       for (int i = 0; TerminalLatexEmtex::FONT_NAME[i][0]; i++) {
+               fontNameComboBox->addItem(QCoreApplication::translate(
+                                       "TerminalLatexEmtex", TerminalLatexEmtex::FONT_NAME[i]));
+       }
+       connect(fontNameComboBox, SIGNAL(activated(int)),
+                       this, SIGNAL(modified()));
+
+       QLabel *fontNameLabel = new QLabel;
+       fontNameLabel->setText(tr("&Font:"));
+       fontNameLabel->setBuddy(fontNameComboBox);
+
+       fontSizeSpinBox = new QSpinBox;
+       connect(fontSizeSpinBox, SIGNAL(valueChanged(int)),
+                       this, SIGNAL(modified()));
+
+       QLabel *fontSizeLabel = new QLabel;
+       fontSizeLabel->setText(tr("&Size:"));
+       fontSizeLabel->setBuddy(fontSizeSpinBox);
+
+       QGridLayout *mainLayout = new QGridLayout;
+       mainLayout->addWidget(fontNameLabel, 0, 0);
+       mainLayout->addWidget(fontNameComboBox, 0, 1);
+       mainLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+       mainLayout->addWidget(fontSizeLabel, 1, 0);
+       mainLayout->addWidget(fontSizeSpinBox, 1, 1);
+       mainLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 2, 0);
+
+       setLayout(mainLayout);
+}
+
+void TerminalLatexEmtexOptionWidget::init()
+{
+       delete terminalLatexEmtex;
+       terminalLatexEmtex = new TerminalLatexEmtex;
+       setWidget();
+}
+
+void TerminalLatexEmtexOptionWidget::apply()
+{
+       terminalLatexEmtex->setFontName(fontNameComboBox->currentIndex());
+       terminalLatexEmtex->setFontSize(fontSizeSpinBox->value());
+
+       emit executed(terminalLatexEmtex->command());
+}
+
+void TerminalLatexEmtexOptionWidget::setWidget()
+{
+       fontNameComboBox->setCurrentIndex(terminalLatexEmtex->fontName());
+       fontSizeSpinBox->setValue(terminalLatexEmtex->fontSize());
+}
diff --git a/src/gui/opt/terminal/TerminalLatexEmtexOptionWidget.h b/src/gui/opt/terminal/TerminalLatexEmtexOptionWidget.h
new file mode 100644 (file)
index 0000000..b7fff39
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef TERMINAL_LATEX_EMTEX_OPTION_WIDGET_INCLUDED
+#define TERMINAL_LATEX_EMTEX_OPTION_WIDGET_INCLUDED
+
+#include "OptionWidget.h"
+class TerminalLatexEmtex;
+
+class QComboBox;
+class QSpinBox;
+
+class TerminalLatexEmtexOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit TerminalLatexEmtexOptionWidget(QWidget *parent = 0);
+               ~TerminalLatexEmtexOptionWidget();
+
+               void construct();
+
+       protected:
+               virtual void init();
+               TerminalLatexEmtex *terminalLatexEmtex;
+
+       private:
+               // don't implement these
+               TerminalLatexEmtexOptionWidget(const TerminalLatexEmtexOptionWidget &);
+               TerminalLatexEmtexOptionWidget &operator=(const TerminalLatexEmtexOptionWidget &);
+
+               void apply();
+               void setWidget();
+               QComboBox *fontNameComboBox;
+               QSpinBox *fontSizeSpinBox;
+};
+#endif // TERMINAL_LATEX_EMTEX_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/terminal/TerminalLatexOptionWidget.cpp b/src/gui/opt/terminal/TerminalLatexOptionWidget.cpp
new file mode 100644 (file)
index 0000000..eceb456
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "TerminalLatexOptionWidget.h"
+#include "TerminalLatexEmtex.h"
+
+#include <QtGui/QComboBox>
+
+TerminalLatexOptionWidget::TerminalLatexOptionWidget(QWidget *parent)
+: TerminalLatexEmtexOptionWidget(parent)
+{
+}
+
+void TerminalLatexOptionWidget::init()
+{
+       TerminalLatexEmtexOptionWidget::init();
+       terminalLatexEmtex->setLatex(true);
+}
diff --git a/src/gui/opt/terminal/TerminalLatexOptionWidget.h b/src/gui/opt/terminal/TerminalLatexOptionWidget.h
new file mode 100644 (file)
index 0000000..7528b07
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef TERMINAL_LATEX_OPTION_WIDGET_INCLUDED
+#define TERMINAL_LATEX_OPTION_WIDGET_INCLUDED
+
+#include "TerminalLatexEmtexOptionWidget.h"
+
+class TerminalLatexOptionWidget : public TerminalLatexEmtexOptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit TerminalLatexOptionWidget(QWidget *parent = 0);
+
+       private:
+               // don't implement these
+               TerminalLatexOptionWidget(const TerminalLatexOptionWidget &);
+               TerminalLatexOptionWidget &operator=(const TerminalLatexOptionWidget &);
+
+               void init();
+};
+#endif // TERMINAL_LATEX_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/terminal/TerminalPbmOptionWidget.cpp b/src/gui/opt/terminal/TerminalPbmOptionWidget.cpp
new file mode 100644 (file)
index 0000000..8d07e63
--- /dev/null
@@ -0,0 +1,95 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "TerminalPbmOptionWidget.h"
+#include "TerminalPbm.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtGui/QComboBox>
+#include <QtGui/QGridLayout>
+#include <QtGui/QLabel>
+
+TerminalPbmOptionWidget::TerminalPbmOptionWidget(QWidget *parent)
+: OptionWidget(parent), terminalPbm(0)
+{
+}
+
+TerminalPbmOptionWidget::~TerminalPbmOptionWidget()
+{
+       delete terminalPbm;
+}
+
+void TerminalPbmOptionWidget::construct()
+{
+       fontSizeComboBox = new QComboBox;
+       for (int i = 0; TerminalPbm::FONT_SIZE[i][0]; i++) {
+               fontSizeComboBox->addItem(QCoreApplication::translate(
+                                               "TerminalPbm", TerminalPbm::FONT_SIZE[i]));
+       }
+       connect(fontSizeComboBox, SIGNAL(activated(int)),
+                       this, SIGNAL(modified()));
+
+       QLabel *fontSizeLabel = new QLabel;
+       fontSizeLabel->setText(tr("&Font Size:"));
+       fontSizeLabel->setBuddy(fontSizeComboBox);
+
+       colorModeComboBox = new QComboBox;
+       for (int i = 0; TerminalPbm::MODE[i][0]; i++) {
+               colorModeComboBox->addItem(QCoreApplication::translate(
+                                               "TerminalPbm", TerminalPbm::MODE[i]));
+       }
+       connect(colorModeComboBox, SIGNAL(activated(int)),
+                       this, SIGNAL(modified()));
+
+       QLabel *colorModeLabel = new QLabel;
+       colorModeLabel->setText(tr("Co&lormode:"));
+       colorModeLabel->setBuddy(colorModeComboBox);
+
+       QGridLayout *mainLayout = new QGridLayout;
+       mainLayout->addWidget(fontSizeLabel, 0, 0);
+       mainLayout->addWidget(fontSizeComboBox, 0, 1);
+       mainLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+       mainLayout->addWidget(colorModeLabel, 1, 0);
+       mainLayout->addWidget(colorModeComboBox, 1, 1);
+       mainLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 2, 0);
+
+       setLayout(mainLayout);
+}
+
+void TerminalPbmOptionWidget::init()
+{
+       delete terminalPbm;
+       terminalPbm = new TerminalPbm;
+       setWidget();
+}
+
+void TerminalPbmOptionWidget::apply()
+{
+       terminalPbm->setFontSize(fontSizeComboBox->currentIndex());
+       terminalPbm->setMode(colorModeComboBox->currentIndex());
+
+       emit executed(terminalPbm->command());
+}
+
+void TerminalPbmOptionWidget::setWidget()
+{
+       fontSizeComboBox->setCurrentIndex(terminalPbm->fontSize());
+       colorModeComboBox->setCurrentIndex(terminalPbm->mode());
+}
diff --git a/src/gui/opt/terminal/TerminalPbmOptionWidget.h b/src/gui/opt/terminal/TerminalPbmOptionWidget.h
new file mode 100644 (file)
index 0000000..ac77703
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef TERMINAL_PBM_OPTION_WIDGET_INCLUDED
+#define TERMINAL_PBM_OPTION_WIDGET_INCLUDED
+
+#include "OptionWidget.h"
+
+class TerminalPbm;
+
+class QComboBox;
+
+class TerminalPbmOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit TerminalPbmOptionWidget(QWidget *parent = 0);
+               ~TerminalPbmOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               TerminalPbmOptionWidget(const TerminalPbmOptionWidget &);
+               TerminalPbmOptionWidget &operator=(const TerminalPbmOptionWidget &);
+
+               void init();
+               void apply();
+               void setWidget();
+               TerminalPbm *terminalPbm;
+               QComboBox *fontSizeComboBox;
+               QComboBox *colorModeComboBox;
+};
+#endif // TERMINAL_PBM_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/opt/terminal/TerminalPostScriptOptionWidget.cpp b/src/gui/opt/terminal/TerminalPostScriptOptionWidget.cpp
new file mode 100644 (file)
index 0000000..14ef591
--- /dev/null
@@ -0,0 +1,144 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "TerminalPostScriptOptionWidget.h"
+#include "TerminalPostScript.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtGui/QCheckBox>
+#include <QtGui/QComboBox>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QGridLayout>
+#include <QtGui/QSpinBox>
+
+TerminalPostScriptOptionWidget::TerminalPostScriptOptionWidget(QWidget *parent)
+: OptionWidget(parent), terminalPostScript(0)
+{
+}
+
+TerminalPostScriptOptionWidget::~TerminalPostScriptOptionWidget()
+{
+       delete terminalPostScript;
+}
+
+void TerminalPostScriptOptionWidget::construct()
+{
+       modeComboBox = new QComboBox;
+       for (int i = 0; TerminalPostScript::MODE[i][0]; i++) {
+               modeComboBox->addItem(QCoreApplication::translate(
+                                       "TerminalPostScript", TerminalPostScript::MODE[i]));
+       }
+       connect(modeComboBox, SIGNAL(activated(int)),
+                       this, SIGNAL(modified()));
+
+       QLabel *modeLabel = new QLabel;
+       modeLabel->setText(tr("&Mode:"));
+       modeLabel->setBuddy(modeComboBox);
+
+       colorComboBox = new QComboBox;
+       for (int i = 0; TerminalPostScript::COLOR[i][0]; i++) {
+               colorComboBox->addItem(QCoreApplication::translate(
+                                       "TerminalPostScript", TerminalPostScript::COLOR[i]));
+       }
+       connect(colorComboBox, SIGNAL(activated(int)),
+                       this, SIGNAL(modified()));
+
+       QLabel *colorLabel = new QLabel;
+       colorLabel->setText(tr("Co&lor:"));
+       colorLabel->setBuddy(colorComboBox);
+
+       solidComboBox = new QComboBox;
+       for (int i = 0; TerminalPostScript::LINE_STYLE[i][0]; i++) {
+               solidComboBox->addItem(QCoreApplication::translate(
+                                       "TerminalPostScript", TerminalPostScript::LINE_STYLE[i]));
+       }
+       connect(solidComboBox, SIGNAL(activated(int)),
+                       this, SIGNAL(modified()));
+
+       QLabel *solidLabel = new QLabel;
+       solidLabel->setText(tr("Da&shed:"));
+       solidLabel->setBuddy(solidComboBox);
+
+       fontNameLineEdit = new QLineEdit;
+       connect(fontNameLineEdit, SIGNAL(textChanged(const QString &)),
+                       this, SIGNAL(modified()));
+
+       QLabel *fontNameLabel = new QLabel;
+       fontNameLabel->setText(tr("&Font Name:"));
+       fontNameLabel->setBuddy(fontNameLineEdit);
+
+       fontSizeSpinBox = new QSpinBox;
+       connect(fontSizeSpinBox, SIGNAL(valueChanged(int)),
+                       this, SIGNAL(modified()));
+
+       QLabel *fontSizeLabel = new QLabel;
+       fontSizeLabel->setText(tr("Fo&nt Size:"));
+       fontSizeLabel->setBuddy(fontSizeSpinBox);
+
+       enhancedCheckBox = new QCheckBox;
+       enhancedCheckBox->setText(tr("&Enhanced"));
+       connect(enhancedCheckBox, SIGNAL(toggled(bool)),
+                       this, SIGNAL(modified()));
+
+       QGridLayout *mainLayout = new QGridLayout;
+       mainLayout->addWidget(modeLabel, 0, 0);
+       mainLayout->addWidget(modeComboBox, 0, 1);
+       mainLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+       mainLayout->addWidget(colorLabel, 1, 0);
+       mainLayout->addWidget(colorComboBox, 1, 1);
+       mainLayout->addWidget(solidLabel, 2, 0);
+       mainLayout->addWidget(solidComboBox, 2, 1);
+       mainLayout->addWidget(fontNameLabel, 3, 0);
+       mainLayout->addWidget(fontNameLineEdit, 3, 1, 1, 2);
+       mainLayout->addWidget(fontSizeLabel, 4, 0);
+       mainLayout->addWidget(fontSizeSpinBox, 4, 1);
+       mainLayout->addWidget(enhancedCheckBox, 5, 1);
+
+       setLayout(mainLayout);
+}
+
+void TerminalPostScriptOptionWidget::init()
+{
+       delete terminalPostScript;
+       terminalPostScript = new TerminalPostScript;
+       setWidget();
+}
+
+void TerminalPostScriptOptionWidget::apply()
+{
+       terminalPostScript->setMode(modeComboBox->currentIndex());
+       terminalPostScript->setColor(!colorComboBox->currentIndex());
+       terminalPostScript->setSolid(!solidComboBox->currentIndex());
+       terminalPostScript->setEnhanced(enhancedCheckBox->isChecked());
+       terminalPostScript->setFontName(fontNameLineEdit->text());
+       terminalPostScript->setFontSize(fontSizeSpinBox->value());
+
+       emit executed(terminalPostScript->command());
+}
+
+void TerminalPostScriptOptionWidget::setWidget()
+{
+       modeComboBox->setCurrentIndex(terminalPostScript->mode());
+       colorComboBox->setCurrentIndex(!terminalPostScript->isColor());
+       solidComboBox->setCurrentIndex(!terminalPostScript->isSolid());
+       fontNameLineEdit->setText(terminalPostScript->fontName());
+       fontSizeSpinBox->setValue(terminalPostScript->fontSize());
+       enhancedCheckBox->setChecked(terminalPostScript->enhances());
+}
diff --git a/src/gui/opt/terminal/TerminalPostScriptOptionWidget.h b/src/gui/opt/terminal/TerminalPostScriptOptionWidget.h
new file mode 100644 (file)
index 0000000..fd5273f
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef TERMINAL_POST_SCRIPT_OPTION_WIDGET_INCLUDED
+#define TERMINAL_POST_SCRIPT_OPTION_WIDGET_INCLUDED
+
+#include "OptionWidget.h"
+
+class TerminalPostScript;
+
+class QCheckBox;
+class QComboBox;
+class QLineEdit;
+class QSpinBox;
+
+class TerminalPostScriptOptionWidget : public OptionWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit TerminalPostScriptOptionWidget(QWidget *parent = 0);
+               ~TerminalPostScriptOptionWidget();
+
+               void construct();
+
+       private:
+               // don't implement these
+               TerminalPostScriptOptionWidget(const TerminalPostScriptOptionWidget &);
+               TerminalPostScriptOptionWidget &operator=(const TerminalPostScriptOptionWidget &);
+
+               void init();
+               void apply();
+               void setWidget();
+               TerminalPostScript *terminalPostScript;
+               QComboBox *modeComboBox;
+               QComboBox *colorComboBox;
+               QComboBox *solidComboBox;
+               QLineEdit *fontNameLineEdit;
+               QSpinBox *fontSizeSpinBox;
+               QCheckBox *enhancedCheckBox;
+};
+#endif // TERMINAL_POST_SCRIPT_OPTION_WIDGET_INCLUDED
diff --git a/src/gui/plot/PlotModifierWidget.cpp b/src/gui/plot/PlotModifierWidget.cpp
new file mode 100644 (file)
index 0000000..c8098da
--- /dev/null
@@ -0,0 +1,376 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "PlotModifierWidget.h"
+#include "PlotModifier.h"
+
+#include <QtGui/QCheckBox>
+#include <QtGui/QComboBox>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QGridLayout>
+#include <QtGui/QSpinBox>
+#include <QtGui/QVBoxLayout>
+
+PlotModifierWidget::PlotModifierWidget(QWidget *parent)
+: QWidget(parent)
+{
+       setWindowTitle(tr("Data File"));
+       setWhatsThis(tr("plot {index &lt;index list&gt;}<br>"
+                               "{every &lt;every list&gt;}<br>"
+                               "{using &lt;using list&gt;}<br>"
+                               "{smooth &lt;option&gt;}"));
+
+       const QString AXIS[] = { "&X", "&Y", "&Z" };
+       QLabel *columnLabel[AXIS_NUM];
+       for (int i = 0; i < AXIS_NUM; i++) {
+               columnLineEdit[i] = new QLineEdit;
+
+               columnLabel[i] = new QLabel;
+               columnLabel[i]->setText(AXIS[i] + tr(" Column:"));
+               columnLabel[i]->setBuddy(columnLineEdit[i]);
+       }
+
+       formatLineEdit = new QLineEdit;
+
+       QLabel *formatLabel = new QLabel;
+       formatLabel->setText(tr("Fo&rmat:"));
+       formatLabel->setBuddy(formatLineEdit);
+
+       dataSetStartCheckBox = new QCheckBox;
+       dataSetStartCheckBox->setText(tr("Specify a S&tarting Index"));
+       connect(dataSetStartCheckBox, SIGNAL(toggled(bool)),
+                       this, SLOT(setIndex()));
+
+       dataSetStartSpinBox = new QSpinBox;
+       connect(dataSetStartCheckBox, SIGNAL(toggled(bool)),
+                       dataSetStartSpinBox, SLOT(setEnabled(bool)));
+
+       dataSetEndCheckBox = new QCheckBox;
+       dataSetEndCheckBox->setText(tr("Specify a &Ending Index"));
+       connect(dataSetEndCheckBox, SIGNAL(toggled(bool)),
+                       this, SLOT(setIndex()));
+
+       dataSetEndSpinBox = new QSpinBox;
+       connect(dataSetEndCheckBox, SIGNAL(toggled(bool)),
+                       dataSetEndSpinBox, SLOT(setEnabled(bool)));
+
+       dataSetIncCheckBox = new QCheckBox;
+       dataSetIncCheckBox->setText(tr("Specify I&ncrement of Index"));
+       connect(dataSetIncCheckBox, SIGNAL(toggled(bool)),
+                       this, SLOT(setIndex()));
+
+       dataSetIncSpinBox = new QSpinBox;
+       connect(dataSetIncCheckBox, SIGNAL(toggled(bool)),
+                       dataSetIncSpinBox, SLOT(setEnabled(bool)));
+
+       pointIncCheckBox = new QCheckBox;
+       pointIncCheckBox->setText(tr("Specify Point Increment"));
+
+       pointIncSpinBox = new QSpinBox;
+       connect(pointIncCheckBox, SIGNAL(toggled(bool)),
+                       pointIncSpinBox, SLOT(setEnabled(bool)));
+
+       lineIncCheckBox = new QCheckBox;
+       lineIncCheckBox->setText(tr("Specify Line Increment"));
+
+       lineIncSpinBox = new QSpinBox;
+       connect(lineIncCheckBox, SIGNAL(toggled(bool)),
+                       lineIncSpinBox, SLOT(setEnabled(bool)));
+
+       startPointCheckBox = new QCheckBox;
+       startPointCheckBox->setText(tr("Specify a Start Point"));
+
+       startPointSpinBox = new QSpinBox;
+       connect(startPointCheckBox, SIGNAL(toggled(bool)),
+                       startPointSpinBox, SLOT(setEnabled(bool)));
+
+       startLineCheckBox = new QCheckBox;
+       startLineCheckBox->setText(tr("Specify a Start Line"));
+
+       startLineSpinBox = new QSpinBox;
+       connect(startLineCheckBox, SIGNAL(toggled(bool)),
+                       startLineSpinBox, SLOT(setEnabled(bool)));
+
+       endPointCheckBox = new QCheckBox;
+       endPointCheckBox->setText(tr("Specify a End Point"));
+
+       endPointSpinBox = new QSpinBox;
+       connect(endPointCheckBox, SIGNAL(toggled(bool)),
+                       endPointSpinBox, SLOT(setEnabled(bool)));
+
+       endLineCheckBox = new QCheckBox;
+       endLineCheckBox->setText(tr("Specify a End Line"));
+
+       endLineSpinBox = new QSpinBox;
+       connect(endLineCheckBox, SIGNAL(toggled(bool)),
+                       endLineSpinBox, SLOT(setEnabled(bool)));
+
+       interpCheckBox = new QCheckBox;
+       interpCheckBox->setText(tr("Specify"));
+
+       interpComboBox = new QComboBox;
+       for (int i = 0; !PlotModifier::SMOOTH[i].isEmpty(); i++) {
+               interpComboBox->addItem(PlotModifier::SMOOTH[i]);
+       }
+       connect(interpCheckBox, SIGNAL(toggled(bool)),
+                       interpComboBox, SLOT(setEnabled(bool)));
+
+       // create layouts
+       // assemble layouts and widgets
+
+       QGridLayout *dataSetLayout = new QGridLayout;
+       dataSetLayout->addWidget(dataSetStartCheckBox, 0, 0);
+       dataSetLayout->addWidget(dataSetStartSpinBox, 0, 1);
+       dataSetLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+       dataSetLayout->addWidget(dataSetEndCheckBox, 1, 0);
+       dataSetLayout->addWidget(dataSetEndSpinBox, 1, 1);
+       dataSetLayout->addWidget(dataSetIncCheckBox, 2, 0);
+       dataSetLayout->addWidget(dataSetIncSpinBox, 2, 1);
+       dataSetLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 3, 0);
+
+       QWidget *dataSetWidget = new QWidget;
+       dataSetWidget->setWhatsThis(tr("plot {index &lt;index list&gt;}"));
+       dataSetWidget->setLayout(dataSetLayout);
+
+       QGridLayout *periodLayout = new QGridLayout;
+       periodLayout->addWidget(pointIncCheckBox, 0, 0);
+       periodLayout->addWidget(pointIncSpinBox, 0, 1);
+       periodLayout->addItem(new QSpacerItem(40, 20,
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+       periodLayout->addWidget(startPointCheckBox, 1, 0);
+       periodLayout->addWidget(startPointSpinBox, 1, 1);
+       periodLayout->addWidget(endPointCheckBox, 2, 0);
+       periodLayout->addWidget(endPointSpinBox, 2, 1);
+       periodLayout->addWidget(lineIncCheckBox, 3, 0);
+       periodLayout->addWidget(lineIncSpinBox, 3, 1);
+       periodLayout->addWidget(startLineCheckBox, 4, 0);
+       periodLayout->addWidget(startLineSpinBox, 4, 1);
+       periodLayout->addWidget(endLineCheckBox, 5, 0);
+       periodLayout->addWidget(endLineSpinBox, 5, 1);
+       periodLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 6, 0);
+
+       QWidget *periodWidget = new QWidget;
+       periodWidget->setWhatsThis(tr("plot {every &lt;every list&gt;}"));
+       periodWidget->setLayout(periodLayout);
+
+       QGridLayout *colFormatLayout = new QGridLayout;
+       for (int i = 0; i < AXIS_NUM; i++) {
+               colFormatLayout->addWidget(columnLabel[i], i, 0);
+               colFormatLayout->addWidget(columnLineEdit[i], i, 1);
+       }
+       colFormatLayout->addItem(new QSpacerItem(40, 20,
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+       colFormatLayout->addWidget(formatLabel, 3, 0);
+       colFormatLayout->addWidget(formatLineEdit, 3, 1, 1, 2);
+       colFormatLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 4, 0);
+
+       QWidget *colFormatWidget = new QWidget;
+       colFormatWidget->setWhatsThis(tr("plot {using &lt;using list&gt;}"));
+       colFormatWidget->setLayout(colFormatLayout);
+
+       QGridLayout *interpLayout = new QGridLayout;
+       interpLayout->addWidget(interpCheckBox, 0, 0);
+       interpLayout->addWidget(interpComboBox, 0, 1);
+       interpLayout->addItem(new QSpacerItem(40, 20,
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+       interpLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 1, 0);
+
+       QWidget *interpWidget = new QWidget;
+       interpWidget->setWhatsThis(tr("plot {smooth &lt;option&gt;}"));
+       interpWidget->setLayout(interpLayout);
+
+       QTabWidget *modTabWidget = new QTabWidget;
+       modTabWidget->addTab(dataSetWidget, tr("&Indexes"));
+       modTabWidget->addTab(periodWidget, tr("&Sampling"));
+       modTabWidget->addTab(colFormatWidget, tr("Co&lumns"));
+       modTabWidget->addTab(interpWidget, tr("S&moothing"));
+
+       QVBoxLayout *mainLayout = new QVBoxLayout;
+       mainLayout->addWidget(modTabWidget);
+
+       setLayout(mainLayout);
+}
+
+void PlotModifierWidget::setIndex()
+{
+       if (!dataSetEndCheckBox->isChecked()) {
+               dataSetIncCheckBox->setChecked(false);
+       } else if (!dataSetStartCheckBox->isChecked()) {
+               dataSetEndCheckBox->setChecked(false);
+               dataSetIncCheckBox->setChecked(false);
+       }
+}
+
+void PlotModifierWidget::setPlotModifier(const PlotModifier &plotModifier)
+{
+       int m = plotModifier.m();
+       int n = plotModifier.n();
+       int p = plotModifier.p();
+       if (m < 0) {
+               dataSetStartSpinBox->setEnabled(false);
+               dataSetEndSpinBox->setEnabled(false);
+               dataSetIncSpinBox->setEnabled(false);
+       } else {
+               dataSetStartCheckBox->setChecked(true);
+               dataSetStartSpinBox->setValue(m);
+               if (n < 0) {
+                       dataSetEndSpinBox->setEnabled(false);
+                       dataSetIncSpinBox->setEnabled(false);
+               } else {
+                       dataSetEndCheckBox->setChecked(true);
+                       dataSetEndSpinBox->setValue(n);
+                       if (p < 0) {
+                               dataSetIncSpinBox->setEnabled(false);
+                       } else {
+                               dataSetIncCheckBox->setChecked(true);
+                               dataSetIncSpinBox->setValue(p);
+                       }
+               }
+       }
+       int num = plotModifier.pointIncrement();
+       if (num < 0) {
+               pointIncSpinBox->setEnabled(false);
+       } else {
+               pointIncCheckBox->setChecked(true);
+               pointIncSpinBox->setValue(num);
+       }
+       num = plotModifier.blockIncrement();
+       if (num < 0) {
+               lineIncSpinBox->setEnabled(false);
+       } else {
+               lineIncCheckBox->setChecked(true);
+               lineIncSpinBox->setValue(num);
+       }
+       num = plotModifier.startPoint();
+       if (num < 0) {
+               startPointSpinBox->setEnabled(false);
+       } else {
+               startPointCheckBox->setChecked(true);
+               startPointSpinBox->setValue(num);
+       }
+       num = plotModifier.startBlock();
+       if (num < 0) {
+               startLineSpinBox->setEnabled(false);
+       } else {
+               startLineCheckBox->setChecked(true);
+               startLineSpinBox->setValue(num);
+       }
+       num = plotModifier.endPoint();
+       if (num < 0) {
+               endPointSpinBox->setEnabled(false);
+       } else {
+               endPointCheckBox->setChecked(true);
+               endPointSpinBox->setValue(num);
+       }
+       num = plotModifier.endBlock();
+       if (num < 0) {
+               endLineSpinBox->setEnabled(false);
+       } else {
+               endLineCheckBox->setChecked(true);
+               endLineSpinBox->setValue(num);
+       }
+       int smooth = plotModifier.smooth();
+       if (smooth < 0) {
+               interpComboBox->setEnabled(false);
+       } else {
+               interpCheckBox->setChecked(true);
+               interpComboBox->setCurrentIndex(smooth);
+       }
+       QStringList entry = plotModifier.entry();
+       int size = entry.size();
+       for (int i = 0; i < AXIS_NUM; i++) {
+               columnLineEdit[i]->setText((size > i) ? entry[i] : "");
+       }
+       formatLineEdit->setText(plotModifier.format());
+}
+
+PlotModifier PlotModifierWidget::plotModifier() const
+{
+       PlotModifier plotModifier;
+       int m = -1, n = -1 , p = -1;
+       if (dataSetStartCheckBox->isChecked()) {
+               m = dataSetStartSpinBox->value();
+               if (dataSetEndCheckBox->isChecked()) {
+                       n = dataSetEndSpinBox->value();
+                       if (dataSetIncCheckBox->isChecked()) {
+                               p = dataSetIncSpinBox->value();
+                       }
+               }
+       }
+       plotModifier.setIndex(m, n, p);
+       int num[6];
+       if (!pointIncCheckBox->isChecked()) {
+               num[0] = -1;
+       } else {
+               num[0] = pointIncSpinBox->value();
+       }
+       if (!lineIncCheckBox->isChecked()) {
+               num[1] = -1;
+       } else {
+               num[1] = lineIncSpinBox->value();
+       }
+       if (!startPointCheckBox->isChecked()) {
+               num[2] = -1;
+       } else {
+               num[2] = startPointSpinBox->value();
+       }
+       if (!startLineCheckBox->isChecked()) {
+               num[3] = -1;
+       } else {
+               num[3] = startLineSpinBox->value();
+       }
+       if (!endPointCheckBox->isChecked()) {
+               num[4] = -1;
+       } else {
+               num[4] = endPointSpinBox->value();
+       }
+       if (!endLineCheckBox->isChecked()) {
+               num[5] = -1;
+       } else {
+               num[5] = endLineSpinBox->value();
+       }
+       plotModifier.setEvery(num[0], num[1], num[2], num[3],
+                       num[4], num[5]);
+       int smooth;
+       if (!interpCheckBox->isChecked()) {
+               smooth = -1;
+       } else {
+               smooth = interpComboBox->currentIndex();
+       }
+       plotModifier.setSmooth(smooth);
+
+       QStringList entry;
+       for (int i = 0; i < AXIS_NUM; i++) {
+               QString text = columnLineEdit[i]->text();
+               if (text.isEmpty()) {
+                       break;
+               } else {
+                       entry << text;
+               }
+       }
+       QString format = formatLineEdit->text();
+       plotModifier.setUsing(entry, format);
+
+       return plotModifier;
+}
diff --git a/src/gui/plot/PlotModifierWidget.h b/src/gui/plot/PlotModifierWidget.h
new file mode 100644 (file)
index 0000000..fd42eff
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef PLOT_MODIFIER_WIDGET_INCLUDED
+#define PLOT_MODIFIER_WIDGET_INCLUDED
+
+class PlotModifier;
+
+#include <QtGui/QWidget>
+class QCheckBox;
+class QComboBox;
+class QLineEdit;
+class QSpinBox;
+
+class PlotModifierWidget : public QWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit PlotModifierWidget(QWidget *parent = 0);
+
+               void setPlotModifier(const PlotModifier &plotModifier);
+               PlotModifier plotModifier() const;
+
+               private slots:
+                       void setIndex();
+
+       private:
+               // don't implement these
+               PlotModifierWidget(const PlotModifierWidget &);
+               PlotModifierWidget &operator=(const PlotModifierWidget &);
+
+               static const int AXIS_NUM = 3;
+               QLineEdit *columnLineEdit[AXIS_NUM];
+               QLineEdit *formatLineEdit;
+               QCheckBox *dataSetStartCheckBox;
+               QSpinBox *dataSetStartSpinBox;
+               QCheckBox *dataSetEndCheckBox;
+               QSpinBox *dataSetEndSpinBox;
+               QCheckBox *dataSetIncCheckBox;
+               QSpinBox *dataSetIncSpinBox;
+               QCheckBox *pointIncCheckBox;
+               QSpinBox *pointIncSpinBox;
+               QCheckBox *lineIncCheckBox;
+               QSpinBox *lineIncSpinBox;
+               QCheckBox *startPointCheckBox;
+               QSpinBox *startPointSpinBox;
+               QCheckBox *startLineCheckBox;
+               QSpinBox *startLineSpinBox;
+               QCheckBox *endPointCheckBox;
+               QSpinBox *endPointSpinBox;
+               QCheckBox *endLineCheckBox;
+               QSpinBox *endLineSpinBox;
+               QCheckBox *interpCheckBox;
+               QComboBox *interpComboBox;
+};
+#endif // PLOT_MODIFIER_WIDGET_INCLUDED
diff --git a/src/gui/plot/PlotOthersWidget.cpp b/src/gui/plot/PlotOthersWidget.cpp
new file mode 100644 (file)
index 0000000..bce5d46
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "PlotOthersWidget.h"
+#include "Plot.h"
+
+#include <QtGui/QComboBox>
+#include <QtGui/QGroupBox>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QVBoxLayout>
+
+PlotOthersWidget::PlotOthersWidget(QWidget *parent)
+: QWidget(parent)
+{
+       setWindowTitle(tr("Others"));
+
+       axisComboBox = new QComboBox;
+       for (int i = 0; !Plot::AXIS[i].isEmpty(); i++) {
+               axisComboBox->addItem(Plot::AXIS[i]);
+       }
+
+       QHBoxLayout *axisLayout = new QHBoxLayout;
+       axisLayout->addWidget(axisComboBox);
+       axisLayout->addStretch();
+
+       axisGroupBox = new QGroupBox(tr("A&xes"));
+       axisGroupBox->setWhatsThis(tr("plot {axes &lt;axes&gt;}"));
+       axisGroupBox->setCheckable(true);
+       axisGroupBox->setLayout(axisLayout);
+       connect(axisGroupBox, SIGNAL(toggled(bool)),
+                       axisComboBox, SLOT(setEnabled(bool)));
+
+       QVBoxLayout *mainLayout = new QVBoxLayout;
+       mainLayout->addWidget(axisGroupBox);
+       mainLayout->addStretch();
+
+       setLayout(mainLayout);
+}
+
+void PlotOthersWidget::setPlotAxis(int axis)
+{
+       bool hasAxis = (axis >= 0);
+       axisGroupBox->setChecked(hasAxis);
+       axisComboBox->setEnabled(hasAxis);
+       if (hasAxis) {
+               axisComboBox->setCurrentIndex(axis);
+       }
+}
+
+int PlotOthersWidget::plotAxis() const
+{
+       int axis;
+       if (!axisGroupBox->isChecked()) {
+               axis = -1;
+       } else {
+               axis = axisComboBox->currentIndex();
+       }
+       return axis;
+}
diff --git a/src/gui/plot/PlotOthersWidget.h b/src/gui/plot/PlotOthersWidget.h
new file mode 100644 (file)
index 0000000..7d76064
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef PLOT_OTHERS_WIDGET_INCLUDED
+#define PLOT_OTHERS_WIDGET_INCLUDED
+
+#include <QtGui/QWidget>
+class QComboBox;
+class QGroupBox;
+
+class PlotOthersWidget : public QWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit PlotOthersWidget(QWidget *parent = 0);
+
+               void setPlotAxis(int axis);
+               int plotAxis() const;
+
+       private:
+               // don't implement these
+               PlotOthersWidget(const PlotOthersWidget &);
+               PlotOthersWidget &operator=(const PlotOthersWidget &);
+
+               QComboBox *axisComboBox;
+               QGroupBox *axisGroupBox;
+};
+#endif // PLOT_OTHERS_WIDGET_INCLUDED
diff --git a/src/gui/plot/PlotStyleWidget.cpp b/src/gui/plot/PlotStyleWidget.cpp
new file mode 100644 (file)
index 0000000..5af8677
--- /dev/null
@@ -0,0 +1,194 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "PlotStyleWidget.h"
+#include "PlotStyle.h"
+
+#include <QtGui/QCheckBox>
+#include <QtGui/QComboBox>
+#include <QtGui/QDoubleSpinBox>
+#include <QtGui/QGridLayout>
+#include <QtGui/QSpinBox>
+
+PlotStyleWidget::PlotStyleWidget(QWidget *parent)
+: QWidget(parent)
+{
+       setWindowTitle(tr("Style"));
+       setWhatsThis(tr("plot {with &lt;style&gt;}"));
+
+       styleCheckBox = new QCheckBox;
+       styleCheckBox->setText(tr("Specify"));
+
+       styleComboBox = new QComboBox;
+       for (int i = 0; !PlotStyle::STYLE[i].isEmpty(); i++) {
+               styleComboBox->addItem(PlotStyle::STYLE[i]);
+       }
+       connect(styleCheckBox, SIGNAL(toggled(bool)),
+                       styleComboBox, SLOT(setEnabled(bool)));
+
+       lineTypeCheckBox = new QCheckBox;
+       lineTypeCheckBox->setText(tr("Specify a Line Type"));
+
+       lineTypeSpinBox = new QSpinBox;
+       connect(lineTypeCheckBox, SIGNAL(toggled(bool)),
+                       lineTypeSpinBox, SLOT(setEnabled(bool)));
+
+       lineWidthCheckBox = new QCheckBox;
+       lineWidthCheckBox->setText(tr("Specify Line Width"));
+
+       lineWidthDoubleSpinBox = new QDoubleSpinBox;
+       connect(lineWidthCheckBox, SIGNAL(toggled(bool)),
+                       lineWidthDoubleSpinBox, SLOT(setEnabled(bool)));
+
+       pointTypeCheckBox = new QCheckBox;
+       pointTypeCheckBox->setText(tr("Specify a Point Type"));
+
+       pointTypeSpinBox = new QSpinBox;
+       connect(pointTypeCheckBox, SIGNAL(toggled(bool)),
+                       pointTypeSpinBox, SLOT(setEnabled(bool)));
+
+       pointSizeCheckBox = new QCheckBox;
+       pointSizeCheckBox->setText(tr("Specify Point Size"));
+
+       pointSizeDoubleSpinBox = new QDoubleSpinBox;
+       connect(pointSizeCheckBox, SIGNAL(toggled(bool)),
+                       pointSizeDoubleSpinBox, SLOT(setEnabled(bool)));
+
+       connect(styleCheckBox, SIGNAL(toggled(bool)),
+                       this, SLOT(setWidget(bool)));
+
+       QGridLayout *mainLayout = new QGridLayout;
+       mainLayout->addWidget(styleCheckBox, 0, 0);
+       mainLayout->addWidget(styleComboBox, 0, 1);
+       mainLayout->addItem(new QSpacerItem(40, 20, 
+                               QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+       mainLayout->addWidget(lineTypeCheckBox, 1, 0);
+       mainLayout->addWidget(lineTypeSpinBox, 1, 1);
+       mainLayout->addWidget(lineWidthCheckBox, 2, 0);
+       mainLayout->addWidget(lineWidthDoubleSpinBox, 2, 1);
+       mainLayout->addWidget(pointTypeCheckBox, 3, 0);
+       mainLayout->addWidget(pointTypeSpinBox, 3, 1);
+       mainLayout->addWidget(pointSizeCheckBox, 4, 0);
+       mainLayout->addWidget(pointSizeDoubleSpinBox, 4, 1);
+       mainLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 5, 0);
+
+       setLayout(mainLayout);
+}
+
+void PlotStyleWidget::setPlotStyle(const PlotStyle &plotStyle)
+{
+       int style = plotStyle.style();
+       bool hasStyle = (style >= 0);
+       styleCheckBox->setChecked(hasStyle);
+       styleComboBox->setEnabled(hasStyle);
+
+       lineTypeCheckBox->setEnabled(hasStyle);
+       lineTypeSpinBox->setEnabled(hasStyle);
+
+       lineWidthCheckBox->setEnabled(hasStyle);
+       lineWidthDoubleSpinBox->setEnabled(hasStyle);
+
+       pointTypeCheckBox->setEnabled(hasStyle);
+       pointTypeSpinBox->setEnabled(hasStyle);
+
+       pointSizeCheckBox->setEnabled(hasStyle);
+       pointSizeDoubleSpinBox->setEnabled(hasStyle);
+
+       if (hasStyle) {
+               styleComboBox->setCurrentIndex(style);
+
+               int lineType = plotStyle.lineType();
+               bool hasLineType = (lineType >= 0);
+               lineTypeCheckBox->setChecked(hasLineType);
+               lineTypeSpinBox->setEnabled(hasLineType);
+               if (hasLineType) {
+                       lineTypeSpinBox->setValue(lineType);
+               }
+
+               double lineWidth = plotStyle.lineWidth();
+               bool hasLineWidth = (lineWidth >= 0);
+               lineWidthCheckBox->setChecked(hasLineWidth);
+               lineWidthDoubleSpinBox->setEnabled(hasLineWidth);
+               if (hasLineWidth) {
+                       lineWidthDoubleSpinBox->setValue(lineWidth);
+               }
+
+               int pointType = plotStyle.pointType();
+               bool hasPointType = (pointType >= 0);
+               pointTypeCheckBox->setChecked(hasPointType);
+               pointTypeSpinBox->setEnabled(hasPointType);
+               if (hasPointType) {
+                       pointTypeSpinBox->setValue(pointType);
+               }
+
+               double pointSize = plotStyle.pointSize();
+               bool hasPointSize = (pointSize >= 0);
+               pointSizeCheckBox->setChecked(hasPointSize);
+               pointSizeDoubleSpinBox->setEnabled(hasPointSize);
+               if (hasPointSize) {
+                       pointSizeDoubleSpinBox->setValue(pointSize);
+               }
+
+       }
+}
+
+PlotStyle PlotStyleWidget::plotStyle() const
+{
+       PlotStyle plotStyle;
+       int style = styleCheckBox->isChecked() ?
+               styleComboBox->currentIndex() : -1;
+       plotStyle.setStyle(style);
+
+       int lineType = lineTypeCheckBox->isChecked() ?
+               lineTypeSpinBox->value() : -1;
+       plotStyle.setLineType(lineType);
+
+       double lineWidth = lineWidthCheckBox->isChecked() ?
+               lineWidthDoubleSpinBox->value() : -1;
+       plotStyle.setLineWidth(lineWidth);
+
+       int pointType = pointTypeCheckBox->isChecked() ?
+               pointTypeSpinBox->value() : -1;
+       plotStyle.setPointType(pointType);
+
+       double pointSize = pointSizeCheckBox->isChecked() ?
+               pointSizeDoubleSpinBox->value() : -1;
+       plotStyle.setPointSize(pointSize);
+
+       return plotStyle;
+}
+
+void PlotStyleWidget::setWidget(bool isEnabled)
+{
+       lineTypeCheckBox->setEnabled(isEnabled);
+       lineTypeSpinBox->setEnabled(isEnabled 
+                       && lineTypeCheckBox->isChecked());
+
+       lineWidthCheckBox->setEnabled(isEnabled);
+       lineWidthDoubleSpinBox->setEnabled(isEnabled
+                       && lineWidthCheckBox->isChecked());
+
+       pointTypeCheckBox->setEnabled(isEnabled);
+       pointTypeSpinBox->setEnabled(isEnabled
+                       && pointTypeCheckBox->isChecked());
+
+       pointSizeCheckBox->setEnabled(isEnabled);
+       pointSizeDoubleSpinBox->setEnabled(isEnabled
+                       && pointSizeCheckBox->isChecked());
+}
diff --git a/src/gui/plot/PlotStyleWidget.h b/src/gui/plot/PlotStyleWidget.h
new file mode 100644 (file)
index 0000000..062fd50
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef PLOT_STYLE_WIDGET_INCLUDED
+#define PLOT_STYLE_WIDGET_INCLUDED
+
+class PlotStyle;
+
+#include <QtGui/QWidget>
+class QCheckBox;
+class QComboBox;
+class QDoubleSpinBox;
+class QSpinBox;
+
+class PlotStyleWidget : public QWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit PlotStyleWidget(QWidget *parent = 0);
+
+               void setPlotStyle(const PlotStyle &plotStyle);
+               PlotStyle plotStyle() const;
+
+       private slots:
+               void setWidget(bool isEnabled);
+
+       private:
+               // don't implement these
+               PlotStyleWidget(const PlotStyleWidget &);
+               PlotStyleWidget &operator=(const PlotStyleWidget &);
+
+               QCheckBox *styleCheckBox;
+               QComboBox *styleComboBox;
+               QCheckBox *lineTypeCheckBox;
+               QSpinBox *lineTypeSpinBox;
+               QCheckBox *lineWidthCheckBox;
+               QDoubleSpinBox *lineWidthDoubleSpinBox;
+               QCheckBox *pointTypeCheckBox;
+               QSpinBox *pointTypeSpinBox;
+               QCheckBox *pointSizeCheckBox;
+               QDoubleSpinBox *pointSizeDoubleSpinBox;
+};
+#endif // PLOT_STYLE_WIDGET_INCLUDED
diff --git a/src/gui/plot/PlotTitleWidget.cpp b/src/gui/plot/PlotTitleWidget.cpp
new file mode 100644 (file)
index 0000000..14d4229
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "PlotTitleWidget.h"
+#include "PlotTitle.h"
+
+#include <QtGui/QLineEdit>
+#include <QtGui/QGridLayout>
+#include <QtGui/QRadioButton>
+
+PlotTitleWidget::PlotTitleWidget(QWidget *parent)
+: QWidget(parent)
+{
+       setWindowTitle(tr("Title"));
+       setWhatsThis(tr("plot {&lt;title-spec&gt;}"));
+
+       defaultTitleRadioButton = new QRadioButton;
+       defaultTitleRadioButton->setText(tr("&Default"));
+       defaultTitleRadioButton->setChecked(true);
+
+       noTitleRadioButton = new QRadioButton;
+       noTitleRadioButton->setText(tr("&No Title"));
+
+       customTitleRadioButton = new QRadioButton;
+       customTitleRadioButton->setText(tr("C&ustom Title"));
+
+       titleLineEdit = new QLineEdit;
+       connect(customTitleRadioButton, SIGNAL(toggled(bool)),
+                       titleLineEdit, SLOT(setEnabled(bool)));
+
+       QGridLayout *mainLayout = new QGridLayout;
+       mainLayout->addWidget(defaultTitleRadioButton, 0, 0, 1, 2);
+       mainLayout->addWidget(noTitleRadioButton, 1, 0, 1, 2);
+       mainLayout->addWidget(customTitleRadioButton, 2, 0, 1, 2);
+       mainLayout->addItem(new QSpacerItem(20, 20,
+                               QSizePolicy::Fixed, QSizePolicy::Minimum), 3, 0);
+       mainLayout->addWidget(titleLineEdit, 3, 1);
+       mainLayout->addItem(new QSpacerItem(20, 40,
+                               QSizePolicy::Minimum, QSizePolicy::Expanding), 4, 0);
+
+       setLayout(mainLayout);
+}
+
+void PlotTitleWidget::setPlotTitle(const PlotTitle &plotTitle)
+{
+       bool isCustom;
+       if (plotTitle.isNoTitle()) {
+               noTitleRadioButton->setChecked(true);
+               isCustom = false;
+       } else if (plotTitle.title().isEmpty()) {
+               defaultTitleRadioButton->setChecked(true);
+               isCustom = false;
+       } else {
+               customTitleRadioButton->setChecked(true);
+               titleLineEdit->setText(plotTitle.title());
+               isCustom = true;
+       }
+       titleLineEdit->setEnabled(isCustom);
+}
+
+PlotTitle PlotTitleWidget::plotTitle() const
+{
+       PlotTitle plotTitle;
+       if (noTitleRadioButton->isChecked()) {
+               plotTitle.setNoTitle(true);
+       } else if (customTitleRadioButton->isChecked()) {
+               plotTitle.setTitle(titleLineEdit->text());
+       }
+
+       return plotTitle;
+}
diff --git a/src/gui/plot/PlotTitleWidget.h b/src/gui/plot/PlotTitleWidget.h
new file mode 100644 (file)
index 0000000..6b3e324
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef PLOT_TITLE_WIDGET_INCLUDED
+#define PLOT_TITLE_WIDGET_INCLUDED
+
+class PlotTitle;
+
+#include <QtGui/QWidget>
+class QLineEdit;
+class QRadioButton;
+
+class PlotTitleWidget : public QWidget
+{
+       Q_OBJECT
+
+       public:
+               explicit PlotTitleWidget(QWidget *parent = 0);
+
+               void setPlotTitle(const PlotTitle &plotTitle);
+               PlotTitle plotTitle() const;
+
+       private:
+               // don't implement these
+               PlotTitleWidget(const PlotTitleWidget &);
+               PlotTitleWidget &operator=(const PlotTitleWidget &);
+
+               QRadioButton *defaultTitleRadioButton;
+               QRadioButton *noTitleRadioButton;
+               QRadioButton *customTitleRadioButton;
+               QLineEdit *titleLineEdit;
+};
+#endif // PLOT_TITLE_WIDGET_INCLUDED
diff --git a/src/images/configure.png b/src/images/configure.png
new file mode 100644 (file)
index 0000000..1141564
Binary files /dev/null and b/src/images/configure.png differ
diff --git a/src/images/contexthelp.png b/src/images/contexthelp.png
new file mode 100644 (file)
index 0000000..8b5c78b
Binary files /dev/null and b/src/images/contexthelp.png differ
diff --git a/src/images/exit.png b/src/images/exit.png
new file mode 100644 (file)
index 0000000..7445887
Binary files /dev/null and b/src/images/exit.png differ
diff --git a/src/images/fileopen.png b/src/images/fileopen.png
new file mode 100644 (file)
index 0000000..503a004
Binary files /dev/null and b/src/images/fileopen.png differ
diff --git a/src/images/filesave.png b/src/images/filesave.png
new file mode 100644 (file)
index 0000000..dd00abd
Binary files /dev/null and b/src/images/filesave.png differ
diff --git a/src/images/filesaveas.png b/src/images/filesaveas.png
new file mode 100644 (file)
index 0000000..61a080e
Binary files /dev/null and b/src/images/filesaveas.png differ
diff --git a/src/images/run.png b/src/images/run.png
new file mode 100644 (file)
index 0000000..6d21477
Binary files /dev/null and b/src/images/run.png differ
diff --git a/src/main.cpp b/src/main.cpp
new file mode 100644 (file)
index 0000000..eb32cf0
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+/*! \mainpage
+ * 
+ * \section gnuplot cueplot -> gnuplot
+ *
+ * Cueplot は Process クラス内で gnuplot を呼び出しています。
+ * gnuplot のコマンドを実行する場合にはそのコマンドを引数として
+ * Process::execute() 関数を呼びます。
+ *
+ * \section dir ディレクトリ構成
+ *
+ * \subsection command command ディレクトリ
+ *
+ * command ディレクトリ内のファイルでは Command クラスと CommandOption クラス
+ * 及びその派生クラスが定義されています。 Command クラスの派生クラスの名前は
+ * そのクラスが表すコマンド名に対応します。例えば、 Plot クラスは 
+ * \c plot クラスに対応しています。 CommandOption クラスの派生クラスの名前には
+ * 接頭語として対応するコマンド名が付いています。例えば、 FitRange クラスは 
+ * \c fit コマンドのオプションを扱うクラスです。
+ *
+ * \subsection opt opt ディレクトリ
+ *
+ * opt ディレクトリ内のファイルで定義されているクラスは \c set コマンドの
+ * オプションを扱います。クラス名は \c set コマンドのオプションから
+ * 付けられており、例えば、 Dummy クラスは <code>set dummy</code> コマンドの
+ * オプションを扱っています。
+ *
+ * \subsection gui gui ディレクトリ
+ *
+ * gui ディレクトリ内にはダイアログやウィジェット関連のファイルが
+ * 含まれています。いくつかのダイアログは %Singleton です。
+ *
+ * \subsubsection guiopt gui/opt ディレクトリ
+ *
+ * gui/opt ディレクトリでは OptionDialog クラスで使用されるウィジェットクラスを
+ * 定義するファイルが含まれます。定義されているクラスは OptionWidget クラス
+ * とその派生クラスです。
+ *
+ * opt ディレクトリ内のファイルと gui/opt ディレクトリ内のファイルは
+ * 対応しています。例えば、 opt/Angles.cpp は gui/opt/AnglesOptionWidget.cpp に
+ * 対応し、 opt/terminal/TerminalPostScript.h は 
+ * gui/opt/terminal/TerminalPostScriptOptionWidget.h に対応します。
+ *
+ * \subsubsection guifit gui/fit ディレクトリ
+ *
+ * gui/fit ディレクトリ内では FitDialog クラスで使用される
+ * ウィジェットクラスを定義するファイルが含まれます。
+ *
+ * \subsubsection guiplot gui/plot ディレクトリ
+ *
+ * gui/plot ディレクトリ内では PlotOptionDialog クラスで使用される
+ * ウィジェットクラスを定義するファイルが含まれます。
+ *
+ * \subsection images images ディレクトリ
+ *
+ * images ディレクトリ内には Cueplot で用いられる画像ファイルが含まれています。
+ */
+
+#include "MainWindow.h"
+
+#include <QtCore/QLibraryInfo>
+#include <QtCore/QLocale>
+#include <QtCore/QTranslator>
+#include <QtGui/QApplication>
+
+int main(int argc, char *argv[])
+{
+       // 設定ファイルの保存場所を指定
+       QCoreApplication::setOrganizationName("SourceForge");
+       QCoreApplication::setOrganizationDomain("cueplot.sourceforge.jp");
+       QCoreApplication::setApplicationName("Cueplot");
+
+       QApplication app(argc, argv);
+
+       const QString TRANS_DIR
+               = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
+       const QString APP_DIR
+               = QCoreApplication::applicationDirPath();
+       const QString LOCALE = QLocale::system().name();
+       QString FILE_NAME = "qt_" + LOCALE;
+
+       const QString PAIR[][2] = {
+               // Qt ライブラリの翻訳ファイル
+               { FILE_NAME, TRANS_DIR },
+               { FILE_NAME.toLower(), TRANS_DIR },
+               { FILE_NAME, APP_DIR },
+               // このアプリケーションの翻訳ファイル
+               { QCoreApplication::applicationName().toLower() + "_" + LOCALE,
+                       APP_DIR }
+       };
+
+       const int NUM = sizeof(PAIR) / sizeof(PAIR[0]);
+       QTranslator translator[NUM];
+       // 翻訳ファイルを読み込む
+       for (int i = 0; i < NUM; i++) {
+               translator[i].load(PAIR[i][0], PAIR[i][1]);
+               app.installTranslator(&translator[i]);
+       }
+
+       MainWindow mainWindow;
+       mainWindow.show();
+
+       return app.exec();
+}
diff --git a/src/opt/Angles.cpp b/src/opt/Angles.cpp
new file mode 100644 (file)
index 0000000..f26aa63
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "Angles.h"
+
+#include <QtCore/QString>
+
+Angles::Angles() : isDegrees_(false)
+{
+}
+
+void Angles::setDegrees(bool degrees)
+{
+       isDegrees_ = degrees;
+}
+
+bool Angles::isDegrees() const
+{
+       return isDegrees_;
+}
+
+QString Angles::command() const
+{
+       QString str = "set angles ";
+       str += isDegrees_ ? "degrees" : "radians";
+       return str;
+}
diff --git a/src/opt/Angles.h b/src/opt/Angles.h
new file mode 100644 (file)
index 0000000..0fb9d39
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef ANGLES_INCLUDED
+#define ANGLES_INCLUDED
+
+#include "Option.h"
+
+class QString;
+
+//! set angles コマンド
+class Angles : public Option
+{
+       public:
+               Angles();
+
+               void setDegrees(bool degrees);
+               bool isDegrees() const;
+
+               QString command() const;
+
+       private:
+               bool isDegrees_;
+};
+#endif // ANGLES_INCLUDED
diff --git a/src/opt/AxisData.cpp b/src/opt/AxisData.cpp
new file mode 100644 (file)
index 0000000..ccefcb6
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "AxisData.h"
+
+#include <QtCore/QStringList>
+
+const QString AxisData::AXIS[] = {
+       "x", "y", "z", "x2", "y2", "cb", ""
+};
+
+AxisData::AxisData()
+{
+       for (int i = 0; !AXIS[i].isEmpty(); i++) {
+               timeList.append(false);
+       }
+}
+
+void AxisData::setTime(int axis, bool time)
+{
+       timeList[axis] = time;
+}
+
+bool AxisData::isTime(int axis) const
+{
+       return timeList.at(axis);
+}
+
+QString AxisData::command() const
+{
+       QStringList commandList;
+       for (int i = 0; !AXIS[i].isEmpty(); i++) {
+               QString str = "set " + AXIS[i] + "data ";
+               if (timeList.at(i)) {
+                       str += "time";
+               }
+               commandList << str;
+       }
+       return commandList.join("\n");
+}
diff --git a/src/opt/AxisData.h b/src/opt/AxisData.h
new file mode 100644 (file)
index 0000000..ec91fd4
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef AXIS_RANGE_INCLUDED
+#define AXIS_RANGE_INCLUDED
+
+#include "Option.h"
+
+#include <QtCore/QList>
+#include <QtCore/QString>
+
+//! set {axis}data コマンド
+class AxisData : public Option
+{
+       public:
+               AxisData();
+
+               void setTime(int axis, bool time);
+               bool isTime(int axis) const;
+
+               QString command() const;
+
+               //! 軸
+               static const QString AXIS[];
+       private:
+               QList<bool> timeList;
+};
+#endif // AXIS_RANGE_INCLUDED
diff --git a/src/opt/AxisLabel.cpp b/src/opt/AxisLabel.cpp
new file mode 100644 (file)
index 0000000..79c335b
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "AxisLabel.h"
+
+#include <QtCore/QStringList>
+
+const double AxisLabel::DEFAULT_FONT_SIZE = 0;
+const int AxisLabel::DEFAULT_LINE_TYPE = 0;
+
+const QString AxisLabel::AXIS[] = {
+       "x", "y", "z", "x2", "y2", "cb", ""
+};
+
+AxisLabel::AxisLabel()
+{
+       for (int i = 0; !AXIS[i].isEmpty(); i++) {
+               labelList.append("");
+               xOffsetList.append(0.000000);
+               yOffsetList.append(0.000000);
+               fontNameList.append("");
+               fontSizeList.append(DEFAULT_FONT_SIZE);
+               lineTypeList.append(DEFAULT_LINE_TYPE);
+       }
+}
+
+void AxisLabel::setLabel(int axis, const QString &label)
+{
+       labelList[axis] = label;
+}
+
+const QString &AxisLabel::label(int axis) const
+{
+       return labelList.at(axis);
+}
+
+void AxisLabel::setXOffset(int axis, double xoff)
+{
+       xOffsetList[axis] = xoff;
+}
+
+double AxisLabel::xOffset(int axis) const
+{
+       return xOffsetList.at(axis);
+}
+
+void AxisLabel::setYOffset(int axis, double yoff)
+{
+       yOffsetList[axis] = yoff;
+}
+
+double AxisLabel::yOffset(int axis) const
+{
+       return yOffsetList.at(axis);
+}
+
+void AxisLabel::setFontName(int axis, const QString &name)
+{
+       fontNameList[axis] = name;
+}
+
+const QString &AxisLabel::fontName(int axis) const
+{
+       return fontNameList.at(axis);
+}
+
+void AxisLabel::setFontSize(int axis, double size)
+{
+       fontSizeList[axis] = size;
+}
+
+double AxisLabel::fontSize(int axis) const
+{
+       return fontSizeList.at(axis);
+}
+
+void AxisLabel::setLineType(int axis, int lt)
+{
+       lineTypeList[axis] = lt;
+}
+
+int AxisLabel::lineType(int axis) const
+{
+       return lineTypeList.at(axis);
+}
+
+QString AxisLabel::command() const
+{
+       QStringList commandList;
+       for (int i = 0; !AXIS[i].isEmpty(); i++) {
+               QString str = "set " + AXIS[i] + "label"
+                       + " \"" + labelList.at(i) + "\" " 
+                       + QString::number(xOffsetList.at(i)) + "," 
+                       + QString::number(yOffsetList.at(i))
+                       + " font \"" + fontNameList.at(i);
+               if (fontSizeList.at(i) != DEFAULT_FONT_SIZE) {
+                       str += "," + QString::number(fontSizeList.at(i));
+               }
+               str += "\"";
+               if (lineTypeList.at(i) != DEFAULT_LINE_TYPE) {
+                       str += " textcolor lt " 
+                               + QString::number(lineTypeList.at(i));
+               }
+               commandList << str;
+       }
+       return commandList.join("\n");
+}
diff --git a/src/opt/AxisLabel.h b/src/opt/AxisLabel.h
new file mode 100644 (file)
index 0000000..53c50c4
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef AXIS_LABEL_INCLUDED
+#define AXIS_LABEL_INCLUDED
+
+#include "Option.h"
+
+#include <QtCore/QList>
+#include <QtCore/QString>
+
+//! set {axis}label コマンド
+class AxisLabel : public Option
+{
+       public:
+               AxisLabel();
+
+               void setLabel(int axis, const QString &label);
+               const QString &label(int axis) const;
+
+               void setXOffset(int axis, double xoff);
+               double xOffset(int axis) const;
+
+               void setYOffset(int axis, double yoff);
+               double yOffset(int axis) const;
+
+               void setFontName(int axis, const QString &name);
+               const QString &fontName(int axis) const;
+
+               void setFontSize(int axis, double size);
+               double fontSize(int axis) const;
+
+               void setLineType(int axis, int lt);
+               int lineType(int axis) const;
+
+               QString command() const;
+
+               //! 軸
+               static const QString AXIS[];
+       private:
+               static const double DEFAULT_FONT_SIZE;
+               static const int DEFAULT_LINE_TYPE;
+               QList<QString> labelList;
+               QList<double> xOffsetList;
+               QList<double> yOffsetList;
+               QList<QString> fontNameList;
+               QList<double> fontSizeList;
+               QList<int> lineTypeList;
+};
+#endif // AXIS_LABEL_INCLUDED
diff --git a/src/opt/AxisRange.cpp b/src/opt/AxisRange.cpp
new file mode 100644 (file)
index 0000000..de2f827
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "AxisRange.h"
+
+#include <QtCore/QStringList>
+
+const QString AxisRange::AXIS[] = {
+       "x", "y", "z", "x2", "y2", "cb", "r", "t", "u", "v", ""
+};
+
+AxisRange::AxisRange()
+{
+       for (int i = 0; !AXIS[i].isEmpty(); i++) {
+               minList.append("*");
+               maxList.append("*");
+               reverseList.append(false);
+               writeBackList.append(false);
+               restoreList.append(false);
+       }
+}
+
+void AxisRange::setMinimum(int axis, const QString &min)
+{
+       minList[axis] = min;
+}
+
+const QString &AxisRange::minimum(int axis) const
+{
+       return minList.at(axis);
+}
+
+void AxisRange::setMaximum(int axis, const QString &max)
+{
+       maxList[axis] = max;
+}
+
+const QString &AxisRange::maximum(int axis) const
+{
+       return maxList.at(axis);
+}
+
+void AxisRange::setReverse(int axis, bool reverse)
+{
+       reverseList[axis] = reverse;
+}
+
+bool AxisRange::isReverse(int axis) const
+{
+       return reverseList.at(axis);
+}
+
+void AxisRange::setWrittenBack(int axis, bool writeBack)
+{
+       writeBackList[axis] = writeBack;
+}
+
+bool AxisRange::writeBacks(int axis) const
+{
+       return writeBackList.at(axis);
+}
+
+void AxisRange::setRestored(int axis, bool restore)
+{
+       restoreList[axis] = restore;
+}
+
+bool AxisRange::restores(int axis) const
+{
+       return restoreList.at(axis);
+}
+
+QString AxisRange::command() const
+{
+       QStringList commandList;
+       for (int i = 0; !AXIS[i].isEmpty(); i++) {
+               QString str = "set " + AXIS[i] + "range ";
+               if (restoreList.at(i)) {
+                       str += "restore";
+                       commandList << str;
+               } else {
+                       str += "[ " + minList.at(i) + " : " + 
+                               maxList.at(i) + " ] ";
+                       str += reverseList.at(i) ? "" : "no";
+                       str += "reverse ";
+                       str += writeBackList.at(i) ? "" : "no";
+                       str += "writeback";
+                       commandList << str;
+               }
+       }
+       return commandList.join("\n");
+}
diff --git a/src/opt/AxisRange.h b/src/opt/AxisRange.h
new file mode 100644 (file)
index 0000000..3a43351
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef AXIS_RANGE_INCLUDED
+#define AXIS_RANGE_INCLUDED
+
+#include "Option.h"
+
+#include <QtCore/QList>
+#include <QtCore/QString>
+
+//! {axis}range コマンド
+class AxisRange : public Option
+{
+       public:
+               AxisRange();
+
+               void setMinimum(int axis, const QString &min);
+               const QString &minimum(int axis) const;
+
+               void setMaximum(int axis, const QString &max);
+               const QString &maximum(int axis) const;
+
+               void setReverse(int axis, bool reverse);
+               bool isReverse(int axis) const;
+
+               void setWrittenBack(int axis, bool writeBack);
+               bool writeBacks(int axis) const;
+
+               void setRestored(int axis, bool restore);
+               bool restores(int axis) const;
+
+               QString command() const;
+
+               //! 軸
+               static const QString AXIS[];
+       private:
+               QList<QString> minList;
+               QList<QString> maxList;
+               QList<bool> reverseList;
+               QList<bool> writeBackList;
+               QList<bool> restoreList;
+};
+#endif // AXIS_RANGE_INCLUDED
diff --git a/src/opt/AxisTics.cpp b/src/opt/AxisTics.cpp
new file mode 100644 (file)
index 0000000..1533989
--- /dev/null
@@ -0,0 +1,196 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "AxisTics.h"
+
+const int AxisTics::AUTOFREQ = 0;
+const int AxisTics::INCR = 1;
+const int AxisTics::POS = 2;
+
+const QString AxisTics::AXIS[] = {
+       "x", "y", "z", "x2", "y2", "cb", ""
+};
+
+const char * const AxisTics::LOCATION[] = {
+       QT_TRANSLATE_NOOP("AxisTics", "border"),
+       QT_TRANSLATE_NOOP("AxisTics", "axis"),
+       ""
+};
+
+AxisTics::AxisTics()
+{
+       for (int i = 0; !AXIS[i].isEmpty(); i++) {
+               flagList.append((i < 3) || (i == 5));
+               borderList.append(true);
+               mirrorList.append((i < 3) || (i == 5));
+               rotateList.append(false);
+               angList.append("");
+               modeList.append(AUTOFREQ);
+               for (int j = 0; j < 3; j++) {
+                       incrList[j].append("");
+               }
+               posList.append(QStringList());
+       }
+}
+
+void AxisTics::setFlag(int axis, bool flag)
+{
+       flagList[axis] = flag;
+}
+
+bool AxisTics::flag(int axis) const
+{
+       return flagList.at(axis);
+}
+
+void AxisTics::setMirror(int axis, bool mirror)
+{
+       mirrorList[axis] = mirror;
+}
+
+bool AxisTics::mirrors(int axis) const
+{
+       return mirrorList.at(axis);
+}
+
+void AxisTics::setBorder(int axis, bool border)
+{
+       borderList[axis] = border;
+}
+
+bool AxisTics::isBorder(int axis) const
+{
+       return borderList.at(axis);
+}
+
+void AxisTics::setRotate(int axis, bool rotate, const QString &ang)
+{
+       rotateList[axis] = rotate;
+       if (rotate) {
+               angList[axis] = ang;
+       }
+}
+
+bool AxisTics::rotates(int axis) const
+{
+       return rotateList[axis];
+}
+
+void AxisTics::setAutofreq(int axis)
+{
+       modeList[axis] = AUTOFREQ;
+}
+
+bool AxisTics::isAutofreq(int axis) const
+{
+       return modeList.at(axis) == AUTOFREQ;
+}
+
+void AxisTics::setIncrement(int axis, const QString &incr, 
+               const QString &start, const QString &end)
+{
+       modeList[axis] = INCR;
+       incrList[0][axis] = start;
+       incrList[1][axis] = incr;
+       incrList[2][axis] = end;
+}
+
+bool AxisTics::isIncrement(int axis) const
+{
+       return modeList.at(axis) == INCR;
+}
+
+const QString &AxisTics::start(int axis) const
+{
+       return incrList[0].at(axis);
+}
+
+const QString &AxisTics::increment(int axis) const
+{
+       return incrList[1].at(axis);
+}
+
+const QString &AxisTics::end(int axis) const
+{
+       return incrList[2].at(axis);
+}
+
+void AxisTics::setPosition(int axis, const QStringList &pos)
+{
+       modeList[axis] = POS;
+       posList[axis] = pos;
+}
+
+bool AxisTics::isPosition(int axis) const
+{
+       return modeList.at(axis) == POS;
+}
+
+const QStringList &AxisTics::position(int axis) const
+{
+       return posList.at(axis);
+}
+
+QString AxisTics::command() const
+{
+       QStringList commandList;
+       for (int i = 0; !AXIS[i].isEmpty(); i++) {
+               QString str = "set ";
+               // tics | notics
+               if (!flagList.at(i)) {
+                       str += "no" + AXIS[i] + "tics";
+                       commandList << str;
+                       continue;
+               }
+               str += AXIS[i] + "tics ";
+               // axis | border
+               str += QString(LOCATION[!borderList.at(i)]) + " ";
+               // mirror | nomirror
+               str += mirrorList.at(i) ? "mirror " : "nomirror "; 
+               // rotate
+               if (rotateList.at(i)) {
+                       str += "rotate ";
+                       if (!angList.at(i).isEmpty()) {
+                               // rotate by <ang>
+                               str += "by " + angList.at(i) + " ";
+                       }
+               } else {
+                       // norotate
+                       str += "norotate ";
+               }
+               if (modeList.at(i) == AUTOFREQ) {
+                       // autofreq
+                       str += "autofreq ";
+               } else if (modeList.at(i) == INCR) {
+                       // <start>, <incr>, <end>
+                       if (!incrList[0].at(i).isEmpty()) {
+                               str += incrList[0].at(i) + ", ";
+                       }
+                       str += incrList[1].at(i);
+                       if (!incrList[2].at(i).isEmpty()) {
+                               str += ", " + incrList[2].at(i);
+                       }
+                       str += " ";
+               } else if (modeList.at(i) == POS) {
+                       // "<label>" <pos> <level>...
+                       str += "(" + posList.at(i).join(",") + ")";
+               }
+               commandList << str;
+       }
+       return commandList.join("\n");
+}
diff --git a/src/opt/AxisTics.h b/src/opt/AxisTics.h
new file mode 100644 (file)
index 0000000..3922622
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef AXIS_TICS_INCLUDED
+#define AXIS_TICS_INCLUDED
+
+#include "Option.h"
+
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+
+//! set {axis}tics コマンド
+class AxisTics : public Option
+{
+       public:
+               AxisTics();
+
+               void setFlag(int axis, bool flag);
+               bool flag(int axis) const;
+
+               void setMirror(int axis, bool mirror);
+               bool mirrors(int axis) const;
+
+               void setBorder(int axis, bool border);
+               bool isBorder(int axis) const;
+
+               void setRotate(int axis, bool rotate,
+                               const QString &ang = QString());
+               bool rotates(int axis) const;
+
+               void setAutofreq(int axis);
+               bool isAutofreq(int axis) const;
+
+               void setIncrement(int axis, const QString &incr, 
+                               const QString &start = QString(), 
+                               const QString &end = QString());
+               bool isIncrement(int axis) const;
+               const QString &start(int axis) const;
+               const QString &increment(int axis) const;
+               const QString &end(int axis) const;
+
+               void setPosition(int axis, const QStringList &pos);
+               bool isPosition(int axis) const;
+               const QStringList &position(int axis) const;
+
+               QString command() const;
+
+               //! 軸
+               static const QString AXIS[];
+               //! 目盛りの場所
+               static const char * const LOCATION[];
+       private:
+               QList<bool> flagList;
+               QList<bool> borderList;
+               QList<bool> mirrorList;
+               QList<bool> rotateList;
+               QList<QString> angList;
+
+               QList<int> modeList;
+
+               static const int AUTOFREQ;
+               static const int INCR;
+               static const int POS;
+
+               QList<QString> incrList[3];
+
+               QList<QStringList> posList;
+};
+#endif // AXIS_TICS_INCLUDED
diff --git a/src/opt/Bar.cpp b/src/opt/Bar.cpp
new file mode 100644 (file)
index 0000000..cc4d163
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "Bar.h"
+
+#include <QtCore/QString>
+
+const double Bar::SMALL = 0.0;
+const double Bar::LARGE = 1.0;
+
+Bar::Bar() : size_(1.000000)
+{
+}
+
+void Bar::setSmall(bool small)
+{
+       size_ = small ? SMALL : LARGE;
+}
+
+bool Bar::isSmall() const
+{
+       return size_ == SMALL;
+}
+
+void Bar::setBig(bool big)
+{
+       setSmall(!big);
+}
+
+bool Bar::isBig() const
+{
+       return size_ == LARGE;
+}
+
+void Bar::setSize(double size)
+{
+       size_ = size;
+}
+
+double Bar::size() const
+{
+       return size_;
+}
+
+QString Bar::command() const
+{
+       return "set bar " + QString::number(size_);
+}
diff --git a/src/opt/Bar.h b/src/opt/Bar.h
new file mode 100644 (file)
index 0000000..dca475d
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef BAR_INCLUDED
+#define BAR_INCLUDED
+
+#include "Option.h"
+
+class QString;
+
+//! set bar コマンド
+class Bar : public Option
+{
+       public:
+               Bar();
+
+               void setSmall(bool small);
+               bool isSmall() const;
+
+               void setBig(bool big);
+               bool isBig() const;
+
+               void setSize(double size);
+               double size() const;
+
+               QString command() const;
+
+       private:
+               static const double SMALL;
+               static const double LARGE;
+               double size_;
+};
+#endif // BAR_INCLUDED
diff --git a/src/opt/BoxWidth.cpp b/src/opt/BoxWidth.cpp
new file mode 100644 (file)
index 0000000..5c727bc
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "BoxWidth.h"
+
+#include <QtCore/QString>
+
+const double BoxWidth::DEFAULT_WIDTH = -2.0;
+
+BoxWidth::BoxWidth() : width_(DEFAULT_WIDTH), isAbsolute_(true)
+{
+}
+
+void BoxWidth::setAuto(bool flag)
+{
+       if (flag) {
+               width_ = DEFAULT_WIDTH;
+               isAbsolute_ = true;
+       }
+}
+
+bool BoxWidth::isAuto() const
+{
+       return width_ == DEFAULT_WIDTH && isAbsolute_;
+}
+
+void BoxWidth::setWidth(double width)
+{
+       width_ = width;
+}
+
+double BoxWidth::width() const
+{
+       return width_;
+}
+
+void BoxWidth::setAbsolute(bool absolute)
+{
+       isAbsolute_ = absolute;
+}
+
+bool BoxWidth::isAbsolute() const
+{
+       return isAbsolute_;
+}
+
+QString BoxWidth::command() const
+{
+       QString str = "set boxwidth ";
+       if (isAuto()) {
+               return str;
+       }
+       str += QString::number(width_) + " "; 
+       str += isAbsolute_ ? "absolute" : "relative";
+       return str;
+}
diff --git a/src/opt/BoxWidth.h b/src/opt/BoxWidth.h
new file mode 100644 (file)
index 0000000..00dd1b9
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef BOX_WIDTH_INCLUDED
+#define BOX_WIDTH_INCLUDED
+
+#include "Option.h"
+
+class QString;
+
+//! set boxwidth コマンド
+class BoxWidth : public Option
+{
+       public:
+               BoxWidth();
+
+               void setAuto(bool flag);
+               bool isAuto() const;
+
+               void setWidth(double width); 
+               double width() const;
+
+               void setAbsolute(bool absolute);
+               bool isAbsolute() const;
+
+               QString command() const;
+
+       private:
+               static const double DEFAULT_WIDTH;
+               double width_;
+               bool isAbsolute_;
+};
+#endif // BOX_WIDTH_INCLUDED
diff --git a/src/opt/Dummy.cpp b/src/opt/Dummy.cpp
new file mode 100644 (file)
index 0000000..69ff43c
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "Dummy.h"
+
+Dummy::Dummy() : dummyVar1_("x"), dummyVar2_("y")
+{
+}
+
+void Dummy::setDummyVar1(const QString &var)
+{
+       dummyVar1_ = var;
+}
+
+const QString &Dummy::dummyVar1() const
+{
+       return dummyVar1_;
+}
+
+void Dummy::setDummyVar2(const QString &var)
+{
+       dummyVar2_ = var;
+}
+
+const QString &Dummy::dummyVar2() const
+{
+       return dummyVar2_;
+}
+
+QString Dummy::command() const
+{
+       return "set dummy " + dummyVar1_ + "," + dummyVar2_;
+}
diff --git a/src/opt/Dummy.h b/src/opt/Dummy.h
new file mode 100644 (file)
index 0000000..3b3fd00
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef DUMMY_INCLUDED
+#define DUMMY_INCLUDED
+
+#include "Option.h"
+
+#include <QtCore/QString>
+
+//! set dummy コマンド
+class Dummy : public Option
+{
+       public:
+               Dummy();
+
+               void setDummyVar1(const QString &var);
+               const QString &dummyVar1() const;
+
+               void setDummyVar2(const QString &var);
+               const QString &dummyVar2() const;
+
+               QString command() const;
+
+       private:
+               QString dummyVar1_;
+               QString dummyVar2_;
+};
+#endif // DUMMY_INCLUDED
diff --git a/src/opt/Encoding.cpp b/src/opt/Encoding.cpp
new file mode 100644 (file)
index 0000000..7b95f71
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "Encoding.h"
+
+const char * const Encoding::VALUE[] = {
+       QT_TRANSLATE_NOOP("Encoding", "default"),
+       "iso_8859_1", "iso_8859_2", "iso_8859_15", "cp850",
+       "cp852", "cp437", "koi8r", ""
+};
+
+Encoding::Encoding() : value_(0)
+{
+}
+
+void Encoding::setValue(int val)
+{
+       value_ = val;
+}
+
+int Encoding::value() const
+{
+       return value_;
+}
+
+QString Encoding::command() const
+{
+       return "set encoding " + QString(VALUE[value_]);
+}
diff --git a/src/opt/Encoding.h b/src/opt/Encoding.h
new file mode 100644 (file)
index 0000000..348ff40
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef ENCODING_INCLUDED
+#define ENCODING_INCLUDED
+
+#include "Option.h"
+
+#include <QtCore/QString>
+
+//! set encoding コマンド
+class Encoding : public Option
+{
+       public:
+               Encoding();
+
+               void setValue(int value);
+               int value() const;
+
+               QString command() const;
+
+               //! 文字コード
+               static const char * const VALUE[];
+       private:
+               int value_;
+};
+#endif // ENCODING_INCLUDED
diff --git a/src/opt/Format.cpp b/src/opt/Format.cpp
new file mode 100644 (file)
index 0000000..5f3aa5d
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "Format.h"
+
+#include <QtCore/QStringList>
+
+const QString Format::AXIS[] = {
+       "x", "y", "z", "x2", "y2", "cb", ""
+};
+
+Format::Format()
+{
+       for (int i = 0; !AXIS[i].isEmpty(); i++) {
+               formatList.append("% g");
+       }
+}
+
+void Format::setFormatString(int axis, const QString &str)
+{
+       formatList[axis] = str;
+}
+
+const QString &Format::formatString(int axis) const
+{
+       return formatList.at(axis);
+}
+
+QString Format::command() const
+{
+       QStringList commandList;
+       for (int i = 0; !AXIS[i].isEmpty(); i++) {
+               commandList << "set format " + AXIS[i] 
+                       + " \"" + formatList.at(i) + "\"";
+       }
+       return commandList.join("\n");
+}
diff --git a/src/opt/Format.h b/src/opt/Format.h
new file mode 100644 (file)
index 0000000..fcf8fe3
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef FORMAT_INCLUDED
+#define FORMAT_INCLUDED
+
+#include "Option.h"
+
+#include <QtCore/QList>
+#include <QtCore/QString>
+
+//! set format コマンド
+class Format : public Option
+{
+       public:
+               Format();
+
+               void setFormatString(int axis, const QString &str);
+               const QString &formatString(int axis) const;
+
+               QString command() const;
+
+               //! 軸
+               static const QString AXIS[];
+       private:
+               QList<QString> formatList;
+};
+#endif // FORMAT_INCLUDED
diff --git a/src/opt/Grid.cpp b/src/opt/Grid.cpp
new file mode 100644 (file)
index 0000000..c6cbb0c
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "Grid.h"
+
+#include <QtCore/QStringList>
+
+const int Grid::LAYER_DEFAULT = 0;
+const int Grid::FRONT = 1;
+const int Grid::BACK = 2;
+
+const QString Grid::AXIS[] = {
+       "x", "mx", "y", "my", "z", "mz", "x2", "mx2", "y2", "my2", 
+       "cb", "mcb", ""
+};
+
+Grid::Grid() : layer(LAYER_DEFAULT)
+{
+       for (int i = 0; !AXIS[i].isEmpty(); i++) {
+               flagList.append(false);
+       }
+}
+
+void Grid::setGrid(int axis, bool flag)
+{
+       flagList[axis] = flag;
+}
+
+bool Grid::isGrid(int axis) const
+{
+       return flagList.at(axis);
+}
+
+void Grid::setLayerDefault()
+{
+       layer = LAYER_DEFAULT;
+}
+
+bool Grid::isLayerDefault() const
+{
+       return layer == LAYER_DEFAULT;
+}
+
+void Grid::setFront()
+{
+       layer = FRONT;
+}
+
+bool Grid::isFront() const
+{
+       return layer == FRONT;
+}
+
+void Grid::setBack()
+{
+       layer = BACK;
+}
+
+bool Grid::isBack() const
+{
+       return layer == BACK;
+}
+
+QString Grid::command() const
+{
+       if (!flagList.contains(true)) {
+               return "unset grid";
+       }
+       QStringList commandList;
+       QString ticsStr = "set grid ";
+       for (int i = 0; !AXIS[i].isEmpty(); i++) {
+               if (!flagList.at(i)) {
+                       ticsStr += "no";
+               }
+               ticsStr += AXIS[i] + "tics ";
+       }
+       commandList << ticsStr;
+       QString layerStr = "set grid ";
+       switch (layer) {
+       case LAYER_DEFAULT:
+               layerStr += "layerdefault";
+               break;
+       case FRONT:
+               layerStr += "front";
+               break;
+       case BACK:
+               layerStr += "back";
+               break;
+       }
+       commandList << layerStr;
+       return commandList.join("\n");
+}
diff --git a/src/opt/Grid.h b/src/opt/Grid.h
new file mode 100644 (file)
index 0000000..5d79a9c
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef GRID_INCLUDED
+#define GRID_INCLUDED
+
+#include "Option.h"
+
+#include <QtCore/QList>
+
+//! set grid コマンド
+class Grid : public Option
+{
+       public:
+               Grid();
+
+               void setGrid(int axis, bool flag);
+               bool isGrid(int axis) const;
+
+               void setLayerDefault();
+               bool isLayerDefault() const;
+
+               void setFront();
+               bool isFront() const;
+
+               void setBack();
+               bool isBack() const;
+
+               QString command() const;
+
+               //! 軸
+               static const QString AXIS[];
+       private:
+               QList<bool> flagList;
+               int layer;
+
+               static const int LAYER_DEFAULT;
+               static const int FRONT;
+               static const int BACK;
+};
+#endif // GRID_INCLUDED
diff --git a/src/opt/Key.cpp b/src/opt/Key.cpp
new file mode 100644 (file)
index 0000000..64cdaa2
--- /dev/null
@@ -0,0 +1,249 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "Key.h"
+
+#include <QtCore/QStringList>
+
+#include <cmath> // pow()
+
+const QString Key::AXIS[] = {
+       "x", "y", "z", ""
+};
+
+const char * const Key::POSITION[] = {
+       QT_TRANSLATE_NOOP("Key", "left"),
+       QT_TRANSLATE_NOOP("Key", "right"),
+       QT_TRANSLATE_NOOP("Key", "top"),
+       QT_TRANSLATE_NOOP("Key", "bottom"),
+       QT_TRANSLATE_NOOP("Key", "outside"),
+       QT_TRANSLATE_NOOP("Key", "below"),
+       ""
+};
+
+Key::Key() : isOn_(true), position_(0x02 | 0x04), 
+       leftJustification_(false), isReverse_(false), 
+       sampleLength_(4.0), verticalSpacing_(1.25),
+       widthIncrement_(0.0), heightIncrement_(0.0), 
+       isAutoTitles_(true), title_(""), enhances_(true), 
+       lineType_(DEFAULT_LINE_TYPE), lineWidth_(1.0)
+{
+       for (int i = 0; !AXIS[i].isEmpty(); i++) {
+               positionList.append(0.0);
+       }
+}
+
+void Key::setOn(bool on)
+{
+       isOn_ = on;
+}
+
+bool Key::isOn() const
+{
+       return isOn_;
+}
+
+void Key::setPosition(int pos)
+{
+       for (int i = 0; !AXIS[i].isEmpty(); i++) {
+               positionList[i] = 0.0;
+       }
+       position_ = pos;
+}
+
+int Key::position() const
+{
+       return position_;
+}
+
+void Key::setPosition(int axis, double pos)
+{
+       position_ = 0;
+       positionList[axis] = pos;
+}
+
+double Key::position(int axis) const
+{
+       return positionList.at(axis);
+}
+
+void Key::setLeftJustification(bool leftJustify)
+{
+       leftJustification_ = leftJustify;
+}
+
+bool Key::leftJustification() const
+{
+       return leftJustification_;
+}
+
+void Key::setReverse(bool reverse)
+{
+       isReverse_ = reverse;
+}
+
+bool Key::isReverse() const
+{
+       return isReverse_;
+}
+
+void Key::setSampleLength(double length)
+{
+       sampleLength_ = length;
+}
+
+double Key::sampleLength() const
+{
+       return sampleLength_;
+}
+
+void Key::setVerticalSpacing(double spacing)
+{
+       verticalSpacing_ = spacing;
+}
+
+double Key::verticalSpacing() const
+{
+       return verticalSpacing_;
+}
+
+void Key::setWidthIncrement(double incr)
+{
+       widthIncrement_ = incr;
+}
+
+double Key::widthIncrement() const
+{
+       return widthIncrement_;
+}
+
+void Key::setHeightIncrement(double incr)
+{
+       heightIncrement_ = incr;
+}
+
+double Key::heightIncrement() const
+{
+       return heightIncrement_;
+}
+
+void Key::setAutoTitles(bool autoTitles)
+{
+       isAutoTitles_ = autoTitles;
+}
+
+bool Key::isAutoTitles() const
+{
+       return isAutoTitles_;
+}
+
+void Key::setTitle(const QString &text)
+{
+       title_ = text;
+}
+
+const QString &Key::title() const
+{
+       return title_;
+}
+
+void Key::setEnhanced(bool enhanced)
+{
+       enhances_ = enhanced;
+}
+
+bool Key::enhances() const
+{
+       return enhances_;
+}
+
+void Key::setLineType(int lt)
+{
+       lineType_ = lt;
+}
+
+void Key::setBox(bool box)
+{
+       lineType_ = box ? -1 : DEFAULT_LINE_TYPE;
+}
+
+bool Key::isBox() const
+{
+       return lineType_ != DEFAULT_LINE_TYPE; 
+}
+
+int Key::lineType() const
+{
+       return lineType_;
+}
+
+void Key::setLineWidth(double lw)
+{
+       lineWidth_ = lw;
+}
+
+double Key::lineWidth() const
+{
+       return lineWidth_;
+}
+
+QString Key::command() const
+{
+       QString str = "set key title";
+       str += (title_.isEmpty()) ? "" : " \"" + title_ + "\"";
+       str += "\n";
+       if (!isOn_) {
+               str += "unset key";
+               return str;
+       }
+       str += "set key ";
+       if (position_) {
+               for (int i = 0; POSITION[i][0]; i++) {
+                       if (position_ 
+                                       & static_cast<int>(std::pow(static_cast<double>(2), i))) {
+                               str += QString(POSITION[i]) + " ";
+                       }
+               }
+       } else {
+               QStringList positionStringList;
+               for (int i = 0; !AXIS[i].isEmpty(); i++) {
+                       positionStringList << QString::number(positionList.at(i));
+               }
+               str += positionStringList.join(",") + " ";
+       }
+       str += leftJustification_ ? "Left " : "Right ";
+
+       str += isReverse_ ? "" : "no";
+       str += "reverse ";
+
+       str += enhances_ ? "" : "no";
+       str += "enhanced ";
+
+       str += "box linetype " + QString::number(lineType_)
+               + " linewidth " + QString::number(lineWidth_) + " ";
+
+       str += "samplen " + QString::number(sampleLength_) + " "
+               + "spacing " + QString::number(verticalSpacing_) + " "
+               + "width " + QString::number(widthIncrement_) + " "
+               + "height " + QString::number(heightIncrement_) + " ";
+
+       str += isAutoTitles_ ? "" : "no";
+       str += "autotitles";
+
+       return str;
+}
diff --git a/src/opt/Key.h b/src/opt/Key.h
new file mode 100644 (file)
index 0000000..8ba4c89
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef KEY_INCLUDED
+#define KEY_INCLUDED
+
+#include "Option.h"
+
+#include <QtCore/QList>
+#include <QtCore/QString>
+
+//! set key コマンド
+class Key : public Option
+{
+       public:
+               Key();
+
+               void setOn(bool on);
+               bool isOn() const;
+
+               void setPosition(int pos);
+               int position() const;
+
+               void setPosition(int axis, double pos);
+               double position(int axis) const;
+
+               void setLeftJustification(bool leftJustify);
+               bool leftJustification() const;
+
+               void setReverse(bool reverse);
+               bool isReverse() const;
+
+               void setSampleLength(double length);
+               double sampleLength() const;
+
+               void setVerticalSpacing(double spacing);
+               double verticalSpacing() const;
+
+               void setWidthIncrement(double incr);
+               double widthIncrement() const;
+
+               void setHeightIncrement(double incr);
+               double heightIncrement() const;
+
+               void setAutoTitles(bool autoTitles);
+               bool isAutoTitles() const;
+
+               void setTitle(const QString &text);
+               const QString &title() const;
+
+               void setEnhanced(bool enhanced);
+               bool enhances() const;
+
+               void setBox(bool box);
+               bool isBox() const;
+
+               void setLineType(int lt);
+               int lineType() const;
+
+               void setLineWidth(double lw);
+               double lineWidth() const;
+
+               QString command() const;
+
+               //! 軸
+               static const QString AXIS[];
+               //! 凡例の位置
+               static const char * const POSITION[];
+
+       private:
+               static const int DEFAULT_LINE_TYPE = -2;
+
+               bool isOn_;
+               // left = 0x01, right = 0x02, top = 0x04,
+               // bottom = 0x08, outside = 0x10, below = 0x20
+               // x, y, z -> 0
+               int position_;
+               QList<double> positionList;
+               bool leftJustification_;
+               bool isReverse_;
+               double sampleLength_;
+               double verticalSpacing_;
+               double widthIncrement_;
+               double heightIncrement_;
+               bool isAutoTitles_;
+               QString title_;
+               bool enhances_;
+               int lineType_;
+               double lineWidth_;
+};
+#endif // KEY_INCLUDED
diff --git a/src/opt/LogScale.cpp b/src/opt/LogScale.cpp
new file mode 100644 (file)
index 0000000..086fe91
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "LogScale.h"
+
+#include <QtCore/QStringList>
+
+const double LogScale::DEFAULT_BASE = 10.0;
+
+const QString LogScale::AXIS[] = {
+       "x", "y", "z", "x2", "y2", "cb", ""
+};
+
+LogScale::LogScale()
+{
+       for (int i = 0; !AXIS[i].isEmpty(); i++) {
+               flagList.append(false);
+               baseList.append(QString::number(DEFAULT_BASE));
+       }
+}
+
+void LogScale::setLogScale(int axis, bool flag)
+{
+       flagList[axis] = flag;
+}
+
+bool LogScale::isLogScale(int axis) const
+{
+       return flagList.at(axis);
+}
+
+void LogScale::setBase(int axis, const QString &base)
+{
+       baseList[axis] = base;
+}
+
+const QString &LogScale::base(int axis) const
+{
+       return baseList.at(axis);
+}
+
+QString LogScale::command() const
+{
+       QStringList commandList = QStringList() << "unset logscale";
+       for (int i = 0; !AXIS[i].isEmpty(); i++) {
+               QString str;
+               if (flagList.at(i)) {
+                       str += "set logscale " + AXIS[i];
+                       if (baseList.at(i) != QString::number(DEFAULT_BASE)) {
+                               str += " " + baseList.at(i);
+                       }
+                       commandList << str;
+               }
+       }
+       return commandList.join("\n");
+}
diff --git a/src/opt/LogScale.h b/src/opt/LogScale.h
new file mode 100644 (file)
index 0000000..fe7f4b9
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef LOG_SCALE_INCLUDED
+#define LOG_SCALE_INCLUDED
+
+#include "Option.h"
+
+#include <QtCore/QList>
+#include <QtCore/QString>
+
+//! set logscale コマンド
+class LogScale : public Option
+{
+       public:
+               LogScale();
+
+               void setLogScale(int axis, bool flag);
+               bool isLogScale(int axis) const;
+
+               void setBase(int axis, const QString &base);
+               const QString &base(int axis) const;
+
+               QString command() const;
+
+               //! 軸
+               static const QString AXIS[];
+       private:
+               static const double DEFAULT_BASE;
+               QList<bool> flagList;
+               QList<QString> baseList;
+};
+#endif // LOG_SCALE_INCLUDED
diff --git a/src/opt/MAxisTics.cpp b/src/opt/MAxisTics.cpp
new file mode 100644 (file)
index 0000000..bde40b9
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "MAxisTics.h"
+
+#include <QtCore/QStringList>
+
+const QString MAxisTics::AXIS[] = {
+       "x", "y", "z", "x2", "y2", "cb", ""
+};
+
+MAxisTics::MAxisTics()
+{
+       for (int i = 0; !AXIS[i].isEmpty(); i++) {
+               defaultList.append(true);
+               freqList.append("");
+       }
+}
+
+void MAxisTics::setDefault(int axis, bool flag)
+{
+       defaultList[axis] = flag;
+}
+
+bool MAxisTics::isDefault(int axis) const
+{
+       return defaultList.at(axis);
+}
+
+void MAxisTics::setFrequency(int axis, const QString &freq)
+{
+       freqList[axis] = freq;
+}
+
+const QString &MAxisTics::frequency(int axis) const
+{
+       return freqList.at(axis);
+}
+
+QString MAxisTics::command() const
+{
+       QStringList commandList;
+       for (int i = 0; !AXIS[i].isEmpty(); i++) {
+               QString str = "set m" + AXIS[i] + "tics ";
+               if (defaultList.at(i)) {
+                       str += "default";
+               } else {
+                       str += freqList.at(i);
+               }
+               commandList << str;
+       }
+       return commandList.join("\n");
+}
diff --git a/src/opt/MAxisTics.h b/src/opt/MAxisTics.h
new file mode 100644 (file)
index 0000000..55fd386
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef M_AXIS_TICS_INCLUDED
+#define M_AXIS_TICS_INCLUDED
+
+#include "Option.h"
+
+#include <QtCore/QList>
+#include <QtCore/QString>
+
+//! set m{axis}tics コマンド
+class MAxisTics : public Option
+{
+       public:
+               MAxisTics();
+
+               void setDefault(int axis, bool flag);
+               bool isDefault(int axis) const;
+
+               void setFrequency(int axis, const QString &freq);
+               const QString &frequency(int axis) const;
+
+               QString command() const;
+
+               //! 軸
+               static const QString AXIS[];
+       private:
+               QList<bool> defaultList;
+               QList<QString> freqList;
+};
+#endif // M_AXIS_TICS_INCLUDED
diff --git a/src/opt/Mapping.cpp b/src/opt/Mapping.cpp
new file mode 100644 (file)
index 0000000..230af74
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "Mapping.h"
+
+const char * const Mapping::COORDINATE[] = {
+       QT_TRANSLATE_NOOP("Mapping", "cartesian"),
+       QT_TRANSLATE_NOOP("Mapping", "spherical"),
+       QT_TRANSLATE_NOOP("Mapping", "cylindrical"),
+       ""
+};
+
+Mapping::Mapping() : coordinate_(0)
+{
+}
+
+void Mapping::setCoordinate(int coord)
+{
+       coordinate_ = coord;
+}
+
+int Mapping::coordinate() const
+{
+       return coordinate_;
+}
+
+QString Mapping::command() const
+{
+       return "set mapping " + QString(COORDINATE[coordinate_]);
+}
diff --git a/src/opt/Mapping.h b/src/opt/Mapping.h
new file mode 100644 (file)
index 0000000..b01b2e4
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef MAPPING_INCLUDED
+#define MAPPING_INCLUDED
+
+#include "Option.h"
+
+#include <QtCore/QString>
+
+//! set mapping コマンド
+class Mapping : public Option
+{
+       public:
+               Mapping();
+
+               void setCoordinate(int coord);
+               int coordinate() const;
+
+               QString command() const;
+
+               //! 座標系
+               static const char * const COORDINATE[];
+
+       private:
+               int coordinate_;
+};
+#endif // MAPPING_INCLUDED
diff --git a/src/opt/Option.cpp b/src/opt/Option.cpp
new file mode 100644 (file)
index 0000000..0369755
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "Option.h"
+
+Option::Option()
+{
+}
+
+Option::~Option()
+{
+}
diff --git a/src/opt/Option.h b/src/opt/Option.h
new file mode 100644 (file)
index 0000000..6a6b0d9
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef OPTION_INCLUDED
+#define OPTION_INCLUDED
+
+class QString;
+
+//! set コマンド
+class Option
+{
+       public:
+               Option();
+               virtual ~Option();
+
+               //! コマンドを生成して返す
+               /*!
+                * \return set コマンド文字列
+                */
+               virtual QString command() const = 0;
+};
+#endif // OPTION_INCLUDED
diff --git a/src/opt/Output.cpp b/src/opt/Output.cpp
new file mode 100644 (file)
index 0000000..1b74314
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "Output.h"
+
+Output::Output()
+{
+}
+
+void Output::setFileName(const QString &name)
+{
+       fileName_ = name;
+}
+
+const QString &Output::fileName() const
+{
+       return fileName_;
+}
+
+QString Output::command() const
+{
+       QString str = "set output ";
+       if (!fileName_.isEmpty()) {
+               str += "\"" + fileName_ + "\"";
+       }
+       return str;
+}
diff --git a/src/opt/Output.h b/src/opt/Output.h
new file mode 100644 (file)
index 0000000..b0594c2
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef OUTPUT_INCLUDED
+#define OUTPUT_INCLUDED
+
+#include "Option.h"
+
+#include <QtCore/QString>
+
+//! set output コマンド
+class Output : public Option
+{
+       public:
+               Output();
+
+               void setFileName(const QString &name);
+               const QString &fileName() const;
+
+               QString command() const;
+       private:
+               QString fileName_;
+};
+#endif // OUTPUT_INCLUDED
diff --git a/src/opt/Parametric.cpp b/src/opt/Parametric.cpp
new file mode 100644 (file)
index 0000000..7c5c984
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "Parametric.h"
+
+Parametric::Parametric() : isParametric_(false)
+{
+}
+
+void Parametric::setParametric(bool parametric)
+{
+       isParametric_ = parametric;
+}
+
+bool Parametric::isParametric() const
+{
+       return isParametric_;
+}
+
+QString Parametric::command() const
+{
+       QString str;
+       if (!isParametric_) {
+               str += "un";
+       }
+       return str + "set parametric";
+}
diff --git a/src/opt/Parametric.h b/src/opt/Parametric.h
new file mode 100644 (file)
index 0000000..b116049
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef PARAMETRIC_INCLUDED
+#define PARAMETRIC_INCLUDED
+
+#include "Option.h"
+
+#include <QtCore/QString>
+
+//! set parametric コマンド
+class Parametric : public Option
+{
+       public:
+               Parametric();
+
+               void setParametric(bool parametric);
+               bool isParametric() const;
+
+               QString command() const;
+
+       private:
+               bool isParametric_;
+};
+#endif // PARAMETRIC_INCLUDED
diff --git a/src/opt/Samples.cpp b/src/opt/Samples.cpp
new file mode 100644 (file)
index 0000000..207148b
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "Samples.h"
+
+#include <QtCore/QString>
+
+Samples::Samples() : samples1_(100), samples2_(100)
+{
+}
+
+void Samples::setSamples1(int num)
+{
+       samples1_ = num;
+}
+
+int Samples::samples1() const
+{
+       return samples1_;
+}
+
+void Samples::setSamples2(int num)
+{
+       samples2_ = num;
+}
+
+int Samples::samples2() const
+{
+       return samples2_;
+}
+
+QString Samples::command() const
+{
+       return "set samples " + QString::number(samples1_) + "," 
+               + QString::number(samples2_);
+}
diff --git a/src/opt/Samples.h b/src/opt/Samples.h
new file mode 100644 (file)
index 0000000..9bd0bc2
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef SAMPLES_INCLUDED
+#define SAMPLES_INCLUDED
+
+#include "Option.h"
+
+//! set samples コマンド
+class Samples : public Option
+{
+       public:
+               Samples();
+
+               void setSamples1(int num);
+               int samples1() const;
+
+               void setSamples2(int num);
+               int samples2() const;
+
+               QString command() const;
+
+       private:
+               int samples1_;
+               int samples2_;
+};
+#endif // SAMPLES_INCLUDED
diff --git a/src/opt/Size.cpp b/src/opt/Size.cpp
new file mode 100644 (file)
index 0000000..7496109
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "Size.h"
+
+#include <QtCore/QString>
+
+Size::Size() : ratio_(0.0), xScale_(1.0), yScale_(1.0)
+{
+}
+
+void Size::setSquare(bool square)
+{
+       ratio_ = square ? 1.0 : 0.0;
+}
+
+bool Size::isSquare() const
+{
+       return ratio_ == 1.0;
+}
+
+void Size::setRatio(double r)
+{
+       ratio_ = r;
+}
+
+double Size::ratio() const
+{
+       return ratio_;
+}
+
+void Size::setXScale(double x)
+{
+       xScale_ = x;
+}
+
+double Size::xScale() const
+{
+       return xScale_;
+}
+
+void Size::setYScale(double y)
+{
+       yScale_ = y;
+}
+
+double Size::yScale() const
+{
+       return yScale_;
+}
+
+void Size::setNoRatio(bool no)
+{
+       if (no) {
+               ratio_ = 0.0;
+       }
+}
+
+bool Size::isNoRatio() const
+{
+       return ratio_ == 0.0;
+}
+
+QString Size::command() const
+{
+       return "set size ratio " + QString::number(ratio_)
+               + " " + QString::number(xScale_) 
+               + "," + QString::number(yScale_);
+}
diff --git a/src/opt/Size.h b/src/opt/Size.h
new file mode 100644 (file)
index 0000000..6351988
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef SIZE_INCLUDED
+#define SIZE_INCLUDED
+
+#include "Option.h"
+
+class QString;
+
+//! set size コマンド
+class Size : public Option
+{
+       public:
+               Size();
+
+               void setSquare(bool square);
+               bool isSquare() const;
+
+               void setRatio(double r);
+               double ratio() const;
+
+               void setXScale(double x);
+               double xScale() const;
+
+               void setYScale(double y);
+               double yScale() const;
+
+               void setNoRatio(bool no);
+               bool isNoRatio() const;
+
+               QString command() const;
+
+       private:
+               double ratio_;
+               double xScale_;
+               double yScale_;
+};
+#endif // SIZE_INCLUDED
diff --git a/src/opt/Terminal.cpp b/src/opt/Terminal.cpp
new file mode 100644 (file)
index 0000000..f552600
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "Terminal.h"
+
+#include <cstdlib> // getenv()
+
+Terminal::Terminal() : status(TERMINAL)
+{
+       char *gnuTerm = std::getenv("GNUTERM");
+       if (gnuTerm) {
+               terminalType_ = gnuTerm;
+       } else {
+#if defined(Q_OS_DARWIN)
+               terminalType_ = "aqua";
+#elif defined(Q_OS_UNIX)
+               terminalType_ = "x11";
+#elif defined(Q_OS_WIN32)
+               terminalType_ = "windows";
+#elif
+               terminalType_ = "unknown";
+#endif
+       }
+}
+
+void Terminal::setTerminalType(const QString &type)
+{
+       terminalType_ = type;
+       status = TERMINAL;
+}
+
+const QString &Terminal::terminalType() const
+{
+       return terminalType_;
+}
+
+void Terminal::setPush()
+{
+       status = PUSH;
+}
+
+void Terminal::setPop()
+{
+       status = POP;
+}
+
+QString Terminal::terminalOption() const
+{
+       return "";
+}
+
+QString Terminal::command() const
+{
+       QString str = "set terminal ";
+       switch (status) {
+       case TERMINAL:
+               str += terminalType_ + " " + terminalOption();
+               break;
+       case PUSH:
+               str += "push";
+               break;
+       case POP:
+               str += "pop";
+               break;
+       }
+
+       return str;
+}
diff --git a/src/opt/Terminal.h b/src/opt/Terminal.h
new file mode 100644 (file)
index 0000000..c00cabc
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef TERMINAL_INCLUDED
+#define TERMINAL_INCLUDED
+
+#include "Option.h"
+
+#include <QtCore/QString>
+
+//! set terminal コマンド
+class Terminal : public Option
+{
+       public:
+               Terminal();
+
+               void setTerminalType(const QString &type);
+               const QString &terminalType() const;
+
+               void setPush();
+               void setPop();
+
+               QString command() const;
+       protected:
+               QString terminalType_;
+               virtual QString terminalOption() const;
+       private:
+               static const int TERMINAL = 0;
+               static const int PUSH = 1;
+               static const int POP = 2;
+               int status;
+};
+#endif // TERMINAL_INCLUDED
diff --git a/src/opt/Title.cpp b/src/opt/Title.cpp
new file mode 100644 (file)
index 0000000..239571d
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "Title.h"
+
+#include <QtCore/QStringList>
+
+const double Title::DEFAULT_FONT_SIZE = 0;
+
+Title::Title() : xOffset_(0.000000), yOffset_(0.000000), 
+       fontSize_(DEFAULT_FONT_SIZE), lineType_(DEFAULT_LINE_TYPE)
+{
+}
+
+void Title::setTitleText(const QString &text)
+{
+       titleText_ = text;
+}
+
+const QString &Title::titleText() const
+{
+       return titleText_;
+}
+
+void Title::setXOffset(double xoff)
+{
+       xOffset_ = xoff;
+}
+
+double Title::xOffset() const
+{
+       return xOffset_;
+}
+
+void Title::setYOffset(double yoff)
+{
+       yOffset_ = yoff;
+}
+
+double Title::yOffset() const
+{
+       return yOffset_;
+}
+
+void Title::setFontName(const QString &name)
+{
+       fontName_ = name;
+}
+
+const QString &Title::fontName() const
+{
+       return fontName_;
+}
+
+void Title::setFontSize(double size)
+{
+       fontSize_ = size;
+}
+
+double Title::fontSize() const
+{
+       return fontSize_;
+}
+
+void Title::setLineType(int lt)
+{
+       lineType_ = lt;
+}
+
+int Title::lineType() const
+{
+       return lineType_;
+}
+
+QString Title::command() const
+{
+       QString str = "set title";
+       str += " \"" + titleText_
+               + "\" " + QString::number(xOffset_) + "," 
+               + QString::number(yOffset_) + " font \"" 
+               + fontName_;
+       if (fontSize_ != DEFAULT_FONT_SIZE) {
+               str += "," + QString::number(fontSize_);
+       }
+       str += "\"";
+       if (lineType_ != DEFAULT_LINE_TYPE) {
+               str += " textcolor lt " 
+                       + QString::number(lineType_);
+       }
+       return str;
+}
diff --git a/src/opt/Title.h b/src/opt/Title.h
new file mode 100644 (file)
index 0000000..38b92ef
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef TITLE_INCLUDED
+#define TITLE_INCLUDED
+
+#include "Option.h"
+
+#include <QtCore/QString>
+
+//! set title コマンド
+class Title : public Option
+{
+       public:
+               Title();
+
+               void setTitleText(const QString &text);
+               const QString &titleText() const;
+
+               void setXOffset(double xoff);
+               double xOffset() const;
+
+               void setYOffset(double yoff);
+               double yOffset() const;
+
+               void setFontName(const QString &name);
+               const QString &fontName() const;
+
+               void setFontSize(double size);
+               double fontSize() const;
+
+               void setLineType(int lt);
+               int lineType() const;
+
+               QString command() const;
+
+       private:
+               static const double DEFAULT_FONT_SIZE;
+               static const int DEFAULT_LINE_TYPE = 0;
+               QString titleText_;
+               double xOffset_;
+               double yOffset_;
+               QString fontName_;
+               double fontSize_;
+               int lineType_;
+};
+#endif // TITLE_INCLUDED
diff --git a/src/opt/View.cpp b/src/opt/View.cpp
new file mode 100644 (file)
index 0000000..8338aa5
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "View.h"
+
+#include <QtCore/QString>
+
+View::View() : isMap_(false), rotX(60), rotZ(30), scale(1), scaleZ(1)
+{
+}
+
+void View::setMap(bool map)
+{
+       isMap_ = map;
+}
+
+bool View::isMap() const
+{
+       return isMap_;
+}
+
+void View::setRotationX(double x)
+{
+       rotX = x;
+}
+
+double View::rotationX() const
+{
+       return rotX;
+}
+
+void View::setRotationZ(double z)
+{
+       rotZ = z;
+}
+
+double View::rotationZ() const
+{
+       return rotZ;
+}
+
+void View::setScaling(double s)
+{
+       scale = s;
+}
+
+double View::scaling() const
+{
+       return scale;
+}
+
+void View::setScalingZ(double sZ)
+{
+       scaleZ = sZ;
+}
+
+double View::scalingZ() const
+{
+       return scaleZ;
+}
+
+QString View::command() const
+{
+       QString str = "set view ";
+       if (isMap_) {
+               return str + "map";
+       }
+       return str + QString::number(rotX) + "," + QString::number(rotZ)
+               + "," + QString::number(scale) + "," + QString::number(scaleZ);
+}
diff --git a/src/opt/View.h b/src/opt/View.h
new file mode 100644 (file)
index 0000000..e657664
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef VIEW_INCLUDED
+#define VIEW_INCLUDED
+
+#include "Option.h"
+
+//! set view コマンド
+class View : public Option
+{
+       public:
+               View();
+
+               void setMap(bool map);
+               bool isMap() const;
+
+               void setRotationX(double x);
+               double rotationX() const;
+
+               void setRotationZ(double z);
+               double rotationZ() const;
+
+               void setScaling(double s);
+               double scaling() const;
+
+               void setScalingZ(double sZ);
+               double scalingZ() const;
+
+               QString command() const;
+
+       private:
+               bool isMap_;
+               double rotX;
+               double rotZ;
+               double scale;
+               double scaleZ;
+};
+#endif // VIEW_INCLUDED
diff --git a/src/opt/terminal/TerminalLatexEmtex.cpp b/src/opt/terminal/TerminalLatexEmtex.cpp
new file mode 100644 (file)
index 0000000..498f07f
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "TerminalLatexEmtex.h"
+
+const char * const TerminalLatexEmtex::FONT_NAME[] = {
+       "courier", "roman", 
+       QT_TRANSLATE_NOOP("TerminalLatexEmtex", "default"),
+       ""
+};
+
+const int TerminalLatexEmtex::DEFAULT_FONT_SIZE = 10;
+
+TerminalLatexEmtex::TerminalLatexEmtex() : isLatex_(true), fontName_(2),
+       fontSize_(DEFAULT_FONT_SIZE)
+{
+       terminalType_ = "latex";
+}
+
+void TerminalLatexEmtex::setLatex(bool latex)
+{
+       isLatex_ = latex;
+       terminalType_ = isLatex_ ? "latex" : "emtex";
+}
+
+bool TerminalLatexEmtex::isLatex() const
+{
+       return isLatex_;
+}
+
+void TerminalLatexEmtex::setFontName(int name)
+{
+       fontName_ = name;
+}
+
+int TerminalLatexEmtex::fontName() const
+{
+       return fontName_;
+}
+
+void TerminalLatexEmtex::setFontSize(int size)
+{
+       fontSize_ = size;
+}
+
+int TerminalLatexEmtex::fontSize() const
+{
+       return fontSize_;
+}
+
+QString TerminalLatexEmtex::terminalOption() const
+{
+       if (fontName_ != 2) {
+               return QString(FONT_NAME[fontName_]) + " " 
+                       + QString::number(fontSize_);
+       }
+       return "";
+}
diff --git a/src/opt/terminal/TerminalLatexEmtex.h b/src/opt/terminal/TerminalLatexEmtex.h
new file mode 100644 (file)
index 0000000..16a230e
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef TERMINAL_LATEX_EMTEX_INCLUDED
+#define TERMINAL_LATEX_EMTEX_INCLUDED
+
+#include "Terminal.h"
+
+#include <QtCore/QString>
+
+//! set terminal latex | emtex コマンド
+class TerminalLatexEmtex : public Terminal
+{
+       public:
+               TerminalLatexEmtex();
+
+               void setLatex(bool latex);
+               bool isLatex() const;
+
+               void setFontName(int name);
+               int fontName() const;
+
+               void setFontSize(int size);
+               int fontSize() const;
+
+               //! フォント名
+               static const char * const FONT_NAME[];
+
+       private:
+               QString terminalOption() const;
+               static const int DEFAULT_FONT_SIZE;
+               bool isLatex_;
+               // default = 0x00, courier = 0x01, roman = 0x02
+               int fontName_;
+               int fontSize_;
+};
+#endif // TERMINAL_LATEX_EMTEX_INCLUDED
diff --git a/src/opt/terminal/TerminalPbm.cpp b/src/opt/terminal/TerminalPbm.cpp
new file mode 100644 (file)
index 0000000..425ed2e
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "TerminalPbm.h"
+
+const char * const TerminalPbm::FONT_SIZE[] = {
+       QT_TRANSLATE_NOOP("TerminalPbm", "small"),
+       QT_TRANSLATE_NOOP("TerminalPbm", "medium"),
+       QT_TRANSLATE_NOOP("TerminalPbm", "large"),
+       ""
+};
+
+const char * const TerminalPbm::MODE[] = {
+       QT_TRANSLATE_NOOP("TerminalPbm", "monochrome"),
+       QT_TRANSLATE_NOOP("TerminalPbm", "gray"),
+       QT_TRANSLATE_NOOP("TerminalPbm", "color"),
+       ""
+};
+
+TerminalPbm::TerminalPbm() : fontSize_(0), mode_(0)
+{
+       terminalType_ = "pbm";
+}
+
+void TerminalPbm::setFontSize(int size)
+{
+       fontSize_ = size;
+}
+
+int TerminalPbm::fontSize() const
+{
+       return fontSize_;
+}
+
+void TerminalPbm::setMode(int mode)
+{
+       mode_ = mode;
+}
+
+int TerminalPbm::mode() const
+{
+       return mode_;
+}
+
+QString TerminalPbm::terminalOption() const
+{
+       return QString(FONT_SIZE[fontSize_]) + " " + QString(MODE[mode_]);
+}
diff --git a/src/opt/terminal/TerminalPbm.h b/src/opt/terminal/TerminalPbm.h
new file mode 100644 (file)
index 0000000..c6c1ec5
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef TERMINAL_PBM_INCLUDED
+#define TERMINAL_PBM_INCLUDED
+
+#include "Terminal.h"
+
+class QString;
+
+//! set terminal pbm コマンド
+class TerminalPbm : public Terminal
+{
+       public:
+               TerminalPbm();
+
+               void setFontSize(int size);
+               int fontSize() const;
+
+               void setMode(int mode);
+               int mode() const;
+
+               //! フォントのサイズ
+               static const char * const FONT_SIZE[];
+               //! モード(色)
+               static const char * const MODE[];
+
+       private:
+               QString terminalOption() const;
+               int fontSize_;
+               int mode_;
+};
+#endif // TERMINAL_PBM_INCLUDED
diff --git a/src/opt/terminal/TerminalPostScript.cpp b/src/opt/terminal/TerminalPostScript.cpp
new file mode 100644 (file)
index 0000000..8cb5018
--- /dev/null
@@ -0,0 +1,213 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#include "TerminalPostScript.h"
+
+const char * const TerminalPostScript::MODE[] = {
+       QT_TRANSLATE_NOOP("TerminalPostScript", "landscape"),
+       QT_TRANSLATE_NOOP("TerminalPostScript", "portrait"),
+       "eps",
+       ""
+};
+
+const char * const TerminalPostScript::COLOR[] = {
+       QT_TRANSLATE_NOOP("TerminalPostScript", "color"),
+       QT_TRANSLATE_NOOP("TerminalPostScript", "monochrome"),
+       ""
+};
+
+const char * const TerminalPostScript::LINE_STYLE[] = {
+       QT_TRANSLATE_NOOP("TerminalPostScript", "solid"),
+       QT_TRANSLATE_NOOP("TerminalPostScript", "dashed"),
+       ""
+};
+
+TerminalPostScript::TerminalPostScript() : mode_(0), enhances_(false), 
+       isColor_(false), isBlackText_(true), isSolid_(false),
+       dashLength_(1.0), lineWidth_(1.0), duplexing_(0), rounds_(false),
+       samples_(2000), maxDeviation_(0.003), fontName_("Helvetica"),
+       fontSize_(14)
+{
+       terminalType_ = "postscript";
+}
+
+void TerminalPostScript::setMode(int mode)
+{
+       mode_ = mode;
+}
+
+int TerminalPostScript::mode() const
+{
+       return mode_;
+}
+
+void TerminalPostScript::setEnhanced(bool enhanced)
+{
+       enhances_ = enhanced;
+}
+
+bool TerminalPostScript::enhances() const
+{
+       return enhances_;
+}
+
+void TerminalPostScript::setColor(bool color)
+{
+       isColor_ = color;
+}
+
+bool TerminalPostScript::isColor() const
+{
+       return isColor_;
+}
+
+void TerminalPostScript::setBlackText(bool black)
+{
+       isBlackText_ = black;
+}
+
+bool TerminalPostScript::isBlackText() const
+{
+       return isBlackText_;
+}
+
+void TerminalPostScript::setSolid(bool solid)
+{
+       isSolid_ = solid;
+}
+
+bool TerminalPostScript::isSolid() const
+{
+       return isSolid_;
+}
+
+void TerminalPostScript::setDashLength(double dl)
+{
+       dashLength_ = dl;
+}
+
+double TerminalPostScript::dashLength() const
+{
+       return dashLength_;
+}
+
+void TerminalPostScript::setLineWidth(double lw)
+{
+       lineWidth_ = lw;
+}
+
+double TerminalPostScript::lineWidth() const
+{
+       return lineWidth_;
+}
+
+void TerminalPostScript::setDuplexing(int duplex)
+{
+       duplexing_ = duplex;
+}
+
+int TerminalPostScript::duplexing() const
+{
+       return duplexing_;
+}
+
+void TerminalPostScript::setRounded(bool round)
+{
+       rounds_ = round;
+}
+
+bool TerminalPostScript::rounds() const
+{
+       return rounds_;
+}
+
+void TerminalPostScript::setFontFile(const QString &fileName, bool add)
+{
+       if (add) {
+               if (fontFileList.contains(fileName)) {
+                       fontFileList << fileName;
+               }
+       } else {
+               fontFileList.removeAll(fileName);
+       }
+}
+
+const QStringList &TerminalPostScript::fontFile() const
+{
+       return fontFileList;
+}
+
+void TerminalPostScript::setPalFuncParam(int samples, double maxdeviation)
+{
+       samples_ = samples;
+       maxDeviation_ = maxdeviation;
+}
+
+int TerminalPostScript::samples() const
+{
+       return samples_;
+}
+
+double TerminalPostScript::maxDeviation() const
+{
+       return maxDeviation_;
+}
+
+void TerminalPostScript::setFontName(const QString &name)
+{
+       fontName_ = name;
+}
+
+const QString &TerminalPostScript::fontName() const
+{
+       return fontName_;
+}
+
+void TerminalPostScript::setFontSize(int size)
+{
+       fontSize_ = size;
+}
+
+int TerminalPostScript::fontSize() const
+{
+       return fontSize_;
+}
+
+QString TerminalPostScript::terminalOption() const
+{
+       const QString DUPLEXING[] 
+               = { "defaultplex", "simplex", "duplex" };
+       QString str = QString(MODE[mode_]) + " ";
+       str += enhances_ ? "" : "no";
+       str += "enhanced ";
+       str += COLOR[!isColor_];
+       str += " ";
+       str += isBlackText_ ? "blacktext" : "colortext";
+       str += " ";
+       str += LINE_STYLE[!isSolid_];
+       str += " dashlength " + 
+               QString::number(dashLength_)
+               + " linewidth " + QString::number(lineWidth_)
+               + " " + DUPLEXING[duplexing_] + " palfuncparam "
+               + QString::number(samples_) + "," 
+               + QString::number(maxDeviation_) + " ";
+       str += rounds_ ? "rounded" : "butt";
+       str += " \"" + fontName_ + "\" " 
+               + QString::number(fontSize_);
+       return str;
+}
diff --git a/src/opt/terminal/TerminalPostScript.h b/src/opt/terminal/TerminalPostScript.h
new file mode 100644 (file)
index 0000000..44c9af0
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * Cueplot: a GUI front-end to gnuplot
+ * Copyright (C) 2007 Muneyuki Noguchi
+ *
+ * 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 2
+ * 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, write to the Free Software Foundation, 
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+#ifndef TERMINAL_POST_SCRIPT_INCLUDED
+#define TERMINAL_POST_SCRIPT_INCLUDED
+
+#include "Terminal.h"
+
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+
+//! set terminal postscript コマンド
+class TerminalPostScript : public Terminal
+{
+       public:
+               TerminalPostScript();
+
+               void setMode(int mode);
+               int mode() const;
+
+               void setEnhanced (bool enhanced);
+               bool enhances() const;
+
+               void setColor(bool color);
+               bool isColor() const;
+
+               void setBlackText(bool black);
+               bool isBlackText() const;
+
+               void setSolid(bool solid);
+               bool isSolid() const;
+
+               void setDashLength(double dl);
+               double dashLength() const;
+
+               void setLineWidth(double lw);
+               double lineWidth() const;
+
+               void setDuplexing(int duplex);
+               int duplexing() const;
+
+               void setRounded(bool round);
+               bool rounds() const;
+
+               void setFontFile(const QString &fileName, bool add);
+               const QStringList &fontFile() const;
+
+               void setPalFuncParam(int samples, 
+                               double maxdeviation = 0.003);
+               int samples() const;
+               double maxDeviation() const;
+
+               void setFontName(const QString &name);
+               const QString &fontName() const;
+
+               void setFontSize(int size);
+               int fontSize() const;
+
+               //! モード
+               static const char * const MODE[];
+               //! 色の有無
+               static const char * const COLOR[];
+               //! 線の種類
+               static const char * const LINE_STYLE[];
+
+       private:
+               QString terminalOption() const;
+               int mode_;
+               bool enhances_;
+               bool isColor_;
+               bool isBlackText_;
+               bool isSolid_;
+               double dashLength_;
+               double lineWidth_;
+               int duplexing_;
+               bool rounds_;
+               QStringList fontFileList;
+               int samples_;
+               double maxDeviation_;
+               QString fontName_;
+               int fontSize_;
+};
+#endif // TERMINAL_POST_SCRIPT_INCLUDED
diff --git a/src/qt_ja_JP.qm b/src/qt_ja_JP.qm
new file mode 100644 (file)
index 0000000..feb0649
Binary files /dev/null and b/src/qt_ja_JP.qm differ
diff --git a/src/qt_ja_JP.ts b/src/qt_ja_JP.ts
new file mode 100644 (file)
index 0000000..7768035
--- /dev/null
@@ -0,0 +1,3865 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<!DOCTYPE TS><TS version="1.1" language="ja">\r
+<context>\r
+    <name>PPDOptionsModel</name>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="1511"/>\r
+        <source>Name</source>\r
+        <translation>名前</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="1513"/>\r
+        <source>Value</source>\r
+        <translation>値</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>Q3Accel</name>\r
+    <message>\r
+        <location filename="qt3support/other/q3accel.cpp" line="470"/>\r
+        <source>%1, %2 not defined</source>\r
+        <translation>%1, %2 は定義されていません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/other/q3accel.cpp" line="505"/>\r
+        <source>Ambiguous %1 not handled</source>\r
+        <translation>曖昧な %1 は扱えません</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>Q3DataTable</name>\r
+    <message>\r
+        <location filename="qt3support/sql/q3datatable.cpp" line="261"/>\r
+        <source>True</source>\r
+        <translation>True</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/sql/q3datatable.cpp" line="262"/>\r
+        <source>False</source>\r
+        <translation>False</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/sql/q3datatable.cpp" line="774"/>\r
+        <source>Insert</source>\r
+        <translation>挿入</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/sql/q3datatable.cpp" line="775"/>\r
+        <source>Update</source>\r
+        <translation>アップデート</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/sql/q3datatable.cpp" line="776"/>\r
+        <source>Delete</source>\r
+        <translation>削除</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>Q3FileDialog</name>\r
+    <message>\r
+        <location filename="" line="137028468"/>\r
+        <source>All Files (*.*)</source>\r
+        <translation>すべてのファイル(*.*)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="" line="137028468"/>\r
+        <source>Open </source>\r
+        <translation>開く</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="" line="137028468"/>\r
+        <source>Select a Directory</source>\r
+        <translation>ディレクトリを選択</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="839"/>\r
+        <source>Copy or Move a File</source>\r
+        <translation>ファイルをコピーまたは移動</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="847"/>\r
+        <source>Read: %1</source>\r
+        <translation>読み込み: %1</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="883"/>\r
+        <source>Write: %1</source>\r
+        <translation>書き込み: %1</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2475"/>\r
+        <source>Cancel</source>\r
+        <translation>キャンセル</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4558"/>\r
+        <source>All Files (*)</source>\r
+        <translation>すべてのファイル(*)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2431"/>\r
+        <source>Name</source>\r
+        <translation>名前</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2432"/>\r
+        <source>Size</source>\r
+        <translation>サイズ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2434"/>\r
+        <source>Type</source>\r
+        <translation>タイプ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2435"/>\r
+        <source>Date</source>\r
+        <translation>日付</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2436"/>\r
+        <source>Attributes</source>\r
+        <translation>属性</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4540"/>\r
+        <source>&amp;OK</source>\r
+        <translation>OK(&amp;O)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2511"/>\r
+        <source>Look &amp;in:</source>\r
+        <translation>検索する場所(&amp;I):</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4547"/>\r
+        <source>File &amp;name:</source>\r
+        <translation>ファイル名(&amp;N):</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2513"/>\r
+        <source>File &amp;type:</source>\r
+        <translation>ファイルタイプ(&amp;T):</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2520"/>\r
+        <source>Back</source>\r
+        <translation>戻る</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2527"/>\r
+        <source>One directory up</source>\r
+        <translation>1つ上のディレクトリへ移動</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2536"/>\r
+        <source>Create New Folder</source>\r
+        <translation>新しいフォルダの作成</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2554"/>\r
+        <source>List View</source>\r
+        <translation>一覧表示</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2562"/>\r
+        <source>Detail View</source>\r
+        <translation>詳細表示</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2571"/>\r
+        <source>Preview File Info</source>\r
+        <translation>ファイル情報のプレビュー</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2594"/>\r
+        <source>Preview File Contents</source>\r
+        <translation>ファイルの内容のプレビュー</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2682"/>\r
+        <source>Read-write</source>\r
+        <translation>読み込み/書き込み</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2683"/>\r
+        <source>Read-only</source>\r
+        <translation>読み込み専用</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2684"/>\r
+        <source>Write-only</source>\r
+        <translation>書き込み専用</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2685"/>\r
+        <source>Inaccessible</source>\r
+        <translation>アクセス不可</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2687"/>\r
+        <source>Symlink to File</source>\r
+        <translation>ファイルへのSymlink</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2688"/>\r
+        <source>Symlink to Directory</source>\r
+        <translation>ディレクトリへのSymlink</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2689"/>\r
+        <source>Symlink to Special</source>\r
+        <translation>スペシャルへのSymlink</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2690"/>\r
+        <source>File</source>\r
+        <translation>ファイル</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2691"/>\r
+        <source>Dir</source>\r
+        <translation>ディレクトリ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="2692"/>\r
+        <source>Special</source>\r
+        <translation>スペシャル</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="5574"/>\r
+        <source>Open</source>\r
+        <translation>開く</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="3536"/>\r
+        <source>Save As</source>\r
+        <translation>名前を付けて保存</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4546"/>\r
+        <source>&amp;Open</source>\r
+        <translation>開く(&amp;O)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4530"/>\r
+        <source>&amp;Save</source>\r
+        <translation>保存(&amp;S)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4188"/>\r
+        <source>&amp;Rename</source>\r
+        <translation>名前の変更(&amp;R)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4189"/>\r
+        <source>&amp;Delete</source>\r
+        <translation>削除(&amp;D)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4209"/>\r
+        <source>R&amp;eload</source>\r
+        <translation>リロード(&amp;E)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4213"/>\r
+        <source>Sort by &amp;Name</source>\r
+        <translation>名前順にソート(&amp;N)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4215"/>\r
+        <source>Sort by &amp;Size</source>\r
+        <translation>サイズ順にソート(&amp;S)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4216"/>\r
+        <source>Sort by &amp;Date</source>\r
+        <translation>日付順にソート(&amp;D)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4218"/>\r
+        <source>&amp;Unsorted</source>\r
+        <translation>ソート解除(&amp;U)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4233"/>\r
+        <source>Sort</source>\r
+        <translation>ソート</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4237"/>\r
+        <source>Show &amp;hidden files</source>\r
+        <translation>隠しファイルの表示(&amp;H)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4268"/>\r
+        <source>the file</source>\r
+        <translation>ファイル</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4270"/>\r
+        <source>the directory</source>\r
+        <translation>ディレクトリ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4272"/>\r
+        <source>the symlink</source>\r
+        <translation>Symlink</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4275"/>\r
+        <source>Delete %1</source>\r
+        <translation>%1 の削除</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4277"/>\r
+        <source>&lt;qt&gt;Are you sure you wish to delete %1 &quot;%2&quot;?&lt;/qt&gt;</source>\r
+        <translation>&lt;qt&gt;%1「%2」を削除しますか?&lt;/qt&gt;</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4278"/>\r
+        <source>&amp;Yes</source>\r
+        <translation>はい(&amp;Y)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4278"/>\r
+        <source>&amp;No</source>\r
+        <translation>いいえ(&amp;N)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4314"/>\r
+        <source>New Folder 1</source>\r
+        <translation>新しいフォルダ1</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4319"/>\r
+        <source>New Folder</source>\r
+        <translation>新しいフォルダ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4324"/>\r
+        <source>New Folder %1</source>\r
+        <translation>新しいフォルダ %1</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4430"/>\r
+        <source>Find Directory</source>\r
+        <translation>ディレクトリの検索</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4543"/>\r
+        <source>Directories</source>\r
+        <translation>ディレクトリ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4541"/>\r
+        <source>Directory:</source>\r
+        <translation>ディレクトリ:</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="5731"/>\r
+        <source>Error</source>\r
+        <translation>エラー</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3filedialog.cpp" line="4582"/>\r
+        <source>%1\r
+File not found.\r
+Check path and filename.</source>\r
+        <translation>%1\r
+ファイルが見つかりませんでした。\r
+パスおよびファイル名を確認してください。</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>Q3LocalFs</name>\r
+    <message>\r
+        <location filename="qt3support/network/q3localfs.cpp" line="121"/>\r
+        <source>Could not read directory\r
+%1</source>\r
+        <translation>ディレクトリを読み込めませんでした\r
+%1</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3localfs.cpp" line="166"/>\r
+        <source>Could not create directory\r
+%1</source>\r
+        <translation>ディレクトリを作成できませんでした\r
+%1</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3localfs.cpp" line="200"/>\r
+        <source>Could not remove file or directory\r
+%1</source>\r
+        <translation>ファイルまたはディレクトリを削除できませんでした\r
+%1</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3localfs.cpp" line="227"/>\r
+        <source>Could not rename\r
+%1\r
+to\r
+%2</source>\r
+        <translation>名前を変更できませんでした\r
+%1\r
+へ\r
+%2</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3localfs.cpp" line="252"/>\r
+        <source>Could not open\r
+%1</source>\r
+        <translation>開けませんでした\r
+%1</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3localfs.cpp" line="320"/>\r
+        <source>Could not write\r
+%1</source>\r
+        <translation>書き込めませんでした\r
+%1</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>Q3MainWindow</name>\r
+    <message>\r
+        <location filename="qt3support/widgets/q3mainwindow.cpp" line="2052"/>\r
+        <source>Line up</source>\r
+        <translation>整列</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/widgets/q3mainwindow.cpp" line="2054"/>\r
+        <source>Customize...</source>\r
+        <translation>カスタマイズ...</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>Q3NetworkProtocol</name>\r
+    <message>\r
+        <location filename="qt3support/network/q3networkprotocol.cpp" line="835"/>\r
+        <source>Operation stopped by the user</source>\r
+        <translation>操作がユーザによって停止されました</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>Q3ProgressDialog</name>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3progressdialog.cpp" line="300"/>\r
+        <source>Cancel</source>\r
+        <translation>キャンセル</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>Q3TabDialog</name>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3tabdialog.cpp" line="981"/>\r
+        <source>OK</source>\r
+        <translation>OK</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3tabdialog.cpp" line="625"/>\r
+        <source>Apply</source>\r
+        <translation>適用</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3tabdialog.cpp" line="668"/>\r
+        <source>Help</source>\r
+        <translation>ヘルプ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3tabdialog.cpp" line="713"/>\r
+        <source>Defaults</source>\r
+        <translation>デフォルト</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3tabdialog.cpp" line="763"/>\r
+        <source>Cancel</source>\r
+        <translation>キャンセル</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>Q3TextEdit</name>\r
+    <message>\r
+        <location filename="qt3support/text/q3textedit.cpp" line="5432"/>\r
+        <source>&amp;Undo</source>\r
+        <translation>元に戻す(&amp;U)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/text/q3textedit.cpp" line="5433"/>\r
+        <source>&amp;Redo</source>\r
+        <translation>やり直す(&amp;R)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/text/q3textedit.cpp" line="5438"/>\r
+        <source>Cu&amp;t</source>\r
+        <translation>切り取り(&amp;T)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/text/q3textedit.cpp" line="5439"/>\r
+        <source>&amp;Copy</source>\r
+        <translation>コピー(&amp;C)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/text/q3textedit.cpp" line="5441"/>\r
+        <source>&amp;Paste</source>\r
+        <translation>貼り付け(&amp;P)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/text/q3textedit.cpp" line="5444"/>\r
+        <source>Clear</source>\r
+        <translation>消去</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/text/q3textedit.cpp" line="5450"/>\r
+        <source>Select All</source>\r
+        <translation>すべてを選択</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>Q3TitleBar</name>\r
+    <message>\r
+        <location filename="plugins/accessible/compat/q3complexwidgets.cpp" line="224"/>\r
+        <source>System</source>\r
+        <translation>システム</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/compat/q3complexwidgets.cpp" line="227"/>\r
+        <source>Restore up</source>\r
+        <translation>元に戻す</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/compat/q3complexwidgets.cpp" line="228"/>\r
+        <source>Minimize</source>\r
+        <translation>最小化</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/compat/q3complexwidgets.cpp" line="231"/>\r
+        <source>Restore down</source>\r
+        <translation>元に戻す</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/compat/q3complexwidgets.cpp" line="232"/>\r
+        <source>Maximize</source>\r
+        <translation>最大化</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/compat/q3complexwidgets.cpp" line="234"/>\r
+        <source>Close</source>\r
+        <translation>閉じる</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/compat/q3complexwidgets.cpp" line="252"/>\r
+        <source>Contains commands to manipulate the window</source>\r
+        <translation>ウィンドウを操作するコマンドを含みます</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/compat/q3complexwidgets.cpp" line="255"/>\r
+        <source>Puts a minimized back to normal</source>\r
+        <translation>最小化されたウィンドウを元のサイズに戻します</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/compat/q3complexwidgets.cpp" line="256"/>\r
+        <source>Moves the window out of the way</source>\r
+        <translation>ウィンドウを隠します</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/compat/q3complexwidgets.cpp" line="259"/>\r
+        <source>Puts a maximized window back to normal</source>\r
+        <translation>最大化されたウィンドウを元のサイズに戻します</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/compat/q3complexwidgets.cpp" line="260"/>\r
+        <source>Makes the window full screen</source>\r
+        <translation>ウィンドウをフルスクリーンにします</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/compat/q3complexwidgets.cpp" line="262"/>\r
+        <source>Closes the window</source>\r
+        <translation>ウィンドウを閉じます</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/compat/q3complexwidgets.cpp" line="264"/>\r
+        <source>Displays the name of the window and contains controls to manipulate it</source>\r
+        <translation>ウィンドウの名前を表示し、ウィンドウを操作するコントロールを含みます</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>Q3ToolBar</name>\r
+    <message>\r
+        <location filename="qt3support/widgets/q3toolbar.cpp" line="664"/>\r
+        <source>More...</source>\r
+        <translation>その他...</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>Q3UrlOperator</name>\r
+    <message>\r
+        <location filename="qt3support/network/q3urloperator.cpp" line="630"/>\r
+        <source>The protocol `%1&apos; is not supported</source>\r
+        <translation>プロトコル「%1」はサポートされていません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3urloperator.cpp" line="370"/>\r
+        <source>The protocol `%1&apos; does not support listing directories</source>\r
+        <translation>プロトコル「%1」ではディレクトリのリストをサポートしていません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3urloperator.cpp" line="373"/>\r
+        <source>The protocol `%1&apos; does not support creating new directories</source>\r
+        <translation>プロトコル「%1」では新しいディレクトリの作成をサポートしていません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3urloperator.cpp" line="376"/>\r
+        <source>The protocol `%1&apos; does not support removing files or directories</source>\r
+        <translation>プロトコル「%1」ではファイルまたはディレクトリの削除をサポートしていません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3urloperator.cpp" line="379"/>\r
+        <source>The protocol `%1&apos; does not support renaming files or directories</source>\r
+        <translation>プロトコル「%1」ではファイルまたはディレクトリの名前の変更をサポートしていません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3urloperator.cpp" line="382"/>\r
+        <source>The protocol `%1&apos; does not support getting files</source>\r
+        <translation>プロトコル「%1」ではファイルの取得をサポートしていません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3urloperator.cpp" line="385"/>\r
+        <source>The protocol `%1&apos; does not support putting files</source>\r
+        <translation>プロトコル「%1」ではファイルの送信をサポートしていません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3urloperator.cpp" line="632"/>\r
+        <source>The protocol `%1&apos; does not support copying or moving files or directories</source>\r
+        <translation>プロトコル「%1」ではファイルまたはディレクトリのコピーまたは移動をサポートしていません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3urloperator.cpp" line="887"/>\r
+        <source>(unknown)</source>\r
+        <translation>(不明)</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>Q3Wizard</name>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3wizard.cpp" line="153"/>\r
+        <source>&amp;Cancel</source>\r
+        <translation>キャンセル(&amp;C)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3wizard.cpp" line="154"/>\r
+        <source>&lt; &amp;Back</source>\r
+        <translation>&lt; 戻る(&amp;B)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3wizard.cpp" line="155"/>\r
+        <source>&amp;Next &gt;</source>\r
+        <translation>次へ(&amp;N) &gt;</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3wizard.cpp" line="156"/>\r
+        <source>&amp;Finish</source>\r
+        <translation>完了(&amp;F)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/dialogs/q3wizard.cpp" line="157"/>\r
+        <source>&amp;Help</source>\r
+        <translation>ヘルプ(&amp;H)</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QAbstractSocket</name>\r
+    <message>\r
+        <location filename="network/qabstractsocket.cpp" line="682"/>\r
+        <source>Host not found</source>\r
+        <translation>ホストが見つかりませんでした</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qabstractsocket.cpp" line="741"/>\r
+        <source>Connection refused</source>\r
+        <translation>接続が拒否されました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qabstractsocket.cpp" line="1378"/>\r
+        <source>Socket operation timed out</source>\r
+        <translation>ソケット操作がタイムアウトしました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qabstractsocket.cpp" line="1727"/>\r
+        <source>Socket is not connected</source>\r
+        <translation>ソケットが接続されていません</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QAbstractSpinBox</name>\r
+    <message>\r
+        <location filename="gui/widgets/qabstractspinbox.cpp" line="1121"/>\r
+        <source>&amp;Step up</source>\r
+        <translation>上(&amp;S)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qabstractspinbox.cpp" line="1123"/>\r
+        <source>Step &amp;down</source>\r
+        <translation>下(&amp;D)</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QApplication</name>\r
+    <message>\r
+        <location filename="gui/accessible/qaccessibleobject.cpp" line="354"/>\r
+        <source>Activate</source>\r
+        <translation>アクティブに</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/accessible/qaccessibleobject.cpp" line="356"/>\r
+        <source>Activates the program&apos;s main window</source>\r
+        <translation>メインウィンドウをアクティブにする</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qmessagebox.h" line="308"/>\r
+        <source>Executable &apos;%1&apos; requires Qt %2, found Qt %3.</source>\r
+        <translation>実行可能ファイル &apos;%1&apos; には Qt %2 が必要です。Qt %3 が見つかりました。</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qmessagebox.h" line="310"/>\r
+        <source>Incompatible Qt Library Error</source>\r
+        <translation>互換性のないQtライブラリエラー</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qapplication.cpp" line="1941"/>\r
+        <source>QT_LAYOUT_DIRECTION</source>\r
+        <comment>Translate this string to the string &apos;LTR&apos; in left-to-right languages or to &apos;RTL&apos; in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.</comment>\r
+        <translation>LTR</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QAxSelect</name>\r
+    <message>\r
+        <location filename="" line="137028468"/>\r
+        <source>Select ActiveX Control</source>\r
+        <translation>ActiveX Control を選択</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="" line="137028468"/>\r
+        <source>OK</source>\r
+        <translation>OK</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="" line="137028468"/>\r
+        <source>&amp;Cancel</source>\r
+        <translation>キャンセル(&amp;C)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="" line="137028468"/>\r
+        <source>COM &amp;Object:</source>\r
+        <translation>COM オブジェクト(&amp;O)</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QCheckBox</name>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/simplewidgets.cpp" line="85"/>\r
+        <source>Uncheck</source>\r
+        <translation>選択解除</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/simplewidgets.cpp" line="88"/>\r
+        <source>Check</source>\r
+        <translation>選択</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/simplewidgets.cpp" line="89"/>\r
+        <source>Toggle</source>\r
+        <translation>反転</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QColorDialog</name>\r
+    <message>\r
+        <location filename="gui/dialogs/qcolordialog.cpp" line="1044"/>\r
+        <source>Hu&amp;e:</source>\r
+        <translation>色相(&amp;E):</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qcolordialog.cpp" line="1053"/>\r
+        <source>&amp;Sat:</source>\r
+        <translation>彩度(&amp;S):</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qcolordialog.cpp" line="1062"/>\r
+        <source>&amp;Val:</source>\r
+        <translation>明度(&amp;V):</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qcolordialog.cpp" line="1071"/>\r
+        <source>&amp;Red:</source>\r
+        <translation>赤(&amp;R):</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qcolordialog.cpp" line="1080"/>\r
+        <source>&amp;Green:</source>\r
+        <translation>緑(&amp;G):</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qcolordialog.cpp" line="1089"/>\r
+        <source>Bl&amp;ue:</source>\r
+        <translation>青(&amp;U):</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qcolordialog.cpp" line="1098"/>\r
+        <source>A&amp;lpha channel:</source>\r
+        <translation>アルファチャネル(&amp;L):</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qcolordialog.cpp" line="1293"/>\r
+        <source>&amp;Basic colors</source>\r
+        <translation>基本的なカラー(&amp;B)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qcolordialog.cpp" line="1308"/>\r
+        <source>&amp;Custom colors</source>\r
+        <translation>カスタムカラー(&amp;C)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qcolordialog.cpp" line="1315"/>\r
+        <source>&amp;Define Custom Colors &gt;&gt;</source>\r
+        <translation>カスタムカラーの定義(&amp;D) &gt;&gt;</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qcolordialog.cpp" line="1364"/>\r
+        <source>OK</source>\r
+        <translation>OK</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qcolordialog.cpp" line="1367"/>\r
+        <source>Cancel</source>\r
+        <translation>キャンセル</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qcolordialog.cpp" line="1374"/>\r
+        <source>&amp;Add to Custom Colors</source>\r
+        <translation>カスタムカラーに追加(&amp;A)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qcolordialog.cpp" line="1507"/>\r
+        <source>Select color</source>\r
+        <translation>カラーの選択</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QComboBox</name>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/complexwidgets.cpp" line="870"/>\r
+        <source>Open</source>\r
+        <translation>開く</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QDB2Driver</name>\r
+    <message>\r
+        <location filename="sql/drivers/db2/qsql_db2.cpp" line="1159"/>\r
+        <source>Unable to connect</source>\r
+        <translation>接続できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/db2/qsql_db2.cpp" line="1418"/>\r
+        <source>Unable to commit transaction</source>\r
+        <translation>トランザクションをコミットできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/db2/qsql_db2.cpp" line="1435"/>\r
+        <source>Unable to rollback transaction</source>\r
+        <translation>トランザクションをロールバックできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/db2/qsql_db2.cpp" line="1450"/>\r
+        <source>Unable to set autocommit</source>\r
+        <translation>オートコミットを設定できません</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QDB2Result</name>\r
+    <message>\r
+        <location filename="sql/drivers/db2/qsql_db2.cpp" line="774"/>\r
+        <source>Unable to execute statement</source>\r
+        <translation>ステートメントを実行できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/db2/qsql_db2.cpp" line="568"/>\r
+        <source>Unable to prepare statement</source>\r
+        <translation>プリペアステートメントを使えません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/db2/qsql_db2.cpp" line="764"/>\r
+        <source>Unable to bind variable</source>\r
+        <translation>変数をバインドできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/db2/qsql_db2.cpp" line="855"/>\r
+        <source>Unable to fetch record %1</source>\r
+        <translation>レコード %1 をフェッチできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/db2/qsql_db2.cpp" line="872"/>\r
+        <source>Unable to fetch next</source>\r
+        <translation>次のレコードをフェッチできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/db2/qsql_db2.cpp" line="891"/>\r
+        <source>Unable to fetch first</source>\r
+        <translation>最初のレコードをフェッチできません</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QDateTimeEdit</name>\r
+    <message>\r
+        <location filename="gui/widgets/qdatetimeedit.cpp" line="1941"/>\r
+        <source>AM</source>\r
+        <translation>AM</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdatetimeedit.cpp" line="1941"/>\r
+        <source>am</source>\r
+        <translation>am</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdatetimeedit.cpp" line="1943"/>\r
+        <source>PM</source>\r
+        <translation>PM</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdatetimeedit.cpp" line="1943"/>\r
+        <source>pm</source>\r
+        <translation>pm</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QDialog</name>\r
+    <message>\r
+        <location filename="gui/dialogs/qdialog.cpp" line="477"/>\r
+        <source>What&apos;s This?</source>\r
+        <translation>ヒント</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QDialogButtonBox</name>\r
+    <message>\r
+        <location filename="gui/widgets/qdialogbuttonbox.cpp" line="432"/>\r
+        <source>OK</source>\r
+        <translation>OK</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdialogbuttonbox.cpp" line="444"/>\r
+        <source>Cancel</source>\r
+        <translation>キャンセル</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdialogbuttonbox.cpp" line="452"/>\r
+        <source>Apply</source>\r
+        <translation>適用</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdialogbuttonbox.cpp" line="495"/>\r
+        <source>Ignore</source>\r
+        <translation>無視</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdialogbuttonbox.cpp" line="492"/>\r
+        <source>Retry</source>\r
+        <translation>再試行</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdialogbuttonbox.cpp" line="489"/>\r
+        <source>Abort</source>\r
+        <translation>中止</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdialogbuttonbox.cpp" line="460"/>\r
+        <source>Help</source>\r
+        <translation>ヘルプ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdialogbuttonbox.cpp" line="436"/>\r
+        <source>Save</source>\r
+        <translation>保存</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdialogbuttonbox.cpp" line="440"/>\r
+        <source>Open</source>\r
+        <translation>開く</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdialogbuttonbox.cpp" line="448"/>\r
+        <source>Close</source>\r
+        <translation>閉じる</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdialogbuttonbox.cpp" line="456"/>\r
+        <source>Reset</source>\r
+        <translation>リセット</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdialogbuttonbox.cpp" line="465"/>\r
+        <source>Don&apos;t Save</source>\r
+        <translation>保存しない</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdialogbuttonbox.cpp" line="467"/>\r
+        <source>Close without Saving</source>\r
+        <translation>保存せずに閉じる</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdialogbuttonbox.cpp" line="469"/>\r
+        <source>Discard</source>\r
+        <translation>変更を破棄</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdialogbuttonbox.cpp" line="473"/>\r
+        <source>&amp;Yes</source>\r
+        <translation>はい(&amp;Y)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdialogbuttonbox.cpp" line="476"/>\r
+        <source>Yes to &amp;All</source>\r
+        <translation>全てにはい(&amp;A)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdialogbuttonbox.cpp" line="480"/>\r
+        <source>&amp;No</source>\r
+        <translation>いいえ(&amp;N)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdialogbuttonbox.cpp" line="483"/>\r
+        <source>N&amp;o to All</source>\r
+        <translation>全てにいいえ(&amp;O)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdialogbuttonbox.cpp" line="486"/>\r
+        <source>Save All</source>\r
+        <translation>すべて保存</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qdialogbuttonbox.cpp" line="498"/>\r
+        <source>Restore Defaults</source>\r
+        <translation>デフォルトに戻す</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QDirModel</name>\r
+    <message>\r
+        <location filename="gui/itemviews/qdirmodel.cpp" line="655"/>\r
+        <source>Name</source>\r
+        <translation>名前</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/itemviews/qdirmodel.cpp" line="656"/>\r
+        <source>Size</source>\r
+        <translation>サイズ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/itemviews/qdirmodel.cpp" line="667"/>\r
+        <source>Date Modified</source>\r
+        <translation>更新日</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/itemviews/qdirmodel.cpp" line="659"/>\r
+        <source>Kind</source>\r
+        <comment>Match OS X Finder</comment>\r
+        <translation>種類</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/itemviews/qdirmodel.cpp" line="661"/>\r
+        <source>Type</source>\r
+        <comment>All other platforms</comment>\r
+        <translation>タイプ</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QErrorMessage</name>\r
+    <message>\r
+        <location filename="gui/dialogs/qerrormessage.cpp" line="138"/>\r
+        <source>Debug Message:</source>\r
+        <translation>デバッグメッセージ:</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qerrormessage.cpp" line="141"/>\r
+        <source>Warning:</source>\r
+        <translation>警告:</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qerrormessage.cpp" line="144"/>\r
+        <source>Fatal Error:</source>\r
+        <translation>致命的エラー:</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qerrormessage.cpp" line="185"/>\r
+        <source>&amp;Show this message again</source>\r
+        <translation>次回もこのメッセージを表示する(&amp;S)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qerrormessage.cpp" line="188"/>\r
+        <source>&amp;OK</source>\r
+        <translation>OK(&amp;O)</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QFileDialog</name>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="352"/>\r
+        <source>All Files (*)</source>\r
+        <translation>すべてのファイル(*)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1660"/>\r
+        <source>Directories</source>\r
+        <translation>ディレクトリ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="652"/>\r
+        <source>Directory:</source>\r
+        <translation>ディレクトリ:</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1860"/>\r
+        <source>File name:</source>\r
+        <translation>ファイル名:</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1687"/>\r
+        <source>&amp;Open</source>\r
+        <translation>開く(&amp;O)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="678"/>\r
+        <source>&amp;Save</source>\r
+        <translation>保存(&amp;S)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="" line="137028468"/>\r
+        <source>Open</source>\r
+        <translation>開く</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="" line="137028468"/>\r
+        <source>Save</source>\r
+        <translation>保存</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="922"/>\r
+        <source>\r
+File not found.\r
+Please verify the correct file name was given</source>\r
+        <translation>\r
+ファイルが見つかりません。\r
+正しいファイル名が入力されたかどうか確認してください</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="953"/>\r
+        <source>%1 already exists.\r
+Do you want to replace it?</source>\r
+        <translation>%1はすでに存在します。\r
+置き換えますか?</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="970"/>\r
+        <source>%1\r
+File not found.\r
+Please verify the correct file name was given.</source>\r
+        <translation>%1\r
+ファイルが見つかりません。\r
+正しいファイル名が入力されたかどうか確認してください。</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/itemviews/qdirmodel.cpp" line="1056"/>\r
+        <source>My Computer</source>\r
+        <translation>マイ コンピュータ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1117"/>\r
+        <source>%1\r
+Directory not found.\r
+Please verify the correct directory name was given.</source>\r
+        <translation>%1\r
+ディレクトリが見つかりません。\r
+正しいディレクトリ名が入力されたかどうか確認してください。</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1417"/>\r
+        <source>Sort</source>\r
+        <translation>ソート</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1690"/>\r
+        <source>&amp;Rename</source>\r
+        <translation>名前の変更(&amp;R)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1693"/>\r
+        <source>&amp;Delete</source>\r
+        <translation>削除(&amp;D)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1696"/>\r
+        <source>&amp;Reload</source>\r
+        <translation>リロード(&amp;R)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1699"/>\r
+        <source>Sort by &amp;Name</source>\r
+        <translation>名前順にソート(&amp;N)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1704"/>\r
+        <source>Sort by &amp;Size</source>\r
+        <translation>サイズ順にソート(&amp;S)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1708"/>\r
+        <source>Sort by &amp;Date</source>\r
+        <translation>日付順にソート(&amp;D)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1712"/>\r
+        <source>&amp;Unsorted</source>\r
+        <translation>ソート解除(&amp;U)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1716"/>\r
+        <source>Show &amp;hidden files</source>\r
+        <translation>隠しファイルの表示(&amp;H)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1800"/>\r
+        <source>Back</source>\r
+        <translation>戻る</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1811"/>\r
+        <source>Parent Directory</source>\r
+        <translation>親ディレクトリ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1822"/>\r
+        <source>Create New Folder</source>\r
+        <translation>新しいフォルダの作成</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1832"/>\r
+        <source>List View</source>\r
+        <translation>一覧表示</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1843"/>\r
+        <source>Detail View</source>\r
+        <translation>詳細表示</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1858"/>\r
+        <source>Look in:</source>\r
+        <translation>検索する場所:</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1862"/>\r
+        <source>Files of type:</source>\r
+        <translation>ファイルの種類:</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/itemviews/qdirmodel.cpp" line="239"/>\r
+        <source>Drive</source>\r
+        <translation>ドライブ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/itemviews/qdirmodel.cpp" line="243"/>\r
+        <source>File</source>\r
+        <translation>ファイル</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/itemviews/qdirmodel.cpp" line="272"/>\r
+        <source>Unknown</source>\r
+        <translation>不明</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="" line="137028468"/>\r
+        <source>All Files (*.*)</source>\r
+        <translation>すべてのファイル(*.*)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="" line="137028468"/>\r
+        <source>Save As</source>\r
+        <translation>名前を付けて保存</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="" line="137028468"/>\r
+        <source>Open </source>\r
+        <translation>開く</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="" line="137028468"/>\r
+        <source>Select a Directory</source>\r
+        <translation>ディレクトリを選択</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1497"/>\r
+        <source>&apos;%1&apos; is write protected.\r
+Do you want to delete it anyway?</source>\r
+        <translation>&apos;%1&apos; は書き込みが禁止されています。\r
+本当に削除しますか?</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1502"/>\r
+        <source>Are sure you want to delete &apos;%1&apos;?</source>\r
+        <translation>&apos;%1&apos; を本当に削除しますか?</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfiledialog.cpp" line="1511"/>\r
+        <source>Could not delete directory.</source>\r
+        <translation>ディレクトリを削除できませんでした。</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QFontDialog</name>\r
+    <message>\r
+        <location filename="gui/dialogs/qfontdialog.cpp" line="203"/>\r
+        <source>&amp;Font</source>\r
+        <translation>フォント(&amp;F)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfontdialog.cpp" line="214"/>\r
+        <source>Font st&amp;yle</source>\r
+        <translation>フォントスタイル(&amp;Y)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfontdialog.cpp" line="226"/>\r
+        <source>&amp;Size</source>\r
+        <translation>サイズ(&amp;S)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfontdialog.cpp" line="233"/>\r
+        <source>Effects</source>\r
+        <translation>文字飾り</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfontdialog.cpp" line="236"/>\r
+        <source>Stri&amp;keout</source>\r
+        <translation>取り消し線(&amp;K)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfontdialog.cpp" line="239"/>\r
+        <source>&amp;Underline</source>\r
+        <translation>下線(&amp;U)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfontdialog.cpp" line="242"/>\r
+        <source>Sample</source>\r
+        <translation>サンプル</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfontdialog.cpp" line="254"/>\r
+        <source>Wr&amp;iting System</source>\r
+        <translation>言語(&amp;I)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qfontdialog.cpp" line="452"/>\r
+        <source>Select Font</source>\r
+        <translation>フォントの選択</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QFtp</name>\r
+    <message>\r
+        <location filename="qt3support/network/q3ftp.cpp" line="661"/>\r
+        <source>Not connected</source>\r
+        <translation>未接続です</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3ftp.cpp" line="726"/>\r
+        <source>Host %1 not found</source>\r
+        <translation>ホスト %1 が見つかりませんでした</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3ftp.cpp" line="730"/>\r
+        <source>Connection refused to host %1</source>\r
+        <translation>ホスト %1 への接続が拒否されました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3ftp.cpp" line="2335"/>\r
+        <source>Connected to host %1</source>\r
+        <translation>ホスト %1 に接続しました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3ftp.cpp" line="993"/>\r
+        <source>Connection refused for data connection</source>\r
+        <translation>データ接続のための接続が拒否されました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3ftp.cpp" line="1968"/>\r
+        <source>Unknown error</source>\r
+        <translation>不明なエラー</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3ftp.cpp" line="2045"/>\r
+        <source>Connecting to host failed:\r
+%1</source>\r
+        <translation>ホストへの接続に失敗しました:\r
+%1</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3ftp.cpp" line="2048"/>\r
+        <source>Login failed:\r
+%1</source>\r
+        <translation>ログインに失敗しました:\r
+%1</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3ftp.cpp" line="2051"/>\r
+        <source>Listing directory failed:\r
+%1</source>\r
+        <translation>ディレクトリのリストに失敗しました:\r
+%1</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3ftp.cpp" line="2054"/>\r
+        <source>Changing directory failed:\r
+%1</source>\r
+        <translation>ディレクトリの変更に失敗しました:\r
+%1</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3ftp.cpp" line="2057"/>\r
+        <source>Downloading file failed:\r
+%1</source>\r
+        <translation>ファイルのダウンロードに失敗しました:\r
+%1</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3ftp.cpp" line="2060"/>\r
+        <source>Uploading file failed:\r
+%1</source>\r
+        <translation>ファイルのアップロードに失敗しました:\r
+%1</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3ftp.cpp" line="2063"/>\r
+        <source>Removing file failed:\r
+%1</source>\r
+        <translation>ファイルの削除に失敗しました:\r
+%1</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3ftp.cpp" line="2066"/>\r
+        <source>Creating directory failed:\r
+%1</source>\r
+        <translation>ディレクトリの作成に失敗しました:\r
+%1</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3ftp.cpp" line="2069"/>\r
+        <source>Removing directory failed:\r
+%1</source>\r
+        <translation>ディレクトリの削除に失敗しました:\r
+%1</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3ftp.cpp" line="2344"/>\r
+        <source>Connection closed</source>\r
+        <translation>接続が閉じられました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3ftp.cpp" line="2333"/>\r
+        <source>Host %1 found</source>\r
+        <translation>ホスト %1 が見つかりました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3ftp.cpp" line="2337"/>\r
+        <source>Connection to %1 closed</source>\r
+        <translation>%1 への接続が閉じられました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3ftp.cpp" line="2340"/>\r
+        <source>Host found</source>\r
+        <translation>ホストが見つかりました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3ftp.cpp" line="2342"/>\r
+        <source>Connected to host</source>\r
+        <translation>ホストに接続しました</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QHostInfo</name>\r
+    <message>\r
+        <location filename="network/qhostinfo_p.h" line="144"/>\r
+        <source>Unknown error</source>\r
+        <translation>不明なエラー</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QHostInfoAgent</name>\r
+    <message>\r
+        <location filename="network/qhostinfo_unix.cpp" line="178"/>\r
+        <source>Host not found</source>\r
+        <translation>ホストが見つかりません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qhostinfo_unix.cpp" line="173"/>\r
+        <source>Unknown address type</source>\r
+        <translation>不明なアドレス型です</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qhostinfo_unix.cpp" line="181"/>\r
+        <source>Unknown error</source>\r
+        <translation>不明なエラー</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QHttp</name>\r
+    <message>\r
+        <location filename="qt3support/network/q3http.cpp" line="1757"/>\r
+        <source>Unknown error</source>\r
+        <translation>不明なエラー</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3http.cpp" line="1387"/>\r
+        <source>Request aborted</source>\r
+        <translation>要求が中止されました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3http.cpp" line="1768"/>\r
+        <source>No server set to connect to</source>\r
+        <translation>接続が設定されているサーバがありません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3http.cpp" line="1824"/>\r
+        <source>Wrong content length</source>\r
+        <translation>コンテンツの長さが正しくありません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3http.cpp" line="1828"/>\r
+        <source>Server closed connection unexpectedly</source>\r
+        <translation>サーバの接続が予期せず閉じられました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3http.cpp" line="1866"/>\r
+        <source>Connection refused</source>\r
+        <translation>接続が拒否されました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3http.cpp" line="1869"/>\r
+        <source>Host %1 not found</source>\r
+        <translation>ホスト %1 が見つかりませんでした</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3http.cpp" line="1872"/>\r
+        <source>HTTP request failed</source>\r
+        <translation>HTTP要求に失敗しました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3http.cpp" line="1941"/>\r
+        <source>Invalid HTTP response header</source>\r
+        <translation>無効なHTTP応答ヘッダです</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3http.cpp" line="2028"/>\r
+        <source>Invalid HTTP chunked body</source>\r
+        <translation>無効なHTTPチャンクドボディです</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3http.cpp" line="2322"/>\r
+        <source>Host %1 found</source>\r
+        <translation>ホスト %1 が見つかりました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3http.cpp" line="2325"/>\r
+        <source>Connected to host %1</source>\r
+        <translation>ホスト %1 に接続しました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3http.cpp" line="2328"/>\r
+        <source>Connection to %1 closed</source>\r
+        <translation>%1 への接続が閉じられました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3http.cpp" line="2336"/>\r
+        <source>Host found</source>\r
+        <translation>ホストが見つかりました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3http.cpp" line="2339"/>\r
+        <source>Connected to host</source>\r
+        <translation>ホストに接続しました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/network/q3http.cpp" line="2342"/>\r
+        <source>Connection closed</source>\r
+        <translation>接続が閉じられました</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QIBaseDriver</name>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="1252"/>\r
+        <source>Error opening database</source>\r
+        <translation>データベースのオープンでエラーが発生しました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="1285"/>\r
+        <source>Could not start transaction</source>\r
+        <translation>トランザクションを開始できませんでした</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="1298"/>\r
+        <source>Unable to commit transaction</source>\r
+        <translation>トランザクションをコミットできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="1311"/>\r
+        <source>Unable to rollback transaction</source>\r
+        <translation>トランザクションをロールバックできません</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QIBaseResult</name>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="348"/>\r
+        <source>Unable to create BLOB</source>\r
+        <translation>バイナリラージオブジェクトを作成できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="354"/>\r
+        <source>Unable to write BLOB</source>\r
+        <translation>バイナリラージオブジェクトを書き込めません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="368"/>\r
+        <source>Unable to open BLOB</source>\r
+        <translation>バイナリラージオブジェクトを開けません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="384"/>\r
+        <source>Unable to read BLOB</source>\r
+        <translation>バイナリラージオブジェクトを読み込めません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="686"/>\r
+        <source>Could not find array</source>\r
+        <translation>配列が見つかりませんでした</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="531"/>\r
+        <source>Could not get array data</source>\r
+        <translation>配列データを取得できませんでした</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="740"/>\r
+        <source>Could not get query info</source>\r
+        <translation>クエリー情報を取得できませんでした</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="760"/>\r
+        <source>Could not start transaction</source>\r
+        <translation>トランザクションを開始できませんでした</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="779"/>\r
+        <source>Unable to commit transaction</source>\r
+        <translation>トランザクションをコミットできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="812"/>\r
+        <source>Could not allocate statement</source>\r
+        <translation>ステートメントの領域を確保できませんでした</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="817"/>\r
+        <source>Could not prepare statement</source>\r
+        <translation>プリペアステートメントを使えませんでした</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="830"/>\r
+        <source>Could not describe input statement</source>\r
+        <translation>INPUT ステートメントの情報を取得できませんでした</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="839"/>\r
+        <source>Could not describe statement</source>\r
+        <translation>ステートメントの情報を取得できませんでした</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="947"/>\r
+        <source>Unable to close statement</source>\r
+        <translation>ステートメントをクローズできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="952"/>\r
+        <source>Unable to execute query</source>\r
+        <translation>クエリーを実行できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="983"/>\r
+        <source>Could not fetch next item</source>\r
+        <translation>次のレコードをフェッチできませんでした</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/ibase/qsql_ibase.cpp" line="1131"/>\r
+        <source>Could not get statement info</source>\r
+        <translation>ステートメントの情報を取得できませんでした</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QIODevice</name>\r
+    <message>\r
+        <location filename="corelib/global/qglobal.cpp" line="1841"/>\r
+        <source>Permission denied</source>\r
+        <translation>許可されていません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="corelib/global/qglobal.cpp" line="1844"/>\r
+        <source>Too many open files</source>\r
+        <translation>開かれたファイルが多すぎます</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="corelib/global/qglobal.cpp" line="1847"/>\r
+        <source>No such file or directory</source>\r
+        <translation>そのようなファイルやディレクトリはありません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="corelib/global/qglobal.cpp" line="1850"/>\r
+        <source>No space left on device</source>\r
+        <translation>デバイスの残り容量がありません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="corelib/io/qiodevice.cpp" line="1444"/>\r
+        <source>Unknown error</source>\r
+        <translation>不明なエラー</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QInputContext</name>\r
+    <message>\r
+        <location filename="gui/inputmethod/qinputcontextfactory.cpp" line="210"/>\r
+        <source>XIM</source>\r
+        <translation>XIM</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/inputmethod/qinputcontextfactory.cpp" line="233"/>\r
+        <source>XIM input method</source>\r
+        <translation>XIM 入力メソッド</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/inputmethod/qinputcontextfactory.cpp" line="237"/>\r
+        <source>Windows input method</source>\r
+        <translation>Windows 入力メソッド</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/inputmethod/qinputcontextfactory.cpp" line="241"/>\r
+        <source>Mac OS X input method</source>\r
+        <translation>Mac OS X 入力メソッド</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QLibrary</name>\r
+    <message>\r
+        <location filename="corelib/plugin/qlibrary.cpp" line="333"/>\r
+        <source>Could not mmap &apos;%1&apos;: %2</source>\r
+        <translation>&apos;%1&apos; をメモリにマッピングできませんでした: %2</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="corelib/plugin/qlibrary.cpp" line="354"/>\r
+        <source>Plugin verification data mismatch in &apos;%1&apos;</source>\r
+        <translation>&apos;%1&apos; でプラグイン検証データが一致しません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="corelib/plugin/qlibrary.cpp" line="361"/>\r
+        <source>Could not unmap &apos;%1&apos;: %2</source>\r
+        <translation>&apos;%1&apos; のマッピングを解除できませんでした: %2</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="corelib/plugin/qlibrary.cpp" line="589"/>\r
+        <source>The plugin &apos;%1&apos; uses incompatible Qt library. (%2.%3.%4) [%5]</source>\r
+        <translation>プラグイン &apos;%1&apos; は、互換性のない Qt ライブラリを使用しています。(%2.%3.%4) [%5]</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="corelib/plugin/qlibrary.cpp" line="605"/>\r
+        <source>The plugin &apos;%1&apos; uses incompatible Qt library. Expected build key &quot;%2&quot;, got &quot;%3&quot;</source>\r
+        <translation>プラグイン &apos;%1&apos; は、互換性のない Qt ライブラリを使用しています。ビルドキー &quot;%2&quot; が必要ですが、&quot;%3&quot; しかありません </translation>\r
+    </message>\r
+    <message>\r
+        <location filename="corelib/plugin/qlibrary.cpp" line="897"/>\r
+        <source>Unknown error</source>\r
+        <translation>不明なエラー</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="corelib/plugin/qlibrary_unix.cpp" line="189"/>\r
+        <source>QLibrary::load_sys: Cannot load %1 (%2)</source>\r
+        <translation>QLibrary::load_sys: %1 をロードできません (%2)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="corelib/plugin/qlibrary_unix.cpp" line="201"/>\r
+        <source>QLibrary::unload_sys: Cannot unload %1 (%2)</source>\r
+        <translation>QLibrary::unload_sys: %1 をアンロードできません (%2)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="corelib/plugin/qlibrary_unix.cpp" line="228"/>\r
+        <source>QLibrary::resolve_sys: Symbol &quot;%1&quot; undefined in %2 (%3)</source>\r
+        <translation>QLibrary::resolve_sys: シンボル &quot;%1&quot; は %2 で定義されていません (%3)</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QLineEdit</name>\r
+    <message>\r
+        <location filename="gui/widgets/qlineedit.cpp" line="2490"/>\r
+        <source>&amp;Undo</source>\r
+        <translation>元に戻す(&amp;U)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qlineedit.cpp" line="2492"/>\r
+        <source>&amp;Redo</source>\r
+        <translation>やり直す(&amp;R)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qlineedit.cpp" line="2496"/>\r
+        <source>Cu&amp;t</source>\r
+        <translation>切り取り(&amp;T)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qlineedit.cpp" line="2498"/>\r
+        <source>&amp;Copy</source>\r
+        <translation>コピー(&amp;C)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qlineedit.cpp" line="2500"/>\r
+        <source>&amp;Paste</source>\r
+        <translation>貼り付け(&amp;P)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qlineedit.cpp" line="2503"/>\r
+        <source>Delete</source>\r
+        <translation>削除</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qlineedit.cpp" line="2507"/>\r
+        <source>Select All</source>\r
+        <translation>すべてを選択</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QMYSQLDriver</name>\r
+    <message>\r
+        <location filename="sql/drivers/mysql/qsql_mysql.cpp" line="1008"/>\r
+        <source>Unable to open database &apos;</source>\r
+        <translation>データベースを開けません &apos;</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/mysql/qsql_mysql.cpp" line="1015"/>\r
+        <source>Unable to connect</source>\r
+        <translation>接続できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/mysql/qsql_mysql.cpp" line="1133"/>\r
+        <source>Unable to begin transaction</source>\r
+        <translation>トランザクションを開始できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/mysql/qsql_mysql.cpp" line="1150"/>\r
+        <source>Unable to commit transaction</source>\r
+        <translation>トランザクションをコミットできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/mysql/qsql_mysql.cpp" line="1167"/>\r
+        <source>Unable to rollback transaction</source>\r
+        <translation>トランザクションをロールバックできません</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QMYSQLResult</name>\r
+    <message>\r
+        <location filename="sql/drivers/mysql/qsql_mysql.cpp" line="365"/>\r
+        <source>Unable to fetch data</source>\r
+        <translation>データをフェッチできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/mysql/qsql_mysql.cpp" line="528"/>\r
+        <source>Unable to execute query</source>\r
+        <translation>クエリーを実行できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/mysql/qsql_mysql.cpp" line="534"/>\r
+        <source>Unable to store result</source>\r
+        <translation>実行結果を記録できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/mysql/qsql_mysql.cpp" line="665"/>\r
+        <source>Unable to prepare statement</source>\r
+        <translation>プリペアステートメントを使えません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/mysql/qsql_mysql.cpp" line="696"/>\r
+        <source>Unable to reset statement</source>\r
+        <translation>ステートメントをリセットできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/mysql/qsql_mysql.cpp" line="783"/>\r
+        <source>Unable to bind value</source>\r
+        <translation>値をバインドできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/mysql/qsql_mysql.cpp" line="794"/>\r
+        <source>Unable to execute statement</source>\r
+        <translation>ステートメントを実行できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/mysql/qsql_mysql.cpp" line="829"/>\r
+        <source>Unable to bind outvalues</source>\r
+        <translation>出力値をバインドできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/mysql/qsql_mysql.cpp" line="817"/>\r
+        <source>Unable to store statement results</source>\r
+        <translation>ステートメントの実行結果を記録できません</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QMenu</name>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/qaccessiblemenu.cpp" line="315"/>\r
+        <source>Close</source>\r
+        <translation>閉じる</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/qaccessiblemenu.cpp" line="316"/>\r
+        <source>Open</source>\r
+        <translation>開く</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/qaccessiblemenu.cpp" line="318"/>\r
+        <source>Execute</source>\r
+        <translation>実行</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QMessageBox</name>\r
+    <message>\r
+        <location filename="gui/dialogs/qdialog.cpp" line="572"/>\r
+        <source>Help</source>\r
+        <translation>ヘルプ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qmessagebox.h" line="280"/>\r
+        <source>OK</source>\r
+        <translation>OK</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qmessagebox.cpp" line="252"/>\r
+        <source>&lt;h3&gt;About Qt&lt;/h3&gt;%1&lt;p&gt;Qt is a C++ toolkit for cross-platform application development.&lt;/p&gt;&lt;p&gt;Qt provides single-source portability across MS&amp;nbsp;Windows, Mac&amp;nbsp;OS&amp;nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qtopia Core.&lt;/p&gt;&lt;p&gt;Qt is a Trolltech product. See &lt;a href=&quot;http://www.trolltech.com/qt/&quot;&gt;www.trolltech.com/qt/&lt;/a&gt; for more information.&lt;/p&gt;</source>\r
+        <translation>&lt;h3&gt;Qt について&lt;/h3&gt;%1\r
+&lt;p&gt;QtはクロスプラットフォームのC++ アプリケーション開発ツールキットです。&lt;/p&gt;\r
+&lt;p&gt;Qt は MS&amp;nbsp;Windows, Mac&amp;nbsp;OS&amp;nbsp;X, Linux, 商用のUnix派生版でソースコード互換を実現します。また、Qtopia Coreのように、内蔵デバイスでも利用可能です。&lt;/p&gt;\r
+&lt;p&gt;QtはTrolltechの商品です。詳細は&lt;tt&gt;http://www.trolltech.com/qt/&lt;/tt&gt;を参照してください。&lt;/p&gt;</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qmessagebox.cpp" line="253"/>\r
+        <source>&lt;p&gt;This program uses Qt version %1.&lt;/p&gt;</source>\r
+        <translation>&lt;p&gt;このプログラムは Qt バージョン %1 を使用しています。&lt;/p&gt;</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qmessagebox.cpp" line="261"/>\r
+        <source>&lt;p&gt;This program uses Qt Open Source Edition version %1.&lt;/p&gt;&lt;p&gt;Qt Open Source Edition is intended for the development of Open Source applications. You need a commercial Qt license for development of proprietary (closed source) applications.&lt;/p&gt;&lt;p&gt;Please see &lt;a href=&quot;http://www.trolltech.com/company/model/&quot;&gt;www.trolltech.com/company/model/&lt;/a&gt; for an overview of Qt licensing.&lt;/p&gt;</source>\r
+        <translation>&lt;p&gt;このプログラムは Qt オープンソース版バージョン %1 を使用しています。&lt;/p&gt;\r
+&lt;p&gt;Qt オープンソース版はオープンソースのアプリケーションの開発用です。ソースコードを公開しない商用アプリケーションを開発するには商用版のライセンスが必要です。&lt;/p&gt;&lt;p&gt;Qtのライセンスについては&lt;tt&gt;http://www.trolltech.com/company/model.html&lt;/tt&gt;を参照してください。&lt;/p&gt;</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qmessagebox.cpp" line="1354"/>\r
+        <source>About Qt</source>\r
+        <translation>Qt について</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qmessagebox.cpp" line="88"/>\r
+        <source>Show Details...</source>\r
+        <translation>詳細を表示...</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qmessagebox.cpp" line="88"/>\r
+        <source>Hide Details...</source>\r
+        <translation>詳細を隠す...</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QMultiInputContext</name>\r
+    <message>\r
+        <location filename="plugins/inputmethods/imsw-multi/qmultiinputcontext.cpp" line="63"/>\r
+        <source>Select IM</source>\r
+        <translation>入力メソッドを選択</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QMultiInputContextPlugin</name>\r
+    <message>\r
+        <location filename="plugins/inputmethods/imsw-multi/qmultiinputcontextplugin.cpp" line="74"/>\r
+        <source>Multiple input method switcher</source>\r
+        <translation>複数の入力メソッドを切り替え</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/inputmethods/imsw-multi/qmultiinputcontextplugin.cpp" line="81"/>\r
+        <source>Multiple input method switcher that uses the context menu of the text widgets</source>\r
+        <translation>テキストウィジェットのコンテキストメニューを使った複数の入力メソッドの切り替えです</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QNativeSocketEngine</name>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="159"/>\r
+        <source>Unable to initialize non-blocking socket</source>\r
+        <translation>ノンブロッキングソケットを初期化できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="162"/>\r
+        <source>Unable to initialize broadcast socket</source>\r
+        <translation>ブロードキャストソケットを初期化できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="165"/>\r
+        <source>Attempt to use IPv6 socket on a platform with no IPv6 support</source>\r
+        <translation>IPv6 がサポートされていないプラットフォームで IPv6 ソケットを使用しようとしています</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="168"/>\r
+        <source>The remote host closed the connection</source>\r
+        <translation>リモートホストは接続を閉じました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="171"/>\r
+        <source>Network operation timed out</source>\r
+        <translation>ネットワーク操作がタイムアウトしました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="174"/>\r
+        <source>Out of resources</source>\r
+        <translation>リソースが足りません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="177"/>\r
+        <source>Unsupported socket operation</source>\r
+        <translation>サポートされていないソケット操作です</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="180"/>\r
+        <source>Protocol type not supported</source>\r
+        <translation>プロトコル型がサポートされていません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="183"/>\r
+        <source>Invalid socket descriptor</source>\r
+        <translation>無効なソケット記述子です</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="186"/>\r
+        <source>Host unreachable</source>\r
+        <translation>ホストへ到達できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="189"/>\r
+        <source>Network unreachable</source>\r
+        <translation>ネットワークへ到達できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="192"/>\r
+        <source>Permission denied</source>\r
+        <translation>許可されていません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="195"/>\r
+        <source>Connection timed out</source>\r
+        <translation>接続がタイムアウトしました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="198"/>\r
+        <source>Connection refused</source>\r
+        <translation>接続を拒否されました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="201"/>\r
+        <source>The bound address is already in use</source>\r
+        <translation>バインドアドレスは既に使われています</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="204"/>\r
+        <source>The address is not available</source>\r
+        <translation>そのアドレスは使用できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="207"/>\r
+        <source>The address is protected</source>\r
+        <translation>そのアドレスへのアクセス権がありません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="210"/>\r
+        <source>Datagram was too large to send</source>\r
+        <translation>データグラムが大き過ぎて送信できませんでした</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="213"/>\r
+        <source>Unable to send a message</source>\r
+        <translation>メッセージを送信できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="216"/>\r
+        <source>Unable to receive a message</source>\r
+        <translation>メッセージを受信できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="219"/>\r
+        <source>Unable to write</source>\r
+        <translation>書き込みができません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="222"/>\r
+        <source>Network error</source>\r
+        <translation>ネットワークエラー</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="225"/>\r
+        <source>Another socket is already listening on the same port</source>\r
+        <translation>別のソケットが同じポートで既に待ち受けています</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="228"/>\r
+        <source>Operation on non-socket</source>\r
+        <translation>非ソケットに対する操作です</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="network/qnativesocketengine.cpp" line="231"/>\r
+        <source>Unknown error</source>\r
+        <translation>不明なエラー</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QOCIDriver</name>\r
+    <message>\r
+        <location filename="sql/drivers/oci/qsql_oci.cpp" line="1742"/>\r
+        <source>Unable to initialize</source>\r
+        <comment>QOCIDriver</comment>\r
+        <translation>初期化できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/oci/qsql_oci.cpp" line="1895"/>\r
+        <source>Unable to logon</source>\r
+        <translation>ログオンできません</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QOCIResult</name>\r
+    <message>\r
+        <location filename="sql/drivers/oci/qsql_oci.cpp" line="1258"/>\r
+        <source>Unable to bind column for batch execute</source>\r
+        <translation>バッチ処理用にフィールドをバインドできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/oci/qsql_oci.cpp" line="1272"/>\r
+        <source>Unable to execute batch statement</source>\r
+        <translation>バッチステートメントを実行できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/oci/qsql_oci.cpp" line="1529"/>\r
+        <source>Unable to goto next</source>\r
+        <translation>次のレコードへ進めません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/oci/qsql_oci.cpp" line="1586"/>\r
+        <source>Unable to alloc statement</source>\r
+        <translation>ステートメントの領域を確保できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/oci/qsql_oci.cpp" line="1607"/>\r
+        <source>Unable to prepare statement</source>\r
+        <translation>プリペアステートメントを使えません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/oci/qsql_oci.cpp" line="1625"/>\r
+        <source>Unable to bind value</source>\r
+        <translation>値をバインドできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/oci/qsql_oci.cpp" line="1650"/>\r
+        <source>Unable to execute select statement</source>\r
+        <translation>SELECT ステートメントを実行できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/oci/qsql_oci.cpp" line="1667"/>\r
+        <source>Unable to execute statement</source>\r
+        <translation>ステートメントを実行できません</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QODBCDriver</name>\r
+    <message>\r
+        <location filename="sql/drivers/odbc/qsql_odbc.cpp" line="1426"/>\r
+        <source>Unable to connect</source>\r
+        <translation>接続できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/odbc/qsql_odbc.cpp" line="1433"/>\r
+        <source>Unable to connect - Driver doesn&apos;t support all needed functionality</source>\r
+        <translation>接続できません - ドライバは全ての必要な機能をサポートしていません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/odbc/qsql_odbc.cpp" line="1614"/>\r
+        <source>Unable to disable autocommit</source>\r
+        <translation>オートコミットを無効にできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/odbc/qsql_odbc.cpp" line="1631"/>\r
+        <source>Unable to commit transaction</source>\r
+        <translation>トランザクションをコミットできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/odbc/qsql_odbc.cpp" line="1648"/>\r
+        <source>Unable to rollback transaction</source>\r
+        <translation>トランザクションをロールバックできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/odbc/qsql_odbc.cpp" line="1663"/>\r
+        <source>Unable to enable autocommit</source>\r
+        <translation>オートコミットを有効にできません</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QODBCResult</name>\r
+    <message>\r
+        <location filename="sql/drivers/odbc/qsql_odbc.cpp" line="1230"/>\r
+        <source>Unable to execute statement</source>\r
+        <translation>ステートメントを実行できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/odbc/qsql_odbc.cpp" line="779"/>\r
+        <source>Unable to fetch next</source>\r
+        <translation>次のレコードをフェッチできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/odbc/qsql_odbc.cpp" line="1024"/>\r
+        <source>Unable to prepare statement</source>\r
+        <translation>プリペアステートメントを使えません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/odbc/qsql_odbc.cpp" line="1221"/>\r
+        <source>Unable to bind variable</source>\r
+        <translation>変数をバインドできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/odbc/qsql_odbc.cpp" line="1007"/>\r
+        <source>QODBCResult::reset: Unable to set &apos;SQL_CURSOR_STATIC&apos; as statement attribute. Please check your ODBC driver configuration</source>\r
+        <translation>QODBCResult::reset: ステートメントの属性として &apos;SQL_CURSOR_STATUS&apos; を設定できません。ODBC ドライバの構成をチェックしてください。</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QObject</name>\r
+    <message>\r
+        <location filename="gui/itemviews/qitemeditorfactory.cpp" line="168"/>\r
+        <source>False</source>\r
+        <translation>False</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/itemviews/qitemeditorfactory.cpp" line="169"/>\r
+        <source>True</source>\r
+        <translation>True</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/util/qdesktopservices_mac.cpp" line="162"/>\r
+        <source>Home</source>\r
+        <translation>ホーム</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QPSQLDriver</name>\r
+    <message>\r
+        <location filename="sql/drivers/psql/qsql_psql.cpp" line="547"/>\r
+        <source>Unable to connect</source>\r
+        <translation>接続できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/psql/qsql_psql.cpp" line="586"/>\r
+        <source>Could not begin transaction</source>\r
+        <translation>トランザクションを開始できませんでした</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/psql/qsql_psql.cpp" line="603"/>\r
+        <source>Could not commit transaction</source>\r
+        <translation>トランザクションをコミットできませんでした</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/psql/qsql_psql.cpp" line="619"/>\r
+        <source>Could not rollback transaction</source>\r
+        <translation>トランザクションをロールバックできませんでした</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QPSQLResult</name>\r
+    <message>\r
+        <location filename="sql/drivers/psql/qsql_psql.cpp" line="143"/>\r
+        <source>Unable to create query</source>\r
+        <translation>クエリーを作成できません</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QPluginLoader</name>\r
+    <message>\r
+        <location filename="corelib/plugin/qpluginloader.cpp" line="259"/>\r
+        <source>Unknown error</source>\r
+        <translation>不明なエラー</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QPrintDialog</name>\r
+    <message>\r
+        <location filename="gui/dialogs/qpagesetupdialog_unix.cpp" line="138"/>\r
+        <source>Page size:</source>\r
+        <translation>ページサイズ:</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog.ui" line="64"/>\r
+        <source>Orientation:</source>\r
+        <translation>方向:</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qpagesetupdialog_unix.cpp" line="149"/>\r
+        <source>Paper source:</source>\r
+        <translation>給紙装置:</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qpagesetupdialog_unix.cpp" line="163"/>\r
+        <source>OK</source>\r
+        <translation>OK</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qpagesetupdialog_unix.cpp" line="164"/>\r
+        <source>Cancel</source>\r
+        <translation>キャンセル</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="940"/>\r
+        <source>Portrait</source>\r
+        <translation>縦</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="941"/>\r
+        <source>Landscape</source>\r
+        <translation>横</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="188"/>\r
+        <source>locally connected</source>\r
+        <translation>ローカルに接続しています</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="413"/>\r
+        <source>Aliases: %1</source>\r
+        <translation>エイリアス: %1</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="855"/>\r
+        <source>unknown</source>\r
+        <translation>不明</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog.ui" line="468"/>\r
+        <source>Print in color if available</source>\r
+        <translation>可能であればカラーで印刷</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog.ui" line="267"/>\r
+        <source>Print to file</source>\r
+        <translation>ファイルに出力:</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog.ui" line="247"/>\r
+        <source>Browse</source>\r
+        <translation>参照...</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog.ui" line="297"/>\r
+        <source>Print all</source>\r
+        <translation>すべて印刷</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog.ui" line="358"/>\r
+        <source>Selection</source>\r
+        <translation>選択した部分を印刷</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog.ui" line="285"/>\r
+        <source>Print range</source>\r
+        <translation>印刷範囲</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog.ui" line="315"/>\r
+        <source>Pages from</source>\r
+        <translation>先頭のページ:</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog.ui" line="329"/>\r
+        <source>to</source>\r
+        <translation>末尾のページ:</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog.ui" line="438"/>\r
+        <source>Print last page first</source>\r
+        <translation>末尾のページから印刷</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog.ui" line="396"/>\r
+        <source>Number of copies:</source>\r
+        <translation>部数:</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog.ui" line="45"/>\r
+        <source>Paper format</source>\r
+        <translation>用紙の形式</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="778"/>\r
+        <source>A0 (841 x 1189 mm)</source>\r
+        <translation>A0 (841 x 1189mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="779"/>\r
+        <source>A1 (594 x 841 mm)</source>\r
+        <translation>A1 (594 x 841mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="780"/>\r
+        <source>A2 (420 x 594 mm)</source>\r
+        <translation>A2 (420 x 594mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="781"/>\r
+        <source>A3 (297 x 420 mm)</source>\r
+        <translation>A3 (297 x 420mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="782"/>\r
+        <source>A4 (210 x 297 mm, 8.26 x 11.7 inches)</source>\r
+        <translation>A4 (210 x 297mm、8.26 x 11.7インチ)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="783"/>\r
+        <source>A5 (148 x 210 mm)</source>\r
+        <translation>A5 (148 x 210mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="784"/>\r
+        <source>A6 (105 x 148 mm)</source>\r
+        <translation>A6 (105 x 148mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="785"/>\r
+        <source>A7 (74 x 105 mm)</source>\r
+        <translation>A7 (74 x 105mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="786"/>\r
+        <source>A8 (52 x 74 mm)</source>\r
+        <translation>A8 (52 x 74mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="787"/>\r
+        <source>A9 (37 x 52 mm)</source>\r
+        <translation>A9 (37 x 52mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="788"/>\r
+        <source>B0 (1000 x 1414 mm)</source>\r
+        <translation>B0 (1000 x 1414mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="789"/>\r
+        <source>B1 (707 x 1000 mm)</source>\r
+        <translation>B1 (707 x 1000mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="790"/>\r
+        <source>B2 (500 x 707 mm)</source>\r
+        <translation>B2 (500 x 707mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="791"/>\r
+        <source>B3 (353 x 500 mm)</source>\r
+        <translation>B3 (353 x 500mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="792"/>\r
+        <source>B4 (250 x 353 mm)</source>\r
+        <translation>B4 (250 x 353mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="793"/>\r
+        <source>B5 (176 x 250 mm, 6.93 x 9.84 inches)</source>\r
+        <translation>B5 (176 x 250mm、6.93 x 9.84インチ)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="794"/>\r
+        <source>B6 (125 x 176 mm)</source>\r
+        <translation>B6 (125 x 176mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="795"/>\r
+        <source>B7 (88 x 125 mm)</source>\r
+        <translation>B7 (88 x 125mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="796"/>\r
+        <source>B8 (62 x 88 mm)</source>\r
+        <translation>B8 (62 x 88mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="797"/>\r
+        <source>B9 (44 x 62 mm)</source>\r
+        <translation>B9 (44 x 62mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="798"/>\r
+        <source>B10 (31 x 44 mm)</source>\r
+        <translation>B10 (31 x 44mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="799"/>\r
+        <source>C5E (163 x 229 mm)</source>\r
+        <translation>C5E (163 x 229mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="800"/>\r
+        <source>DLE (110 x 220 mm)</source>\r
+        <translation>DLE (110 x 220mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="801"/>\r
+        <source>Executive (7.5 x 10 inches, 191 x 254 mm)</source>\r
+        <translation>Executive (7.5 x 10インチ、191 x 254mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="802"/>\r
+        <source>Folio (210 x 330 mm)</source>\r
+        <translation>Folio (210 x 330mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="803"/>\r
+        <source>Ledger (432 x 279 mm)</source>\r
+        <translation>Ledger (432 x 279mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="804"/>\r
+        <source>Legal (8.5 x 14 inches, 216 x 356 mm)</source>\r
+        <translation>Legal (8.5 x 14インチ、216 x 356mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="805"/>\r
+        <source>Letter (8.5 x 11 inches, 216 x 279 mm)</source>\r
+        <translation>Letter (8.5 x 11インチ、216 x 279mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="806"/>\r
+        <source>Tabloid (279 x 432 mm)</source>\r
+        <translation>Tabloid (279 x 432mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="807"/>\r
+        <source>US Common #10 Envelope (105 x 241 mm)</source>\r
+        <translation>US Common #10 Envelope (105 x 241mm)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog.ui" line="33"/>\r
+        <source>Print dialog</source>\r
+        <translation>プリントダイアログ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog.ui" line="57"/>\r
+        <source>Size:</source>\r
+        <translation>サイズ:</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="1037"/>\r
+        <source>Printer</source>\r
+        <translation>プリンタ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog.ui" line="170"/>\r
+        <source>Properties</source>\r
+        <translation>プロパティ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog.ui" line="187"/>\r
+        <source>Printer info:</source>\r
+        <translation>プリンタ情報:</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog.ui" line="376"/>\r
+        <source>Copies</source>\r
+        <translation>印刷部数</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog.ui" line="431"/>\r
+        <source>Collate</source>\r
+        <translation>丁合い</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog.ui" line="456"/>\r
+        <source>Other</source>\r
+        <translation>その他</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog.ui" line="478"/>\r
+        <source>Double side printing</source>\r
+        <translation>両面印刷</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="943"/>\r
+        <source>Print</source>\r
+        <translation>印刷</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="1014"/>\r
+        <source>File</source>\r
+        <translation>ファイル</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="1125"/>\r
+        <source>Print To File ...</source>\r
+        <translation>ファイルへ出力...</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="1159"/>\r
+        <source>File %1 is not writable.\r
+Please choose a different file name.</source>\r
+        <translation>ファイル %1 は書き込み可能ではありません。\r
+別のファイル名を選んでください。</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintdialog_unix.cpp" line="1163"/>\r
+        <source>%1 already exists.\r
+Do you want to overwrite it?</source>\r
+        <translation>%1 はすでに存在します。\r
+上書きしますか?</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QPrintPropertiesDialog</name>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintpropertiesdialog.ui" line="35"/>\r
+        <source>PPD Properties</source>\r
+        <translation>印刷プロパティのダイアログのプロパティ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintpropertiesdialog.ui" line="62"/>\r
+        <source>Save</source>\r
+        <translation>保存</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/dialogs/qprintpropertiesdialog.ui" line="82"/>\r
+        <source>OK</source>\r
+        <translation>OK</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QProgressDialog</name>\r
+    <message>\r
+        <location filename="gui/dialogs/qprogressdialog.cpp" line="237"/>\r
+        <source>Cancel</source>\r
+        <translation>キャンセル</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QPushButton</name>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/simplewidgets.cpp" line="81"/>\r
+        <source>Open</source>\r
+        <translation>開く</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QRadioButton</name>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/simplewidgets.cpp" line="93"/>\r
+        <source>Check</source>\r
+        <translation>選択</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QRegExp</name>\r
+    <message>\r
+        <location filename="corelib/tools/qregexp.cpp" line="39"/>\r
+        <source>no error occurred</source>\r
+        <translation>エラーは発生しませんでした</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="corelib/tools/qregexp.cpp" line="40"/>\r
+        <source>disabled feature used</source>\r
+        <translation>無効な機能が使用されました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="corelib/tools/qregexp.cpp" line="41"/>\r
+        <source>bad char class syntax</source>\r
+        <translation>不正なcharクラス構文</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="corelib/tools/qregexp.cpp" line="42"/>\r
+        <source>bad lookahead syntax</source>\r
+        <translation>不正なlookahead構文</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="corelib/tools/qregexp.cpp" line="43"/>\r
+        <source>bad repetition syntax</source>\r
+        <translation>不正なrepetition構文</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="corelib/tools/qregexp.cpp" line="44"/>\r
+        <source>invalid octal value</source>\r
+        <translation>無効な8進値</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="corelib/tools/qregexp.cpp" line="45"/>\r
+        <source>missing left delim</source>\r
+        <translation>左の区切り文字がありません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="corelib/tools/qregexp.cpp" line="46"/>\r
+        <source>unexpected end</source>\r
+        <translation>予期しない末尾です</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="corelib/tools/qregexp.cpp" line="48"/>\r
+        <source>met internal limit</source>\r
+        <translation>内部制限を満たしました</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QSQLite2Driver</name>\r
+    <message>\r
+        <location filename="sql/drivers/sqlite2/qsql_sqlite2.cpp" line="344"/>\r
+        <source>Error to open database</source>\r
+        <translation>データベースのオープンでエラーが発生しました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/sqlite2/qsql_sqlite2.cpp" line="385"/>\r
+        <source>Unable to begin transaction</source>\r
+        <translation>トランザクションを開始できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/sqlite2/qsql_sqlite2.cpp" line="402"/>\r
+        <source>Unable to commit transaction</source>\r
+        <translation>トランザクションをコミットできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/sqlite2/qsql_sqlite2.cpp" line="419"/>\r
+        <source>Unable to rollback Transaction</source>\r
+        <translation>トランザクションをロールバックできません</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QSQLite2Result</name>\r
+    <message>\r
+        <location filename="sql/drivers/sqlite2/qsql_sqlite2.cpp" line="126"/>\r
+        <source>Unable to fetch results</source>\r
+        <translation>実行結果をフェッチできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/sqlite2/qsql_sqlite2.cpp" line="250"/>\r
+        <source>Unable to execute statement</source>\r
+        <translation>ステートメントを実行できません</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QSQLiteDriver</name>\r
+    <message>\r
+        <location filename="sql/drivers/sqlite/qsql_sqlite.cpp" line="450"/>\r
+        <source>Error opening database</source>\r
+        <translation>データベースのオープンでエラーが発生しました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/sqlite/qsql_sqlite.cpp" line="461"/>\r
+        <source>Error closing database</source>\r
+        <translation>データベースのクローズでエラーが発生しました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/sqlite/qsql_sqlite.cpp" line="481"/>\r
+        <source>Unable to begin transaction</source>\r
+        <translation>トランザクションを開始できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/sqlite/qsql_sqlite.cpp" line="496"/>\r
+        <source>Unable to commit transaction</source>\r
+        <translation>トランザクションをコミットできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/sqlite/qsql_sqlite.cpp" line="511"/>\r
+        <source>Unable to roll back transaction</source>\r
+        <translation>トランザクションをロールバックできません</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QSQLiteResult</name>\r
+    <message>\r
+        <location filename="sql/drivers/sqlite/qsql_sqlite.cpp" line="214"/>\r
+        <source>Unable to fetch row</source>\r
+        <translation>レコードをフェッチできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/sqlite/qsql_sqlite.cpp" line="256"/>\r
+        <source>Unable to execute statement</source>\r
+        <translation>ステートメントを実行できません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/sqlite/qsql_sqlite.cpp" line="275"/>\r
+        <source>Unable to reset statement</source>\r
+        <translation>ステートメントをリセットできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/sqlite/qsql_sqlite.cpp" line="319"/>\r
+        <source>Unable to bind parameters</source>\r
+        <translation>パラメータをバインドできません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/sqlite/qsql_sqlite.cpp" line="326"/>\r
+        <source>Parameter count mismatch</source>\r
+        <translation>パラメータの数が合っていません</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QScrollBar</name>\r
+    <message>\r
+        <location filename="gui/widgets/qscrollbar.cpp" line="397"/>\r
+        <source>Scroll here</source>\r
+        <translation>ここにスクロール</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qscrollbar.cpp" line="400"/>\r
+        <source>Left edge</source>\r
+        <translation>左端</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qscrollbar.cpp" line="400"/>\r
+        <source>Top</source>\r
+        <translation>上端</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qscrollbar.cpp" line="402"/>\r
+        <source>Right edge</source>\r
+        <translation>右端</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qscrollbar.cpp" line="402"/>\r
+        <source>Bottom</source>\r
+        <translation>下端</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qscrollbar.cpp" line="405"/>\r
+        <source>Page left</source>\r
+        <translation>1ページ左へスクロール</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/rangecontrols.cpp" line="308"/>\r
+        <source>Page up</source>\r
+        <translation>1ページ戻る</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qscrollbar.cpp" line="407"/>\r
+        <source>Page right</source>\r
+        <translation>1ページ右へスクロール</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/rangecontrols.cpp" line="312"/>\r
+        <source>Page down</source>\r
+        <translation>1ページ進む</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qscrollbar.cpp" line="410"/>\r
+        <source>Scroll left</source>\r
+        <translation>左へスクロール</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qscrollbar.cpp" line="410"/>\r
+        <source>Scroll up</source>\r
+        <translation>上へスクロール</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qscrollbar.cpp" line="412"/>\r
+        <source>Scroll right</source>\r
+        <translation>右へスクロール</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qscrollbar.cpp" line="412"/>\r
+        <source>Scroll down</source>\r
+        <translation>下へスクロール</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/rangecontrols.cpp" line="306"/>\r
+        <source>Line up</source>\r
+        <translation>1行上へ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/rangecontrols.cpp" line="310"/>\r
+        <source>Position</source>\r
+        <translation>位置</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/rangecontrols.cpp" line="314"/>\r
+        <source>Line down</source>\r
+        <translation>1行下へ</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QShortcut</name>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="198"/>\r
+        <source>Space</source>\r
+        <translation>Space</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="199"/>\r
+        <source>Esc</source>\r
+        <translation>Esc</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="200"/>\r
+        <source>Tab</source>\r
+        <translation>Tab</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="201"/>\r
+        <source>Backtab</source>\r
+        <translation>Backtab</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="202"/>\r
+        <source>Backspace</source>\r
+        <translation>Backspace</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="203"/>\r
+        <source>Return</source>\r
+        <translation>Return</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="204"/>\r
+        <source>Enter</source>\r
+        <translation>Enter</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="205"/>\r
+        <source>Ins</source>\r
+        <translation>Ins</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="206"/>\r
+        <source>Del</source>\r
+        <translation>Del</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="207"/>\r
+        <source>Pause</source>\r
+        <translation>Pause</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="208"/>\r
+        <source>Print</source>\r
+        <translation>Print</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="209"/>\r
+        <source>SysReq</source>\r
+        <translation>SysReq</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="210"/>\r
+        <source>Home</source>\r
+        <translation>Home</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="211"/>\r
+        <source>End</source>\r
+        <translation>End</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="212"/>\r
+        <source>Left</source>\r
+        <translation>→</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="213"/>\r
+        <source>Up</source>\r
+        <translation>↑</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="214"/>\r
+        <source>Right</source>\r
+        <translation>←</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="215"/>\r
+        <source>Down</source>\r
+        <translation>↓</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="216"/>\r
+        <source>PgUp</source>\r
+        <translation>PgUp</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="217"/>\r
+        <source>PgDown</source>\r
+        <translation>PgDown</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="218"/>\r
+        <source>CapsLock</source>\r
+        <translation>CapsLock</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="219"/>\r
+        <source>NumLock</source>\r
+        <translation>NumLock</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="220"/>\r
+        <source>ScrollLock</source>\r
+        <translation>ScrollLock</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="221"/>\r
+        <source>Menu</source>\r
+        <translation>メニュー</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="222"/>\r
+        <source>Help</source>\r
+        <translation>ヘルプ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="225"/>\r
+        <source>Back</source>\r
+        <translation>戻る</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="226"/>\r
+        <source>Forward</source>\r
+        <translation>進む</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="227"/>\r
+        <source>Stop</source>\r
+        <translation>停止</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="228"/>\r
+        <source>Refresh</source>\r
+        <translation>更新間隔</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="229"/>\r
+        <source>Volume Down</source>\r
+        <translation>音量を下げる</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="230"/>\r
+        <source>Volume Mute</source>\r
+        <translation>消音</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="231"/>\r
+        <source>Volume Up</source>\r
+        <translation>音量を上げる</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="232"/>\r
+        <source>Bass Boost</source>\r
+        <translation>低音ブースト</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="233"/>\r
+        <source>Bass Up</source>\r
+        <translation>低音を上げる</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="234"/>\r
+        <source>Bass Down</source>\r
+        <translation>低音を下げる</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="235"/>\r
+        <source>Treble Up</source>\r
+        <translation>高音を上げる</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="236"/>\r
+        <source>Treble Down</source>\r
+        <translation>高音を下げる</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="237"/>\r
+        <source>Media Play</source>\r
+        <translation>メディアの再生</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="238"/>\r
+        <source>Media Stop</source>\r
+        <translation>メディアの停止</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="239"/>\r
+        <source>Media Previous</source>\r
+        <translation>前のメディア</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="240"/>\r
+        <source>Media Next</source>\r
+        <translation>次のメディア</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="241"/>\r
+        <source>Media Record</source>\r
+        <translation>メディアの録音</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="242"/>\r
+        <source>Home Page</source>\r
+        <translation>ホームページ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="243"/>\r
+        <source>Favorites</source>\r
+        <translation>お気に入り</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="244"/>\r
+        <source>Search</source>\r
+        <translation>検索</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="245"/>\r
+        <source>Standby</source>\r
+        <translation>スタンバイ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="246"/>\r
+        <source>Open URL</source>\r
+        <translation>URLを開く</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="247"/>\r
+        <source>Launch Mail</source>\r
+        <translation>メールの起動</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="248"/>\r
+        <source>Launch Media</source>\r
+        <translation>メディアの起動</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="249"/>\r
+        <source>Launch (0)</source>\r
+        <translation>(0)の起動</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="250"/>\r
+        <source>Launch (1)</source>\r
+        <translation>(1)の起動</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="251"/>\r
+        <source>Launch (2)</source>\r
+        <translation>(2)の起動</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="252"/>\r
+        <source>Launch (3)</source>\r
+        <translation>(3)の起動</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="253"/>\r
+        <source>Launch (4)</source>\r
+        <translation>(4)の起動</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="254"/>\r
+        <source>Launch (5)</source>\r
+        <translation>(5)の起動</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="255"/>\r
+        <source>Launch (6)</source>\r
+        <translation>(6)の起動</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="256"/>\r
+        <source>Launch (7)</source>\r
+        <translation>(7)の起動</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="257"/>\r
+        <source>Launch (8)</source>\r
+        <translation>(8)の起動</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="258"/>\r
+        <source>Launch (9)</source>\r
+        <translation>(9)の起動</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="259"/>\r
+        <source>Launch (A)</source>\r
+        <translation>(A)の起動</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="260"/>\r
+        <source>Launch (B)</source>\r
+        <translation>(B)の起動</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="261"/>\r
+        <source>Launch (C)</source>\r
+        <translation>(C)の起動</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="262"/>\r
+        <source>Launch (D)</source>\r
+        <translation>(D)の起動</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="263"/>\r
+        <source>Launch (E)</source>\r
+        <translation>(E)の起動</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="264"/>\r
+        <source>Launch (F)</source>\r
+        <translation>(F)の起動</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="268"/>\r
+        <source>Print Screen</source>\r
+        <translation>Print Screen</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="269"/>\r
+        <source>Page Up</source>\r
+        <translation>Page Up</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="270"/>\r
+        <source>Page Down</source>\r
+        <translation>Page Down</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="271"/>\r
+        <source>Caps Lock</source>\r
+        <translation>Caps Lock</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="272"/>\r
+        <source>Num Lock</source>\r
+        <translation>Num Lock</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="273"/>\r
+        <source>Number Lock</source>\r
+        <translation>Number Lock</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="274"/>\r
+        <source>Scroll Lock</source>\r
+        <translation>Scroll Lock</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="275"/>\r
+        <source>Insert</source>\r
+        <translation>Insert</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="276"/>\r
+        <source>Delete</source>\r
+        <translation>Delete</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="277"/>\r
+        <source>Escape</source>\r
+        <translation>Escape</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="278"/>\r
+        <source>System Request</source>\r
+        <translation>System Request</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="282"/>\r
+        <source>Select</source>\r
+        <translation>Select</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="283"/>\r
+        <source>Yes</source>\r
+        <translation>はい</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="284"/>\r
+        <source>No</source>\r
+        <translation>いいえ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="288"/>\r
+        <source>Context1</source>\r
+        <translation>Context1</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="289"/>\r
+        <source>Context2</source>\r
+        <translation>Context2</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="290"/>\r
+        <source>Context3</source>\r
+        <translation>Context3</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="291"/>\r
+        <source>Context4</source>\r
+        <translation>Context4</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="292"/>\r
+        <source>Call</source>\r
+        <translation>Call</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="293"/>\r
+        <source>Hangup</source>\r
+        <translation>Hangup</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="294"/>\r
+        <source>Flip</source>\r
+        <translation>Flip</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="930"/>\r
+        <source>Ctrl</source>\r
+        <translation>Ctrl</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="934"/>\r
+        <source>Shift</source>\r
+        <translation>Shift</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="932"/>\r
+        <source>Alt</source>\r
+        <translation>Alt</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="928"/>\r
+        <source>Meta</source>\r
+        <translation>Meta</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="904"/>\r
+        <source>+</source>\r
+        <translation>+</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/kernel/qkeysequence.cpp" line="949"/>\r
+        <source>F%1</source>\r
+        <translation>F%1</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QSlider</name>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/rangecontrols.cpp" line="481"/>\r
+        <source>Page left</source>\r
+        <translation>1ページ左へスクロール</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/rangecontrols.cpp" line="481"/>\r
+        <source>Page up</source>\r
+        <translation>1ページ戻る</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/rangecontrols.cpp" line="483"/>\r
+        <source>Position</source>\r
+        <translation>位置</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/rangecontrols.cpp" line="486"/>\r
+        <source>Page right</source>\r
+        <translation>1ページ右へスクロール\r
+</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/rangecontrols.cpp" line="486"/>\r
+        <source>Page down</source>\r
+        <translation>1ページ進む</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QSocks5SocketEngine</name>\r
+    <message>\r
+        <location filename="network/qsocks5socketengine.cpp" line="1204"/>\r
+        <source>Socks5 timeout error connecting to socks server</source>\r
+        <translation>Socks5 はソックスサーバ接続しようとしてタイムアウトになりました</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QSpinBox</name>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/rangecontrols.cpp" line="143"/>\r
+        <source>More</source>\r
+        <translation>増やす</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/rangecontrols.cpp" line="145"/>\r
+        <source>Less</source>\r
+        <translation>減らす</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QSql</name>\r
+    <message>\r
+        <location filename="qt3support/sql/q3sqlmanager_p.cpp" line="878"/>\r
+        <source>Delete</source>\r
+        <translation>削除</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/sql/q3sqlmanager_p.cpp" line="879"/>\r
+        <source>Delete this record?</source>\r
+        <translation>このレコードを削除しますか?</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/sql/q3sqlmanager_p.cpp" line="932"/>\r
+        <source>Yes</source>\r
+        <translation>はい</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/sql/q3sqlmanager_p.cpp" line="933"/>\r
+        <source>No</source>\r
+        <translation>いいえ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/sql/q3sqlmanager_p.cpp" line="889"/>\r
+        <source>Insert</source>\r
+        <translation>挿入</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/sql/q3sqlmanager_p.cpp" line="891"/>\r
+        <source>Update</source>\r
+        <translation>アップデート</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/sql/q3sqlmanager_p.cpp" line="895"/>\r
+        <source>Save edits?</source>\r
+        <translation>編集内容を保存しますか?</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/sql/q3sqlmanager_p.cpp" line="898"/>\r
+        <source>Cancel</source>\r
+        <translation>キャンセル</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/sql/q3sqlmanager_p.cpp" line="930"/>\r
+        <source>Confirm</source>\r
+        <translation>確認</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="qt3support/sql/q3sqlmanager_p.cpp" line="931"/>\r
+        <source>Cancel your edits?</source>\r
+        <translation>編集をキャンセルしますか?</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QTDSDriver</name>\r
+    <message>\r
+        <location filename="sql/drivers/tds/qsql_tds.cpp" line="559"/>\r
+        <source>Unable to open connection</source>\r
+        <translation>接続を開けません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="sql/drivers/tds/qsql_tds.cpp" line="564"/>\r
+        <source>Unable to use database</source>\r
+        <translation>データベースを使用できません</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QTabBar</name>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/complexwidgets.cpp" line="615"/>\r
+        <source>Scroll Left</source>\r
+        <translation>左へスクロール</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/complexwidgets.cpp" line="615"/>\r
+        <source>Scroll Right</source>\r
+        <translation>右へスクロール</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QTcpServer</name>\r
+    <message>\r
+        <location filename="network/qtcpserver.cpp" line="220"/>\r
+        <source>Socket operation unsupported</source>\r
+        <translation>ソケット操作はサポートされていません</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QTextControl</name>\r
+    <message>\r
+        <location filename="gui/text/qtextcontrol.cpp" line="1739"/>\r
+        <source>&amp;Undo</source>\r
+        <translation>元に戻す(&amp;U)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/text/qtextcontrol.cpp" line="1741"/>\r
+        <source>&amp;Redo</source>\r
+        <translation>やり直す(&amp;R)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/text/qtextcontrol.cpp" line="1745"/>\r
+        <source>Cu&amp;t</source>\r
+        <translation>切り取り(&amp;T)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/text/qtextcontrol.cpp" line="1750"/>\r
+        <source>&amp;Copy</source>\r
+        <translation>コピー(&amp;C)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/text/qtextcontrol.cpp" line="1757"/>\r
+        <source>Copy &amp;Link Location</source>\r
+        <translation>リンクの場所をコピー(&amp;L)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/text/qtextcontrol.cpp" line="1763"/>\r
+        <source>&amp;Paste</source>\r
+        <translation>貼り付け(&amp;P)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/text/qtextcontrol.cpp" line="1766"/>\r
+        <source>Delete</source>\r
+        <translation>削除</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/text/qtextcontrol.cpp" line="1773"/>\r
+        <source>Select All</source>\r
+        <translation>すべてを選択</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QToolButton</name>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/simplewidgets.cpp" line="343"/>\r
+        <source>Press</source>\r
+        <translation>押す</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="plugins/accessible/widgets/simplewidgets.cpp" line="347"/>\r
+        <source>Open</source>\r
+        <translation>開く</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QUdpSocket</name>\r
+    <message>\r
+        <location filename="network/qudpsocket.cpp" line="140"/>\r
+        <source>This platform does not support IPv6</source>\r
+        <translation>このプラットフォームは IPv6 をサポートしていません</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QUndoGroup</name>\r
+    <message>\r
+        <location filename="gui/undo/qundogroup.cpp" line="349"/>\r
+        <source>Undo</source>\r
+        <translation>元に戻す</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/undo/qundogroup.cpp" line="377"/>\r
+        <source>Redo</source>\r
+        <translation>やり直す</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QUndoModel</name>\r
+    <message>\r
+        <location filename="gui/undo/qundoview.cpp" line="79"/>\r
+        <source>&lt;empty&gt;</source>\r
+        <translation>&lt;空&gt;</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QUndoStack</name>\r
+    <message>\r
+        <location filename="gui/undo/qundostack.cpp" line="752"/>\r
+        <source>Undo</source>\r
+        <translation>元に戻す</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/undo/qundostack.cpp" line="779"/>\r
+        <source>Redo</source>\r
+        <translation>やり直す</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QUnicodeControlCharacterMenu</name>\r
+    <message>\r
+        <location filename="gui/widgets/qtextedit.cpp" line="2499"/>\r
+        <source>LRM Left-to-right mark</source>\r
+        <translation type="unfinished"></translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qtextedit.cpp" line="2500"/>\r
+        <source>RLM Right-to-left mark</source>\r
+        <translation type="unfinished"></translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qtextedit.cpp" line="2501"/>\r
+        <source>ZWJ Zero width joiner</source>\r
+        <translation type="unfinished"></translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qtextedit.cpp" line="2502"/>\r
+        <source>ZWNJ Zero width non-joiner</source>\r
+        <translation type="unfinished"></translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qtextedit.cpp" line="2503"/>\r
+        <source>ZWSP Zero width space</source>\r
+        <translation type="unfinished"></translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qtextedit.cpp" line="2504"/>\r
+        <source>LRE Start of left-to-right embedding</source>\r
+        <translation type="unfinished"></translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qtextedit.cpp" line="2505"/>\r
+        <source>RLE Start of right-to-left embedding</source>\r
+        <translation type="unfinished"></translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qtextedit.cpp" line="2506"/>\r
+        <source>LRO Start of left-to-right override</source>\r
+        <translation type="unfinished"></translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qtextedit.cpp" line="2507"/>\r
+        <source>RLO Start of right-to-left override</source>\r
+        <translation type="unfinished"></translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qtextedit.cpp" line="2508"/>\r
+        <source>PDF Pop directional formatting</source>\r
+        <translation type="unfinished"></translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qtextedit.cpp" line="2514"/>\r
+        <source>Insert Unicode control character</source>\r
+        <translation>Unicode制御文字を挿入</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QWhatsThisAction</name>\r
+    <message>\r
+        <location filename="gui/kernel/qwhatsthis.cpp" line="493"/>\r
+        <source>What&apos;s This?</source>\r
+        <translation>ヒント</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QWidget</name>\r
+    <message>\r
+        <location filename="gui/kernel/qwidget.cpp" line="3761"/>\r
+        <source>*</source>\r
+        <translation>*</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QWorkspace</name>\r
+    <message>\r
+        <location filename="gui/widgets/qworkspace.cpp" line="912"/>\r
+        <source>&amp;Restore</source>\r
+        <translation>元に戻す(&amp;R)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qworkspace.cpp" line="913"/>\r
+        <source>&amp;Move</source>\r
+        <translation>移動(&amp;M)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qworkspace.cpp" line="914"/>\r
+        <source>&amp;Size</source>\r
+        <translation>サイズを変更(&amp;S)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qworkspace.cpp" line="916"/>\r
+        <source>Mi&amp;nimize</source>\r
+        <translation>最小化(&amp;N)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qworkspace.cpp" line="918"/>\r
+        <source>Ma&amp;ximize</source>\r
+        <translation>最大化(&amp;X)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qworkspace.cpp" line="921"/>\r
+        <source>&amp;Close</source>\r
+        <translation>閉じる(&amp;C)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qworkspace.cpp" line="926"/>\r
+        <source>Stay on &amp;Top</source>\r
+        <translation>常に手前に表示(&amp;T)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qworkspace.cpp" line="2026"/>\r
+        <source>Sh&amp;ade</source>\r
+        <translation>シェード(&amp;A)</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qworkspace.cpp" line="1770"/>\r
+        <source>%1 - [%2]</source>\r
+        <translation>%1 - [%2]</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qworkspace.cpp" line="1807"/>\r
+        <source>Minimize</source>\r
+        <translation>最小化</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qworkspace.cpp" line="1821"/>\r
+        <source>Restore Down</source>\r
+        <translation>元に戻す</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qworkspace.cpp" line="1835"/>\r
+        <source>Close</source>\r
+        <translation>閉じる</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="gui/widgets/qworkspace.cpp" line="2022"/>\r
+        <source>&amp;Unshade</source>\r
+        <translation>シェードを解除(&amp;U)</translation>\r
+    </message>\r
+</context>\r
+<context>\r
+    <name>QXml</name>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="39"/>\r
+        <source>no error occurred</source>\r
+        <translation>エラーは発生しませんでした</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="40"/>\r
+        <source>error triggered by consumer</source>\r
+        <translation>消費者によってエラーが誘発されました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="41"/>\r
+        <source>unexpected end of file</source>\r
+        <translation>予期せぬファイルの終りです</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="42"/>\r
+        <source>more than one document type definition</source>\r
+        <translation>ドキュメントタイプの定義が複数あります</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="43"/>\r
+        <source>error occurred while parsing element</source>\r
+        <translation>要素の解析中にエラーが発生しました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="44"/>\r
+        <source>tag mismatch</source>\r
+        <translation>タグが一致しません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="45"/>\r
+        <source>error occurred while parsing content</source>\r
+        <translation>コンテンツの解析中にエラーが発生しました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="46"/>\r
+        <source>unexpected character</source>\r
+        <translation>予期しない文字です</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="47"/>\r
+        <source>invalid name for processing instruction</source>\r
+        <translation>処理の指示に無効な名前です</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="48"/>\r
+        <source>version expected while reading the XML declaration</source>\r
+        <translation>XML宣言を読み込むにはバージョンが必要です</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="49"/>\r
+        <source>wrong value for standalone declaration</source>\r
+        <translation>スタンドアロン宣言として正しくない値です</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="50"/>\r
+        <source>encoding declaration or standalone declaration expected while reading the XML declaration</source>\r
+        <translation>XML宣言を読み込むにはエンコーディング宣言かスタンドアローン宣言が必要です</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="51"/>\r
+        <source>standalone declaration expected while reading the XML declaration</source>\r
+        <translation>XML宣言を読み込むにはスタンドアローン宣言が必要です</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="52"/>\r
+        <source>error occurred while parsing document type definition</source>\r
+        <translation>ドキュメントタイプの定義を解析中にエラーが発生しました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="53"/>\r
+        <source>letter is expected</source>\r
+        <translation>文字が必要です</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="54"/>\r
+        <source>error occurred while parsing comment</source>\r
+        <translation>コメントの解析中にエラーが発生しました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="55"/>\r
+        <source>error occurred while parsing reference</source>\r
+        <translation>参照の解析中にエラーが発生しました</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="56"/>\r
+        <source>internal general entity reference not allowed in DTD</source>\r
+        <translation>内部一般エンティティ参照はDTDで許されていません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="57"/>\r
+        <source>external parsed general entity reference not allowed in attribute value</source>\r
+        <translation>解析された外部一般エンティティ参照は属性値で許されていません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="58"/>\r
+        <source>external parsed general entity reference not allowed in DTD</source>\r
+        <translation>解析された外部一般エンティティ参照はDTDで許されていません</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="59"/>\r
+        <source>unparsed entity reference in wrong context</source>\r
+        <translation>不正な文脈で解析されないエンティティ参照です</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="60"/>\r
+        <source>recursive entities</source>\r
+        <translation>再帰的エンティティ</translation>\r
+    </message>\r
+    <message>\r
+        <location filename="xml/qxml.cpp" line="63"/>\r
+        <source>error in the text declaration of an external entity</source>\r
+        <translation>外部エンティティのテキスト宣言にエラーがあります</translation>\r
+    </message>\r
+</context>\r
+</TS>\r