summaryrefslogtreecommitdiffstats
path: root/tqt3reference
diff options
context:
space:
mode:
Diffstat (limited to 'tqt3reference')
-rw-r--r--tqt3reference/Makefile167
-rw-r--r--tqt3reference/main.cpp56
-rw-r--r--tqt3reference/stylewindow.cpp114
-rw-r--r--tqt3reference/stylewindow.h54
-rw-r--r--tqt3reference/stylewindow.pro24
5 files changed, 415 insertions, 0 deletions
diff --git a/tqt3reference/Makefile b/tqt3reference/Makefile
new file mode 100644
index 0000000..b3caed5
--- /dev/null
+++ b/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/tqt3reference/main.cpp b/tqt3reference/main.cpp
new file mode 100644
index 0000000..9ce35a8
--- /dev/null
+++ b/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/tqt3reference/stylewindow.cpp b/tqt3reference/stylewindow.cpp
new file mode 100644
index 0000000..0a5ca48
--- /dev/null
+++ b/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/tqt3reference/stylewindow.h b/tqt3reference/stylewindow.h
new file mode 100644
index 0000000..cd35077
--- /dev/null
+++ b/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/tqt3reference/stylewindow.pro b/tqt3reference/stylewindow.pro
new file mode 100644
index 0000000..880e672
--- /dev/null
+++ b/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)