Allow TextureChooser's texture selection to be queried.

--HG--
branch : gsoc2014-dfighter
hg/feature/cdb-packed
dfighter1985 11 years ago
parent fe58435bb5
commit 396a3c2db2

@ -33,6 +33,25 @@ void TextureChooser::load()
listWidget->addItem( itr->c_str() );
++itr;
}
listWidget->setCurrentRow( 0 );
}
void TextureChooser::accept()
{
QListWidgetItem *item = listWidget->currentItem();
if( item == NULL )
return;
selection = item->text();
QDialog::accept();
}
void TextureChooser::reject()
{
selection = "";
QDialog::reject();
}
void TextureChooser::onCurrentRowChanged( int row )

@ -12,12 +12,19 @@ public:
~TextureChooser();
void load();
QString getSelection(){ return selection; }
public Q_SLOTS:
void accept();
void reject();
private Q_SLOTS:
void onCurrentRowChanged( int row );
private:
void setupConnections();
QString selection;
};
#endif

Loading…
Cancel
Save