Commit 08c74f69 authored by Geoffroy Lacarriere's avatar Geoffroy Lacarriere
Browse files

Hide the tagWidget buttons

parent 688a93d9
......@@ -33,23 +33,23 @@ TagWidget::TagWidget( QWidget *parent, int nbButton, QStringList tagList ) :
m_ui->setupUi( this );
m_defaultTagList << "OutDoor" << "Hollidays" << "Seaside" << "Sunset" << "Familly";
int nbRow = sqrt( nbButton );
int x = 0;
int y = 0;
for( int i = 0; i < nbButton; i++ )
{
if ( x == nbRow )
{
x = 0;
y++;
}
QPushButton* button = new QPushButton();
button->setCheckable( true );
connect( button, SIGNAL( clicked() ), this, SLOT( buttonTagClicked() ) );
m_buttonList.append( button );
m_ui->buttonGridLayout->addWidget( button, x++, y );
}
// int nbRow = sqrt( nbButton );
// int x = 0;
// int y = 0;
//
// for( int i = 0; i < nbButton; i++ )
// {
// if ( x == nbRow )
// {
// x = 0;
// y++;
// }
// QPushButton* button = new QPushButton();
// button->setCheckable( true );
// connect( button, SIGNAL( clicked() ), this, SLOT( buttonTagClicked() ) );
// m_buttonList.append( button );
// m_ui->buttonGridLayout->addWidget( button, x++, y );
// }
for( int i = 0; i < m_defaultTagList.count(); i++ )
if ( i < m_buttonList.count() )
......
......@@ -49,26 +49,6 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="KeywordSetLabel">
<property name="text">
<string>Keyword Set</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="KeywordSetComboBox"/>
</item>
<item row="3" column="0" colspan="2">
<layout class="QGridLayout" name="buttonGridLayout" rowstretch="0">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<property name="spacing">
<number>6</number>
</property>
</layout>
</item>
</layout>
</widget>
<resources/>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment