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