Accidently wrong commited files replaced

This commit is contained in:
Rafael 2016-12-14 00:22:51 +01:00
parent 5c9ac81f8e
commit aeb15cb796
3 changed files with 113 additions and 53 deletions

View file

@ -28,6 +28,10 @@ SnapmaticEditor::SnapmaticEditor(QWidget *parent) :
ui(new Ui::SnapmaticEditor)
{
ui->setupUi(this);
ui->cbSelfie->setVisible(false);
ui->cbMugshot->setVisible(false);
ui->cbEditor->setVisible(false);
ui->cmdApply->setDefault(true);
smpic = 0;
}
@ -101,16 +105,9 @@ void SnapmaticEditor::on_rbSelfie_toggled(bool checked)
{
if (checked)
{
ui->cbSelfie->setChecked(true);
ui->cbMugshot->setChecked(false);
ui->cbEditor->setChecked(false);
ui->cbDirector->setChecked(false);
ui->cbMeme->setChecked(false);
ui->cbSelfie->setEnabled(false);
ui->cbMugshot->setEnabled(false);
ui->cbEditor->setEnabled(false);
ui->cbDirector->setEnabled(false);
ui->cbMeme->setEnabled(false);
ui->cbSelfie->setChecked(true);
}
}
@ -119,15 +116,9 @@ void SnapmaticEditor::on_rbMugshot_toggled(bool checked)
if (checked)
{
ui->cbSelfie->setChecked(false);
ui->cbMugshot->setChecked(true);
ui->cbEditor->setChecked(false);
ui->cbDirector->setChecked(false);
ui->cbMeme->setChecked(false);
ui->cbSelfie->setEnabled(false);
ui->cbMugshot->setEnabled(false);
ui->cbEditor->setEnabled(false);
ui->cbDirector->setEnabled(false);
ui->cbMeme->setEnabled(false);
ui->cbMugshot->setChecked(true);
}
}
@ -137,14 +128,8 @@ void SnapmaticEditor::on_rbEditor_toggled(bool checked)
{
ui->cbSelfie->setChecked(false);
ui->cbMugshot->setChecked(false);
ui->cbEditor->setChecked(true);
ui->cbDirector->setChecked(false);
ui->cbMeme->setChecked(false);
ui->cbSelfie->setEnabled(false);
ui->cbMugshot->setEnabled(false);
ui->cbEditor->setEnabled(false);
ui->cbDirector->setEnabled(false);
ui->cbMeme->setEnabled(false);
ui->cbEditor->setChecked(true);
}
}
@ -155,13 +140,6 @@ void SnapmaticEditor::on_rbCustom_toggled(bool checked)
ui->cbSelfie->setChecked(false);
ui->cbMugshot->setChecked(false);
ui->cbEditor->setChecked(false);
ui->cbDirector->setChecked(false);
ui->cbMeme->setChecked(false);
ui->cbSelfie->setEnabled(true);
ui->cbMugshot->setEnabled(true);
ui->cbEditor->setEnabled(true);
ui->cbDirector->setEnabled(true);
ui->cbMeme->setEnabled(true);
}
}
@ -175,6 +153,22 @@ void SnapmaticEditor::setSnapmaticPicture(SnapmaticPicture *picture)
ui->cbEditor->setChecked(localSpJson.isFromRSEditor);
ui->cbDirector->setChecked(localSpJson.isFromDirector);
ui->cbMeme->setChecked(localSpJson.isMeme);
if (ui->cbSelfie->isChecked())
{
ui->rbSelfie->setChecked(true);
}
else if (ui->cbMugshot->isChecked())
{
ui->rbMugshot->setChecked(true);
}
else if (ui->cbEditor->isChecked())
{
ui->rbEditor->setChecked(true);
}
else
{
ui->rbCustom->setChecked(true);
}
}
void SnapmaticEditor::on_cmdCancel_clicked()
@ -184,6 +178,10 @@ void SnapmaticEditor::on_cmdCancel_clicked()
void SnapmaticEditor::on_cmdApply_clicked()
{
if (ui->cbQualify->isChecked())
{
qualifyAvatar();
}
localSpJson.isSelfie = ui->cbSelfie->isChecked();
localSpJson.isMug = ui->cbMugshot->isChecked();
localSpJson.isFromRSEditor = ui->cbEditor->isChecked();
@ -210,3 +208,36 @@ void SnapmaticEditor::on_cmdApply_clicked()
}
close();
}
void SnapmaticEditor::qualifyAvatar()
{
ui->rbSelfie->setChecked(true);
ui->cbDirector->setChecked(false);
ui->cbMeme->setChecked(false);
ui->cmdApply->setDefault(true);
}
void SnapmaticEditor::on_cbQualify_toggled(bool checked)
{
if (checked)
{
ui->cbMeme->setEnabled(false);
ui->cbDirector->setEnabled(false);
ui->rbCustom->setEnabled(false);
ui->rbSelfie->setEnabled(false);
ui->rbEditor->setEnabled(false);
ui->rbMugshot->setEnabled(false);
}
else
{
ui->cbMeme->setEnabled(true);
ui->rbCustom->setEnabled(true);
ui->rbSelfie->setEnabled(true);
ui->rbEditor->setEnabled(true);
ui->rbMugshot->setEnabled(true);
if (ui->rbSelfie->isChecked() || ui->rbCustom->isChecked())
{
ui->cbDirector->setEnabled(true);
}
}
}

