void tst_QGraphicsAnchorLayout::linearVsAnchorSetGeometry()
{
    QFETCH(int, whichLayout);

    QGraphicsLayout *l = createLayouts(whichLayout);

    QRectF sizeHint;
    qreal maxWidth;
    qreal increment;
    // warm up instruction cache
    l->invalidate();
    sizeHint.setSize(l->effectiveSizeHint(Qt::MinimumSize));
    maxWidth = l->effectiveSizeHint(Qt::MaximumSize).width();
    increment = (maxWidth - sizeHint.width()) / 100;
    l->setGeometry(sizeHint);
    // ...then measure...

    QBENCHMARK {
        l->invalidate();
        for (qreal width = sizeHint.width(); width <= maxWidth; width += increment) {
            sizeHint.setWidth(width);
            l->setGeometry(sizeHint);
        }
    }
}
Exemplo n.º 2
0
Preferences::Preferences (QWidget* parent) : QWidget (parent)
{
    createWidgets();
    createLayouts();

    readSettings();
    connectSlots();
}
Exemplo n.º 3
0
MainWidget::MainWidget (QWidget * parent)
            : QWidget               (parent)
            , storageManageWidget   (nullptr)
            , activityWidget        (nullptr)
{
    createWidgets       ();
    createLayouts       ();
    createConnections   ();
}
SettingsWindow::SettingsWindow()
{
    createWidgets();
    createLayouts();
    connectSlots();

    readSettings();
    applySettings();
}
Exemplo n.º 5
0
Preferences::Preferences (QWidget* parent) : QWidget (parent) {
    createWidgets();
    createLayouts();

    readSettings();
    connectSlots();

    DS::log (DS::kInfoLevel, "MainWindow: Preferences widget created");
}
Exemplo n.º 6
0
IntroPage::IntroPage(SquadreModel* sm, ArbitriModel *am, QWidget *parent) :
    QWizardPage(parent), squadre(sm), arbitri(am)
{
    helpLabel = new QLabel(tr("Crea un nuovo giocatore, allenatore o arbitro"), this);
    helpLabel->setWordWrap(true);
    createButtons();
    createLayouts();

    setLayout(layout);
}
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent){
	centralWidget = new QWidget(this);
	this->setCentralWidget(centralWidget);
	createLayouts();
	createWidgets();
	createConnections();
	loadConfig();

	listShows(importLocation);
}
Exemplo n.º 8
0
Console::Console (QWidget* parent) : QWidget (parent)
{
    createWidgets();
    createLayouts();
    configureStyles();

    connect (m_copyButton,  SIGNAL (clicked()),   this, SLOT (copy()));
    connect (m_clearButton, SIGNAL (clicked()),   this, SLOT (clear()));
    connect (DS(), SIGNAL (newMessage (QString)), this, SLOT (log (QString)));
}
Exemplo n.º 9
0
UploadWidget::UploadWidget(RegisteredUser* user, QWidget *parent) : QWidget(parent)
{
    m_db = new DocumentsDB();
    m_user = user;

    createWidgets();
    createLayouts();
    createActions();

    setLayout(m_mainLayout);
}
Exemplo n.º 10
0
DocumentWidget::DocumentWidget(QWidget *parent, MainWindow* mw, BaseUser *bu,QTabWidget*tab) : QWidget(parent)
{
    //set up Timer
    m_tab=tab;
    m_parent = mw;
    m_baseUser=bu;
    isFirstTime=true;
    RegisteredUser* t = static_cast<RegisteredUser*>(m_baseUser);
    m_currentCredits=t->getNumOfCredits();
    createLayouts(); //Create layout within Document Tab
    createActions();
}
Exemplo n.º 11
0
WidgetConfigTransmission::WidgetConfigTransmission(QSharedPointer<Hponic> hponic, QWidget *parent) :
    QWidget(parent),
    ui(new Ui::WidgetConfigTransmission),
    d_hponic(hponic)
{
    ui->setupUi(this);
    setAutoFillBackground(true);

    createWidgets();
    createLayouts();
    createConnections();

    updatePortList();
}
Exemplo n.º 12
0
void tst_QGraphicsAnchorLayout::linearVsAnchorSizeHints()
{
    QFETCH(int, whichSizeHint);
    QFETCH(int, whichLayout);

    QGraphicsLayout *l = createLayouts(whichLayout);

    QSizeF sizeHint;
    // warm up instruction cache
    l->invalidate();
    sizeHint = l->effectiveSizeHint((Qt::SizeHint)whichSizeHint);
    // ...then measure...

    QBENCHMARK {
        l->invalidate();
        sizeHint = l->effectiveSizeHint((Qt::SizeHint)whichSizeHint);
    }
}
Exemplo n.º 13
0
WidgetMain::WidgetMain(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::WidgetMain)
{
    ui->setupUi(this);

    createGlobals();
    createWidgets();
    createLayouts();
    createConnections();

    QSettings settings;
    int w = settings.value("window/width", width()).toInt();
    int h = settings.value("window/height", height()).toInt();
    bool maximized = settings.value("window/maximized", false).toBool();
    d_widgetConfigTransmission->setPort(settings.value("transmission/port", "COM1").toString());
    d_widgetConfigTransmission->setAddress(settings.value("transmission/address", QVariant(uint(1))).toUInt());

    if (maximized)
        setWindowState(Qt::WindowMaximized);
    else
        resize(w, h);
}
Exemplo n.º 14
0
TekSettings::TekSettings(tekModule *mod, const QString &title, QWidget *parent)
	: QGroupBox(title,parent),module_(mod)	{
	createWidgets();
	createLayouts();
	channel_ = 0;
}
Exemplo n.º 15
0
Messages::Messages (QWidget* parent) : QWidget (parent) {
    createWidgets();
    createLayouts();

    DS::log (DS::kInfoLevel, "MainWindow: Messages widget created");
}