~elopio/gallery-app/revert_workaround-1302706-click_toolbar_button_failure

« back to all changes in this revision

Viewing changes to tests/unittests/stubs/photo_stub.cpp

  • Committer: Leo Arias
  • Date: 2015-05-15 08:05:23 UTC
  • mfrom: (954.1.241 gallery-app)
  • Revision ID: leo.arias@canonical.com-20150515080523-i2of3vr8h7dioj59
Now the toolbar object is not needed at all.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 */
23
23
 
24
24
#include "photo.h"
25
 
#include "photo-edit-state.h"
26
25
 
27
26
// util
28
27
#include <orientation.h>
44
43
 */
45
44
Photo::Photo(const QFileInfo& file)
46
45
    : MediaSource(file),
47
 
      m_editRevision(0),
48
 
      m_caches(file),
49
46
      m_originalSize(),
50
 
      m_originalOrientation(TOP_LEFT_ORIGIN),
51
 
      d_ptr(0)
 
47
      m_originalOrientation(TOP_LEFT_ORIGIN)
52
48
{
53
49
    photoDummyFileInfo = file;
54
50
}
62
58
    return MediaSource::Photo;
63
59
}
64
60
 
65
 
QImage Photo::image(bool respectOrientation, const QSize &scaleSize)
66
 
{
67
 
    return QImage();
68
 
}
69
 
 
70
61
Orientation Photo::orientation() const
71
62
{
72
63
    return m_originalOrientation;
73
64
}
74
65
 
75
 
QUrl Photo::galleryPath() const
76
 
{
77
 
    QUrl url = MediaSource::galleryPath();
78
 
    return url;
79
 
}
80
 
 
81
 
QUrl Photo::galleryPreviewPath() const
82
 
{
83
 
    QUrl url = MediaSource::galleryPreviewPath();
84
 
    return url;
85
 
}
86
 
 
87
 
QUrl Photo::galleryThumbnailPath() const
88
 
{
89
 
    QUrl url = MediaSource::galleryThumbnailPath();
90
 
    return url;
91
 
}
92
 
 
93
 
const QFileInfo &Photo::pristineFile() const
94
 
{
95
 
    return photoDummyFileInfo;
96
 
}
97
 
 
98
 
void Photo::revertToOriginal()
99
 
{
100
 
}
101
 
 
102
 
void Photo::undo()
103
 
{
104
 
}
105
 
 
106
 
void Photo::redo()
107
 
{
108
 
}
109
 
 
110
 
bool Photo::canUndo() const
111
 
{
112
 
    return false;
113
 
}
114
 
 
115
 
bool Photo::canRedo() const
116
 
{
117
 
    return false;
118
 
}
119
 
 
120
 
bool Photo::isOriginal() const
 
66
bool Photo::canBeEdited() const
121
67
{
122
68
    return true;
123
69
}
124
70
 
125
 
void Photo::rotateRight()
126
 
{
127
 
}
128
 
 
129
 
void Photo::autoEnhance()
130
 
{
131
 
}
132
 
 
133
 
void Photo::exposureCompensation(qreal value)
134
 
{
135
 
}
136
 
 
137
 
void Photo::colorBalance(qreal brightness, qreal contrast, qreal saturation, qreal hue)
138
 
{
139
 
}
140
 
 
141
 
QVariant Photo::prepareForCropping()
142
 
{
143
 
    return QVariant();
144
 
}
145
 
 
146
 
void Photo::cancelCropping()
147
 
{
148
 
}
149
 
 
150
 
void Photo::crop(QVariant vrect)
151
 
{
152
 
}
153
 
 
154
71
void Photo::destroySource(bool destroyBacking, bool asOrphan)
155
72
{
156
73
}
159
76
{
160
77
    m_originalOrientation = orientation;
161
78
}
162
 
 
163
 
void Photo::resetToOriginalSize()
164
 
{
165
 
}
166
 
 
167
 
void Photo::finishEditing()
168
 
{
169
 
}
170