summaryrefslogtreecommitdiffstats
path: root/examples/tutorials/modelview/6_treeview
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tutorials/modelview/6_treeview')
-rw-r--r--examples/tutorials/modelview/6_treeview/6_treeview.desktop11
-rw-r--r--examples/tutorials/modelview/6_treeview/6_treeview.pro15
-rw-r--r--examples/tutorials/modelview/6_treeview/main.cpp50
-rw-r--r--examples/tutorials/modelview/6_treeview/mainwindow.cpp82
-rw-r--r--examples/tutorials/modelview/6_treeview/mainwindow.h66
5 files changed, 0 insertions, 224 deletions
diff --git a/examples/tutorials/modelview/6_treeview/6_treeview.desktop b/examples/tutorials/modelview/6_treeview/6_treeview.desktop
deleted file mode 100644
index e0b872bf9c..0000000000
--- a/examples/tutorials/modelview/6_treeview/6_treeview.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Type=Application
-Terminal=false
-Name=6 Model View
-Exec=/opt/usr/bin/6_treeview
-Icon=6_treeview
-X-Window-Icon=
-X-HildonDesk-ShowInToolbar=true
-X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/modelview/6_treeview/6_treeview.pro b/examples/tutorials/modelview/6_treeview/6_treeview.pro
deleted file mode 100644
index 21ea5d9552..0000000000
--- a/examples/tutorials/modelview/6_treeview/6_treeview.pro
+++ /dev/null
@@ -1,15 +0,0 @@
-TARGET = mv_tree
-TEMPLATE = app
-SOURCES += main.cpp \
- mainwindow.cpp
-HEADERS += mainwindow.h
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/6_treeview
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS 6_treeview.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/6_treeview
-INSTALLS += target sources
-
-QT += widgets
-
-simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/tutorials/modelview/6_treeview/main.cpp b/examples/tutorials/modelview/6_treeview/main.cpp
deleted file mode 100644
index 0e10352554..0000000000
--- a/examples/tutorials/modelview/6_treeview/main.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtWidgets/QApplication>
-#include "mainwindow.h"
-
-int main(int argc, char *argv[])
-{
- QApplication a(argc, argv);
- MainWindow w;
- w.show();
- return a.exec();
-}
diff --git a/examples/tutorials/modelview/6_treeview/mainwindow.cpp b/examples/tutorials/modelview/6_treeview/mainwindow.cpp
deleted file mode 100644
index aea18c11d6..0000000000
--- a/examples/tutorials/modelview/6_treeview/mainwindow.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [Quoting ModelView Tutorial]
-// modelview.cpp
-#include <QTreeView>
-#include <QStandardItemModel>
-#include <QStandardItem>
-#include "mainwindow.h"
-
-
-const int ROWS = 2;
-const int COLUMNS = 3;
-
-MainWindow::MainWindow(QWidget *parent)
- : QMainWindow(parent)
-{
- treeView = new QTreeView(this);
- setCentralWidget(treeView);
- standardModel = new QStandardItemModel ;
-
- QList<QStandardItem *> preparedRow =prepareRow("first", "second", "third");
- QStandardItem *item = standardModel->invisibleRootItem();
- // adding a row to the invisible root item produces a root element
- item->appendRow(preparedRow);
-
- QList<QStandardItem *> secondRow =prepareRow("111", "222", "333");
- // adding a row to an item starts a subtree
- preparedRow.first()->appendRow(secondRow);
-
- treeView->setModel(standardModel);
- treeView->expandAll();
-}
-
-QList<QStandardItem *> MainWindow::prepareRow(const QString &first,
- const QString &second,
- const QString &third)
-{
- QList<QStandardItem *> rowItems;
- rowItems << new QStandardItem(first);
- rowItems << new QStandardItem(second);
- rowItems << new QStandardItem(third);
- return rowItems;
-}
-//! [Quoting ModelView Tutorial]
diff --git a/examples/tutorials/modelview/6_treeview/mainwindow.h b/examples/tutorials/modelview/6_treeview/mainwindow.h
deleted file mode 100644
index aab299ca6f..0000000000
--- a/examples/tutorials/modelview/6_treeview/mainwindow.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-
-#include <QtWidgets/QMainWindow>
-
-QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code
-class QTreeView; //forward declarations
-class QStandardItemModel;
-class QStandardItem;
-QT_END_NAMESPACE
-
-
-class MainWindow : public QMainWindow
-{
- Q_OBJECT
-private:
- QTreeView *treeView;
- QStandardItemModel *standardModel;
- QList<QStandardItem *> prepareRow( const QString &first,
- const QString &second,
- const QString &third );
-public:
- MainWindow(QWidget *parent = 0);
-};
-
-#endif // MAINWINDOW_H