Implemented recalculating of story points
This commit is contained in:
1 parent
5e204fd74d
commit
ec528901b5
6 files changed
+153
-59
No files matched your search
+38
-4
@@ -1,6 +1,9 @@
|
||||
#include "stripwidget.h"
|
||||
#include "ui_stripwidget.h"
|
||||
|
||||
#include <QGraphicsDropShadowEffect>
|
||||
#include <QGraphicsOpacityEffect>
|
||||
|
||||
StripWidget::StripWidget(QWidget *parent) :
|
||||
QFrame{parent},
|
||||
m_ui{std::make_unique<Ui::StripWidget>()}
|
||||
@@ -12,6 +15,27 @@ StripWidget::StripWidget(QWidget *parent) :
|
||||
setFixedSize(size());
|
||||
}
|
||||
|
||||
StripWidget::StripWidget(StripWidget::Story_t, QWidget *parent) :
|
||||
StripWidget{parent}
|
||||
{
|
||||
m_ui->points->setReadOnly(true);
|
||||
m_ui->points->setMaximum(9999);
|
||||
|
||||
setStyleSheet("StripWidget { background-color: #AFA; }");
|
||||
}
|
||||
|
||||
StripWidget::StripWidget(StripWidget::Subtask_t, QWidget *parent) :
|
||||
StripWidget{parent}
|
||||
{
|
||||
setStyleSheet("StripWidget { background-color: #FCC; }");
|
||||
}
|
||||
|
||||
StripWidget::StripWidget(StripWidget::DraggedSubtask_t, QWidget *parent) :
|
||||
StripWidget{Subtask, parent}
|
||||
{
|
||||
setGraphicsEffect(new QGraphicsDropShadowEffect);
|
||||
}
|
||||
|
||||
StripWidget::~StripWidget() = default;
|
||||
|
||||
bool StripWidget::startDragging(const QPoint &pos) const
|
||||
@@ -41,20 +65,30 @@ void StripWidget::setDescription(const QString &description)
|
||||
|
||||
int StripWidget::points() const
|
||||
{
|
||||
return m_ui->points->text().toInt();
|
||||
return m_ui->points->value();
|
||||
}
|
||||
|
||||
void StripWidget::setPoints(int points)
|
||||
{
|
||||
m_ui->points->setText(QString::number(points));
|
||||
m_ui->points->setValue(points);
|
||||
}
|
||||
|
||||
QString StripWidget::owner() const
|
||||
{
|
||||
return m_ui->owner->text();
|
||||
return m_ui->owner->currentText();
|
||||
}
|
||||
|
||||
void StripWidget::setOwner(const QString &owner)
|
||||
{
|
||||
m_ui->owner->setText(owner);
|
||||
m_ui->owner->setCurrentIndex(m_ui->owner->findText(owner));
|
||||
}
|
||||
|
||||
void StripWidget::beginDrag()
|
||||
{
|
||||
setGraphicsEffect(new QGraphicsOpacityEffect);
|
||||
}
|
||||
|
||||
void StripWidget::endDrag()
|
||||
{
|
||||
setGraphicsEffect(nullptr);
|
||||
}
|
||||
Reference in new issue
Block a user