Logo Search packages:      
Sourcecode: sailcut version File versions  Download package

widgetprofile.h

/*
 * Copyright (C) 1993-2005 Robert & Jeremy Lainé
 * See AUTHORS file for a full list of contributors.
 * 
 * $Id: widgetprofile.h,v 1.9 2005/09/03 14:28:58 jeremy_laine Exp $
 * 
 * This program 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.
 * 
 * This program 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 this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef WIDGETPROFILE_H
#define WIDGETPROFILE_H

#include <QLabel>
#include "disparea.h"

class QSpinBox;

class CProfile;
class CWidgetProfileVert;

/**************************************************************************
 
                         CLabelProfile class
 
**************************************************************************/

/** Drawing area fpr a CProfile.
 */
00041 class CLabelProfile : public QLabel, public CDispArea
{
public:
    CLabelProfile(QWidget *, CProfile *);
    ~CLabelProfile()
    {}
    ;

    void clear();
    void paintEvent( QPaintEvent *);

protected:
    void resizeEvent( QResizeEvent * );
  
    /** the CProfile we are displaying */
00056     CProfile* profile;
    
    CRect3d lRect;
};


/**************************************************************************
 
                         CWidgetProfile class
 
**************************************************************************/

/** Widget for displaying a CProfile. It has a display area and 3 spinboxes.
 *
 * @see CProfile
 * @see CLabelProfile
 * @see CWidgetProfileVert
 */
00074 class CWidgetProfile : public QWidget
{
    Q_OBJECT

public:
    CWidgetProfile( QWidget*, CProfile*, QString, CWidgetProfileVert* );
    /** the destructor */
00081     ~CWidgetProfile()
    {}
    ;

protected slots:
    virtual void languageChange();
    void slotChanged();

    // member variables
public:
    /** label for luff */
00092     QLabel* lblLuff;
    /** label for depth */
00094     QLabel* lblDepth;
    /** label for percent */
00096     QLabel* lblPercent;
    /** label for leech */
00098     QLabel* lblLeech;

    /** spinbox for luff */
00101     QSpinBox* spinLuff;
    /** spinbox for depth */
00103     QSpinBox* spinDepth;
    /** spinbox for leech */
00105     QSpinBox* spinLeech;

protected:
    /** drawing area for the profile */
00109     CLabelProfile* lblDraw;
    /** widget for the vertical repartition */
00111     CWidgetProfileVert *widgetVert;

    /** the profile we are displaying */
00114     CProfile* profile;
    /** active flag to disable slotChanged */
00116     bool active;
};

#endif // WIDGETPROFILE_H

Generated by  Doxygen 1.6.0   Back to index