diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-05-07 00:16:28 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-05-07 00:16:28 -0500 |
commit | a4788e1d6a8e2ac65e16f9ee41018b5bbe8210cd (patch) | |
tree | 1b19ef1c14913a7b042399660f172f68eb92e479 /examples | |
parent | 57d3eda064765d29f10609d45d4f1ff9c4e0a589 (diff) | |
download | qt4-tqt-theme-engine-a4788e1d6a8e2ac65e16f9ee41018b5bbe8210cd.tar.gz qt4-tqt-theme-engine-a4788e1d6a8e2ac65e16f9ee41018b5bbe8210cd.zip |
Clean up directory structure
Diffstat (limited to 'examples')
-rw-r--r-- | examples/stylewindow/Makefile | 242 | ||||
-rw-r--r-- | examples/stylewindow/main.cpp | 57 | ||||
-rw-r--r-- | examples/stylewindow/stylewindow.cpp | 91 | ||||
-rw-r--r-- | examples/stylewindow/stylewindow.h | 54 | ||||
-rw-r--r-- | examples/stylewindow/stylewindow.pro | 19 | ||||
-rw-r--r-- | examples/tqt3reference/Makefile | 167 | ||||
-rw-r--r-- | examples/tqt3reference/main.cpp | 56 | ||||
-rw-r--r-- | examples/tqt3reference/stylewindow.cpp | 114 | ||||
-rw-r--r-- | examples/tqt3reference/stylewindow.h | 54 | ||||
-rw-r--r-- | examples/tqt3reference/stylewindow.pro | 24 | ||||
-rw-r--r-- | examples/unstyledwindow/Makefile | 242 | ||||
-rw-r--r-- | examples/unstyledwindow/main.cpp | 57 | ||||
-rw-r--r-- | examples/unstyledwindow/stylewindow.cpp | 87 | ||||
-rw-r--r-- | examples/unstyledwindow/stylewindow.h | 54 | ||||
-rw-r--r-- | examples/unstyledwindow/unstyledwindow.pro | 19 |
15 files changed, 1337 insertions, 0 deletions
diff --git a/examples/stylewindow/Makefile b/examples/stylewindow/Makefile new file mode 100644 index 0000000..a9dd2db --- /dev/null +++ b/examples/stylewindow/Makefile @@ -0,0 +1,242 @@ +############################################################################# +# Makefile for building: ../styleplugin +# Generated by qmake (2.01a) (Qt 4.7.4) on: Mon Jan 2 01:57:07 2012 +# Project: stylewindow.pro +# Template: app +# Command: /usr/bin/qmake-qt4 -o Makefile stylewindow.pro +############################################################################# + +####### Compiler, tools and options + +CC = gcc +CXX = g++ +DEFINES = -DQT_WEBKIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED +CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES) +CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES) +INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. +LINK = g++ +LFLAGS = -Wl,-O1 +LIBS = $(SUBLIBS) -L/usr/lib/i386-linux-gnu -lQtGui -lQtCore -lpthread +AR = ar cqs +RANLIB = +QMAKE = /usr/bin/qmake-qt4 +TAR = tar -cf +COMPRESS = gzip -9f +COPY = cp -f +SED = sed +COPY_FILE = $(COPY) +COPY_DIR = $(COPY) -r +STRIP = strip +INSTALL_FILE = install -m 644 -p +INSTALL_DIR = $(COPY_DIR) +INSTALL_PROGRAM = install -m 755 -p +DEL_FILE = rm -f +SYMLINK = ln -f -s +DEL_DIR = rmdir +MOVE = mv -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p + +####### Output directory + +OBJECTS_DIR = ./ + +####### Files + +SOURCES = stylewindow.cpp \ + main.cpp moc_stylewindow.cpp +OBJECTS = stylewindow.o \ + main.o \ + moc_stylewindow.o +DIST = /usr/share/qt4/mkspecs/common/g++.conf \ + /usr/share/qt4/mkspecs/common/unix.conf \ + /usr/share/qt4/mkspecs/common/linux.conf \ + /usr/share/qt4/mkspecs/qconfig.pri \ + /usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \ + /usr/share/qt4/mkspecs/features/qt_functions.prf \ + /usr/share/qt4/mkspecs/features/qt_config.prf \ + /usr/share/qt4/mkspecs/features/exclusive_builds.prf \ + /usr/share/qt4/mkspecs/features/default_pre.prf \ + /usr/share/qt4/mkspecs/features/release.prf \ + /usr/share/qt4/mkspecs/features/default_post.prf \ + /usr/share/qt4/mkspecs/features/warn_on.prf \ + /usr/share/qt4/mkspecs/features/qt.prf \ + /usr/share/qt4/mkspecs/features/unix/thread.prf \ + /usr/share/qt4/mkspecs/features/moc.prf \ + /usr/share/qt4/mkspecs/features/resources.prf \ + /usr/share/qt4/mkspecs/features/uic.prf \ + /usr/share/qt4/mkspecs/features/yacc.prf \ + /usr/share/qt4/mkspecs/features/lex.prf \ + /usr/share/qt4/mkspecs/features/include_source_dir.prf \ + stylewindow.pro +QMAKE_TARGET = styleplugin +DESTDIR = ../ +TARGET = ../styleplugin + +first: all +####### Implicit rules + +.SUFFIXES: .o .c .cpp .cc .cxx .C + +.cpp.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cc.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cxx.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.C.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.c.o: + $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" + +####### Build rules + +all: Makefile $(TARGET) + +$(TARGET): $(OBJECTS) + @$(CHK_DIR_EXISTS) ../ || $(MKDIR) ../ + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) + +Makefile: stylewindow.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/g++.conf \ + /usr/share/qt4/mkspecs/common/unix.conf \ + /usr/share/qt4/mkspecs/common/linux.conf \ + /usr/share/qt4/mkspecs/qconfig.pri \ + /usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \ + /usr/share/qt4/mkspecs/features/qt_functions.prf \ + /usr/share/qt4/mkspecs/features/qt_config.prf \ + /usr/share/qt4/mkspecs/features/exclusive_builds.prf \ + /usr/share/qt4/mkspecs/features/default_pre.prf \ + /usr/share/qt4/mkspecs/features/release.prf \ + /usr/share/qt4/mkspecs/features/default_post.prf \ + /usr/share/qt4/mkspecs/features/warn_on.prf \ + /usr/share/qt4/mkspecs/features/qt.prf \ + /usr/share/qt4/mkspecs/features/unix/thread.prf \ + /usr/share/qt4/mkspecs/features/moc.prf \ + /usr/share/qt4/mkspecs/features/resources.prf \ + /usr/share/qt4/mkspecs/features/uic.prf \ + /usr/share/qt4/mkspecs/features/yacc.prf \ + /usr/share/qt4/mkspecs/features/lex.prf \ + /usr/share/qt4/mkspecs/features/include_source_dir.prf \ + /usr/lib/i386-linux-gnu/libQtGui.prl \ + /usr/lib/i386-linux-gnu/libQtCore.prl + $(QMAKE) -o Makefile stylewindow.pro +/usr/share/qt4/mkspecs/common/g++.conf: +/usr/share/qt4/mkspecs/common/unix.conf: +/usr/share/qt4/mkspecs/common/linux.conf: +/usr/share/qt4/mkspecs/qconfig.pri: +/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri: +/usr/share/qt4/mkspecs/features/qt_functions.prf: +/usr/share/qt4/mkspecs/features/qt_config.prf: +/usr/share/qt4/mkspecs/features/exclusive_builds.prf: +/usr/share/qt4/mkspecs/features/default_pre.prf: +/usr/share/qt4/mkspecs/features/release.prf: +/usr/share/qt4/mkspecs/features/default_post.prf: +/usr/share/qt4/mkspecs/features/warn_on.prf: +/usr/share/qt4/mkspecs/features/qt.prf: +/usr/share/qt4/mkspecs/features/unix/thread.prf: +/usr/share/qt4/mkspecs/features/moc.prf: +/usr/share/qt4/mkspecs/features/resources.prf: +/usr/share/qt4/mkspecs/features/uic.prf: +/usr/share/qt4/mkspecs/features/yacc.prf: +/usr/share/qt4/mkspecs/features/lex.prf: +/usr/share/qt4/mkspecs/features/include_source_dir.prf: +/usr/lib/i386-linux-gnu/libQtGui.prl: +/usr/lib/i386-linux-gnu/libQtCore.prl: +qmake: FORCE + @$(QMAKE) -o Makefile stylewindow.pro + +dist: + @$(CHK_DIR_EXISTS) .tmp/styleplugin1.0.0 || $(MKDIR) .tmp/styleplugin1.0.0 + $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/styleplugin1.0.0/ && $(COPY_FILE) --parents stylewindow.h .tmp/styleplugin1.0.0/ && $(COPY_FILE) --parents stylewindow.cpp main.cpp .tmp/styleplugin1.0.0/ && (cd `dirname .tmp/styleplugin1.0.0` && $(TAR) styleplugin1.0.0.tar styleplugin1.0.0 && $(COMPRESS) styleplugin1.0.0.tar) && $(MOVE) `dirname .tmp/styleplugin1.0.0`/styleplugin1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/styleplugin1.0.0 + + +clean:compiler_clean + -$(DEL_FILE) $(OBJECTS) + -$(DEL_FILE) *~ core *.core + + +####### Sub-libraries + +distclean: clean + -$(DEL_FILE) $(TARGET) + -$(DEL_FILE) Makefile + + +check: first + +mocclean: compiler_moc_header_clean compiler_moc_source_clean + +mocables: compiler_moc_header_make_all compiler_moc_source_make_all + +compiler_moc_header_make_all: moc_stylewindow.cpp +compiler_moc_header_clean: + -$(DEL_FILE) moc_stylewindow.cpp +moc_stylewindow.cpp: stylewindow.h + /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) stylewindow.h -o moc_stylewindow.cpp + +compiler_rcc_make_all: +compiler_rcc_clean: +compiler_image_collection_make_all: qmake_image_collection.cpp +compiler_image_collection_clean: + -$(DEL_FILE) qmake_image_collection.cpp +compiler_moc_source_make_all: +compiler_moc_source_clean: +compiler_uic_make_all: +compiler_uic_clean: +compiler_yacc_decl_make_all: +compiler_yacc_decl_clean: +compiler_yacc_impl_make_all: +compiler_yacc_impl_clean: +compiler_lex_make_all: +compiler_lex_clean: +compiler_clean: compiler_moc_header_clean + +####### Compile + +stylewindow.o: stylewindow.cpp stylewindow.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stylewindow.o stylewindow.cpp + +main.o: main.cpp stylewindow.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp + +moc_stylewindow.o: moc_stylewindow.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_stylewindow.o moc_stylewindow.cpp + +####### Install + +install_target: first FORCE + @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/ || $(MKDIR) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/ + -$(INSTALL_PROGRAM) "../$(QMAKE_TARGET)" "$(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/$(QMAKE_TARGET)" + -$(STRIP) "$(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/$(QMAKE_TARGET)" + +uninstall_target: FORCE + -$(DEL_FILE) "$(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/$(QMAKE_TARGET)" + -$(DEL_DIR) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/ + + +install_sources: first FORCE + @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/ || $(MKDIR) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/ + -$(INSTALL_FILE) /root/tdeqt4styleplugin/stylewindow/stylewindow.cpp $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/ + -$(INSTALL_FILE) /root/tdeqt4styleplugin/stylewindow/main.cpp $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/ + -$(INSTALL_FILE) /root/tdeqt4styleplugin/stylewindow/stylewindow.h $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/ + -$(INSTALL_FILE) /root/tdeqt4styleplugin/stylewindow/stylewindow.pro $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/ + + +uninstall_sources: FORCE + -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/stylewindow.cpp + -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/main.cpp + -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/stylewindow.h + -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/stylewindow.pro + -$(DEL_DIR) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/ + + +install: install_target install_sources FORCE + +uninstall: uninstall_target uninstall_sources FORCE + +FORCE: + diff --git a/examples/stylewindow/main.cpp b/examples/stylewindow/main.cpp new file mode 100644 index 0000000..1cf42aa --- /dev/null +++ b/examples/stylewindow/main.cpp @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 <QtGui> + +#include "stylewindow.h" + +//! [0] +int main(int argv, char *args[]) +{ + QApplication app(argv, args); + QApplication::setStyle(QStyleFactory::create("simplestyle")); + + StyleWindow window; + window.resize(200, 50); + window.show(); + + return app.exec(); +} +//! [0] diff --git a/examples/stylewindow/stylewindow.cpp b/examples/stylewindow/stylewindow.cpp new file mode 100644 index 0000000..7ede04c --- /dev/null +++ b/examples/stylewindow/stylewindow.cpp @@ -0,0 +1,91 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 <QtGui> + +#include "stylewindow.h" + +StyleWindow::StyleWindow() +{ + QPushButton *styledButton = new QPushButton(tr("Big Red Button")); + QRadioButton *styledRadioButton = new QRadioButton(tr("Little Radio Button")); + QCheckBox *styledCheckBox = new QCheckBox(tr("Little Check Box")); + QComboBox *styledComboBox = new QComboBox(); + QTextEdit *styledTextEdit = new QTextEdit(); + QProgressBar *styledProgressBar = new QProgressBar(); + QTabBar *styledTabBar = new QTabBar(); + QToolBar *styledToolBar = new QToolBar(); + + QGridLayout *layout = new QGridLayout; + layout->addWidget(styledButton); + layout->addWidget(styledRadioButton); + layout->addWidget(styledCheckBox); + layout->addWidget(styledComboBox); + layout->addWidget(styledTextEdit); + layout->addWidget(styledProgressBar); + layout->addWidget(styledTabBar); + layout->addWidget(styledToolBar); + + styledComboBox->addItem("Hello"); + styledComboBox->addItem("There"); + styledComboBox->addItem("Raja!"); + styledTextEdit->setText("TEST"); + styledProgressBar->setMaximum(100); + styledProgressBar->setValue(50); + styledTabBar->addTab("Tab 1"); + styledTabBar->addTab("Tab 2"); + styledTabBar->addTab("Tab Duplicate"); + styledTabBar->addTab("Tab Duplicate"); + styledTabBar->addTab("Tab Duplicate"); + styledTabBar->addTab("Tab 3"); + styledTabBar->addTab("Tab Duplicate"); + styledTabBar->addTab("Tab Duplicate"); + + styledToolBar->addAction("Save"); + + QGroupBox *styleBox = new QGroupBox(tr("A simple style button")); + styleBox->setLayout(layout); + + QGridLayout *outerLayout = new QGridLayout; + outerLayout->addWidget(styleBox, 0, 0); + setLayout(outerLayout); + + setWindowTitle(tr("Style Plugin Example")); +} diff --git a/examples/stylewindow/stylewindow.h b/examples/stylewindow/stylewindow.h new file mode 100644 index 0000000..aed21c7 --- /dev/null +++ b/examples/stylewindow/stylewindow.h @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 STYLEWINDOW_H +#define STYLEWINDOW_H + +#include <QWidget> + +class StyleWindow : public QWidget +{ + Q_OBJECT + +public: + StyleWindow(); +}; + +#endif diff --git a/examples/stylewindow/stylewindow.pro b/examples/stylewindow/stylewindow.pro new file mode 100644 index 0000000..8ed1541 --- /dev/null +++ b/examples/stylewindow/stylewindow.pro @@ -0,0 +1,19 @@ +HEADERS = stylewindow.h +SOURCES = stylewindow.cpp \ + main.cpp + +TARGET = styleplugin +win32 { + debug:DESTDIR = ../debug/ + release:DESTDIR = ../release/ +} else { + DESTDIR = ../ +} + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS stylewindow.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin/stylewindow +INSTALLS += target sources + +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/tqt3reference/Makefile b/examples/tqt3reference/Makefile new file mode 100644 index 0000000..b3caed5 --- /dev/null +++ b/examples/tqt3reference/Makefile @@ -0,0 +1,167 @@ +############################################################################# +# Makefile for building: ../tqt3referencewindow +# Generated by qmake (1.07a) (TQt 3.4.0) on: Tue Mar 6 12:56:29 2012 +# Project: stylewindow.pro +# Template: app +# Command: $(QMAKE) -o Makefile stylewindow.pro +############################################################################# + +####### Compiler, tools and options + +CC = gcc +CXX = g++ +LEX = flex +YACC = yacc +CFLAGS = -pipe -g -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT +CXXFLAGS = -pipe -g -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT +LEXFLAGS = +YACCFLAGS= -d +INCPATH = -I/usr/share/tqt3/mkspecs/default -I. -I/usr/include/tqt3 -I/usr/include/tqt -I/opt/trinity/include -I/usr/include/tqt3 +LINK = g++ +LFLAGS = +LIBS = $(SUBLIBS) -L/usr/share/tqt3/lib -L/usr/X11R6/lib -L/usr/lib -ltqt -L /opt/trinity/lib -lDCOP -ltdecore -ltqt-mt -lXext -lX11 -lm -lpthread +AR = ar cqs +RANLIB = +MOC = /usr/share/tqt3/bin/moc +UIC = /usr/share/tqt3/bin/uic +QMAKE = qmake +TAR = tar -cf +GZIP = gzip -9f +COPY = cp -f +COPY_FILE= $(COPY) +COPY_DIR = $(COPY) -r +INSTALL_FILE= $(COPY_FILE) +INSTALL_DIR = $(COPY_DIR) +DEL_FILE = rm -f +SYMLINK = ln -sf +DEL_DIR = rmdir +MOVE = mv -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p + +####### Output directory + +OBJECTS_DIR = ./ + +####### Files + +HEADERS = stylewindow.h +SOURCES = stylewindow.cpp \ + main.cpp +OBJECTS = stylewindow.o \ + main.o +FORMS = +UICDECLS = +UICIMPLS = +SRCMOC = moc_stylewindow.cpp +OBJMOC = moc_stylewindow.o +DIST = stylewindow.pro +QMAKE_TARGET = tqt3referencewindow +DESTDIR = ../ +TARGET = ../tqt3referencewindow + +first: all +####### Implicit rules + +.SUFFIXES: .c .o .cpp .cc .cxx .C + +.cpp.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.cc.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.cxx.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.C.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.c.o: + $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< + +####### Build rules + +all: Makefile $(TARGET) + +$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) + test -d ../ || mkdir -p ../ + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(OBJCOMP) $(LIBS) + +mocables: $(SRCMOC) +uicables: $(UICDECLS) $(UICIMPLS) + +$(MOC): + ( cd $(QTDIR)/src/moc && $(MAKE) ) + +Makefile: stylewindow.pro /usr/share/tqt3/mkspecs/default/qmake.conf /usr/share/tqt3/lib/libtqt-mt.prl + $(QMAKE) -o Makefile stylewindow.pro +qmake: + @$(QMAKE) -o Makefile stylewindow.pro + +dist: + @mkdir -p .tmp/tqt3referencewindow && $(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) .tmp/tqt3referencewindow/ && ( cd `dirname .tmp/tqt3referencewindow` && $(TAR) tqt3referencewindow.tar tqt3referencewindow && $(GZIP) tqt3referencewindow.tar ) && $(MOVE) `dirname .tmp/tqt3referencewindow`/tqt3referencewindow.tar.gz . && $(DEL_FILE) -r .tmp/tqt3referencewindow + +mocclean: + -$(DEL_FILE) $(OBJMOC) + -$(DEL_FILE) $(SRCMOC) + +uiclean: + +yaccclean: +lexclean: +clean: mocclean + -$(DEL_FILE) $(OBJECTS) + -$(DEL_FILE) *~ core *.core + + +####### Sub-libraries + +distclean: clean + -$(DEL_FILE) ../$(TARGET) $(TARGET) + + +FORCE: + +####### Compile + +stylewindow.o: stylewindow.cpp stylewindow.h + +main.o: main.cpp stylewindow.h + +moc_stylewindow.o: moc_stylewindow.cpp stylewindow.h + +moc_stylewindow.cpp: $(MOC) stylewindow.h + $(MOC) stylewindow.h -o moc_stylewindow.cpp + +####### Install + +install_target: all + @$(CHK_DIR_EXISTS) "$(INSTALL_ROOT)/tools/tqt3reference/" || $(MKDIR) "$(INSTALL_ROOT)/tools/tqt3reference/" + -$(INSTALL_FILE) "../$(QMAKE_TARGET)" "$(INSTALL_ROOT)/tools/tqt3reference/$(QMAKE_TARGET)" + +uninstall_target: + -$(DEL_FILE) "$(INSTALL_ROOT)/tools/tqt3reference/$(QMAKE_TARGET)" + -$(DEL_DIR) "$(INSTALL_ROOT)/tools/tqt3reference/" + + +install_sources: all + @$(CHK_DIR_EXISTS) "$(INSTALL_ROOT)/tools/styleplugin/tqt3reference/" || $(MKDIR) "$(INSTALL_ROOT)/tools/styleplugin/tqt3reference/" + -$(INSTALL_FILE) "stylewindow.cpp" "$(INSTALL_ROOT)/tools/styleplugin/tqt3reference/" + -$(INSTALL_FILE) "main.cpp" "$(INSTALL_ROOT)/tools/styleplugin/tqt3reference/" + -$(INSTALL_FILE) "stylewindow.h" "$(INSTALL_ROOT)/tools/styleplugin/tqt3reference/" + -$(INSTALL_FILE) "stylewindow.pro" "$(INSTALL_ROOT)/tools/styleplugin/tqt3reference/" + + +uninstall_sources: + -$(DEL_FILE) -r "$(INSTALL_ROOT)/tools/styleplugin/tqt3reference/stylewindow.cpp" + -$(DEL_FILE) -r "$(INSTALL_ROOT)/tools/styleplugin/tqt3reference/main.cpp" + -$(DEL_FILE) -r "$(INSTALL_ROOT)/tools/styleplugin/tqt3reference/stylewindow.h" + -$(DEL_FILE) -r "$(INSTALL_ROOT)/tools/styleplugin/tqt3reference/stylewindow.pro" + -$(DEL_DIR) "$(INSTALL_ROOT)/tools/styleplugin/tqt3reference/" + + +install: install_target install_sources + +uninstall: uninstall_target uninstall_sources + diff --git a/examples/tqt3reference/main.cpp b/examples/tqt3reference/main.cpp new file mode 100644 index 0000000..9ce35a8 --- /dev/null +++ b/examples/tqt3reference/main.cpp @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 <kapplication.h> + +#include "stylewindow.h" + +//! [0] +int main(int argv, char *args[]) +{ + TQApplication app(argv, args); + + StyleWindow window; + window.resize(200, 200); + window.show(); + + return app.exec(); +} +//! [0] diff --git a/examples/tqt3reference/stylewindow.cpp b/examples/tqt3reference/stylewindow.cpp new file mode 100644 index 0000000..0a5ca48 --- /dev/null +++ b/examples/tqt3reference/stylewindow.cpp @@ -0,0 +1,114 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 <ntqcheckbox.h> +#include <ntqcombobox.h> +#include <ntqradiobutton.h> +#include <ntqpushbutton.h> +#include <ntqprogressbar.h> +#include <ntqtextedit.h> +#include <ntqtabbar.h> +#include <ntqtoolbar.h> +#include <ntqtoolbutton.h> +#include <ntqmainwindow.h> +#include <ntqlayout.h> +#include <ntqaction.h> +#include <ntqgroupbox.h> + +#include "stylewindow.h" + +StyleWindow::StyleWindow() +{ + TQGroupBox *styleBox = new TQGroupBox(10,TQt::Vertical,tr("A simple style button"),this); +// styleBox->resize(200,200); + + TQPushButton *styledButton = new TQPushButton(tr("Big Red Button"),styleBox); + TQRadioButton *styledRadioButton = new TQRadioButton(tr("Little Radio Button"),styleBox); + TQCheckBox *styledCheckBox = new TQCheckBox(tr("Little Check Box"),styleBox); + TQComboBox *styledComboBox = new TQComboBox(styleBox); + TQTextEdit *styledTextEdit = new TQTextEdit(styleBox); + TQProgressBar *styledProgressBar = new TQProgressBar(styleBox); + TQTabBar *styledTabBar = new TQTabBar(styleBox); + TQMainWindow *styledMainWindow = new TQMainWindow(this); + +// TQGridLayout *layout = new TQGridLayout(styleBox); +// layout->addWidget(styledButton,0,0); +// layout->addWidget(styledRadioButton,1,0); +// layout->addWidget(styledCheckBox,2,0); +// layout->addWidget(styledComboBox,3,0); +// layout->addWidget(styledTextEdit,4,0); +// layout->addWidget(styledProgressBar,5,0); +// layout->addWidget(styledTabBar,6,0); + + styledComboBox->insertItem("Hello"); + styledComboBox->insertItem("There"); + styledComboBox->insertItem("Raja!"); + styledTextEdit->setText("TEST"); + styledProgressBar->setTotalSteps(100); + styledProgressBar->setProgress(50); + + TQTab* tab1 = new TQTab("Tab 1"); + TQTab* tab2 = new TQTab("Tab 2"); + TQTab* tab3 = new TQTab("Tab Duplicate"); + TQTab* tab4 = new TQTab("Tab Duplicate"); + TQTab* tab5 = new TQTab("Tab Duplicate"); + TQTab* tab6 = new TQTab("Tab 3"); + TQTab* tab7 = new TQTab("Tab Duplicate"); + TQTab* tab8 = new TQTab("Tab Duplicate"); + + styledTabBar->addTab(tab1); + styledTabBar->addTab(tab2); + styledTabBar->addTab(tab3); + styledTabBar->addTab(tab4); + styledTabBar->addTab(tab5); + styledTabBar->addTab(tab6); + styledTabBar->addTab(tab7); + styledTabBar->addTab(tab8); + + TQToolBar *styledToolBar = new TQToolBar(styledMainWindow); + TQAction* toolbutton1 = new TQAction(styledToolBar); + toolbutton1->setText("Save"); + toolbutton1->addTo(styledToolBar); + + TQGridLayout *outerLayout = new TQGridLayout(this); + outerLayout->addWidget(styleBox, 0, 0); + +// setWindowTitle(tr("Style Plugin Example")); +} diff --git a/examples/tqt3reference/stylewindow.h b/examples/tqt3reference/stylewindow.h new file mode 100644 index 0000000..cd35077 --- /dev/null +++ b/examples/tqt3reference/stylewindow.h @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 STYLEWINDOW_H +#define STYLEWINDOW_H + +#include <ntqwidget.h> + +class StyleWindow : public TQWidget +{ + TQ_OBJECT + +public: + StyleWindow(); +}; + +#endif diff --git a/examples/tqt3reference/stylewindow.pro b/examples/tqt3reference/stylewindow.pro new file mode 100644 index 0000000..880e672 --- /dev/null +++ b/examples/tqt3reference/stylewindow.pro @@ -0,0 +1,24 @@ +HEADERS = stylewindow.h +SOURCES = stylewindow.cpp \ + main.cpp + +TARGET = tqt3referencewindow +win32 { + debug:DESTDIR = ../debug/ + release:DESTDIR = ../release/ +} else { + DESTDIR = ../ +} + +INCLUDEPATH += /usr/include/tqt3 +INCLUDEPATH += /usr/include/tqt +INCLUDEPATH += /opt/trinity/include +LIBS += -L/usr/lib -ltqt -ltqt-mt -L /opt/trinity/lib -lDCOP -ltdecore + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/tools/tqt3reference +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS stylewindow.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin/tqt3reference +INSTALLS += target sources + +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/unstyledwindow/Makefile b/examples/unstyledwindow/Makefile new file mode 100644 index 0000000..e9d5f39 --- /dev/null +++ b/examples/unstyledwindow/Makefile @@ -0,0 +1,242 @@ +############################################################################# +# Makefile for building: ../unstyledplugin +# Generated by qmake (2.01a) (Qt 4.7.4) on: Mon Mar 5 10:54:20 2012 +# Project: unstyledwindow.pro +# Template: app +# Command: /usr/bin/qmake-qt4 -o Makefile unstyledwindow.pro +############################################################################# + +####### Compiler, tools and options + +CC = gcc +CXX = g++ +DEFINES = -DQT_WEBKIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED +CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES) +CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES) +INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. +LINK = g++ +LFLAGS = -Wl,-O1 +LIBS = $(SUBLIBS) -L/usr/lib/i386-linux-gnu -lQtGui -lQtCore -lpthread +AR = ar cqs +RANLIB = +QMAKE = /usr/bin/qmake-qt4 +TAR = tar -cf +COMPRESS = gzip -9f +COPY = cp -f +SED = sed +COPY_FILE = $(COPY) +COPY_DIR = $(COPY) -r +STRIP = strip +INSTALL_FILE = install -m 644 -p +INSTALL_DIR = $(COPY_DIR) +INSTALL_PROGRAM = install -m 755 -p +DEL_FILE = rm -f +SYMLINK = ln -f -s +DEL_DIR = rmdir +MOVE = mv -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p + +####### Output directory + +OBJECTS_DIR = ./ + +####### Files + +SOURCES = stylewindow.cpp \ + main.cpp moc_stylewindow.cpp +OBJECTS = stylewindow.o \ + main.o \ + moc_stylewindow.o +DIST = /usr/share/qt4/mkspecs/common/g++.conf \ + /usr/share/qt4/mkspecs/common/unix.conf \ + /usr/share/qt4/mkspecs/common/linux.conf \ + /usr/share/qt4/mkspecs/qconfig.pri \ + /usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \ + /usr/share/qt4/mkspecs/features/qt_functions.prf \ + /usr/share/qt4/mkspecs/features/qt_config.prf \ + /usr/share/qt4/mkspecs/features/exclusive_builds.prf \ + /usr/share/qt4/mkspecs/features/default_pre.prf \ + /usr/share/qt4/mkspecs/features/release.prf \ + /usr/share/qt4/mkspecs/features/default_post.prf \ + /usr/share/qt4/mkspecs/features/warn_on.prf \ + /usr/share/qt4/mkspecs/features/qt.prf \ + /usr/share/qt4/mkspecs/features/unix/thread.prf \ + /usr/share/qt4/mkspecs/features/moc.prf \ + /usr/share/qt4/mkspecs/features/resources.prf \ + /usr/share/qt4/mkspecs/features/uic.prf \ + /usr/share/qt4/mkspecs/features/yacc.prf \ + /usr/share/qt4/mkspecs/features/lex.prf \ + /usr/share/qt4/mkspecs/features/include_source_dir.prf \ + unstyledwindow.pro +QMAKE_TARGET = unstyledplugin +DESTDIR = ../ +TARGET = ../unstyledplugin + +first: all +####### Implicit rules + +.SUFFIXES: .o .c .cpp .cc .cxx .C + +.cpp.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cc.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cxx.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.C.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.c.o: + $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" + +####### Build rules + +all: Makefile $(TARGET) + +$(TARGET): $(OBJECTS) + @$(CHK_DIR_EXISTS) ../ || $(MKDIR) ../ + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) + +Makefile: unstyledwindow.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/g++.conf \ + /usr/share/qt4/mkspecs/common/unix.conf \ + /usr/share/qt4/mkspecs/common/linux.conf \ + /usr/share/qt4/mkspecs/qconfig.pri \ + /usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \ + /usr/share/qt4/mkspecs/features/qt_functions.prf \ + /usr/share/qt4/mkspecs/features/qt_config.prf \ + /usr/share/qt4/mkspecs/features/exclusive_builds.prf \ + /usr/share/qt4/mkspecs/features/default_pre.prf \ + /usr/share/qt4/mkspecs/features/release.prf \ + /usr/share/qt4/mkspecs/features/default_post.prf \ + /usr/share/qt4/mkspecs/features/warn_on.prf \ + /usr/share/qt4/mkspecs/features/qt.prf \ + /usr/share/qt4/mkspecs/features/unix/thread.prf \ + /usr/share/qt4/mkspecs/features/moc.prf \ + /usr/share/qt4/mkspecs/features/resources.prf \ + /usr/share/qt4/mkspecs/features/uic.prf \ + /usr/share/qt4/mkspecs/features/yacc.prf \ + /usr/share/qt4/mkspecs/features/lex.prf \ + /usr/share/qt4/mkspecs/features/include_source_dir.prf \ + /usr/lib/i386-linux-gnu/libQtGui.prl \ + /usr/lib/i386-linux-gnu/libQtCore.prl + $(QMAKE) -o Makefile unstyledwindow.pro +/usr/share/qt4/mkspecs/common/g++.conf: +/usr/share/qt4/mkspecs/common/unix.conf: +/usr/share/qt4/mkspecs/common/linux.conf: +/usr/share/qt4/mkspecs/qconfig.pri: +/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri: +/usr/share/qt4/mkspecs/features/qt_functions.prf: +/usr/share/qt4/mkspecs/features/qt_config.prf: +/usr/share/qt4/mkspecs/features/exclusive_builds.prf: +/usr/share/qt4/mkspecs/features/default_pre.prf: +/usr/share/qt4/mkspecs/features/release.prf: +/usr/share/qt4/mkspecs/features/default_post.prf: +/usr/share/qt4/mkspecs/features/warn_on.prf: +/usr/share/qt4/mkspecs/features/qt.prf: +/usr/share/qt4/mkspecs/features/unix/thread.prf: +/usr/share/qt4/mkspecs/features/moc.prf: +/usr/share/qt4/mkspecs/features/resources.prf: +/usr/share/qt4/mkspecs/features/uic.prf: +/usr/share/qt4/mkspecs/features/yacc.prf: +/usr/share/qt4/mkspecs/features/lex.prf: +/usr/share/qt4/mkspecs/features/include_source_dir.prf: +/usr/lib/i386-linux-gnu/libQtGui.prl: +/usr/lib/i386-linux-gnu/libQtCore.prl: +qmake: FORCE + @$(QMAKE) -o Makefile unstyledwindow.pro + +dist: + @$(CHK_DIR_EXISTS) .tmp/unstyledplugin1.0.0 || $(MKDIR) .tmp/unstyledplugin1.0.0 + $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/unstyledplugin1.0.0/ && $(COPY_FILE) --parents stylewindow.h .tmp/unstyledplugin1.0.0/ && $(COPY_FILE) --parents stylewindow.cpp main.cpp .tmp/unstyledplugin1.0.0/ && (cd `dirname .tmp/unstyledplugin1.0.0` && $(TAR) unstyledplugin1.0.0.tar unstyledplugin1.0.0 && $(COMPRESS) unstyledplugin1.0.0.tar) && $(MOVE) `dirname .tmp/unstyledplugin1.0.0`/unstyledplugin1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/unstyledplugin1.0.0 + + +clean:compiler_clean + -$(DEL_FILE) $(OBJECTS) + -$(DEL_FILE) *~ core *.core + + +####### Sub-libraries + +distclean: clean + -$(DEL_FILE) $(TARGET) + -$(DEL_FILE) Makefile + + +check: first + +mocclean: compiler_moc_header_clean compiler_moc_source_clean + +mocables: compiler_moc_header_make_all compiler_moc_source_make_all + +compiler_moc_header_make_all: moc_stylewindow.cpp +compiler_moc_header_clean: + -$(DEL_FILE) moc_stylewindow.cpp +moc_stylewindow.cpp: stylewindow.h + /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) stylewindow.h -o moc_stylewindow.cpp + +compiler_rcc_make_all: +compiler_rcc_clean: +compiler_image_collection_make_all: qmake_image_collection.cpp +compiler_image_collection_clean: + -$(DEL_FILE) qmake_image_collection.cpp +compiler_moc_source_make_all: +compiler_moc_source_clean: +compiler_uic_make_all: +compiler_uic_clean: +compiler_yacc_decl_make_all: +compiler_yacc_decl_clean: +compiler_yacc_impl_make_all: +compiler_yacc_impl_clean: +compiler_lex_make_all: +compiler_lex_clean: +compiler_clean: compiler_moc_header_clean + +####### Compile + +stylewindow.o: stylewindow.cpp stylewindow.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stylewindow.o stylewindow.cpp + +main.o: main.cpp stylewindow.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp + +moc_stylewindow.o: moc_stylewindow.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_stylewindow.o moc_stylewindow.cpp + +####### Install + +install_target: first FORCE + @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/ || $(MKDIR) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/ + -$(INSTALL_PROGRAM) "../$(QMAKE_TARGET)" "$(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/$(QMAKE_TARGET)" + -$(STRIP) "$(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/$(QMAKE_TARGET)" + +uninstall_target: FORCE + -$(DEL_FILE) "$(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/$(QMAKE_TARGET)" + -$(DEL_DIR) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/ + + +install_sources: first FORCE + @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/ || $(MKDIR) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/ + -$(INSTALL_FILE) /root/tdeqt4styleplugin/unstyledwindow/stylewindow.cpp $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/ + -$(INSTALL_FILE) /root/tdeqt4styleplugin/unstyledwindow/main.cpp $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/ + -$(INSTALL_FILE) /root/tdeqt4styleplugin/unstyledwindow/stylewindow.h $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/ + -$(INSTALL_FILE) /root/tdeqt4styleplugin/unstyledwindow/unstyledwindow.pro $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/ + + +uninstall_sources: FORCE + -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/stylewindow.cpp + -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/main.cpp + -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/stylewindow.h + -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/unstyledwindow.pro + -$(DEL_DIR) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/ + + +install: install_target install_sources FORCE + +uninstall: uninstall_target uninstall_sources FORCE + +FORCE: + diff --git a/examples/unstyledwindow/main.cpp b/examples/unstyledwindow/main.cpp new file mode 100644 index 0000000..6e2ad29 --- /dev/null +++ b/examples/unstyledwindow/main.cpp @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 <QtGui> + +#include "stylewindow.h" + +//! [0] +int main(int argv, char *args[]) +{ + QApplication app(argv, args); + QApplication::setStyle(QStyleFactory::create("plastique")); + + StyleWindow window; + window.resize(200, 50); + window.show(); + + return app.exec(); +} +//! [0] diff --git a/examples/unstyledwindow/stylewindow.cpp b/examples/unstyledwindow/stylewindow.cpp new file mode 100644 index 0000000..7d3f5f1 --- /dev/null +++ b/examples/unstyledwindow/stylewindow.cpp @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 <QtGui> + +#include "stylewindow.h" + +StyleWindow::StyleWindow() +{ + QPushButton *styledButton = new QPushButton(tr("Big Red Button")); + QRadioButton *styledRadioButton = new QRadioButton(tr("Little Radio Button")); + QCheckBox *styledCheckBox = new QCheckBox(tr("Little Check Box")); + QComboBox *styledComboBox = new QComboBox(); + QTextEdit *styledTextEdit = new QTextEdit(); + QProgressBar *styledProgressBar = new QProgressBar(); + QTabBar *styledTabBar = new QTabBar(); + + QGridLayout *layout = new QGridLayout; + layout->addWidget(styledButton); + layout->addWidget(styledRadioButton); + layout->addWidget(styledCheckBox); + layout->addWidget(styledComboBox); + layout->addWidget(styledTextEdit); + layout->addWidget(styledProgressBar); + layout->addWidget(styledTabBar); + + styledComboBox->addItem("Hello"); + styledComboBox->addItem("There"); + styledComboBox->addItem("Raja!"); + styledTextEdit->setText("TEST"); + styledProgressBar->setMaximum(100); + styledProgressBar->setValue(50); + styledTabBar->addTab("Tab 1"); + styledTabBar->addTab("Tab 2"); + styledTabBar->addTab("Tab Duplicate"); + styledTabBar->addTab("Tab Duplicate"); + styledTabBar->addTab("Tab Duplicate"); + styledTabBar->addTab("Tab 3"); + styledTabBar->addTab("Tab Duplicate"); + styledTabBar->addTab("Tab Duplicate"); + + QGroupBox *styleBox = new QGroupBox(tr("A simple style button")); + styleBox->setLayout(layout); + + QGridLayout *outerLayout = new QGridLayout; + outerLayout->addWidget(styleBox, 0, 0); + setLayout(outerLayout); + + setWindowTitle(tr("Style Plugin Example")); +} diff --git a/examples/unstyledwindow/stylewindow.h b/examples/unstyledwindow/stylewindow.h new file mode 100644 index 0000000..aed21c7 --- /dev/null +++ b/examples/unstyledwindow/stylewindow.h @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** 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 STYLEWINDOW_H +#define STYLEWINDOW_H + +#include <QWidget> + +class StyleWindow : public QWidget +{ + Q_OBJECT + +public: + StyleWindow(); +}; + +#endif diff --git a/examples/unstyledwindow/unstyledwindow.pro b/examples/unstyledwindow/unstyledwindow.pro new file mode 100644 index 0000000..e7a2ef4 --- /dev/null +++ b/examples/unstyledwindow/unstyledwindow.pro @@ -0,0 +1,19 @@ +HEADERS = stylewindow.h +SOURCES = stylewindow.cpp \ + main.cpp + +TARGET = unstyledplugin +win32 { + debug:DESTDIR = ../debug/ + release:DESTDIR = ../release/ +} else { + DESTDIR = ../ +} + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/tools/unstyledplugin +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS unstyledwindow.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/tools/unstyledplugin/unstyledwindow +INSTALLS += target sources + +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) |