From 320532727fc7dfbe9760d0eea0e17b8e1230fc8e Mon Sep 17 00:00:00 2001 From: tille Date: Sat, 27 Apr 2002 14:35:48 +0000 Subject: added setDocument and a qcop call to install a file --- (limited to 'noncore/unsupported/oipkg/mainwindow.cpp') diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp index 25ca889..e3abf36 100644 --- a/noncore/unsupported/oipkg/mainwindow.cpp +++ b/noncore/unsupported/oipkg/mainwindow.cpp @@ -33,6 +33,10 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) : listViewPackages->setSelectionMode(QListView::NoSelection); setCentralWidget( listViewPackages ); + channel = new QCopChannel( "QPE/Application/oipkg", this ); + connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), + this, SLOT(receive(const QCString&, const QByteArray&)) ); + makeMenu(); #ifdef NEWLAYOUT listViewPackages->addColumn( tr("Package") ); @@ -416,3 +420,17 @@ void MainWindow::stopTimer( QListViewItem* ) pvDebug( 5, "stop timer" ); popupTimer->stop(); } + +void MainWindow::setDocument(const QString &fileName) +{ + ipkg->installFile( fileName ); +} + +void MainWindow::receive(const QCString &msg, const QByteArray &arg) +{ + pvDebug(3, "QCop "+msg); + if ( msg == "setDocument(QString)" ) + { + setDocument( QString(arg) ); + } +} \ No newline at end of file -- cgit v0.9.0.2