00001 //------------------------------------------------------------------------------ 00002 // This file is part of the OpenStructure project <www.openstructure.org> 00003 // 00004 // Copyright (C) 2008-2011 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, Marco Biasini 00024 */ 00025 00026 #include <ost/gui/module_config.hh> 00027 00028 00029 00030 #include <ost/io/mol/entity_io_handler.hh> 00031 #include <ost/io/seq/sequence_io_handler.hh> 00032 #include <ost/io/mol/surface_io_handler.hh> 00033 #if OST_IMG_ENABLED 00034 #include <ost/io/img/map_io_handler.hh> 00035 #endif 00036 00037 #include <QDialog> 00038 #include <QMetaType> 00039 00040 class QTableWidget; 00041 class QLabel; 00042 namespace ost { namespace gui { 00043 00045 class DLLEXPORT_OST_GUI FileTypeDialog : public QDialog { 00046 Q_OBJECT 00047 public: 00048 FileTypeDialog(const QString& file_name, QWidget* parent=NULL); 00049 io::EntityIOHandlerP GetEntityHandler(); 00050 io::SequenceIOHandlerPtr GetSequenceHandler(); 00051 io::SurfaceIOHandlerPtr GetSurfaceHandler(); 00052 #if OST_IMG_ENABLED 00053 io::MapIOHandlerPtr GetMapHandler(); 00054 #endif 00055 public slots: 00056 virtual void accept(); 00057 private: 00058 QTableWidget* list_; 00059 QLabel* label_; 00060 io::EntityIOHandlerP entity_handler_; 00061 io::SequenceIOHandlerPtr seq_handler_; 00062 io::SurfaceIOHandlerPtr surf_handler_; 00063 #if OST_IMG_ENABLED 00064 io::MapIOHandlerPtr map_handler_; 00065 #endif 00066 00067 }; 00068 00069 }} 00070 00071 Q_DECLARE_METATYPE(ost::io::EntityIOHandlerFactoryBaseP); 00072 Q_DECLARE_METATYPE(ost::io::SequenceIOHandlerFactoryBasePtr); 00073 Q_DECLARE_METATYPE(ost::io::SurfaceIOHandlerFactoryBasePtr); 00074 #if OST_IMG_ENABLED 00075 Q_DECLARE_METATYPE(ost::io::MapIOHandlerFactoryBasePtr); 00076 #endif 00077 00078 #endif