odin-2.0.5/0000755000175000017500000000000014132240527007450 500000000000000odin-2.0.5/NEWS0000644000175000017500000000000013576370644010074 00000000000000odin-2.0.5/COPYING0000644000175000017500000004311013576370644010441 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 Library 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. Copyright (C) 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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. , 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 Library General Public License instead of this License. odin-2.0.5/missing0000755000175000017500000001533614132211560010772 00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1996-2020 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # 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, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=https://www.perl.org/ flex_URL=https://github.com/westes/flex gnu_software_URL=https://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: odin-2.0.5/odinqt/0000755000175000017500000000000014132240446010746 500000000000000odin-2.0.5/odinqt/float1d.h0000644000175000017500000000361214075732704012404 00000000000000/*************************************************************************** float1d.h - description ------------------- begin : Sun Aug 27 2000 copyright : (C) 2000-2021 by Thies Jochimsen email : thies@jochimsen.de ***************************************************************************/ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef FLOAT1D_H #define FLOAT1D_H #include "complex1d.h" /** * This class displays a float array in a nice box with title */ class floatBox1D : public complexfloatBox1D { Q_OBJECT public: floatBox1D(const float *data,int n,QWidget *parent, const char *name, bool fixed_size, const char *xAxisLabel=0, const char *yAxisLabel=0, float min_x=0.0, float max_x=0.0, bool detachable=false); floatBox1D(const double *data,int n,QWidget *parent, const char *name, bool fixed_size, const char *xAxisLabel=0, const char *yAxisLabel=0, float min_x=0.0, float max_x=0.0, bool detachable=false); public slots: void refresh(const float* data,int n, float min_x, float max_x); void refresh(const float* data,int n) {refresh (data,n,0.0,0.0);} void refresh(const double* data,int n, float min_x, float max_x); void refresh(const double* data,int n) {refresh (data,n,0.0,0.0);} }; #endif odin-2.0.5/odinqt/boolbutton.h0000644000175000017500000000325614075732705013246 00000000000000/*************************************************************************** boolbutton.h - description ------------------- begin : Sun Jul 16 2000 copyright : (C) 2000-2021 by Thies Jochimsen email : thies@jochimsen.de ***************************************************************************/ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef BOOLBUTTON_H #define BOOLBUTTON_H #include #include "odinqt.h" /** *This class provides a button with a nice frame */ class buttonBox : public QGroupBox { Q_OBJECT public: buttonBox(const char *text, QWidget *parent, const char *buttonlabel); buttonBox(const char *ontext,const char *offtext, bool initstate, QWidget *parent, const char *buttonlabel); ~buttonBox(); bool is_on() const {return gb->is_on();} public slots: void setToggleState(bool); private slots: void reportclicked(); void setButtonState(); signals: void buttonClicked(); void buttonToggled(bool); private: GuiGridLayout* grid; GuiButton* gb; }; #endif odin-2.0.5/odinqt/enumbox.cpp0000644000175000017500000000271113576370643013066 00000000000000#include // for connecting signals #include "enumbox.h" enumBox::enumBox(const svector& items,QWidget *parent,const char *name,bool editButton,bool infoButton ) : QGroupBox(name, parent ) { pb_edit=0; pb_info=0; unsigned int row=1; if(editButton) row++; if(infoButton) row++; grid=new GuiGridLayout( this, 1, row); row=0; cb = new GuiComboBox( this, items ); grid->add_widget( cb->get_widget(), 0, row ); connect( cb->get_widget(), SIGNAL(activated(int)),this, SLOT(emitNewVal(int)) ); row++; if(editButton) { pb_edit = new GuiButton( this, this, SLOT(reportEditClicked()), "Edit" ); grid->add_widget( pb_edit->get_widget(), 0, row, GuiGridLayout::VCenter ); row++; // connect( pb_edit->get_widget(), SIGNAL(clicked()), SLOT(reportEditClicked()) ); } if(infoButton) { pb_info = new GuiButton( this, this, SLOT(reportInfoClicked()), "Info" ); grid->add_widget( pb_info->get_widget(), 0, row, GuiGridLayout::VCenter ); row++; // connect( pb_info->get_widget(), SIGNAL(clicked()), SLOT(reportInfoClicked()) ); } } void enumBox::emitNewVal( int selected ) { old_val=selected; emit newVal(old_val); } void enumBox::reportEditClicked() {emit edit();} void enumBox::reportInfoClicked() {emit info();} void enumBox::setValue( int val ) { old_val=val; cb->set_current_item(val); } enumBox::~enumBox(){ delete cb; if(pb_edit) delete pb_edit; if(pb_info) delete pb_info; delete grid; } odin-2.0.5/odinqt/stringbox.cpp0000644000175000017500000000204513576370643013430 00000000000000#include "stringbox.h" stringBox::stringBox(const char* text,QWidget *parent, const char *name, const char *buttontext ) : QGroupBox(name,parent) { unsigned int ncol=1; if(buttontext) ncol++; grid=new GuiGridLayout( this, 1, ncol); le = new GuiLineEdit(this, this, SLOT(reportTextChanged())); grid->add_widget( le->get_widget(), 0, 0 ); // Create a push button pb=0; if(buttontext) { pb = new GuiButton( this, this, SLOT(reportButtonClicked()), buttontext ); grid->add_widget( pb->get_widget(), 0, 1, GuiGridLayout::VCenter ); } setstringBoxText(text); } void stringBox::reportButtonClicked() { emit stringBoxButtonPressed(); } void stringBox::reportTextChanged() { if(le->is_modified()) { emit stringBoxTextEntered(le->get_text()); } } void stringBox::setstringBoxText( const char* text ) { Log odinlog("stringBox","setstringBoxText"); ODINLOG(odinlog,normalDebug) << "text=" << text << STD_endl; le->set_text(text); } stringBox::~stringBox() { if(pb) delete pb; delete le; delete grid; } odin-2.0.5/odinqt/complex1d.cpp0000644000175000017500000002056213576370643013311 00000000000000#include // for mouse events #include "complex1d.h" #include "plot.h" complexfloatBox1D::complexfloatBox1D(const float *data1,const float *data2,int n,QWidget *parent, const char *name, bool fixed_size, const char *xAxisLabel, const char *yAxisLabelLeft, const char *yAxisLabelRight, float min_x, float max_x, bool detachable) : QGroupBox(name, parent ) { Log odinlog("complexfloatBox1D","complexfloatBox1D(const float* ...)"); common_init(name,fixed_size,data1,data2,xAxisLabel,yAxisLabelLeft,yAxisLabelRight,detachable); refresh(data1,data2,n,min_x,max_x); } complexfloatBox1D::complexfloatBox1D(const double *data1,const double *data2,int n,QWidget *parent, const char *name, bool fixed_size, const char *xAxisLabel, const char *yAxisLabelLeft, const char *yAxisLabelRight, float min_x, float max_x, bool detachable) : QGroupBox(name, parent ) { Log odinlog("complexfloatBox1D","complexfloatBox1D(const double* ...)"); common_init(name,fixed_size,data1,data2,xAxisLabel,yAxisLabelLeft,yAxisLabelRight,detachable); refresh(data1,data2,n,min_x,max_x); } void complexfloatBox1D::common_init(const char *name, bool fixed_size, bool data1, bool data2, const char *xAxisLabel, const char *yAxisLabelLeft, const char *yAxisLabelRight, bool detachable) { Log odinlog("complexfloatBox1D","common_init()"); detached=0; data1_ptr=0; data2_ptr=0; if(name) name_cache=name; if(xAxisLabel) xAxisLabel_cache=xAxisLabel; if(yAxisLabelLeft) yAxisLabelLeft_cache=yAxisLabelLeft; if(yAxisLabelRight) yAxisLabelRight_cache=yAxisLabelRight; detachable_cache=detachable; if(fixed_size) setFixedSize(_ARRAY_WIDGET_WIDTH_,_ARRAY_WIDGET_HEIGHT_); else setMinimumSize(_ARRAY_WIDGET_WIDTH_,_ARRAY_WIDGET_HEIGHT_); grid=new GuiGridLayout( this, 1, 1); plotter = new GuiPlot(this,fixed_size); ODINLOG(odinlog,normalDebug) << "xAxisLabel/yAxisLabelLeft/yAxisLabelRight=" << xAxisLabel << "/" << yAxisLabelLeft << "/" << yAxisLabelRight << STD_endl; plotter->set_x_axis_label(xAxisLabel); const char* data1_label=0; if(data1) data1_label=yAxisLabelLeft; const char* data2_label=0; if(data2) data1_label=yAxisLabelRight; plotter->set_y_axis_label(data1_label,data2_label); curveid1=0; curveid2=0; if(data1) curveid1 = plotter->insert_curve(false); if(data2) curveid2 = plotter->insert_curve(true); connect( plotter, SIGNAL(plotMousePressed(const QMouseEvent&)), SLOT(mousePressedInPlot(const QMouseEvent&)) ); connect( plotter, SIGNAL(plotMouseReleased(const QMouseEvent&)), SLOT(mouseReleasedInPlot(const QMouseEvent&)) ); grid->add_widget( plotter->get_widget(), 0, 0 ); } void complexfloatBox1D::create_x_cache(float min_x, float max_x, int n) { min_x_cache=min_x; max_x_cache=max_x; n_cache=n; int i; x_cache.resize(n); if(min_x odinlog("complexfloatBox1D","refresh(const float* ...)"); int i; ODINLOG(odinlog,normalDebug) << "data1/data2/n/min_x/max_x=" << data1 << "/" << data2 << "/" << n << "/" << min_x << "/" << max_x << STD_endl; create_x_cache(min_x, max_x, n); const double* x_arr=x_cache.c_array(); // call c_array only once data1_ptr=data2_ptr=0; if(data1) { data1_cache.resize(n); for(i=0; iset_curve_data(curveid1, x_arr, data1_ptr, n, nset_curve_data(curveid1, x_arr, data1_ptr, n, nset_curve_data(curveid2, x_arr, data2_ptr, n, nreplot(); if(detached) detached->refresh(data1_ptr,data2_ptr,n,min_x,max_x); } void complexfloatBox1D::mousePressedInPlot(const QMouseEvent& qme) { Log odinlog("complexfloatBox1D","mouseReleasedInPlot"); if(left_button(&qme,false)) { x_pressed=qme.x(); y_pressed=qme.y(); ODINLOG(odinlog,normalDebug) << "x_pressed/y_pressed=" << x_pressed << "/" << y_pressed << STD_endl; } if(right_button(&qme,false)) { GuiPopupMenu pm(this); pm.insert_item("Autoscale", this, SLOT(autoscale()), Qt::Key_F1); if(detachable_cache) pm.insert_item("Detach", this, SLOT(detach()), Qt::Key_F2); pm.popup(plotter->get_widget()->mapToGlobal(qme.pos())); } } void complexfloatBox1D::autoscale() { plotter->autoscale(); } void complexfloatBox1D::detach() { if(!detached) delete detached; detached=new DetachedComplexfloatBox1D(data1_ptr,data2_ptr,n_cache,this, name_cache.c_str(), false, xAxisLabel_cache.c_str(), yAxisLabelLeft_cache.c_str(), yAxisLabelRight_cache.c_str(), min_x_cache, max_x_cache); } void complexfloatBox1D::mouseReleasedInPlot(const QMouseEvent& qme) { Log odinlog("complexfloatBox1D","mouseReleasedInPlot"); // plotter->enable_outline(false); if(left_button(&qme,false)) { int x_released=qme.x(); int y_released=qme.y(); ODINLOG(odinlog,normalDebug) << "x_released/y_released=" << x_released << "/" << y_released << STD_endl; int low_x=x_pressed; if(x_releasedupp_x) upp_x=x_released; int upp_y=y_pressed; if(y_released>upp_y) upp_y=y_released; double x_axis_low=plotter->get_x(low_x); double x_axis_upp=plotter->get_x(upp_x); if(x_axis_lowset_x_axis_scale(x_axis_low,x_axis_upp); double y1_axis_low=plotter->get_y(upp_y); // reverse y-direction double y1_axis_upp=plotter->get_y(low_y); if(y1_axis_lowset_y_axis_scale(y1_axis_low,y1_axis_upp); ODINLOG(odinlog,normalDebug) << "y1_axis_low/y1_axis_upp=" << y1_axis_low << "/" << y1_axis_upp << STD_endl; double y2_axis_low=plotter->get_y(upp_y,true); // reverse y-direction double y2_axis_upp=plotter->get_y(low_y,true); if(y2_axis_lowset_y_axis_scale(y2_axis_low,y2_axis_upp,true); plotter->replot(); } } complexfloatBox1D::~complexfloatBox1D(){ delete plotter; delete grid; if(detached) delete detached; } ////////////////////////////////////////////////////////////////////////////////// void DetachedComplexfloatBox1D::create_grid() { grid = new GuiGridLayout( GuiDialog::get_widget(), 1, 1 ); grid->add_widget( cfb, 0, 0, GuiGridLayout::Center ); GuiDialog::show(); } DetachedComplexfloatBox1D::DetachedComplexfloatBox1D(const double *data1, const double *data2, int n,complexfloatBox1D *parent, const char *name, bool fixed_size, const char *xAxisLabel, const char *yAxisLabelLeft, const char *yAxisLabelRight, float min_x, float max_x) : GuiDialog(parent,name,false) { Log odinlog("DetachedComplexfloatBox1D","DetachedComplexfloatBox1D"); ODINLOG(odinlog,normalDebug) << "yAxisLabelLeft/xAxisLabel=" << yAxisLabelLeft << "/" << xAxisLabel << STD_endl; cfb=new complexfloatBox1D(data1, data2, n, GuiDialog::get_widget(), name, fixed_size, xAxisLabel, yAxisLabelLeft, yAxisLabelRight, min_x, max_x); create_grid(); } void DetachedComplexfloatBox1D::refresh(const double *data1,const double *data2,int n, float min_x, float max_x) { cfb->refresh(data1,data2,n,min_x,max_x); } DetachedComplexfloatBox1D::~DetachedComplexfloatBox1D() { delete grid; delete cfb; } odin-2.0.5/odinqt/odinqt_callback.h0000644000175000017500000000554013576370643014173 00000000000000#include #include #include #include #include #include "odinqt.h" #if QT_VERSION > 0x03FFFF #define QT_VERSION_4 #else #if QT_VERSION > 299 #define QT_VERSION_3 #else #define QT_VERSION_PRE3 #endif #endif /** * This class dispatches calls of Qt slots to virtual member functions */ class SlotDispatcher : public QObject { Q_OBJECT public: SlotDispatcher(GuiListView* glv, GuiListViewCallback* glv_cb) { glv_cache=glv; glv_cb_cache=glv_cb; #ifdef QT_VERSION_4 connect(glv->get_widget(), SIGNAL(itemClicked(QTableWidgetItem*)), this, SLOT(qtwi_clicked(QTableWidgetItem*)) ); #else connect(glv->get_widget(), SIGNAL(clicked(QListViewItem*)), this, SLOT(qlvi_clicked(QListViewItem*)) ); #endif } SlotDispatcher(GuiToolButton* gtb, QObject* receiver, const char* member) { if(receiver) connect(gtb->qtb, SIGNAL(clicked()), receiver, member ); } SlotDispatcher(GuiButton* gb, QObject* receiver, const char* member) { if(receiver) connect(gb->qpb, SIGNAL(clicked()), receiver, member ); } SlotDispatcher(GuiLineEdit* gle, QObject* receiver, const char* member) { if(receiver) { #ifdef QT_VERSION_4 connect(gle->qle, SIGNAL(editingFinished()), receiver, member ); #else #ifdef QT_VERSION_3 connect(gle->qle, SIGNAL(lostFocus()), receiver, member ); // only available on Qt3 #endif connect(gle->qle, SIGNAL(returnPressed()), receiver, member ); #endif } } public slots: void qlvi_clicked(QListViewItem* item) { #ifndef QT_VERSION_4 Log odinlog("SlotDispatcher","qlvi_clicked"); ODINLOG(odinlog,normalDebug) << "item=" << item << STD_endl; if(!glv_cb_cache) return; GuiListItem* itemptr=0; GuiListItem(); // create listmap ODINLOG(odinlog,normalDebug) << "GuiListItem(); done" << STD_endl; STD_map::iterator it=GuiListItem::listmap->find(item); if(it!=GuiListItem::listmap->end()) itemptr=it->second; ODINLOG(odinlog,normalDebug) << "itemptr=" << itemptr << STD_endl; glv_cb_cache->clicked(itemptr); #endif } void qtwi_clicked(QTableWidgetItem* item) { #ifdef QT_VERSION_4 Log odinlog("SlotDispatcher","qtwi_clicked"); ODINLOG(odinlog,normalDebug) << "item=" << item << STD_endl; if(!glv_cb_cache) return; GuiListItem* itemptr=0; GuiListItem(); // create tablemap ODINLOG(odinlog,normalDebug) << "GuiListItem(); done" << STD_endl; STD_map::iterator it=GuiListItem::tablemap->find(item); if(it!=GuiListItem::tablemap->end()) itemptr=it->second; ODINLOG(odinlog,normalDebug) << "itemptr=" << itemptr << STD_endl; glv_cb_cache->clicked(itemptr); #endif } private: void common_int() { glv_cache=0; glv_cb_cache=0; } GuiListView* glv_cache; GuiListViewCallback* glv_cb_cache; }; odin-2.0.5/odinqt/float2d.h0000644000175000017500000000767114075732705012417 00000000000000/*************************************************************************** float2d.h - description ------------------- begin : Sun Aug 27 2000 copyright : (C) 2000-2021 by Thies Jochimsen email : thies@jochimsen.de ***************************************************************************/ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef FLOAT2D_H #define FLOAT2D_H #include #include "odinqt.h" #include "plot.h" class QPixmap; // forward declaration /** * QLabel containing a QPixmap to draw 2D float array */ class floatLabel2D : public QLabel { Q_OBJECT public: floatLabel2D(const float *data, float lowbound, float uppbound, unsigned int nx, unsigned int ny, bool disable_scale, unsigned int coarseFactor, QWidget *parent, const char *name, const float *overlay_map, float lowbound_map, float uppbound_map, unsigned int nx_map, unsigned int ny_map, bool map_firescale, float map_rectsize, bool colormap); ~floatLabel2D(); int xpos2labelxpos(int pos); int ypos2labelypos(int pos); int labelxpos2xpos(int pos); int labelypos2ypos(int pos); int xypos2index(int xpos,int ypos); unsigned int get_nx() const {return nx_cache;} unsigned int get_ny() const {return ny_cache;} void init_pixmap(bool clear=true); void set_pixmap(); void write_pixmap(const char* fname, const char* format) const; void write_legend(const char* fname, const char* format) const; QLabel* get_map_legend(QWidget *parent) const; void write_map_legend(const char* fname, const char* format) const; QPixmap *pixmap; protected: void mousePressEvent (QMouseEvent *); void mouseReleaseEvent (QMouseEvent *); void mouseMoveEvent ( QMouseEvent * ); public slots: void refresh(const float *data, float lowbound, float uppbound); void refreshMap(const float *map, float map_lowbound, float map_uppbound, float rectsize); private slots: void drawprofil(int position,int direction); void drawcross(int xposition,int yposition); void drawroi(); signals: void clicked(int xposition,int yposition); void newProfile(const float *data, int npts, bool horizontal, int position); void newMask(const float *data); private: static int scale_width(float lowbound, float uppbound); void draw_text(GuiPainter& gp, int xpos, int ypos, const char* txt) const; void draw_scale_text(GuiPainter& gp, int xpos, int ypos, float val) const; static int check_range(int val, int min, int max); int get_map_hue(float relval) const; int get_map_value(float relval) const; int get_map_saturation(float relval) const; int get_scale_size() const; // takes disable_scale into account bool disable_scale_cache; GuiPainter* roi_painter; mutable QPixmap* maplegend_pixmap; unsigned char* imagebuff; unsigned int len; const float* data_cache; unsigned int nx_cache; unsigned int ny_cache; mutable int scale_size_cache; float lowbound_cache; float uppbound_cache; unsigned int nx_map_cache; unsigned int ny_map_cache; float lowbound_map_cache; float uppbound_map_cache; bool fire_map_cache; float *profile_x; float *profile_y; unsigned int coarseFactor_cache; bool colormap_cache; long unsigned int i; STD_list roi_polygon; float* roi_mask; bool mouse_moved; }; #endif odin-2.0.5/odinqt/float2d.cpp0000644000175000017500000004262313576370643012752 00000000000000#include // for mouse events #include #include #include "float2d.h" #include #include #define LOGMAP_FACTOR 2 #define LEGEND_DIGITS 3 #define MAX_LOGMAP_HUE 70.0 #define MAX_MAP_HUE 270.0 #define X_ENUM 0 #define Y_ENUM 1 #define CROSSHAIR_SIZE 4 #define MAP_RECT_SIZE 0.8 void floatArray2pixbuff(unsigned char* imagebuff, const float* farray, int nx, int ny, int coarseFactor, int scalespace) { Log odinlog("floatLabel2D","floatArray2pixbuff"); int nx_aligned=((nx*coarseFactor+scalespace+3)/4)*4; // 32-bit aligned lines for QImage ODINLOG(odinlog,normalDebug) << "nx_aligned/nx/ny/coarseFactor/scalespace=" << nx_aligned << "/" << nx << "/" << ny << "/" << coarseFactor << "/" << scalespace << STD_endl; int i,j; // Draw data for (j = 0; j < ny; j++) { int jrev=ny-1-j; for (i = 0; i < nx; i++) { float floatval = farray[j * nx + i]; if (floatval > 1.0) floatval = 1.0; if (floatval < 0.0) floatval = 0.0; unsigned char byteval = (unsigned char) (255.0 * floatval); for (int jj = 0; jj < coarseFactor; jj++) { for (int ii = 0; ii < coarseFactor; ii++) { imagebuff[(jrev * coarseFactor + jj) * nx_aligned + (i * coarseFactor + ii)] = byteval; } } } // Draw scale float floatval = float(j)/float(ny-1); unsigned char byteval = (unsigned char) (255.0 * floatval + 0.5); for (i = (nx*coarseFactor); i < nx_aligned; i++) { for (int jj = 0; jj < coarseFactor; jj++) { imagebuff[(jrev * coarseFactor + jj) * nx_aligned + i] = byteval; } } } } floatLabel2D::floatLabel2D(const float *data, float lowbound, float uppbound, unsigned int nx, unsigned int ny, bool disable_scale, unsigned int coarseFactor, QWidget *parent, const char *name, const float *overlay_map, float lowbound_map, float uppbound_map, unsigned int nx_map, unsigned int ny_map, bool map_firescale, float map_rectsize, bool colormap) : QLabel(parent ) { Log odinlog("floatLabel2D","floatLabel2D"); ODINLOG(odinlog,normalDebug) << "nx/ny/coarseFactor=" << nx << "/" << ny << "/" << coarseFactor << STD_endl; colormap_cache=colormap; pixmap=0; maplegend_pixmap=0; scale_size_cache=-1; // -1 means that it has to be initialized by get_scale_size() nx_cache=nx; ny_cache=ny; nx_map_cache=nx_map; ny_map_cache=ny_map; fire_map_cache=map_firescale; lowbound_map_cache=lowbound_map; uppbound_map_cache=uppbound_map; ODINLOG(odinlog,normalDebug) << "lowbound_map_cache/uppbound_map_cache=" << lowbound_map_cache << "/" << uppbound_map_cache << STD_endl; lowbound_cache=lowbound; uppbound_cache=uppbound; ODINLOG(odinlog,normalDebug) << "lowbound/uppbound=" << lowbound << "/" << uppbound << STD_endl; disable_scale_cache=disable_scale; roi_mask=new float[nx_cache*ny_cache]; profile_x=new float[nx_cache]; for(i=0;isetFixedSize( (nx*coarseFactor+get_scale_size())+this->frameWidth()*2,ny*coarseFactor+this->frameWidth()*2 ); connect(this,SIGNAL(clicked(int,int)),this,SLOT(drawcross(int,int))); refresh(data, lowbound, uppbound); refreshMap(overlay_map, lowbound_map, uppbound_map_cache, map_rectsize); } void floatLabel2D::init_pixmap(bool clear) { Log odinlog("floatLabel2D","init_pixmap"); if(clear || !pixmap) { if(pixmap) delete pixmap; floatArray2pixbuff(imagebuff, data_cache, nx_cache, ny_cache, coarseFactor_cache, get_scale_size()); GuiImage img( imagebuff, nx_cache*coarseFactor_cache+get_scale_size(), ny_cache*coarseFactor_cache, colormap_cache); pixmap = img.create_pixmap(); GuiPainter gp(pixmap); draw_scale_text(gp, nx_cache*coarseFactor_cache, 3*_FONT_SIZE_/2, uppbound_cache); draw_scale_text(gp, nx_cache*coarseFactor_cache, ny_cache*coarseFactor_cache-_FONT_SIZE_/2, lowbound_cache); gp.end(); } } void floatLabel2D::set_pixmap() { Log odinlog("floatLabel2D","set_pixmap"); // bitBlt( this, 2, 2, pixmap ); ODINLOG(odinlog,normalDebug) << "pixmap=" << (void*)pixmap << STD_endl; this->setPixmap(*pixmap); } int floatLabel2D::scale_width(float lowbound, float uppbound) { Log odinlog("floatLabel2D","scale_width"); int low_length=ftos(lowbound,LEGEND_DIGITS).length(); int upp_length=ftos(uppbound,LEGEND_DIGITS).length(); ODINLOG(odinlog,normalDebug) << "low_length/upp_length=" << low_length << "/" << upp_length << STD_endl; return STD_max(low_length,upp_length)*_FONT_SIZE_; } void floatLabel2D::draw_text(GuiPainter& gp, int xpos, int ypos, const char* txt) const { gp.drawText(xpos+1,ypos+1,txt,"Black"); gp.drawText(xpos, ypos, txt,"White"); } void floatLabel2D::draw_scale_text(GuiPainter& gp, int xpos, int ypos, float val) const { draw_text(gp, xpos, ypos, ftos(val,LEGEND_DIGITS).c_str()); } void floatLabel2D::refresh(const float* data, float lowbound, float uppbound) { data_cache=data; lowbound_cache=lowbound; uppbound_cache=uppbound; init_pixmap(); set_pixmap(); } void floatLabel2D::write_pixmap(const char* fname, const char* format) const { if(pixmap && fname) pixmap->save (fname,toupperstr(format).c_str()); } int floatLabel2D::get_map_hue(float relval) const { float hue_factor=1.0; if(fire_map_cache) hue_factor=0.25; else relval=1.0-relval; relval=STD_max(float(0.0),relval); relval=STD_min(float(1.0),relval); if (fire_map_cache) { // fmri coloring // adjust balance between red, orange and yellow ... more red, less orange if (relval < 0.25) // more red relval = 0.0; else if ((relval > 0.6) && (relval < 0.7)) // small transition orange to yellow relval = (0.7 - 7.0 / 15.0) / 0.1 * (relval - 0.6) + 7.0 / 15.0; else if (relval > 0.7) relval = relval; else relval = (relval - 0.25) * (4.0 / 3.0); } return MAX_MAP_HUE*hue_factor*relval; } int floatLabel2D::get_map_value(float relval) const { if ((relval < 0.4) && (fire_map_cache)) // darken lower values -> dark red return 255-255*(0.4 - relval); else return 255; } int floatLabel2D::get_map_saturation(float relval) const { if ((relval > 0.8) && (fire_map_cache)) // remove saturation for highest values -> white color return 255-255*(relval-0.8)*5; else return 255; } int floatLabel2D::get_scale_size() const { if(disable_scale_cache) return 0; if(scale_size_cache<0) scale_size_cache=scale_width(lowbound_cache, uppbound_cache); return scale_size_cache; } void floatLabel2D::write_legend(const char* fname, const char* format) const { Log odinlog("floatLabel2D","write_legend"); int width=scale_width(lowbound_cache, uppbound_cache); int nx_aligned_scale=((width+3)/4)*4; // 32-bit aligned lines for QImage int buffsize_scale=nx_aligned_scale*ny_cache*coarseFactor_cache; ODINLOG(odinlog,normalDebug) << "width/nx_aligned_scale/buffsize_scale=" << width << "/" << nx_aligned_scale << "/" << buffsize_scale << STD_endl; unsigned char* imagebuff_scale=(unsigned char*)new int[buffsize_scale/sizeof(int)+1]; // get 32-bit aligned data for QImage for(int i=0; isave(fname, toupperstr(format).c_str()); delete legend_pixmap; delete[] imagebuff_scale; } QLabel* floatLabel2D::get_map_legend(QWidget *parent) const { QLabel* result=new QLabel(parent); int width=6*_FONT_SIZE_; int height=ny_cache*coarseFactor_cache; maplegend_pixmap = new QPixmap(width,height); GuiPainter *maplegend_painter = new GuiPainter(maplegend_pixmap); QColor qc; QColor qc_txt("Black"); for(int iy=0; iyfillRect (0,iy,width,1,qc); draw_text(*maplegend_painter, 0, 1.5*_FONT_SIZE_, ftos(uppbound_map_cache,LEGEND_DIGITS).c_str()); draw_text(*maplegend_painter, 0, ny_cache*coarseFactor_cache-_FONT_SIZE_/2, ftos(lowbound_map_cache,LEGEND_DIGITS).c_str()); } result->setPixmap(*maplegend_pixmap); return result; } void floatLabel2D::write_map_legend(const char* fname, const char* format) const { if(maplegend_pixmap && fname) maplegend_pixmap->save(fname, toupperstr(format).c_str()); } void floatLabel2D::refreshMap(const float* map, float map_lowbound, float map_uppbound, float map_rectsize) { Log odinlog("floatLabel2D","refreshMap"); ODINLOG(odinlog,normalDebug) << "map=" << (void*)map << STD_endl; ODINLOG(odinlog,normalDebug) << "map_lowbound/map_uppbound=" << map_lowbound << "/" << map_uppbound << STD_endl; if(!map) return; init_pixmap(); GuiPainter *painter = new GuiPainter(pixmap); float regridfactor_x=float(nx_cache)/float(nx_map_cache); float regridfactor_y=float(ny_cache)/float(ny_map_cache); if(map_rectsize<0.1) map_rectsize=0.1; if(map_rectsize>1.0) map_rectsize=1.0; int width =int(map_rectsize*float(coarseFactor_cache)*regridfactor_x+0.5); if(width<=0) width=1; int height=int(map_rectsize*float(coarseFactor_cache)*regridfactor_y+0.5); if(height<=0) height=1; ODINLOG(odinlog,normalDebug) << "regridfactor_x/regridfactor_y/width/height=" << regridfactor_x << "/" << regridfactor_y << "/" << width << "/" << height << STD_endl; QColor qc; for(unsigned int iym=0; iymmap_lowbound && mapval<=map_uppbound) { float relval=secureDivision(mapval-map_lowbound,map_uppbound-map_lowbound); qc.setHsv(get_map_hue(relval),get_map_saturation(relval),get_map_value(relval)); int lx=int(float(ixm)*regridfactor_x*float(coarseFactor_cache)+0.5); int ly=int(float(ny_map_cache-1-iym)*regridfactor_y*float(coarseFactor_cache)+0.5); painter->fillRect (lx,ly,width,height,qc); } } } painter->end(); set_pixmap(); delete painter; } void floatLabel2D::mousePressEvent(QMouseEvent *e) { Log odinlog("floatLabel2D","mousePressEvent"); if ( left_button(e,false) ) { ODINLOG(odinlog,normalDebug) << "left_button" << STD_endl; roi_polygon.clear(); roi_painter = new GuiPainter(pixmap); roi_painter->moveTo(e->x(),e->y()); mouse_moved=false; } if( middle_button(e,false) ) { ODINLOG(odinlog,normalDebug) << "middle_button" << STD_endl; drawprofil(labelxpos2xpos(e->x()),X_ENUM); } if( right_button(e,false) ) { ODINLOG(odinlog,normalDebug) << "right_button" << STD_endl; drawprofil(labelypos2ypos(e->y()),Y_ENUM); } } void floatLabel2D::mouseReleaseEvent (QMouseEvent *e) { Log odinlog("floatLabel2D","mouseReleaseEvent"); if ( left_button(e,false) ) { ODINLOG(odinlog,normalDebug) << "Qt::LeftButton used" << STD_endl; roi_painter->end(); delete roi_painter; if(mouse_moved) { ODINLOG(odinlog,normalDebug) << "calling drawroi()" << STD_endl; drawroi(); } else { int xcross=labelxpos2xpos(e->x()); int ycross=labelypos2ypos(e->y()); if(xcross>=0 && xcross=0 && ycrossx(),e->y())); roi_painter->lineTo(e->x(),e->y()); roi_painter->repaint(this); mouse_moved=true; } } int floatLabel2D::check_range(int val, int min, int max) { int result=val; if(result=max) result=max-1; return result; } int floatLabel2D::xpos2labelxpos(int pos) { int result=int((float(pos)+0.5)*float(coarseFactor_cache)); return result; // return check_range(result, 0, nx_cache*coarseFactor_cache); // does not work with out-of-FOV slices in geoedit } int floatLabel2D::ypos2labelypos(int pos) { int result=int((float(ny_cache)-1.0-float(pos)+0.5)*float(coarseFactor_cache)); return result; // return check_range(result, 0, ny_cache*coarseFactor_cache); // does not work with out-of-FOV slices in geoedit } int floatLabel2D::labelxpos2xpos(int pos) { int result=(pos/coarseFactor_cache); return check_range(result, 0, nx_cache); } int floatLabel2D::labelypos2ypos(int pos) { int result=(ny_cache-1-pos/coarseFactor_cache); return check_range(result, 0, ny_cache); } int floatLabel2D::xypos2index(int xpos,int ypos) { int result=ypos*nx_cache+xpos; return check_range(result, 0, nx_cache*ny_cache); } void floatLabel2D::drawprofil(int clickpos,int direction) { Log odinlog("floatLabel2D","drawprofil"); unsigned int j; int ix,iy,profpos; init_pixmap(); GuiPainter *painter = new GuiPainter(pixmap); painter->setPen("Green"); switch (direction) { case X_ENUM: painter->moveTo(xpos2labelxpos(clickpos),0);painter->lineTo(xpos2labelxpos(clickpos),ny_cache*coarseFactor_cache); break; case Y_ENUM: painter->moveTo(0,ypos2labelypos(clickpos));painter->lineTo(nx_cache*coarseFactor_cache,ypos2labelypos(clickpos)); break; } ODINLOG(odinlog,normalDebug) << "moveTo done" << STD_endl; painter->setPen("Red"); switch (direction) { case X_ENUM: ODINLOG(odinlog,normalDebug) << "X point" << STD_endl; profpos=int((float)(nx_cache-1)*data_cache[xypos2index(clickpos,0)]); ix=xpos2labelxpos(profpos); iy=ypos2labelypos(0); painter->moveTo(ix,iy); if(ny_cache) profile_y[0]=data_cache[xypos2index(clickpos,0)]; for(j=1; jlineTo(ix,iy); } emit newProfile(profile_y,ny_cache,false,clickpos); break; case Y_ENUM: ODINLOG(odinlog,normalDebug) << "Y point" << STD_endl; ix=xpos2labelxpos(0); profpos=int((float)(ny_cache-1)*data_cache[xypos2index(0,clickpos)]); iy=ypos2labelypos(profpos); ODINLOG(odinlog,normalDebug) << "profpos/iy=" << profpos << "/" << iy << STD_endl; painter->moveTo(ix,iy); if(nx_cache) profile_x[0]=data_cache[xypos2index(0,clickpos)]; for(j=1; jlineTo(ix,iy); } emit newProfile(profile_x,nx_cache,true,clickpos); break; } painter->end(); ODINLOG(odinlog,normalDebug) << "painter done" << STD_endl; set_pixmap(); delete painter; } void floatLabel2D::drawcross(int xpos,int ypos) { Log odinlog("floatLabel2D","drawcross"); ODINLOG(odinlog,normalDebug) << "xpos/ypos=" << xpos << "/" << ypos << STD_endl; // position will be centered on voxel by the transformation functions int centerx=xpos2labelxpos(xpos); int centery=ypos2labelypos(ypos); ODINLOG(odinlog,normalDebug) << "centerx/centery=" << centerx << "/" << centery << STD_endl; init_pixmap(); GuiPainter *painter = new GuiPainter(pixmap); painter->setPen(_ARRAY_SELECTION_COLOR_); painter->moveTo(centerx-CROSSHAIR_SIZE,centery); painter->lineTo(centerx+CROSSHAIR_SIZE,centery); painter->moveTo(centerx,centery-CROSSHAIR_SIZE); painter->lineTo(centerx,centery+CROSSHAIR_SIZE); painter->end(); set_pixmap(); delete painter; } void floatLabel2D::drawroi() { Log odinlog("floatLabel2D","mouseReleaseEvent"); init_pixmap(); GuiPainter *painter = new GuiPainter(pixmap); QRegion* rgn=painter->draw_region(roi_polygon); painter->end(); set_pixmap(); delete painter; if(rgn) { for(unsigned int iy=0; iycontains ( QPoint(xpos2labelxpos(ix),ypos2labelypos(iy)) ) ) roi_mask[iy*nx_cache+ix]=1.0; else roi_mask[iy*nx_cache+ix]=0.0; } } // for(unsigned int i=0; i<(nx_cache*ny_cache); i++) roi_mask[i]=secureDivision(roi_mask[i],double(npoints)); delete rgn; ODINLOG(odinlog,normalDebug) << "emitting newMask" << STD_endl; emit newMask(roi_mask); } } floatLabel2D::~floatLabel2D(){ delete[] imagebuff; // delete[] data_cache; delete[] profile_x; delete[] profile_y; delete[] roi_mask; } odin-2.0.5/odinqt/enumbox.h0000644000175000017500000000323514075732704012530 00000000000000/*************************************************************************** enumbox.h - description ------------------- begin : Tue May 29 2001 copyright : (C) 2000-2021 by Thies Jochimsen email : thies@jochimsen.de ***************************************************************************/ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef ENUMBOX_H #define ENUMBOX_H #include #include "odinqt.h" /** * This class provides a combobox with a nice frame */ class enumBox : public QGroupBox { Q_OBJECT public: enumBox(const svector& items,QWidget *parent,const char *name,bool editButton=false,bool infoButton=false); ~enumBox(); public slots: void setValue( int val ); signals: void newVal( int val ); void edit(); void info(); private slots: void emitNewVal(int val); void reportEditClicked(); void reportInfoClicked(); private: int old_val; GuiComboBox* cb; GuiButton* pb_edit; GuiButton* pb_info; GuiGridLayout* grid; }; #endif odin-2.0.5/odinqt/intedit.h0000644000175000017500000000557414075732704012523 00000000000000/*************************************************************************** intedit.h - description ------------------- begin : Sun Aug 27 2000 copyright : (C) 2000-2021 by Thies Jochimsen email : thies@jochimsen.de ***************************************************************************/ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef INTEDIT_H #define INTEDIT_H #include #include "odinqt.h" /** * This class implements a line edit with int values only. */ class intLineEdit : public QObject { Q_OBJECT public: intLineEdit(int minValue, int maxValue, int value, QWidget *parent, const char *name, int width, int height ); ~intLineEdit(); QWidget* get_widget() {return gle->get_widget();} public slots: void setintLineEditValue( int value ); private slots: void emitSignal( ); signals: void intLineEditValueChanged( int value ); private: void set_value(int value); GuiLineEdit* gle; }; //////////////////////////////////////////////////////////// /** * This class contains a intlineedit to display an int value * in a nice box with a label. */ class intLineBox : public QGroupBox { Q_OBJECT public: intLineBox(int value, QWidget *parent, const char *name); ~intLineBox(); public slots: void setintLineBoxValue( int value ); private slots: void emitSignal( int value ); signals: void intLineBoxValueChanged( int value ); void SignalToChild( int value ); private: GuiGridLayout* grid; intLineEdit *le; }; //////////////////////////////////////////////////////////// /** * This class implements a slider useful for scientific applications * by composing a QSlider(int values) and a intLineEdit into one widget. */ class intScientSlider : public QGroupBox { Q_OBJECT public: intScientSlider(int minValue, int maxValue, int Step, int value, QWidget *parent, const char *name); ~intScientSlider(); public slots: void setintScientSliderValue( int value ); private slots: void emitSignal( int value ); signals: void intScientSliderValueChanged( int value ); private: int value; GuiSlider* slider; GuiGridLayout* grid; intLineEdit *le; }; //////////////////////////////////////////////////////////// #endif odin-2.0.5/odinqt/stringbox.h0000644000175000017500000000323114075732704013066 00000000000000/*************************************************************************** intedit.h - description ------------------- begin : Sun Aug 27 2000 copyright : (C) 2000-2021 by Thies Jochimsen email : thies@jochimsen.de ***************************************************************************/ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef STRINGBOX_H #define STRINGBOX_H #include #include "odinqt.h" /** * This class contains a QlineEdit to display a string * in a nice box with a label. */ class stringBox : public QGroupBox { Q_OBJECT public: stringBox(const char* text, QWidget *parent, const char *name, const char *buttontext=0); ~stringBox(); public slots: void setstringBoxText( const char* text ); private slots: void reportTextChanged(); void reportButtonClicked(); signals: void stringBoxTextEntered( const char* text ); void stringBoxButtonPressed(); private: GuiGridLayout* grid; GuiLineEdit* le; GuiButton* pb; }; #endif odin-2.0.5/odinqt/ldrblockwidget.cpp0000644000175000017500000002310613576370643014412 00000000000000#include "ldrwidget.h" #include "ldrblockwidget.h" ///////////////////////////////////////////////////////////////////////////// LDRblockGrid::LDRblockGrid(LDRblock& block,unsigned int columns,QWidget *parent,const char* omittext) : QWidget(parent), val(block) { Log odinlog(&block,"LDRblockGrid(...)"); grid=0; STD_list subwidgets; STD_list::iterator it; unsigned int numof_pars=block.numof_pars(); LDRbase* ldrptr; // fill list with subwidgets for(unsigned int i=0;iget_jdx_props().userdef_parameter && (ldrptr->get_parmode()!=hidden)) { LDRwidget* ldrwidget=0; LDRblock* blockdummy=0; blockdummy=ldrptr->cast(blockdummy); if(blockdummy) { unsigned int cols4block=1; if(blockdummy->numof_pars()>5) cols4block=2; ldrwidget=new LDRwidget(*ldrptr,cols4block,this,false,omittext); } else ldrwidget=new LDRwidget(*ldrptr,1,this,false,omittext); subwidgets.push_back(ldrwidget); } } unsigned int n_widget_rows=0; unsigned int rowheight=0; unsigned int colstart=0; // calculate n_widget_rows layout for(it=subwidgets.begin(); it!=subwidgets.end(); ++it) { unsigned int colwidth=(*it)->get_cols(); if( (colstart+colwidth) > 2 ) { // goto new row n_widget_rows+=rowheight; colstart=0; rowheight=0; } ODINLOG(odinlog,normalDebug) << "rows(" << (*it)->get_label() << ")=" << (*it)->get_rows() << STD_endl; if ( (*it)->get_rows() > rowheight ) rowheight=(*it)->get_rows(); colstart+=colwidth; } n_widget_rows+=rowheight; ODINLOG(odinlog,normalDebug) << "n_widget_rows/columns" << n_widget_rows << "/" << columns << STD_endl; unsigned int rows=(n_widget_rows/columns); // if(n_widget_rows%columns) rows++; rows++; unsigned int irow=0; unsigned int icolumn=0; rowheight=0; colstart=0; grid = new GuiGridLayout( this, rows , columns*2); ODINLOG(odinlog,normalDebug) << "creating " << rows << "x" << columns*2 << " grid" << STD_endl; for(it=subwidgets.begin(); it!=subwidgets.end(); ++it) { unsigned int colwidth=(*it)->get_cols(); if( (colstart+colwidth) > 2 ) { // goto new row irow+=rowheight; colstart=0; rowheight=0; } // rowheight=(*it)->get_rows(); if ( (*it)->get_rows() > rowheight ) rowheight=(*it)->get_rows(); if( (irow+rowheight) > rows ) { icolumn++; irow=0; } unsigned int coloffset=2*icolumn+colstart; unsigned int rowoffset=irow; colstart+=colwidth; int rowstart=rowoffset; // int rowend=rowoffset+rowheight-1; // int colstart=coloffset; // int colend=coloffset+colwidth-1; ODINLOG(odinlog,normalDebug) << (*it)->get_label() << " at " << "(" << rowstart << "-" << coloffset << "," << rowheight << "-" << colwidth << ")" << STD_endl; grid->add_widget( (*it), rowoffset, coloffset, GuiGridLayout::VCenter, rowheight, colwidth ); connect((*it),SIGNAL(valueChanged()),this,SLOT(emitValueChanged())); connect(this,SIGNAL(updateSubWidget()),(*it),SLOT(updateWidget())); connect(this,SIGNAL(deleteSubDialogs()),(*it),SLOT(deleteDialogs())); } } void LDRblockGrid::updateWidget() { for(STD_list::iterator it=subdialogs.begin(); it!=subdialogs.end(); ++it) { (*it)->updateWidget(); } emit updateSubWidget(); } void LDRblockGrid::deleteDialogs() { emit deleteSubDialogs(); } void LDRblockGrid::createDialog() { Log odinlog(&val,"createDialog"); LDRwidgetDialog* dlg=new LDRwidgetDialog(val,1,this); subdialogs.push_back(dlg); connect(dlg,SIGNAL(valueChanged()), this,SLOT(emitValueChanged())); emit valueChanged(); } ///////////////////////////////////////////////////////////////////////////// LDRblockScrollView::LDRblockScrollView(LDRblock& block,unsigned int columns,QWidget *parent,const char* omittext) { Log odinlog(&block,"LDRblockScrollView(...)"); ldrgrid=new LDRblockGrid(block,columns,parent,omittext); connect(ldrgrid,SIGNAL(valueChanged()),this,SLOT(emitValueChanged())); scroll=new GuiScroll(ldrgrid,parent); } LDRblockScrollView::~LDRblockScrollView() { delete scroll; } ///////////////////////////////////////////////////////////////////////////// LDRblockWidget::LDRblockWidget(LDRblock& ldrblock,unsigned int columns,QWidget *parent,bool doneButton,bool is_dialog,const char* omittext, bool storeLoadButtons, bool readonly) : QGroupBox(ldrblock.get_label().c_str(), parent ), parblock(ldrblock) { Log odinlog(&ldrblock,"LDRblockWidget(...)"); pb_done=0; pb_edit=0; pb_store=0; pb_load=0; grid=0; ldrscroll=0; noeditlist=0; if(ldrblock.is_embedded() || is_dialog) { int height=1; if(doneButton || storeLoadButtons) height=2; grid=new GuiGridLayout(this, height, 3); // if(ldrblock.get_parmode()==noedit) { if(readonly) { ODINLOG(odinlog,normalDebug) << "noedit mode" << STD_endl; svector columns; columns.resize(4); columns[0]="Name"; columns[1]="Value"; columns[2]="Unit"; columns[3]="Description"; noeditlist=new GuiListView(this, columns); grid->add_widget( noeditlist->get_widget(), 0, 0, GuiGridLayout::Default, 1, 3); unsigned int n=ldrblock.numof_pars(); noedititems.resize(n); for(unsigned int i=0; iset_default(true); pb_dummy->get_widget()->hide(); } if(doneButton) { pb_done = new GuiButton( this, this, SLOT(emitDone()), "Done" ); pb_done->set_default(false); grid->add_widget( pb_done->get_widget(), 1, 2, GuiGridLayout::Center ); // connect( pb_done->get_widget(), SIGNAL(clicked()), this,SLOT(emitDone()) ); } if(storeLoadButtons) { pb_store = new GuiButton( this, this, SLOT(storeBlock()), "Store ..." ); pb_load = new GuiButton( this, this, SLOT(loadBlock()), "Load ..." ); pb_store->set_default(false); pb_load->set_default(false); grid->add_widget( pb_store->get_widget(), 1, 0, GuiGridLayout::Center ); grid->add_widget( pb_load->get_widget(), 1, 1, GuiGridLayout::Center ); // connect( pb_store->get_widget(), SIGNAL(clicked()), this,SLOT(storeBlock()) ); // connect( pb_load->get_widget(), SIGNAL(clicked()), this,SLOT(loadBlock()) ); } } else { // if(block.is_embedded()) ldrscroll=new LDRblockScrollView(ldrblock,columns,0,omittext); connect(ldrscroll,SIGNAL(valueChanged()),this,SLOT(emitValueChanged())); grid=new GuiGridLayout( this, 1 , 1); pb_edit = new GuiButton( this, this, SLOT(createDialog()), "Edit" ); grid->add_widget( pb_edit->get_widget(), 0, 0, GuiGridLayout::Center ); // connect( pb_edit->get_widget(), SIGNAL(clicked()), this,SLOT(createDialog()) ); } } void LDRblockWidget::createDialog() { Log odinlog("LDRblockWidget","createDialog"); ODINLOG(odinlog,normalDebug) << "ldrscroll=" << ldrscroll << STD_endl; if(ldrscroll) ldrscroll->createDialog(); } LDRblockWidget::~LDRblockWidget() { if(pb_done) delete pb_done; if(pb_store) delete pb_store; if(pb_load) delete pb_load; if(grid) delete grid; if(ldrscroll) delete ldrscroll; if(noeditlist) delete noeditlist; for(unsigned int i=0; i odinlog(&ldr,"LDRwidgetDialog(...)"); grid=new GuiGridLayout(GuiDialog::get_widget(), 2, 1); ldrwidget=new LDRblockWidget(ldr,columns,GuiDialog::get_widget(),true,true, "", false, readonly); grid->add_widget( ldrwidget, 0, 0 ); connect(ldrwidget,SIGNAL(valueChanged()),this,SLOT(emitChanged())); connect(ldrwidget,SIGNAL(doneButtonPressed()), this,SLOT(callDone()) ); GuiDialog::show(); #if QT_VERSION > 299 if(modal) GuiDialog::exec(); #endif } LDRwidgetDialog::~LDRwidgetDialog() { delete ldrwidget; delete grid; } void LDRwidgetDialog::updateWidget() { ldrwidget->updateWidget(); } void LDRwidgetDialog::callDone() { emit finished(); GuiDialog::done(); } void LDRwidgetDialog::emitChanged() { emit valueChanged(); } odin-2.0.5/odinqt/Makefile.in0000644000175000017500000007433314132211563012743 00000000000000# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = odinqt ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am \ $(am__library_include_HEADERS_DIST) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/tjutils/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(library_includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libodinqt_la_DEPENDENCIES = ../odinpara/libodinpara.la am__libodinqt_la_SOURCES_DIST = odinqt.h odinqt.cpp odinqt_callback.h \ odinqt_callback_moc.cpp boolbutton.h boolbutton.cpp \ boolbutton_moc.cpp complex1d.h complex1d.cpp complex1d_moc.cpp \ enumbox.h enumbox.cpp enumbox_moc.cpp float1d.h float1d.cpp \ float1d_moc.cpp float2d.h float2d.cpp float2d_moc.cpp \ float3d.h float3d.cpp float3d_moc.cpp floatedit.h \ floatedit.cpp floatedit_moc.cpp intedit.h intedit.cpp \ intedit_moc.cpp plot.h plot.cpp plot_moc.cpp stringbox.h \ stringbox.cpp stringbox_moc.cpp ldrwidget.h ldrwidget.cpp \ ldrwidget_moc.cpp ldrblockwidget.h ldrblockwidget.cpp \ ldrblockwidget_moc.cpp @GUI_ENABLED_TRUE@am_libodinqt_la_OBJECTS = odinqt.lo \ @GUI_ENABLED_TRUE@ odinqt_callback_moc.lo boolbutton.lo \ @GUI_ENABLED_TRUE@ boolbutton_moc.lo complex1d.lo \ @GUI_ENABLED_TRUE@ complex1d_moc.lo enumbox.lo enumbox_moc.lo \ @GUI_ENABLED_TRUE@ float1d.lo float1d_moc.lo float2d.lo \ @GUI_ENABLED_TRUE@ float2d_moc.lo float3d.lo float3d_moc.lo \ @GUI_ENABLED_TRUE@ floatedit.lo floatedit_moc.lo intedit.lo \ @GUI_ENABLED_TRUE@ intedit_moc.lo plot.lo plot_moc.lo \ @GUI_ENABLED_TRUE@ stringbox.lo stringbox_moc.lo ldrwidget.lo \ @GUI_ENABLED_TRUE@ ldrwidget_moc.lo ldrblockwidget.lo \ @GUI_ENABLED_TRUE@ ldrblockwidget_moc.lo libodinqt_la_OBJECTS = $(am_libodinqt_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libodinqt_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libodinqt_la_LDFLAGS) $(LDFLAGS) -o $@ @GUI_ENABLED_TRUE@am_libodinqt_la_rpath = -rpath $(libdir) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/tjutils depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/boolbutton.Plo \ ./$(DEPDIR)/boolbutton_moc.Plo ./$(DEPDIR)/complex1d.Plo \ ./$(DEPDIR)/complex1d_moc.Plo ./$(DEPDIR)/enumbox.Plo \ ./$(DEPDIR)/enumbox_moc.Plo ./$(DEPDIR)/float1d.Plo \ ./$(DEPDIR)/float1d_moc.Plo ./$(DEPDIR)/float2d.Plo \ ./$(DEPDIR)/float2d_moc.Plo ./$(DEPDIR)/float3d.Plo \ ./$(DEPDIR)/float3d_moc.Plo ./$(DEPDIR)/floatedit.Plo \ ./$(DEPDIR)/floatedit_moc.Plo ./$(DEPDIR)/intedit.Plo \ ./$(DEPDIR)/intedit_moc.Plo ./$(DEPDIR)/ldrblockwidget.Plo \ ./$(DEPDIR)/ldrblockwidget_moc.Plo ./$(DEPDIR)/ldrwidget.Plo \ ./$(DEPDIR)/ldrwidget_moc.Plo ./$(DEPDIR)/odinqt.Plo \ ./$(DEPDIR)/odinqt_callback_moc.Plo ./$(DEPDIR)/plot.Plo \ ./$(DEPDIR)/plot_moc.Plo ./$(DEPDIR)/stringbox.Plo \ ./$(DEPDIR)/stringbox_moc.Plo am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libodinqt_la_SOURCES) DIST_SOURCES = $(am__libodinqt_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__library_include_HEADERS_DIST = odinqt.h odinqt_callback.h \ boolbutton.h complex1d.h enumbox.h float1d.h float2d.h \ float3d.h floatedit.h intedit.h plot.h stringbox.h ldrwidget.h \ ldrblockwidget.h HEADERS = $(library_include_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASELIBS = @BASELIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATALIBS = @DATALIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GDB = @GDB@ GREP = @GREP@ GUILIBS = @GUILIBS@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MOC = @MOC@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ ODINSEQ_INCLUDES = @ODINSEQ_INCLUDES@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PLATFORMS = @PLATFORMS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ VTKLIBS = @VTKLIBS@ XMKMF = @XMKMF@ XTERM = @XTERM@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ all_includes = @all_includes@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ libodinqt_la_LDFLAGS = -no-undefined -release $(VERSION) $(GUILIBS) libodinqt_la_LIBADD = ../odinpara/libodinpara.la @GUI_ENABLED_TRUE@AM_CPPFLAGS = $(all_includes) @GUI_ENABLED_TRUE@lib_LTLIBRARIES = libodinqt.la @GUI_ENABLED_TRUE@library_includedir = $(includedir)/odinqt @GUI_ENABLED_TRUE@library_include_HEADERS = \ @GUI_ENABLED_TRUE@odinqt.h odinqt_callback.h \ @GUI_ENABLED_TRUE@boolbutton.h \ @GUI_ENABLED_TRUE@complex1d.h \ @GUI_ENABLED_TRUE@enumbox.h \ @GUI_ENABLED_TRUE@float1d.h \ @GUI_ENABLED_TRUE@float2d.h \ @GUI_ENABLED_TRUE@float3d.h \ @GUI_ENABLED_TRUE@floatedit.h \ @GUI_ENABLED_TRUE@intedit.h \ @GUI_ENABLED_TRUE@plot.h \ @GUI_ENABLED_TRUE@stringbox.h \ @GUI_ENABLED_TRUE@ldrwidget.h \ @GUI_ENABLED_TRUE@ldrblockwidget.h @GUI_ENABLED_TRUE@libodinqt_la_SOURCES = \ @GUI_ENABLED_TRUE@odinqt.h odinqt.cpp odinqt_callback.h odinqt_callback_moc.cpp \ @GUI_ENABLED_TRUE@boolbutton.h boolbutton.cpp boolbutton_moc.cpp \ @GUI_ENABLED_TRUE@complex1d.h complex1d.cpp complex1d_moc.cpp \ @GUI_ENABLED_TRUE@enumbox.h enumbox.cpp enumbox_moc.cpp \ @GUI_ENABLED_TRUE@float1d.h float1d.cpp float1d_moc.cpp \ @GUI_ENABLED_TRUE@float2d.h float2d.cpp float2d_moc.cpp \ @GUI_ENABLED_TRUE@float3d.h float3d.cpp float3d_moc.cpp \ @GUI_ENABLED_TRUE@floatedit.h floatedit.cpp floatedit_moc.cpp \ @GUI_ENABLED_TRUE@intedit.h intedit.cpp intedit_moc.cpp \ @GUI_ENABLED_TRUE@plot.h plot.cpp plot_moc.cpp \ @GUI_ENABLED_TRUE@stringbox.h stringbox.cpp stringbox_moc.cpp \ @GUI_ENABLED_TRUE@ldrwidget.h ldrwidget.cpp ldrwidget_moc.cpp \ @GUI_ENABLED_TRUE@ldrblockwidget.h ldrblockwidget.cpp ldrblockwidget_moc.cpp all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu odinqt/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu odinqt/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libodinqt.la: $(libodinqt_la_OBJECTS) $(libodinqt_la_DEPENDENCIES) $(EXTRA_libodinqt_la_DEPENDENCIES) $(AM_V_CXXLD)$(libodinqt_la_LINK) $(am_libodinqt_la_rpath) $(libodinqt_la_OBJECTS) $(libodinqt_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/boolbutton.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/boolbutton_moc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/complex1d.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/complex1d_moc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enumbox.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enumbox_moc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float1d.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float1d_moc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float2d.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float2d_moc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float3d.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float3d_moc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/floatedit.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/floatedit_moc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intedit.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intedit_moc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldrblockwidget.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldrblockwidget_moc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldrwidget.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldrwidget_moc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/odinqt.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/odinqt_callback_moc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plot.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plot_moc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stringbox.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stringbox_moc.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-library_includeHEADERS: $(library_include_HEADERS) @$(NORMAL_INSTALL) @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(library_includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(library_includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(library_includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(library_includedir)" || exit $$?; \ done uninstall-library_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(library_includedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @GUI_ENABLED_FALSE@dist-hook: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(library_includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/boolbutton.Plo -rm -f ./$(DEPDIR)/boolbutton_moc.Plo -rm -f ./$(DEPDIR)/complex1d.Plo -rm -f ./$(DEPDIR)/complex1d_moc.Plo -rm -f ./$(DEPDIR)/enumbox.Plo -rm -f ./$(DEPDIR)/enumbox_moc.Plo -rm -f ./$(DEPDIR)/float1d.Plo -rm -f ./$(DEPDIR)/float1d_moc.Plo -rm -f ./$(DEPDIR)/float2d.Plo -rm -f ./$(DEPDIR)/float2d_moc.Plo -rm -f ./$(DEPDIR)/float3d.Plo -rm -f ./$(DEPDIR)/float3d_moc.Plo -rm -f ./$(DEPDIR)/floatedit.Plo -rm -f ./$(DEPDIR)/floatedit_moc.Plo -rm -f ./$(DEPDIR)/intedit.Plo -rm -f ./$(DEPDIR)/intedit_moc.Plo -rm -f ./$(DEPDIR)/ldrblockwidget.Plo -rm -f ./$(DEPDIR)/ldrblockwidget_moc.Plo -rm -f ./$(DEPDIR)/ldrwidget.Plo -rm -f ./$(DEPDIR)/ldrwidget_moc.Plo -rm -f ./$(DEPDIR)/odinqt.Plo -rm -f ./$(DEPDIR)/odinqt_callback_moc.Plo -rm -f ./$(DEPDIR)/plot.Plo -rm -f ./$(DEPDIR)/plot_moc.Plo -rm -f ./$(DEPDIR)/stringbox.Plo -rm -f ./$(DEPDIR)/stringbox_moc.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-library_includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/boolbutton.Plo -rm -f ./$(DEPDIR)/boolbutton_moc.Plo -rm -f ./$(DEPDIR)/complex1d.Plo -rm -f ./$(DEPDIR)/complex1d_moc.Plo -rm -f ./$(DEPDIR)/enumbox.Plo -rm -f ./$(DEPDIR)/enumbox_moc.Plo -rm -f ./$(DEPDIR)/float1d.Plo -rm -f ./$(DEPDIR)/float1d_moc.Plo -rm -f ./$(DEPDIR)/float2d.Plo -rm -f ./$(DEPDIR)/float2d_moc.Plo -rm -f ./$(DEPDIR)/float3d.Plo -rm -f ./$(DEPDIR)/float3d_moc.Plo -rm -f ./$(DEPDIR)/floatedit.Plo -rm -f ./$(DEPDIR)/floatedit_moc.Plo -rm -f ./$(DEPDIR)/intedit.Plo -rm -f ./$(DEPDIR)/intedit_moc.Plo -rm -f ./$(DEPDIR)/ldrblockwidget.Plo -rm -f ./$(DEPDIR)/ldrblockwidget_moc.Plo -rm -f ./$(DEPDIR)/ldrwidget.Plo -rm -f ./$(DEPDIR)/ldrwidget_moc.Plo -rm -f ./$(DEPDIR)/odinqt.Plo -rm -f ./$(DEPDIR)/odinqt_callback_moc.Plo -rm -f ./$(DEPDIR)/plot.Plo -rm -f ./$(DEPDIR)/plot_moc.Plo -rm -f ./$(DEPDIR)/stringbox.Plo -rm -f ./$(DEPDIR)/stringbox_moc.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ cscopelist-am ctags ctags-am dist-hook distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-library_includeHEADERS \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS .PRECIOUS: Makefile # Auto-generate any needed moc files @GUI_ENABLED_TRUE@%_moc.cpp: %.h @GUI_ENABLED_TRUE@ $(MOC) -o $@ $< @GUI_ENABLED_TRUE@dist-hook: @GUI_ENABLED_TRUE@ -rm -rf $(distdir)/*_moc.cpp clean-local: -rm -f *_moc.cpp # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: odin-2.0.5/odinqt/plot.h0000644000175000017500000001060414075732704012027 00000000000000/*************************************************************************** plot.h - description ------------------- begin : Mon Aug 1 2005 copyright : (C) 2000-2021 by Thies Jochimsen email : thies@jochimsen.de ***************************************************************************/ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef PLOT_H #define PLOT_H #include // Include Qt stuff first to avoid ambiguities with 'debug' symbol #include "odinqt.h" // forward declarations class QwtPlot; class QwtPlotCurve; class QwtPlotMarker; class QwtPlotGrid; class QRect; class QwtWheel; class QwtScaleDraw; class GuiPlotPicker; // work around different declarations of QwtDoubleRect #if QT_VERSION >= 0x040000 class QRectF; typedef QRectF QwtDoubleRect; #else class QwtDoubleRect; #endif ///////////////////////////////////////////////// /** * Abstraction of a plotting widget */ class GuiPlot : public QObject { Q_OBJECT public: GuiPlot(QWidget *parent, bool fixed_size=false, int width=_ARRAY_WIDGET_WIDTH_-20, int height=_ARRAY_WIDGET_HEIGHT_-20); ~GuiPlot(); void set_x_axis_label(const char *xAxisLabel, bool omit=false); void set_y_axis_label(const char *yAxisLabelLeft, const char *yAxisLabelRight=0); long insert_curve(bool use_right_y_axis=false, bool draw_spikes=false, bool baseline=false); long insert_marker(const char* label, double x, bool outline=false, bool horizontal=false, bool animate=false); void remove_marker(long id); void set_marker_pos(long id, double x); // memory NOT managed by GuiPlot void set_curve_data(long curveid, const double* x, const double* y, int n, bool symbol=false); void replot(); void autoscale(); void autoscale_y(double& maxBound); void rescale_y(double maxBound); void clear(); void remove_markers(); double get_x(int x_pixel) const; double get_y(int y_pixel, bool right_axes=false) const; long closest_curve(int x, int y, int& dist) const; void highlight_curve(long id, bool flag); void set_x_axis_scale(double lbound, double ubound); void set_y_axis_scale(double lbound, double ubound, bool right_axes=false); void set_curve_pen(long id, const char* color, int width=1); void set_rect_outline_style(); void set_line_outline_style(bool horizontal); void enable_axes(bool flag); // TODO: Use ArrayScale::enable to control this setting void enable_grid(bool flag); void print(QPainter* painter, const QRect& rect) const; QWidget* get_widget(); signals: void plotMousePressed(const QMouseEvent&); void plotMouseReleased(const QMouseEvent&); void plotMouseMoved(const QMouseEvent&); private slots: void emit_plotMousePressed(const QMouseEvent& qme); void emit_plotMouseReleased(const QMouseEvent& qme); void emit_plotMouseMoved(const QMouseEvent& qme); private: friend class GuiPlotPicker; void set_axis_label(int axisId, const char* label, bool omit, int alignment); QwtPlot* qwtplotter; GuiPlotPicker* picker; // Use functions with check to access curve_map/marker_map QwtPlotCurve* get_curve(long id); QwtPlotMarker* get_marker(long id); // to emulate Qwt4 behaviour on Qwt5 STD_map curve_map; STD_map marker_map; QwtPlotGrid* plotgrid; int canvas_framewidth; long baseline_id_cache; }; //////////////////////////////////////////////////////////// /** * Abstraction of a slider wheel */ class GuiWheel : public QObject { Q_OBJECT public: GuiWheel(QWidget *parent); ~GuiWheel(); void set_range(double min, double max); void set_value(double newval); QWidget* get_widget(); signals: void valueChanged(double); private slots: void emit_valueChanged(double newval); private: QwtWheel* wheel; }; #endif odin-2.0.5/odinqt/ldrwidget.h0000644000175000017500000001506314075732704013042 00000000000000/*************************************************************************** ldrwidget.h - description ------------------- begin : Mon Apr 15 2002 copyright : (C) 2000-2021 by Thies H. Jochimsen email : thies@jochimsen.de ***************************************************************************/ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef LDRWIDGET_H #define LDRWIDGET_H #include #include "odinqt.h" #include #include /////////////////////////////////////////////////////////////// #define _MAX_SLIDER_STEPS_ 100 #define _MAX_LABEL_LENGTH_ 15 #define _FLOAT_DIGITS_ 3 #define _INFOBOX_LINEWIDTH_ 50 #define _MAX_SUBWIDGETS_FOR_ALIGNCENT_ 5 /////////////////////////////////////////////////////////////// // forward declarations to decouple headers as far as possible class LDRbase; class intScientSlider; class intLineBox; class floatScientSlider; class floatLineBox; class enumBox; class buttonBox; class floatBox1D; class floatBox3D; class complexfloatBox1D; class stringBox; class floatLineBox3D; class LDRwidgetDialog; class LDRblockWidget; class LDReditCaller; /////////////////////////////////////////////////////////////// /** * * This class produces a widget according to a given Labeled Data Record (LDR) or a block * of them so that the parameter(s) can be edited interactively */ class LDRwidget : public QWidget { Q_OBJECT public: /** * *Constructs a widget for the parameter(s) 'ldr' with the following additional options: * - columns: If creating a widget for a block of parameters they will be grouped in the given number of columns * - parent: The parent widget * - doneButton: If creating a widget for a block of parameters a 'Done' push button will be added if this option is set to 'true' * The push button will then emit the doneButtonPressed() signal if clicked * - omittext: Text to blind out in the label of each parameter * - storeLoadButtons: Add buttons to store/load the parameters to/from file * */ LDRwidget(LDRbase& ldr,unsigned int columns=1, QWidget *parent=0, bool doneButton=false, const char* omittext="", bool storeLoadButtons=false); ~LDRwidget(); // members for 2D/3D plot void write_pixmap(const char* fname, const char* format, bool dump_all=false) const; void write_legend(const char* fname, const char* format) const; void write_map_legend(const char* fname, const char* format) const; signals: /** * This signal will be emitted whenever one of the parameters is changed */ void valueChanged(); /** * This signal will be emitted whenever the 'Done' button is clicked */ void doneButtonPressed(); // signals for 2D/3D plot void clicked(int x, int y, int z); void newProfile(const float *data, int npts, bool horizontal, int position); void newMask(const float* data, int slice); // private: void updateSubWidget(); void deleteSubDialogs(); void newintval(int); void newfloatval(float); void newenumval(int); void newboolval(bool); void newfloatArr1( const float*, int, float, float); // void newdoubleArr1( const double*, int, float, float); void newfloatArr2( const float*, float, float); void newfloatArrMap(const float*, float, float, float); void newcomplexArr( const float*, const float*, int, float, float); void newfuncval(int); void newstringval(const char*); void newfilenameval(const char*); void newformulaval(const char*); void newtripleval(float,float,float); public slots: /** * Tell the widget that the parameter(s) were changed outside and that it has to update its view */ void updateWidget(); /** * Delete all dialogs that may have popped up during editing the parameters */ void deleteDialogs(); private slots: void emitValueChanged(); void emitDone(); void emitClicked(int x, int y, int z) {emit clicked(x,y,z);} void emitNewProfile(const float *data, int npts, bool horizontal, int position) {emit newProfile(data, npts, horizontal, position);} void emitNewMask(const float *data, int slice) {emit newMask(data,slice);} void changeLDRint( int ); void changeLDRfloat( float ); void changeLDRenum( int ); void changeLDRbool ( bool ); void changeLDRaction(); void changeLDRfunction( int ); void changeLDRstring(const char*); void changeLDRfileName(const char*); void browseLDRfileName(); void changeLDRformula(const char*); void changeLDRtriple(float,float,float); void infoLDRformula(); void editLDRfunction(); void infoLDRfunction(); public: STD_string get_label() const; unsigned int get_rows() const {return rows;} unsigned int get_cols() const {return cols;} int get_current_z() const; private: void set_widget(QWidget *widget, GuiGridLayout::Alignment alignment = GuiGridLayout::Default, bool override_enabled=false); unsigned int get_sizedfarray_size_and_factor(unsigned int& nx, unsigned int& ny, unsigned int& nz) const; void create_or_update_floatArrwidget(const farray& arr, bool initial); GuiGridLayout* grid; QWidget* widget_cache; LDRblockWidget* blockwidget; intScientSlider* intslider; intLineBox* intedit; floatScientSlider* floatslider; floatLineBox* floatedit; enumBox* enumwidget; buttonBox* boolwidget; buttonBox* actionwidget; QLabel* floatArrempty; floatBox1D* floatArrwidget1; floatLineBox* floatArredit; floatBox3D* floatArrwidget2; complexfloatBox1D* complexArrwidget; stringBox* stringwidget; stringBox* filenamewidget; enumBox* funcwidget; stringBox* formulawidget; floatLineBox3D* triplewidget; // float 2D/3D stuff farray sizedfarray; farray mapfarray; ndim oldfarraysize; farray overlay_map; QWidget* vport; LDRbase& val; STD_string ldrlabel; STD_string ldrlabel_uncut; bool label_cut; STD_list subdialogs; unsigned int rows,cols; }; #endif odin-2.0.5/odinqt/float1d.cpp0000644000175000017500000000362014075732705012737 00000000000000/*************************************************************************** float1d.cpp - description ------------------- begin : Tue Jul 11 2000 copyright : (C) 2000-2019 by Thies Jochimsen email : thies@jochimsen.de ***************************************************************************/ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #include "float1d.h" floatBox1D::floatBox1D(const float *data,int n,QWidget *parent, const char *name, bool fixed_size, const char *xAxisLabel, const char *yAxisLabel, float min_x, float max_x, bool detachable) : complexfloatBox1D(data,0,n,parent,name, fixed_size, xAxisLabel, yAxisLabel, 0, min_x, max_x, detachable ) { } floatBox1D::floatBox1D(const double *data,int n,QWidget *parent, const char *name, bool fixed_size, const char *xAxisLabel, const char *yAxisLabel, float min_x, float max_x, bool detachable) : complexfloatBox1D(data,0,n,parent,name, fixed_size, xAxisLabel, yAxisLabel, 0, min_x, max_x, detachable ) { } void floatBox1D::refresh(const float* data,int n, float min_x, float max_x) { complexfloatBox1D::refresh(data,0,n, min_x, max_x ); } void floatBox1D::refresh(const double* data,int n, float min_x, float max_x) { complexfloatBox1D::refresh(data,0,n, min_x, max_x ); } odin-2.0.5/odinqt/odinqt.h0000644000175000017500000003453014075732705012354 00000000000000/*************************************************************************** odinqt.h - description ------------------- begin : Sun Aug 27 2000 copyright : (C) 2000-2021 by Thies Jochimsen email : thies@jochimsen.de ***************************************************************************/ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef ODINQT_H #define ODINQT_H #include #include #include // for svector // global configuration #define _FONT_TYPE_ "helvetica" #define _ARRAY_WIDGET_WIDTH_ 270 #define _ARRAY_WIDGET_HEIGHT_ 180 #define _ARRAY_BACKGROUND_COLOR_ "Black" #define _ARRAY_FOREGROUND_COLOR1_ "White" #define _ARRAY_FOREGROUND_COLOR2_ "Grey" #define _ARRAY_GRID_COLOR_ "Green" #define _ARRAY_GRID_DARK_FACTOR_ 250 #define _ARRAY_SELECTION_COLOR_ "Yellow" #define _ARRAY_HIGHLIGHT_COLOR_ "Orange" #define _ARRAY_MARKER_COLOR_ "Blue" #define _ARRAY_MARKER_BRIGHT_FACTOR_ 180 #define _LAYOUT_STRETCH_FACTOR_ 1 #define SLIDER_CELL_WIDTH 75 #define SLIDER_CELL_HEIGHT 25 #define TEXTEDIT_WIDTH 75 #define TEXTEDIT_HEIGHT 25 #define PLOT_SYMBOLS_SIZE 5 // platform-specific configuration #ifdef USING_WIN32 #define _FONT_SIZE_ 8 #else #define _FONT_SIZE_ 10 #endif ///////////////////////////////////////////////// // forward declarations class QObject; class QWidget; class QString; class QGridLayout; class QPushButton; class QLineEdit; class QPopupMenu; class QMenu; class QKeySequence; class QPoint; class QSlider; class QComboBox; class QLabel; class QPainter; class QPixmap; class QMouseEvent; class QColor; class QString; class QRegion; class QApplication; class QScrollView; class QScrollArea; class QDialog; class QMainWindow; class QProgressDialog; class QImage; class QListView; class QListViewItem; class QCheckListItem; class QTableWidget; class QTableWidgetItem; class QTreeWidget; class QTreeWidgetItem; class QProgressBar; class QScrollBar; class QToolBar; class QToolButton; class QPrinter; class QPaintDevice; class QWizard; class QTextEdit; class QTextView; class SlotDispatcher; ///////////////////////////////////////////////// /** * Helper classfor debugging the OdinQt component */ class OdinQt { public: static const char* get_compName(); }; ///////////////////////////////////////////////// // Helper functions for Qt portability const char* c_str(const QString& qs); int layout_border_size(); void init_label(QLabel* ql); bool left_button(const QMouseEvent* qme, bool return_current_state); bool right_button(const QMouseEvent* qme, bool return_current_state); bool middle_button(const QMouseEvent* qme, bool return_current_state); void add_tooltip(QWidget* w, const char* txt); void set_platform_defaults(QWidget* w, bool enable=true); STD_string get_save_filename(const char* caption=0, const char* startwith="", const char* filter="", QWidget* parent=0); STD_string get_open_filename(const char* caption=0, const char* startwith="", const char* filter="", QWidget* parent=0); STD_string get_directory(const char* caption=0, const char* startwith="", QWidget* parent=0); bool message_question(const char* text, const char* caption, QWidget* parent, bool ask=false, bool error=false); int paintdevice_height(const QPaintDevice* qpd); int paintdevice_width(const QPaintDevice* qpd); svector get_possible_image_fileformats(); ///////////////////////////////////////////////// // Helper classes for Qt portability /** * Abstraction of a grid layout */ class GuiGridLayout { public: GuiGridLayout(QWidget *parent, int rows, int columns, bool margin=true); ~GuiGridLayout(); enum Alignment {Default, VCenter, Center}; void add_widget(QWidget *w, int row, int column, Alignment alignment=Default, int rowSpan=1, int columnSpan=1 ); void set_col_stretch(int col, int factor); void set_row_stretch(int row, int factor); void set_col_minsize(int col, int minsize); void set_row_minsize(int row, int minsize); private: QGridLayout* qgl; }; ///////////////////////////////////////////////// /** * Abstraction of a push button */ class GuiButton { public: GuiButton(QWidget *parent, QObject* receiver, const char* member, const char *onlabel, const char *offlabel=0, bool initstate=false); ~GuiButton(); void set_toggled(bool state); void set_text(bool state); void set_default(bool state); bool is_on() const; QWidget* get_widget(); private: friend class SlotDispatcher; QPushButton* qpb; SlotDispatcher* sd; const char* ontext; const char* offtext; }; ///////////////////////////////////////////////// /** * Abstraction of a text editing field */ class GuiLineEdit { public: GuiLineEdit(QWidget *parent, QObject* receiver, const char* member, int width=-1, int height=-1); ~GuiLineEdit(); void set_text(const char* txt); const char* get_text() const; bool is_modified(); QWidget* get_widget(); private: friend class SlotDispatcher; QLineEdit* qle; SlotDispatcher* sd; }; ///////////////////////////////////////////////// /** * Abstraction of a popup menu */ class GuiPopupMenu { public: GuiPopupMenu(QWidget *parent); ~GuiPopupMenu(); void insert_item(const char* text, const QObject* receiver, const char* member, int accel=0); void insert_separator(); void popup(const QPoint& p); private: friend class GuiMainWindow; QPopupMenu* qpm; // for Qt pre4 QMenu* qm; // for Qt4 int id; }; ///////////////////////////////////////////////// /** * Abstraction of a slider */ class GuiSlider { public: GuiSlider(QWidget *parent, int minValue, int maxValue, int pageStep, int value, int tickInterval); ~GuiSlider(); int get_value() const; void set_value(int val); bool modified_externally() const {bool result=modified; modified=false; return result;} QSlider* get_widget() {return qs;} private: QSlider* qs; mutable bool modified; }; ///////////////////////////////////////////////// class GuiToolBar; // forward declarion /** * Abstraction of a combo box */ class GuiComboBox { public: GuiComboBox(QWidget* parent, const svector& names); GuiComboBox(GuiToolBar* parent, const svector& names); ~GuiComboBox(); void set_names(const svector& names); void set_current_item(int index); int get_current_item() const; QComboBox* get_widget() {return qcb;} private: void common_init(QWidget* parent, const svector& names); QComboBox* qcb; }; ///////////////////////////////////////////////// /** * Abstraction of a painter */ class GuiPainter { public: GuiPainter(QPixmap* qpm); ~GuiPainter(); // forwarding functions to QPainter void moveTo(int x, int y); void lineTo(int x, int y); bool begin(QPixmap* qpm); bool end(); void setPen(const char* pencolor, int linewidth=1, bool dotted=false, float lightdark=0.0); void fillRect( int x, int y, int w, int h, const QColor& col); void drawRect(int x, int y, int w, int h); void drawText( int x, int y, const QString& txt, const QColor& col); QRegion* draw_region(const STD_list& plist); QPainter* get_painter() {return qp;} void repaint(QLabel* dst); private: QPainter* qp; QPixmap* qpm_cache; int x_cache, y_cache; }; ///////////////////////////////////////////////// /** * Abstraction of a GUI application */ class GuiApplication { public: GuiApplication(int argc=0, char *argv[]=0); ~GuiApplication(); int start(QWidget* mainwidget); QObject* get_object(); static void quit(); static int argc(); static char** argv(); static void process_events(); private: QApplication* qa; // Cache cmdline args separately for Qt and for later use static int argc_cache; static char** argv_cache; static int argc4qt; static char** argv4qt; }; ///////////////////////////////////////////////// /** * Abstraction of a GUI main window */ class GuiMainWindow { public: GuiMainWindow(QWidget* parent = 0); ~GuiMainWindow(); void show(QWidget* central_widget, bool show_toolbutton_text=false); void set_caption(const char* text); void set_status_message(const char* text, int timeout_ms=0); void set_status_xpm(const char** xpm); QWidget* get_widget(); void insert_menu( const char* text, GuiPopupMenu * gpm); void insert_menu_separator(); void close(); private: friend class GuiToolBar; QMainWindow* qmw; QLabel* statusIcon; QLabel* statusText; }; ///////////////////////////////////////////////// /** * Abstraction of a scrollable window/area */ class GuiScroll { public: GuiScroll(QWidget* child, QWidget* parent); ~GuiScroll(); QWidget* get_widget(); private: QScrollView* qsv; // for Qt pre4 QScrollArea* qsa; // for Qt4 }; ///////////////////////////////////////////////// class QDialogDerived; // to overload paintEvent /** * Abstraction of a dialog */ class GuiDialog { public: GuiDialog(QWidget *parent, const char* caption, bool modal=false); virtual ~GuiDialog(); QWidget* get_widget(); virtual void repaint() {} // overload to repaint dialog virtual void close() {} // overload to perform additional stuff when closing dialog void show(); void cancel(); void done(); void hide(); int exec(); private: QDialogDerived* qd; }; ///////////////////////////////////////////////// /** * Abstraction of a progress dialog */ class GuiProgressDialog { public: GuiProgressDialog(QWidget *parent, bool modal, int total_steps); ~GuiProgressDialog(); void set_progress(int progr); int get_progress() const; void set_total_steps(int steps); bool was_cancelled() const; void reset(); void set_text(const char* txt); void show(); void hide(); private: QProgressDialog* qpd; }; ///////////////////////////////////////////////// /** * Abstraction of an image class */ class GuiImage { public: GuiImage(unsigned char* data, int width, int height, bool colormap); ~GuiImage(); QPixmap* create_pixmap() const; private: QImage* qi; }; ///////////////////////////////////////////////// class GuiListItem; // forward declaration class GuiListViewCallback { public: virtual void clicked(GuiListItem* item) = 0; protected: GuiListViewCallback() {} }; /** * Abstraction of a list/tree view class */ class GuiListView { public: GuiListView(QWidget *parent, const svector& column_labels, int first_column_width=-1, int min_height=-1, GuiListViewCallback* callback=0, bool tree=false); ~GuiListView(); QWidget* get_widget(); private: friend class GuiListItem; QListView* qlv; // for Qt pre4 QTableWidget* qtw; // for Qt4 QTreeWidget* qtrw; // for Qt4 SlotDispatcher* sd; }; ///////////////////////////////////////////////// /** * Abstraction of a list/tree view item */ class GuiListItem : public StaticHandler { public: GuiListItem() {common_init();} // used for constructing listmap GuiListItem(GuiListView *parent, const svector& column_entries, bool checkable=false, bool initstate=false); GuiListItem(GuiListItem *parent, GuiListItem *after, const svector& column_entries); ~GuiListItem(); bool is_checked() const; const char* get_text() const; // functions to initialize/delete static members by the StaticHandler template class static void init_static(); static void destroy_static(); private: friend class SlotDispatcher; void common_init(); QListViewItem* qlvi; // for Qt pre4 QCheckListItem* qcli; // for Qt pre4 QTableWidgetItem* qtwi; // for Qt4 QTreeWidgetItem* qtrwi; // for Qt4 QTreeWidget* parent_qtrw; // for Qt4 // global map to retrieve GuiListItem from QListViewItem static STD_map* listmap; // for Qt pre4 static STD_map* tablemap; // for Qt4 }; ///////////////////////////////////////////////// /** * Abstraction of a progress bar */ class GuiProgressBar { public: GuiProgressBar(QWidget *parent, int total_steps); ~GuiProgressBar(); void set_progress(int progr); void set_min_width(int w); QWidget* get_widget(); private: QProgressBar* qpb; }; ///////////////////////////////////////////////// /** * Abstraction of a scroll bar */ class GuiScrollBar { public: GuiScrollBar(QWidget* parent); ~GuiScrollBar(); void set_values(int min, int max, int linestep, int pagestep, int value); QScrollBar* get_widget(); private: QScrollBar* qsb; }; ///////////////////////////////////////////////// /** * Abstraction of a tool bar */ class GuiToolBar { public: GuiToolBar(GuiMainWindow* parent, const char* label); ~GuiToolBar(); QWidget* get_widget(); void add_separator(); private: friend class GuiToolButton; friend class GuiComboBox; QToolBar* qtb; }; ///////////////////////////////////////////////// /** * Abstraction of a tool button */ class GuiToolButton { public: GuiToolButton(GuiToolBar* parent, const char** xpm, const char* label, QObject* receiver, const char* member, bool checkable=false, bool initstate=false ); ~GuiToolButton(); bool is_on() const; void set_on(bool flag); void set_enabled(bool flag); void set_label(const char* text); void set_tooltip(const char* text); private: friend class SlotDispatcher; QToolButton* qtb; SlotDispatcher* sd; }; ///////////////////////////////////////////////// /** * Abstraction of a printer driver */ class GuiPrinter { public: GuiPrinter(); ~GuiPrinter(); bool setup(QWidget* parent); QPaintDevice* get_device(); private: QPrinter* qp; }; ///////////////////////////////////////////////// /** * Abstraction of a text viewer */ class GuiTextView { public: GuiTextView(QWidget* parent, int minwidth, int minheight); ~GuiTextView(); void set_text(const char* txt); void append_text(const char* txt); QWidget* get_widget(); private: void scroll_end(); QTextEdit* qte; }; #endif odin-2.0.5/odinqt/complex1d.h0000644000175000017500000000743514075732704012755 00000000000000/*************************************************************************** complex1d.h - description ------------------- begin : Sun Aug 27 2000 copyright : (C) 2000-2021 by Thies Jochimsen email : thies@jochimsen.de ***************************************************************************/ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef COMPLEX1D_H #define COMPLEX1D_H #include #include "odinqt.h" #define SYMBOL_MAX_NUMOF_POINTS 20 class GuiPlot; // forward declaration class DetachedComplexfloatBox1D; // forward declaration /** * QLabel containing a plotted complex array (2 curves) */ class complexfloatBox1D : public QGroupBox { Q_OBJECT public: complexfloatBox1D(const float *data1, const float *data2, int n,QWidget *parent, const char *name, bool fixed_size, const char *xAxisLabel=0, const char *yAxisLabelLeft=0, const char *yAxisLabelRight=0, float min_x=0.0, float max_x=0.0, bool detachable=false); complexfloatBox1D(const double *data1,const double *data2,int n,QWidget *parent, const char *name, bool fixed_size, const char *xAxisLabel=0, const char *yAxisLabelLeft=0, const char *yAxisLabelRight=0, float min_x=0.0, float max_x=0.0, bool detachable=false); ~complexfloatBox1D(); public slots: void refresh(const float *data1,const float *data2,int n, float min_x, float max_x); void refresh(const float *data1,const float *data2,int n) {refresh(data1,data2,n,0.0,0.0);} void refresh(const double *data1,const double *data2,int n, float min_x, float max_x); void refresh(const double *data1,const double *data2,int n) {refresh(data1,data2,n,0.0,0.0);} private slots: void autoscale(); void detach(); void mousePressedInPlot(const QMouseEvent& qme); void mouseReleasedInPlot(const QMouseEvent& qme); private: void common_init(const char *name, bool fixed_size, bool data1, bool data2, const char *xAxisLabel, const char *yAxisLabelLeft, const char *yAxisLabelRight, bool detachable); void create_x_cache(float min_x, float max_x, int n); long curveid1; long curveid2; dvector data1_cache; dvector data2_cache; dvector x_cache; const double* data1_ptr; const double* data2_ptr; // Use strings to cache labels since original arrays may be outdated STD_string name_cache; STD_string xAxisLabel_cache; STD_string yAxisLabelLeft_cache; STD_string yAxisLabelRight_cache; float min_x_cache; float max_x_cache; int n_cache; bool detachable_cache; GuiGridLayout *grid; GuiPlot* plotter; int x_pressed,y_pressed; DetachedComplexfloatBox1D* detached; }; /////////////////////////////////////////////////////////////////// class DetachedComplexfloatBox1D : public GuiDialog { public: DetachedComplexfloatBox1D(const double *data1,const double *data2,int n,complexfloatBox1D *parent, const char *name, bool fixed_size, const char *xAxisLabel, const char *yAxisLabelLeft, const char *yAxisLabelRight, float min_x, float max_x); ~DetachedComplexfloatBox1D(); void refresh(const double *data1,const double *data2,int n, float min_x, float max_x); private: void create_grid(); GuiGridLayout *grid; complexfloatBox1D* cfb; }; #endif odin-2.0.5/odinqt/plot.cpp0000644000175000017500000004766313576370643012406 00000000000000#include // for mouse events #include "plot.h" #include #include #include #include #include #if QWT_VERSION < 0x060000 #include #else #include #include #endif #if QWT_VERSION > 0x04FFFF #include #include #include #include #include #include #else #include #endif #if QWT_VERSION < 0x060000 class GuiPlotPrintFilter : public QwtPlotPrintFilter { public: GuiPlotPrintFilter(long baseline_id) : baseline_id_cache(baseline_id) {} private: long baseline_id_cache; // overloading virtual functions from QwtPlotPrintFilter #if QWT_VERSION > 0x04FFFF QColor color(const QColor &c, Item item) const { QColor result=QwtPlotPrintFilter::color(c,item); // default #else QColor color(const QColor &c, Item item, int id = -1) const { QColor result=QwtPlotPrintFilter::color(c,item,id); // default #endif if(item==QwtPlotPrintFilter::Curve) result=QColor("Black"); if(item==QwtPlotPrintFilter::CurveSymbol) result=QColor("Black"); if(item==QwtPlotPrintFilter::Marker) result=QColor("Black"); if(item==QwtPlotPrintFilter::MajorGrid) result=QColor("Gray").light(130); if(item==QwtPlotPrintFilter::MinorGrid) result=QColor("Gray").light(150); #if QWT_VERSION > 041 if(item==QwtPlotPrintFilter::CanvasBackground) result=QColor("White"); #else if(item==QwtPlotPrintFilter::Background) result=QColor("White"); #endif #if QWT_VERSION < 0x04FFFF if(item==QwtPlotPrintFilter::Curve && id==baseline_id_cache) result=QColor("Gray").dark(150); #endif return result; } #if QWT_VERSION > 0x04FFFF QFont font(const QFont &, Item item) const { #else QFont font(const QFont &, Item item, int id = -1) const { #endif return QFont(_FONT_TYPE_, 7); } }; #endif // QWT_VERSION < 0x060000 //////////////////////////////////////////////////////////////////////////// struct GuiScaleDraw : QwtScaleDraw { // implementing virtual functions of QwtScaleDraw #if QWT_VERSION < 0x04FFFF QString label (double val) const {return get_str(val);} #else QwtText label (double val) const {return QString(get_str(val));} #endif private: const char* get_str(double val) const { bool vertical=false; #if QWT_VERSION < 0x04FFFF QwtScaleDraw::Orientation ort=orientation(); if(ort==QwtScaleDraw::Left || ort==QwtScaleDraw::Right) vertical=true; #else QwtScaleDraw::Alignment ort=alignment(); if(ort==QwtScaleDraw::LeftScale || ort==QwtScaleDraw::RightScale) vertical=true; #endif if(vertical) result=ftos(val,2,alwaysExp); else result=ftos(val,2,neverExp); return result.c_str(); } mutable STD_string result; }; //////////////////////////////////////////////////////////////////////////// class GuiPlotPicker : public QwtPlotPicker { public: GuiPlotPicker(QwtPlotCanvas* canvas, GuiPlot* plot4feedback) : QwtPlotPicker(canvas), plot(plot4feedback) {} protected: void widgetMousePressEvent(QMouseEvent* qme) { Log odinlog("GuiPlotPicker","widgetMousePressEvent"); QwtPlotPicker::widgetMousePressEvent(qme); plot->emit_plotMousePressed(*qme); ODINLOG(odinlog,normalDebug) << "widgetMousePressEvent" << STD_endl; } void widgetMouseReleaseEvent(QMouseEvent* qme) { Log odinlog("GuiPlotPicker","widgetMouseReleaseEvent"); QwtPlotPicker::widgetMouseReleaseEvent(qme); plot->emit_plotMouseReleased(*qme); ODINLOG(odinlog,normalDebug) << "widgetMouseReleaseEvent" << STD_endl; } void widgetMouseMoveEvent(QMouseEvent* qme) { QwtPlotPicker::widgetMouseMoveEvent(qme); plot->emit_plotMouseMoved(*qme); } private: GuiPlot* plot; }; //////////////////////////////////////////////////////////////////////////// GuiPlot::GuiPlot(QWidget *parent, bool fixed_size, int width, int height) { Log odinlog("GuiPlot","GuiPlot(...)"); baseline_id_cache=0; qwtplotter = new QwtPlot(parent); if(fixed_size) qwtplotter->setFixedSize (width,height); else qwtplotter->setMinimumSize(width,height); qwtplotter->resize(width,height); qwtplotter->plotLayout()->setAlignCanvasToScales(true); // to get mouse-move events qwtplotter->canvas()->setMouseTracking(true); // set default axis titles set_x_axis_label(0); set_y_axis_label(0,0); /* // still necessary? #if QWT_VERSION < 0x04FFFF qwtplotter->setAxisTitleFont(QwtPlot::xBottom,QFont(_FONT_TYPE_, _FONT_SIZE_)); qwtplotter->setAxisTitleFont(QwtPlot::yLeft, QFont(_FONT_TYPE_, _FONT_SIZE_)); qwtplotter->setAxisTitleFont(QwtPlot::yRight, QFont(_FONT_TYPE_, _FONT_SIZE_)); #endif */ qwtplotter->enableAxis(QwtPlot::xBottom,true); /* qwtplotter->setAxisLabelFormat(QwtPlot::yLeft,'e',1,10); qwtplotter->setAxisLabelFormat(QwtPlot::xBottom,'f',2); */ qwtplotter->setAxisScaleDraw(QwtPlot::yLeft, new GuiScaleDraw()); qwtplotter->setAxisScaleDraw(QwtPlot::xBottom, new GuiScaleDraw()); #if QWT_VERSION < 0x060000 qwtplotter->setCanvasBackground(_ARRAY_BACKGROUND_COLOR_); #else qwtplotter->setCanvasBackground(QBrush(QColor(_ARRAY_BACKGROUND_COLOR_))); #endif #if QWT_VERSION > 0x04FFFF plotgrid=new QwtPlotGrid(); ODINLOG(odinlog,normalDebug) << "plotgrid=" << plotgrid << STD_endl; #endif QPen gridpen(QColor(_ARRAY_GRID_COLOR_).dark(_ARRAY_GRID_DARK_FACTOR_)); #if QWT_VERSION > 0x04FFFF ODINLOG(odinlog,normalDebug) << "plotgrid=" << plotgrid << STD_endl; plotgrid->setPen(gridpen); #if QWT_VERSION < 0x060100 plotgrid->setMajPen(gridpen); plotgrid->setMinPen(gridpen); #else plotgrid->setMajorPen(gridpen); plotgrid->setMinorPen(gridpen); #endif #else qwtplotter->setGridPen(gridpen); qwtplotter->setGridMajPen(gridpen); qwtplotter->setGridMinPen(gridpen); #endif enable_grid(true); #if QWT_VERSION > 0x04FFFF plotgrid->attach(qwtplotter); #endif #if QWT_VERSION < 0x04FFFF qwtplotter->enableLegend(false); qwtplotter->enableOutline(false); #endif QwtPlotCanvas* canv=(QwtPlotCanvas*)qwtplotter->canvas(); // cast required for qwt 6.1 (and higher?) canvas_framewidth=canv->lineWidth(); picker=new GuiPlotPicker(canv,this); picker->setRubberBandPen(QColor(_ARRAY_SELECTION_COLOR_)); set_rect_outline_style(); // do this after picker was initialized } void GuiPlot::set_axis_label(int axisId, const char* label, bool omit, int alignment) { Log odinlog("GuiPlot","set_axis_label"); ODINLOG(odinlog,normalDebug) << "axisId/label/omit/alignment=" << axisId << "/" << label << "/" << omit << "/" << alignment << STD_endl; if(!label || STD_string(label)=="") omit=true; if(omit) { #if QWT_VERSION > 0x04FFFF QwtText txt(""); txt.setFont(QFont(_FONT_TYPE_, 1)); qwtplotter->setAxisTitle(axisId,txt); #else qwtplotter->setAxisTitle(axisId,""); qwtplotter->setAxisTitleFont(axisId,QFont(_FONT_TYPE_, 1)); // make font zero size to save space in widget #endif } else { #if QWT_VERSION > 0x04FFFF QwtText txt(label); txt.setFont(QFont(_FONT_TYPE_, _FONT_SIZE_)); txt.setRenderFlags(alignment); qwtplotter->setAxisTitle(axisId,txt); #else qwtplotter->setAxisTitle(axisId,label); qwtplotter->setAxisTitleFont(axisId,QFont(_FONT_TYPE_, _FONT_SIZE_)); qwtplotter->setAxisTitleAlignment(axisId,alignment); #endif } } void GuiPlot::set_x_axis_label(const char *xAxisLabel, bool omit) { set_axis_label(QwtPlot::xBottom,xAxisLabel,omit,Qt::AlignRight); } void GuiPlot::set_y_axis_label(const char *yAxisLabelLeft, const char *yAxisLabelRight) { if(yAxisLabelLeft) set_axis_label(QwtPlot::yLeft, yAxisLabelLeft, false,Qt::AlignCenter); if(yAxisLabelRight) set_axis_label(QwtPlot::yRight,yAxisLabelRight,false,Qt::AlignCenter); if(yAxisLabelLeft) qwtplotter->enableAxis(QwtPlot::yLeft,true); if(yAxisLabelRight) qwtplotter->enableAxis(QwtPlot::yRight,true); } long GuiPlot::insert_curve(bool use_right_y_axis, bool draw_spikes, bool baseline) { Log odinlog("GuiPlot","insert_curve"); long result=0; int yaxis=QwtPlot::yLeft; if(use_right_y_axis) yaxis=QwtPlot::yRight; QPen curvepen(QColor(_ARRAY_FOREGROUND_COLOR1_)); if(use_right_y_axis || baseline) { curvepen=QColor(_ARRAY_FOREGROUND_COLOR2_); } #if QWT_VERSION > 0x04FFFF QwtPlotCurve* curve=new QwtPlotCurve(); #if QWT_VERSION < 0x060000 curve->setAxis(QwtPlot::xBottom, yaxis); #else curve->setAxes(QwtPlot::xBottom, yaxis); #endif curve->setPen(curvepen); curve->attach(qwtplotter); result=curve_map.size()+1; curve_map[result]=curve; #else result=qwtplotter->insertCurve("",QwtPlot::xBottom,yaxis); qwtplotter->setCurvePen(result,curvepen); #endif if(draw_spikes) { #if QWT_VERSION > 0x04FFFF curve->setBaseline(0.0); curve->setStyle(QwtPlotCurve::Sticks); #else qwtplotter->setCurveBaseline(result,0.0); qwtplotter->setCurveStyle(result,QwtCurve::Sticks); #endif } if(baseline) baseline_id_cache=result; ODINLOG(odinlog,normalDebug) << "result=" << result << STD_endl; return result; } long GuiPlot::insert_marker(const char* label, double x, bool outline, bool horizontal, bool animate) { Log odinlog("GuiPlot","insert_marker"); long result=0; ODINLOG(odinlog,normalDebug) << "label/x/outline/horizontal/animate=" << label << "/" << x << "/" << outline << "/" << horizontal << "/" << animate << STD_endl; QColor markcolor(QColor(_ARRAY_MARKER_COLOR_).light(_ARRAY_MARKER_BRIGHT_FACTOR_)); if(animate) markcolor=QColor("red"); if(outline) markcolor=QColor(_ARRAY_SELECTION_COLOR_); #if QWT_VERSION > 0x04FFFF QwtPlotMarker* marker=new QwtPlotMarker(); if(horizontal) { marker->setLineStyle(QwtPlotMarker::HLine); marker->setYValue(x); } else { marker->setLineStyle(QwtPlotMarker::VLine); marker->setXValue(x); } marker->setLinePen(QPen(markcolor)); #if QWT_VERSION > 0x04FFFF QwtText txt(label); txt.setColor(markcolor); txt.setRenderFlags(Qt::AlignTop); marker->setLabel(txt); #else marker->setLabelPen(QPen(markcolor)); marker->setLabelAlignment(Qt::AlignTop); marker->setLabel(QString(label)); #endif marker->attach(qwtplotter); result=marker_map.size()+1; marker_map[result]=marker; #else int axis=QwtPlot::xBottom; if(horizontal) axis=QwtPlot::yLeft; result=qwtplotter->insertLineMarker(label, axis); qwtplotter->setMarkerPen(result,QPen(markcolor)); if(horizontal) qwtplotter->setMarkerYPos(result,x); else qwtplotter->setMarkerXPos(result,x); #endif ODINLOG(odinlog,normalDebug) << "result=" << result << STD_endl; return result; } void GuiPlot::remove_marker(long id) { Log odinlog("GuiPlot","remove_marker"); ODINLOG(odinlog,normalDebug) << "id=" << id << STD_endl; #if QWT_VERSION > 0x04FFFF QwtPlotMarker* qpm=get_marker(id); if(qpm) qpm->detach(); #else qwtplotter->removeMarker(id); #endif } void GuiPlot::set_marker_pos(long id, double x) { Log odinlog("GuiPlot","remove_marker"); ODINLOG(odinlog,normalDebug) << "id/x=" << id << "/" << x << STD_endl; #if QWT_VERSION > 0x04FFFF QwtPlotMarker* qpm=get_marker(id); if(qpm) qpm->setXValue(x); #else qwtplotter->setMarkerXPos(id,x); #endif } void GuiPlot::set_curve_data(long curveid, const double* x, const double* y, int n, bool symbol) { Log odinlog("GuiPlot","set_curve_data"); ODINLOG(odinlog,normalDebug) << "curveid/x/y/symbol=" << curveid << "/" << x << "/" << y << "/" << symbol << STD_endl; #if QWT_VERSION > 0x04FFFF QwtSymbol::Style symbstyle=QwtSymbol::NoSymbol; #else QwtSymbol::Style symbstyle=QwtSymbol::None; #endif if(symbol) { symbstyle=QwtSymbol::Ellipse; } QwtSymbol* symb=new QwtSymbol(symbstyle,QBrush(),QColor(_ARRAY_FOREGROUND_COLOR1_),QSize(PLOT_SYMBOLS_SIZE,PLOT_SYMBOLS_SIZE)); if(n) { ODINLOG(odinlog,normalDebug) << "y[" << n/2 << "]=" << y[n/2] << STD_endl; } #if QWT_VERSION > 0x04FFFF QwtPlotCurve* qpc=get_curve(curveid); if(qpc) { #if QWT_VERSION < 0x060000 qpc->setSymbol(*symb); qpc->setRawData(x, y, n); #else qpc->setSymbol(symb); qpc->setRawSamples(x, y, n); #endif } #else qwtplotter->setCurveSymbol(curveid,*symb); qwtplotter->setCurveRawData(curveid, x, y, n); #endif #if QWT_VERSION < 0x060000 delete symb; // qwt6 deletes symbol itself #endif } void GuiPlot::replot() { Log odinlog("GuiPlot","replot"); ODINLOG(odinlog,normalDebug) << "replotting " << curve_map.size() << " curves and " << marker_map.size() << " markers" << STD_endl; qwtplotter->replot(); // qwtzoomer->setZoomBase(); } void GuiPlot::autoscale() { qwtplotter->setAxisAutoScale(QwtPlot::xBottom); qwtplotter->setAxisAutoScale(QwtPlot::yLeft); qwtplotter->setAxisAutoScale(QwtPlot::yRight); replot(); } void GuiPlot::autoscale_y(double& maxBound) { qwtplotter->setAxisAutoScale(QwtPlot::yLeft); qwtplotter->replot(); // seems to be neccessary for correct autoscaling, even if the curve is already added #if QWT_VERSION > 0x04FFFF #if QWT_VERSION > 0x0501FF #if QWT_VERSION < 0x060100 double new_lbound=qwtplotter->axisScaleDiv(QwtPlot::yLeft)->lowerBound(); double new_hbound=qwtplotter->axisScaleDiv(QwtPlot::yLeft)->upperBound(); #else double new_lbound=qwtplotter->axisScaleDiv(QwtPlot::yLeft).lowerBound(); double new_hbound=qwtplotter->axisScaleDiv(QwtPlot::yLeft).upperBound(); #endif #else double new_lbound=qwtplotter->axisScaleDiv(QwtPlot::yLeft)->lBound(); double new_hbound=qwtplotter->axisScaleDiv(QwtPlot::yLeft)->hBound(); #endif #else double new_lbound=qwtplotter->axisScale(QwtPlot::yLeft)->lBound(); double new_hbound=qwtplotter->axisScale(QwtPlot::yLeft)->hBound(); #endif // symmetrical adjustment maxBound=STD_max(fabs(new_lbound),fabs(new_hbound)); new_lbound=-maxBound; new_hbound= maxBound; qwtplotter->setAxisScale(QwtPlot::yLeft, new_lbound, new_hbound); // switch back to manual scaling for scrolling replot(); } void GuiPlot::rescale_y(double maxBound) { qwtplotter->setAxisScale(QwtPlot::yLeft, -maxBound, maxBound); replot(); } void GuiPlot::clear() { Log odinlog("GuiPlot","clear()"); #if QWT_VERSION > 0x04FFFF for(STD_map::const_iterator curvit=curve_map.begin(); curvit!=curve_map.end(); ++curvit) { ODINLOG(odinlog,normalDebug) << "Detaching curve #" << curvit->first << STD_endl; curvit->second->detach(); ODINLOG(odinlog,normalDebug) << "Deleting curve #" << curvit->first << STD_endl; delete curvit->second; } ODINLOG(odinlog,normalDebug) << "Clearing curve cache" << STD_endl; curve_map.clear(); ODINLOG(odinlog,normalDebug) << "Removing markers" << STD_endl; remove_markers(); #endif #if QWT_VERSION < 0x060000 qwtplotter->clear(); // do this after detaching curves #else // qwtplotter->detachItems(); // does not work with QwtPlotGrid #endif } void GuiPlot::remove_markers() { #if QWT_VERSION > 0x04FFFF for(STD_map::const_iterator markit=marker_map.begin(); markit!=marker_map.end(); ++markit) { markit->second->detach(); delete markit->second; } marker_map.clear(); #else qwtplotter->removeMarkers(); #endif } double GuiPlot::get_x(int x_pixel) const { Log odinlog("GuiPlot","get_x"); double result=qwtplotter->invTransform(QwtPlot::xBottom,x_pixel+canvas_framewidth); ODINLOG(odinlog,normalDebug) << "result/x_pixel=" << result << "/" << x_pixel << STD_endl; return result;; } double GuiPlot::get_y(int y_pixel, bool right_axes) const { if(right_axes) return qwtplotter->invTransform(QwtPlot::yRight, y_pixel+canvas_framewidth); else return qwtplotter->invTransform(QwtPlot::yLeft, y_pixel+canvas_framewidth); } long GuiPlot::closest_curve(int x, int y, int& dist) const { #if QWT_VERSION > 0x04FFFF Log odinlog("GuiPlot","closest_curve"); long result=-1; double dmin = 1.0e10; double curvedist; QPoint pos(x,y); for(STD_map::const_iterator curvit=curve_map.begin(); curvit!=curve_map.end(); ++curvit) { curvit->second->closestPoint(pos,&curvedist); if(curvedistfirst; dist=int(curvedist); dmin=curvedist; } } ODINLOG(odinlog,normalDebug) << "result/dist" << result << "/" << dist << STD_endl; return result; #else return qwtplotter->closestCurve(x,y,dist); #endif } void GuiPlot::highlight_curve(long id, bool flag) { const char* color=_ARRAY_FOREGROUND_COLOR1_; if(flag) color=_ARRAY_HIGHLIGHT_COLOR_; set_curve_pen(id,color); } void GuiPlot::set_x_axis_scale(double lbound, double ubound) { Log odinlog("GuiPlot","set_x_axis_scale"); ODINLOG(odinlog,normalDebug) << "lbound/ubound=" << lbound << "/" << ubound << STD_endl; qwtplotter->setAxisScale(QwtPlot::xBottom,lbound,ubound); } void GuiPlot::set_y_axis_scale(double lbound, double ubound, bool right_axes) { if(right_axes) qwtplotter->setAxisScale(QwtPlot::yRight,lbound,ubound); else qwtplotter->setAxisScale(QwtPlot::yLeft, lbound,ubound); } void GuiPlot::set_curve_pen(long id, const char* color, int width) { QPen qp; qp.setColor(color); qp.setWidth(width); #if QWT_VERSION > 0x04FFFF QwtPlotCurve* qpc=get_curve(id); if(qpc) qpc->setPen(qp); #else qwtplotter->setCurvePen(id,qp); #endif } void GuiPlot::set_rect_outline_style() { #if QWT_VERSION < 0x060000 picker->setSelectionFlags(QwtPicker::RectSelection | QwtPicker::CornerToCorner | QwtPicker::DragSelection); #else picker->setStateMachine(new QwtPickerDragRectMachine); #endif picker->setRubberBand(QwtPicker::RectRubberBand); } void GuiPlot::set_line_outline_style(bool horizontal) { #if QWT_VERSION < 0x060000 picker->setSelectionFlags(QwtPicker::PointSelection | QwtPicker::DragSelection); #else picker->setStateMachine(new QwtPickerDragPointMachine); #endif if(horizontal) picker->setRubberBand(QwtPicker::HLineRubberBand); else picker->setRubberBand(QwtPicker::VLineRubberBand); } void GuiPlot::enable_axes(bool flag) { qwtplotter->enableAxis(QwtPlot::xBottom,flag); qwtplotter->enableAxis(QwtPlot::yLeft,flag); } void GuiPlot::enable_grid(bool flag) { Log odinlog("GuiPlot","enable_grid"); #if QWT_VERSION > 0x04FFFF plotgrid->enableX(flag); plotgrid->enableY(flag); #else qwtplotter->enableGridX(flag); qwtplotter->enableGridY(flag); #endif } void GuiPlot::print(QPainter* painter, const QRect& rect) const { Log odinlog("GuiPlot","print"); #if QWT_VERSION < 0x060000 GuiPlotPrintFilter pfilter(baseline_id_cache); qwtplotter->print(painter,rect,pfilter); #else QwtPlotRenderer renderer; renderer.render(qwtplotter, painter, QRectF(rect)); #endif } QWidget* GuiPlot::get_widget() {return qwtplotter;} void GuiPlot::emit_plotMousePressed(const QMouseEvent& qme) { emit plotMousePressed(qme); } void GuiPlot::emit_plotMouseReleased(const QMouseEvent& qme) { emit plotMouseReleased(qme); } void GuiPlot::emit_plotMouseMoved(const QMouseEvent& qme) { emit plotMouseMoved(qme); } QwtPlotCurve* GuiPlot::get_curve(long id) { STD_map::iterator it=curve_map.find(id); if(it==curve_map.end()) return 0; return it->second; } QwtPlotMarker* GuiPlot::get_marker(long id) { STD_map::iterator it=marker_map.find(id); if(it==marker_map.end()) return 0; return it->second; } GuiPlot::~GuiPlot() { Log odinlog("GuiPlot","~GuiPlot()"); clear(); #if QWT_VERSION > 0x04FFFF delete plotgrid; #endif delete picker; delete qwtplotter; } //////////////////////////////////////////////////////////////////////////// GuiWheel::GuiWheel(QWidget *parent) { wheel=new QwtWheel(parent); wheel->setOrientation(Qt::Vertical); connect( wheel, SIGNAL(valueChanged(double)), SLOT(emit_valueChanged(double)) ); } void GuiWheel::set_range(double min, double max) { wheel->setRange(min,max); } void GuiWheel::set_value(double newval) { // wheel->fitValue(newval); // ? wheel->setValue(newval); } QWidget* GuiWheel::get_widget() {return wheel;} void GuiWheel::emit_valueChanged(double newval) {emit valueChanged(newval);} GuiWheel::~GuiWheel() { delete wheel; } odin-2.0.5/odinqt/ldrwidget.cpp0000644000175000017500000007735314075732704013407 00000000000000 // Include Qt stuff first to avoid ambiguities with 'debug' symbol #include "intedit.h" #include "floatedit.h" #include "float1d.h" #include "complex1d.h" #include "float3d.h" #include "boolbutton.h" #include "enumbox.h" #include "stringbox.h" #include "ldrwidget.h" #include "ldrblockwidget.h" #include #include #include #include #include /** * * Helper class to analayze the value range of a (scalar) LDR parameter */ class RangeHelper { public: double minval; double maxval; RangeHelper(const LDRbase& ldr) { minval=ldr.get_minval(); maxval=ldr.get_maxval(); } bool has_range() { if(maxval>minval) return true; else return false; } double get_stepsize(unsigned int maxsteps) { Log odinlog("RangeHelper","get_stepsize"); double result=fabs(maxval-minval)/double(maxsteps); double mantisse=log10(result); mantisse=int(mantisse-1.0); result=double(int(result*pow(10.0,-mantisse)))*pow(10.0,mantisse); ODINLOG(odinlog,normalDebug) << "minval=" << minval << STD_endl; ODINLOG(odinlog,normalDebug) << "maxval=" << maxval << STD_endl; ODINLOG(odinlog,normalDebug) << "mantisse=" << mantisse << STD_endl; ODINLOG(odinlog,normalDebug) << "stepsize=" << result << STD_endl; return result; } }; ///////////////////////////////////////////////////////////////////////// LDRwidget::LDRwidget(LDRbase& ldr,unsigned int columns, QWidget *parent, bool doneButton, const char* omittext, bool storeLoadButtons ) : QWidget(parent), val(ldr) { Log odinlog(&val,"LDRwidget(...)"); vport=this; widget_cache=0; blockwidget=0; intslider=0; intedit=0; floatslider=0; floatedit=0; enumwidget=0; boolwidget=0; floatArrempty=0; floatArrwidget1=0; floatArredit=0; // doubleArrwidget1=0; floatArrwidget2=0; complexArrwidget=0; stringwidget=0; filenamewidget=0; funcwidget=0; formulawidget=0; triplewidget=0; grid=0; rows=1; cols=1; if(columns<1) columns=1; bool cast_success=true; ldrlabel_uncut=replaceStr(ldr.get_label(),omittext,"",allOccurences); ldrlabel=ldrlabel_uncut; label_cut=false; if(ldrlabel.length()>_MAX_LABEL_LENGTH_) { label_cut=true; ldrlabel=ldrlabel_uncut.substr(0,_MAX_LABEL_LENGTH_)+"..."; } STD_string unit(ldr.get_unit()); if(unit!="") ldrlabel+=" ["+unit+"]"; ODINLOG(odinlog,normalDebug) << "ldrlabel/omittext=" << ldrlabel << "/" << omittext << STD_endl; grid=new GuiGridLayout( vport, 1, 1, false); ODINLOG(odinlog,normalDebug) << "grid & layout done" << STD_endl; /*---------------- LDR types BEGIN ------------------------*/ /*---------------- LDRblock ------------------------*/ LDRblock* dumblock=0; dumblock=ldr.cast(dumblock); if(dumblock) { label_cut=false; if(dumblock->is_embedded()) cols=2; blockwidget=new LDRblockWidget(*dumblock,columns,vport,doneButton,false,omittext,storeLoadButtons); ODINLOG(odinlog,normalDebug) << "LDRblock: LDRblockWidget done" << STD_endl; GuiGridLayout::Alignment alignment = GuiGridLayout::Default; if(dumblock->numof_pars()<_MAX_SUBWIDGETS_FOR_ALIGNCENT_) alignment=GuiGridLayout::VCenter; set_widget(blockwidget ,alignment, true); ODINLOG(odinlog,normalDebug) << "LDRblock: set_widget done" << STD_endl; connect(blockwidget,SIGNAL(valueChanged()),this,SLOT(emitValueChanged())); connect(blockwidget,SIGNAL(doneButtonPressed()),this,SLOT(emitDone())); ODINLOG(odinlog,normalDebug) << "LDRblock: connect done" << STD_endl; } ODINLOG(odinlog,normalDebug) << "LDRblock done" << STD_endl; /*---------------- LDRint ------------------------*/ int* dumint=0; dumint=ldr.cast(dumint); if(dumint) { RangeHelper intrange(ldr); if(intrange.has_range() && ldr.get_parmode()==edit) { cols=2; long step=int(intrange.get_stepsize(_MAX_SLIDER_STEPS_)); if(step<1) step=1; ODINLOG(odinlog,normalDebug) << "processing >" << ldrlabel << "<" << STD_endl; intslider=new intScientSlider(int(intrange.minval),int(intrange.maxval),step,*dumint,vport,ldrlabel.c_str()); set_widget(intslider); connect(intslider,SIGNAL(intScientSliderValueChanged( int )),this,SLOT(changeLDRint( int ))); connect(this,SIGNAL(newintval( int )),intslider,SLOT(setintScientSliderValue( int ))); } else { intedit=new intLineBox(*dumint,vport,ldrlabel.c_str()); set_widget(intedit); connect(intedit,SIGNAL(intLineBoxValueChanged( int )),this,SLOT(changeLDRint( int ))); connect(this,SIGNAL(newintval( int )),intedit,SLOT(setintLineBoxValue( int ))); } } ODINLOG(odinlog,normalDebug) << "LDRint done" << STD_endl; /*---------------- LDRfloat & LDRdouble ------------------------*/ float* dumfloat=0; dumfloat=ldr.cast(dumfloat); double* dumdouble=0; dumdouble=ldr.cast(dumdouble); if(dumfloat || dumdouble ) { float val=0.0; if(dumfloat) val=(*dumfloat); if(dumdouble) val=(*dumdouble); RangeHelper floatrange(ldr); if(floatrange.has_range() && ldr.get_parmode()==edit) { cols=2; floatslider=new floatScientSlider(floatrange.minval,floatrange.maxval,floatrange.get_stepsize(_MAX_SLIDER_STEPS_),val,_FLOAT_DIGITS_,vport,ldrlabel.c_str()); set_widget(floatslider); connect(floatslider,SIGNAL(floatScientSliderValueChanged( float )),this,SLOT(changeLDRfloat( float ))); connect(this,SIGNAL(newfloatval( float )),floatslider,SLOT(setfloatScientSliderValue( float ))); } else { floatedit=new floatLineBox(val,_FLOAT_DIGITS_,vport,ldrlabel.c_str()); set_widget(floatedit); connect(floatedit,SIGNAL(floatLineBoxValueChanged( float )),this,SLOT(changeLDRfloat( float ))); connect(this,SIGNAL(newfloatval( float )),floatedit,SLOT(setfloatLineBoxValue( float ))); } } ODINLOG(odinlog,normalDebug) << "LDRfloat & LDRdouble done" << STD_endl; /*---------------- LDRenum ------------------------*/ LDRenum* dumenum=0; dumenum=ldr.cast(dumenum); if(dumenum) { enumwidget=new enumBox(dumenum->get_alternatives(),vport,ldrlabel.c_str()); enumwidget->setValue(dumenum->get_item_index()); set_widget(enumwidget); ODINLOG(odinlog,normalDebug) << "widget done" << STD_endl; connect(enumwidget,SIGNAL(newVal( int )), this,SLOT(changeLDRenum( int ))); connect(this,SIGNAL(newenumval( int )),enumwidget,SLOT(setValue( int ))); ODINLOG(odinlog,normalDebug) << "connect done" << STD_endl; } else cast_success=false; ODINLOG(odinlog,normalDebug) << "LDRenum done" << STD_endl; /*---------------- LDRbool ------------------------*/ bool* dumbool=0; dumbool=ldr.cast(dumbool); if(dumbool) { boolwidget=new buttonBox("Yes","No",*dumbool, vport, ldrlabel.c_str()); set_widget(boolwidget); connect(boolwidget,SIGNAL(buttonToggled(bool)), this,SLOT(changeLDRbool( bool ))); connect(this,SIGNAL(newboolval( bool )),boolwidget,SLOT(setToggleState( bool ))); } else cast_success=false; ODINLOG(odinlog,normalDebug) << "LDRbool done" << STD_endl; /*---------------- LDRaction ------------------------*/ LDRaction* dumaction=0; dumaction=ldr.cast(dumaction); if(dumaction && (dumaction->get_parmode()==edit) ) { actionwidget=new buttonBox("Now",vport,ldrlabel.c_str()); set_widget(actionwidget); connect(actionwidget,SIGNAL(buttonClicked()), this,SLOT(changeLDRaction())); } else cast_success=false; ODINLOG(odinlog,normalDebug) << "LDRaction done" << STD_endl; /*---------------- LDRfloatArr ------------------------*/ farray* dumfarray=0; dumfarray=ldr.cast(dumfarray); if(dumfarray) { create_or_update_floatArrwidget(*dumfarray,true); } else cast_success=false; ODINLOG(odinlog,normalDebug) << "LDRfloatArr done" << STD_endl; /*---------------- LDRdoubleArr ------------------------*/ darray* dumdarray=0; dumdarray=ldr.cast(dumdarray); if(dumdarray) { ODINLOG(odinlog,normalDebug) << "dumdarray=" << (void*)dumdarray << "/" << STD_string(dumdarray->get_extent()) << STD_endl; farray farr(dumdarray->get_extent()); for(unsigned int i=0; idim()=" << dumcarray->dim() << STD_endl; if(dumcarray->dim()==1) { fvector ampvec=amplitude(*dumcarray); fvector phavec=phase(*dumcarray); rows=3; cols=2; ODINLOG(odinlog,normalDebug) << "rows/cols=" << rows << "/" << cols << STD_endl; ArrayScale x_axprops=val.get_gui_props().scale[xPlotScale]; ArrayScale y1_axprops=val.get_gui_props().scale[yPlotScaleLeft]; ArrayScale y2_axprops=val.get_gui_props().scale[yPlotScaleRight]; bool fixedsize=val.get_gui_props().fixedsize; complexArrwidget=new complexfloatBox1D(ampvec.c_array(),phavec.c_array(),dumcarray->length(),vport,ldrlabel.c_str(),fixedsize, x_axprops.get_label_with_unit().c_str(), y1_axprops.get_label_with_unit().c_str(), y2_axprops.get_label_with_unit().c_str(), x_axprops.minval,x_axprops.maxval,val.get_gui_props().fixedsize); set_widget(complexArrwidget, GuiGridLayout::Default, true); connect(this,SIGNAL(newcomplexArr( const float*, const float*, int, float, float)), complexArrwidget,SLOT(refresh( const float*, const float*, int, float, float))); } } else cast_success=false; ODINLOG(odinlog,normalDebug) << "LDRcomplexArr done" << STD_endl; /*---------------- LDRfunction ------------------------*/ LDRfilter("dummy"); // created dummy to force initialization of registered_functions (in USING_WIN32/DLL) ODINLOG(odinlog,normalDebug) << "Testing for function" << STD_endl; LDRfunction* dumfunc=0; dumfunc=ldr.cast(dumfunc); if(dumfunc) { ODINLOG(odinlog,normalDebug) << "LDR is function" << STD_endl; cols=2; funcwidget=new enumBox(dumfunc->get_alternatives(),vport,ldrlabel.c_str(),true,true); ODINLOG(odinlog,normalDebug) << "funcwidget done" << STD_endl; funcwidget->setValue(dumfunc->get_function_index()); ODINLOG(odinlog,normalDebug) << "setValue done" << STD_endl; set_widget(funcwidget); ODINLOG(odinlog,normalDebug) << "set_widget done" << STD_endl; connect(funcwidget,SIGNAL(newVal( int )), this,SLOT(changeLDRfunction( int ))); connect(funcwidget,SIGNAL(edit()), this,SLOT(editLDRfunction())); connect(funcwidget,SIGNAL(info()), this,SLOT(infoLDRfunction())); connect(this,SIGNAL(newfuncval( int )),funcwidget,SLOT(setValue( int ))); ODINLOG(odinlog,normalDebug) << "connect done" << STD_endl; } else cast_success=false; ODINLOG(odinlog,normalDebug) << "LDRfunction done" << STD_endl; /*---------------- LDRstring ------------------------*/ STD_string* dumstring=0; dumstring=ldr.cast(dumstring); if(dumstring) { cols=2; stringwidget=new stringBox(dumstring->c_str(),vport,ldrlabel.c_str()); set_widget(stringwidget); connect(stringwidget,SIGNAL(stringBoxTextEntered( const char* )), this,SLOT(changeLDRstring( const char* ))); connect(this,SIGNAL(newstringval( const char* )),stringwidget,SLOT(setstringBoxText( const char* ))); } else cast_success=false; ODINLOG(odinlog,normalDebug) << "LDRstring done" << STD_endl; /*---------------- LDRfileName ------------------------*/ LDRfileName* dumfileName=0; dumfileName=ldr.cast(dumfileName); if(dumfileName) { cols=2; filenamewidget=new stringBox(dumfileName->c_str(),vport,ldrlabel.c_str(),"Browse"); set_widget(filenamewidget); connect(filenamewidget,SIGNAL(stringBoxTextEntered( const char* )), this,SLOT(changeLDRfileName( const char* ))); connect(filenamewidget,SIGNAL(stringBoxButtonPressed()), this,SLOT(browseLDRfileName())); connect(this,SIGNAL(newfilenameval( const char* )),filenamewidget,SLOT(setstringBoxText( const char* ))); } else cast_success=false; ODINLOG(odinlog,normalDebug) << "LDRfileName done" << STD_endl; /*---------------- LDRformula ------------------------*/ LDRformula* dumformula=0; dumformula=ldr.cast(dumformula); if(dumformula) { cols=2; formulawidget=new stringBox(dumformula->c_str(),vport,ldrlabel.c_str(),"Syntax"); set_widget(formulawidget); connect(formulawidget,SIGNAL(stringBoxTextEntered( const char* )), this,SLOT(changeLDRformula( const char* ))); connect(formulawidget,SIGNAL(stringBoxButtonPressed()), this,SLOT(infoLDRformula())); connect(this,SIGNAL(newformulaval( const char* )),formulawidget,SLOT(setstringBoxText( const char* ))); } else cast_success=false; ODINLOG(odinlog,normalDebug) << "LDRformula done" << STD_endl; /*---------------- LDRtriple ------------------------*/ LDRtriple* dumtriple=0; dumtriple=ldr.cast(dumtriple); if(dumtriple) { cols=2; triplewidget=new floatLineBox3D((*dumtriple)[0],(*dumtriple)[1],(*dumtriple)[2],_FLOAT_DIGITS_,vport,ldrlabel.c_str()); set_widget(triplewidget); connect(triplewidget,SIGNAL(floatLineBox3DValueChanged(float,float,float)), this,SLOT(changeLDRtriple(float,float,float))); connect(this,SIGNAL(newtripleval(float,float,float)),triplewidget,SLOT(setfloatLineBox3DValue(float,float,float))); } else cast_success=false; ODINLOG(odinlog,normalDebug) << "LDRtriple done" << STD_endl; /*---------------- LDR types swith END ------------------------*/ if(!cast_success) { ODINLOG(odinlog,normalDebug) << "Unable to proces parameter >" << ldrlabel << "<" << STD_endl; } return; } void LDRwidget::write_pixmap(const char* fname, const char* format, bool dump_all) const { if(floatArrwidget2) floatArrwidget2->write_pixmap(fname, format, dump_all); } void LDRwidget::write_legend(const char* fname, const char* format) const { if(floatArrwidget2) floatArrwidget2->write_legend(fname, format); } void LDRwidget::write_map_legend(const char* fname, const char* format) const { if(floatArrwidget2) floatArrwidget2->write_map_legend(fname, format); } LDRwidget::~LDRwidget(){ // do not acces 'val' here because it might be deleted already if(blockwidget) delete blockwidget; if(intslider) delete intslider; if(intedit) delete intedit; if(floatslider) delete floatslider; if(floatedit) delete floatedit; if(enumwidget) delete enumwidget; if(boolwidget) delete boolwidget; if(floatArrempty) delete floatArrempty; if(floatArrwidget1) delete floatArrwidget1; if(floatArredit) delete floatArredit; if(floatArrwidget2) delete floatArrwidget2; // if(doubleArrwidget1) delete doubleArrwidget1; if(complexArrwidget) delete complexArrwidget; if(funcwidget) delete funcwidget; if(stringwidget) delete stringwidget; if(filenamewidget) delete filenamewidget; if(formulawidget) delete formulawidget; if(triplewidget) delete triplewidget; if(grid) delete grid; } STD_string LDRwidget::get_label() const {return val.get_label();} int LDRwidget::get_current_z() const { if(floatArrwidget2) return floatArrwidget2->get_current_z(); return -1; } void LDRwidget::set_widget(QWidget *widget, GuiGridLayout::Alignment alignment, bool override_enabled) { Log odinlog(&val,"set_widget"); widget_cache=widget; parameterMode parmode=val.get_parmode(); ODINLOG(odinlog,normalDebug) << "parmode(" << ldrlabel << ")=" << parmode << STD_endl; if(parmode==hidden) return; bool enabled=true; if(parmode>=noedit) enabled=false; if(override_enabled) enabled=true; ODINLOG(odinlog,normalDebug) << "enabled=" << enabled << STD_endl; widget_cache->setEnabled(enabled); ODINLOG(odinlog,normalDebug) << "parameterMode done" << STD_endl; bool show_tooltip=label_cut; STD_string tooltip=ldrlabel_uncut; STD_string descr=val.get_description(); if(descr!="") { tooltip+=": "+descr; tooltip=justificate(tooltip); show_tooltip=true; } if(show_tooltip) add_tooltip(widget_cache,tooltip.c_str()); grid->add_widget( widget, 0, 0, alignment); widget->show(); } unsigned int LDRwidget::get_sizedfarray_size_and_factor(unsigned int& nx, unsigned int& ny, unsigned int& nz) const { Log odinlog(&val,"get_sizedfarray_size_and_factor"); PixmapProps pixprops=val.get_gui_props().pixmap; int dim=sizedfarray.dim(); nx=sizedfarray.size(dim-1); ny=sizedfarray.size(dim-2); nz=1; if(dim==3) nz=sizedfarray.size(dim-3); unsigned int factor=1; ODINLOG(odinlog,normalDebug) << "ny/nx=" << ny << "/" << nx << STD_endl; ODINLOG(odinlog,normalDebug) << "minsize/maxsize=" << pixprops.minsize << "/" << pixprops.maxsize << STD_endl; if (nx >= ny) factor=(unsigned int)secureDivision(pixprops.minsize,ny); else factor=(unsigned int)secureDivision(pixprops.minsize,nx); if(!factor) factor=1; if( (factor*nx) > pixprops.maxsize) factor=(unsigned int)secureDivision(pixprops.maxsize,nx); if( (factor*ny) > pixprops.maxsize) factor=(unsigned int)secureDivision(pixprops.maxsize,ny); if(!factor) factor=1; return factor; } void LDRwidget::create_or_update_floatArrwidget(const farray& arr, bool initial) { Log odinlog(&val,"create_or_update_floatArrwidget"); rows=2; cols=2; ArrayScale x_axprops=val.get_gui_props().scale[xPlotScale]; ArrayScale y_axprops=val.get_gui_props().scale[yPlotScaleLeft]; sizedfarray=arr; sizedfarray.autosize(); unsigned int newdim=sizedfarray.dim(); unsigned int newsize=sizedfarray.total(); if(newdim==3) newdim=2; // treat 2D and 3D equally if(newsize==0) newdim=0; // treat zero size as zero dim ODINLOG(odinlog,normalDebug) << "newdim/newsize=" << newdim << "/" << newsize << STD_endl; if(!initial) { unsigned int olddim=oldfarraysize.dim(); unsigned int oldsize=oldfarraysize.total(); if(olddim==3) olddim=2; // treat 2D and 3D equally bool delete_old=false; if(newdim!=olddim) delete_old=true; if(newdim==1 && (newsize!=oldsize) && (newsize==1 || oldsize==1)) delete_old=true; if(newdim>1 && sizedfarray.get_extent()!=oldfarraysize) delete_old=true; ODINLOG(odinlog,normalDebug) << "newdim/olddim/newsize/oldsize/delete_old=" << newdim << "/" << olddim << "/" << newsize << "/" << oldsize << "/" << delete_old << STD_endl; if(delete_old) { if(floatArrempty) {floatArrempty->hide(); delete floatArrempty; floatArrempty=0;} if(floatArrwidget1) {floatArrwidget1->hide(); delete floatArrwidget1; floatArrwidget1=0;} if(floatArredit) {floatArredit->hide(); delete floatArredit; floatArredit=0;} if(floatArrwidget2) {floatArrwidget2->hide(); delete floatArrwidget2; floatArrwidget2=0;} } } if(newdim==0) { if(!floatArrempty) { floatArrempty=new QLabel(this); floatArrempty->setText((ldrlabel+"(Empty)").c_str()); set_widget(floatArrempty); } } if(newdim==1) { if(newsize==1) { rows=1; cols=1; if(floatArredit) { emit newfloatval( sizedfarray[0] ); } else { floatArredit=new floatLineBox(sizedfarray[0],_FLOAT_DIGITS_,vport,ldrlabel.c_str()); set_widget(floatArredit); connect(floatArredit,SIGNAL(floatLineBoxValueChanged( float )),this,SLOT(changeLDRfloat( float ))); connect(this,SIGNAL(newfloatval( float )),floatArredit,SLOT(setfloatLineBoxValue( float ))); } } if(newsize>1) { rows=3; ODINLOG(odinlog,normalDebug) << "x_label/unit=" << x_axprops.label << "/" << x_axprops.unit << STD_endl; ODINLOG(odinlog,normalDebug) << "y_label/unit=" << y_axprops.label << "/" << y_axprops.unit << STD_endl; if(floatArrwidget1) { emit newfloatArr1( sizedfarray.c_array(), sizedfarray.length(), x_axprops.minval,x_axprops.maxval ); } else { floatArrwidget1=new floatBox1D(sizedfarray.c_array(),sizedfarray.length(),vport,ldrlabel.c_str(),val.get_gui_props().fixedsize, x_axprops.get_label_with_unit().c_str(),y_axprops.get_label_with_unit().c_str(), x_axprops.minval,x_axprops.maxval,val.get_gui_props().fixedsize); set_widget(floatArrwidget1, GuiGridLayout::Default, true); connect(this,SIGNAL(newfloatArr1( const float*, int, float, float)), floatArrwidget1,SLOT(refresh( const float*, int, float, float))); } } } if(newdim==2) { ArrayScale dispscale=val.get_gui_props().scale[displayScale]; ODINLOG(odinlog,normalDebug) << "dispscale.minval/maxval=" << dispscale.minval << "/" << dispscale.maxval << STD_endl; if(val.get_gui_props().pixmap.autoscale) { dispscale.minval=sizedfarray.minvalue(); dispscale.maxval=sizedfarray.maxvalue(); ODINLOG(odinlog,normalDebug) << "Autoscaling with min/max=" << dispscale.minval << "/" << dispscale.maxval << STD_endl; sizedfarray.normalize(); } if(floatArrwidget2) { ODINLOG(odinlog,normalDebug) << "Emitting new c_array" << STD_endl; emit newfloatArr2( sizedfarray.c_array(),dispscale.minval,dispscale.maxval); mapfarray=val.get_gui_props().pixmap.overlay_map; // mapfarray.normalize(); if(mapfarray.total()) { ODINLOG(odinlog,normalDebug) << "New overlay_map" << STD_endl; float mapmin, mapmax; val.get_gui_props().pixmap.get_overlay_range(mapmin, mapmax); emit newfloatArrMap(mapfarray.c_array(), mapmin, mapmax, val.get_gui_props().pixmap.overlay_rectsize); } } else { unsigned int nx,ny,nz; unsigned int factor=get_sizedfarray_size_and_factor(nx,ny,nz); bool colormap=val.get_gui_props().pixmap.color; overlay_map=val.get_gui_props().pixmap.overlay_map; // create local copy for c_array() bool olm_firescale=val.get_gui_props().pixmap.overlay_firescale; float olm_rectsize=val.get_gui_props().pixmap.overlay_rectsize; const float* olm=0; int olm_x=1; int olm_y=1; int olm_z=1; float olm_upp=0.0; float olm_low=0.0; if(overlay_map.length()) { val.get_gui_props().pixmap.get_overlay_range(olm_low, olm_upp); // olm_upp=overlay_map.maxvalue(); // olm_low=overlay_map.minvalue(); // overlay_map.normalize(); olm=overlay_map.c_array(); int olm_dim=overlay_map.dim(); if(olm_dim>2) olm_z=overlay_map.size(olm_dim-3); if(olm_dim>1) olm_y=overlay_map.size(olm_dim-2); if(olm_dim>0) olm_x=overlay_map.size(olm_dim-1); ODINLOG(odinlog,normalDebug) << "olm/olm_z/olm_y/olm_x=" << olm << "/" << olm_z << "/" << olm_y << "/" << olm_x << STD_endl; } floatArrwidget2=new floatBox3D(sizedfarray.c_array(),dispscale.minval,dispscale.maxval,nx,ny,nz, !dispscale.enable,factor,vport,ldrlabel.c_str(), olm,olm_low,olm_upp,olm_x,olm_y,olm_z,olm_firescale,olm_rectsize,colormap); set_widget(floatArrwidget2, GuiGridLayout::Default, true); connect(floatArrwidget2,SIGNAL(clicked(int,int,int)),this,SLOT(emitClicked(int, int, int))); connect(floatArrwidget2,SIGNAL(newProfile(const float*, int, bool, int)),this,SLOT(emitNewProfile(const float*, int, bool, int))); connect(floatArrwidget2,SIGNAL(newMask(const float*, int)),this,SLOT(emitNewMask(const float*, int))); connect(this,SIGNAL(newfloatArr2( const float*, float, float)),floatArrwidget2,SLOT(refresh( const float*, float, float))); connect(this,SIGNAL(newfloatArrMap( const float*, float, float, float)),floatArrwidget2,SLOT(refreshMap( const float*, float, float, float ))); } } oldfarraysize=sizedfarray.get_extent(); } void LDRwidget::emitValueChanged() { emit valueChanged(); } void LDRwidget::emitDone() { emit doneButtonPressed(); } void LDRwidget::updateWidget() { Log odinlog(&val,"updateWidget"); emit updateSubWidget(); if(blockwidget) blockwidget->updateWidget(); // for all 1D/2D plots, get again, might have been changed ArrayScale x_axprops=val.get_gui_props().scale[xPlotScale]; PixmapProps pixprops=val.get_gui_props().pixmap; if(intslider || intedit) { ODINLOG(odinlog,normalDebug) << "newintval(" << val.get_label() << ")=" << val.printvalstring() << STD_endl; emit newintval( atoi(val.printvalstring().c_str()) ); } if(floatslider || floatedit) { float* dumfloat=0; dumfloat=val.cast(dumfloat); double* dumdouble=0; dumdouble=val.cast(dumdouble); float floatval=0.0; if(dumfloat) floatval=(*dumfloat); if(dumdouble) floatval=(*dumdouble); emit newfloatval( floatval ); } if(enumwidget) { LDRenum* dumenum=0; dumenum=val.cast(dumenum); if(dumenum) emit newenumval( dumenum->get_item_index() ); } if(boolwidget) { bool* dumbool=0; dumbool=val.cast(dumbool); if(dumbool) emit newboolval(*dumbool); } if(complexArrwidget) { carray* dumcarray=0; dumcarray=val.cast(dumcarray); if(dumcarray) { if(dumcarray->dim()==1) { fvector ampvec=amplitude(*dumcarray); fvector phavec=phase(*dumcarray); emit newcomplexArr( ampvec.c_array(), phavec.c_array(), dumcarray->length(), x_axprops.minval,x_axprops.maxval); } } } if(floatArrempty || floatArrwidget1 || floatArrwidget2 || floatArredit) { farray* dumfarray=0; dumfarray=val.cast(dumfarray); if(dumfarray) { create_or_update_floatArrwidget(*dumfarray,false); } darray* dumdarray=0; dumdarray=val.cast(dumdarray); if(dumdarray) { ODINLOG(odinlog,normalDebug) << "dumdarray=" << (void*)dumdarray << "/" << STD_string(dumdarray->get_extent()) << STD_endl; farray farr(dumdarray->get_extent()); for(unsigned int i=0; iget_function_index() ); ODINLOG(odinlog,normalDebug) << "get_function_index()=" << dumfunc->get_function_index() << STD_endl; for(STD_list::iterator it=subdialogs.begin(); it!=subdialogs.end(); ++it) { (*it)->updateWidget(); } } if(stringwidget) { STD_string* dumstring=0; dumstring=val.cast(dumstring); if(dumstring) { const char* str=dumstring->c_str(); ODINLOG(odinlog,normalDebug) << "str=" << str << STD_endl; emit newstringval(str); } } if(filenamewidget) { LDRfileName* dumfileName=0; dumfileName=val.cast(dumfileName); if(dumfileName) emit newfilenameval( dumfileName->c_str() ); } if(formulawidget) { LDRformula* dumformula=0; dumformula=val.cast(dumformula); if(dumformula) emit newformulaval( dumformula->c_str() ); } if(triplewidget) { LDRtriple* dumtriple=0; dumtriple=val.cast(dumtriple); if(dumtriple) emit newtripleval( (*dumtriple)[0],(*dumtriple)[1],(*dumtriple)[2] ); } } void LDRwidget::deleteDialogs() { emit deleteSubDialogs(); for(STD_list::iterator it=subdialogs.begin(); it!=subdialogs.end(); ++it) { (*it)->hide(); // delete (*it); } subdialogs.clear(); } void LDRwidget::changeLDRint( int newval ) { int* dumint=0; dumint=val.cast(dumint); if(dumint) (*dumint)=newval; long* dumlong=0; dumlong=val.cast(dumlong); if(dumlong) (*dumlong)=newval; emit valueChanged(); } void LDRwidget::changeLDRfloat( float newval ) { Log odinlog(&val,"changeLDRfloat"); ODINLOG(odinlog,normalDebug) << "newval=" << newval << STD_endl; float* dumfloat=0; dumfloat=val.cast(dumfloat); if(dumfloat) (*dumfloat)=newval; double* dumdouble=0; dumdouble=val.cast(dumdouble); if(dumdouble) (*dumdouble)=newval; farray* dumfarray=0; dumfarray=val.cast(dumfarray); if(dumfarray && dumfarray->length()) dumfarray[0]=newval; darray* dumdarray=0; dumdarray=val.cast(dumdarray); if(dumdarray && dumdarray->length()) dumdarray[0]=newval; // STD_string dummy=LDRdouble(newval).printvalstring(); // val.parsevalstring(dummy); ODINLOG(odinlog,normalDebug) << "val=" << val.printvalstring() << STD_endl; emit valueChanged(); } void LDRwidget::changeLDRenum( int newval ) { LDRenum* dumenum=0; dumenum=val.cast(dumenum); if(dumenum) dumenum->set_item_index(newval); emit valueChanged(); } void LDRwidget::changeLDRbool( bool newval ) { bool* dumbool=0; dumbool=val.cast(dumbool); if(dumbool) (*dumbool)=newval; emit valueChanged(); } void LDRwidget::changeLDRaction() { LDRaction* dumaction=0; dumaction=val.cast(dumaction); if(dumaction) dumaction->trigger_action(); emit valueChanged(); } void LDRwidget::changeLDRfunction( int newval ) { Log odinlog(&val,"changeLDRfunction"); ODINLOG(odinlog,normalDebug) << "newval=" << newval << STD_endl; deleteDialogs(); LDRfunction* dumfunc=0; dumfunc=val.cast(dumfunc); if(dumfunc) dumfunc->set_function(newval); emit valueChanged(); } void LDRwidget::changeLDRstring( const char* newval ) { Log odinlog(&val,"changeLDRstring"); ODINLOG(odinlog,normalDebug) << "newval=" << newval << STD_endl; STD_string* dumstring=0; dumstring=val.cast(dumstring); if(dumstring) { STD_string newval_str=STD_string(newval); // direct assignment gives bogus results on MacOS 10.4 with GCC4 and std::string (*dumstring)=newval_str; ODINLOG(odinlog,normalDebug) << "newval_str/dumstring=" << newval_str << "/" << (*dumstring) << STD_endl; } emit valueChanged(); } void LDRwidget::changeLDRfileName( const char* newval ) { LDRfileName* dumfilename=0; dumfilename=val.cast(dumfilename); if(dumfilename) { STD_string newvalstr(newval); (*dumfilename)=newvalstr; } emit valueChanged(); } void LDRwidget::changeLDRformula( const char* newval ) { LDRformula* dumformula=0; dumformula=val.cast(dumformula); if(dumformula) (*dumformula)=newval; emit valueChanged(); } void LDRwidget::changeLDRtriple( float xval,float yval,float zval ) { LDRtriple* dumtriple=0; dumtriple=val.cast(dumtriple); if(dumtriple) { (*dumtriple)[0]=xval; (*dumtriple)[1]=yval; (*dumtriple)[2]=zval; } emit valueChanged(); } void LDRwidget::browseLDRfileName() { Log odinlog(&val,"browseLDRfileName"); LDRfileName* dumfilename=0; dumfilename=val.cast(dumfilename); if(dumfilename) { STD_string suffix=dumfilename->get_suffix(); ODINLOG(odinlog,normalDebug) << "suffix=" << suffix << STD_endl; if(suffix!="") suffix=STD_string(val.get_label())+" (*."+suffix+")"; STD_string startdir=dumfilename->get_defaultdir(); // local copy for c_str() ODINLOG(odinlog,normalDebug) << "startdir/suffix=" << startdir << "/" << suffix << STD_endl; STD_string fname; if(dumfilename->is_dir()) fname=get_directory("Please select a directory", startdir.c_str(), vport); else fname=get_open_filename("Please select a file", startdir.c_str(), suffix.c_str(), vport); if (fname!="") { (*dumfilename)=fname; filenamewidget->setstringBoxText(fname.c_str()); } } emit valueChanged(); } void LDRwidget::infoLDRformula() { LDRformula* dumformula=0; dumformula=val.cast(dumformula); if(dumformula) { message_question((justificate(dumformula->get_syntax(),0,false,_INFOBOX_LINEWIDTH_)).c_str(), val.get_label().c_str(), vport); } emit valueChanged(); } void LDRwidget::editLDRfunction() { LDRfunction* dumfunc=0; dumfunc=val.cast(dumfunc); if(dumfunc) { LDRwidgetDialog* dlg=new LDRwidgetDialog(*(dumfunc->get_funcpars_block()),1,vport); subdialogs.push_back(dlg); connect(dlg,SIGNAL(valueChanged()), this,SLOT(emitValueChanged())); } emit valueChanged(); } void LDRwidget::infoLDRfunction() { LDRfunction* dumfunc=0; dumfunc=val.cast(dumfunc); if(dumfunc) { message_question((justificate(dumfunc->get_funcdescription(),0,false,_INFOBOX_LINEWIDTH_)).c_str(), (dumfunc->get_label()+STD_string(" info")).c_str(), vport); } } odin-2.0.5/odinqt/odinqt.cpp0000644000175000017500000010724714075732705012715 00000000000000#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if QT_VERSION > 0x03FFFF #define QT_VERSION_POST3 #else #define QT_VERSION_3 #endif #ifdef QT_VERSION_POST3 #include #include #include #include #include #include #include #include #else #include #include #include #include #endif #include "odinqt.h" #include "odinqt_callback.h" #include const char* OdinQt::get_compName() {return "OdinQt";} LOGGROUNDWORK(OdinQt) /////////////////////////////////////////////////// const char* c_str(const QString& qs) { if(qs.isEmpty()) return ""; #ifdef QT_VERSION_POST3 return qs.toLocal8Bit().constData(); #else return qs; #endif } int layout_border_size() { #ifdef QT_VERSION_POST3 return 0; #else return (3*QFontInfo(QFont(_FONT_TYPE_, _FONT_SIZE_)).pixelSize()/2); #endif } void init_label(QLabel* ql) { ql->setFrameStyle( QFrame::Box | QFrame::Sunken ); ql->setIndent( 0 ); #ifdef QT_VERSION_POST3 ql->setCursor(Qt::CrossCursor); #else ql->setCursor(Qt::crossCursor); #endif } bool left_button(const QMouseEvent* qme, bool return_current_state) { #ifdef QT_VERSION_POST3 if(return_current_state) return (qme->buttons() & Qt::LeftButton); else return (qme->button() & Qt::LeftButton); #else if(return_current_state) return (qme->state() & Qt::LeftButton); else return (qme->button() & Qt::LeftButton); #endif } bool right_button(const QMouseEvent* qme, bool return_current_state) { #ifdef QT_VERSION_POST3 if(return_current_state) return (qme->buttons() & Qt::RightButton); else return (qme->button() & Qt::RightButton); #else if(return_current_state) return (qme->state() & Qt::RightButton); else return (qme->button() & Qt::RightButton); #endif } bool middle_button(const QMouseEvent* qme, bool return_current_state) { #ifdef QT_VERSION_POST3 if(return_current_state) return (qme->buttons() & Qt::MidButton); else return (qme->button() & Qt::MidButton); #else if(return_current_state) return (qme->state() & Qt::MidButton); else return (qme->button() & Qt::MidButton); #endif } void add_tooltip(QWidget* w, const char* txt) { #ifdef QT_VERSION_POST3 w->setToolTip(txt); #else QToolTip::add(w,txt); #endif } void set_platform_defaults(QWidget* w, bool enable) { #ifdef Q_WS_MAC #ifdef QT_VERSION_POST3 w->setAttribute(Qt::WA_MacMetalStyle,enable); #endif #endif } STD_string get_save_filename(const char* caption, const char* startwith, const char* filter, QWidget* parent) { #ifdef QT_VERSION_POST3 QFileDialog::Options opts=0; #ifdef Q_WS_MAC opts=QFileDialog::DontUseNativeDialog; // native dialog does not work well, e.g. with symlinks #endif QString fname=QFileDialog::getSaveFileName(parent, caption, startwith, filter, 0, opts); #else QString fname=QFileDialog::getSaveFileName(startwith, filter, parent, "", caption); #endif return c_str(fname); } STD_string get_open_filename(const char* caption, const char* startwith, const char* filter, QWidget* parent) { #ifdef QT_VERSION_POST3 QFileDialog::Options opts=0; #ifdef Q_WS_MAC opts=QFileDialog::DontUseNativeDialog; // native dialog does not work well, e.g. with symlinks #endif QString fname=QFileDialog::getOpenFileName(parent, caption, startwith, filter, 0, opts); #else QString fname=QFileDialog::getOpenFileName(startwith, filter, parent, "", caption); #endif return c_str(fname); } STD_string get_directory(const char* caption, const char* startwith, QWidget* parent) { #ifdef QT_VERSION_POST3 QFileDialog::Options opts=QFileDialog::ShowDirsOnly; #ifdef Q_WS_MAC opts|=QFileDialog::DontUseNativeDialog; // native dialog does not work well, e.g. with symlinks #endif QString dname=QFileDialog::getExistingDirectory (parent, caption, startwith,opts); #else QString dname=QFileDialog::getExistingDirectory(startwith, parent, "", caption, true); #endif return c_str(dname); } bool message_question(const char* text, const char* caption, QWidget* parent, bool ask, bool error) { int result=0; if(ask) { // using QMessageBox::Ok and QMessageBox::Cancel does not work on Suse 9,10, // i.e. the order of buttons is mixed up due a patch to Qt, so we do it manually: QString okstr("Ok"); QString cancelstr("Cancel"); #if QT_VERSION > 0x030FFF result=QMessageBox::question(parent, caption, text, okstr, cancelstr); #else result=QMessageBox::information(parent, caption, text, okstr, cancelstr); #endif } else { if(error) result=QMessageBox::critical(parent, caption, text); else result=QMessageBox::information(parent, caption, text); } return (result==0); // return true if default button, which is 'Ok' , is clicked } /////////////////////////////////////////////////// int paintdevice_height(const QPaintDevice* qpd) { #ifdef QT_VERSION_POST3 return qpd->height(); #else QPaintDeviceMetrics metrics(qpd); return metrics.height(); #endif } int paintdevice_width(const QPaintDevice* qpd) { #ifdef QT_VERSION_POST3 return qpd->width(); #else QPaintDeviceMetrics metrics(qpd); return metrics.width(); #endif } /////////////////////////////////////////////////// svector get_possible_image_fileformats() { #ifdef QT_VERSION_POST3 QList fmtlist=QImageReader::supportedImageFormats(); int nfmts=fmtlist.size(); #else QStrList fmtlist=QImageIO::outputFormats(); int nfmts=fmtlist.count(); #endif svector result; result.resize(nfmts); for(int ifmt=0; ifmtsetMargin(layout_border_size()); } GuiGridLayout::~GuiGridLayout() { delete qgl; } void GuiGridLayout::add_widget(QWidget *w, int row, int column, Alignment alignment, int rowSpan, int columnSpan ) { #ifdef QT_VERSION_POST3 Qt::Alignment align=0; #else int align=0; #endif if(alignment==VCenter) align=Qt::AlignVCenter; if(alignment==Center) align=Qt::AlignCenter; #ifdef QT_VERSION_POST3 qgl->addWidget(w, row, column, rowSpan, columnSpan, align ); #else if(rowSpan==1 && columnSpan==1) qgl->addWidget( w, row, column, align ); else qgl->addMultiCellWidget( w, row, row+rowSpan-1, column, column+columnSpan-1, align ); #endif } void GuiGridLayout::set_col_stretch(int col, int factor) { #ifdef QT_VERSION_POST3 qgl->setColumnStretch(col,factor); #else qgl->setColStretch(col,factor); #endif } void GuiGridLayout::set_row_stretch(int row, int factor) { qgl->setRowStretch(row,factor); } void GuiGridLayout::set_col_minsize(int col, int minsize) { #ifdef QT_VERSION_POST3 qgl->setColumnMinimumWidth(col, minsize); #else qgl->addColSpacing(col, minsize); #endif } void GuiGridLayout::set_row_minsize(int row, int minsize) { #ifdef QT_VERSION_POST3 qgl->setRowMinimumHeight(row, minsize); #else qgl->addRowSpacing(row, minsize); #endif } /////////////////////////////////////////////////// GuiButton::GuiButton(QWidget *parent, QObject* receiver, const char* member, const char *onlabel,const char *offlabel, bool initstate) { ontext=onlabel; offtext=offlabel; qpb = new QPushButton(parent); if(onlabel && offlabel) { #ifdef QT_VERSION_POST3 qpb->setCheckable(true); #else qpb->setToggleButton(true); #endif set_toggled(initstate); // set initial text } else { if(ontext) qpb->setText(ontext); } qpb->setAutoDefault(false); // connect( qpb, SIGNAL(toggled(bool)), SLOT(setToggled(bool)) ); qpb->setFixedHeight( qpb->sizeHint().height() ); qpb->setFixedWidth( qpb->sizeHint().width() ); sd=new SlotDispatcher(this,receiver,member); } void GuiButton::set_text(bool state) { if(state) qpb->setText( ontext ); else qpb->setText( offtext ); } void GuiButton::set_toggled(bool state) { if(!(ontext && offtext)) return; set_text(state); #ifdef QT_VERSION_POST3 qpb->setChecked (state); #else qpb->setOn (state); #endif } void GuiButton::set_default(bool state) { qpb->setDefault (state); } QWidget* GuiButton::get_widget() { return qpb; } bool GuiButton::is_on() const { #ifdef QT_VERSION_POST3 return qpb->isChecked(); #else return qpb->isOn(); #endif } GuiButton::~GuiButton() { delete sd; delete qpb; } ///////////////////////////////////////////////// GuiLineEdit::GuiLineEdit(QWidget *parent, QObject* receiver, const char* member, int width, int height) { qle=new QLineEdit(parent); if(width>0 && height>0) qle->setFixedSize(width,height); sd=new SlotDispatcher(this,receiver,member); } GuiLineEdit::~GuiLineEdit() { delete sd; delete qle; } void GuiLineEdit::set_text(const char* txt) {qle->setText(txt);} const char* GuiLineEdit::get_text() const {return c_str(qle->text());} bool GuiLineEdit::is_modified() { #ifdef QT_VERSION_POST3 bool result=qle->isModified(); qle->setModified(false); #else bool result=qle->edited(); qle->setEdited(false); #endif return result; } QWidget* GuiLineEdit::get_widget() {return qle;} /////////////////////////////////////////////////// GuiPopupMenu::GuiPopupMenu(QWidget *parent) : id(0) { #ifdef QT_VERSION_POST3 qm=new QMenu(parent); #else qpm=new QPopupMenu(parent); #endif } GuiPopupMenu::~GuiPopupMenu() { /* // never deleted #ifdef QT_VERSION_POST3 delete qm; #else delete qpm; #endif */ } void GuiPopupMenu::insert_item(const char* text, const QObject* receiver, const char* member, int accel) { #ifdef QT_VERSION_POST3 qm->addAction(text, receiver, member, accel); #else id++; qpm->insertItem(text, receiver, member, accel, id); #endif } void GuiPopupMenu::insert_separator() { #ifdef QT_VERSION_POST3 qm->addSeparator(); #else qpm->insertSeparator(); #endif } void GuiPopupMenu::popup(const QPoint& p) { #ifdef QT_VERSION_POST3 qm->exec(p); // synchronous popup #else qpm->exec(p); // synchronous popup #endif } /////////////////////////////////////////////////// GuiSlider::GuiSlider(QWidget *parent, int minValue, int maxValue, int pageStep, int value, int tickInterval) : modified(false) { #ifdef QT_VERSION_POST3 qs=new QSlider(Qt::Horizontal, parent); qs->setRange(minValue, maxValue); qs->setPageStep(pageStep); qs->setValue(value); qs->setTickPosition(QSlider::TicksBelow); qs->setFocusPolicy( Qt::TabFocus ); #else qs=new QSlider(minValue, maxValue, pageStep, value, QSlider::Horizontal, parent, "QSlider" ); qs->setFocusPolicy( QWidget::TabFocus ); qs->setTickmarks( QSlider::Below ); #endif qs->setMinimumSize(2*SLIDER_CELL_WIDTH,SLIDER_CELL_HEIGHT); qs->setTickInterval(tickInterval ); } int GuiSlider::get_value() const {return qs->value();} void GuiSlider::set_value(int val) {modified=true; qs->setValue(val);} GuiSlider::~GuiSlider() { delete qs; } /////////////////////////////////////////////////// void GuiComboBox::set_names(const svector& names) { #ifdef QT_VERSION_POST3 for (unsigned int i=0; iinsertItem(i, names[i].c_str()); #else for (unsigned int i=0; iinsertItem( names[i].c_str() ); #endif set_current_item(0); } void GuiComboBox::common_init(QWidget* parent, const svector& names) { #ifdef QT_VERSION_POST3 qcb = new QComboBox(parent); qcb->setEditable(false); qcb->setSizeAdjustPolicy(QComboBox::AdjustToContents); // Width to fit all entries #else qcb = new QComboBox( FALSE, parent, "comboBox" ); qcb->setFixedWidth(qcb->sizeHint().width()); #endif qcb->setFixedHeight(qcb->sizeHint().height()); set_names(names); } GuiComboBox::GuiComboBox(QWidget* parent, const svector& names) { common_init(parent,names); } GuiComboBox::GuiComboBox(GuiToolBar* parent, const svector& names) { common_init(parent->get_widget(),names); #ifdef QT_VERSION_POST3 parent->qtb->addWidget(qcb); #endif } void GuiComboBox::set_current_item(int index) { #ifdef QT_VERSION_POST3 qcb->setCurrentIndex(index); #else qcb->setCurrentItem(index); #endif } int GuiComboBox::get_current_item() const { #ifdef QT_VERSION_POST3 return qcb->currentIndex(); #else return qcb->currentItem(); #endif } GuiComboBox::~GuiComboBox() { delete qcb; } /////////////////////////////////////////////////// GuiPainter::GuiPainter(QPixmap* qpm) { qpm_cache=qpm; qp=new QPainter(qpm); qp->setPen(_ARRAY_SELECTION_COLOR_); #ifndef QT_VERSION_POST3 qp->setFont(QFont(_FONT_TYPE_,_FONT_SIZE_)); #endif } GuiPainter::~GuiPainter() { delete qp; } void GuiPainter::moveTo(int x, int y) { #ifdef QT_VERSION_POST3 x_cache=x; y_cache=y; #else qp->moveTo(x,y); #endif } void GuiPainter::lineTo(int x, int y) { #ifdef QT_VERSION_POST3 qp->drawLine(x_cache,y_cache,x,y); x_cache=x; y_cache=y; #else qp->lineTo(x,y); #endif } void GuiPainter::repaint(QLabel* dst) { #ifdef QT_VERSION_POST3 // qp->drawPixmap(0,0,*qpm_cache); bool active=qp->isActive(); if(active) qp->end(); dst->setPixmap(*qpm_cache); if(active) { qp->begin(qpm_cache); qp->setPen(_ARRAY_SELECTION_COLOR_); } #else bitBlt( dst, 2, 2, qpm_cache ); #endif } bool GuiPainter::begin(QPixmap* qpm) { return qp->begin(qpm); } bool GuiPainter::end() { return qp->end(); } void GuiPainter::setPen(const char* pencolor, int linewidth, bool dotted, float lightdark) { Qt::PenStyle ps=Qt::SolidLine; if(dotted) ps=Qt::DotLine; QColor color(pencolor); int lightfactor=100+int(lightdark*90+0.5); QPen pen(color.light(lightfactor)); pen.setWidth(linewidth); pen.setStyle(ps); qp->setPen(pen); } void GuiPainter::fillRect( int x, int y, int w, int h, const QColor& col) { // Transparent: // QBrush qb(col); // qb.setStyle(Qt::Dense4Pattern); // qp->fillRect(QRect(x,y,w,h),qb); qp->fillRect(x,y,w,h,col); } void GuiPainter::drawRect(int x, int y, int w, int h) { qp->drawRect(x,y,w,h); } void GuiPainter::drawText( int x, int y, const QString& txt, const QColor& col) { qp->setPen( col); qp->drawText( x, y, txt); } QRegion* GuiPainter::draw_region(const STD_list& plist) { QRegion* rgn=0; if(plist.size()<3) return rgn; #ifdef QT_VERSION_POST3 QPolygon qpg(plist.size()); unsigned int index=0; for(STD_list::const_iterator it=plist.begin(); it!=plist.end(); ++it) { qpg.setPoint(index, it->x(), it->y()); index++; } rgn=new QRegion(qpg,Qt::WindingFill); #else QPointArray qpa(plist.size()); unsigned int index=0; for(STD_list::const_iterator it=plist.begin(); it!=plist.end(); ++it) { qpa.setPoint(index, it->x(), it->y()); index++; } rgn=new QRegion(qpa,TRUE); #endif qp->setClipRegion(*rgn); qp->fillRect (0,0,qpm_cache->width(),qpm_cache->height(),QBrush(QColor(_ARRAY_SELECTION_COLOR_),Qt::DiagCrossPattern)); return rgn; } /////////////////////////////////////////////////// GuiApplication::GuiApplication(int argc, char *argv[]) { // Create pristine copy of cmdline args for Qt before anything else argc4qt=argc; argv4qt=new char*[argc]; for(int iarg=0; iarg odinlog("GuiApplication","GuiApplication"); ODINLOG(odinlog,normalDebug) << "argc/argv=" << argc << "/" << argv << STD_endl; argc_cache=argc; argv_cache=argv; qa=new QApplication(argc4qt,argv4qt); #ifndef QT_VERSION_POST3 qa->setFont(QFont(_FONT_TYPE_, _FONT_SIZE_)); #endif // setting text color back to normal, even if noedit QPalette pal=qa->palette(); #ifdef QT_VERSION_POST3 pal.setColor(QPalette::Disabled, QPalette::Foreground, pal.color ( QPalette::Active, QPalette::Foreground ) ); pal.setColor(QPalette::Disabled, QPalette::Text, pal.color ( QPalette::Active, QPalette::Text ) ); qa->setPalette(pal); #else pal.setColor(QColorGroup::Foreground, pal.color ( QPalette::Normal, QColorGroup::Foreground ) ); pal.setColor(QColorGroup::Text, pal.color ( QPalette::Normal, QColorGroup::Text ) ); qa->setPalette(pal,true); #endif ODINLOG(odinlog,normalDebug) << "GuiApplication::argc/argv()=" << GuiApplication::argc() << "/" << GuiApplication::argv() << STD_endl; } int GuiApplication::start(QWidget* mainwidget) { Log odinlog("GuiApplication","start"); #ifndef QT_VERSION_POST3 qa->setMainWidget(mainwidget); ODINLOG(odinlog,normalDebug) << "setMainWidget done" << STD_endl; #endif // mainwidget->show(); return qa->exec(); } QObject* GuiApplication::get_object() {return qa;} void GuiApplication::quit() {qApp->quit();} int GuiApplication::argc() {return argc_cache;} char** GuiApplication::argv() {return argv_cache;} void GuiApplication::process_events() {qApp->processEvents();} GuiApplication::~GuiApplication() { qa->quit(); delete qa; // We must delete it to avoid error message when starting as edit widget in Paravision } int GuiApplication::argc4qt; char** GuiApplication::argv4qt; int GuiApplication::argc_cache; char** GuiApplication::argv_cache; /////////////////////////////////////////////////// GuiMainWindow::GuiMainWindow(QWidget* parent) { statusIcon=0; statusText=0; qmw=new QMainWindow(parent); // set_platform_defaults(qmw); // does not work because it alters attributes of all widgets } GuiMainWindow::~GuiMainWindow() { delete qmw; if(statusIcon) delete statusIcon; if(statusText) delete statusText; } void GuiMainWindow::show(QWidget* central_widget, bool show_toolbutton_text) { set_status_message("Ready ...", 2000); // necessary to show status bar in the first place #ifdef QT_VERSION_POST3 if(show_toolbutton_text) qmw->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); #else qmw->setUsesTextLabel(show_toolbutton_text); #endif central_widget->setFocus(); qmw->setCentralWidget(central_widget); qmw->show(); } void GuiMainWindow::set_caption(const char* text) { STD_string captext(text); #ifdef QT_VERSION_POST3 qmw->setWindowTitle(captext.c_str()); #else qmw->setCaption(captext.c_str()); #endif } void GuiMainWindow::set_status_message(const char* text, int timeout_ms) { if(statusText) statusText->setText(text); else { #ifdef QT_VERSION_POST3 qmw->statusBar()->showMessage(text,timeout_ms); #else if(timeout_ms) qmw->statusBar()->message(text); else qmw->statusBar()->message(text,timeout_ms); #endif } } void GuiMainWindow::set_status_xpm(const char** xpm) { QPixmap qp(xpm); if(!statusIcon) { statusIcon=new QLabel(qmw->statusBar()); statusText=new QLabel(qmw->statusBar()); statusText->setMinimumWidth(qmw->width()-qp.width()); #ifdef QT_VERSION_POST3 qmw->statusBar()->addPermanentWidget(statusIcon); qmw->statusBar()->addPermanentWidget(statusText); #else qmw->statusBar()->addWidget(statusIcon,1,true); qmw->statusBar()->addWidget(statusText,1,true); #endif } statusIcon->setPixmap(qp); } QWidget* GuiMainWindow::get_widget() {return qmw;} void GuiMainWindow::insert_menu( const char* text, GuiPopupMenu* gpm) { #ifdef QT_VERSION_POST3 gpm->qm->setTitle(text); qmw->menuBar()->addMenu(gpm->qm); #else qmw->menuBar()->insertItem(text, gpm->qpm); #endif } void GuiMainWindow::insert_menu_separator() { #ifdef QT_VERSION_POST3 qmw->menuBar()->addSeparator(); #else qmw->menuBar()->insertSeparator(); #endif } void GuiMainWindow::close() { qmw->close(); } /////////////////////////////////////////////////// GuiScroll::GuiScroll(QWidget* child, QWidget* parent) { #ifdef QT_VERSION_POST3 qsa=new QScrollArea(parent); qsa->setWidget(child); qsa->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); qsa->setMinimumWidth(child->width()); #else qsv=new QScrollView(parent); qsv->addChild(child); qsv->setHScrollBarMode(QScrollView::AlwaysOff); qsv->setMinimumWidth(child->width()); #endif } QWidget* GuiScroll::get_widget() { #ifdef QT_VERSION_POST3 return qsa; #else return qsv; #endif } GuiScroll::~GuiScroll() { #ifdef QT_VERSION_POST3 delete qsa; #else delete qsv; #endif } /////////////////////////////////////////////////// class QDialogDerived : public QDialog { public: QDialogDerived(GuiDialog* user, QWidget *parent, const char* caption, bool modal) : #ifdef QT_VERSION_POST3 QDialog(parent) { QDialog::setModal(modal); QDialog::setWindowTitle(caption); #else QDialog(parent,"",modal) { QDialog::setCaption(caption); #endif user_cache=user; } void call_done(int r) { QDialog::done(r); } protected: void paintEvent(QPaintEvent* event) { // overloaded from QWidget QDialog::paintEvent(event); user_cache->repaint(); } void closeEvent(QCloseEvent* event) { // overloaded from QWidget QDialog::closeEvent(event); user_cache->close(); } private: GuiDialog* user_cache; }; GuiDialog::GuiDialog(QWidget *parent, const char* caption, bool modal) { qd=new QDialogDerived(this, parent, caption, modal); } void GuiDialog::show() { qd->show(); } void GuiDialog::cancel() { qd->call_done(0); } void GuiDialog::done() { qd->call_done(1); // GuiDialog::hide(); // deleting causes segfault. why? I dunno ... } void GuiDialog::hide() {qd->hide();} int GuiDialog::exec() {return qd->exec();} QWidget* GuiDialog::get_widget() {return qd;} GuiDialog::~GuiDialog() { delete qd; } ///////////////////////////////////////////////// GuiProgressDialog::GuiProgressDialog(QWidget *parent, bool modal, int total_steps) { #ifdef QT_VERSION_POST3 qpd=new QProgressDialog("", "Cancel", 0, total_steps, parent); qpd->setModal(modal); #else qpd=new QProgressDialog("", "Cancel", total_steps, parent, "progress", modal); #endif if(total_steps) qpd->setMinimumDuration(1000); else qpd->setMinimumDuration(100); // zero value produces event-timing problems in Qt set_progress(0); } void GuiProgressDialog::set_progress(int progr) { #ifdef QT_VERSION_POST3 qpd->setValue(progr); #else qpd->setProgress(progr); #endif } int GuiProgressDialog::get_progress() const { #ifdef QT_VERSION_POST3 return qpd->value(); #else return qpd->progress(); #endif } void GuiProgressDialog::set_total_steps(int steps) { #ifdef QT_VERSION_POST3 qpd->setMaximum(steps); #else qpd->setTotalSteps(steps); #endif } bool GuiProgressDialog::was_cancelled() const { #ifdef QT_VERSION_POST3 return qpd->wasCanceled(); #else return qpd->wasCancelled(); #endif } void GuiProgressDialog::reset() { qpd->reset(); set_progress(0); } void GuiProgressDialog::set_text(const char* txt) { qpd->setLabelText(txt); } void GuiProgressDialog::show() { qpd->show(); } void GuiProgressDialog::hide() { qpd->hide(); } GuiProgressDialog::~GuiProgressDialog() { delete qpd; } ///////////////////////////////////////////////// GuiImage::GuiImage(unsigned char* data, int width, int height, bool colormap) { Log odinlog("GuiImage","GuiImage"); ODINLOG(odinlog,normalDebug) << "width/height/colormap=" << width << "/" << height << "/" << colormap << STD_endl; #ifdef QT_VERSION_POST3 qi=new QImage( data, width, height, QImage::Format_Indexed8); qi->setColorCount (256); #else qi=new QImage( data, width, height, 8, 0, 256, QImage::IgnoreEndian); #endif QColor qc; for(int i=0; i<256; i++) { if(colormap) { int hue=int(240.0*(1.0-float(i)/255.0)); qc.setHsv(hue,255,255); qi->setColor(i, qc.rgb() ); if(i==0) qi->setColor(0, qRgb(0,0,0) ); // lowest value black } else qi->setColor(i, qRgb(i,i,i) ); // simple gray scale } } QPixmap* GuiImage::create_pixmap() const { #ifdef QT_VERSION_POST3 return new QPixmap(QPixmap::fromImage(*qi)); #else QPixmap* qpm=new QPixmap(); qpm->convertFromImage(*qi); return qpm; #endif } GuiImage::~GuiImage() { delete qi; } ///////////////////////////////////////////////// GuiListView::GuiListView(QWidget *parent, const svector& column_labels, int first_column_width, int min_height, GuiListViewCallback* callback, bool tree) { #ifdef QT_VERSION_POST3 QStringList qsl; for(unsigned int i=0; i1) width_factor=2; if(tree) { qtrw=new QTreeWidget(parent); qtrw->setColumnCount(column_labels.size()); qtrw->setHeaderLabels(qsl); qtrw->setSortingEnabled(false); if(min_height>0) qtrw->setMinimumHeight(min_height); if(first_column_width>0) qtrw->setMinimumWidth(width_factor*first_column_width); qtrw->header()->resizeSection(0, first_column_width); } else { qtw=new QTableWidget(parent); qtw->setColumnCount(column_labels.size()); qtw->setHorizontalHeaderLabels(qsl); if(min_height>0) qtw->setMinimumHeight(min_height); if(first_column_width>0) { qtw->setMinimumWidth(width_factor*first_column_width); qtw->horizontalHeader()->resizeSection(0, first_column_width); } } #else qlv=new QListView(parent); for(unsigned int i=0; iaddColumn (column_labels[i].c_str()); } if(first_column_width>0) { qlv->setColumnWidthMode(0,QListView::Manual); qlv->setColumnWidth(0,first_column_width); } if(min_height>0) { qlv->setMinimumHeight(min_height); } qlv->setSorting(-1); #endif sd=0; if(callback) sd=new SlotDispatcher(this, callback); } QWidget* GuiListView::get_widget() { #ifdef QT_VERSION_POST3 if(qtrw) return qtrw; if(qtw) return qtw; return 0; #else return qlv; #endif } GuiListView::~GuiListView() { delete sd; #ifdef QT_VERSION_POST3 if(qtrw) delete qtrw; if(qtw) delete qtw; #else delete qlv; #endif } ///////////////////////////////////////////////// #ifndef QT_VERSION_POST3 void create_qstring_list(STD_vector& label, const svector& column_entries) { int ncols=column_entries.size(); if(ncols>8) ncols=8; label.resize(8); for(int i=0; i odinlog("GuiListItem","GuiListItem"); common_init(); #ifdef QT_VERSION_POST3 int ncols=column_entries.size(); if(!ncols) return; if(parent->qtrw) { // tree view qtrwi=new QTreeWidgetItem(parent->qtrw); for(int icol=0; icolsetText(icol, column_entries[icol].c_str()); } parent_qtrw=parent->qtrw; parent->qtrw->expandItem(qtrwi); //#warning GuiListItem: Implement me: setOpen(true), setSelected(false) } else { qtwi=new QTableWidgetItem[ncols]; int row=parent->qtw->rowCount(); parent->qtw->setRowCount(row+1); for(int icol=0; icolqtw->setItem(row, icol, &(qtwi[icol])); } if(checkable) { qtwi[0].setFlags(qtwi[0].flags() | Qt::ItemIsUserCheckable); Qt::CheckState state=Qt::Unchecked; if(initstate) state=Qt::Checked; qtwi[0].setCheckState(state); } (*tablemap)[&(qtwi[0])]=this; } #else QListViewItem* last=parent->qlv->lastItem(); if(checkable) { qcli=new QCheckListItem (parent->qlv, column_entries[0].c_str(), QCheckListItem::CheckBox); qcli->setOn(initstate); } else { STD_vector label; create_qstring_list(label,column_entries); ODINLOG(odinlog,normalDebug) << "parent->qlv=" << parent->qlv << STD_endl; qlvi=new QListViewItem(parent->qlv, label[0], label[1], label[2], label[3], label[4], label[5], label[6], label[7]); ODINLOG(odinlog,normalDebug) << "qlvi=" << qlvi << STD_endl; if(last) qlvi->moveItem(last); // append at end qlvi->setSelected(false); qlvi->setOpen(true); (*listmap)[qlvi]=this; } #endif } GuiListItem::GuiListItem(GuiListItem* parent, GuiListItem* after, const svector& column_entries) { Log odinlog("GuiListItem","GuiListItem"); common_init(); #ifdef QT_VERSION_POST3 QTreeWidgetItem* parent_qtrwi=0; if(parent) parent_qtrwi=parent->qtrwi; QTreeWidgetItem* after_qtrwi=0; if(after) after_qtrwi=after->qtrwi; qtrwi=new QTreeWidgetItem(parent_qtrwi, after_qtrwi); for(int icol=0; icolsetText(icol, column_entries[icol].c_str()); } parent_qtrw=parent->parent_qtrw; if(parent_qtrw) parent_qtrw->expandItem(qtrwi); //#warning GuiListItem: Implement me: setOpen(true) #else STD_vector label; create_qstring_list(label,column_entries); QListViewItem* parent_qlvi=0; if(parent) parent_qlvi=parent->qlvi; ODINLOG(odinlog,normalDebug) << "parent/parent_qlvi=" << parent << "/" << parent_qlvi << STD_endl; if(after && after->qlvi) { ODINLOG(odinlog,normalDebug) << "after->qlvi=" << after->qlvi << STD_endl; qlvi=new QListViewItem(parent_qlvi, after->qlvi, label[0], label[1], label[2], label[3], label[4], label[5], label[6], label[7]); } else { ODINLOG(odinlog,normalDebug) << "after=0" << STD_endl; qlvi=new QListViewItem(parent_qlvi, label[0], label[1], label[2], label[3], label[4], label[5], label[6], label[7]); } qlvi->setOpen(true); #endif } bool GuiListItem::is_checked() const { #ifdef QT_VERSION_POST3 if(qtwi) return ((qtwi[0].checkState())==Qt::Checked); #else if(qcli) return qcli->isOn(); #endif return false; } const char* GuiListItem::get_text() const { #ifdef QT_VERSION_POST3 if(qtwi) return c_str(qtwi[0].text()); #else if(qcli) return c_str(qcli->text()); #endif return ""; } GuiListItem::~GuiListItem() { #ifdef QT_VERSION_POST3 if(qtwi) delete[] qtwi; if(qtrwi) delete qtrwi; #else if(qlvi) delete qlvi; if(qcli) delete qcli; #endif } void GuiListItem::init_static() { #ifdef QT_VERSION_POST3 tablemap=new STD_map; #else listmap=new STD_map; #endif } void GuiListItem::destroy_static() { #ifdef QT_VERSION_POST3 delete tablemap; #else delete listmap; #endif } STD_map* GuiListItem::listmap; STD_map* GuiListItem::tablemap; EMPTY_TEMPL_LIST bool StaticHandler::staticdone=false; /////////////////////////////////////////////////////////// GuiProgressBar::GuiProgressBar(QWidget *parent, int total_steps) { #ifdef QT_VERSION_POST3 qpb=new QProgressBar(parent); qpb->setMinimum(0); qpb->setMaximum(total_steps); #else qpb=new QProgressBar (total_steps, parent); #endif } GuiProgressBar::~GuiProgressBar() { delete qpb; } void GuiProgressBar::set_progress(int progr) { #ifdef QT_VERSION_POST3 qpb->setValue(progr); #else qpb->setProgress(progr); #endif } void GuiProgressBar::set_min_width(int w) { qpb->setMinimumWidth(w); } QWidget* GuiProgressBar::get_widget() { return qpb; } ////////////////////////////////////////////////////////////////////// GuiScrollBar::GuiScrollBar(QWidget* parent) { qsb=new QScrollBar(Qt::Horizontal, parent); } GuiScrollBar::~GuiScrollBar() { delete qsb; } void GuiScrollBar::set_values(int min, int max, int linestep, int pagestep, int value) { #ifdef QT_VERSION_POST3 qsb->setMinimum(min); qsb->setMaximum(max); qsb->setSingleStep(linestep); #else qsb->setMinValue(min); qsb->setMaxValue(max); qsb->setLineStep(linestep); #endif qsb->setPageStep(pagestep); qsb->setValue(value); } QScrollBar* GuiScrollBar::get_widget() { return qsb; } ///////////////////////////////////////////////// GuiToolBar::GuiToolBar(GuiMainWindow* parent, const char* label) { qtb=new QToolBar(label, parent->qmw); #ifdef QT_VERSION_POST3 parent->qmw->addToolBar(qtb); #endif } GuiToolBar::~GuiToolBar() { delete qtb; } QWidget* GuiToolBar::get_widget() { return qtb; } void GuiToolBar::add_separator() { qtb->addSeparator(); } ///////////////////////////////////////////////// GuiToolButton::GuiToolButton(GuiToolBar* parent, const char** xpm, const char* label, QObject* receiver, const char* member, bool checkable, bool initstate ) { #ifdef QT_VERSION_POST3 qtb=new QToolButton(parent->qtb); if(xpm) qtb->setIcon(QPixmap(xpm)); qtb->setCheckable(checkable); parent->qtb->addWidget(qtb); #else qtb=new QToolButton(parent->qtb); if(xpm) qtb->setIconSet(QPixmap(xpm)); qtb->setToggleButton(checkable); #endif set_on(initstate); if(xpm) set_tooltip(label); else set_label(label); sd=new SlotDispatcher(this,receiver,member); } GuiToolButton::~GuiToolButton() { Log odinlog("GuiToolButton","~GuiToolButton"); ODINLOG(odinlog,normalDebug) << "Deleting sd" << STD_endl; delete sd; #ifndef QT_VERSION_POST3 ODINLOG(odinlog,normalDebug) << "Deleting qtb" << STD_endl; delete qtb; // will be done by the parent toolbar on Qt4 #endif } bool GuiToolButton::is_on() const { #ifdef QT_VERSION_POST3 return qtb->isChecked(); #else return qtb->isOn(); #endif } void GuiToolButton::set_on(bool flag) { #ifdef QT_VERSION_POST3 qtb->setChecked(flag); #else qtb->setOn(flag); #endif } void GuiToolButton::set_enabled(bool flag) { qtb->setEnabled(flag); } void GuiToolButton::set_label(const char* text) { #ifdef QT_VERSION_POST3 qtb->setText(text); #else qtb->setTextLabel(text); #endif } void GuiToolButton::set_tooltip(const char* text) { add_tooltip(qtb,text); } ///////////////////////////////////////////////// GuiPrinter::GuiPrinter() { qp=new QPrinter(QPrinter::HighResolution); qp->setOrientation(QPrinter::Landscape); } bool GuiPrinter::setup(QWidget* parent) { #ifdef QT_VERSION_POST3 QPrintDialog* qpd=new QPrintDialog(qp,parent); return bool(qpd->exec()); #else return qp->setup(parent); #endif } QPaintDevice* GuiPrinter::get_device() { return qp; } GuiPrinter::~GuiPrinter() { delete qp; } ///////////////////////////////////////////////// #define TEXTVIEW_MAXLINES 1000 GuiTextView::GuiTextView(QWidget* parent, int minwidth, int minheight) { qte=new QTextEdit(parent); qte->setReadOnly(true); qte->setMinimumSize(minwidth, minheight); #ifdef QT_VERSION_POST3 qte->document()->setMaximumBlockCount(TEXTVIEW_MAXLINES); // only available for Qt 4.2 or later versions qte->setLineWrapMode(QTextEdit::NoWrap); #else qte->setTextFormat(Qt::LogText); #if QT_VERSION > 0x0301FF qte->setMaxLogLines(TEXTVIEW_MAXLINES); #endif #endif } GuiTextView::~GuiTextView() { delete qte; } void GuiTextView::set_text(const char* txt) { #ifdef QT_VERSION_POST3 qte->setPlainText(txt); #else qte->setText(txt); #endif scroll_end(); } void GuiTextView::append_text(const char* txt) { qte->append(txt); scroll_end(); } void GuiTextView::scroll_end() { #ifdef QT_VERSION_POST3 QTextCursor qtc(qte->textCursor()); qtc.movePosition(QTextCursor::End); qtc.movePosition(QTextCursor::StartOfLine); qte->setTextCursor(qtc); qte->ensureCursorVisible(); #else qte->setContentsPos(0,qte->contentsHeight()+TEXTVIEW_MAXLINES); #endif } QWidget* GuiTextView::get_widget() { return qte; } odin-2.0.5/odinqt/floatedit.h0000644000175000017500000001121214075732704013020 00000000000000/*************************************************************************** floatedit.h - description ------------------- begin : Sun Aug 27 2000 copyright : (C) 2000-2021 by Thies Jochimsen email : thies@jochimsen.de ***************************************************************************/ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef FLOATEDIT_H #define FLOATEDIT_H #include #include "odinqt.h" /** * This class implements a line edit with float values only; A number * of digits to display must be specified. */ class floatLineEdit : public QObject { Q_OBJECT public: floatLineEdit(float minValue, float maxValue, float value, int digits, QWidget *parent, const char *name, int width, int height ); ~floatLineEdit(); QWidget* get_widget() {return gle->get_widget();} // required public for range slider void set_value(float value); float get_value() const {return value_cache;} public slots: void setfloatLineEditValue( float value); private slots: void emitSignal(); signals: void floatLineEditValueChanged(float value); private: int digits_cache; float value_cache; GuiLineEdit* gle; }; //////////////////////////////////////////////////////////////// /** * This class implements a slider with float values (of course it's still * discrete !), so you can use rational numbers as its values */ class floatSlider : public QObject { Q_OBJECT public: floatSlider(float minValue, float maxValue, float step, float value, QWidget *parent, const char *name ); ~floatSlider(); QWidget* get_widget(); public slots: void setfloatSliderValue( float value); private slots: void emitSignal( int discrete_value); signals: void floatSliderValueChanged( float newvalue); private: GuiSlider* gs; float minValue_cache; float step_cache; int oldPosition; }; //////////////////////////////////////////////////////////////// /** * This class contains a floatlineedit to display a float value * in a nice box with a label. */ class floatLineBox : public QGroupBox { Q_OBJECT public: floatLineBox(float value, int digits, QWidget *parent, const char *name); ~floatLineBox(); public slots: void setfloatLineBoxValue( float value ); private slots: void emitSignal( float value ); signals: void floatLineBoxValueChanged( float value ); private: GuiGridLayout* grid; floatLineEdit *le; }; //////////////////////////////////////////////////////////////// /** * This class implements a slider useful for scientific applications * by composing a floatSlider and a floatLineEdit into one widget. */ class floatScientSlider : public QGroupBox { Q_OBJECT public: floatScientSlider(float minValue, float maxValue, float Step, float value, int digits, QWidget *parent, const char *name); ~floatScientSlider(); public slots: void setfloatScientSliderValue( float value ); private slots: void emitSignal( float value ); signals: void floatScientSliderValueChanged( float value ); private: float value; floatSlider* slider; GuiGridLayout* grid; floatLineEdit *le; }; /////////////////////////////////////////////////////////////////////// /** * This class contains 3 floatlineedit to display 3 values * in a nice box with a label. */ class floatLineBox3D : public QGroupBox { Q_OBJECT public: floatLineBox3D(float xval, float yval, float zval, int digits, QWidget *parent, const char *name); ~floatLineBox3D(); public slots: void setfloatLineBox3DValue( float xval, float yval, float zval ); private slots: void emitSignal_x( float newval ); void emitSignal_y( float newval ); void emitSignal_z( float newval ); signals: void floatLineBox3DValueChanged( float xval, float yval, float zval ); void SignalToChild_x( float ); void SignalToChild_y( float ); void SignalToChild_z( float ); private: GuiGridLayout* grid; floatLineEdit *lex; floatLineEdit *ley; floatLineEdit *lez; float xcache; float ycache; float zcache; }; #endif odin-2.0.5/odinqt/intedit.cpp0000644000175000017500000000561313576370643013055 00000000000000#include #include "intedit.h" #include // for itos #include // for strtol intLineEdit::intLineEdit(int minValue, int maxValue, int value, QWidget *parent, const char *name, int width, int height ) { gle = new GuiLineEdit(parent, this, SLOT(emitSignal()), width, height); /* minValue & maxValue unused so far: */ minValue=maxValue=0; set_value(value); } intLineEdit::~intLineEdit() { delete gle; } void intLineEdit::setintLineEditValue( int newValue ) { set_value(newValue); } void intLineEdit::emitSignal() { if(gle->is_modified()) { int value=atoi(gle->get_text()); set_value(value); emit intLineEditValueChanged(value); } } void intLineEdit::set_value(int value) { gle->set_text( itos(value).c_str() ); } ////////////////////////////////////////////////////////////// intLineBox::intLineBox(int value,QWidget *parent, const char *name ) : QGroupBox(name,parent) { grid=new GuiGridLayout( this, 1, 1); le = new intLineEdit( 0, 0, value, this, "LineEdit", TEXTEDIT_WIDTH, TEXTEDIT_HEIGHT ); grid->add_widget( le->get_widget(), 0, 0); connect(le,SIGNAL(intLineEditValueChanged( int )), this,SLOT(emitSignal( int ))); connect(this,SIGNAL(SignalToChild( int )), le, SLOT(setintLineEditValue( int))); } void intLineBox::setintLineBoxValue( int newvalue ) { emit SignalToChild( newvalue ); } void intLineBox::emitSignal( int newvalue ) { emit intLineBoxValueChanged(newvalue); } intLineBox::~intLineBox() { delete le; delete grid; } ////////////////////////////////////////////////////////////// intScientSlider::intScientSlider(int minValue, int maxValue, int Step, int value, QWidget *parent, const char *name ) : QGroupBox(name, parent ) { grid=new GuiGridLayout( this, 1, 4); slider=new GuiSlider(this, minValue, maxValue, Step, value, int(((float)maxValue-(float)minValue)/20.0)); le = new intLineEdit( minValue, maxValue, value, this, "LineEdit" , SLIDER_CELL_WIDTH, SLIDER_CELL_HEIGHT ); grid->add_widget(slider->get_widget(), 0, 0, GuiGridLayout::Default, 1, 3 ); grid->add_widget(le->get_widget(), 0, 3); // cross-wise connection of slider and line edit connect(slider->get_widget(), SIGNAL(valueChanged(int)), le, SLOT(setintLineEditValue(int))); connect(le, SIGNAL(intLineEditValueChanged(int)), slider->get_widget(), SLOT(setValue(int))); // emit signal whenever of one of both has been changed connect(slider->get_widget(),SIGNAL(valueChanged(int)), this,SLOT(emitSignal( int ))); connect(le,SIGNAL(intLineEditValueChanged( int )), this,SLOT(emitSignal( int ))); } void intScientSlider::setintScientSliderValue( int newvalue ) { slider->set_value(newvalue); le->setintLineEditValue(newvalue); } void intScientSlider::emitSignal( int newvalue ) { emit intScientSliderValueChanged(newvalue); } intScientSlider::~intScientSlider(){ delete le; delete slider; delete grid; } odin-2.0.5/odinqt/float3d.h0000644000175000017500000000675214075732704012416 00000000000000/*************************************************************************** float3d.h - description ------------------- begin : Thu Nov 10 2005 copyright : (C) 2000-2021 by Thies Jochimsen email : thies@jochimsen.de ***************************************************************************/ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef FLOAT3D_H #define FLOAT3D_H #include #include "float2d.h" /** * QGroupBox that contains a floatLabel2D and a slider to display 3D float arrays */ class floatBox3D : public QGroupBox { Q_OBJECT public: floatBox3D(const float *data, float lowbound, float uppbound, long int nx, long int ny, long int nz, bool disable_scale, int coarseFactor, QWidget *parent, const char *name, const float *overlay_map=0, float lowbound_map=0.0, float uppbound_map=0.0, unsigned int nx_map=0, unsigned int ny_map=0, unsigned int nz_map=0, bool map_firescale=false, float map_rectsize=0.8, bool colormap=false); ~floatBox3D(); void write_pixmap(const char* fname, const char* format, bool dump_all=false) const; QLabel* get_map_legend(QWidget* parent) const {return label->get_map_legend(parent);} void write_legend(const char* fname, const char* format) const {label->write_legend(fname, format);} void write_map_legend(const char* fname, const char* format) const {label->write_map_legend(fname, format);} int get_current_z() const; public slots: void refresh(const float* data, float lowbound, float uppbound); void refreshMap(const float* map, float lowbound_map, float uppbound_map, float rectsize) {map_cache=map; label->refreshMap(map_cache+onemapsize*get_current_z(),lowbound_map,uppbound_map,rectsize);} private slots: void emitClicked(int xposition, int yposition) {emit clicked(xposition,yposition,get_current_z());} void emitNewProfile(const float *data, int npts, bool horizontal, int position) {emit newProfile(data, npts, horizontal, position);} void emitNewMask(const float *data) {emit newMask(data,get_current_z());} protected slots: void changez(int iz); signals: void clicked(int x, int y, int z); void newProfile(const float *data, int npts, bool horizontal, int position); void newMask(const float* data, int slice); protected: floatLabel2D* label; // GeoEditLabel needs access to it private: virtual void repaint() {} // overload this function to draw additional stuff after changez void repaint_slice(int iz) const; GuiSlider* zslider; QLabel* zval; GuiGridLayout *grid; QLabel* maplegend; const float* data_cache; unsigned int oneimagesize; unsigned int nz_cache; float lowbound_cache; float uppbound_cache; const float* map_cache; float lowbound_map_cache; float uppbound_map_cache; float rectsize_map_cache; unsigned int onemapsize; float* mask3d; }; #endif odin-2.0.5/odinqt/floatedit.cpp0000644000175000017500000001424613576370643013372 00000000000000#include #include "floatedit.h" #include // for ftos #include floatLineEdit::floatLineEdit(float minValue, float maxValue, float value,int digits, QWidget *parent, const char *name, int width, int height ) { gle = new GuiLineEdit(parent, this, SLOT(emitSignal()), width, height); // minValue & maxValue unused so far: minValue=maxValue=0.0; digits_cache=digits; set_value(value); } floatLineEdit::~floatLineEdit() { delete gle; } void floatLineEdit::setfloatLineEditValue( float newValue ) { set_value(newValue); } void floatLineEdit::emitSignal() { if(gle->is_modified()) { value_cache=atof(gle->get_text()); set_value(value_cache); emit floatLineEditValueChanged(value_cache); } } void floatLineEdit::set_value(float value) { value_cache=value; gle->set_text( ftos(value_cache,digits_cache).c_str() ); } ////////////////////////////////////////////////////////////////////////// floatSlider::floatSlider(float minValue, float maxValue, float step, float value, QWidget *parent, const char *name ) { int nsteps=int((maxValue-minValue)/step+0.5); int ival=int((value-minValue)/step+0.5); gs=new GuiSlider( parent, 0, nsteps , 1, ival, nsteps/20); minValue_cache=minValue; step_cache=step; connect(gs->get_widget(),SIGNAL(valueChanged( int )),this,SLOT(emitSignal( int ))); } void floatSlider::setfloatSliderValue( float newValue ) { oldPosition=int((newValue-minValue_cache)/step_cache+0.5); gs->set_value(oldPosition); } void floatSlider::emitSignal( int newintvalue ) { Log odinlog("floatSlider","emitSignal"); ODINLOG(odinlog,normalDebug) << "newintvalue/oldPosition=" << newintvalue << "/" << oldPosition << STD_endl; if (!(newintvalue==oldPosition)) { float newfloatval=minValue_cache+newintvalue*step_cache; emit floatSliderValueChanged(newfloatval); } } QWidget* floatSlider::get_widget() {return gs->get_widget();} floatSlider::~floatSlider() { delete gs; } ////////////////////////////////////////////////////////////////////////// floatLineBox::floatLineBox(float value, int digits,QWidget *parent, const char *name ) : QGroupBox(name,parent) { grid=new GuiGridLayout( this, 1, 1); // Create connected floatSlider and floatLineEdit le = new floatLineEdit( 0.0, 0.0, value,digits, this, "LineEdit", TEXTEDIT_WIDTH, TEXTEDIT_HEIGHT); grid->add_widget(le->get_widget(), 0, 0); connect(le,SIGNAL(floatLineEditValueChanged( float )), this,SLOT(emitSignal( float ))); } void floatLineBox::setfloatLineBoxValue( float newvalue ) { le->setfloatLineEditValue(newvalue); } void floatLineBox::emitSignal( float newvalue ) { emit floatLineBoxValueChanged(newvalue); } floatLineBox::~floatLineBox(){ delete le; delete grid; } ////////////////////////////////////////////////////////////////////////// floatScientSlider::floatScientSlider(float minValue, float maxValue, float Step, float value, int digits, QWidget *parent, const char *name ) : QGroupBox(name, parent ) { grid=new GuiGridLayout(this, 1, 4); slider = new floatSlider( minValue, maxValue, Step, value, this, "Slider" ); le = new floatLineEdit( minValue, maxValue, value,digits, this, "LineEdit", SLIDER_CELL_WIDTH, SLIDER_CELL_HEIGHT ); grid->add_widget(slider->get_widget(), 0, 0, GuiGridLayout::Default, 1, 3 ); grid->add_widget(le->get_widget(), 0, 3); // connect slider and lineedit connect(slider, SIGNAL(floatSliderValueChanged( float )),le, SLOT(setfloatLineEditValue( float))); connect(le, SIGNAL(floatLineEditValueChanged( float )),slider, SLOT(setfloatSliderValue( float))); // Emit signal 'floatScientSliderValueChanged' to outer world connect(slider,SIGNAL(floatSliderValueChanged( float )),this,SLOT(emitSignal( float ))); connect(le,SIGNAL(floatLineEditValueChanged( float )),this,SLOT(emitSignal( float ))); } void floatScientSlider::setfloatScientSliderValue( float newvalue ) { slider->setfloatSliderValue(newvalue); le->setfloatLineEditValue(newvalue); } void floatScientSlider::emitSignal( float newvalue ) { emit floatScientSliderValueChanged(newvalue); } floatScientSlider::~floatScientSlider(){ delete le; delete slider; delete grid; } //////////////////////////////////////////////////////////////////// floatLineBox3D::floatLineBox3D(float xval, float yval, float zval, int digits,QWidget *parent, const char *name ) : QGroupBox(name,parent) { grid=new GuiGridLayout(this, 1, 3); xcache=xval; ycache=yval; zcache=zval; lex = new floatLineEdit( 0.0, 0.0, xval,digits,this, "lex", TEXTEDIT_WIDTH, TEXTEDIT_HEIGHT ); ley = new floatLineEdit( 0.0, 0.0, yval,digits,this, "ley", TEXTEDIT_WIDTH, TEXTEDIT_HEIGHT ); lez = new floatLineEdit( 0.0, 0.0, zval,digits,this, "lez", TEXTEDIT_WIDTH, TEXTEDIT_HEIGHT ); grid->add_widget( lex->get_widget(), 0, 0 ); grid->add_widget( ley->get_widget(), 0, 1 ); grid->add_widget( lez->get_widget(), 0, 2 ); connect(lex,SIGNAL(floatLineEditValueChanged( float )),this,SLOT(emitSignal_x( float ))); connect(ley,SIGNAL(floatLineEditValueChanged( float )),this,SLOT(emitSignal_y( float ))); connect(lez,SIGNAL(floatLineEditValueChanged( float )),this,SLOT(emitSignal_z( float ))); connect(this,SIGNAL(SignalToChild_x( float )),lex, SLOT(setfloatLineEditValue( float))); connect(this,SIGNAL(SignalToChild_y( float )),ley, SLOT(setfloatLineEditValue( float))); connect(this,SIGNAL(SignalToChild_z( float )),lez, SLOT(setfloatLineEditValue( float))); } void floatLineBox3D::setfloatLineBox3DValue( float xval, float yval, float zval ) { xcache=xval; ycache=yval; zcache=zval; emit SignalToChild_x( xval ); emit SignalToChild_y( yval ); emit SignalToChild_z( zval ); } void floatLineBox3D::emitSignal_x( float newvalue ) {xcache=newvalue; emit floatLineBox3DValueChanged(newvalue,ycache,zcache);} void floatLineBox3D::emitSignal_y( float newvalue ) {ycache=newvalue; emit floatLineBox3DValueChanged(xcache,newvalue,zcache);} void floatLineBox3D::emitSignal_z( float newvalue ) {zcache=newvalue; emit floatLineBox3DValueChanged(xcache,ycache,newvalue);} floatLineBox3D::~floatLineBox3D(){ delete lex; delete ley; delete lez; delete grid; } odin-2.0.5/odinqt/ldrblockwidget.h0000644000175000017500000001024214075732704014047 00000000000000/*************************************************************************** ldrblockwidget.h - description ------------------- begin : Mon Aug 5 2005 copyright : (C) 2000-2021 by Thies H. Jochimsen email : thies@jochimsen.de ***************************************************************************/ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef LDRBLOCKWIDGET_H #define LDRBLOCKWIDGET_H #include #include "odinqt.h" #include class LDRwidgetDialog; // forward declaration //////////////////////////////////////////////////////////// class LDRblockGrid : public QWidget { Q_OBJECT public: LDRblockGrid(LDRblock& block,unsigned int columns=1,QWidget *parent=0,const char* omittext=""); signals: // public: void valueChanged(); // private: void updateSubWidget(); void deleteSubDialogs(); public slots: void updateWidget(); void deleteDialogs(); void swapSliderTracking() {} void emitValueChanged() {emit valueChanged();} private: friend class LDRblockScrollView; void createDialog(); GuiGridLayout* grid; LDRblock& val; STD_list subdialogs; }; //////////////////////////////////////////////////////////// class LDRblockScrollView : public QObject { Q_OBJECT public: LDRblockScrollView(LDRblock& block, unsigned int columns=1, QWidget *parent=0, const char* omittext=""); ~LDRblockScrollView(); // QSize gridsize() const {return ldrgrid->frameSize();} QWidget* get_widget() {return scroll->get_widget();} signals: void valueChanged(); public slots: void updateWidget() {ldrgrid->updateWidget();} void deleteDialogs() {ldrgrid->deleteDialogs();} void swapSliderTracking() {ldrgrid->swapSliderTracking();} void emitValueChanged() {emit valueChanged();} private: friend class LDRblockWidget; void createDialog() {ldrgrid->createDialog();} GuiScroll* scroll; LDRblockGrid* ldrgrid; }; //////////////////////////////////////////////////////////// class LDRblockWidget : public QGroupBox { Q_OBJECT public: LDRblockWidget(LDRblock& ldrblock,unsigned int columns=1,QWidget *parent=0,bool doneButton=false,bool is_dialog=false,const char* omittext="", bool storeLoadButtons=false, bool readonly=false); ~LDRblockWidget(); // QSize gridsize() const {if(ldrscroll) return ldrscroll->gridsize(); else return QSize();} signals: void valueChanged(); void doneButtonPressed(); public slots: void updateWidget() {if(ldrscroll) ldrscroll->updateWidget();} void deleteDialogs() {if(ldrscroll) ldrscroll->deleteDialogs();} void swapSliderTracking() {if(ldrscroll) ldrscroll->swapSliderTracking();} void createDialog(); void emitValueChanged() {emit valueChanged();} private slots: void emitDone(); void storeBlock(); void loadBlock(); private: GuiGridLayout *grid; GuiButton *pb_done; GuiButton *pb_edit; GuiButton *pb_store; GuiButton *pb_load; LDRblock& parblock; LDRblockScrollView* ldrscroll; GuiListView* noeditlist; STD_vector noedititems; }; //////////////////////////////////////////////////////////// class LDRwidgetDialog : public QObject, public GuiDialog { Q_OBJECT public: LDRwidgetDialog(LDRblock& ldr,unsigned int columns=1,QWidget *parent=0, bool modal=false, bool readonly=false); ~LDRwidgetDialog(); public slots: void updateWidget(); void emitChanged(); private: GuiGridLayout *grid; LDRblockWidget *ldrwidget; private slots: void callDone(); signals: void finished(); void valueChanged(); }; #endif odin-2.0.5/odinqt/float3d.cpp0000644000175000017500000000774513576370643012761 00000000000000#include #include // for LDRfileName #include "float3d.h" floatBox3D::floatBox3D(const float *data, float lowbound, float uppbound, long int nx, long int ny, long int nz, bool disable_scale, int coarseFactor, QWidget *parent, const char *name, const float *overlay_map, float lowbound_map, float uppbound_map, unsigned int nx_map, unsigned int ny_map, unsigned int nz_map, bool map_firescale, float map_rectsize, bool colormap) : QGroupBox(name,parent) { Log odinlog("floatBox3D","floatBox3D"); data_cache=data; oneimagesize=nx*ny; nz_cache=nz; lowbound_cache=lowbound; uppbound_cache=uppbound; map_cache=0; onemapsize=0; lowbound_map_cache=lowbound_map; uppbound_map_cache=uppbound_map; rectsize_map_cache=map_rectsize; if(overlay_map) { if(nz==nz_map) { map_cache=overlay_map; onemapsize=nx_map*ny_map; ODINLOG(odinlog,normalDebug) << "map_cache/onemapsize/nz_map=" << map_cache << "/" << onemapsize << "/" << nz_map << STD_endl; } else { ODINLOG(odinlog,errorLog) << "Cannot handle overlay_map with nz(" << nz_map << ") differing from data's nz(" << nz << ")" << STD_endl; } } int nrow=1; if(nz>1) nrow++; int ncol=2; if(overlay_map) ncol++; grid=new GuiGridLayout( this, nrow, ncol); label = new floatLabel2D(data,lowbound,uppbound,nx,ny,disable_scale,coarseFactor,this,name,overlay_map,lowbound_map,uppbound_map,nx_map,ny_map,map_firescale,map_rectsize,colormap); grid->add_widget( label, 0, 0, GuiGridLayout::Default, 1, 2 ); connect(label,SIGNAL(clicked(int,int)),this,SLOT(emitClicked(int,int))); connect(label,SIGNAL(newProfile(const float *, int, bool, int)),this,SLOT(emitNewProfile(const float *, int, bool, int))); connect(label,SIGNAL(newMask(const float *)),this,SLOT(emitNewMask(const float *))); maplegend=0; if(overlay_map) { maplegend = label->get_map_legend(this); if(maplegend) grid->add_widget( maplegend, 0, 2 ); } zslider=0; zval=0; if(nz>1) { zslider=new GuiSlider(this, 0, nz-1, 1, 0, 1); connect(zslider->get_widget(), SIGNAL(valueChanged(int)), this, SLOT(changez(int))); grid->add_widget( zslider->get_widget(), 1, 0 ); zval=new QLabel(this); grid->add_widget( zval, 1, 1 ); // set size according to max num of digits zval->setMinimumWidth(_FONT_SIZE_*int(log10(nz-1)+1)); zval->setNum(0); } mask3d=new float[nx*ny*nz]; for(int i=0; irefresh(data_cache+iz*oneimagesize,lowbound_cache,uppbound_cache); if(map_cache) label->refreshMap(map_cache+iz*onemapsize,lowbound_map_cache,uppbound_map_cache,rectsize_map_cache); } void floatBox3D::write_pixmap(const char* fname, const char* format, bool dump_all) const { if(dump_all) { LDRfileName dumpfname(fname); STD_string dumpprefix=dumpfname.get_dirname()+SEPARATOR_STR+dumpfname.get_basename_nosuffix(); for(unsigned int iz=0; iz1) onefname+=itos(iz,nz_cache-1); onefname+="."+::tolowerstr(format); label->write_pixmap( onefname.c_str(), format); } repaint_slice(get_current_z()); } else { label->write_pixmap(fname,format); } } void floatBox3D::refresh(const float* data, float lowbound, float uppbound) { data_cache=data; label->refresh(data_cache+oneimagesize*get_current_z(),lowbound,uppbound); lowbound_cache=lowbound; uppbound_cache=uppbound; } void floatBox3D::changez(int iz) { Log odinlog("floatBox3D","changez"); repaint_slice(iz); repaint(); if(zval) zval->setNum(iz); } int floatBox3D::get_current_z() const { if(zslider) return zslider->get_value(); return 0; } floatBox3D::~floatBox3D() { if(zslider) delete zslider; if(zval) delete zval; if(maplegend) delete maplegend; delete label; delete grid; delete[] mask3d; } odin-2.0.5/odinqt/Makefile.am0000644000175000017500000000231313576370643012737 00000000000000 libodinqt_la_LDFLAGS = -no-undefined -release $(VERSION) $(GUILIBS) libodinqt_la_LIBADD = ../odinpara/libodinpara.la if GUI_ENABLED AM_CPPFLAGS = $(all_includes) # Auto-generate any needed moc files %_moc.cpp: %.h $(MOC) -o $@ $< lib_LTLIBRARIES = libodinqt.la library_includedir=$(includedir)/odinqt library_include_HEADERS = \ odinqt.h odinqt_callback.h \ boolbutton.h \ complex1d.h \ enumbox.h \ float1d.h \ float2d.h \ float3d.h \ floatedit.h \ intedit.h \ plot.h \ stringbox.h \ ldrwidget.h \ ldrblockwidget.h libodinqt_la_SOURCES = \ odinqt.h odinqt.cpp odinqt_callback.h odinqt_callback_moc.cpp \ boolbutton.h boolbutton.cpp boolbutton_moc.cpp \ complex1d.h complex1d.cpp complex1d_moc.cpp \ enumbox.h enumbox.cpp enumbox_moc.cpp \ float1d.h float1d.cpp float1d_moc.cpp \ float2d.h float2d.cpp float2d_moc.cpp \ float3d.h float3d.cpp float3d_moc.cpp \ floatedit.h floatedit.cpp floatedit_moc.cpp \ intedit.h intedit.cpp intedit_moc.cpp \ plot.h plot.cpp plot_moc.cpp \ stringbox.h stringbox.cpp stringbox_moc.cpp \ ldrwidget.h ldrwidget.cpp ldrwidget_moc.cpp \ ldrblockwidget.h ldrblockwidget.cpp ldrblockwidget_moc.cpp dist-hook: -rm -rf $(distdir)/*_moc.cpp endif clean-local: -rm -f *_moc.cpp odin-2.0.5/odinqt/boolbutton.cpp0000644000175000017500000000216413576370643013602 00000000000000#include "boolbutton.h" buttonBox::buttonBox(const char *text, QWidget *parent, const char *buttonlabel) : QGroupBox(buttonlabel,parent) { grid=new GuiGridLayout( this, 1, 1); gb=new GuiButton(this, this, SLOT(reportclicked()), text); grid->add_widget( gb->get_widget(), 0, 0, GuiGridLayout::VCenter); // connect( gb->get_widget(), SIGNAL(clicked()), SLOT(reportclicked()) ); } buttonBox::buttonBox(const char *ontext,const char *offtext, bool initstate, QWidget *parent, const char *buttonlabel) : QGroupBox(buttonlabel,parent) { grid=new GuiGridLayout( this, 1, 1); gb=new GuiButton(this, this, SLOT(setButtonState()), ontext, offtext, initstate); grid->add_widget( gb->get_widget(), 0, 0, GuiGridLayout::VCenter); // connect( gb->get_widget(), SIGNAL(toggled(bool)), SLOT(setButtonState(bool)) ); } void buttonBox::reportclicked() { emit buttonClicked(); } void buttonBox::setToggleState(bool state) { gb->set_toggled(state); } void buttonBox::setButtonState() { bool state=gb->is_on(); gb->set_text(state); emit buttonToggled(state); } buttonBox::~buttonBox(){ delete gb; delete grid; } odin-2.0.5/odin.doxygen0000644000175000017500000031132013576370643011736 00000000000000# Doxyfile 1.8.8 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. # # All text after a single 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. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by # double-quotes, unless you are using Doxywizard) that should identify the # project for which the documentation is generated. This name is used in the # title of most generated pages and in a few other places. # The default value is: My Project. PROJECT_NAME = # 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 = # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify an logo or icon that is included in # the documentation. The maximum height of the logo should not exceed 55 pixels # and the maximum width should not exceed 200 pixels. Doxygen will copy the logo # to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. 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 = manual/ # 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 causes # performance problems for the file system. # The default value is: NO. CREATE_SUBDIRS = NO # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII # characters to appear in the names of generated files. If set to NO, non-ASCII # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode # U+3044. # The default value is: NO. ALLOW_UNICODE_NAMES = 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. # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, # Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES 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. # The default value is: YES. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES 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. # The default value is: YES. 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 and 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. # The default value is: NO. 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. # The default value is: NO. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES 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 # The default value is: YES. FULL_PATH_NAMES = NO # 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. # # Note that you can specify absolute paths here, but also relative paths, which # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. 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 list of 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. # The default value is: NO. 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-style will behave just like regular Qt- # style comments (thus requiring an explicit @brief command for a brief # description.) # The default value is: NO. JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus # requiring an explicit \brief command for a brief description.) # The default value is: NO. QT_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 behavior. 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 behavior instead. # # Note that setting this tag to YES also means that rational rose comments are # not recognized any more. # The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. 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. # The default value is: NO. 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. # Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that act 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 = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. TCL_SUBST = # 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. # The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored # for that language. For instance, namespaces will be presented as packages, # qualified scopes will look different, etc. # The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources. Doxygen will then generate output that is tailored for Fortran. # The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for VHDL. # The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, Javascript, # C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: # FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: # Fortran. In the later case the parser tries to guess whether the code is fixed # or free formatted code, this is the default for Fortran type files), VHDL. For # instance to make doxygen treat .inc files as Fortran files (default is PHP), # and .f files as C (default is Fortran), use: inc=Fortran f=C. # # Note For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. # The default value is: YES. MARKDOWN_SUPPORT = NO # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by by putting a % sign in front of the word # or globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES # 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); # versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. # The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. # The default value is: NO. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: # http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES will make # doxygen to replace the get and set methods by a property in the documentation. # This will only work if the methods are indeed getting or setting a simple # type. If this is not the case, or you want to show the methods anyway, you # should set this option to NO. # The default value is: YES. IDL_PROPERTY_SUPPORT = YES # 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. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES 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. # The default value is: YES. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions # are shown inside the group in which they are included (e.g. using \ingroup) # instead of on a separate page (for HTML and Man pages) or section (for LaTeX # and RTF). # # Note that this feature does not work in combination with # SEPARATE_MEMBER_PAGES. # The default value is: NO. INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in # the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set # to NO, structs, classes, and unions are shown on a separate page (for HTML and # Man pages) or section (for LaTeX and RTF). # The default value is: NO. INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or # enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically be # useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. # The default value is: NO. TYPEDEF_HIDES_STRUCT = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can be # an expensive process and often the same symbol appears multiple times in the # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small # doxygen will become slower. If the cache is too large, memory is wasted. The # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 # symbols. At the end of a run doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # 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 respectively EXTRACT_STATIC tags are set to YES. # Note: This will also disable the warnings about undocumented members that are # normally produced when WARNINGS is set to YES. # The default value is: NO. EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = NO # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file will be # included in the documentation. # The default value is: NO. 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. Does not have any effect # for Java sources. # The default value is: YES. 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 only methods in the interface are # included. # The default value is: NO. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base name of # the file that contains the anonymous namespace. By default anonymous namespace # are hidden. # The default value is: NO. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO 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. # The default value is: NO. HIDE_UNDOC_MEMBERS = YES # 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 these classes will be included in the various overviews. This option has # no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = YES # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend # (class|struct|union) declarations. If set to NO these declarations will be # included in the documentation. # The default value is: NO. 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 these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. 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 then the documentation # will be excluded. Set it to YES to include the internal documentation. # The default value is: NO. 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. # The default value is: system dependent. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. SHOW_INCLUDE_FILES = YES # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each # grouped member an include statement to the documentation, telling the reader # which file to include in order to use the member. # The default value is: NO. SHOW_GROUPED_MEMB_INC = NO # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the # documentation for inline members. # The default value is: YES. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES 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. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member # name. If set to NO the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and # destructors are listed first. If set to NO the constructors will appear in the # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief # member documentation. # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting # detailed member documentation. # The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. SORT_GROUP_NAMES = 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 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. # The default value is: NO. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper # type resolution of all parameters of a function it will reject a match between # the prototype and the implementation of a member function even if there is # only one candidate or it is obvious which candidate to choose by doing a # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still # accept a match between prototype and implementation in such cases. # The default value is: NO. STRICT_PROTO_MATCHING = 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. # The default value is: YES. 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. # The default value is: YES. 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. # The default value is: YES. 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. # The default value is: YES. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if ... \endif and \cond # ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have 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 value of individual variables and macros / defines can be # controlled using \showinitializer or \hideinitializer command in the # documentation regardless of this setting. # Minimum value: 0, maximum value: 10000, default value: 30. 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. # The default value is: YES. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View # (if specified). # The default value is: YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces # page. This will remove the Namespaces entry from the Quick Index and from the # Folder Tree View (if specified). # The default value is: YES. SHOW_NAMESPACES = YES # 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. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml # will be used as the name of the layout file. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool # to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated to # standard output by doxygen. If QUIET is set to YES this implies that the # messages are off. # The default value is: NO. QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. # The default value is: YES. WARNINGS = YES # If the WARN_IF_UNDOCUMENTED tag 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. # The default value is: YES. WARN_IF_UNDOCUMENTED = NO # If the WARN_IF_DOC_ERROR tag 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. # The default value is: YES. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO doxygen will only warn about wrong or incomplete parameter # documentation, but not about the absence of documentation. # The default value is: NO. 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) # The default value is: $file:$line: $text. WARN_FORMAT = # 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 standard # error (stderr). WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag is 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. # Note: If this tag is empty the current directory is searched. INPUT = ./ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: http://www.gnu.org/software/libiconv) for the list of # possible encodings. # The default value is: UTF-8. 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 patterns (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, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, # *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, # *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, # *.qsf, *.as and *.js. FILE_PATTERNS = *.h \ gencoil.cpp \ genmakefile.cpp \ gensample.cpp \ micalc.cpp \ miconv.cpp \ swab.cpp # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should be # 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. # # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = platforms \ sequences \ replacements \ docs # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. # The default value is: NO. 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 = *CVS* \ *.svn* \ *_moc.cpp # 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 # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */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. # The default value is: NO. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or directories # that contain images that are to be 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: # # # # where is the value of the INPUT_FILTER tag, and 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. # # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. 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 information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER ) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and # it is also possible to disable source filtering for a specific pattern using # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # 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 that # also VERBATIM_HEADERS is set to NO. # The default value is: NO. SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. # The default value is: NO. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any # special comment blocks from generated source code fragments. Normal C, C++ and # Fortran comments will always remain visible. # The default value is: YES. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented # function all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES 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 documentation. # The default value is: YES. REFERENCES_LINK_SOURCE = YES # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the # source code will show a tooltip with additional information such as prototype, # brief description and links to the definition and documentation. Since this # will make the HTML file larger and loading of large files a bit slower, you # can opt to disable this feature. # The default value is: YES. # This tag requires that the tag SOURCE_BROWSER is set to YES. SOURCE_TOOLTIPS = 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. # # To use it do the following: # - Install the latest version of global # - Enable SOURCE_BROWSER and USE_HTAGS in the config file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # # Doxygen will invoke htags (and that will in turn invoke gtags), so these # tools must be available from the command line (i.e. in the search path). # # The result: instead of the source browser generated by doxygen, the links to # source code will now point to the output of htags. # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set the YES 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. # See also: Section \class. # The default value is: YES. VERBATIM_HEADERS = YES # If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the # cost of reduced performance. This can be particularly helpful with template # rich C++ code for which doxygen's built-in parser lacks the necessary type # information. # Note: The availability of this option depends on whether or not doxygen was # compiled with the --with-libclang option. # The default value is: NO. CLANG_ASSISTED_PARSING = NO # If clang assisted parsing is enabled you can provide the compiler with command # line options that you would normally use when invoking the compiler. Note that # the include paths will already be set by doxygen for the files and directories # specified with INPUT and INCLUDE_PATH. # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. CLANG_OPTIONS = #--------------------------------------------------------------------------- # 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. # The default value is: YES. ALPHABETICAL_INDEX = YES # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in # which the alphabetical index list will be split. # Minimum value: 1, maximum value: 20, default value: 5. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. 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 a prefix (or a list of prefixes) that should be ignored # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES doxygen will generate HTML output # The default value is: YES. 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. # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). # The default value is: .html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a user-defined HTML header file for # each generated HTML page. If the tag is left blank doxygen will generate a # standard header. # # To get valid HTML the header file that includes any scripts and style sheets # that doxygen needs, which is dependent on the configuration options used (e.g. # the setting GENERATE_TREEVIEW). It is highly recommended to start with a # default header using # doxygen -w html new_header.html new_footer.html new_stylesheet.css # YourConfigFile # and then modify the file new_header.html. See also section "Doxygen usage" # for information on how to generate the default header that doxygen normally # uses. # Note: The header is subject to change so you typically have to regenerate the # default header when upgrading to a newer version of doxygen. For a description # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard # footer. See HTML_HEADER for more information on how to generate a default # footer and what special commands can be used inside the footer. See also # section "Doxygen usage" for information on how to generate the default footer # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. 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 left blank doxygen will generate a default style sheet. # See also section "Doxygen usage" for information on how to generate the style # sheet that doxygen normally uses. # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as # it is more robust and this tag (HTML_STYLESHEET) will in the future become # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the # standard style sheet and is therefor more robust against future updates. # Doxygen will copy the style sheet files to the output directory. # Note: The order of the extra stylesheet files is of importance (e.g. the last # stylesheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that the # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the stylesheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # http://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors # in the HTML output. For a value of 0 the output will use grayscales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the # luminance component of the colors in the HTML output. Values below 100 # gradually make the output lighter, whereas values above 100 make the output # darker. The value divided by 100 is the actual gamma applied, so 80 represents # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not # change the gamma. # Minimum value: 40, maximum value: 240, default value: 80. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this # to NO can help when comparing the output of multiple runs. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand # and collapse entries dynamically later on. Doxygen will expand the tree to # such a level that at most the specified number of entries are visible (unless # a fully collapsed tree already exceeds this amount). So setting the number of # entries 1 will produce a full collapsed tree by default. 0 is a special value # representing an infinite number of entries and will result in a full expanded # tree by default. # Minimum value: 0, maximum value: 9999, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development # environment (see: http://developer.apple.com/tools/xcode/), introduced with # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO # This tag determines the name of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # The default value is: Doxygen generated docs. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. # The default value is: org.doxygen.Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. # The default value is: Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop # (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on # Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML # files are now used as the Windows 98 help format, and will replace the old # Windows help format (.hlp) on all Windows platforms in the future. Compressed # HTML files also contain an index, a table of contents, and you can search for # words in the documentation. The HTML workshop also contains a viewer for # compressed HTML files. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO # 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. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = # 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. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = # 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). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO # The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = # 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. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members to # the table of contents of the HTML help documentation and to the tree view. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help # (.qch) of the generated HTML documentation. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify # the file name of the resulting .qch file. The path specified is relative to # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace # (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual # Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- # folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location of Qt's # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To # install this plugin and make it available under the help contents menu in # Eclipse, the contents of the directory containing the HTML and XML files needs # to be copied into the plugins directory of eclipse. The name of the directory # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. # After copying Eclipse needs to be restarted before the help appears. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO # A unique identifier for the Eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have this # name. Each documentation set should have its own identifier. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project # If you want full control over the layout of the generated HTML pages it might # be necessary to disable the index and replace it with your own. The # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top # of each HTML page. A value of NO enables the index and the value YES disables # it. Since the tabs in the index contain the same information as the navigation # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag # value 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 # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has # the same information as the tab index, you could consider setting # DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # # Note that a value of 0 will completely suppress the enum values from appearing # in the overview section. # Minimum value: 0, maximum value: 20, default value: 4. # This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 4 # 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. # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML # output directory to force them to be regenerated. # Minimum value: 8, maximum value: 50, default value: 10. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # # Note that when changing this option you need to delete any form_*.png files in # the HTML output directory before the changes have effect. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # http://www.mathjax.org) which uses client side Javascript for the rendering # instead of using prerendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: # http://docs.mathjax.org/en/latest/output.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory # should contain the MathJax.js script. For instance, if the mathjax directory # is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # MathJax from http://www.mathjax.org before deployment. # The default value is: http://cdn.mathjax.org/mathjax/latest. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and # should work on any modern browser. Note that when using HTML help # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) # there is already a search function so this one should typically be disabled. # For large projects the javascript based search engine can be slow, then # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to # search using the keyboard; to jump to the search box use + S # (what the is depends on the OS and browser, but it is typically # , /