~scottydelicious666/brewtarget/brewtarget

« back to all changes in this revision

Viewing changes to src/instruction.cpp

  • Committer: Mik Firestone
  • Date: 2010-11-12 05:28:03 UTC
  • Revision ID: git-v1:93ad4d2fc81166e80813645c6201476281b5306e
Adding print functionality to the brewday instructions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
   hasTimer = false;
33
33
   timerValue = QString("00:00:00"); // hh:mm:ss
34
34
   completed = false;
 
35
   interval  = 0.0;
35
36
}
36
37
 
37
38
void Instruction::toXml(QDomDocument& doc, QDomNode& parent)
160
161
   hasChanged();
161
162
}
162
163
 
 
164
void Instruction::setReagent(const QString& reagent)
 
165
{
 
166
   reagents.push_back(reagent);
 
167
}
 
168
 
 
169
void Instruction::setInterval(double time) 
 
170
{
 
171
   interval = time;
 
172
}
163
173
 
164
174
QString Instruction::getName()
165
175
{
185
195
{
186
196
   return completed;
187
197
}
 
198
 
 
199
QString Instruction::getReagent(int i)
 
200
{
 
201
   if ( i < reagents.size() )
 
202
      return reagents[i];
 
203
   else
 
204
      return QString("");
 
205
}
 
206
 
 
207
QVector<QString> Instruction::getReagents()
 
208
{
 
209
   QVector<QString> tmp;
 
210
   if ( reagents.size() > 0 )
 
211
      tmp = reagents;
 
212
   else 
 
213
      tmp.push_back(directions);
 
214
 
 
215
   return tmp;
 
216
}
 
217
 
 
218
double Instruction::getInterval() 
 
219
{
 
220
   return interval;
 
221
}