-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from pec1985/timob-8840
[TIMOB-8840] Implemented TableView Sections
- Loading branch information
Showing
18 changed files
with
450 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* Appcelerator Titanium Mobile | ||
* Copyright (c) 2013 by Appcelerator, Inc. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
|
||
#include "HeaderTableViewRow.h" | ||
|
||
namespace titanium { | ||
|
||
HeaderTableViewRow::HeaderTableViewRow() { | ||
item_ = new bb::cascades::Header(); | ||
setRoot(item_); | ||
} | ||
|
||
HeaderTableViewRow::~HeaderTableViewRow() { | ||
// TODO Auto-generated destructor stub | ||
} | ||
|
||
void HeaderTableViewRow::setData(QObject* newData) | ||
{ | ||
updateTitle(newData->property("header").toString()); | ||
updateSubTitle(newData->property("subHeader").toString()); | ||
|
||
connect(newData, SIGNAL(headerChanged(const QString&)), SLOT(updateTitle(const QString&))); | ||
connect(newData, SIGNAL(subHeaderChanged(const QString&)), SLOT(updateSubTitle(const QString&))); | ||
|
||
if (data()) { | ||
// Remove any signals from the previous data object. | ||
data()->disconnect(this); | ||
} | ||
|
||
AbstractTableViewRow::setData(newData); | ||
} | ||
|
||
void HeaderTableViewRow::updateTitle(const QString& title) { | ||
item_->setTitle(title); | ||
} | ||
void HeaderTableViewRow::updateSubTitle(const QString& subtitle) { | ||
item_->setSubtitle(subtitle); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* Appcelerator Titanium Mobile | ||
* Copyright (c) 2013 by Appcelerator, Inc. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
|
||
#ifndef HEADERTABLEVIEWROW_H_ | ||
#define HEADERTABLEVIEWROW_H_ | ||
|
||
#include "AbstractTableViewRow.h" | ||
#include <bb/cascades/Header> | ||
|
||
namespace titanium { | ||
|
||
class HeaderTableViewRow: public titanium::AbstractTableViewRow { | ||
Q_OBJECT | ||
|
||
public: | ||
HeaderTableViewRow(); | ||
virtual ~HeaderTableViewRow(); | ||
virtual void setData(QObject* data); | ||
bb::cascades::Header* item_; | ||
|
||
private slots: | ||
void updateTitle(const QString& title); | ||
void updateSubTitle(const QString& subtitle); | ||
|
||
}; | ||
|
||
#endif /* HEADERTABLEVIEWROW_H_ */ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.