QGIS API Documentation  3.12.1-BucureČ™ti (121cc00ff0)
qgslayoutmanualtablewidget.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgslayoutmanualtablewidget.h
3  ---------------------------------
4  begin : January 2020
5  copyright : (C) 2020 by Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
19 #include "qgslayoutatlas.h"
20 #include "qgslayout.h"
21 #include "qgslayoutframe.h"
22 #include "qgslayoutitemwidget.h"
24 #include "qgslayouttablecolumn.h"
25 #include "qgsguiutils.h"
27 
29  : QgsLayoutItemBaseWidget( nullptr, frame ? qobject_cast< QgsLayoutItemManualTable* >( frame->multiFrame() ) : nullptr )
30  , mTable( frame ? qobject_cast< QgsLayoutItemManualTable* >( frame->multiFrame() ) : nullptr )
31  , mFrame( frame )
32 {
33  setupUi( this );
34 
35  connect( mSetContentsButton, &QPushButton::clicked, this, &QgsLayoutManualTableWidget::setTableContents );
36  connect( mMarginSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutManualTableWidget::mMarginSpinBox_valueChanged );
37  connect( mGridStrokeWidthSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutManualTableWidget::mGridStrokeWidthSpinBox_valueChanged );
38  connect( mGridColorButton, &QgsColorButton::colorChanged, this, &QgsLayoutManualTableWidget::mGridColorButton_colorChanged );
39  connect( mBackgroundColorButton, &QgsColorButton::colorChanged, this, &QgsLayoutManualTableWidget::mBackgroundColorButton_colorChanged );
40  connect( mHeaderFontColorButton, &QgsColorButton::colorChanged, this, &QgsLayoutManualTableWidget::mHeaderFontColorButton_colorChanged );
41  connect( mContentFontColorButton, &QgsColorButton::colorChanged, this, &QgsLayoutManualTableWidget::mContentFontColorButton_colorChanged );
42  connect( mDrawHorizontalGrid, &QCheckBox::toggled, this, &QgsLayoutManualTableWidget::mDrawHorizontalGrid_toggled );
43  connect( mDrawVerticalGrid, &QCheckBox::toggled, this, &QgsLayoutManualTableWidget::mDrawVerticalGrid_toggled );
44  connect( mShowGridGroupCheckBox, &QgsCollapsibleGroupBoxBasic::toggled, this, &QgsLayoutManualTableWidget::mShowGridGroupCheckBox_toggled );
45  connect( mHeaderHAlignmentComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsLayoutManualTableWidget::mHeaderHAlignmentComboBox_currentIndexChanged );
46  connect( mHeaderModeComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsLayoutManualTableWidget::mHeaderModeComboBox_currentIndexChanged );
47  connect( mAddFramePushButton, &QPushButton::clicked, this, &QgsLayoutManualTableWidget::mAddFramePushButton_clicked );
48  connect( mResizeModeComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsLayoutManualTableWidget::mResizeModeComboBox_currentIndexChanged );
49  connect( mDrawEmptyCheckBox, &QCheckBox::toggled, this, &QgsLayoutManualTableWidget::mDrawEmptyCheckBox_toggled );
50  connect( mEmptyFrameCheckBox, &QCheckBox::toggled, this, &QgsLayoutManualTableWidget::mEmptyFrameCheckBox_toggled );
51  connect( mHideEmptyBgCheckBox, &QCheckBox::toggled, this, &QgsLayoutManualTableWidget::mHideEmptyBgCheckBox_toggled );
52  connect( mWrapBehaviorComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsLayoutManualTableWidget::mWrapBehaviorComboBox_currentIndexChanged );
53  connect( mAdvancedCustomizationButton, &QPushButton::clicked, this, &QgsLayoutManualTableWidget::mAdvancedCustomizationButton_clicked );
54  setPanelTitle( tr( "Table Properties" ) );
55 
56  mContentFontToolButton->setMode( QgsFontButton::ModeQFont );
57  mHeaderFontToolButton->setMode( QgsFontButton::ModeQFont );
58 
59  blockAllSignals( true );
60 
61  mResizeModeComboBox->addItem( tr( "Use Existing Frames" ), QgsLayoutMultiFrame::UseExistingFrames );
62  mResizeModeComboBox->addItem( tr( "Extend to Next Page" ), QgsLayoutMultiFrame::ExtendToNextPage );
63  mResizeModeComboBox->addItem( tr( "Repeat Until Finished" ), QgsLayoutMultiFrame::RepeatUntilFinished );
64 
65  mWrapBehaviorComboBox->addItem( tr( "Truncate Text" ), QgsLayoutTable::TruncateText );
66  mWrapBehaviorComboBox->addItem( tr( "Wrap Text" ), QgsLayoutTable::WrapText );
67 
68  mHeaderModeComboBox->addItem( tr( "On First Frame" ), QgsLayoutTable::FirstFrame );
69  mHeaderModeComboBox->addItem( tr( "On All Frames" ), QgsLayoutTable::AllFrames );
70  mHeaderModeComboBox->addItem( tr( "No Header" ), QgsLayoutTable::NoHeaders );
71 
72  mHeaderHAlignmentComboBox->addItem( tr( "Follow Column Alignment" ), QgsLayoutTable::FollowColumn );
73  mHeaderHAlignmentComboBox->addItem( tr( "Left" ), QgsLayoutTable::HeaderLeft );
74  mHeaderHAlignmentComboBox->addItem( tr( "Center" ), QgsLayoutTable::HeaderCenter );
75  mHeaderHAlignmentComboBox->addItem( tr( "Right" ), QgsLayoutTable::HeaderRight );
76 
77  mHeaderFontColorButton->setColorDialogTitle( tr( "Select Header Font Color" ) );
78  mHeaderFontColorButton->setAllowOpacity( true );
79  mHeaderFontColorButton->setContext( QStringLiteral( "composer" ) );
80  mContentFontColorButton->setColorDialogTitle( tr( "Select Content Font Color" ) );
81  mContentFontColorButton->setAllowOpacity( true );
82  mContentFontColorButton->setContext( QStringLiteral( "composer" ) );
83  mGridColorButton->setColorDialogTitle( tr( "Select Grid Color" ) );
84  mGridColorButton->setAllowOpacity( true );
85  mGridColorButton->setContext( QStringLiteral( "composer" ) );
86  mGridColorButton->setDefaultColor( Qt::black );
87  mBackgroundColorButton->setColorDialogTitle( tr( "Select Background Color" ) );
88  mBackgroundColorButton->setAllowOpacity( true );
89  mBackgroundColorButton->setContext( QStringLiteral( "composer" ) );
90  mBackgroundColorButton->setShowNoColor( true );
91  mBackgroundColorButton->setNoColorString( tr( "No Background" ) );
92 
93  updateGuiElements();
94 
95  if ( mTable )
96  {
97  connect( mTable, &QgsLayoutMultiFrame::changed, this, &QgsLayoutManualTableWidget::updateGuiElements );
98  }
99 
100  //embed widget for general options
101  if ( mFrame )
102  {
103  //add widget for general composer item properties
104  mItemPropertiesWidget = new QgsLayoutItemPropertiesWidget( this, mFrame );
105  mainLayout->addWidget( mItemPropertiesWidget );
106  }
107 
108  connect( mHeaderFontToolButton, &QgsFontButton::changed, this, &QgsLayoutManualTableWidget::headerFontChanged );
109  connect( mContentFontToolButton, &QgsFontButton::changed, this, &QgsLayoutManualTableWidget::contentFontChanged );
110 }
111 
113 {
114  if ( mItemPropertiesWidget )
115  mItemPropertiesWidget->setMasterLayout( masterLayout );
116 }
117 
119 {
120  QgsLayoutFrame *frame = qobject_cast< QgsLayoutFrame * >( item );
121  if ( !frame )
122  return false;
123 
124  QgsLayoutMultiFrame *multiFrame = frame->multiFrame();
125  if ( !multiFrame )
126  return false;
127 
128  if ( multiFrame->type() != QgsLayoutItemRegistry::LayoutManualTable )
129  return false;
130 
131  if ( mTable )
132  {
133  disconnect( mTable, &QgsLayoutObject::changed, this, &QgsLayoutManualTableWidget::updateGuiElements );
134  }
135  if ( mEditorDialog )
136  {
137  mEditorDialog->close();
138  }
139 
140  mTable = qobject_cast< QgsLayoutItemManualTable * >( multiFrame );
141  mFrame = frame;
142  mItemPropertiesWidget->setItem( frame );
143 
144  if ( mTable )
145  {
146  connect( mTable, &QgsLayoutObject::changed, this, &QgsLayoutManualTableWidget::updateGuiElements );
147  }
148 
149  updateGuiElements();
150 
151  return true;
152 }
153 
154 void QgsLayoutManualTableWidget::setTableContents()
155 {
156  if ( !mTable )
157  {
158  return;
159  }
160 
161  if ( mEditorDialog )
162  {
163  // the unholy quadfecta
164  mEditorDialog->show();
165  mEditorDialog->raise();
166  mEditorDialog->setWindowState( windowState() & ~Qt::WindowMinimized );
167  mEditorDialog->activateWindow();
168  }
169  else
170  {
171  mEditorDialog = new QgsTableEditorDialog( this );
172  connect( this, &QWidget::destroyed, mEditorDialog, &QMainWindow::close );
173 
174  mEditorDialog->setIncludeTableHeader( mTable->includeTableHeader() );
175  mEditorDialog->setTableContents( mTable->tableContents() );
176 
177  int row = 0;
178  const QList< double > rowHeights = mTable->rowHeights();
179  for ( double height : rowHeights )
180  {
181  mEditorDialog->setTableRowHeight( row, height );
182  row++;
183  }
184  int col = 0;
185  const QList< double > columnWidths = mTable->columnWidths();
186  QVariantList headers;
187  headers.reserve( columnWidths.size() );
188  for ( double width : columnWidths )
189  {
190  mEditorDialog->setTableColumnWidth( col, width );
191  headers << mTable->headers().value( col )->heading();
192  col++;
193  }
194  mEditorDialog->setTableHeaders( headers );
195 
196  connect( mEditorDialog, &QgsTableEditorDialog::tableChanged, this, [ = ]
197  {
198  if ( mTable )
199  {
200  mTable->beginCommand( tr( "Change Table Contents" ) );
201  mTable->setTableContents( mEditorDialog->tableContents() );
202 
203  const QVariantList headerText = mEditorDialog->tableHeaders();
204  if ( mEditorDialog->includeTableHeader() )
205  {
206  QgsLayoutTableColumns headers;
207  for ( const QVariant &h : headerText )
208  {
209  headers << new QgsLayoutTableColumn( h.toString() );
210  }
211  mTable->setHeaders( headers );
212  }
213 
214  const int rowCount = mTable->tableContents().size();
215  QList< double > rowHeights;
216  rowHeights.reserve( rowCount );
217  for ( int row = 0; row < rowCount; ++row )
218  {
219  rowHeights << mEditorDialog->tableRowHeight( row );
220  }
221  mTable->setRowHeights( rowHeights );
222 
223  if ( !mTable->tableContents().empty() )
224  {
225  const int columnCount = mTable->tableContents().at( 0 ).size();
226  QList< double > columnWidths;
227  columnWidths.reserve( columnCount );
228  for ( int col = 0; col < columnCount; ++col )
229  {
230  columnWidths << mEditorDialog->tableColumnWidth( col );
231  }
232  mTable->setColumnWidths( columnWidths );
233  }
234 
235  mTable->endCommand();
236  }
237  } );
238 
239  connect( mEditorDialog, &QgsTableEditorDialog::includeHeaderChanged, this, [ = ]( bool included )
240  {
241  if ( mTable )
242  {
243  mTable->beginCommand( tr( "Change Table Header" ) );
244  mTable->setIncludeTableHeader( included );
245  mTable->endCommand();
246  }
247  } );
248  mEditorDialog->show();
249  }
250 }
251 
252 void QgsLayoutManualTableWidget::mMarginSpinBox_valueChanged( double d )
253 {
254  if ( !mTable )
255  {
256  return;
257  }
258 
259  mTable->beginCommand( tr( "Change Table Margin" ), QgsLayoutMultiFrame::UndoTableMargin );
260  mTable->setCellMargin( d );
261  mTable->endCommand();
262 }
263 
264 void QgsLayoutManualTableWidget::contentFontChanged()
265 {
266  if ( !mTable )
267  {
268  return;
269  }
270 
271  mTable->beginCommand( tr( "Change Table Font" ) );
272  mTable->setContentFont( mContentFontToolButton->currentFont() );
273  mTable->endCommand();
274 }
275 
276 void QgsLayoutManualTableWidget::mContentFontColorButton_colorChanged( const QColor &newColor )
277 {
278  if ( !mTable )
279  {
280  return;
281  }
282 
283  mTable->beginCommand( tr( "Change Font Color" ), QgsLayoutMultiFrame::UndoTableContentFontColor );
284  mTable->setContentFontColor( newColor );
285  mTable->endCommand();
286 }
287 
288 void QgsLayoutManualTableWidget::mHeaderFontColorButton_colorChanged( const QColor &newColor )
289 {
290  if ( !mTable )
291  {
292  return;
293  }
294 
295  mTable->beginCommand( tr( "Change Font Color" ), QgsLayoutMultiFrame::UndoTableHeaderFontColor );
296  mTable->setHeaderFontColor( newColor );
297  mTable->endCommand();
298 }
299 
300 void QgsLayoutManualTableWidget::mGridStrokeWidthSpinBox_valueChanged( double d )
301 {
302  if ( !mTable )
303  {
304  return;
305  }
306 
307  mTable->beginCommand( tr( "Change Table Line Width" ), QgsLayoutMultiFrame::UndoTableGridStrokeWidth );
308  mTable->setGridStrokeWidth( d );
309  mTable->endCommand();
310 }
311 
312 void QgsLayoutManualTableWidget::mGridColorButton_colorChanged( const QColor &newColor )
313 {
314  if ( !mTable )
315  {
316  return;
317  }
318 
319  mTable->beginCommand( tr( "Change Table Grid Color" ), QgsLayoutMultiFrame::UndoTableGridColor );
320  mTable->setGridColor( newColor );
321  mTable->endCommand();
322 }
323 
324 void QgsLayoutManualTableWidget::mDrawHorizontalGrid_toggled( bool state )
325 {
326  if ( !mTable )
327  {
328  return;
329  }
330 
331  mTable->beginCommand( tr( "Toggle Table Grid" ) );
332  mTable->setHorizontalGrid( state );
333  mTable->endCommand();
334 }
335 
336 void QgsLayoutManualTableWidget::mDrawVerticalGrid_toggled( bool state )
337 {
338  if ( !mTable )
339  {
340  return;
341  }
342 
343  mTable->beginCommand( tr( "Toggled Table Grid" ) );
344  mTable->setVerticalGrid( state );
345  mTable->endCommand();
346 }
347 
348 void QgsLayoutManualTableWidget::mShowGridGroupCheckBox_toggled( bool state )
349 {
350  if ( !mTable )
351  {
352  return;
353  }
354 
355  mTable->beginCommand( tr( "Toggle Table Grid" ) );
356  mTable->setShowGrid( state );
357  mTable->endCommand();
358 }
359 
360 void QgsLayoutManualTableWidget::mHeaderHAlignmentComboBox_currentIndexChanged( int )
361 {
362  if ( !mTable )
363  {
364  return;
365  }
366 
367  mTable->beginCommand( tr( "Change Table Alignment" ) );
368  mTable->setHeaderHAlignment( static_cast< QgsLayoutTable::HeaderHAlignment >( mHeaderHAlignmentComboBox->currentData().toInt() ) );
369  mTable->endCommand();
370 }
371 
372 void QgsLayoutManualTableWidget::mHeaderModeComboBox_currentIndexChanged( int )
373 {
374  if ( !mTable )
375  {
376  return;
377  }
378 
379  mTable->beginCommand( tr( "Change Table Header Mode" ) );
380  mTable->setHeaderMode( static_cast< QgsLayoutTable::HeaderMode >( mHeaderModeComboBox->currentData().toInt() ) );
381  mTable->endCommand();
382 }
383 
384 void QgsLayoutManualTableWidget::mBackgroundColorButton_colorChanged( const QColor &newColor )
385 {
386  if ( !mTable )
387  {
388  return;
389  }
390 
391  mTable->beginCommand( tr( "Change Table Color" ), QgsLayoutMultiFrame::UndoTableBackgroundColor );
392  mTable->setBackgroundColor( newColor );
393  mTable->endCommand();
394 }
395 
396 void QgsLayoutManualTableWidget::headerFontChanged()
397 {
398  if ( !mTable )
399  return;
400 
401  mTable->beginCommand( tr( "Change Table Font" ) );
402  mTable->setHeaderFont( mHeaderFontToolButton->currentFont() );
403  mTable->endCommand();
404 }
405 
406 void QgsLayoutManualTableWidget::updateGuiElements()
407 {
408  if ( !mTable || !mFrame )
409  {
410  return;
411  }
412 
413  blockAllSignals( true );
414 
415  mMarginSpinBox->setValue( mTable->cellMargin() );
416  mGridStrokeWidthSpinBox->setValue( mTable->gridStrokeWidth() );
417  mGridColorButton->setColor( mTable->gridColor() );
418  mDrawHorizontalGrid->setChecked( mTable->horizontalGrid() );
419  mDrawVerticalGrid->setChecked( mTable->verticalGrid() );
420  if ( mTable->showGrid() )
421  {
422  mShowGridGroupCheckBox->setChecked( true );
423  }
424  else
425  {
426  mShowGridGroupCheckBox->setChecked( false );
427  }
428  mBackgroundColorButton->setColor( mTable->backgroundColor() );
429 
430  mHeaderFontColorButton->setColor( mTable->headerFontColor() );
431  mContentFontColorButton->setColor( mTable->contentFontColor() );
432  mHeaderFontToolButton->setCurrentFont( mTable->headerFont() );
433  mContentFontToolButton->setCurrentFont( mTable->contentFont() );
434 
435  mDrawEmptyCheckBox->setChecked( mTable->showEmptyRows() );
436  mWrapBehaviorComboBox->setCurrentIndex( mWrapBehaviorComboBox->findData( mTable->wrapBehavior() ) );
437 
438  mResizeModeComboBox->setCurrentIndex( mResizeModeComboBox->findData( mTable->resizeMode() ) );
439  mAddFramePushButton->setEnabled( mTable->resizeMode() == QgsLayoutMultiFrame::UseExistingFrames );
440 
441  mHeaderHAlignmentComboBox->setCurrentIndex( mHeaderHAlignmentComboBox->findData( mTable->headerHAlignment() ) );
442  mHeaderModeComboBox->setCurrentIndex( mHeaderModeComboBox->findData( mTable->headerMode() ) );
443 
444  mEmptyFrameCheckBox->setChecked( mFrame->hidePageIfEmpty() );
445  mHideEmptyBgCheckBox->setChecked( mFrame->hideBackgroundIfEmpty() );
446 
447  blockAllSignals( false );
448 }
449 
450 void QgsLayoutManualTableWidget::blockAllSignals( bool b )
451 {
452  mMarginSpinBox->blockSignals( b );
453  mGridColorButton->blockSignals( b );
454  mGridStrokeWidthSpinBox->blockSignals( b );
455  mBackgroundColorButton->blockSignals( b );
456  mDrawHorizontalGrid->blockSignals( b );
457  mDrawVerticalGrid->blockSignals( b );
458  mShowGridGroupCheckBox->blockSignals( b );
459  mContentFontColorButton->blockSignals( b );
460  mHeaderFontColorButton->blockSignals( b );
461  mResizeModeComboBox->blockSignals( b );
462  mEmptyFrameCheckBox->blockSignals( b );
463  mHideEmptyBgCheckBox->blockSignals( b );
464  mDrawEmptyCheckBox->blockSignals( b );
465  mWrapBehaviorComboBox->blockSignals( b );
466  mContentFontToolButton->blockSignals( b );
467  mHeaderHAlignmentComboBox->blockSignals( b );
468  mHeaderModeComboBox->blockSignals( b );
469  mHeaderFontToolButton->blockSignals( b );
470 }
471 
472 void QgsLayoutManualTableWidget::mEmptyFrameCheckBox_toggled( bool checked )
473 {
474  if ( !mFrame )
475  {
476  return;
477  }
478 
479  mFrame->beginCommand( tr( "Toggle Empty Frame Mode" ) );
480  mFrame->setHidePageIfEmpty( checked );
481  mFrame->endCommand();
482 }
483 
484 void QgsLayoutManualTableWidget::mHideEmptyBgCheckBox_toggled( bool checked )
485 {
486  if ( !mFrame )
487  {
488  return;
489  }
490 
491  mFrame->beginCommand( tr( "Toggle Background Display" ) );
492  mFrame->setHideBackgroundIfEmpty( checked );
493  mFrame->endCommand();
494 }
495 
496 void QgsLayoutManualTableWidget::mAddFramePushButton_clicked()
497 {
498  if ( !mTable || !mFrame )
499  {
500  return;
501  }
502 
503  //create a new frame based on the current frame
504  QPointF pos = mFrame->pos();
505  //shift new frame so that it sits 10 units below current frame
506  pos.ry() += mFrame->rect().height() + 10;
507 
508  QgsLayoutFrame *newFrame = mTable->createNewFrame( mFrame, pos, mFrame->rect().size() );
509  mTable->recalculateFrameSizes();
510 
511  //set new frame as selection
512  if ( QgsLayout *layout = mTable->layout() )
513  {
514  layout->setSelectedItem( newFrame );
515  }
516 }
517 
518 void QgsLayoutManualTableWidget::mResizeModeComboBox_currentIndexChanged( int index )
519 {
520  if ( !mTable )
521  {
522  return;
523  }
524 
525  mTable->beginCommand( tr( "Change Resize Mode" ) );
526  mTable->setResizeMode( static_cast< QgsLayoutMultiFrame::ResizeMode >( mResizeModeComboBox->itemData( index ).toInt() ) );
527  mTable->endCommand();
528 
529  mAddFramePushButton->setEnabled( mTable->resizeMode() == QgsLayoutMultiFrame::UseExistingFrames );
530 }
531 
532 void QgsLayoutManualTableWidget::mWrapBehaviorComboBox_currentIndexChanged( int index )
533 {
534  if ( !mTable )
535  {
536  return;
537  }
538 
539  mTable->beginCommand( tr( "Change Table Wrap Mode" ) );
540  mTable->setWrapBehavior( static_cast< QgsLayoutTable::WrapBehavior >( mWrapBehaviorComboBox->itemData( index ).toInt() ) );
541  mTable->endCommand();
542 }
543 
544 void QgsLayoutManualTableWidget::mAdvancedCustomizationButton_clicked()
545 {
546  if ( !mTable )
547  {
548  return;
549  }
550 
551  QgsLayoutTableBackgroundColorsDialog d( mTable, this );
552 
553  d.exec();
554 }
555 
556 void QgsLayoutManualTableWidget::mDrawEmptyCheckBox_toggled( bool checked )
557 {
558  if ( !mTable )
559  {
560  return;
561  }
562 
563  mTable->beginCommand( tr( "Change Show Empty Rows" ) );
564  mTable->setShowEmptyRows( checked );
565  mTable->endCommand();
566 }
567 
Base class for graphical items within a QgsLayout.
Header uses the same alignment as the column.
Don&#39;t automatically create new frames, just use existing frames.
QVector< QgsLayoutTableColumn *> QgsLayoutTableColumns
List of column definitions for a QgsLayoutTable.
A widget for controlling the common properties of layout items (e.g.
Text which doesn&#39;t fit inside the cell is truncated.
Text which doesn&#39;t fit inside the cell is wrapped. Note that this only applies to text in columns wit...
Creates new full page frames on the following page(s) until the entire multiframe content is visible...
A dialog for customization of the cell background colors for a QgsLayoutTable.
Stores properties of a column for a QgsLayoutTable.
Abstract base class for layout items with the ability to distribute the content to several frames (Qg...
No headers shown for table.
Align headers right.
void setMasterLayout(QgsMasterLayoutInterface *masterLayout) override
Sets the master layout associated with the item.
QgsLayoutMultiFrame * multiFrame() const
Returns the parent multiframe for the frame.
void changed()
Emitted when the widget&#39;s text format settings are changed.
Header shown on first frame only.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Definition: qgslayout.h:49
Align headers left.
void colorChanged(const QColor &color)
Emitted whenever a new color is set for the button.
A base class for property widgets for layout items.
virtual int type() const =0
Returns unique multiframe type id.
Headers shown on all frames.
bool setNewItem(QgsLayoutItem *item) override
Attempts to update the widget to show the properties for the specified item.
void setItem(QgsLayoutItem *item)
Sets the layout item.
Configure font settings for use with QFont objects.
Definition: qgsfontbutton.h:59
A layout table subclass that displays manually entered (and formatted) content.
QgsLayoutManualTableWidget(QgsLayoutFrame *frame)
constructor
Interface for master layout type objects, such as print layouts and reports.
Align headers to center.
void changed()
Emitted when the object&#39;s properties change.
Base class for frame items, which form a layout multiframe item.
void setPanelTitle(const QString &panelTitle)
Set the title of the panel when shown in the interface.
void setMasterLayout(QgsMasterLayoutInterface *masterLayout)
Sets the master layout associated with the item.