provide price category as variable in ticket renderer
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sun, 16 May 2010 16:18:26 +0000 (16:18 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sun, 16 May 2010 16:18:26 +0000 (16:18 +0000)
git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@461 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33

doc/prog_tickettemplate.html
src/templates/ticketrender.cpp

index b5005d2..e74f6e1 100644 (file)
@@ -66,6 +66,8 @@ The following variables exist for tickets:
 <tr><td>TITLE</td><td>the title of the tickets event</td></tr>
 <tr><td>DATETIME</td><td>the localized date and time when the event starts</td></tr>
 <tr><td>ARTIST</td><td>the artist for this event</td></tr>
+<tr><td>PRICECATEGORY</td><td>the price category name this ticket is in</td></tr>
+<tr><td>PRICECATEGORYABBR</td><td>the abbreviation of the price category this ticket is in</td></tr>
 </table>
 
 <h3>Voucher Variables</h3>
index fd4d4f0..d637661 100644 (file)
@@ -530,6 +530,8 @@ QString MTicketLabel::getVariable(QString var)const
        if(var=="ROOM")return tick.event().room();
        if(var=="TITLE")return tick.event().title();
        if(var=="ARTIST")return tick.event().artist().value().name();
+       if(var=="PRICECATEGORY")return tick.priceCategoryName();
+       if(var=="PRICECATEGORYABBR")return tick.priceCategoryShort();
        return "";
 }