void Templates::setTemplates(QList<util::TEMPLATES> &t) { tempOriginal = temp = t; foreach (TEMPLATES temp, t) { setTemplate(temp); }
int UsbCamera::initManualTemplate(Metadata m) { int res = m.add1UInt8(ANDROID_CONTROL_CAPTURE_INTENT, ANDROID_CONTROL_CAPTURE_INTENT_MANUAL); // Setup manual controls if (res) return res; // TODO: set reprocessing parameters for zsl input queue return setTemplate(CAMERA3_TEMPLATE_MANUAL, m.get()); }
int UsbCamera::initZslTemplate(Metadata m) { int res = m.add1UInt8(ANDROID_CONTROL_CAPTURE_INTENT, ANDROID_CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG); // Setup default zero shutter lag controls if (res) return res; // TODO: set reprocessing parameters for zsl input queue return setTemplate(CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG, m.get()); }
int UsbCamera::initSnapshotTemplate(Metadata m) { int res = m.add1UInt8(ANDROID_CONTROL_CAPTURE_INTENT, ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT); // Setup default video snapshot controls if (res) return res; // TODO: set slow auto-focus, auto-whitebalance, auto-exposure, flash off return setTemplate(CAMERA3_TEMPLATE_VIDEO_SNAPSHOT, m.get()); }
int UsbCamera::initStillTemplate(Metadata m) { int res = m.add1UInt8(ANDROID_CONTROL_CAPTURE_INTENT, ANDROID_CONTROL_CAPTURE_INTENT_STILL_CAPTURE); // Setup default still capture controls if (res) return res; // TODO: set fast auto-focus, auto-whitebalance, auto-exposure, auto flash return setTemplate(CAMERA3_TEMPLATE_STILL_CAPTURE, m.get()); }
int UsbCamera::initPreviewTemplate(Metadata m) { // Setup default preview controls int res = m.add1UInt8(ANDROID_CONTROL_CAPTURE_INTENT, ANDROID_CONTROL_CAPTURE_INTENT_PREVIEW); if (res) return res; // TODO: set fast auto-focus, auto-whitebalance, auto-exposure, auto flash return setTemplate(CAMERA3_TEMPLATE_PREVIEW, m.get()); }
PaperWallet::PaperWallet(const QString &filename, const QString &addr, const QString &key, const QString &value, const QString &generated) : fileName(filename), address(addr), privateKey(key), amount(value), date(generated) { addressURL = "2GIVE:" + address; privateKeyURL = "2GIVE:" + privateKey; setTemplate("default.html"); }
PaperWallet::PaperWallet(GiftCardDataEntry card) { fileName = card.filename; address = card.pubkey; privateKey = card.privkey; amount = QString::number(card.balance); date = card.generated; label = card.label; addressURL = "2GIVE:" + address; privateKeyURL = "2GIVE:" + privateKey; setTemplate("default.html"); }
void Templates::on_pushButton_New_clicked() { newTemplate nt(this); nt.setTemplates(temp); if (nt.exec() == QDialog::Accepted) { temp = nt.getTemplates(); tempOriginal << temp.back(); setTemplate(temp.back()); ui->pushButton_Delete->setEnabled(ui->comboBoxNew->count() != 0); ui->pushButton_Save->setEnabled(ui->comboBoxNew->count() != 0); } }
void Document::setHtml(const std::string &tpl, const std::string &title, int code){ setTemplate(tpl, "text/html", code); _rootDict->SetValueAndShowSection("TITLE", title, "HAS_TITLE"); _dict = _rootDict->AddIncludeDictionary("BODY"); }
void Document::setJson(const std::string &tpl, int code){ setTemplate(tpl, "application/json", code); _dict = _rootDict->AddIncludeDictionary("JSON"); }
TemplateDocument::TemplateDocument(const QString &templateText) : d(new TemplateDocumentPrivate) { setTemplate(templateText); }
Message::Message(int l, NamedType *t, MsgVarList *mv) : type(t), mvlist(mv) { line=l; setTemplate(0); }