LogRecord::~LogRecord( ) { clearAllItems( ); if ( outputFileName != 0 ) delete[] outputFileName; }
LogRecord& LogRecord::operator=( const LogRecord& rhs ) { if ( this != &rhs ) { clearAllItems( ); if ( outputFileName != 0 ) delete[] outputFileName; next = 0; aliasIdx = rhs.aliasIdx; //-1 frequency = rhs.frequency; outputFile = rhs.outputFile; outputFileName = 0; acadoAssignString( &outputFileName,rhs.outputFileName,"default.log" ); printScheme = rhs.printScheme; /* if rhs log_record list is not empty, add all option items... */ LogRecordItem* current = rhs.first; while ( current != 0 ) { addItem( *current ); current = current->getNext( ); } } return *this; }
MusicMyDownloadRecordWidget::~MusicMyDownloadRecordWidget() { M_CONNECTION->disConnect("MusicMyDownloadRecordWidget"); delete m_delegate; clearAllItems(); MusicMyDownloadRecordObject xml; xml.writeDownloadConfig(m_musicRecord); }
MusicMyDownloadRecordWidget::~MusicMyDownloadRecordWidget() { M_CONNECTION_PTR->poolDisConnect(getClassName() ); delete m_delegate; clearAllItems(); MusicMyDownloadRecordConfigManager xml; xml.writeDownloadConfig(m_musicRecord); }
MusicLocalSongsManagerWidget::~MusicLocalSongsManagerWidget() { M_CONNECTION->poolDisConnect("MusicLocalSongsManagerWidget"); delete m_movie; clearAllItems(); m_thread->stopAndQuitThread(); delete m_thread; delete ui; }
MusicQueryTableWidget::MusicQueryTableWidget(QWidget *parent) : MusicAbstractTableWidget(parent) { #ifndef USE_MULTIPLE_QUERY m_downLoadManager = new MusicDownLoadQuerySingleThread(this); #else m_downLoadManager = new MusicDownLoadQueryMultipleThread(this); #endif connect(m_downLoadManager, SIGNAL(clearAllItems()), SLOT(clearAllItems())); connect(m_downLoadManager, SIGNAL(createSearchedItems(QString,QString,QString)), SLOT(createSearchedItems(QString,QString,QString))); m_checkBoxDelegate = new MusicQueryTableDelegate(this); setItemDelegateForColumn(0, m_checkBoxDelegate); m_actionGroup = new QActionGroup(this); connect(m_actionGroup, SIGNAL(triggered(QAction*)), SLOT(actionGroupClick(QAction*))); connect(this, SIGNAL(cellDoubleClicked(int,int)), SLOT(itemDoubleClicked(int,int))); }
MusicWebEntainRadioWidget::~MusicWebEntainRadioWidget() { clearAllItems(); m_timer.stop(); m_database->disConnectDatabase(); delete m_collecticon; delete m_discollecticon; delete m_radio; delete m_database; delete ui; }
void MusicWebEntainRadioWidget::updateRadioList(const QString &category) { clearAllItems(); ui->listWidget->clear(); QStringList fnames = m_database->getFavouriteNames(); QStringList rnames = m_database->getRadioNames(category); foreach(QString name, rnames) { ui->listWidget->addItem(new QListWidgetItem(fnames.contains(name) ? *m_collecticon : *m_discollecticon, name)); }
MusicToolSetsWidget::~MusicToolSetsWidget() { M_CONNECTION->disConnect("MusicToolSetsWidget"); delete m_wallpaper; delete m_musicSpectrumWidget; if(m_process) { m_process->kill(); } delete m_process; clearAllItems(); }
void StageSchematicScene::updateScene() { clearAllItems(); QPointF firstPos = sceneRect().center(); m_nextNodePos = TPointD(firstPos.x(), firstPos.y()); TStageObjectTree *pegTree = m_xshHandle->getXsheet()->getStageObjectTree(); m_nodeTable.clear(); m_GroupTable.clear(); m_groupEditorTable.clear(); m_gridDimension = pegTree->getDagGridDimension(); QMap<int, QList<TStageObject *>> groupedObj; QMap<int, QList<SchematicNode *>> editedGroup; // in order to draw the position-specified nodes first QList<int> modifiedNodeIds; for (int i = 0; i < pegTree->getStageObjectCount(); i++) { TStageObject *pegbar = pegTree->getStageObject(i); if (pegbar->getDagNodePos() == TConst::nowhere) modifiedNodeIds.push_back(i); else modifiedNodeIds.push_front(i); } for (int i = 0; i < modifiedNodeIds.size(); i++) { TStageObject *pegbar = pegTree->getStageObject(modifiedNodeIds.at(i)); if (pegbar->isGrouped() && !pegbar->isGroupEditing()) { groupedObj[pegbar->getGroupId()].push_back(pegbar); continue; } StageSchematicNode *node = addStageSchematicNode(pegbar); if (node != 0) { m_nodeTable[pegbar->getId()] = node; if (pegbar->isGrouped()) editedGroup[pegbar->getEditingGroupId()].append(node); } } //Motion Path m_splineTable.clear(); for (int i = 0; i < pegTree->getSplineCount(); i++) { TStageObjectSpline *spline = pegTree->getSpline(i); StageSchematicSplineNode *node = addSchematicSplineNode(spline); if (node != 0) { m_splineTable[spline] = node; connect(node, SIGNAL(currentObjectChanged(const TStageObjectId &, bool)), this, SLOT(onCurrentObjectChanged(const TStageObjectId &, bool))); } }
void MusicLrcSearchTableWidget::startSearchQuery(const QString &text) { if(!M_NETWORK_PTR->isOnline()) //no network connection { clearAllItems(); emit showDownLoadInfoFor(MusicObject::DW_DisConnection); return; } MusicQueryItemTableWidget::startSearchQuery(text); connect(m_downLoadManager, SIGNAL(downLoadDataChanged(QString)), SIGNAL(resolvedSuccess())); m_loadingLabel->run(true); m_downLoadManager->startToSearch(MusicDownLoadQueryThreadAbstract::LrcQuery, text); }
void MusicDownLoadQueryKWThread::startToSearch(QueryType type, const QString &text) { if(!m_manager) { return; } M_LOGGER_INFO(QString("%1 startToSearch %2").arg(getClassName()).arg(text)); m_currentType = type; m_searchText = text.trimmed(); emit clearAllItems(); m_musicSongInfos.clear(); startToPage(0); }
MusicDownloadTableWidget::~MusicDownloadTableWidget() { clearAllItems(); }
MusicLrcSearchTableWidget::~MusicLrcSearchTableWidget() { clearAllItems(); }
MusicToolSetsWidget::~MusicToolSetsWidget() { M_CONNECTION_PTR->poolDisConnect(getClassName()); clearAllItems(); }
MusicRecommendFoundTableWidget::~MusicRecommendFoundTableWidget() { clearAllItems(); }
void MusicDownLoadQuerySingleThread::searchFinshed() { if(m_reply == nullptr) { return; } emit clearAllItems(); ///Clear origin items m_musicSongInfos.clear(); ///Empty the last search to songsInfo if(m_reply->error() == QNetworkReply::NoError) { #ifdef MUSIC_QT_5 QByteArray bytes = m_reply->readAll();///Get all the data obtained by request QJsonParseError jsonError; QJsonDocument parseDoucment = QJsonDocument::fromJson(bytes, &jsonError); ///Put the data into Json if( jsonError.error != QJsonParseError::NoError || !parseDoucment.isObject()) { return; } QJsonObject jsonObject = parseDoucment.object(); if(jsonObject.contains("data")) { QJsonArray array = jsonObject.take("data").toArray(); foreach(QJsonValue value, array) { if(!value.isObject()) { continue; } QJsonObject object = value.toObject(); MusicSongInfomation musicInfo; if(m_currentType != MovieQuery) { QString songId = QString::number(object.take("song_id").toVariant().toULongLong()); QString songName = object.take("song_name").toString(); QString singerName = object.take("singer_name").toString(); QString duration; ///music normal songs urls QJsonArray audUrls = object.value("audition_list").toArray(); foreach(QJsonValue url, audUrls) { QJsonObject urlObject = url.toObject(); if(m_queryAllRecords == true || (m_queryAllRecords == false && urlObject.value("typeDescription").toString() == m_searchQuality)) { MusicSongAttribute songAttr; songAttr.m_url = urlObject.value("url").toString(); songAttr.m_size = urlObject.value("size").toString(); songAttr.m_format = urlObject.value("suffix").toString(); songAttr.m_bitrate = urlObject.value("bitRate").toInt(); musicInfo.m_songAttrs << songAttr; ////set duration duration = urlObject.value("duration").toString(); if(!m_queryAllRecords) { break; } } } ///music cd songs urls QJsonArray llUrls = object.value("ll_list").toArray(); foreach(QJsonValue url, llUrls) { QJsonObject urlObject = url.toObject(); if(m_queryAllRecords == true || (m_queryAllRecords == false && urlObject.value("typeDescription").toString() == m_searchQuality)) { MusicSongAttribute songAttr; songAttr.m_url = urlObject.value("url").toString(); songAttr.m_size = urlObject.value("size").toString(); songAttr.m_format = urlObject.value("suffix").toString(); songAttr.m_bitrate = urlObject.value("bitRate").toInt(); musicInfo.m_songAttrs << songAttr; ////set duration duration = urlObject.value("duration").toString(); if(!m_queryAllRecords) { break; } } }
MusicWebDJRadioInfoTableWidget::~MusicWebDJRadioInfoTableWidget() { clearAllItems(); }
MusicBackgroundListWidget::~MusicBackgroundListWidget() { clearAllItems(); }
MusicVideoTableWidget::~MusicVideoTableWidget() { M_CONNECTION_PTR->poolDisConnect(getClassName()); clearAllItems(); }
MusicSongsListWidget::~MusicSongsListWidget() { clearAllItems(); delete m_musicSongsInfoWidget; delete m_musicSongsPlayWidget; }
SchematicScene::~SchematicScene() { clearAllItems(); }
void EffectStackEdit::transferParamDesc(const QDomElement& d, int in, int out) { kDebug() << "in"; m_params = d; m_in = in; m_out = out; clearAllItems(); if (m_params.isNull()) return; QDomDocument doc; doc.appendChild(doc.importNode(m_params, true)); //kDebug() << "IMPORTED TRANS: " << doc.toString(); QDomNodeList namenode = m_params.elementsByTagName("parameter"); QDomElement e = m_params.toElement(); const int minFrame = e.attribute("start").toInt(); const int maxFrame = e.attribute("end").toInt(); for (int i = 0;i < namenode.count() ;i++) { kDebug() << "in form"; QDomElement pa = namenode.item(i).toElement(); QDomNode na = pa.firstChildElement("name"); QString type = pa.attribute("type"); QString paramName = i18n(na.toElement().text().toUtf8().data()); QWidget * toFillin = new QWidget; QString value = pa.attribute("value").isNull() ? pa.attribute("default") : pa.attribute("value"); if (type == "geometry") { /*pa.setAttribute("namedesc", "X;Y;Width;Height;Transparency"); pa.setAttribute("format", "%d%,%d%:%d%x%d%:%d"); pa.setAttribute("min", "-500;-500;0;0;0"); pa.setAttribute("max", "500;500;200;200;100");*/ } else if (type == "complex") { //pa.setAttribute("namedesc",pa.attribute("name")); } //TODO constant, list, bool, complex , color, geometry, position if (type == "double" || type == "constant") { createSliderItem(paramName, value.toInt(), pa.attribute("min").toInt(), pa.attribute("max").toInt()); delete toFillin; toFillin = NULL; } else if (type == "list") { Listval *lsval = new Listval; lsval->setupUi(toFillin); QStringList listitems = pa.attribute("paramlist").split(','); QStringList listitemsdisplay = pa.attribute("paramlistdisplay").split(','); if (listitemsdisplay.count() != listitems.count()) listitemsdisplay = listitems; //lsval->list->addItems(listitems); lsval->list->setIconSize(QSize(30, 30)); for (int i = 0;i < listitems.count();i++) { lsval->list->addItem(listitemsdisplay.at(i), listitems.at(i)); QString entry = listitems.at(i); if (!entry.isEmpty() && (entry.endsWith(".png") || entry.endsWith(".pgm"))) { if (!EffectStackEdit::iconCache.contains(entry)) { QImage pix(entry); EffectStackEdit::iconCache[entry] = pix.scaled(30, 30); } lsval->list->setItemIcon(i, QPixmap::fromImage(iconCache[entry])); } } if (!value.isEmpty()) lsval->list->setCurrentIndex(listitems.indexOf(value)); connect(lsval->list, SIGNAL(currentIndexChanged(int)) , this, SLOT(collectAllParameters())); lsval->title->setTitle(paramName); m_valueItems[paramName] = lsval; m_uiItems.append(lsval); } else if (type == "bool") {
void MusicDownLoadQueryXMAlbumThread::downLoadFinished() { if(!m_reply || !m_manager) { deleteAll(); return; } M_LOGGER_INFO(QString("%1 downLoadFinished").arg(getClassName())); emit clearAllItems(); m_musicSongInfos.clear(); m_interrupt = false; if(m_reply->error() == QNetworkReply::NoError) { QByteArray bytes = m_reply->readAll(); QJson::Parser parser; bool ok; QVariant data = parser.parse(bytes, &ok); if(ok) { QVariantMap value = data.toMap(); if(value.contains("data")) { value = value["data"].toMap(); value = value["data"].toMap(); value = value["albumDetail"].toMap(); bool albumFlag = false; MusicResultsItem info; info.m_coverUrl = value["albumLogo"].toString(); info.m_description = value["albumName"].toString() + STRING_SPLITER + value["language"].toString() + STRING_SPLITER + value["company"].toString() + STRING_SPLITER + QDateTime::fromMSecsSinceEpoch(value["gmtPublish"].toULongLong()).toString("yyyy-MM-dd"); //////////////////////////////////////////////////////////// QVariantList datas = value["songs"].toList(); foreach(const QVariant &var, datas) { if(var.isNull()) { continue; } value = var.toMap(); MusicObject::MusicSongInformation musicInfo; musicInfo.m_singerName = MusicUtils::String::illegalCharactersReplaced(value["artistName"].toString()); musicInfo.m_songName = MusicUtils::String::illegalCharactersReplaced(value["songName"].toString()); musicInfo.m_timeLength = MusicTime::msecTime2LabelJustified(value["length"].toInt()); musicInfo.m_songId = value["songId"].toString(); musicInfo.m_albumId = value["albumId"].toString(); musicInfo.m_artistId = value["artistId"].toString(); musicInfo.m_albumName = MusicUtils::String::illegalCharactersReplaced(value["albumName"].toString()); musicInfo.m_smallPicUrl = value["albumLogo"].toString(); if(m_interrupt || !m_manager || m_stateCode != MusicNetworkAbstract::Init) return; readFromMusicSongAttribute(&musicInfo, value["listenFiles"], m_searchQuality, m_queryAllRecords); if(m_interrupt || !m_manager || m_stateCode != MusicNetworkAbstract::Init) return; if(musicInfo.m_songAttrs.isEmpty()) { continue; } //////////////////////////////////////////////////////////// if(!albumFlag) { albumFlag = true; info.m_id = musicInfo.m_albumId; info.m_name = musicInfo.m_singerName; emit createAlbumInfoItem(info); } //////////////////////////////////////////////////////////// MusicSearchedItem item; item.m_songName = musicInfo.m_songName; item.m_singerName = musicInfo.m_singerName; item.m_albumName = musicInfo.m_albumName; item.m_time = musicInfo.m_timeLength; item.m_type = mapQueryServerString(); emit createSearchedItem(item); m_musicSongInfos << musicInfo; } } }
MusicWebRadioListView::~MusicWebRadioListView() { delete m_radioDialog; clearAllItems(); }
MusicSongSearchOnlineTableWidget::~MusicSongSearchOnlineTableWidget() { delete m_audition; clearAllItems(); }
MusicVideoTableWidget::~MusicVideoTableWidget() { M_CONNECTION->poolDisConnect("MusicVideoTableWidget"); clearAllItems(); }