You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
amarok/amarok/src/scripts/graphequalizer/eqdialog.ui.h

47 lines
1.7 KiB

/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you want to add, delete, or rename functions or slots, use
** TQt Designer to update this file, preserving your code.
**
** You should not define a constructor or destructor in this file.
** Instead, write your code in functions called init() and destroy().
** These will automatically be called by the form's constructor and
** destructor.
*****************************************************************************/
#include <dcopclient.h>
#include <kapplication.h>
//#include <kdebug.h>
void EqDialog::init()
{
//kdDebug() << "start" << endl;
TQCanvas* canvas = new TQCanvas();
canvas->resize(400, 200);
canvasView->setVScrollBarMode(TQScrollView::AlwaysOff);
canvasView->setHScrollBarMode(TQScrollView::AlwaysOff);
canvasView->setCanvas(canvas);
canvasView->init();
TQByteArray send_data, reply_data;
TQCString reply_type;
//kdDebug() << "continue" << endl;
if(!KApplication::dcopClient()->call("amarok","player","equalizerEnabled()", send_data, reply_type, reply_data,true,1000));
//kdDebug() << "called" << endl;
TQDataStream answer(reply_data, IO_ReadOnly);
//kdDebug() << "answer created" << answer << endl;
bool eqEnabled;
answer >> eqEnabled;
//kdDebug() << "eqEnabled set to " << eqEnabled << endl;
eqGroupBox->setChecked(eqEnabled);
//kdDebug() << "end" << endl;
}
void EqDialog::eqGroupBox_toggled( bool eqEnabled)
{
TQByteArray data;
TQDataStream arg(data, IO_WriteOnly);
arg << eqEnabled;
KApplication::dcopClient()->send("amarok", "player", "setEqualizerEnabled(bool)" , data);
}