00001 //------------------------------------------------------------------------------ 00002 // This file is part of the OpenStructure project <www.openstructure.org> 00003 // 00004 // Copyright (C) 2008-2010 by the OpenStructure authors 00005 // 00006 // This library is free software; you can redistribute it and/or modify it under 00007 // the terms of the GNU Lesser General Public License as published by the Free 00008 // Software Foundation; either version 3.0 of the License, or (at your option) 00009 // any later version. 00010 // This library is distributed in the hope that it will be useful, but WITHOUT 00011 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00012 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00013 // details. 00014 // 00015 // You should have received a copy of the GNU Lesser General Public License 00016 // along with this library; if not, write to the Free Software Foundation, Inc., 00017 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00018 //------------------------------------------------------------------------------ 00019 #ifndef OST_GUI_FILE_TYPE_DIALOG_HH 00020 #define OST_GUI_FILE_TYPE_DIALOG_HH 00021 00022 /* 00023 Author: Stefan Scheuber 00024 */ 00025 00026 #include <ost/gui/module_config.hh> 00027 00028 00029 #include <QDialog> 00030 #include <QTableWidget> 00031 #include <QLabel> 00032 00033 #include <ost/io/entity_io_handler.hh> 00034 #include <ost/io/sequence_io_handler.hh> 00035 #include <ost/io/surface_io_handler.hh> 00036 #if OST_IMG_ENABLED 00037 #include <ost/io/map_io_handler.hh> 00038 #endif 00039 00040 namespace ost { namespace gui { 00041 00043 class DLLEXPORT_OST_GUI FileTypeDialog : public QDialog { 00044 Q_OBJECT 00045 public: 00046 FileTypeDialog(const QString& file_name, QWidget* parent=NULL); 00047 io::EntityIOHandlerP GetEntityHandler(); 00048 io::SequenceIOHandlerPtr GetSequenceHandler(); 00049 io::SurfaceIOHandlerPtr GetSurfaceHandler(); 00050 #if OST_IMG_ENABLED 00051 io::MapIOHandlerPtr GetMapHandler(); 00052 #endif 00053 00054 public slots: 00055 virtual void accept (); 00056 00057 private: 00058 void AddRow(int row, const QString& format_name, const QString& format_descr, QVariant& variant); 00059 00060 00061 QTableWidget* list_; 00062 QLabel* label_; 00063 io::EntityIOHandlerP entity_handler_; 00064 io::SequenceIOHandlerPtr seq_handler_; 00065 io::SurfaceIOHandlerPtr surf_handler_; 00066 #if OST_IMG_ENABLED 00067 io::MapIOHandlerPtr map_handler_; 00068 #endif 00069 00070 }; 00071 00072 }} 00073 00074 Q_DECLARE_METATYPE(ost::io::EntityIOHandlerFactoryBaseP); 00075 Q_DECLARE_METATYPE(ost::io::SequenceIOHandlerFactoryBasePtr); 00076 Q_DECLARE_METATYPE(ost::io::SurfaceIOHandlerFactoryBasePtr); 00077 #if OST_IMG_ENABLED 00078 Q_DECLARE_METATYPE(ost::io::MapIOHandlerFactoryBasePtr); 00079 #endif 00080 00081 #endif
1.5.8