mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-21 21:20:07 -05:00
--User changes
-Add dimensions to new width/height context menu.
This commit is contained in:
parent
359372dca8
commit
f93c309b60
@ -148,13 +148,15 @@ void Fractorium::InitParamsUI()
|
|||||||
/// <param name="h">The height of the preset</param>
|
/// <param name="h">The height of the preset</param>
|
||||||
void Fractorium::AddSizePreset(QString name, int w, int h)
|
void Fractorium::AddSizePreset(QString name, int w, int h)
|
||||||
{
|
{
|
||||||
auto widthAction = new QAction(name, m_WidthSpin);
|
QString caption;
|
||||||
|
QTextStream(&caption) << name << " (" << ToString<int>(w) << " x " << ToString<int>(h) << ")";
|
||||||
|
auto widthAction = new QAction(caption, m_WidthSpin);
|
||||||
connect(widthAction, SIGNAL(triggered(bool)), this, SLOT(PresetWidthActionTriggered(bool)), Qt::QueuedConnection);
|
connect(widthAction, SIGNAL(triggered(bool)), this, SLOT(PresetWidthActionTriggered(bool)), Qt::QueuedConnection);
|
||||||
m_WidthSpin->addAction(widthAction);
|
m_WidthSpin->addAction(widthAction);
|
||||||
auto heightAction = new QAction(name, m_HeightSpin);
|
auto heightAction = new QAction(caption, m_HeightSpin);
|
||||||
connect(heightAction, SIGNAL(triggered(bool)), this, SLOT(PresetHeightActionTriggered(bool)), Qt::QueuedConnection);
|
connect(heightAction, SIGNAL(triggered(bool)), this, SLOT(PresetHeightActionTriggered(bool)), Qt::QueuedConnection);
|
||||||
m_HeightSpin->addAction(heightAction);
|
m_HeightSpin->addAction(heightAction);
|
||||||
m_HeightPresets[name] = std::pair<int, int>(w, h);
|
m_HeightPresets[caption] = std::pair<int, int>(w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user