View file

@ -47,10 +47,13 @@ private slots:
void on_cmdCancel_clicked();
void on_cmdApply_clicked();
void on_cbQualify_toggled(bool checked);
private:
Ui::SnapmaticEditor *ui;
SnapmaticProperties localSpJson;
SnapmaticPicture *smpic;
void qualifyAvatar();
};
#endif // SNAPMATICEDITOR_H

View file

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>350</width>
<height>250</height>
<width>375</width>
<height>305</height>
</rect>
</property>
<property name="windowTitle">
@ -20,31 +20,31 @@
<string>Snapmatic Type</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="2" column="0">
<item row="2" column="1">
<widget class="QRadioButton" name="rbEditor">
<property name="text">
<string>Editor</string>
</property>
</widget>
</item>
<item row="0" column="0">
<item row="0" column="1">
<widget class="QRadioButton" name="rbSelfie">
<property name="text">
<string>Selfie</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QRadioButton" name="rbMugshot">
<item row="0" column="0">
<widget class="QRadioButton" name="rbCustom">
<property name="text">
<string>Mugshot</string>
<string>Regular</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QRadioButton" name="rbCustom">
<item row="2" column="0">
<widget class="QRadioButton" name="rbMugshot">
<property name="text">
<string>Custom</string>
<string>Mugshot</string>
</property>
</widget>
</item>
@ -57,17 +57,10 @@
<string>Snapmatic Properties</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="cbSelfie">
<item row="5" column="1">
<widget class="QCheckBox" name="cbEditor">
<property name="text">
<string>Selfie</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="cbDirector">
<property name="text">
<string>Director</string>
<string>Editor</string>
</property>
</widget>
</item>
@ -78,17 +71,50 @@
</property>
</widget>
</item>
<item row="1" column="0">
<item row="0" column="2">
<widget class="QCheckBox" name="cbDirector">
<property name="text">
<string>Director</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="cbSelfie">
<property name="text">
<string>Selfie</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QCheckBox" name="cbMugshot">
<property name="text">
<string>Mugshot</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="cbEditor">
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gbExtras">
<property name="title">
<string>Extras</string>
</property>
<layout class="QVBoxLayout" name="vlExtras">
<item>
<widget class="QCheckBox" name="cbQualify">
<property name="text">
<string>Editor</string>
<string>Qualify as Avatar automatically at apply</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labQualify">
<property name="text">
<string>Qualify as Avatar allows you to use this Snapmatic as a Social Club profile picture</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>