Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammadAG committed Sep 7, 2012
1 parent b079002 commit bdbdd87
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions camera.cpp
Expand Up @@ -12,7 +12,7 @@ void Camera::disconnectSignals()
"captureCanceled", this, SLOT(captureCanceled(QString)));

bus.disconnect("com.nokia.maemo.CameraService", "/", "com.nokia.maemo.meegotouch.CameraInterface",
"captureCompleted", this, SLOT(captureCompleted(QString,QString)));
"captureCompleted", this, SLOT(captureCompleted(QString,QString)));
}

void Camera::captureCanceled(const QString &mode)
Expand All @@ -30,14 +30,14 @@ void Camera::captureCompleted(const QString &mode, const QString &fileName)

void Camera::startCamera(Camera::CaptureMode mode)
{
QString modeString = "still-capture";
QString modeString = STILL_MODE;

switch (mode) {
case Camera::CameraStillShot:
modeString = "still-capture";
modeString = STILL_MODE;
break;
case Camera::CameraVideo:
modeString = "video-capture";
modeString = VIDEO_MODE;
break;
default:
break;
Expand Down
3 changes: 3 additions & 0 deletions camera.h
Expand Up @@ -9,6 +9,9 @@
#define CAMERA_SERVICE "com.nokia.maemo.CameraService"
#define CAMERA_INTERFACE "com.nokia.maemo.meegotouch.CameraInterface"

#define STILL_MODE "still-capture"
#define VIDEO_MODE "video-capture"

class Camera : public QObject
{
Q_OBJECT
Expand Down
2 changes: 1 addition & 1 deletion resultpage.cpp
Expand Up @@ -42,5 +42,5 @@ void ResultPage::loadImage(QString mode, QString path)
m_pathLabel->setText(path);

if (mode != "video-capture")
m_imageWidget->setImage(QImage(path));
m_imageWidget->setImage(QImage(path).scaled(400, 400, Qt::KeepAspectRatio, Qt::FastTransformation));
}

0 comments on commit bdbdd87

Please sign in to comment.