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