예제 #1
0
QLayout::QLayout( QWidget *parent, int border, int space, const char *name )
    : QObject( parent, name )
{
    init();
    if ( parent ) {
	if ( parent->layout() ) {
	    qWarning( "QLayout \"%s\" added to %s \"%s\","
		     " which already had a layout.", QObject::name(),
		     parent->className(), parent->name() );
	    parent->removeChild( this );
	} else {
	    topLevel = TRUE;
	    if ( parent->isTopLevel() )
		autoMinimum = TRUE;
	    parent->installEventFilter( this );
	    setWidgetLayout( parent, this );
	}
    }
    outsideBorder = border;
    if ( space < 0 )
	insideSpacing = border;
    else
	insideSpacing = space;
    installEventFilter( this );//###binary compatibility.
}
예제 #2
0
파일: results.cpp 프로젝트: mostua/TZSP
Results::Results(QWidget *parent) :
    QWidget(parent)
{
    createWidgetItems();
    setWidgetLayout();
    createConnections();
}
예제 #3
0
QLayout::~QLayout()
{
    //note that this function may be called during the QObject destructor,
    //when the parent no longer is a QWidget.
    if ( isTopLevel() && parent() && parent()->isWidgetType() &&
	 ((QWidget*)parent())->layout() == this )
	setWidgetLayout( (QWidget*)parent(), 0 );
}
예제 #4
0
mainView::mainView(QWidget *parent)
     : QWidget(parent),
     timer(new QTimer(this))
 {
    setWindowTitle(tr("Life on Qt4."));
    //setFixedSize(550, 420);
    timer->setInterval(250);
    initWidgets();
    setWidgetLayout();
    setConnections();
 }
예제 #5
0
pluginFieldInt::pluginFieldInt(pluginField *parent) : pluginField(parent) {

	fieldContent = new QSpinBox() ;
	QHBoxLayout *tmpLayout = new QHBoxLayout() ;

	tmpLayout->addWidget(fieldContent) ;
	tmpLayout->addStretch() ;
	tmpLayout->setContentsMargins(0,0,0,0) ;

	setWidgetLayout(tmpLayout) ;

}
예제 #6
0
pluginFieldBool::pluginFieldBool(pluginField *parent) : pluginField(parent) {

	contentYes = new QRadioButton(tr("Yes")) ;
	contentNo = new QRadioButton(tr("No")) ;
	QHBoxLayout *tmpLayout = new QHBoxLayout() ;

	tmpLayout->addWidget(contentYes) ;
	tmpLayout->addWidget(contentNo) ;
	tmpLayout->addStretch() ;
	tmpLayout->setContentsMargins(0,0,0,0) ;
	setWidgetLayout(tmpLayout) ;

}
예제 #7
0
파일: thebestlist.cpp 프로젝트: mostua/TZSP
TheBestList::TheBestList(QWidget *parent)
{
    createItems();
    setWidgetLayout();
    createConnections();
}