Optika GUI Toolik Version of the Day
Optika_GUI.hpp
Go to the documentation of this file.
00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 //         Optika: A Tool For Developing Parameter Obtaining GUIs
00005 //                Copyright (2009) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, with Sandia Corporation, the 
00008 // U.S. Government retains certain rights in this software.
00009 // 
00010 // Redistribution and use in source and binary forms, with or without
00011 // modification, are permitted provided that the following conditions are
00012 // met:
00013 //
00014 // 1. Redistributions of source code must retain the above copyright
00015 // notice, this list of conditions and the following disclaimer.
00016 //
00017 // 2. Redistributions in binary form must reproduce the above copyright
00018 // notice, this list of conditions and the following disclaimer in the
00019 // documentation and/or other materials provided with the distribution.
00020 //
00021 // 3. Neither the name of the Corporation nor the names of the
00022 // contributors may be used to endorse or promote products derived from
00023 // this software without specific prior written permission.
00024 //
00025 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
00026 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00027 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00028 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
00029 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00030 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00031 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00032 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00033 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00034 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00035 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00036 //
00037 // Questions? Contact Kurtis Nusbaum (klnusbaum@gmail.com) 
00038 // 
00039 // ***********************************************************************
00040 // @HEADER
00041 #ifndef OPTIKA_GUI_HPP_
00042 #define OPTIKA_GUI_HPP_
00043 
00044 #include "Optika_metawindow.hpp"
00045 
00052 namespace Optika{
00053 
00055 
00056 
00070   void getInput(
00071     RCP<ParameterList> validParameters,
00072     RCP<DependencySheet> dependencySheet=null,
00073     void (*customFunc)(RCP<const ParameterList>)=NULL);
00074 
00088   void getInput(
00089     const std::string& nameOfXmlFile,
00090     RCP<ParameterList>& userInput,
00091     void (*customFunc)(RCP<const ParameterList>)=NULL);
00092 
00094 
00098 class OptikaGUI{
00099 public:
00102 
00113   OptikaGUI(
00114     RCP<ParameterList> validParameters, 
00115     RCP<DependencySheet> dependencySheet=null,
00116     void (*customFunc)(RCP<const ParameterList>)=NULL);
00117 
00125   OptikaGUI(const std::string& xmlFileName,
00126     void (*customFunc)(RCP<const ParameterList>)=NULL);
00127 
00129 
00131 
00132   
00136   void exec();
00137 
00139 
00141 
00142   
00148   void setAboutInfo(const std::string& aboutInfo);
00149 
00155   void setActionButtonText(const std::string& text);
00156 
00163   void setWindowTitle(const std::string& title);
00164 
00171   void setWindowIcon(const std::string& filePath);
00172 
00179   void setStyleSheet(const std::string& filePath);
00180 
00188   void setCustomFunction(void (*customFunc)(RCP<const ParameterList>));
00189 
00195   std::string getWindowTitle();
00196 
00204   std::string getWindowIcon();
00205 
00213   std::string getStyleSheet();
00214 
00220   std::string getAboutInfo();
00221 
00223 
00224 private:
00227   
00231   RCP<ParameterList> validParameters;
00232 
00236   RCP<DependencySheet> dependencySheet;
00237 
00241   std::string title;
00242 
00246   std::string iconFilePath;
00247 
00251   std::string styleSheetFilePath;
00252 
00256   std::string aboutInfo;
00257 
00261   std::string actionButtonText;
00262 
00266   void (*customFunc)(RCP<const ParameterList>);
00267 
00269 };
00270 
00271 }
00272 
00273 #endif //OPTIKA_GUI_HPP_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines