khanat-opennel-code/code/nel/tools/3d/tile_edit_qt/tile_rotation_dlg.cpp
2010-05-06 02:08:41 +02:00

25 lines
No EOL
828 B
C++

#include "tile_rotation_dlg.h"
CTile_rotation_dlg::CTile_rotation_dlg(QWidget *parent, Qt::WindowFlags flags)
: QDialog(parent, flags)
{
ui.setupUi(this);
rotationButtonGroup = new QButtonGroup;
rotationButtonGroup->addButton(ui._0PushButton, CTile_rotation_dlg::_0Rotation);
rotationButtonGroup->addButton(ui._90PushButton, CTile_rotation_dlg::_90Rotation);
rotationButtonGroup->addButton(ui._180PushButton, CTile_rotation_dlg::_180Rotation);
rotationButtonGroup->addButton(ui._270PushButton, CTile_rotation_dlg::_270Rotation);
}
int CTile_rotation_dlg::getRotation(QWidget *parent, bool *ok, Qt::WindowFlags f)
{
CTile_rotation_dlg dlg(parent, f);
bool accepted = (dlg.exec() == QDialog::Accepted);
if (ok)
*ok = accepted;
return dlg.getCheckedRotation();
}