diff options
Diffstat (limited to 'examples/chart/main.cpp')
-rw-r--r-- | examples/chart/main.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/examples/chart/main.cpp b/examples/chart/main.cpp new file mode 100644 index 000000000..328e7fe54 --- /dev/null +++ b/examples/chart/main.cpp @@ -0,0 +1,21 @@ +#include <qapplication.h> +#include "chartform.h" + + +int main( int argc, char *argv[] ) +{ + TQApplication app( argc, argv ); + + TQString filename; + if ( app.argc() > 1 ) { + filename = app.argv()[1]; + if ( !filename.endsWith( ".cht" ) ) + filename = TQString::null; + } + + ChartForm *cf = new ChartForm( filename ); + app.setMainWidget( cf ); + cf->show(); + + return app.exec(); +} |