本文整理汇总了C++中Note::getTimeEnd方法的典型用法代码示例。如果您正苦于以下问题:C++ Note::getTimeEnd方法的具体用法?C++ Note::getTimeEnd怎么用?C++ Note::getTimeEnd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Note
的用法示例。
在下文中一共展示了Note::getTimeEnd方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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();
}
示例2: 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
}
示例3: 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();
}