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

formrig.h

/*
 * Copyright (C) 1993-2005 Robert & Jeremy Lainé
 * See AUTHORS file for a full list of contributors.
 * 
 * $Id: formrig.h,v 1.7 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 FORMRIG_H
#define FORMRIG_H

#include <QMainWindow>
#include "rigdef.h"

class QAction;
class QMenu;
class CSailViewerPanel;
class CRigDefPanel;
class CPrefs;
class CSailApp;


/** A form allowing the user to assemble several sails into a rig.
 */
00038 class CFormRig : public QMainWindow
{
    Q_OBJECT

public:
    // construction, destruction
    CFormRig(CSailApp *myApp, QWidget *parent = 0);

protected:
    void closeEvent( QCloseEvent * e);
    void makeMenuMru();
    void setRigDef(const CRigDef &newdef);
    void setupMainWidget();
    void setupMenuBar();

protected slots:
    virtual void languageChange();
    virtual void slotAddSail();
    virtual void slotAddSailDef();
    virtual void slotNew();
    virtual void slotOpen();
    virtual void slotOpenRecent();
    virtual void slotSave();
    virtual void slotSaveAs();
    virtual void slotUpdate(const CRigDef& newdef);

protected:
    /** The user's preferences. */
00066     CPrefs *prefs;
    /** An area to view the rig. */
00068     CSailViewerPanel *viewer;
    /** A panel with one tab per sail in the current rig.  */
00070     CRigDefPanel *defpanel;
    /** The rig definition. */
00072     CRigDef rigdef;
    /** The current filename. */
00074     QString filename;
    
    /** The File menu. */
00077     QMenu *menuFile;
    /** The Add menu. */
00079     QMenu *menuAdd;
    /** The submenu with the most recently used rig definitions. */
00081     QMenu *menuRecent;
    
    QAction *actionNew;
    QAction *actionAddSailDef;
    QAction *actionAddSail;
    QAction *actionOpen;
    QAction *actionSave;
    QAction *actionSaveAs;
    QAction *actionClose;

};

#endif

Generated by  Doxygen 1.6.0   Back to index