2021-06-28 23:47:20 +02:00
|
|
|
#include "projectioncombobox.h"
|
|
|
|
|
2023-04-13 08:39:33 +02:00
|
|
|
ProjectionComboBox::ProjectionComboBox(const QList<KV<int, QString> > &list,
|
|
|
|
QWidget *parent) : QComboBox(parent)
|
2021-06-28 23:47:20 +02:00
|
|
|
{
|
|
|
|
setSizeAdjustPolicy(AdjustToMinimumContentsLengthWithIcon);
|
|
|
|
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
|
|
|
|
|
2023-04-13 08:39:33 +02:00
|
|
|
for (int i = 0; i < list.size(); i++) {
|
2023-04-13 23:51:25 +02:00
|
|
|
const KV<int, QString> &proj = list.at(i);
|
2021-06-28 23:47:20 +02:00
|
|
|
QString text = QString::number(proj.key()) + " - " + proj.value();
|
|
|
|
addItem(text, QVariant(proj.key()));
|
|
|
|
}
|
|
|
|
}
|