summaryrefslogtreecommitdiffstats
path: root/kscd/cddbdlg.h
blob: cee860524051be49922cb9b47237ff15bfe60031 (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
47
#ifndef CDDBDLG_H
#define CDDBDLG_H

#include <kdialogbase.h>

#include "libkcddb/cdinfo.h"
#include "libkcddb/cddb.h"
#include "libkcddb/client.h"

class CDInfoDialogBase;

class CDDBDlg : public KDialogBase
{
  Q_OBJECT
  TQ_OBJECT

  public:
    CDDBDlg(TQWidget* tqparent, const char* name = 0);
    ~CDDBDlg();

    void setData(
      const KCDDB::CDInfo &_cddbInfo,
      const KCDDB::TrackOffsetList &_trackStartFrames,
      const TQStringList  &_playlist);

  private slots:
    void save();
    void upload();
    void submitFinished(CDDB::Result);

  signals:
    void cddbQuery();
    void newCDInfoStored(KCDDB::CDInfo);
    void play(int i);

  private:
    bool validInfo();
    void updateFromDialog();
    TQString framesTime(unsigned frames);

    CDInfoDialogBase *m_dlgBase;
    KCDDB::CDInfo cddbInfo;
    KCDDB::TrackOffsetList trackStartFrames;
    TQStringList playlist;
    KCDDB::Client *cddbClient;
};
#endif // CDDBDLG_H