Skip to content
Snippets Groups Projects
Commit f070afb3 authored by Emmanuel Lepage Vallee's avatar Emmanuel Lepage Vallee
Browse files

[ #22321 ] Remove some 'get' prefixes

parent 494ba12a
No related branches found
No related tags found
No related merge requests found
...@@ -26,12 +26,12 @@ ...@@ -26,12 +26,12 @@
QVariant VideoCodecModel::data( const QModelIndex& idx, int role) const QVariant VideoCodecModel::data( const QModelIndex& idx, int role) const
{ {
if(idx.column() == 0 && role == Qt::DisplayRole) if(idx.column() == 0 && role == Qt::DisplayRole)
return QVariant(m_lCodecs[idx.row()]->getName()); return QVariant(m_lCodecs[idx.row()]->name());
else if(idx.column() == 0 && role == Qt::CheckStateRole) { else if(idx.column() == 0 && role == Qt::CheckStateRole) {
return QVariant(m_lCodecs[idx.row()]->getEnabled()?Qt::Checked:Qt::Unchecked); return QVariant(m_lCodecs[idx.row()]->enabled()?Qt::Checked:Qt::Unchecked);
} }
else if (idx.column() == 0 && role == VideoCodecModel::BITRATE_ROLE) else if (idx.column() == 0 && role == VideoCodecModel::BITRATE_ROLE)
return QVariant(m_lCodecs[idx.row()]->getBitrate()); return QVariant(m_lCodecs[idx.row()]->bitrate());
return QVariant(); return QVariant();
} }
...@@ -55,14 +55,14 @@ bool VideoCodecModel::setData(const QModelIndex& idx, const QVariant &value, int ...@@ -55,14 +55,14 @@ bool VideoCodecModel::setData(const QModelIndex& idx, const QVariant &value, int
{ {
if (idx.column() == 0 && role == Qt::CheckStateRole) { if (idx.column() == 0 && role == Qt::CheckStateRole) {
bool changed = m_lCodecs[idx.row()]->getEnabled() != (value == Qt::Checked); bool changed = m_lCodecs[idx.row()]->enabled() != (value == Qt::Checked);
m_lCodecs[idx.row()]->setEnabled(value == Qt::Checked); m_lCodecs[idx.row()]->setEnabled(value == Qt::Checked);
if (changed) if (changed)
emit dataChanged(idx, idx); emit dataChanged(idx, idx);
return true; return true;
} }
else if (idx.column() == 0 && role == VideoCodecModel::BITRATE_ROLE) { else if (idx.column() == 0 && role == VideoCodecModel::BITRATE_ROLE) {
bool changed = m_lCodecs[idx.row()]->getBitrate() != value.toUInt(); bool changed = m_lCodecs[idx.row()]->bitrate() != value.toUInt();
m_lCodecs[idx.row()]->setBitrate(value.toInt()); m_lCodecs[idx.row()]->setBitrate(value.toInt());
if (changed) if (changed)
emit dataChanged(idx, idx); emit dataChanged(idx, idx);
...@@ -97,9 +97,9 @@ void VideoCodecModel::save() ...@@ -97,9 +97,9 @@ void VideoCodecModel::save()
VectorMapStringString toSave; VectorMapStringString toSave;
foreach(VideoCodec* vc,m_lCodecs) { foreach(VideoCodec* vc,m_lCodecs) {
MapStringString details; MapStringString details;
details[ "name" ] = vc->getName (); details[ "name" ] = vc->name ();
details[ "bitrate" ] = QString::number(vc->getBitrate()); details[ "bitrate" ] = QString::number(vc->bitrate());
details[ "enabled" ] = vc->getEnabled()?"true":"false"; details[ "enabled" ] = vc->enabled()?"true":"false";
toSave << details; toSave << details;
} }
interface.setCodecs(m_pAccount->accountId(),toSave); interface.setCodecs(m_pAccount->accountId(),toSave);
...@@ -143,19 +143,19 @@ m_Name(codecName),m_Bitrate(bitRate),m_Enabled(enabled) ...@@ -143,19 +143,19 @@ m_Name(codecName),m_Bitrate(bitRate),m_Enabled(enabled)
} }
///Get the current codec name ///Get the current codec name
QString VideoCodec::getName() const QString VideoCodec::name() const
{ {
return m_Name; return m_Name;
} }
///Get the current codec id ///Get the current codec id
uint VideoCodec::getBitrate() const uint VideoCodec::bitrate() const
{ {
return m_Bitrate; return m_Bitrate;
} }
///Get the current codec id ///Get the current codec id
bool VideoCodec::getEnabled() const bool VideoCodec::enabled() const
{ {
return m_Enabled; return m_Enabled;
} }
......
...@@ -70,9 +70,9 @@ class LIB_EXPORT VideoCodec { ...@@ -70,9 +70,9 @@ class LIB_EXPORT VideoCodec {
static void setActiveCodecList(Account* account, QStringList codecs); static void setActiveCodecList(Account* account, QStringList codecs);
//Getters //Getters
QString getName () const; QString name () const;
uint getBitrate() const; uint bitrate() const;
bool getEnabled() const; bool enabled() const;
//Setters //Setters
void setBitrate(const uint bitrate); void setBitrate(const uint bitrate);
......
...@@ -53,7 +53,7 @@ VideoDevice::VideoDevice(QString id) : m_DeviceId(id) ...@@ -53,7 +53,7 @@ VideoDevice::VideoDevice(QString id) : m_DeviceId(id)
} }
///Get the video device list ///Get the video device list
const QList<VideoDevice*> VideoDevice::getDeviceList() const QList<VideoDevice*> VideoDevice::deviceList()
{ {
QHash<QString,VideoDevice*> devices; QHash<QString,VideoDevice*> devices;
VideoInterface& interface = DBus::VideoManager::instance(); VideoInterface& interface = DBus::VideoManager::instance();
...@@ -75,19 +75,19 @@ const QList<VideoDevice*> VideoDevice::getDeviceList() ...@@ -75,19 +75,19 @@ const QList<VideoDevice*> VideoDevice::getDeviceList()
///Return the device ///Return the device
VideoDevice* VideoDevice::getDevice(QString name) VideoDevice* VideoDevice::getDevice(QString name)
{ {
if (!m_sInit) getDeviceList(); if (!m_sInit) deviceList();
return m_slDevices[name]; return m_slDevices[name];
} }
///Get the valid rates for this device ///Get the valid rates for this device
const QStringList VideoDevice::getRateList(VideoChannel channel, Resolution resolution) const QStringList VideoDevice::rateList(VideoChannel channel, Resolution resolution)
{ {
VideoInterface& interface = DBus::VideoManager::instance(); VideoInterface& interface = DBus::VideoManager::instance();
return interface.getDeviceRateList(m_DeviceId,channel,resolution.toString()); return interface.getDeviceRateList(m_DeviceId,channel,resolution.toString());
} }
///Get the valid channel list ///Get the valid channel list
const QList<VideoChannel> VideoDevice::getChannelList() const QList<VideoChannel> VideoDevice::channelList()
{ {
VideoInterface& interface = DBus::VideoManager::instance(); VideoInterface& interface = DBus::VideoManager::instance();
return interface.getDeviceChannelList(m_DeviceId); return interface.getDeviceChannelList(m_DeviceId);
...@@ -115,28 +115,28 @@ void VideoDevice::setChannel(VideoChannel channel) //??? No device ...@@ -115,28 +115,28 @@ void VideoDevice::setChannel(VideoChannel channel) //??? No device
} }
///Get the current resolution ///Get the current resolution
const Resolution VideoDevice::getResolution() const Resolution VideoDevice::resolution()
{ {
VideoInterface& interface = DBus::VideoManager::instance(); VideoInterface& interface = DBus::VideoManager::instance();
return Resolution(interface.getActiveDeviceSize()); return Resolution(interface.getActiveDeviceSize());
} }
///Get the current channel ///Get the current channel
const VideoChannel VideoDevice::getChannel() //??? No device const VideoChannel VideoDevice::channel() //??? No device
{ {
VideoInterface& interface = DBus::VideoManager::instance(); VideoInterface& interface = DBus::VideoManager::instance();
return interface.getActiveDeviceChannel(); return interface.getActiveDeviceChannel();
} }
///Get the current rate ///Get the current rate
const VideoRate VideoDevice::getRate() const VideoRate VideoDevice::rate()
{ {
VideoInterface& interface = DBus::VideoManager::instance(); VideoInterface& interface = DBus::VideoManager::instance();
return interface.getActiveDeviceRate(); return interface.getActiveDeviceRate();
} }
///Get a list of valid resolution ///Get a list of valid resolution
const QList<Resolution> VideoDevice::getResolutionList(VideoChannel channel) const QList<Resolution> VideoDevice::resolutionList(VideoChannel channel)
{ {
QList<Resolution> toReturn; QList<Resolution> toReturn;
VideoInterface& interface = DBus::VideoManager::instance(); VideoInterface& interface = DBus::VideoManager::instance();
...@@ -148,7 +148,7 @@ const QList<Resolution> VideoDevice::getResolutionList(VideoChannel channel) ...@@ -148,7 +148,7 @@ const QList<Resolution> VideoDevice::getResolutionList(VideoChannel channel)
} }
///Get the device id ///Get the device id
const QString VideoDevice::getDeviceId() const const QString VideoDevice::deviceId() const
{ {
return m_DeviceId; return m_DeviceId;
} }
...@@ -50,16 +50,16 @@ class LIB_EXPORT VideoDevice { ...@@ -50,16 +50,16 @@ class LIB_EXPORT VideoDevice {
static VideoDevice* getDevice(QString id); static VideoDevice* getDevice(QString id);
//Getter //Getter
const QStringList getRateList(VideoChannel channel, Resolution resolution); const QStringList rateList(VideoChannel channel, Resolution resolution);
const QList<Resolution> getResolutionList(VideoChannel channel); const QList<Resolution> resolutionList(VideoChannel channel);
const QList<VideoChannel> getChannelList (); const QList<VideoChannel> channelList ();
const Resolution getResolution (); const Resolution resolution ();
const VideoChannel getChannel (); const VideoChannel channel ();
const VideoRate getRate (); const VideoRate rate ();
const QString getDeviceId () const; const QString deviceId () const;
//Static getter //Static getter
static const QList<VideoDevice*> getDeviceList(); static const QList<VideoDevice*> deviceList();
//Setter //Setter
void setRate ( VideoRate rate ); void setRate ( VideoRate rate );
......
...@@ -53,7 +53,7 @@ VideoRenderer* VideoModel::getRenderer(Call* call) ...@@ -53,7 +53,7 @@ VideoRenderer* VideoModel::getRenderer(Call* call)
} }
///Get the video preview renderer ///Get the video preview renderer
VideoRenderer* VideoModel::getPreviewRenderer() VideoRenderer* VideoModel::previewRenderer()
{ {
if (!m_lRenderers["local"]) { if (!m_lRenderers["local"]) {
VideoInterface& interface = DBus::VideoManager::instance(); VideoInterface& interface = DBus::VideoManager::instance();
......
...@@ -43,7 +43,7 @@ public: ...@@ -43,7 +43,7 @@ public:
//Getters //Getters
bool isPreviewing (); bool isPreviewing ();
VideoRenderer* getRenderer(Call* call); VideoRenderer* getRenderer(Call* call);
VideoRenderer* getPreviewRenderer(); VideoRenderer* previewRenderer();
//Setters //Setters
void setBufferSize(uint size); void setBufferSize(uint size);
......
...@@ -293,13 +293,13 @@ bool VideoRenderer::isRendering() ...@@ -293,13 +293,13 @@ bool VideoRenderer::isRendering()
} }
///Return the current framerate ///Return the current framerate
QByteArray VideoRenderer::getCurrentFrame() QByteArray VideoRenderer::currentFrame()
{ {
return m_Frame; return m_Frame;
} }
///Return the current resolution ///Return the current resolution
Resolution VideoRenderer::getActiveResolution() Resolution VideoRenderer::activeResolution()
{ {
return m_Res; return m_Res;
} }
......
...@@ -50,8 +50,8 @@ class LIB_EXPORT VideoRenderer : public QObject { ...@@ -50,8 +50,8 @@ class LIB_EXPORT VideoRenderer : public QObject {
QByteArray renderToBitmap(QByteArray& data, bool& ok); QByteArray renderToBitmap(QByteArray& data, bool& ok);
const char* rawData (); const char* rawData ();
bool isRendering (); bool isRendering ();
QByteArray getCurrentFrame (); QByteArray currentFrame ();
Resolution getActiveResolution(); Resolution activeResolution();
//Setters //Setters
void setResolution(QSize size); void setResolution(QSize size);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment