Author: tgoettlicher
Date: Mon Aug 25 11:08:14 2008
New Revision: 50350
URL: http://svn.opensuse.org/viewcvs/yast?rev=50350&view=rev
Log:
initial checkin
Added:
branches/tmp/tgoettlicher/activityguide/
branches/tmp/tgoettlicher/activityguide/Makefile
branches/tmp/tgoettlicher/activityguide/src/
branches/tmp/tgoettlicher/activityguide/src/MapView.cpp
branches/tmp/tgoettlicher/activityguide/src/MapView.h
branches/tmp/tgoettlicher/activityguide/src/main.cpp
branches/tmp/tgoettlicher/activityguide/src/mainwindow.cpp
branches/tmp/tgoettlicher/activityguide/src/mainwindow.h
Added: branches/tmp/tgoettlicher/activityguide/Makefile
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/activityguide/Makefile?rev=50350&view=auto
==============================================================================
--- branches/tmp/tgoettlicher/activityguide/Makefile (added)
+++ branches/tmp/tgoettlicher/activityguide/Makefile Mon Aug 25 11:08:14 2008
@@ -0,0 +1,220 @@
+#############################################################################
+# Makefile for building: qmaps
+# Generated by qmake (2.01a) (Qt 4.4.1) on: Fri Aug 22 15:36:05 2008
+# Project: qmaps.pro
+# Template: app
+# Command: /usr/bin/qmake -unix -o Makefile qmaps.pro
+#############################################################################
+
+####### Compiler, tools and options
+
+CC = gcc
+CXX = g++
+DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
+CFLAGS = -pipe -O2 -O2 -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -g -Wall -W -D_REENTRANT $(DEFINES)
+CXXFLAGS = -pipe -O2 -O2 -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -g -Wall -W -D_REENTRANT $(DEFINES)
+INCPATH = -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtGui -I/usr/include -I. -Isrc -I. -I.
+LINK = g++
+LFLAGS =
+LIBS = $(SUBLIBS) -L/usr/lib -lQtGui -L/usr/lib -L/usr/X11R6/lib -lpng -lSM -lICE -lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtCore -lz -lm -lrt -ldl -lpthread
+AR = ar cqs
+RANLIB =
+QMAKE = /usr/bin/qmake
+TAR = tar -cf
+COMPRESS = gzip -9f
+COPY = cp -f
+SED = sed
+COPY_FILE = $(COPY)
+COPY_DIR = $(COPY) -r
+INSTALL_FILE = install -m 644 -p
+INSTALL_DIR = $(COPY_DIR)
+INSTALL_PROGRAM = install -m 755 -p
+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
+
+SOURCES = src/main.cpp \
+ src/mainwindow.cpp \
+ src/MapView.cpp moc_mainwindow.cpp \
+ moc_MapView.cpp
+OBJECTS = main.o \
+ mainwindow.o \
+ MapView.o \
+ moc_mainwindow.o \
+ moc_MapView.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/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 \
+ qmaps.pro
+QMAKE_TARGET = qmaps
+DESTDIR =
+TARGET = qmaps
+
+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)
+ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
+
+Makefile: qmaps.pro /usr/share/qt4/mkspecs/default/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/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/lib/libQtGui.prl \
+ /usr/lib/libQtCore.prl
+ $(QMAKE) -unix -o Makefile qmaps.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/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/lib/libQtGui.prl:
+/usr/lib/libQtCore.prl:
+qmake: FORCE
+ @$(QMAKE) -unix -o Makefile qmaps.pro
+
+dist:
+ @$(CHK_DIR_EXISTS) .tmp/qmaps1.0.0 || $(MKDIR) .tmp/qmaps1.0.0
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/qmaps1.0.0/ && $(COPY_FILE) --parents src/mainwindow.h src/MapView.h .tmp/qmaps1.0.0/ && $(COPY_FILE) --parents src/main.cpp src/mainwindow.cpp src/MapView.cpp .tmp/qmaps1.0.0/ && (cd `dirname .tmp/qmaps1.0.0` && $(TAR) qmaps1.0.0.tar qmaps1.0.0 && $(COMPRESS) qmaps1.0.0.tar) && $(MOVE) `dirname .tmp/qmaps1.0.0`/qmaps1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/qmaps1.0.0
+
+
+clean:compiler_clean
+ -$(DEL_FILE) $(OBJECTS)
+ -$(DEL_FILE) *~ core *.core
+
+
+####### Sub-libraries
+
+distclean: clean
+ -$(DEL_FILE) $(TARGET)
+ -$(DEL_FILE) Makefile
+
+
+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_mainwindow.cpp moc_MapView.cpp
+compiler_moc_header_clean:
+ -$(DEL_FILE) moc_mainwindow.cpp moc_MapView.cpp
+moc_mainwindow.cpp: src/mainwindow.h
+ /usr/bin/moc $(DEFINES) $(INCPATH) src/mainwindow.h -o moc_mainwindow.cpp
+
+moc_MapView.cpp: src/MapView.h
+ /usr/bin/moc $(DEFINES) $(INCPATH) src/MapView.h -o moc_MapView.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
+
+main.o: src/main.cpp src/mainwindow.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o src/main.cpp
+
+mainwindow.o: src/mainwindow.cpp src/MapView.h \
+ src/mainwindow.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o src/mainwindow.cpp
+
+MapView.o: src/MapView.cpp src/MapView.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o MapView.o src/MapView.cpp
+
+moc_mainwindow.o: moc_mainwindow.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp
+
+moc_MapView.o: moc_MapView.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_MapView.o moc_MapView.cpp
+
+####### Install
+
+install: FORCE
+
+uninstall: FORCE
+
+FORCE:
+
Added: branches/tmp/tgoettlicher/activityguide/src/MapView.cpp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/activityguide/src/MapView.cpp?rev=50350&view=auto
==============================================================================
--- branches/tmp/tgoettlicher/activityguide/src/MapView.cpp (added)
+++ branches/tmp/tgoettlicher/activityguide/src/MapView.cpp Mon Aug 25 11:08:14 2008
@@ -0,0 +1,57 @@
+#include "MapView.h"
+#include <QPainter>
+#include <QMouseEvent>
+
+MapView::MapView( QWidget* parent)
+ : QFrame(parent)
+ , x(0)
+ , y(0)
+ , tempx(0)
+ , tempy(0)
+{
+ setFrameStyle(QFrame::Panel | QFrame::Sunken);
+ setLineWidth(2);
+
+}
+
+void MapView::paintEvent(QPaintEvent *event)
+{
+
+ QPixmap pixmap("map.png");
+ QPainter painter(this);
+ painter.setBrush(QBrush(QColor(100,200,100)));
+
+ painter.drawRect(0+x,0+y,100,100);
+
+
+ painter.drawPixmap(0+x,0+y, pixmap );
+ painter.drawPixmap(100+x,100+y, pixmap );
+ painter.drawPixmap(-10+x,100+y, pixmap );
+
+ painter.setPen(QColor(255,0,0));
+ painter.drawLine(10+x,40+y,100+x,200+y);
+
+ painter.end();
+
+ QFrame::paintEvent(event);
+}
+
+
+void MapView::mousePressEvent ( QMouseEvent * event )
+{
+ tempx=event->pos().x();
+ tempy=event->pos().y();
+
+}
+
+void MapView::mouseMoveEvent ( QMouseEvent * event )
+{
+
+ x += event->pos().x() - tempx;
+ y += event->pos().y() - tempy;
+
+ tempx=event->pos().x();
+ tempy=event->pos().y();
+
+ repaint();
+}
Added: branches/tmp/tgoettlicher/activityguide/src/MapView.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/activityguide/src/MapView.h?rev=50350&view=auto
==============================================================================
--- branches/tmp/tgoettlicher/activityguide/src/MapView.h (added)
+++ branches/tmp/tgoettlicher/activityguide/src/MapView.h Mon Aug 25 11:08:14 2008
@@ -0,0 +1,30 @@
+#ifndef _MAPVIEW_H
+#define _MAPVIEW_H
+
+#include <QObject>
+#include <QFrame>
+
+class MapView : public QFrame
+{
+ Q_OBJECT
+
+public:
+ MapView(QWidget* parent=0);
+
+private:
+
+ void paintEvent(QPaintEvent *event);
+ void mouseMoveEvent ( QMouseEvent * event );
+ void mousePressEvent ( QMouseEvent * event );
+
+ int x;
+ int y;
+
+ int tempx;
+ int tempy;
+
+};
+
+
+#endif
+
Added: branches/tmp/tgoettlicher/activityguide/src/main.cpp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/activityguide/src/main.cpp?rev=50350&view=auto
==============================================================================
--- branches/tmp/tgoettlicher/activityguide/src/main.cpp (added)
+++ branches/tmp/tgoettlicher/activityguide/src/main.cpp Mon Aug 25 11:08:14 2008
@@ -0,0 +1,13 @@
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main( int argc, char **argv )
+{
+ QApplication app(argc, argv);
+ MainWindow mainWin;
+ mainWin.show();
+ app.exec();
+ return 0;
+}
+
Added: branches/tmp/tgoettlicher/activityguide/src/mainwindow.cpp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/activityguide/src/mainwindow.cpp?rev=50350&view=auto
==============================================================================
--- branches/tmp/tgoettlicher/activityguide/src/mainwindow.cpp (added)
+++ branches/tmp/tgoettlicher/activityguide/src/mainwindow.cpp Mon Aug 25 11:08:14 2008
@@ -0,0 +1,29 @@
+#include <QLayout>
+#include <QPushButton>
+
+#include "MapView.h"
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+ : QMainWindow( 0 )
+{
+
+
+ QWidget* centralWidget = new QWidget(this);
+ QVBoxLayout* layout = new QVBoxLayout();
+
+ MapView* mapWidget = new MapView(centralWidget);
+ setCentralWidget(centralWidget);
+ layout->addWidget(mapWidget);
+
+ QPushButton* button = new QPushButton(centralWidget);
+ layout->addWidget(button);
+
+
+ centralWidget->setLayout(layout);
+
+
+
+
+}
+
Added: branches/tmp/tgoettlicher/activityguide/src/mainwindow.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/activityguide/src/mainwindow.h?rev=50350&view=auto
==============================================================================
--- branches/tmp/tgoettlicher/activityguide/src/mainwindow.h (added)
+++ branches/tmp/tgoettlicher/activityguide/src/mainwindow.h Mon Aug 25 11:08:14 2008
@@ -0,0 +1,18 @@
+#ifndef _MAIN_WINDOW_H_
+#define _MAIN_WINDOW_H_
+
+#include