~ubuntu-sdk-team/ubuntu-ui-toolkit/staging

« back to all changes in this revision

Viewing changes to src/Ubuntu/Components/plugin/ucmainviewbase.cpp

  • Committer: Tarmac
  • Author(s): Tim Peeters
  • Date: 2016-02-15 17:08:45 UTC
  • mfrom: (1826.5.12 headerFlickableDocs)
  • Revision ID: tarmac-20160215170845-vqayy6bftzssg18l
Update documentation for MainView, Page, AdaptivePageLayout to use the new PageHeader in all examples. Deprecate old properties. Fixes: https://bugs.launchpad.net/bugs/1540574.

Approved by ubuntu-sdk-build-bot, Zsombor Egri.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
#include "ucmainviewbase.h"
18
18
#include "ucmainviewbase_p.h"
 
19
#include "ucnamespace.h"
19
20
 
20
21
#include "ucactionmanager.h"
21
22
#include "ucactioncontext.h"
166
167
    Q_EMIT anchorToKeyboardChanged(anchorToKeyboard);
167
168
}
168
169
 
169
 
/*!
170
 
  \qmlproperty color MainView::headerColor
171
 
  Color of the header's background.
172
 
 
173
 
  \sa backgroundColor, footerColor
174
 
*/
 
170
// deprecated
175
171
QColor UCMainViewBase::headerColor() const
176
172
{
177
173
    return d_func()->m_headerColor;
184
180
    //disable binding to background color
185
181
    d->m_flags |= UCMainViewBasePrivate::CustomHeaderColor;
186
182
    d->_q_headerColorBinding(headerColor);
 
183
    UC_QML_DEPRECATION_WARNING("MainView.headerColor is deprecated in Ubuntu.Components 1.3.")
187
184
}
188
185
 
189
186
/*!
190
187
  \qmlproperty color MainView::backgroundColor
191
188
  Color of the background.
192
189
 
193
 
  The background is usually a single color. However if \l headerColor
194
 
  or \l footerColor are set then a gradient of colors will be drawn.
195
 
 
196
 
  For example, in order for the MainView to draw a color gradient beneath
197
 
  the content:
 
190
  Example:
198
191
  \qml
199
192
      import QtQuick 2.4
200
 
      import Ubuntu.Components 1.2
 
193
      import Ubuntu.Components 1.3
201
194
 
202
195
      MainView {
203
196
          width: units.gu(40)
204
197
          height: units.gu(60)
205
 
 
206
 
          headerColor: "#343C60"
207
 
          backgroundColor: "#6A69A2"
208
 
          footerColor: "#8896D5"
 
198
          backgroundColor: UbuntuColors.blue
209
199
      }
210
200
  \endqml
211
 
 
212
 
  \sa footerColor, headerColor
213
201
*/
214
202
QColor UCMainViewBase::backgroundColor() const
215
203
{
237
225
    d->doAutoTheme();
238
226
}
239
227
 
240
 
/*!
241
 
  \qmlproperty color MainView::footerColor
242
 
  Color of the footer's background.
243
 
 
244
 
  \sa backgroundColor, headerColor
245
 
*/
 
228
// deprecated
246
229
QColor UCMainViewBase::footerColor() const
247
230
{
248
231
    return d_func()->m_footerColor;
255
238
    //disable binding to background color
256
239
    d->m_flags |= UCMainViewBasePrivate::CustomFooterColor;
257
240
    d->_q_footerColorBinding(footerColor);
 
241
    UC_QML_DEPRECATION_WARNING("MainView.footerColor is deprecated in Ubuntu.Components 1.3.")
258
242
}
259
243
 
260
244
/*!
261
245
  \qmlproperty list<Action> MainView::actions
262
246
  \readonly
 
247
  \deprecated
263
248
 
264
249
  A global list of actions that will be available to the system (including HUD)
265
250
  as long as the application is running. For actions that are not always available to the
273
258
/*!
274
259
  \qmlproperty ActionManager MainView::actionManager
275
260
  \readonly
 
261
  \deprecated
276
262
 
277
263
  The ActionManager that supervises the global and local ActionContexts.
278
264
  The \l actions property should be used preferably since it covers most