export_QtCut.cxx

Go to the documentation of this file.
00001 
00012 // For truncation warning
00013 #ifdef _MSC_VER
00014 #include "msdevstudio/MSconfig.h"
00015 #endif
00016 
00017 #ifdef HAVE_CONFIG_H
00018 #include "config.h"
00019 #endif
00020 
00021 // include first to avoid _POSIX_C_SOURCE warning.
00022 #include <boost/python.hpp>
00023 
00024 #include "QtCut.h"
00025 
00026 #include "PyDataSource.h"
00027 
00028 #include "datasrcs/NTuple.h"
00029 
00030 using std::vector;
00031 using namespace boost::python;
00032 
00033 namespace hippodraw {
00034 namespace Python {
00035 
00036 void
00037 export_QtCut()
00038 {
00039   class_ <QtCut, bases<QtDisplay> >
00040     ( "Cut",
00041       "An object of this class applies a cut or filter on the data that is\n"
00042       "used as input to its target displays.",
00043       init < const DataSource&, 
00044              const std::vector < std::string > & >
00045       ( "Cut ( DataSource, sequence ) -> Cut\n"
00046         "Cut ( DataArray, sequence ) -> Cut\n"
00047         "Cut ( DataSource, sequence, Display, value, value ) -> Cut\n"
00048         "Cut ( DataArray, sequence, Display, value, value ) -> Cut\n"
00049         "\n"
00050         "Creates a Cut bound to DataSource.  For each form, the first\n"
00051         "argument is the DataSource and the second argument is sequence of\n"
00052         "strings specifying the binding.  The latter two forms apply the\n"
00053         "Cut to a Display with low and high values for the Cut range." ) )
00054 
00055     .def ( init < const DataSource &,
00056            const std::vector < std::string > &,
00057            QtDisplay *, double, double > () )
00058 
00059     .def (  init < const PyDataSource&, 
00060             const std::vector < std::string > & > () )
00061 
00062     .def ( init < const PyDataSource &,
00063            const std::vector < std::string > &,
00064            QtDisplay *, double, double > () )
00065 
00066 #ifdef HAVE_NUMARRAY
00067     .def ( init < PyDataSource &,
00068            std::string ,
00069            boost::python::numeric::array,
00070            QtDisplay * > () )
00071 #endif // HAVE_NUMARRAY
00072 
00073     .def ( "addTarget", &QtCut::addTarget,
00074            "addTarget ( Display ) -> None\n"
00075            "\n"
00076            "Adds a Display to the list of targets." )
00077 
00078     .def ( "addTargets", &QtCut::addTargets,
00079            "addTargets ( sequence ) -> None\n"
00080            "\n"
00081            "Adds Display objects in the sequence to the list targets" )
00082 
00083     .def ( "setCutRange", &QtCut::setCutRange,
00084            "setCutRange ( value, value, string ) -> None\n"
00085            "\n"
00086            "Sets the range of the Cut.  Arguments are low and high values,\n"
00087            "and the axis." )
00088 
00089     .def ( "cutRange", &QtCut::cutRange,
00090            "cutRange () -> tuple\n"
00091            "\n"
00092            "Returns a pair of values of the range of each Cut." )
00093 
00094     .def ( "setEnabled", &QtCut::setEnabled,
00095            "setEnabled ( Boolean ) -> None\n"
00096            "\n"
00097            "Sets the cut to be enabled or not" )
00098 
00099     .def ( "toggleInverted", &QtCut::toggleInverted,
00100            "toggleInverted () -> None\n"
00101            "\n"
00102            "Toggles the inversion status" )
00103 
00104     .def ( "createNTuple", &QtCut::createNTuple,
00105            return_value_policy < manage_new_object > (),
00106            "createNTuple ( sequence, sequence, DataSource ) -> NTuple\n"
00107            "\n"
00108            "Create a new NTuple using cut list and column list." )
00109 
00110     .staticmethod("createNTuple")
00111 
00112     .def ( "createTnt", &QtCut::createTnt,
00113            "createTnt ( sequence, sequence, DataSource, string, string )"
00114            "-> None\n"
00115            "\n"
00116            "Create a new TNT file using cut list and column list." )
00117 
00118     .staticmethod("createTnt")
00119 
00120     .def ( "createFits", &QtCut::createFits,
00121            "createFits ( sequence, sequence, DataSource, string, string )"
00122            "->None\n"
00123            "\n"
00124            "Create a new FITS file using cut list and column list.\n"
00125            "This method is deprecated, use the FitsController instead.")
00126 
00127     .staticmethod("createFits")
00128           
00129     ;
00130 
00131 }
00132 
00133 } // namespace Python
00134 } // namespace hippodraw

Generated for HippoDraw Class Library by doxygen