UniversalPana::UniversalPana(KInstance *inst,QObject *parent,QWidget *widgetParent, QString &desktopName, const char* name): KonqSidebarPlugin(inst,parent,widgetParent,desktopName,name) { KGlobal::iconLoader()->addAppDir( "pana" ); widget = new panaWidget( widgetParent ); // widgetParent->resize(580,300); KToolBar *topBar = new KToolBar( widget, "Topbar" ); topBar->setIconSize(16); topBar->insertButton( "today", 0, SIGNAL( clicked() ), this, SLOT( currentTrack() ) ); topBar->insertButton( "document", 0, SIGNAL( clicked() ), this, SLOT( lyrics() ) ); topBar->insertButton( "personal", 0, SIGNAL( clicked() ), this, SLOT( wiki() ) ); browser = new KHTMLPart(widget, "widget-browser"); //browser=new KHTMLPart(widget); kdDebug() << "parentPart() << " << browser->parentPart() << endl; browser->setDNDEnabled( true ); browser->setEncoding( "utf8", true ); updateBrowser( HTML_FILE ); browser->view()->installEventFilter( widget ); panaDCOP = new DCOPClient(); panaDCOP->attach(); playerStub = new PanaPlayerInterface_stub( panaDCOP, "pana", "player"); playlistStub = new PanaPlaylistInterface_stub( panaDCOP, "pana", "playlist"); contextStub = new PanaContextBrowserInterface_stub (panaDCOP, "pana", "contextbrowser"); KToolBar* toolBar=new KToolBar(widget, "PlayerControls"); toolBar->setIconSize(16); toolBar->insertButton( "player_start",0, SIGNAL( clicked() ), this, SLOT( sendPrev() ) ); toolBar->insertButton( "player_play", 0, SIGNAL( clicked() ), this, SLOT( sendPlay() ) ); toolBar->insertButton( "player_pause",0, SIGNAL( clicked() ), this, SLOT( sendPause() ) ); toolBar->insertButton( "player_stop", 0, SIGNAL( clicked() ), this, SLOT( sendStop() ) ); toolBar->insertButton( "player_end", 0, SIGNAL( clicked() ), this, SLOT( sendNext() ) ); toolBar->insertSeparator(); toolBar->insertButton( "arts", 0, SIGNAL( clicked() ), this, SLOT( sendMute() ) ); vol_slider = new QSlider(0,100,1,0,Qt::Horizontal, toolBar,"volume"); vol_slider->setLineStep(2); connect(vol_slider, SIGNAL( valueChanged(int) ), this, SLOT(volChanged(int ) ) ); toolBar->insertWidget(1,2, vol_slider); fileInfo = new QFileInfo(HTML_FILE); QTimer *t = new QTimer( this ); connect( t, SIGNAL(timeout()), SLOT(updateStatus() ) ); t->start( 2000, false ); kdDebug() << "Connecting widget signal" << endl; connect( widget, SIGNAL( emitURL( const KURL &)), this, SLOT( openURLRequest( const KURL &) ) ); connect( browser->browserExtension(), SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ), this, SLOT( openURLRequest( const KURL & ) ) ); widget->show(); }
/*! \fn UniversalPana::updateStatus() */ void UniversalPana::updateStatus() { checkForPana(); vol_slider->setValue( playerStub->getVolume() ); fileInfo->refresh(); if( fileInfo->lastModified() != fileDT ) { updateBrowser( HTML_FILE ); fileDT=fileInfo->lastModified(); } }
void TreeWidgetEditor::on_treeWidget_itemChanged(QTreeWidgetItem *item, int column) { if (m_updatingBrowser) return; PropertySheetStringValue val = qvariant_cast<PropertySheetStringValue>(item->data(column, Qt::DisplayPropertyRole)); val.setValue(item->text(column)); BoolBlocker block(m_updatingBrowser); item->setData(column, Qt::DisplayPropertyRole, QVariant::fromValue(val)); updateBrowser(); }
void SeeDif::doSearch() { int value; searchBS->GetValue(value); if (value!=0) { /* let's first get rid of previous names..*/ updateBrowser(); searchBS->SetValue(0); } }
void TreeWidgetEditor::updateEditor() { QTreeWidgetItem *current = ui.treeWidget->currentItem(); bool itemsEnabled = false; bool currentItemEnabled = false; bool moveItemUpEnabled = false; bool moveItemDownEnabled = false; bool moveItemRightEnabled = false; bool moveItemLeftEnabled = false; if (ui.treeWidget->columnCount() > 0) { itemsEnabled = true; if (current) { int idx; int idxCount; currentItemEnabled = true; if (current->parent()) { moveItemLeftEnabled = true; idx = current->parent()->indexOfChild(current); idxCount = current->parent()->childCount(); } else { idx = ui.treeWidget->indexOfTopLevelItem(current); idxCount = ui.treeWidget->topLevelItemCount(); } if (idx > 0) moveItemUpEnabled = true; if (idx < idxCount - 1) { moveItemDownEnabled = true; moveItemRightEnabled = true; } } } ui.tabWidget->setTabEnabled(1, itemsEnabled); ui.newSubItemButton->setEnabled(currentItemEnabled); ui.deleteItemButton->setEnabled(currentItemEnabled); ui.moveItemUpButton->setEnabled(moveItemUpEnabled); ui.moveItemDownButton->setEnabled(moveItemDownEnabled); ui.moveItemRightButton->setEnabled(moveItemRightEnabled); ui.moveItemLeftButton->setEnabled(moveItemLeftEnabled); if (current) updateBrowser(); else m_propertyBrowser->clear(); }
int main(int argc, char ** argv) { fatInitDefault(); InitMaxmod(); initGui(); while(1) { scanKeys(); touchRead(&touch); updateBrowser(); if(playing) { mmStreamUpdate(); updateProgress(&musik); if(needsClosing) { needsClosing = false; closeDecoder(); } } glFlush(0); swiWaitForVBlank(); } }
int _sourcecodeeditor::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QFrame::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: updateBrowser(); break; case 1: cursorPositionChanged(); break; case 2: activated((*reinterpret_cast< int(*)>(_a[1]))); break; case 3: setFullscreen(); break; case 4: setNoFullscreen2(); break; case 5: setWindow_extend(); break; case 6: showEvents(); break; case 7: copyAvailable((*reinterpret_cast< bool(*)>(_a[1]))); break; case 8: redoAvailable((*reinterpret_cast< bool(*)>(_a[1]))); break; case 9: undoAvailable((*reinterpret_cast< bool(*)>(_a[1]))); break; case 10: textChanged(); break; case 11: selectionChanged(); break; } _id -= 12; } return _id; }
void TableWidgetEditor::on_tableWidget_currentCellChanged(int currentRow, int currentCol, int, int /* XXX remove me */) { m_rowEditor->setCurrentIndex(currentRow); m_columnEditor->setCurrentIndex(currentCol); updateBrowser(); }
void SeeDif::setMode() { updateBrowser(); }
void SeeDif::pressed() { updateBrowser(); }