This post has been edited 1 times, last edit by "fortezza" (Oct 13th 2004, 4:30am)
Source code |
|
1 2 3 4 5 6 7 8 |
#include <kapp.h> int main(int argc, char **argv) { KApplication app(argc, argv, "a", 0 , 0 ); //DCOPClient *client = kapp->dcopClient(); return 0; } |
Source code |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
QApplication a( argc, argv ); QByteArray data; QDataStream arg( data, IO_WriteOnly ); bool ok; QString strmixer = (QString) argv[1]; QString strvol = (QString) argv[2]; int mixer = strmixer.toInt( &ok, 10 ); int vol = strvol.toInt( &ok, 10 ); arg << mixer; arg << vol; kapp->dcopClient()->registerAs("MonAppliIface"); DCOPClient *client = kapp->dcopClient(); cout << (QString)argv[1] << "\n"; //if ( ! client->send( "kmix", "Mixer0", "setMasterVolume(int)", data ) ) { if ( ! client->send( "kmix", "Mixer0", "setVolume(int,int)", data ) ) { cout << "Error setting volume." << endl ; } |
Forum Software: Burning Board®, developed by WoltLab® GmbH
Linux Computer - Linux Forum -
Linux Computer und Notebooks - Lastminute - Wasserbetten & Whirlpools