From f070afb3791b62eb0053f6f83f7d5093d628e5f6 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com> Date: Fri, 12 Jul 2013 18:52:11 -0400 Subject: [PATCH] [ #22321 ] Remove some 'get' prefixes --- src/videocodecmodel.cpp | 22 +++++++++++----------- src/videocodecmodel.h | 6 +++--- src/videodevice.cpp | 18 +++++++++--------- src/videodevice.h | 16 ++++++++-------- src/videomodel.cpp | 2 +- src/videomodel.h | 2 +- src/videorenderer.cpp | 4 ++-- src/videorenderer.h | 4 ++-- 8 files changed, 37 insertions(+), 37 deletions(-) diff --git a/src/videocodecmodel.cpp b/src/videocodecmodel.cpp index 6e041447..7fb6a8ee 100644 --- a/src/videocodecmodel.cpp +++ b/src/videocodecmodel.cpp @@ -26,12 +26,12 @@ QVariant VideoCodecModel::data( const QModelIndex& idx, int role) const { 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) { - 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) - return QVariant(m_lCodecs[idx.row()]->getBitrate()); + return QVariant(m_lCodecs[idx.row()]->bitrate()); return QVariant(); } @@ -55,14 +55,14 @@ bool VideoCodecModel::setData(const QModelIndex& idx, const QVariant &value, int { 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); if (changed) emit dataChanged(idx, idx); return true; } 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()); if (changed) emit dataChanged(idx, idx); @@ -97,9 +97,9 @@ void VideoCodecModel::save() VectorMapStringString toSave; foreach(VideoCodec* vc,m_lCodecs) { MapStringString details; - details[ "name" ] = vc->getName (); - details[ "bitrate" ] = QString::number(vc->getBitrate()); - details[ "enabled" ] = vc->getEnabled()?"true":"false"; + details[ "name" ] = vc->name (); + details[ "bitrate" ] = QString::number(vc->bitrate()); + details[ "enabled" ] = vc->enabled()?"true":"false"; toSave << details; } interface.setCodecs(m_pAccount->accountId(),toSave); @@ -143,19 +143,19 @@ m_Name(codecName),m_Bitrate(bitRate),m_Enabled(enabled) } ///Get the current codec name -QString VideoCodec::getName() const +QString VideoCodec::name() const { return m_Name; } ///Get the current codec id -uint VideoCodec::getBitrate() const +uint VideoCodec::bitrate() const { return m_Bitrate; } ///Get the current codec id -bool VideoCodec::getEnabled() const +bool VideoCodec::enabled() const { return m_Enabled; } diff --git a/src/videocodecmodel.h b/src/videocodecmodel.h index 2a943953..ec336764 100644 --- a/src/videocodecmodel.h +++ b/src/videocodecmodel.h @@ -70,9 +70,9 @@ class LIB_EXPORT VideoCodec { static void setActiveCodecList(Account* account, QStringList codecs); //Getters - QString getName () const; - uint getBitrate() const; - bool getEnabled() const; + QString name () const; + uint bitrate() const; + bool enabled() const; //Setters void setBitrate(const uint bitrate); diff --git a/src/videodevice.cpp b/src/videodevice.cpp index 21c1ec90..de4d5e03 100644 --- a/src/videodevice.cpp +++ b/src/videodevice.cpp @@ -53,7 +53,7 @@ VideoDevice::VideoDevice(QString id) : m_DeviceId(id) } ///Get the video device list -const QList<VideoDevice*> VideoDevice::getDeviceList() +const QList<VideoDevice*> VideoDevice::deviceList() { QHash<QString,VideoDevice*> devices; VideoInterface& interface = DBus::VideoManager::instance(); @@ -75,19 +75,19 @@ const QList<VideoDevice*> VideoDevice::getDeviceList() ///Return the device VideoDevice* VideoDevice::getDevice(QString name) { - if (!m_sInit) getDeviceList(); + if (!m_sInit) deviceList(); return m_slDevices[name]; } ///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(); return interface.getDeviceRateList(m_DeviceId,channel,resolution.toString()); } ///Get the valid channel list -const QList<VideoChannel> VideoDevice::getChannelList() +const QList<VideoChannel> VideoDevice::channelList() { VideoInterface& interface = DBus::VideoManager::instance(); return interface.getDeviceChannelList(m_DeviceId); @@ -115,28 +115,28 @@ void VideoDevice::setChannel(VideoChannel channel) //??? No device } ///Get the current resolution -const Resolution VideoDevice::getResolution() +const Resolution VideoDevice::resolution() { VideoInterface& interface = DBus::VideoManager::instance(); return Resolution(interface.getActiveDeviceSize()); } ///Get the current channel -const VideoChannel VideoDevice::getChannel() //??? No device +const VideoChannel VideoDevice::channel() //??? No device { VideoInterface& interface = DBus::VideoManager::instance(); return interface.getActiveDeviceChannel(); } ///Get the current rate -const VideoRate VideoDevice::getRate() +const VideoRate VideoDevice::rate() { VideoInterface& interface = DBus::VideoManager::instance(); return interface.getActiveDeviceRate(); } ///Get a list of valid resolution -const QList<Resolution> VideoDevice::getResolutionList(VideoChannel channel) +const QList<Resolution> VideoDevice::resolutionList(VideoChannel channel) { QList<Resolution> toReturn; VideoInterface& interface = DBus::VideoManager::instance(); @@ -148,7 +148,7 @@ const QList<Resolution> VideoDevice::getResolutionList(VideoChannel channel) } ///Get the device id -const QString VideoDevice::getDeviceId() const +const QString VideoDevice::deviceId() const { return m_DeviceId; } diff --git a/src/videodevice.h b/src/videodevice.h index 88aebc7a..dbc494b2 100644 --- a/src/videodevice.h +++ b/src/videodevice.h @@ -50,16 +50,16 @@ class LIB_EXPORT VideoDevice { static VideoDevice* getDevice(QString id); //Getter - const QStringList getRateList(VideoChannel channel, Resolution resolution); - const QList<Resolution> getResolutionList(VideoChannel channel); - const QList<VideoChannel> getChannelList (); - const Resolution getResolution (); - const VideoChannel getChannel (); - const VideoRate getRate (); - const QString getDeviceId () const; + const QStringList rateList(VideoChannel channel, Resolution resolution); + const QList<Resolution> resolutionList(VideoChannel channel); + const QList<VideoChannel> channelList (); + const Resolution resolution (); + const VideoChannel channel (); + const VideoRate rate (); + const QString deviceId () const; //Static getter - static const QList<VideoDevice*> getDeviceList(); + static const QList<VideoDevice*> deviceList(); //Setter void setRate ( VideoRate rate ); diff --git a/src/videomodel.cpp b/src/videomodel.cpp index 631d4c94..8cf92c32 100644 --- a/src/videomodel.cpp +++ b/src/videomodel.cpp @@ -53,7 +53,7 @@ VideoRenderer* VideoModel::getRenderer(Call* call) } ///Get the video preview renderer -VideoRenderer* VideoModel::getPreviewRenderer() +VideoRenderer* VideoModel::previewRenderer() { if (!m_lRenderers["local"]) { VideoInterface& interface = DBus::VideoManager::instance(); diff --git a/src/videomodel.h b/src/videomodel.h index 9c4b2006..cac4435d 100644 --- a/src/videomodel.h +++ b/src/videomodel.h @@ -43,7 +43,7 @@ public: //Getters bool isPreviewing (); VideoRenderer* getRenderer(Call* call); - VideoRenderer* getPreviewRenderer(); + VideoRenderer* previewRenderer(); //Setters void setBufferSize(uint size); diff --git a/src/videorenderer.cpp b/src/videorenderer.cpp index 10a45221..22ed76ce 100644 --- a/src/videorenderer.cpp +++ b/src/videorenderer.cpp @@ -293,13 +293,13 @@ bool VideoRenderer::isRendering() } ///Return the current framerate -QByteArray VideoRenderer::getCurrentFrame() +QByteArray VideoRenderer::currentFrame() { return m_Frame; } ///Return the current resolution -Resolution VideoRenderer::getActiveResolution() +Resolution VideoRenderer::activeResolution() { return m_Res; } diff --git a/src/videorenderer.h b/src/videorenderer.h index cb109f34..6a489cee 100644 --- a/src/videorenderer.h +++ b/src/videorenderer.h @@ -50,8 +50,8 @@ class LIB_EXPORT VideoRenderer : public QObject { QByteArray renderToBitmap(QByteArray& data, bool& ok); const char* rawData (); bool isRendering (); - QByteArray getCurrentFrame (); - Resolution getActiveResolution(); + QByteArray currentFrame (); + Resolution activeResolution(); //Setters void setResolution(QSize size); -- GitLab