Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:47

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 //
0028 // 
0029 
0030 #ifndef G4OPENGLQTEXPORTDIALOG_HH
0031 #define G4OPENGLQTEXPORTDIALOG_HH
0032 
0033 #include <qdialog.h>
0034 
0035 class QButtonGroup;
0036 class QPushButton;
0037 class QRadioButton;
0038 class QCheckBox;
0039 class QSlider;
0040 class QComboBox;
0041 class QLabel;
0042 class QLineEdit;
0043 
0044 class QGroupBox;
0045 
0046 /** The G4OpenGLQtExportDialog class provide a Dialog displaying differents options
0047     for each file format
0048 */
0049 class G4OpenGLQtExportDialog : public QDialog
0050 {
0051   Q_OBJECT
0052 
0053  public:
0054   /** Construct a G4OpenGLQtExportDialog
0055       @param parentw : parent widget
0056       @param format  : format of save file in lower case
0057       @param height  : height of the original file
0058       @param width   : width of the original file
0059   */
0060   G4OpenGLQtExportDialog(QWidget* parentw, QString format, int height =0, int width=0);
0061 
0062   /** Destroys G4OpenGLQtExportDialog */
0063   ~G4OpenGLQtExportDialog();
0064 
0065   /** @return the value of the slider if format has a slider widget, instead return -1 */
0066   int getSliderValue();
0067 
0068   /** return the new width for file if format has a width widget, instead return 
0069       the original value */
0070   int getWidth();
0071 
0072   /** return the new height for file if format has a height widget, instead return
0073       the original value  */
0074   int getHeight();
0075 
0076   /** return if vector EPS is checked, if button does'nt exist, return 0 */
0077   bool getVectorEPS();
0078 
0079   public Q_SLOTS:
0080 
0081    /** Called by a clic on modify/original size button.This will 
0082     invert buttons and hide/unhide size
0083     */
0084   void changeSizeBox();  
0085 
0086   /** Called by a clic on vectorEPS check box.If vectorEPS checkBox is checked,
0087       it will enable change size buttons. Else it will disable them.
0088   */
0089   void changeVectorEPS();
0090 
0091   /** Called by changing value in height lineEdit. If ratio is keep, will also change the width
0092    */
0093   void textWidthChanged(const QString &); 
0094 
0095   /** Called by changing value in width lineEdit. If ratio is keep, will also change the height
0096    */
0097   void textHeightChanged(const QString &); 
0098 
0099  private:
0100   QString f_name, f_type, f_dir;
0101 //  QLabel* qualityLabel;
0102 //  bool expAll;
0103   QPushButton* buttonOk;
0104   QPushButton* buttonCancel;
0105 
0106   QGroupBox * sizeGroupBox;
0107 
0108   QCheckBox/** transparencyEPS,*boxTransparency,*/*vectorEPSCheckBox;
0109   QCheckBox* ratioCheckBox;
0110   QSlider * qualitySlider;
0111 //  QLabel *formatLabel;
0112   QRadioButton* colorButton,*BWButton;
0113   QRadioButton* original,* modify;
0114   QLineEdit* height,*width;
0115   QWidget* heightWidget,* widthWidget;
0116   int originalWidth;
0117   int originalHeight;
0118   bool isChangingSize;
0119 };
0120 
0121 #endif