mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
feat:draft version change
This commit is contained in:
@@ -45,13 +45,21 @@ void VersionSelectWidget::on_verListView_itemDoubleClicked(QListWidgetItem *item
|
||||
if(data->getViewName() == item->text())
|
||||
{
|
||||
QString info = "Имя версии: " + data->getViewName() + "\n";
|
||||
info.append("Создан: " + data->getCreateData().toString());
|
||||
info.append("Создан: " + data->getCreateData().toString() + "\n");
|
||||
info.append("Изменяемый: " + changableText(data->getIsChangeable()) + "\n");
|
||||
info.append("Автор: " + data->getAuthor());
|
||||
ui->infoValue->setText(info);
|
||||
selectedVersion = data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QString VersionSelectWidget::changableText(bool flag)
|
||||
{
|
||||
if(flag) return tr("Да");
|
||||
else return tr("Нет");
|
||||
}
|
||||
|
||||
|
||||
void VersionSelectWidget::on_createDuplicateButton_clicked()
|
||||
{
|
||||
@@ -62,7 +70,7 @@ void VersionSelectWidget::on_createDuplicateButton_clicked()
|
||||
|
||||
void VersionSelectWidget::sendCopyEmit(QString newName)
|
||||
{
|
||||
QString result = selectedVersion->getViewName() + ";" + newName;
|
||||
QString result = selectedVersion->getViewName() + ";" + newName + ";" + authorName;
|
||||
|
||||
if (selectedVersion == nullptr)
|
||||
{
|
||||
@@ -98,7 +106,10 @@ void VersionSelectWidget::on_switchServerVersionButton_clicked()
|
||||
emit sigSendSwitchVersion(selectedVersion);
|
||||
}
|
||||
|
||||
|
||||
void VersionSelectWidget::setAuthor(QString name)
|
||||
{
|
||||
authorName = name;
|
||||
}
|
||||
|
||||
VersionSelectWidget::~VersionSelectWidget()
|
||||
{
|
||||
|
||||
@@ -24,6 +24,7 @@ public:
|
||||
void initialize(SendSystem *sendSystem,VersionContainer *versionContainer,NotifyController *notifyController);
|
||||
void fillView(QList<StreamingVersionData*> *serverData);
|
||||
void sendCopyEmit(QString newName);
|
||||
void setAuthor(QString name);
|
||||
|
||||
~VersionSelectWidget();
|
||||
private slots:
|
||||
@@ -45,6 +46,9 @@ private:
|
||||
VersionContainer *versionContainer;
|
||||
NotifyController *notifyController;
|
||||
StreamingVersionData *selectedVersion;
|
||||
|
||||
QString authorName;
|
||||
QString changableText(bool flag);
|
||||
};
|
||||
|
||||
#endif // VERSIONSELECTWIDGET_H
|
||||
|
||||
Reference in New Issue
Block a user