DlgSettingsImageImp.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (c) 2005 Werner Mayer <wmayer[at]users.sourceforge.net>     *
00003  *                                                                         *
00004  *   This file is part of the FreeCAD CAx development system.              *
00005  *                                                                         *
00006  *   This library is free software; you can redistribute it and/or         *
00007  *   modify it under the terms of the GNU Library General Public           *
00008  *   License as published by the Free Software Foundation; either          *
00009  *   version 2 of the License, or (at your option) any later version.      *
00010  *                                                                         *
00011  *   This library  is distributed in the hope that it will be useful,      *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU Library General Public License for more details.                  *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Library General Public     *
00017  *   License along with this library; see the file COPYING.LIB. If not,    *
00018  *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
00019  *   Suite 330, Boston, MA  02111-1307, USA                                *
00020  *                                                                         *
00021  ***************************************************************************/
00022 
00023 
00024 #ifndef GUI_DIALOG_DLGSETTINGSIMAGE_IMP_H
00025 #define GUI_DIALOG_DLGSETTINGSIMAGE_IMP_H
00026 
00027 #include <Inventor/SoOffscreenRenderer.h> 
00028 #include <Inventor/SbMatrix.h> 
00029 
00030 #include "ui_DlgSettingsImage.h"
00031 
00032 namespace Gui {
00033 namespace Dialog {
00039 class DlgSettingsImageImp : public QWidget, public Ui::DlgSettingsImage
00040 {
00041     Q_OBJECT
00042 
00043 public:
00044     DlgSettingsImageImp( QWidget* parent = 0 );
00045     ~DlgSettingsImageImp();
00046 
00049     void setImageSize( int, int );
00050     void setImageSize( const QSize& );
00051     QSize imageSize() const;
00052     int imageWidth() const;
00053     int imageHeight() const;
00055 
00058     QString comment() const;
00059     int backgroundType() const;
00061 
00062 public Q_SLOTS:
00063     void onSelectedFilter( const QString& );
00064 
00065 protected Q_SLOTS:
00066     void on_buttonRatioScreen_clicked();
00067     void on_buttonRatio4x3_clicked();
00068     void on_buttonRatio16x9_clicked();
00069     void on_buttonRatio1x1_clicked();
00070     void on_standardSizeBox_activated(int);
00071 
00072 protected:
00073     // helper to force an aspect ratio
00074     void adjustImageSize(float fRatio);
00075     void changeEvent(QEvent *e);
00076 
00077 
00078 private:
00079     float _fRatio;
00080     int _width, _height;
00081     SbMatrix _Matrix;
00082 };
00083 
00084 } // namespace Dialog
00085 } // namespace Gui
00086 
00087 #endif // GUI_DIALOG_DLGSETTINGSIMAGE_IMP_H

Generated on Wed Nov 23 19:00:07 2011 for FreeCAD by  doxygen 1.6.1