本文整理汇总了C++中Note::getTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ Note::getTitle方法的具体用法?C++ Note::getTitle怎么用?C++ Note::getTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Note
的用法示例。
在下文中一共展示了Note::getTitle方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadNote
QVariantMap jsBridge::loadNote(QString guid) {
LOG_INFO(guid);
QVariantMap noteJson;
noteJson["ok"] = false;
Note *n = Note::fromGUID(guid);
if (n == NULL)
return noteJson;
noteJson["content"] = n->getContent();
noteJson["guid"] = guid;
noteJson["title"] = n->getTitle();
noteJson["active"] = n->getActive();
noteJson["updated"] = n->getUpdated().toMSecsSinceEpoch();
noteJson["contentHash"] = n->getContentHash();
QVariantMap conflict = n->conflict();
if (!conflict.isEmpty()) {
noteJson["hasConflict"] = true;
noteJson["conflict"] = conflict;
} else
noteJson["hasConflict"] = false;
delete n;
noteJson["ok"] = true;
return noteJson;
}
示例2: writeJsonObject
void MainWindow::writeJsonObject(QJsonObject &json, Note note)
{
json["DateStart"] = note.getDateStart().toString();
json["DateEnd"] = note.getDateEnd().toString();
json["TimeStart"] = note.getTimeStart().toString();
json["TimeEnd"] = note.getTimeEnd().toString();
json["Title"] = note.getTitle();
json["Text"] = note.getText();
}
示例3:
Note Note::operator =(Note &other)
{
this->setTime(other.getTime());
this->setMode(other.getMode()) ;
this->setTitle(other.getTitle()) ;
this->setDetails(other.getDetails()) ;
this->setTrayDisplay(other.getTrayDisplay()) ;
this->setWindowDisplay(other.getWindowDisplay()) ;
this->setSound(other.isSound());
return *this ;
}
示例4: on_twTaskField_itemDoubleClicked
void MainWindow::on_twTaskField_itemDoubleClicked(QTableWidgetItem *item)
{
Dialog *dialog = new Dialog(this);
Note note;
if(dialog->exec() == QDialog::Accepted)
{
note.setTitle(dialog->getTitle());
note.setText(dialog->getText());
note.setDateStart(selDate_);
note.setDateEnd(selDate_);
note.setTimeStart(QTime::fromString(item->text()));
note.setTimeEnd(QTime::fromString(item->text()));
qDebug() << note.getTitle();
qDebug() << note.getText();
qDebug() << note.getDateStart();
qDebug() << note.getDateEnd();
qDebug() << note.getTimeStart();
qDebug() << note.getTimeEnd();
ui->twTaskField->setItem(item->row(), 1, new QTableWidgetItem(dialog->getTitle()
+" "
+dialog->getText()));
//и записываем в контейнер:
if(TimeLine_.size() != 0)
{
QLinkedList<Note>::iterator it;
int i = 0;
if(isSelDatePresented())
{
for(it = TimeLine_.begin(); it != TimeLine_.end(); ++it)
{
if(it->getDateStart() == note.getDateStart())
{
TimeLine_.insert(it, note);
break;
}
i++;
}
}
else
TimeLine_.push_back(note);
}
else
TimeLine_.append(note);
}
saveFileJson(); //<--- temp
}
示例5: readJsonObject
//----- собственно, работа с json: -----
void MainWindow::readJsonObject(const QJsonObject json, Note ¬e)
{
note.setDateStart(QDate::fromString(json["DateStart"].toString()));
note.setDateEnd(QDate::fromString(json["DateEnd"].toString()));
note.setTimeStart(QTime::fromString(json["TimeStart"].toString()));
note.setTimeEnd(QTime::fromString(json["TimeEnd"].toString()));
note.setTitle(json["Title"].toString());
note.setText(json["Text"].toString());
// item.Priority
// item.Reminder
// item.Color
// item.Mask
qDebug() << note.getTitle();
qDebug() << note.getText();
qDebug() << note.getDateStart();
qDebug() << note.getDateEnd();
qDebug() << note.getTimeStart();
qDebug() << note.getTimeEnd();
}
示例6: deleteNote
void MainWindow::deleteNote(QString note) {
if (note.isEmpty())
note = getCurrentNoteGuid();
if (note.isEmpty())
return;
Note *n = Note::fromGUID(note);
if (n == NULL)
return;
QMessageBox msgBox(this);
msgBox.setText("Are you sure you want to delete this Note?");
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msgBox.setDefaultButton(QMessageBox::No);
msgBox.setIcon(QMessageBox::Warning);
msgBox.setWindowTitle(n->getTitle());
msgBox.exec();
if(msgBox.result() != QMessageBox::Yes)
return;
saveSelectionState();
Note::NoteUpdates updates;
updates[Note::T_ACTIVE] = false;
updates[Note::T_DELETED] = QDateTime::currentDateTime().toMSecsSinceEpoch();
n->update(updates);
delete n;
ui->notebooks->reload();
ui->tags->reload();
loadSelectionState();
searchIndex->dropNoteIndex(note);
}