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); }
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()); }
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; }
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; } }
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(); } }
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; }
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; } }
void Image::setMetadata(const Image& image) { setExifData(image.exifData()); setIptcData(image.iptcData()); setXmpPacket(image.xmpPacket()); setXmpData(image.xmpData()); setComment(image.comment()); }
bool AbstractAspect::readCommentElement(XmlStreamReader * reader) { Q_ASSERT(reader->isStartElement() && reader->name() == "comment"); QString temp = reader->readElementText(); temp.replace("\\n", "\n"); setComment(temp); return true; }
void ZFlyEmBookmarkAnnotationDialog::setFrom(const ZFlyEmBookmark *bookmark) { if (bookmark != NULL) { setBodyId(bookmark->getBodyId()); setType(bookmark->getBookmarkType()); setComment(bookmark->getComment()); } }
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; }
ModelMetadata& operator= (const ModelMetadata& other) { setName(other.name()); setComment(other.comment()); setColor(other.color()); setLabel(other.label()); return *this; }
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)); }
void UCommentTag::edit() { bool ok; QString input=QInputDialog::getText(0,"Edit comment","Comment:",QLineEdit::Normal,comment(),&ok); if(ok) { setComment(input); } }
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); }
void XMLElementCodeBlock::init (CodeDocument *parentDoc, const QString &nodeName, const QString &comment) { setComment(new XMLCodeComment(parentDoc)); getComment()->setText(comment); m_nodeName = nodeName; updateContent(); }
void JavaClassDeclarationBlock::init (JavaClassifierCodeDocument *parentDoc, const QString &comment) { setComment(new JavaCodeDocumentation(parentDoc)); getComment()->setText(comment); setEndText("}"); updateContent(); }
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())); }
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()); } }
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; }
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 ); } }
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); } } }
void ActionInstance::copyActionDataFrom(const ActionInstance &other) { setComment(other.comment()); setLabel(other.label()); setParametersData(other.parametersData()); setColor(other.color()); setEnabled(other.isEnabled()); setSelected(other.isSelected()); setExceptionActionInstances(other.exceptionActionInstances()); setPauseBefore(other.pauseBefore()); setPauseAfter(other.pauseAfter()); setTimeout(other.timeout()); }
void DatabaseCommand_ShareTrack::exec( DatabaseImpl* dbi ) { Q_ASSERT( !source().isNull() ); QString myDbid = SourceList::instance()->getLocal()->nodeId(); QString sourceDbid = source()->nodeId(); if ( myDbid != m_recipient || sourceDbid == m_recipient ) return; setComment( "true" /*unlistened*/ ); DatabaseCommand_SocialAction::exec( dbi ); }
void AbstractExtItem::readConfiguration() { QSettings settings(m_fileName, QSettings::IniFormat); settings.beginGroup("Desktop Entry"); setName(settings.value("Name", name()).toString()); setComment(settings.value("Comment", comment()).toString()); setApiVersion(settings.value("X-AW-ApiVersion", apiVersion()).toInt()); setActive(settings.value("X-AW-Active", isActive()).toBool()); setInterval(settings.value("X-AW-Interval", interval()).toInt()); setNumber(settings.value("X-AW-Number", number()).toInt()); setCron(settings.value("X-AW-Schedule", cron()).toString()); setSocket(settings.value("X-AW-Socket", socket()).toString()); settings.endGroup(); }
int EEmcDbCCIO<T>::write(FILE *f) { char line[MaxLine]; T *s = data(); for(int i=0;i<getSize();i++) { char tn[EEMCDbMaxName]; unpackString(s->name ,i,EEMCDbMaxName ,tn); if(*tn==0x00) break; print(line,tn,i); fputs(line,f); } setComment(s->comment); return 1; }
void Image::setMetadata(const Image& image) { if (checkMode(mdExif) & amWrite) { setExifData(image.exifData()); } if (checkMode(mdIptc) & amWrite) { setIptcData(image.iptcData()); } if (checkMode(mdXmp) & amWrite) { setXmpPacket(image.xmpPacket()); setXmpData(image.xmpData()); } if (checkMode(mdComment) & amWrite) { setComment(image.comment()); } }
bool Role::init() { Sprite::init(); setRoleType(ROLE_NONE); gConfigManager->getRoleManager()->add(this); #if GAME_DEBUG_MODE setComment("Role allocated"); #endif #if GAME_DEBUG_MODE <= DBG_SHOW_ALLOCATE CONLOG("ptr=%p %s", this, getComment()); #endif return true; }
Book::Book(const string& aName, int aCode, double aPrice, int aRating, const string& aComment, const string& aAuthor, const string& aTitle, const string& aIsbn) : author(aAuthor), title(aTitle), isbn(aIsbn) // eigene Attribute { setName(aName); // Attribute der Basisklasse setCode(aCode); setPrice(aPrice); setRating(aRating); setComment(aComment); }
int EEmcDbHVIO<T>::write(FILE *f) { int i; char line[MaxLine]; for(int i=0;i<getSize();i++) indexArr[i]=i; // reset index array for(i=0;i<getSize();i++) { memset(line,0x00,MaxLine); int r = print(line,i); if(r<0) break; if(r>0) { fputs(line,f); setComment(data(i)->comment); } } return i; }