38 QVBoxLayout *commentLayout =
new QVBoxLayout();
39 commentLayout->addWidget(
new QLabel( tr(
"Title" ) ) );
40 mCommentEdit =
new QTextEdit();
41 mCommentEdit->setAcceptRichText(
false );
42 mCommentEdit->setText( box.description() );
43 commentLayout->addWidget( mCommentEdit, 1 );
45 QHBoxLayout *hl =
new QHBoxLayout();
46 hl->setContentsMargins( 0, 0, 0, 0 );
47 hl->addWidget(
new QLabel( tr(
"Color" ) ) );
49 mCommentColorButton->setAllowOpacity(
true );
50 mCommentColorButton->setWindowTitle( tr(
"Comment Color" ) );
51 mCommentColorButton->setShowNull(
true, tr(
"Default" ) );
53 if ( box.color().isValid() )
54 mCommentColorButton->setColor( box.color() );
56 mCommentColorButton->setToNull();
58 hl->addWidget( mCommentColorButton );
59 commentLayout->addLayout( hl );
61 QDialogButtonBox *bbox =
new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Ok );
62 connect( bbox, &QDialogButtonBox::accepted,
this, &QgsModelGroupBoxDefinitionDialog::accept );
63 connect( bbox, &QDialogButtonBox::rejected,
this, &QgsModelGroupBoxDefinitionDialog::reject );
65 commentLayout->addWidget( bbox );
66 setLayout( commentLayout );
67 setWindowTitle( tr(
"Group Box Properties" ) );
68 setObjectName( u
"QgsModelGroupBoxDefinitionWidget"_s );
71 mCommentEdit->setFocus();
72 mCommentEdit->selectAll();