Add ControllerWidget::insertAfterTab() to put a new tab where we want.

This commit is contained in:
Jean-Paul Chaput 2023-03-26 21:12:14 +02:00
parent 50a9036d28
commit 7ed41613de
2 changed files with 14 additions and 0 deletions

View File

@ -658,6 +658,19 @@ namespace Hurricane {
}
void ControllerWidget::insertTabAfter ( const QString& ref, QWidget* tab, const QString& label )
{
for ( int itab=0 ; true; ++itab ) {
QWidget* refTab = widget( itab );
if (not refTab) break;
if (refTab->objectName() != ref) continue;
insertTab( itab, tab, label );
return;
}
addTab( tab, label );
}
// -------------------------------------------------------------------
// Class : "ControllerWidget::GraphicsObserver".

View File

@ -312,6 +312,7 @@ namespace Hurricane {
inline TabSettings* getSettings ();
void setCellWidget ( CellWidget* );
//inline int addSetting ( QWidget* page, const QString& label );
void insertTabAfter ( const QString& ref, QWidget*, const QString& label );
public slots:
void graphicsUpdated ();
void cellPreModificate ();