/* This file is part of moth. moth is a program for creating and editing textured 3D models. Copyright (C) 2004 Peter Uray. moth is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. moth is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with moth; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __MMODELVIEW_H__ #define __MMODELVIEW_H__ #include #include #include #include #include #include class MModelView : public QWidget { Q_OBJECT signals: // No signals. public slots: // No slots. public: enum ViewMode { ViewMode3D = 1, ViewModeXY, ViewModeYZ, ViewModeZX, ViewModeQuad, ViewModeTexture }; void repaint(void); // Public interface for selecting a view configuration. void select3DView(void); void selectXYView(void); void selectYZView(void); void selectZXView(void); void selectQuadView(void); void selectTextureView(void); M3DView &get3DView(void); MPlaneView &getXYView(void); MPlaneView &getYZView(void); MPlaneView &getZXView(void); MTextureView &getTextureView(void); MModelView::ViewMode getViewMode(void); static MModelView *get(void); static void create(QWidget *parent); protected: MModelView(QWidget *parent = 0, const char *name = 0, WFlags f = 0); virtual void resizeEvent(QResizeEvent *event); static MModelView *_this; private: ViewMode _viewMode; // The views. M3DView *_3dView; MPlaneView *_xyView; MPlaneView *_yzView; MPlaneView *_zxView; MTextureView *_textureView; }; #endif