本文整理汇总了C++中setComment函数的典型用法代码示例。如果您正苦于以下问题:C++ setComment函数的具体用法?C++ setComment怎么用?C++ setComment使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setComment函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: QMainWindow
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
this->setWindowTitle("Storm");
ui->openButton->setFocus();
connect(dt,SIGNAL(setNumOfPieces(int)),this,SLOT(setNumPieces(int)));
connect(dt,SIGNAL(setPiecesLength(int)),this,SLOT(setPiecesLength(int)));
connect(dt,SIGNAL(setInfoHash(QString)),this,SLOT(setInfoHash(QString)));
connect(dt,SIGNAL(setComment(QString)),this,SLOT(setComment(QString)));
connect(dt,SIGNAL(setCreatedBy(QString)),this,SLOT(setCreatedBy(QString)));
connect(dt,SIGNAL(setMagnetLink(QString)),this,SLOT(setMagnetLink(QString)));
connect(dt,SIGNAL(setName(QString)),this,SLOT(setName(QString)));
connect(dt,SIGNAL(setNumOfFiles(int)),this,SLOT(setNumOfFiles(int)));
connect(dt,SIGNAL(setFilesList(QList<QString>)),this,SLOT(setFilesList(QList<QString>)));
// connect();
MainWindow::displayHeader();
MainWindow::setFixedSize(812,847);
MainWindow::move(300,0);
}
开发者ID:VrajPandya,项目名称:storm,代码行数:27,代码来源:mainwindow.cpp
示例2: kdDebug
void TDECModuleInfo::init(KService::Ptr s)
{
_allLoaded = false;
d = new TDECModuleInfoPrivate;
if ( s )
_service = s;
else
{
kdDebug(712) << "Could not find the service." << endl;
return;
}
// set the modules simple attributes
setName(_service->name());
setComment(_service->comment());
setIcon(_service->icon());
_fileName = ( _service->desktopEntryPath() );
// library and factory
setLibrary(_service->library());
// get the keyword list
setKeywords(_service->keywords());
}
开发者ID:Fat-Zer,项目名称:tdelibs,代码行数:26,代码来源:tdecmoduleinfo.cpp
示例3: QFileDialog
void
WaveMaker::loadFile()
{
QFileDialog* fd = new QFileDialog(this, "Wave Maker Input File", TRUE);
fd->setMode(QFileDialog::AnyFile);
fd->setViewMode(QFileDialog::Detail);
QString fileName;
if (fd->exec() == QDialog::Accepted)
{
fileName = fd->selectedFile();
printf("Loading new file: %s\n", fileName.latin1());
setComment("File Name", fileName);
wave.clear();
QFile file(fileName);
if (file.open(IO_ReadOnly))
{
QTextStream stream(&file);
double value;
while (!stream.atEnd())
{
stream >> value;
wave.push_back(value);
}
filename = fileName;
}
开发者ID:fparaggio,项目名称:PuggleLinux,代码行数:25,代码来源:wave_maker.cpp
示例4: switch
void
WaveMaker::update(DefaultGUIModel::update_flags_t flag)
{
switch (flag)
{
case INIT:
setParameter("Loops", QString::number(nloops));
setParameter("Gain", QString::number(gain));
setComment("File Name", filename);
setState("Length (s)", length);
break;
case MODIFY:
nloops = getParameter("Loops").toUInt();
gain = getParameter("Gain").toDouble();
filename = getComment("File Name");
break;
case PAUSE:
output(0) = 0; // stop command in case pause occurs in the middle of command
idx = 0;
loop = 0;
gain = 0;
printf("Protocol paused.\n");
break;
case UNPAUSE:
printf("Protocol started.\n");
break;
case PERIOD:
dt = RT::System::getInstance()->getPeriod() * 1e-9;
loadFile(filename);
default:
break;
}
}
开发者ID:fparaggio,项目名称:PuggleLinux,代码行数:34,代码来源:wave_maker.cpp
示例5: qDebug
void TrackInfoObject::parse() {
// Log parsing of header information in developer mode. This is useful for
// tracking down corrupt files.
const QString& canonicalLocation = m_fileInfo.canonicalFilePath();
if (CmdlineArgs::Instance().getDeveloper()) {
qDebug() << "TrackInfoObject::parse()" << canonicalLocation;
}
// Parse the information stored in the sound file.
SoundSourceProxy proxy(canonicalLocation, m_pSecurityToken);
Mixxx::SoundSource* pProxiedSoundSource = proxy.getProxiedSoundSource();
if (pProxiedSoundSource != NULL && proxy.parseHeader() == OK) {
// Dump the metadata extracted from the file into the track.
// TODO(XXX): This involves locking the mutex for every setXXX
// method. We should figure out an optimization where there are private
// setters that don't lock the mutex.
// If Artist, Title and Type fields are not blank, modify them.
// Otherwise, keep their current values.
// TODO(rryan): Should we re-visit this decision?
if (!(pProxiedSoundSource->getArtist().isEmpty())) {
setArtist(pProxiedSoundSource->getArtist());
}
if (!(pProxiedSoundSource->getTitle().isEmpty())) {
setTitle(pProxiedSoundSource->getTitle());
}
if (!(pProxiedSoundSource->getType().isEmpty())) {
setType(pProxiedSoundSource->getType());
}
setAlbum(pProxiedSoundSource->getAlbum());
setAlbumArtist(pProxiedSoundSource->getAlbumArtist());
setYear(pProxiedSoundSource->getYear());
setGenre(pProxiedSoundSource->getGenre());
setComposer(pProxiedSoundSource->getComposer());
setGrouping(pProxiedSoundSource->getGrouping());
setComment(pProxiedSoundSource->getComment());
setTrackNumber(pProxiedSoundSource->getTrackNumber());
setReplayGain(pProxiedSoundSource->getReplayGain());
setBpm(pProxiedSoundSource->getBPM());
setDuration(pProxiedSoundSource->getDuration());
setBitrate(pProxiedSoundSource->getBitrate());
setSampleRate(pProxiedSoundSource->getSampleRate());
setChannels(pProxiedSoundSource->getChannels());
setKeyText(pProxiedSoundSource->getKey(),
mixxx::track::io::key::FILE_METADATA);
setHeaderParsed(true);
} else {
qDebug() << "TrackInfoObject::parse() error at file"
<< canonicalLocation;
setHeaderParsed(false);
// Add basic information derived from the filename:
parseFilename();
}
}
开发者ID:HektikR,项目名称:mixxx,代码行数:60,代码来源:trackinfoobject.cpp
示例6: setContents
bool ReturnInstruction::setAsXMLNode(QDomNode& node)
{
if (node.hasChildNodes()) {
QDomNodeList nodeList = node.childNodes();
for (unsigned i = 0; i < nodeList.length(); i++) {
QDomElement e = nodeList.item(i).toElement();
if (!e.isNull()) {
if (e.tagName() == "text") {
QDomNode t = e.firstChild();
setContents(t.nodeValue());
} else if (e.tagName() == "comment") {
QDomNode t = e.firstChild();
setComment(t.nodeValue());
}
}
}
} else {
// tekst, komentarz i pixmapa puste
}
validateContents();
return true;
}
开发者ID:ktos,项目名称:nsbuilder,代码行数:26,代码来源:returninstruction.cpp
示例7: m_type
AppletInfo::AppletInfo(const QString &deskFile, const QString &configFile, const AppletInfo::AppletType type)
: m_type(type), m_unique(true), m_hidden(false)
{
QFileInfo fi(deskFile);
m_desktopFile = fi.fileName();
const char *resource = "applets";
switch(type)
{
case Extension:
resource = "extensions";
break;
case BuiltinButton:
resource = "builtinbuttons";
break;
case SpecialButton:
resource = "specialbuttons";
break;
case Undefined:
case Applet:
default:
break;
}
KDesktopFile df(m_desktopFile, true, resource);
// set the appletssimple attributes
setName(df.readName());
setComment(df.readComment());
setIcon(df.readIcon());
// library
setLibrary(df.readEntry("X-KDE-Library"));
// is it a unique applet?
setIsUnique(df.readBoolEntry("X-KDE-UniqueApplet", false));
// should it be shown in the gui?
m_hidden = df.readBoolEntry("Hidden", false);
if(configFile.isEmpty())
{
// generate a config file base name from the library name
m_configFile = m_lib.lower();
if(m_unique)
{
m_configFile.append("rc");
}
else
{
m_configFile.append("_").append(kapp->randomString(20).lower()).append("_rc");
}
}
else
{
m_configFile = configFile;
}
}
开发者ID:serghei,项目名称:kde3-kdebase,代码行数:59,代码来源:appletinfo.cpp
示例8: Q_ASSERT
bool AbstractAspect::readCommentElement(XmlStreamReader * reader)
{
Q_ASSERT(reader->isStartElement() && reader->name() == "comment");
QString temp = reader->readElementText();
temp.replace("\\n", "\n");
setComment(temp);
return true;
}
开发者ID:narunlifescience,项目名称:scidavis,代码行数:8,代码来源:AbstractAspect.cpp
示例9: setUnitMeasure
BillItemMeasure &BillItemMeasure::operator=(const BillItemMeasure &cp) {
if( &cp != this ){
setUnitMeasure( cp.m_d->unitMeasure );
setComment( cp.m_d->comment );
setFormula( cp.m_d->formula );
}
return *this;
}
开发者ID:mickele77,项目名称:qcost,代码行数:9,代码来源:billitemmeasure.cpp
示例10: setName
ModelMetadata& operator= (const ModelMetadata& other)
{
setName(other.name());
setComment(other.comment());
setColor(other.color());
setLabel(other.label());
return *this;
}
开发者ID:Sciss,项目名称:i-score,代码行数:9,代码来源:ModelMetadata.hpp
示例11: CodeAccessorMethod
DCodeAccessorMethod::DCodeAccessorMethod (CodeClassField * field, CodeAccessorMethod::AccessorType type)
: CodeAccessorMethod (field)
{
setType(type);
// lets use full-blown comment
DClassifierCodeDocument* jccd = dynamic_cast<DClassifierCodeDocument*>(field->getParentDocument());
setComment(new DCodeDocumentation(jccd));
}
开发者ID:KDE,项目名称:umbrello,代码行数:9,代码来源:dcodeaccessormethod.cpp
示例12: setComment
void UCommentTag::edit()
{
bool ok;
QString input=QInputDialog::getText(0,"Edit comment","Comment:",QLineEdit::Normal,comment(),&ok);
if(ok)
{
setComment(input);
}
}
开发者ID:davidaq,项目名称:Uranus2,代码行数:9,代码来源:ucommenttag.cpp
示例13: CodeOperation
RubyCodeOperation::RubyCodeOperation ( RubyClassifierCodeDocument * doc, UMLOperation *parent, const QString & body, const QString & comment )
: CodeOperation (doc, parent, body, comment)
{
// lets not go with the default comment and instead use
// full-blown ruby documentation object instead
setComment(new RubyCodeDocumentation(doc));
// these things never change..
setOverallIndentationLevel(1);
}
开发者ID:ShermanHuang,项目名称:kdesdk,代码行数:10,代码来源:rubycodeoperation.cpp
示例14: setComment
void XMLElementCodeBlock::init (CodeDocument *parentDoc, const QString &nodeName, const QString &comment)
{
setComment(new XMLCodeComment(parentDoc));
getComment()->setText(comment);
m_nodeName = nodeName;
updateContent();
}
开发者ID:serghei,项目名称:kde-kdesdk,代码行数:11,代码来源:xmlelementcodeblock.cpp
示例15: setComment
void JavaClassDeclarationBlock::init (JavaClassifierCodeDocument *parentDoc, const QString &comment)
{
setComment(new JavaCodeDocumentation(parentDoc));
getComment()->setText(comment);
setEndText("}");
updateContent();
}
开发者ID:serghei,项目名称:kde-kdesdk,代码行数:11,代码来源:javaclassdeclarationblock.cpp
示例16: setX
void ZPunctum::setFromMarker(const ZVaa3dMarker &marker)
{
setX(marker.x());
setY(marker.y());
setZ(marker.z());
setRadius(marker.radius());
setColor(marker.colorR(), marker.colorG(), marker.colorB());
setComment(marker.comment().c_str());
setName(marker.name().c_str());
setSource(QString("%1").arg(marker.type()));
}
开发者ID:Vaa3D,项目名称:vaa3d_tools,代码行数:11,代码来源:zpunctum.cpp
示例17: setId
void Journal::setDbValuesImplementation(const QHash<QString, QVariant> &dbValues)
{
if (dbValues.count() > 0) {
setId(dbValues[ID].toUInt());
qDebug()<<dbValues[ID]<<"to Uint"<<dbValues[ID].toUInt();
setName(dbValues[Name].toString());
setDate(dbValues[DATE].toString());
setInventoryID(dbValues[INVENTORYID].toUInt());
setStatusID(dbValues[STATUSID].toUInt());
setComment(dbValues[COMMENT].toString());
}
}
开发者ID:MafuraG,项目名称:inventory,代码行数:12,代码来源:journal.cpp
示例18: fputs
int
EEmcDbQAIO<T>::write(FILE *f)
{
int i;
char line[MaxLine];
for(i=0;i<getSize();i++) {
if(! print(line,i) ) break;
fputs(line,f);
setComment(data(i)->comment);
}
return i;
}
开发者ID:star-bnl,项目名称:star-emc,代码行数:12,代码来源:EEmcDbIO.C
示例19: setComment
void BillItemMeasure::loadFromXml10(const QXmlStreamAttributes &attrs) {
if( attrs.hasAttribute( "comment" ) ){
setComment( attrs.value( "comment").toString() );
}
if( attrs.hasAttribute( "formula" ) ){
QString f = attrs.value( "formula").toString();
if( m_d->parser->decimalSeparator() != "." ){
f.replace( ".", m_d->parser->decimalSeparator());
}
setFormula( f );
}
}
开发者ID:mickele77,项目名称:qcost,代码行数:12,代码来源:billitemmeasure.cpp
示例20: _version
HTTPCookie::HTTPCookie(const NameValueCollection& nvc):
_version(0),
_secure(false),
_maxAge(-1),
_httpOnly(false)
{
for (NameValueCollection::ConstIterator it = nvc.begin(); it != nvc.end(); ++it)
{
const std::string& name = it->first;
const std::string& value = it->second;
if (icompare(name, "comment") == 0)
{
setComment(value);
}
else if (icompare(name, "domain") == 0)
{
setDomain(value);
}
else if (icompare(name, "path") == 0)
{
setPath(value);
}
else if (icompare(name, "max-age") == 0)
{
setMaxAge(NumberParser::parse(value));
}
else if (icompare(name, "secure") == 0)
{
setSecure(true);
}
else if (icompare(name, "expires") == 0)
{
int tzd;
DateTime exp = DateTimeParser::parse(value, tzd);
Timestamp now;
setMaxAge((int) ((exp.timestamp() - now) / Timestamp::resolution()));
}
else if (icompare(name, "version") == 0)
{
setVersion(NumberParser::parse(value));
}
else if (icompare(name, "HttpOnly") == 0)
{
setHttpOnly(true);
}
else
{
setName(name);
setValue(value);
}
}
}
开发者ID:Chingliu,项目名称:poco,代码行数:52,代码来源:HTTPCookie.cpp
注:本文中的setComment函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论