mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-14 03:09:04 +00:00
Allow TextureChooser's texture selection to be queried.
This commit is contained in:
parent
2277dbb92b
commit
ba43964ca3
2 changed files with 26 additions and 0 deletions
|
@ -33,6 +33,25 @@ void TextureChooser::load()
|
||||||
listWidget->addItem( itr->c_str() );
|
listWidget->addItem( itr->c_str() );
|
||||||
++itr;
|
++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 )
|
void TextureChooser::onCurrentRowChanged( int row )
|
||||||
|
|
|
@ -12,12 +12,19 @@ public:
|
||||||
~TextureChooser();
|
~TextureChooser();
|
||||||
|
|
||||||
void load();
|
void load();
|
||||||
|
QString getSelection(){ return selection; }
|
||||||
|
|
||||||
|
public Q_SLOTS:
|
||||||
|
void accept();
|
||||||
|
void reject();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void onCurrentRowChanged( int row );
|
void onCurrentRowChanged( int row );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setupConnections();
|
void setupConnections();
|
||||||
|
|
||||||
|
QString selection;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue