当前位置: 首页>>代码示例>>C++>>正文


C++ Course::getTitle方法代码示例

本文整理汇总了C++中Course::getTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ Course::getTitle方法的具体用法?C++ Course::getTitle怎么用?C++ Course::getTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Course的用法示例。


在下文中一共展示了Course::getTitle方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: fillInRelated

void UnderGradAppPage::fillInRelated(WindowApp* theApp) {
    if(theApp->uGradAppPage->form->rCourses || theApp->editUApp->rCourses) { //this will check if the queue exists
        theApp->uGradAppPage->relatedCourse = new Queue<Course>(*(theApp->editUApp->relatedCourses));
        cout<<theApp->uGradAppPage->relatedCourse->size() <<endl;
        Course *course = theApp->uGradAppPage->relatedCourse->popFront();
        stringstream ss;
        ss << course->getYear();
        string year = ss.str();

        gtk_entry_set_text(GTK_ENTRY(theApp->uGradAppPage->form->ei_year1), year.c_str());
        gtk_entry_set_text(GTK_ENTRY(theApp->uGradAppPage->form->ei_relatedCourse1), course->getTitle().c_str());
        gtk_entry_set_text(GTK_ENTRY(theApp->uGradAppPage->form->ei_term1), course->getTerm().c_str());
        gtk_entry_set_text(GTK_ENTRY(theApp->uGradAppPage->form->ei_finalGrade), course->getFinal().c_str());
    }
}
开发者ID:COMP2404,项目名称:RepoYourCar,代码行数:15,代码来源:UnderGradAppPage.cpp

示例2: fillInTA

void UnderGradAppPage::fillInTA(WindowApp* theApp) {
    if(theApp->uGradAppPage->form->rTA || theApp->editUApp->rTA) {
        theApp->uGradAppPage->relatedTA = new Queue<Course>(*(theApp->editUApp->relatedTAPositions));
        cout<<theApp->uGradAppPage->relatedTA->size() <<endl;
        Course *course = theApp->uGradAppPage->relatedTA->popFront();
        stringstream ss;
        ss << course->getYear();
        string year = ss.str();

        gtk_entry_set_text(GTK_ENTRY(theApp->uGradAppPage->form->ei_year2), year.c_str());
        gtk_entry_set_text(GTK_ENTRY(theApp->uGradAppPage->form->ei_relatedCourse2), course->getTitle().c_str());
        gtk_entry_set_text(GTK_ENTRY(theApp->uGradAppPage->form->ei_term2), course->getTerm().c_str());
        gtk_entry_set_text(GTK_ENTRY(theApp->uGradAppPage->form->ei_supervisor), course->getSupervisor().c_str());
    }
}
开发者ID:COMP2404,项目名称:RepoYourCar,代码行数:15,代码来源:UnderGradAppPage.cpp

示例3: editNextRelated

void UnderGradAppPage::editNextRelated(WindowApp *theApp) {
    if(!theApp->uGradAppPage->relatedTA->isEmpty()) {

        Course *course = theApp->uGradAppPage->relatedTA->popFront();
        stringstream ss;
        ss << course->getYear();
        string year = ss.str();

        gtk_entry_set_text(GTK_ENTRY(theApp->uGradAppPage->form->ei_year2), year.c_str());
        gtk_entry_set_text(GTK_ENTRY(theApp->uGradAppPage->form->ei_relatedCourse2), course->getTitle().c_str());
        gtk_entry_set_text(GTK_ENTRY(theApp->uGradAppPage->form->ei_term2), course->getTerm().c_str());
        gtk_entry_set_text(GTK_ENTRY(theApp->uGradAppPage->form->ei_supervisor), course->getSupervisor().c_str());
    }
    else {
        cout << "thing is empty?" << endl;
    }
}
开发者ID:COMP2404,项目名称:RepoYourCar,代码行数:17,代码来源:UnderGradAppPage.cpp

示例4: writeCourse

/**
 * Write a course file.
 * @param course A Course.
 * @param file_path The target file path.
 * @throw FileException, XmlException
 */
void writeCourse(const Course& course, const QString& file_path)
{
	QFile output(file_path);
	if (!output.open(QIODevice::WriteOnly))
	{
		throw FileException("Cannot open file for writing", output.fileName());
	}

	QXmlStreamWriter writer(&output);
	writer.setAutoFormatting(true);
	writer.setAutoFormattingIndent(1);

	writer.writeStartDocument();

	writer.writeStartElement("course");

	writer.writeStartElement("id");
	writer.writeCharacters(course.getId().toString());
	writer.writeEndElement();

	writer.writeStartElement("title");
	writer.writeCharacters(course.getTitle());
	writer.writeEndElement();

	writer.writeStartElement("description");
	writer.writeCharacters(course.getDescription());
	writer.writeEndElement();

	writer.writeStartElement("keyboardLayout");
	// TODO: Add keyboardLayout
	writer.writeEndElement();

	writer.writeStartElement("lessons");
	for (const auto& it :course)
	{
		writer.writeStartElement("lesson");

		writer.writeStartElement("id");
		writer.writeCharacters(it->getId().toString());
		writer.writeEndElement();

		writer.writeStartElement("title");
		writer.writeCharacters(it->getTitle());
		writer.writeEndElement();

		writer.writeStartElement("newCharacters");
		writer.writeCharacters(it->getNewChars());
		writer.writeEndElement();

		writer.writeStartElement("text");
		writer.writeCharacters(it->getText());
		writer.writeEndElement();

		writer.writeEndElement(); // </lesson>
	}
	writer.writeEndElement(); // </lessons>

	writer.writeEndElement(); // </course>

	writer.writeEndDocument();
}
开发者ID:mNisblee,项目名称:QTouch,代码行数:67,代码来源:writer.cpp


注:本文中的Course::getTitle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。