00001
#ifndef CHANNELEDITORDLG_H
00002
#define CHANNELEDITORDLG_H
00003
00004
#include <qdom.h>
00005
#include <qlist.h>
00006
#include <qlistview.h>
00007
#include <qstring.h>
00008
#include <qvector.h>
00009
00010
#include "ChannelEditor.h"
00011
#include "TVChannel.h"
00012
00013 class CChannelEditorDlg:
public CChannelEditor
00014 {
00015 Q_OBJECT
00016
private:
00017 QList<TVChannel> *m_pTVChannels;
00018 QMap<const TVChannel *, QListViewItem *> m_Channel2ListView;
00019 QMap<const QListViewItem *, TVChannel *> m_ListView2Channel;
00020
00021 TVChannel::FrequencyGrid m_CurrentFrequencySystem;
00022
00023
TVChannel m_Backup;
00024
bool m_CurrentIsNew;
00025
bool m_UpdatingGUI;
00026
00027
void SetNewCurrent(
TVChannel *channel);
00028
void SetDialogControls(
const TVChannel *channel);
00029
void SetListEntry(
const TVChannel *channel);
00030
void SetFrequencySystem(TVChannel::FrequencyGrid system);
00031
00032
void RemoveChannel(
TVChannel *channel);
00033
void AddChannel(
TVChannel *channel,
int index = -1);
00034
00035
protected slots:
00036
00037
void NameChanged(
const QString &new_name);
00038
void FrequencySystemChanged(
int);
00039
void SystemChannelClicked(
int);
00040
void FinetuningMoved(
int);
00041
void ColorSystemChanged(
int);
00042
00043
void NewClicked();
00044
void DeleteClicked();
00045
void UpClicked();
00046
void DownClicked();
00047
void PresetClicked(QListViewItem *);
00048
00049
public:
00050
CChannelEditorDlg(QWidget *parent = 0,
const char *name = 0);
00051
void SetTVChannels(QList<TVChannel> *tv_channels);
00052
00053 signals:
00054
void NewCurrentChannel();
00065
void NewFrequency(
float frequency);
00066
void NewColorSystem(TVChannel::TunerNorms norm);
00067 };
00068
00069
#endif