135 lines
2.2 KiB
C++
135 lines
2.2 KiB
C++
#ifndef _THUMBNAIL_OPTIONS_HPP_
|
|
#define _THUMBNAIL_OPTIONS_HPP_
|
|
#ifndef _COMMON_STRING_HPP_
|
|
#include <common/string.hpp>
|
|
#endif
|
|
|
|
class Options
|
|
{
|
|
public:
|
|
Options(void);
|
|
Options(const Options &options);
|
|
virtual ~Options();
|
|
int getQuality(void)const;
|
|
void setQuality(int quality);
|
|
const String &getInputPath(void)const;
|
|
void setInputPath(const String &strInputPath);
|
|
const String &getOutputPath(void)const;
|
|
void setOutputPath(const String &strOuputPath);
|
|
int getImageWidth(void)const;
|
|
void setImageWidth(int imageWidth);
|
|
int getThumbnailWidth(void)const;
|
|
void setThumbnailWidth(int thumbnailWidth);
|
|
bool getHelp(void)const;
|
|
void setHelp(bool help);
|
|
Options &operator=(const Options &options);
|
|
private:
|
|
int mQuality;
|
|
int mThumbnailWidth;
|
|
int mImageWidth;
|
|
String mInputPath;
|
|
String mOutputPath;
|
|
bool mHelp;
|
|
};
|
|
|
|
inline
|
|
Options::Options(void)
|
|
: mQuality(100), mThumbnailWidth(220), mImageWidth(640), mHelp(false)
|
|
{
|
|
}
|
|
|
|
inline
|
|
Options::Options(const Options &options)
|
|
{
|
|
*this=options;
|
|
}
|
|
|
|
inline
|
|
Options::~Options()
|
|
{
|
|
}
|
|
|
|
inline
|
|
Options &Options::operator=(const Options &options)
|
|
{
|
|
setQuality(options.getQuality());
|
|
setInputPath(options.getInputPath());
|
|
setOutputPath(options.getOutputPath());
|
|
setImageWidth(options.getImageWidth());
|
|
setThumbnailWidth(options.getThumbnailWidth());
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
int Options::getQuality(void)const
|
|
{
|
|
return mQuality;
|
|
}
|
|
|
|
inline
|
|
void Options::setQuality(int quality)
|
|
{
|
|
mQuality=quality;
|
|
}
|
|
|
|
inline
|
|
const String &Options::getInputPath(void)const
|
|
{
|
|
return mInputPath;
|
|
}
|
|
|
|
inline
|
|
void Options::setInputPath(const String &strInputPath)
|
|
{
|
|
mInputPath=strInputPath;
|
|
}
|
|
|
|
inline
|
|
const String &Options::getOutputPath(void)const
|
|
{
|
|
return mOutputPath;
|
|
}
|
|
|
|
inline
|
|
void Options::setOutputPath(const String &strOutputPath)
|
|
{
|
|
mOutputPath=strOutputPath;
|
|
}
|
|
|
|
inline
|
|
int Options::getImageWidth(void)const
|
|
{
|
|
return mImageWidth;
|
|
}
|
|
|
|
inline
|
|
void Options::setImageWidth(int imageWidth)
|
|
{
|
|
mImageWidth=imageWidth;
|
|
}
|
|
|
|
inline
|
|
int Options::getThumbnailWidth(void)const
|
|
{
|
|
return mThumbnailWidth;
|
|
}
|
|
|
|
inline
|
|
void Options::setThumbnailWidth(int thumbnailWidth)
|
|
{
|
|
mThumbnailWidth=thumbnailWidth;
|
|
}
|
|
|
|
inline
|
|
bool Options::getHelp(void)const
|
|
{
|
|
return mHelp;
|
|
}
|
|
|
|
inline
|
|
void Options::setHelp(bool help)
|
|
{
|
|
mHelp=help;
|
|
}
|
|
#endif
|