hey peeps, just a quick one. Here is the header for a class i'm writing but when i compile i get:
error
: ‘QObject
& QObject::operator=(const QObject
&)’ is
private within
this context
error: ‘QObject& QObject::operator=(const QObject&)’ is private within this context
To copy to clipboard, switch view to plain text mode
and it points to the line containing the opening brace of the class.... any thoughts would be appreciated thanx.
#include <QObject>
#include <QVariant>
#include <QString>
{
Q_OBJECT
public:
explicit mediaItem
(QObject *parent
= 0);
mediaItem(const mediaItem&);
enum FileType { OGG , FLAC , MP3 , M4A , WAV };
QString filename
() { return m_filename;
} QString title
() { return m_title;
} QString artist
() { return m_artist;
} QString album
() { return m_album;
} QVariant duration
() { return m_duration;
} QVariant bitrate
() { return m_bitrate;
} QVariant tracknum
() { return m_tracknum;
} QVariant discnum
() { return m_discnum;
} int filetype() { return m_filetype; }
signals:
public slots:
void setfilename
(QString filename
);
void setfiletype(int type);
private:
FileType m_filetype;
};
#include <QObject>
#include <QVariant>
#include <QString>
class mediaItem : public QObject
{
Q_OBJECT
public:
explicit mediaItem(QObject *parent = 0);
mediaItem(const mediaItem&);
enum FileType { OGG , FLAC , MP3 , M4A , WAV };
QString filename() { return m_filename; }
QString title() { return m_title; }
QString artist() { return m_artist; }
QString album() { return m_album; }
QVariant duration() { return m_duration; }
QVariant bpm() { return m_bpm; }
QVariant bitrate() { return m_bitrate; }
QVariant tracknum() { return m_tracknum; }
QVariant discnum() { return m_discnum; }
int filetype() { return m_filetype; }
signals:
public slots:
void setfilename(QString filename);
void settitle(QString title);
void setartist(QString artist);
void setalbum(QString album);
void setduration(QVariant duration);
void setbpm(QVariant bpm);
void setbitrate(QVariant bitrate);
void settracknum(QVariant tracknum);
void setdiscnum(QVariant discnum);
void setfiletype(int type);
private:
QString m_filename;
QString m_title;
QString m_artist;
QString m_album;
QVariant m_duration;
QVariant m_bpm;
QVariant m_bitrate;
QVariant m_tracknum;
QVariant m_discnum;
FileType m_filetype;
};
To copy to clipboard, switch view to plain text mode
janorcutt
Bookmarks