22 , mSetTabVisibleFlag( false )
32 mSetTabVisibleFlag =
true;
35 mSetTabVisibleFlag =
false;
45 mSetTabVisibleFlag =
true;
46 insertTab( info.sourceIndex + 1, info.widget, info.label );
48 mSetTabVisibleFlag =
false;
63 Q_FOREACH (
const TabInformation& info, mTabs )
65 if ( info.widget == widget )
74 if ( !mSetTabVisibleFlag )
80 mTabs.
insert( 0, TabInformation( newWidget,
tabText( index ) ) );
84 bool inserted =
false;
87 for ( it = mTabs.
begin(); it != mTabs.
end(); ++it )
89 if ( it->sourceIndex == index )
91 mTabs.
insert( it, TabInformation( newWidget,
tabText( index ) ) );
99 mTabs.
append( TabInformation( newWidget,
tabText( index ) ) );
104 synchronizeIndexes();
109 if ( !mSetTabVisibleFlag )
113 for ( it = mTabs.
begin(); it != mTabs.
end(); ++it )
115 if ( it->sourceIndex == index )
123 synchronizeIndexes();
126 void QgsTabWidget::synchronizeIndexes()
134 for ( it = mTabs.
begin(); it != mTabs.
end(); ++it )
136 if ( it->widget == nextWidget )
139 nextWidget =
widget( i + 1 );
146 QgsTabWidget::TabInformation QgsTabWidget::tabInfo(
QWidget*
widget )
148 Q_FOREACH (
const TabInformation& info, mTabs )
150 if ( info.widget == widget )
153 return TabInformation();
158 return other.widget == widget && other.sourceIndex == sourceIndex;
QString tabText(int index) const
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
void append(const T &value)
void insert(int i, const T &value)
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
bool removeOne(const T &value)