33 QVBoxLayout *commentLayout =
new QVBoxLayout();
34 commentLayout->addWidget(
new QLabel( tr(
"Title" ) ) );
35 mCommentEdit =
new QTextEdit();
36 mCommentEdit->setAcceptRichText(
false );
37 mCommentEdit->setText( box.description() );
38 commentLayout->addWidget( mCommentEdit, 1 );
40 QHBoxLayout *hl =
new QHBoxLayout();
41 hl->setContentsMargins( 0, 0, 0, 0 );
42 hl->addWidget(
new QLabel( tr(
"Color" ) ) );
45 mCommentColorButton->setWindowTitle( tr(
"Comment Color" ) );
46 mCommentColorButton->
setShowNull(
true, tr(
"Default" ) );
48 if ( box.color().isValid() )
49 mCommentColorButton->
setColor( box.color() );
53 hl->addWidget( mCommentColorButton );
54 commentLayout->addLayout( hl );
56 QDialogButtonBox *bbox =
new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Ok );
57 connect( bbox, &QDialogButtonBox::accepted,
this, &QgsModelGroupBoxDefinitionDialog::accept );
58 connect( bbox, &QDialogButtonBox::rejected,
this, &QgsModelGroupBoxDefinitionDialog::reject );
60 commentLayout->addWidget( bbox );
61 setLayout( commentLayout );
62 setWindowTitle( tr(
"Group Box Properties" ) );
63 setObjectName( QStringLiteral(
"QgsModelGroupBoxDefinitionWidget" ) );
66 mCommentEdit->setFocus();
67 mCommentEdit->selectAll();