QGIS API Documentation  3.14.0-Pi (9f7028fd23)
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 << ( col < mTable->headers().count() ? mTable->headers().value( col ).heading() : QVariant() );
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 << 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 
QgsLayoutTable::HeaderHAlignment
HeaderHAlignment
Controls how headers are horizontally aligned in a table.
Definition: qgslayouttable.h:120
QgsLayoutManualTableWidget::setMasterLayout
void setMasterLayout(QgsMasterLayoutInterface *masterLayout) override
Sets the master layout associated with the item.
Definition: qgslayoutmanualtablewidget.cpp:112
QgsLayoutMultiFrame::RepeatUntilFinished
@ RepeatUntilFinished
Definition: qgslayoutmultiframe.h:106
QgsLayoutMultiFrame
Definition: qgslayoutmultiframe.h:48
QgsLayoutObject::changed
void changed()
Emitted when the object's properties change.
QgsLayoutMultiFrame::UndoTableHeaderFontColor
@ UndoTableHeaderFontColor
Table header font color.
Definition: qgslayoutmultiframe.h:119
QgsLayoutItemPropertiesWidget
Definition: qgslayoutitemwidget.h:218
QgsLayoutManualTableWidget::QgsLayoutManualTableWidget
QgsLayoutManualTableWidget(QgsLayoutFrame *frame)
constructor
Definition: qgslayoutmanualtablewidget.cpp:28
QgsColorButton::colorChanged
void colorChanged(const QColor &color)
Emitted whenever a new color is set for the button.
QgsLayoutMultiFrame::ExtendToNextPage
@ ExtendToNextPage
Creates new full page frames on the following page(s) until the entire multiframe content is visible.
Definition: qgslayoutmultiframe.h:104
QgsLayoutItemPropertiesWidget::setMasterLayout
void setMasterLayout(QgsMasterLayoutInterface *masterLayout)
Sets the master layout associated with the item.
Definition: qgslayoutitemwidget.cpp:381
qgslayoutframe.h
qgslayoutitemwidget.h
QgsLayoutTable::FirstFrame
@ FirstFrame
Header shown on first frame only.
Definition: qgslayouttable.h:133
QgsLayoutMultiFrame::type
virtual int type() const =0
Returns unique multiframe type id.
qgslayouttablebackgroundcolorsdialog.h
QgsLayoutMultiFrame::UndoTableGridColor
@ UndoTableGridColor
Table grid color.
Definition: qgslayoutmultiframe.h:122
QgsLayoutTable::WrapText
@ WrapText
Text which doesn't fit inside the cell is wrapped. Note that this only applies to text in columns wit...
Definition: qgslayouttable.h:154
QgsLayoutFrame
Definition: qgslayoutframe.h:31
QgsLayoutTableBackgroundColorsDialog
Definition: qgslayouttablebackgroundcolorsdialog.h:39
QgsLayoutTable::TruncateText
@ TruncateText
Text which doesn't fit inside the cell is truncated.
Definition: qgslayouttable.h:153
QgsLayoutManualTableWidget::setNewItem
bool setNewItem(QgsLayoutItem *item) override
Attempts to update the widget to show the properties for the specified item.
Definition: qgslayoutmanualtablewidget.cpp:118
QgsLayoutMultiFrame::ResizeMode
ResizeMode
Specifies the behavior for creating new frames to fit the multiframe's content.
Definition: qgslayoutmultiframe.h:101
QgsLayoutTable::NoHeaders
@ NoHeaders
No headers shown for table.
Definition: qgslayouttable.h:135
QgsLayoutMultiFrame::UndoTableContentFontColor
@ UndoTableContentFontColor
Table content font color.
Definition: qgslayoutmultiframe.h:120
QgsLayoutMultiFrame::UndoTableBackgroundColor
@ UndoTableBackgroundColor
Table background color.
Definition: qgslayoutmultiframe.h:123
QgsLayoutTable::HeaderRight
@ HeaderRight
Align headers right.
Definition: qgslayouttable.h:125
QgsLayoutTable::HeaderMode
HeaderMode
Controls where headers are shown in the table.
Definition: qgslayouttable.h:131
QgsLayoutItem
Base class for graphical items within a QgsLayout.
Definition: qgslayoutitem.h:112
QgsLayoutTable::WrapBehavior
WrapBehavior
Controls how long strings in the table are handled.
Definition: qgslayouttable.h:151
QgsPanelWidget::setPanelTitle
void setPanelTitle(const QString &panelTitle)
Set the title of the panel when shown in the interface.
Definition: qgspanelwidget.h:44
qgslayout.h
QgsLayoutItemBaseWidget
Definition: qgslayoutitemwidget.h:122
QgsLayoutTable::HeaderCenter
@ HeaderCenter
Align headers to center.
Definition: qgslayouttable.h:124
qgslayoutitemmanualtable.h
QgsFontButton::ModeQFont
@ ModeQFont
Configure font settings for use with QFont objects.
Definition: qgsfontbutton.h:59
qgslayoutmanualtablewidget.h
QgsLayout
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Definition: qgslayout.h:49
qgslayouttablecolumn.h
QgsLayoutTable::FollowColumn
@ FollowColumn
Header uses the same alignment as the column.
Definition: qgslayouttable.h:122
QgsMasterLayoutInterface
Interface for master layout type objects, such as print layouts and reports.
Definition: qgsmasterlayoutinterface.h:42
qgsguiutils.h
QgsLayoutItemPropertiesWidget::setItem
void setItem(QgsLayoutItem *item)
Sets the layout item.
Definition: qgslayoutitemwidget.cpp:362
QgsLayoutTable::HeaderLeft
@ HeaderLeft
Align headers left.
Definition: qgslayouttable.h:123
QgsLayoutItemRegistry::LayoutManualTable
@ LayoutManualTable
Manual (fixed) table.
Definition: qgslayoutitemregistry.h:338
QgsLayoutTable::AllFrames
@ AllFrames
Headers shown on all frames.
Definition: qgslayouttable.h:134
QgsLayoutMultiFrame::UndoTableGridStrokeWidth
@ UndoTableGridStrokeWidth
Table grid stroke width.
Definition: qgslayoutmultiframe.h:121
QgsLayoutMultiFrame::UndoTableMargin
@ UndoTableMargin
Table margins.
Definition: qgslayoutmultiframe.h:118
QgsLayoutItemManualTable
Definition: qgslayoutitemmanualtable.h:31
QgsLayoutFrame::multiFrame
QgsLayoutMultiFrame * multiFrame() const
Returns the parent multiframe for the frame.
Definition: qgslayoutframe.cpp:49
QgsLayoutMultiFrame::UseExistingFrames
@ UseExistingFrames
Don't automatically create new frames, just use existing frames.
Definition: qgslayoutmultiframe.h:103
qgslayoutatlas.h
QgsFontButton::changed
void changed()
Emitted when the widget's text format settings are changed.