Cleaned up NewRecipe dialog, and example recipe.

This commit is contained in:
Andrew Lalis 2018-03-30 11:05:17 +02:00
parent 8fee8c0cdb
commit 50ff37599c
3 changed files with 29 additions and 33 deletions

View File

@ -329,10 +329,10 @@ font: &quot;Noto Sans CJK KR&quot;;</string>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<item alignment="Qt::AlignRight">
<widget class="QLabel" name="recipeNameLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -361,6 +361,26 @@ font: &quot;Noto Sans CJK KR&quot;;</string>
</property>
</widget>
</item>
<item alignment="Qt::AlignLeft|Qt::AlignBottom">
<widget class="QLabel" name="authorLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>Noto Sans CJK KR Light</family>
<pointsize>14</pointsize>
<stylestrategy>PreferAntialias</stylestrategy>
</font>
</property>
<property name="text">
<string>By Unknown Author</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>

View File

@ -96,27 +96,11 @@
<item>
<widget class="QWidget" name="recipeNamePanel" native="true">
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<widget class="QLabel" name="recipeNameLabel">
<property name="font">
<font>
<weight>3</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>Edit Recipe</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="recipeNameEdit">
<property name="font">
<font>
<pointsize>16</pointsize>
<weight>3</weight>
<italic>false</italic>
<bold>false</bold>
@ -158,7 +142,7 @@
<second>0</second>
<year>1999</year>
<month>12</month>
<day>25</day>
<day>24</day>
</datetime>
</property>
<property name="currentSection">
@ -418,16 +402,6 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="ingredientsPanelLabel">
<property name="text">
<string>Ingredients</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="ingredientsSubPanel" native="true">
<layout class="QVBoxLayout" name="verticalLayout_12">
@ -832,7 +806,10 @@
<enum>Qt::LeftToRight</enum>
</property>
<property name="autoFillBackground">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 255);</string>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>

View File

@ -20,7 +20,7 @@ int main(int argc, char *argv[])
Recipe rec("Example",
ri,
Instruction("<b>BOLD</b><i>iTaLiCs</i>"),
Instruction("Placeholder Text"),
QImage(),
vector<RecipeTag>({RecipeTag("testing"),
RecipeTag("fake")}),
@ -32,7 +32,6 @@ int main(int argc, char *argv[])
bool success = recipeDB.storeRecipe(rec);
printf("Storage successful: %d\n", success);
//recipeDB.selectFrom("recipe", "recipeId, name", "").printData();
w.loadFromRecipe(recipeDB.retrieveRandomRecipe());
a.exec();