// Scrollbar/tools layout management.
void qtractorMidiEditView::setVBarGeometry ( QScrollBar& vbar,
	int x, int y, int w, int h )
{
	vbar.setGeometry(x, y, w, h - w * 2);
	if (m_pVzoomIn)
		m_pVzoomIn->setGeometry(x, y + h - w * 2, w, w);
	if (m_pVzoomOut)
		m_pVzoomOut->setGeometry(x, y + h - w, w, w);
}
Beispiel #2
0
void Scene::drawCharacters(QList<Character> characters, int z)
{
    //Draw scrollbar to browse Characters if more then 5 Characters
    QScrollBar *scrollcharacters = new QScrollBar(Qt::Horizontal);

    if(characters.count() > max_characters_on_screen_)
    {
        scrollcharacters->setGeometry(0, this->height()*29/30, this->width(), this->height()/30);
        scrollcharacters->setRange(0, this->width()/(max_characters_on_screen_ + 1));
        addWidget(scrollcharacters);
    }
    else
        scrollcharacters = NULL;

    //Draw Characters
    int position = 1;
    foreach(Character p, characters)
    {
        drawCharacter(p, position, z, characters.count(), scrollcharacters);
        position += 1;
    }
Beispiel #3
0
void LCDRange::resizeEvent( QResizeEvent * )
{
    sBar->setGeometry( 0, height() - 16, width(), 16 );
    lcd->resize( width(), sBar->y() - 5 );
}
void KexiRecordNavigator::setHBarGeometry(QScrollBar & hbar, int x, int y, int w, int h)
{
    hbar.setGeometry(x + width(), y, w - width(), h);
}