diff options
author | Kavindra Devi Palaraja <[email protected]> | 2009-04-02 10:30:45 +0200 |
---|---|---|
committer | Kavindra Devi Palaraja <[email protected]> | 2009-04-02 10:30:45 +0200 |
commit | 2383659de02023fcd05dad8143317a5f14acb038 (patch) | |
tree | 9856acae3ff6ca45af2fd19fb396a7531d107f26 /doc/example | |
parent | d2e14e3e1f0b5a9b96bcb1ac3e68bffc2fd9ba8d (diff) |
Doc - Renamed the "example" folder to "examples" so there can be more than 1 example there.
Diffstat (limited to 'doc/example')
-rw-r--r-- | doc/example/textfinder/input.txt | 2 | ||||
-rw-r--r-- | doc/example/textfinder/main.cpp | 41 | ||||
-rw-r--r-- | doc/example/textfinder/textfinder.cpp | 72 | ||||
-rw-r--r-- | doc/example/textfinder/textfinder.h | 58 | ||||
-rw-r--r-- | doc/example/textfinder/textfinder.pro | 12 | ||||
-rw-r--r-- | doc/example/textfinder/textfinder.qrc | 5 | ||||
-rw-r--r-- | doc/example/textfinder/textfinder.ui | 78 |
7 files changed, 0 insertions, 268 deletions
diff --git a/doc/example/textfinder/input.txt b/doc/example/textfinder/input.txt deleted file mode 100644 index 044545418a7..00000000000 --- a/doc/example/textfinder/input.txt +++ /dev/null @@ -1,2 +0,0 @@ -These forms are processed at run-time to produce dynamically-generated user interfaces. In order to generate a form at run-time, a resource file containing a .ui file is needed. Applications that use the form handling classes need to be configured to be built against the QtUiTools module. This is done by including the following declaration in a qmake project file to ensure that the application is compiled and linked appropriately. A form loader object, provided by the QUiLoader class, is used to construct the user interface. This user interface -can be retrieved from any QIODevice; for example, a QFile object can be used to obtain a form stored in a project's resources. The QUiLoader::load() function takes the user interface description contained in the file and constructs the form widget.
\ No newline at end of file diff --git a/doc/example/textfinder/main.cpp b/doc/example/textfinder/main.cpp deleted file mode 100644 index 41dba5f6e38..00000000000 --- a/doc/example/textfinder/main.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information ([email protected]) -** -** Commercial Usage -** -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at [email protected]. -** -**************************************************************************/ - -#include "textfinder.h" - -#include <QtGui/QApplication> - -int main(int argc, char *argv[]) -{ - Q_INIT_RESOURCE(textfinder); - QApplication a(argc, argv); - TextFinder w; - w.show(); - return a.exec(); -} diff --git a/doc/example/textfinder/textfinder.cpp b/doc/example/textfinder/textfinder.cpp deleted file mode 100644 index c302f91911f..00000000000 --- a/doc/example/textfinder/textfinder.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information ([email protected]) -** -** Commercial Usage -** -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at [email protected]. -** -**************************************************************************/ - -#include "textfinder.h" - -#include <QtCore/QFile> -#include <QtCore/QTextStream> -#include <QtGui/QMessageBox> - -//! [2] -TextFinder::TextFinder(QWidget *parent) - : QWidget(parent), ui(new Ui::TextFinder) -{ - ui->setupUi(this); - loadTextFile(); -} -//! [2] - -TextFinder::~TextFinder() -{ - delete ui; -} - -//! [0] -void TextFinder::loadTextFile() -{ - QFile inputFile(":/input.txt"); - inputFile.open(QIODevice::ReadOnly); - - QTextStream in(&inputFile); - QString line = in.readAll(); - inputFile.close(); - - ui->textEdit->setPlainText(line); - QTextCursor cursor = ui->textEdit->textCursor(); - cursor.movePosition(QTextCursor::Start, QTextCursor::MoveAnchor, 1); -} -//! [0] - -//! [1] -void TextFinder::on_findButton_clicked() -{ - QString searchString = ui->lineEdit->text(); - ui->textEdit->find(searchString, QTextDocument::FindWholeWords); -} -//! [1] diff --git a/doc/example/textfinder/textfinder.h b/doc/example/textfinder/textfinder.h deleted file mode 100644 index 89dad691366..00000000000 --- a/doc/example/textfinder/textfinder.h +++ /dev/null @@ -1,58 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Creator -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information ([email protected]) -** -** Commercial Usage -** -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at [email protected]. -** -**************************************************************************/ - -#ifndef TEXTFINDER_H -#define TEXTFINDER_H - -#include "ui_textfinder.h" - -#include <QtGui/QWidget> - -namespace Ui -{ - class TextFinder; -} - -class TextFinder : public QWidget -{ - Q_OBJECT - -public: - TextFinder(QWidget *parent = 0); - ~TextFinder(); - -private slots: - void on_findButton_clicked(); - -private: - Ui::TextFinder *ui; - void loadTextFile(); -}; - -#endif // TEXTFINDER_H diff --git a/doc/example/textfinder/textfinder.pro b/doc/example/textfinder/textfinder.pro deleted file mode 100644 index 4dd25ca402a..00000000000 --- a/doc/example/textfinder/textfinder.pro +++ /dev/null @@ -1,12 +0,0 @@ -TARGET = TextFinder -TEMPLATE = app - - -SOURCES += main.cpp\ - textfinder.cpp - -HEADERS += textfinder.h - -FORMS += textfinder.ui - -RESOURCES += textfinder.qrc diff --git a/doc/example/textfinder/textfinder.qrc b/doc/example/textfinder/textfinder.qrc deleted file mode 100644 index 03cc512f4d6..00000000000 --- a/doc/example/textfinder/textfinder.qrc +++ /dev/null @@ -1,5 +0,0 @@ - <!DOCTYPE RCC><RCC version="1.0"> - <qresource> - <file>input.txt</file> - </qresource> - </RCC>
\ No newline at end of file diff --git a/doc/example/textfinder/textfinder.ui b/doc/example/textfinder/textfinder.ui deleted file mode 100644 index ba8018742a5..00000000000 --- a/doc/example/textfinder/textfinder.ui +++ /dev/null @@ -1,78 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>TextFinder</class> - <widget class="QWidget" name="TextFinder"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>378</width> - <height>158</height> - </rect> - </property> - <property name="windowTitle"> - <string>Find Text</string> - </property> - <layout class="QVBoxLayout"> - <item> - <layout class="QGridLayout"> - <item row="0" column="1"> - <widget class="QLineEdit" name="lineEdit"/> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="searchLabel"> - <property name="text"> - <string>&Keyword:</string> - </property> - <property name="buddy"> - <cstring>lineEdit</cstring> - </property> - </widget> - </item> - <item row="0" column="2"> - <widget class="QPushButton" name="findButton"> - <property name="text"> - <string>&Find</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QTextEdit" name="textEdit"/> - </item> - <item> - <spacer> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>16</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - <resources/> - <connections> - <connection> - <sender>lineEdit</sender> - <signal>returnPressed()</signal> - <receiver>findButton</receiver> - <slot>animateClick()</slot> - <hints> - <hint type="sourcelabel"> - <x>261</x> - <y>17</y> - </hint> - <hint type="destinationlabel"> - <x>320</x> - <y>17</y> - </hint> - </hints> - </connection> - </connections> -</ui> |