Пример #1
0
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
    createMenu();
    createChooseFilesGroupBox();
    createOptionsGroupBox();
    createSubmitGroupBox();
    createStatusBar();

    readSettings();

    QVBoxLayout *mainLayout = new QVBoxLayout;
    mainLayout->setMenuBar(menuBar);
    mainLayout->addWidget(chooseFilesGroupBox);
    mainLayout->addWidget(optionsGroupBox);
    mainLayout->addWidget(submitGroupBox);

    QWidget *widget = new QWidget();
    widget->setLayout(mainLayout);
    setCentralWidget(widget);

    feaProgram = QCoreApplication::applicationDirPath().toStdString() + "/fea_cmd";
    feaTmpConfigFilename = QCoreApplication::applicationDirPath().toStdString() +"/tmp_config.json";
    setMinimumWidth(600);

    setWindowTitle(tr("3D Beam FEA"));
    setWindowIcon(QIcon(":images/logo_64x64.png"));
    setUnifiedTitleAndToolBarOnMac(true);
}
Пример #2
0
Screenshot::Screenshot( QWidget *parent, Qt::WFlags f)
{
    screenshotLabel = new QLabel;
    screenshotLabel->setSizePolicy(QSizePolicy::Expanding,
                                   QSizePolicy::Expanding);
    screenshotLabel->setAlignment(Qt::AlignCenter);
//    screenshotLabel->setMinimumSize(240, 160);

    createOptionsGroupBox();
    createButtonsLayout();

    mainLayout = new QVBoxLayout;
    mainLayout->addWidget(screenshotLabel);
    mainLayout->addWidget(optionsGroupBox);
#ifndef Q_WS_QWS
    mainLayout->addLayout(buttonsLayout);
#endif
    setLayout(mainLayout);

    shootScreen();
    delaySpinBox->setValue(5);
    hideThisWindowCheckBox->setChecked(true);
    setWindowTitle(tr("Screenshot"));
#ifndef Q_WS_QWS
    resize(300, 200);
#endif
    QtopiaApplication::instance()->registerRunningTask("ReallyFuckingHideThisAndNotKillIt");

}
Пример #3
0
Dialog::Dialog(QWidget *parent)
    : QDialog(parent)
{
    createRotableGroupBox();
    createOptionsGroupBox();
    createButtonBox();

    mainLayout = new QGridLayout;
    mainLayout->addWidget(rotableGroupBox, 0, 0);
    mainLayout->addWidget(optionsGroupBox, 1, 0);
    mainLayout->addWidget(buttonBox, 2, 0);
    setLayout(mainLayout);

    mainLayout->setSizeConstraint(QLayout::SetMinimumSize);

    setWindowTitle(tr("Dynamic Layouts"));
}
Пример #4
0
//! [0]
Screenshot::Screenshot()
{
    screenshotLabel = new QLabel;
    screenshotLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    screenshotLabel->setAlignment(Qt::AlignCenter);
    screenshotLabel->setMinimumSize(240, 160);

    createOptionsGroupBox();
    createButtonsLayout();

    mainLayout = new QVBoxLayout;
    mainLayout->addWidget(screenshotLabel);
    mainLayout->addWidget(optionsGroupBox);
    mainLayout->addLayout(buttonsLayout);
    setLayout(mainLayout);

    shootScreen();
    delaySpinBox->setValue(5);

    setWindowTitle(tr("Screenshot"));
    resize(300, 200);
}