diff --git a/include/animation.h b/include/animation.h index b4d3cccb4505803a2a37df093ccbda512fc6e189..6713dbf54c01e1e72ef45bfec12c12a37760746f 100644 --- a/include/animation.h +++ b/include/animation.h @@ -114,25 +114,25 @@ public: int getNumFrames(); // Returns the maximum number of frames in the source file - int getMaxFrames(); + int getMaxFrames() const; // Returns the index of the current frame - int getCurrentFrameNum(); + int getCurrentFrameNum() const; // Sets the sourceIn/Out frame numbers void updateSourceInFrameNum(int in=-1); void updateSourceOutFrameNum(int out=-1); // Returns the sourceIn/Out frame numbers - int getSourceInFrameNum(); - int getSourceOutFrameNum(); + int getSourceInFrameNum() const; + int getSourceOutFrameNum() const; // Returns the filename of the current frame QString getCurrentFileName(); // Returns the FPS of the current animation if it is a video double getFPS(); - double getOriginalFPS(); + double getOriginalFPS() const; void setFPS(double fps); @@ -144,17 +144,17 @@ public: void reset(); - bool isVideo(); - bool isStereoVideo(); - bool isImageSequence(); - bool isCameraLiveStream(); + bool isVideo() const; + bool isStereoVideo() const; + bool isImageSequence() const; + bool isCameraLiveStream() const; #ifndef STEREO_DISABLED enum Camera getCamera(); void setCamera(enum Camera); #endif - int getFirstFrameSec(); - int getFirstFrameMicroSec(); + int getFirstFrameSec() const; + int getFirstFrameMicroSec() const; QString getFileBase(); QFileInfo getFileInfo(); diff --git a/include/aviFileWriter.h b/include/aviFileWriter.h index a8d6cf45e959214c2f7cf1eff01f118be728e2c0..131ddd07d0d6566bc0d5fb0be19f52e8a3d133b4 100644 --- a/include/aviFileWriter.h +++ b/include/aviFileWriter.h @@ -92,7 +92,7 @@ public: double iFramerate ); /** Get the the bytes written */ - long int bytesWritten(); + long int bytesWritten() const; /** * Load a bitmap from a file and append it to the current open .avi. diff --git a/include/backgroundFilter.h b/include/backgroundFilter.h index fc0144344e6484f8111e685eb92d9a20654bc0c2..39055eef6c9e93cd5f27411f7a3e3b4d91500a77 100644 --- a/include/backgroundFilter.h +++ b/include/backgroundFilter.h @@ -52,7 +52,7 @@ public: void setDefaultHeight(double h); void setUpdate(bool b); - bool update(); + bool update() const; QString getFilename(); void setFilename(const QString &fn); diff --git a/include/control.h b/include/control.h index c310d7ac86128b6414f7569327ab2e1456fe42f5..4155485dc69b93779c32f8d9481ca29a83e301b2 100644 --- a/include/control.h +++ b/include/control.h @@ -192,7 +192,7 @@ public: int getCalibGrid3DResolution(); void setCalibGrid3DResolution(int i); - void expandRange(QColor& fromColor, QColor& toColor, const QColor& clickedColor); + void expandRange(QColor& fromColor, QColor& toColor, const QColor& clickedColor) const; void saveChange(const QColor& fromColor, const QColor& toColor, RectPlotItem* map); bool getColors(QColor& clickedColor, QColor& toColor, QColor& fromColor, RectPlotItem*& map); diff --git a/include/coordItem.h b/include/coordItem.h index ca21934ee9e995fecb0e2a111eefb71368ec4c2b..26707f7192045882bd0741711edc021cca88a0ef 100644 --- a/include/coordItem.h +++ b/include/coordItem.h @@ -49,7 +49,7 @@ public: { this->coordDimension = dim; } - inline int /*Dimension*/ getCoordDimension() + inline int /*Dimension*/ getCoordDimension() const { return this->coordDimension; } diff --git a/include/extrCalibration.h b/include/extrCalibration.h index 6e3b988e4d997752959ee7bb0213a07678f370f7..9efb8197381ac1a63a5b817c1b264e7c1f563f23 100644 --- a/include/extrCalibration.h +++ b/include/extrCalibration.h @@ -186,7 +186,7 @@ public: { this->points2D = list2D; } - inline float getCamHeight() + inline float getCamHeight() const { return camHeight; } diff --git a/include/filter.h b/include/filter.h index 70093b8159a18bdf1e4b0a7bf2d0ee8f67c26541..23b3a7297eec717f7f9dd925e375997fdeb12c86 100644 --- a/include/filter.h +++ b/include/filter.h @@ -49,17 +49,17 @@ public: void setFilter(Filter *filter); Filter * getFilter(); - double value(); - double getValue(); + double value() const; + double getValue() const; void setValue(double d); - double getMinimum(); + double getMinimum() const; void setMinimum(double d); - double getMaximum(); + double getMaximum() const; void setMaximum(double d); - bool changed(); - bool getChanged(); + bool changed() const; + bool getChanged() const; void setChanged(bool b); }; @@ -93,7 +93,7 @@ public: Filter(); virtual ~Filter() {}; - bool changed(); + bool changed() const; bool getChanged(); void setChanged(bool b); @@ -110,10 +110,10 @@ public: void enable(); void disable(); void setEnabled(bool b); - bool getEnabled(); + bool getEnabled() const; void setOnCopy(bool b); - bool getOnCopy(); + bool getOnCopy() const; }; #endif diff --git a/include/gridItem.h b/include/gridItem.h index 350c9140cd9502ed26c8b5eee6019a2e06a4326a..fcba1d5c481c40102e67097d647cd36cf40145c9 100644 --- a/include/gridItem.h +++ b/include/gridItem.h @@ -41,7 +41,7 @@ public: { this->gridDimension = gDimension; } - inline int/*Petrack::Dimension*/ getGridDimension() + inline int/*Petrack::Dimension*/ getGridDimension() const { return this->gridDimension; } diff --git a/include/logoItem.h b/include/logoItem.h index 686fc01c3beed579e0d2a97678cd6c40287bbe57..ac8aaeff0bb4d23f1b26899947d93e4030df8cc0 100644 --- a/include/logoItem.h +++ b/include/logoItem.h @@ -52,7 +52,7 @@ public: // void dropEvent(QDropEvent *event); void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); - inline float getOpacity() + inline float getOpacity() const { return mOpacity; } diff --git a/include/petrack.h b/include/petrack.h index e8351780a7896ee52d72469fdc49d40688b3d68e..5ef7a3d8f764429c85a3eefa06ce5d8930941d94 100644 --- a/include/petrack.h +++ b/include/petrack.h @@ -180,13 +180,13 @@ public: void updateSequence(); // void calcBackground(); QSet<int> getOnlyVisible(); - double getCmPerPixel(); + double getCmPerPixel() const; void setHeadSize(double hS=-1); double getHeadSize(QPointF *pos=nullptr, int pers=-1, int frame=-1); //------------------------------ // inline function - bool isLoading() + bool isLoading() const { return mLoading; } @@ -349,7 +349,7 @@ public: { mRecognitionChanged = b; } - inline bool recognitionChanged() + inline bool recognitionChanged() const { return mRecognitionChanged; } @@ -358,7 +358,7 @@ public: { mTrackChanged = b; } - inline bool trackChanged() + inline bool trackChanged() const { return mTrackChanged; } @@ -426,7 +426,7 @@ public: { return &mExtrCalibration; } - inline double getStatusFPS() + inline double getStatusFPS() const { return mShowFPS; } diff --git a/include/player.h b/include/player.h index 56045cabb0e2dfbf2bfa652b85929b55b6fcdfbd..c3e3e5c64048a97038503b73d33439294d169ad9 100644 --- a/include/player.h +++ b/include/player.h @@ -81,7 +81,7 @@ public slots: void setFPS(double fps=-1.); void togglePlayerSpeedLimited(); void setPlayerSpeedLimited(bool fixed); - bool getPlayerSpeedLimited(); + bool getPlayerSpeedLimited() const; void setPlayerSpeedFixed(bool fixed); void setLooping(bool looping); void setFrameInNum(int in=-1.); diff --git a/include/stereoContext.h b/include/stereoContext.h index 4064b453fff178d1dd110e8f7c0087c8404b03a5..b89f0fe6b57f504b7d8d1985b8db24429986ced6 100644 --- a/include/stereoContext.h +++ b/include/stereoContext.h @@ -97,20 +97,20 @@ public: return mTriclopsContext; } #endif - inline unsigned char getSurfaceValue() + inline unsigned char getSurfaceValue() const { return mSurfaceValue; } - inline unsigned char getBackForthValue() + inline unsigned char getBackForthValue() const { return mBackForthValue; } - inline unsigned short int getMin() + inline unsigned short int getMin() const { return mMin; } - inline unsigned short int getMax() + inline unsigned short int getMax() const { return mMax; } diff --git a/src/animation.cpp b/src/animation.cpp index 24fab6940f4015c30a97ea8e3c5c232a830133ba..cdb5d6091f07da27b9a7ac3ff20e050bc816828d 100644 --- a/src/animation.cpp +++ b/src/animation.cpp @@ -255,11 +255,11 @@ bool Animation::openTimeFile(QString &timeFileName) } /// returns -1, if not set by time file -int Animation::getFirstFrameSec() +int Animation::getFirstFrameSec() const { return mFirstSec; } -int Animation::getFirstFrameMicroSec() +int Animation::getFirstFrameMicroSec() const { return mFirstMicroSec; } @@ -368,7 +368,7 @@ int Animation::getNumFrames() return 0; } -int Animation::getMaxFrames() +int Animation::getMaxFrames() const { if (mVideo || mImgSeq) return mMaxFrames; @@ -376,7 +376,7 @@ int Animation::getMaxFrames() } /// Returns the index of the current frame -int Animation::getCurrentFrameNum() +int Animation::getCurrentFrameNum() const { return mCurrentFrame; } @@ -391,7 +391,7 @@ void Animation::setSourceInFrameNum(int in) mMainWindow->updateSourceInOutFrames(); } /// Returns the sourceIn frame number -int Animation::getSourceInFrameNum() +int Animation::getSourceInFrameNum() const { return mSourceInFrame; } @@ -406,7 +406,7 @@ void Animation::setSourceOutFrameNum(int out) mMainWindow->updateSourceInOutFrames(); } /// Returns the sourceOut frame number -int Animation::getSourceOutFrameNum() +int Animation::getSourceOutFrameNum() const { return mSourceOutFrame; } @@ -449,7 +449,7 @@ double Animation::getFPS() return -1; } -double Animation::getOriginalFPS() +double Animation::getOriginalFPS() const { return mOriginalFps; } @@ -532,22 +532,22 @@ QFileInfo Animation::getFileInfo() return mFileInfo; } -bool Animation::isVideo() +bool Animation::isVideo() const { return mVideo; } -bool Animation::isStereoVideo() +bool Animation::isStereoVideo() const { return mStereo; } -bool Animation::isImageSequence() +bool Animation::isImageSequence() const { return mImgSeq; } -bool Animation::isCameraLiveStream() +bool Animation::isCameraLiveStream() const { return mCameraLiveStream; } diff --git a/src/aviFileWriter.cpp b/src/aviFileWriter.cpp index ff5c5fed22a221c4405466f0ddc87d16c3c1a357..f981e7e27dd8bf654e0fce7b77467b5261b1c919 100644 --- a/src/aviFileWriter.cpp +++ b/src/aviFileWriter.cpp @@ -265,7 +265,7 @@ bool AviFileWriter::open( //return m_vWriter.open(pszFilename,CV_FOURCC('P', 'I', 'M', '1'),(double) iFramerate,Size(iCols,iRows),m_isColor); } -long int AviFileWriter::bytesWritten() +long int AviFileWriter::bytesWritten() const { return m_liBytesWritten; //return m_iTimeIndex * m_iSize; diff --git a/src/backgroundFilter.cpp b/src/backgroundFilter.cpp index 2d5456c6deeaa97a94777388824d01ea20156146..21723d6dcb16685faa8a2ea30c92157949daad10 100644 --- a/src/backgroundFilter.cpp +++ b/src/backgroundFilter.cpp @@ -327,7 +327,7 @@ void BackgroundFilter::setUpdate(bool b) mUpdate = b; } -bool BackgroundFilter::update() +bool BackgroundFilter::update() const { return mUpdate; } diff --git a/src/control.cpp b/src/control.cpp index 20cd72dcbc3f738098f86d1da3c862666677559b..768e8d208dc9541bbeeeb6d2b0f44293baa63445 100644 --- a/src/control.cpp +++ b/src/control.cpp @@ -3520,7 +3520,7 @@ void Control::saveChange(const QColor& fromColor, const QColor& toColor, RectPlo * @param toColor[in,out] toColor of the map, gets changed! * @param clickedColor[in] */ -void Control::expandRange(QColor& fromColor, QColor& toColor, const QColor& clickedColor) +void Control::expandRange(QColor& fromColor, QColor& toColor, const QColor& clickedColor) const { // NOTE BUFFER in Klassenebene verschieben und bei setColor auch nutzen? (verschiedene Größe vllt. gewünscht?) constexpr int BUFFER = 10; diff --git a/src/filter.cpp b/src/filter.cpp index 1d69d1f21b72d7d2cdc8bee4cdfc2fb5dc2ebb18..dca46edbbf6fa5c9eef40e586ea200e9dd46fb2c 100644 --- a/src/filter.cpp +++ b/src/filter.cpp @@ -39,11 +39,11 @@ Filter * Parameter::getFilter() return mFilter; } -double Parameter::value() +double Parameter::value() const { return mValue; } -double Parameter::getValue() +double Parameter::getValue() const { return mValue; } @@ -56,7 +56,7 @@ void Parameter::setValue(double d) } } -double Parameter::getMinimum() +double Parameter::getMinimum() const { return mMinimum; } @@ -64,7 +64,7 @@ void Parameter::setMinimum(double d) { mMinimum = d; } -double Parameter::getMaximum() +double Parameter::getMaximum() const { return mMaximum; } @@ -73,11 +73,11 @@ void Parameter::setMaximum(double d) mMaximum = d; } -bool Parameter::changed() +bool Parameter::changed() const { return mChg; } -bool Parameter::getChanged() +bool Parameter::getChanged() const { return mChg; } @@ -110,7 +110,7 @@ Filter::Filter() * * @return true, if a parameter changed */ -bool Filter::changed() +bool Filter::changed() const { return mChg; } @@ -184,7 +184,7 @@ void Filter::setEnabled(bool b) mChg = true; mEnable = b; } -bool Filter::getEnabled() +bool Filter::getEnabled() const { return mEnable; } @@ -194,7 +194,7 @@ void Filter::setOnCopy(bool b) mChg = true; mOnCopy = b; } -bool Filter::getOnCopy() +bool Filter::getOnCopy() const { return mOnCopy; } diff --git a/src/petrack.cpp b/src/petrack.cpp index 4e768fd4a0197c716fe35ac0f955aecae631e839..2d160a428c8cbc86752a723c90fc8f9cf2e2893e 100644 --- a/src/petrack.cpp +++ b/src/petrack.cpp @@ -3959,7 +3959,7 @@ void Petrack::updateSequence() * @brief Gets cm per pixel. Only recalculates when calculating head size. * @return cm per pixel */ -double Petrack::getCmPerPixel() +double Petrack::getCmPerPixel() const { return mCmPerPixel; } diff --git a/src/player.cpp b/src/player.cpp index 1dc3397bef3f70fea31e327736295080ec42a1c7..cf35bcd0e53e232b735955e779437ae7c48d5e32 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -202,7 +202,7 @@ void Player::togglePlayerSpeedLimited() { setPlayerSpeedLimited(!mPlayerSpeedLimited); } -bool Player::getPlayerSpeedLimited() +bool Player::getPlayerSpeedLimited() const { return mPlayerSpeedLimited; }