Page
{
id:root
property Menu menu
StatusBar{
id:stat
anchors.top: parent.top
}
property PageStackWindow currentTabPageStack: annoncestack
Image{
id:fondgris
source: "images/foninter.png"
anchors.top: stat.bottom
width: root.width
}
Image{
id:logo
source: "images/logo.png"
anchors.top: stat.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 8
}
Text {
id: txtrub
text: "Annonces"
font.pointSize: 6.5
color:"#383a4b"
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: logo.bottom
anchors.topMargin: 8
}
TabBar {
id: tabBar
z: 1
platformInverted: true
height: 60
anchors { left: parent.left; right: parent.right; top: fondgris.bottom; }
TabButton {
tab: annoncestack;
platformInverted: true
Image{
anchors.verticalCenterOffset: -13
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
source: "images/star.png"
}
Text {
id:txt
text: "tab1"
anchors.verticalCenterOffset: 17
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 13
color: "#59595a"
}
onClicked: {
currentTabPageStack.pageStack.pop(currentTabPageStack.initialPage)
}
}
TabButton {
tab: recherchestack;
platformInverted: true
Image{
anchors.verticalCenterOffset: -13
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
source: "images/zoom.png"
}
Text {
text: "tab2"
anchors.verticalCenterOffset: 17
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 13
color: "#59595a"
}
onClicked: {
currentTabPageStack.pageStack.pop(currentTabPageStack.initialPage)
}
}
TabButton {
tab: deposerstack;
platformInverted: true
Image{
anchors.verticalCenterOffset: -13
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
source: "images/add.png"
}
Text {
text: "tab3"
anchors.verticalCenterOffset: 17
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 13
color: "#59595a"
}
onClicked: {
currentTabPageStack.pageStack.pop(currentTabPageStack.initialPage)
}
}
TabButton {
tab: favoristack;
platformInverted: true
Image{
anchors.verticalCenterOffset: -13
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
source: "images/hearTab.png"
}
Text {
text: "tab4"
anchors.verticalCenterOffset: 17
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 13
color: "#59595a"
}
onClicked: {
currentTabPageStack.pageStack.pop(currentTabPageStack.initialPage)
}
}
}
TabGroup {
id: tabGroup
anchors { left: parent.left; right: parent.right;top:tabBar.bottom;bottom: parent.bottom }
PageStackWindow{
id: annoncestack
showToolBar: false
showStatusBar: false
platformInverted: true
initialPage: ann
}
PageStackWindow{
id: recherchestack
showToolBar: false
showStatusBar: false
platformInverted: true
initialPage: rech
}
PageStackWindow{
id: deposerstack
showToolBar: false
showStatusBar: false
platformInverted: true
initialPage: depo
}
PageStackWindow{
id: favoristack
showToolBar: false
showStatusBar: false
platformInverted: true
initialPage: fav
}
onCurrentTabChanged: {
currentTabPageStack = currentTab
favoristack.pageStack.currentPage.addListe();
console.log("ana hena");
}
}
PageA{
id:depo
}
PageB{
id:rech
}
PageC{
id:fav
}
Page{
id:ann
property Menu menu
width: root.width
Flickable{
width: root.width
contentHeight: column.height
clip: true
// anchors.top:parent.top
// anchors.bottom: footer.top
anchors.fill:parent
Column{
id:column
anchors.fill: parent
Repeater{
id:rep
model:Con.tabRubriqueAcceuil.length
ListItem {
id: listItem1
platformInverted: true
subItemIndicator: true
Column {
id: column1
x:16
y:16
ListItemText {
id: titleText
mode: listItem1.mode
role: "Title"
text: Con.tabRubriqueAcceuil[index]
platformInverted: true
}
}
onClicked:
{
Trait.rub=index
Trait.rubrique=Con.tabRubriqueAcceuil[index]
if(Trait.rubrique=="Toutes les rubriques")
Con.tabCategorieAcceuil=Con.getCategorie("");
else
Con.tabCategorieAcceuil=Con.getCategorie(Trait.rubrique);
currentTabPageStack.pageStack.push(Qt.resolvedUrl("Categories.qml"));
}
}
}
}
}
Item
{
id:footer
height: toolBar.height
width: toolBar.width
anchors.bottom: parent.bottom
ToolBar {
id: toolBar
platformInverted: true
tools: ToolBarLayout {
id: toolBarlayout
opacity: 1
//button retour
ToolButton {
platformInverted: true
iconSource: "images/close_stop_wb.png"
onClicked: Qt.quit()
}
//button menu
ToolButton {
iconSource: "toolbar-menu"
platformInverted: true
onClicked: {
if (!menu)
menu = menuComponent.createObject(root)
menu.open()
}
}
}
}
Component {
id: menuComponent
//menu du pied de page
Menu {
id: theMenu
platformInverted: true
content: MenuLayout {
MenuItem {
text: "A propos"
platformInverted: true
}
}
}
}
}
}
}
Bookmarks