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

formmain.h

/*
 * Copyright (C) 1993-2005 Robert & Jeremy Lainé
 * See AUTHORS file for a full list of contributors.
 *
 * $Id: formmain.h,v 1.46 2005/11/12 22:09:02 sailcuter 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 FORMMAIN_H
#define FORMMAIN_H

#include <QMainWindow>
#include <QMessageBox>

#include "sailcalc.h"

#include "sail.h"
#include "saildef.h"

// forward definitions
class QApplication;
class QMenuBar;
class QGridLayout;
class QMenu;
class QStatusBar;
class QTabWidget;
class QTranslator;
class CSailViewerPanel;
class CPrefs;
class CSailApp;


/** The main dialog of the Sailcut application.
 *
 * @version $Id: formmain.h,v 1.46 2005/11/12 22:09:02 sailcuter Exp $
 */
00050 class CFormMain : public QMainWindow
{
    Q_OBJECT

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

    void show(const QString newname = QString::null);
    void setSailDef(const CSailDef newdef);

protected:
    void closeEvent( QCloseEvent * e);
    void keyPressEvent ( QKeyEvent * e );
    void makeMenuMru();
    void fileAccess(QString event, QString file);

    void setupMenuBar();
    void setupMainWidget();

    // slots
protected slots:

    virtual void languageChange();

    virtual void slotAbout();
    virtual void slotAboutQt();

    virtual void slotDef();
    virtual void slotExportDXF();
    virtual void slotExportTXT();
    virtual void slotExportXML();
    virtual void slotExportFlatCarlson();
    virtual void slotExportFlatDXF();
    virtual void slotExportFlatDXFBlocks();
    virtual void slotExportFlatHand();
    virtual void slotExportFlatTXT();
    virtual void slotExportFlatXML();
    virtual void slotMould();
    virtual void slotNew();
    virtual void slotOpen();
    virtual void slotOpenRecent();
    virtual void slotRig();
    virtual void slotSave();
    virtual void slotSaveAs();

    virtual void slotPrintData();
    virtual void slotPrintDwg();
    virtual void slotPrintDev();

    virtual void slotHandbook();

    virtual void slotLanguage();

    // member variables
protected:
    /** the location of the Sailcut Handbook */
00107     QString handbook;

    /** the application */
00110     CSailApp *app;
    /** the user preferences */
00112     CPrefs *prefs;

    /** the widgets of each view */
00115     vector<CSailViewerPanel *> panel;
    /** the tab widget */
00117     QTabWidget *tabs;

    /** the status bar */
00120     QStatusBar* statusbar;

    /** the definition of the current sail */
00123     CSailDef saildef;
    /** the sail */
00125     CSail sail;
    /** the developped sail */
00127     CSail flatsail;
    /** the display version of the flat sail */
00129     CSail dispsail;
    /** the current filename */
00131     QString filename;

    // menus and action
    /** the File menu */
00135     QMenu *menuFile;
    /** the Print submenu */
00137     QMenu *menuPrint;
    /** the Export 3d submenu */
00139     QMenu *menuExport3d;
    /** the Export flat submenu */
00141     QMenu *menuExportFlat;
    /** the Help menu */
00143     QMenu *menuHelp;
    /** the View menu */
00145     QMenu *menuView;
    /** the language submenu */
00147     QMenu *menuLanguage;

    /** the Most Recently Used files menu */
00150     QMenu *menuRecent;


    QAction *actionAbout;
    QAction *actionAboutQt;
    QAction *actionHandbook;
    QAction *actionNew;
    QAction *actionOpen;
    QAction *actionSave;
    QAction *actionSaveAs;
    QAction *actionExport3dDXF;
    QAction *actionExport3dTXT;
    QAction *actionExport3dXML;
    QAction *actionExportFlatCarlson;
    QAction *actionExportFlatHand;
    QAction *actionExportFlatDXF;
    QAction *actionExportFlatDXFBlocks;
    QAction *actionExportFlatTXT;
    QAction *actionExportFlatXML;
    QAction *actionPrintData;
    QAction *actionPrintDev;
    QAction *actionPrintDwg;
    QAction *actionViewDef;
    QAction *actionViewMould;
    QAction *actionViewPatch;
    QAction *actionViewRig;
    QAction *actionQuit;
};

#endif

Generated by  Doxygen 1.6.0   Back to index