summaryrefslogtreecommitdiffstats
path: root/amarok/src/scripts/graphequalizer/eqdialog.ui.h
blob: 7d0e661d6c22084a384262a0ec97a183a2a1c6ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/****************************************************************************
** 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(!TDEApplication::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;
        TDEApplication::dcopClient()->send("amarok", "player", "setEqualizerEnabled(bool)" , data);
}