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

CFormMain::CFormMain ( CSailApp myApp,
QWidget *  parent = 0 
)

Constructs Sailcut CAD's main window.

Parameters:
pref the user's preferences

Definition at line 61 of file formmain.cpp.

References app, CSailApp::findHandbook(), handbook, CPrefs::language, languageChange(), CSailApp::loadTranslation(), prefs, CPrefs::sailWindowHeight, CPrefs::sailWindowWidth, setupMainWidget(), setupMenuBar(), and statusbar.

        : QMainWindow(parent), app(myApp), prefs(&myApp->prefs)
{
    setMinimumSize( QSize( 300, 220 ) );

    // locate Handbook
    app->loadTranslation(prefs->language);
    handbook = app->findHandbook(prefs->language);
    qDebug("handbook : %s", (const char*)handbook.toLocal8Bit());

    // create status bar
    statusbar = new QStatusBar(this);
    setStatusBar(statusbar);

    // create menu bar
    setupMenuBar();

    // create main widget
    setupMainWidget();

    // set language
    languageChange();

    // set icon
    setWindowIcon( QPixmap( (const char **)sailcut_xpm ) );

    // resize to prefered size
    resize( QSize(prefs->sailWindowWidth,prefs->sailWindowHeight).expandedTo(minimumSizeHint()) );
}


Generated by  Doxygen 1.6.0   Back to index