---
NotePad/Makefile | 217 --------------------------------------------------
NotePad/NotePad | Bin 320850 -> 0 bytes
Test/Makefile | 217 --------------------------------------------------
Test2/Makefile | 217 --------------------------------------------------
Test2/Test2 | Bin 33670 -> 0 bytes
Test2/Test2.pro | 21 ++---
Test2/Test2.pro.user | 186 +++++++++++++++++++++++++++++++++++++------
Test2/mouseevent.cpp | 1 +
Test2/mouseevent.h | 14 +++
Test2/picture.cpp | 79 ++++++++++++++++++
Test2/picture.h | 34 ++++++++
Test2/test2.cpp | 65 ++++++++++++---
Test2/test2.h | 15 +++-
Test2/test2.ui | 49 +++++++++---
14 files changed, 402 insertions(+), 713 deletions(-)
delete mode 100644 NotePad/Makefile
delete mode 100755 NotePad/NotePad
delete mode 100644 Test/Makefile
delete mode 100644 Test2/Makefile
delete mode 100755 Test2/Test2
create mode 100644 Test2/mouseevent.cpp
create mode 100644 Test2/mouseevent.h
create mode 100644 Test2/picture.cpp
create mode 100644 Test2/picture.h
diff --git a/NotePad/Makefile b/NotePad/Makefile
deleted file mode 100644
index 1cc720f..0000000
--- a/NotePad/Makefile
+++ /dev/null
@@ -1,217 +0,0 @@
-#############################################################################
-# Makefile for building: NotePad
-# Generated by qmake (2.01a) (Qt 4.6.3) on: lun. janv. 7 14:51:21 2013
-# Project: NotePad.pro
-# Template: app
-# Command: /usr/bin/qmake-qt4 -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug
-o Makefile NotePad.pro
-#############################################################################
-
-####### Compiler, tools and options
-
-CC = gcc
-CXX = g++
-DEFINES = -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
-CFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
-CXXFLAGS = -pipe -g -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. -I.
-LINK = g++
-LFLAGS =
-LIBS = $(SUBLIBS) -L/usr/lib -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 = main.cpp \
- notepad.cpp moc_notepad.cpp
-OBJECTS = main.o \
- notepad.o \
- moc_notepad.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/debug.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 \
- NotePad.pro
-QMAKE_TARGET = NotePad
-DESTDIR =
-TARGET = NotePad
-
-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): ui_notepad.h $(OBJECTS)
- $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
-
-Makefile: NotePad.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/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/debug.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/libQtGui.prl \
- /usr/lib/libQtCore.prl
- $(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile
NotePad.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/debug.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/libQtGui.prl:
-/usr/lib/libQtCore.prl:
-qmake: FORCE
- @$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile
NotePad.pro
-
-dist:
- @$(CHK_DIR_EXISTS) .tmp/NotePad1.0.0 || $(MKDIR) .tmp/NotePad1.0.0
- $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/NotePad1.0.0/ && $(COPY_FILE)
--parents notepad.h .tmp/NotePad1.0.0/ && $(COPY_FILE) --parents main.cpp
notepad.cpp .tmp/NotePad1.0.0/ && $(COPY_FILE) --parents notepad.ui
.tmp/NotePad1.0.0/ && (cd `dirname .tmp/NotePad1.0.0` && $(TAR)
NotePad1.0.0.tar NotePad1.0.0 && $(COMPRESS) NotePad1.0.0.tar) && $(MOVE)
`dirname .tmp/NotePad1.0.0`/NotePad1.0.0.tar.gz . && $(DEL_FILE) -r
.tmp/NotePad1.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_notepad.cpp
-compiler_moc_header_clean:
- -$(DEL_FILE) moc_notepad.cpp
-moc_notepad.cpp: notepad.h
- /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) notepad.h -o moc_notepad.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: ui_notepad.h
-compiler_uic_clean:
- -$(DEL_FILE) ui_notepad.h
-ui_notepad.h: notepad.ui
- /usr/bin/uic-qt4 notepad.ui -o ui_notepad.h
-
-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 compiler_uic_clean
-
-####### Compile
-
-main.o: main.cpp notepad.h
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
-
-notepad.o: notepad.cpp notepad.h \
- ui_notepad.h
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o notepad.o notepad.cpp
-
-moc_notepad.o: moc_notepad.cpp
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_notepad.o moc_notepad.cpp
-
-####### Install
-
-install: FORCE
-
-uninstall: FORCE
-
-FORCE:
-
diff --git a/NotePad/NotePad b/NotePad/NotePad
deleted file mode 100755
index 19550a9..0000000
Binary files a/NotePad/NotePad and /dev/null differ
diff --git a/Test/Makefile b/Test/Makefile
deleted file mode 100644
index 9c4ef80..0000000
--- a/Test/Makefile
+++ /dev/null
@@ -1,217 +0,0 @@
-#############################################################################
-# Makefile for building: Test
-# Generated by qmake (2.01a) (Qt 4.6.3) on: lun. janv. 7 17:05:16 2013
-# Project: Test.pro
-# Template: app
-# Command: /usr/bin/qmake-qt4 -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug
-o Makefile Test.pro
-#############################################################################
-
-####### Compiler, tools and options
-
-CC = gcc
-CXX = g++
-DEFINES = -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
-CFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
-CXXFLAGS = -pipe -g -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. -I.
-LINK = g++
-LFLAGS =
-LIBS = $(SUBLIBS) -L/usr/lib -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 = main.cpp \
- test.cpp moc_test.cpp
-OBJECTS = main.o \
- test.o \
- moc_test.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/debug.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 \
- Test.pro
-QMAKE_TARGET = Test
-DESTDIR =
-TARGET = Test
-
-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): ui_test.h $(OBJECTS)
- $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
-
-Makefile: Test.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/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/debug.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/libQtGui.prl \
- /usr/lib/libQtCore.prl
- $(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile
Test.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/debug.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/libQtGui.prl:
-/usr/lib/libQtCore.prl:
-qmake: FORCE
- @$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile
Test.pro
-
-dist:
- @$(CHK_DIR_EXISTS) .tmp/Test1.0.0 || $(MKDIR) .tmp/Test1.0.0
- $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/Test1.0.0/ && $(COPY_FILE)
--parents test.h .tmp/Test1.0.0/ && $(COPY_FILE) --parents main.cpp test.cpp
.tmp/Test1.0.0/ && $(COPY_FILE) --parents test.ui .tmp/Test1.0.0/ && (cd
`dirname .tmp/Test1.0.0` && $(TAR) Test1.0.0.tar Test1.0.0 && $(COMPRESS)
Test1.0.0.tar) && $(MOVE) `dirname .tmp/Test1.0.0`/Test1.0.0.tar.gz . &&
$(DEL_FILE) -r .tmp/Test1.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_test.cpp
-compiler_moc_header_clean:
- -$(DEL_FILE) moc_test.cpp
-moc_test.cpp: test.h
- /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) test.h -o moc_test.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: ui_test.h
-compiler_uic_clean:
- -$(DEL_FILE) ui_test.h
-ui_test.h: test.ui
- /usr/bin/uic-qt4 test.ui -o ui_test.h
-
-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 compiler_uic_clean
-
-####### Compile
-
-main.o: main.cpp test.h
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
-
-test.o: test.cpp test.h \
- ui_test.h
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o test.o test.cpp
-
-moc_test.o: moc_test.cpp
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_test.o moc_test.cpp
-
-####### Install
-
-install: FORCE
-
-uninstall: FORCE
-
-FORCE:
-
diff --git a/Test2/Makefile b/Test2/Makefile
deleted file mode 100644
index 9c69b5c..0000000
--- a/Test2/Makefile
+++ /dev/null
@@ -1,217 +0,0 @@
-#############################################################################
-# Makefile for building: Test2
-# Generated by qmake (2.01a) (Qt 4.6.3) on: lun. janv. 7 17:27:09 2013
-# Project: Test2.pro
-# Template: app
-# Command: /usr/bin/qmake-qt4 -spec /usr/share/qt4/mkspecs/linux-g++ -unix -o Makefile
Test2.pro
-#############################################################################
-
-####### Compiler, tools and options
-
-CC = gcc
-CXX = g++
-DEFINES = -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. -I.
-LINK = g++
-LFLAGS = -Wl,-O1
-LIBS = $(SUBLIBS) -L/usr/lib -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 = main.cpp \
- test2.cpp moc_test2.cpp
-OBJECTS = main.o \
- test2.o \
- moc_test2.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 \
- /usr/share/qt4/mkspecs/features/include_source_dir.prf \
- Test2.pro
-QMAKE_TARGET = Test2
-DESTDIR =
-TARGET = Test2
-
-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): ui_test2.h $(OBJECTS)
- $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
-
-Makefile: Test2.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/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/libQtGui.prl \
- /usr/lib/libQtCore.prl
- $(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix -o Makefile Test2.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/share/qt4/mkspecs/features/include_source_dir.prf:
-/usr/lib/libQtGui.prl:
-/usr/lib/libQtCore.prl:
-qmake: FORCE
- @$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix -o Makefile Test2.pro
-
-dist:
- @$(CHK_DIR_EXISTS) .tmp/Test21.0.0 || $(MKDIR) .tmp/Test21.0.0
- $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/Test21.0.0/ && $(COPY_FILE)
--parents test2.h .tmp/Test21.0.0/ && $(COPY_FILE) --parents main.cpp test2.cpp
.tmp/Test21.0.0/ && $(COPY_FILE) --parents test2.ui .tmp/Test21.0.0/ &&
(cd `dirname .tmp/Test21.0.0` && $(TAR) Test21.0.0.tar Test21.0.0 &&
$(COMPRESS) Test21.0.0.tar) && $(MOVE) `dirname .tmp/Test21.0.0`/Test21.0.0.tar.gz
. && $(DEL_FILE) -r .tmp/Test21.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_test2.cpp
-compiler_moc_header_clean:
- -$(DEL_FILE) moc_test2.cpp
-moc_test2.cpp: test2.h
- /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) test2.h -o moc_test2.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: ui_test2.h
-compiler_uic_clean:
- -$(DEL_FILE) ui_test2.h
-ui_test2.h: test2.ui
- /usr/bin/uic-qt4 test2.ui -o ui_test2.h
-
-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 compiler_uic_clean
-
-####### Compile
-
-main.o: main.cpp test2.h
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
-
-test2.o: test2.cpp test2.h \
- ui_test2.h
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o test2.o test2.cpp
-
-moc_test2.o: moc_test2.cpp
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_test2.o moc_test2.cpp
-
-####### Install
-
-install: FORCE
-
-uninstall: FORCE
-
-FORCE:
-
diff --git a/Test2/Test2 b/Test2/Test2
deleted file mode 100755
index b88df66..0000000
Binary files a/Test2/Test2 and /dev/null differ
diff --git a/Test2/Test2.pro b/Test2/Test2.pro
index 5a38ba2..2b4afbb 100644
--- a/Test2/Test2.pro
+++ b/Test2/Test2.pro
@@ -1,16 +1,11 @@
-#-------------------------------------------------
-#
+# -------------------------------------------------
# Project created by QtCreator 2013-01-07T17:26:53
-#
-#-------------------------------------------------
-
+# -------------------------------------------------
TARGET = Test2
TEMPLATE = app
-
-
-SOURCES += main.cpp\
- test2.cpp
-
-HEADERS += test2.h
-
-FORMS += test2.ui
+SOURCES += main.cpp \
+ test2.cpp \
+ picture.cpp
+HEADERS += test2.h \
+ picture.h
+FORMS += test2.ui
diff --git a/Test2/Test2.pro.user b/Test2/Test2.pro.user
index 21aca01..0d52de4 100644
--- a/Test2/Test2.pro.user
+++ b/Test2/Test2.pro.user
@@ -50,7 +50,7 @@
</data>
<data>
<variable>activebuildconfiguration</variable>
- <value type="QString">Qt dans le PATH Release</value>
+ <value type="QString">Qt dans le PATH Debug</value>
</data>
<data>
<variable>buildConfiguration-Debug</variable>
@@ -67,6 +67,7 @@
<valuemap type="QVariantMap">
<value key="ProjectExplorer.BuildConfiguration.DisplayName"
type="QString">Qt dans le PATH Debug</value>
<value key="QtVersionId" type="int">2</value>
+ <value key="ToolChain" type="int">0</value>
<value key="addQDumper" type=""></value>
<value key="buildConfiguration" type="int">2</value>
</valuemap>
@@ -116,18 +117,155 @@
<variable>buildconfiguration-Qt dans le PATH Debug-buildstep0</variable>
<valuemap type="QVariantMap">
<value key="ProjectExplorer.BuildConfiguration.DisplayName"
type="QString">Qt dans le PATH Debug</value>
+ <valuelist key="abstractProcess.Environment"
type="QVariantList">
+ <value
type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-e3k9D0Tv71,guid=99188e811458388b1144721a005572c8</value>
+ <value type="QString">DESKTOP_SESSION=fluxbox</value>
+ <value type="QString">DISPLAY=:0.0</value>
+ <value type="QString">GDMSESSION=fluxbox</value>
+ <value type="QString">GDM_LANG=fr_FR.UTF-8</value>
+ <value type="QString">GDM_XSERVER_LOCATION=local</value>
+ <value
type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-2ZyR97</value>
+ <value type="QString">GNOME_KEYRING_PID=2693</value>
+ <value type="QString">GTK_MODULES=canberra-gtk-module</value>
+ <value type="QString">HOME=/lrde/home/stage/froger_a</value>
+ <value type="QString">LANG=fr_FR.UTF-8</value>
+ <value
type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator</value>
+ <value type="QString">LOGNAME=froger_a</value>
+ <value
type="QString">OLDPWD=/lrde/home/stage/froger_a/QT</value>
+ <value
type="QString">PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games</value>
+ <value
type="QString">PWD=/lrde/home/stage/froger_a/QT/Test2</value>
+ <value type="QString">QTDIR=/usr/share/qt4</value>
+ <value type="QString">SHELL=/bin/bash</value>
+ <value type="QString">SHLVL=2</value>
+ <value type="QString">SSH_AGENT_PID=2775</value>
+ <value
type="QString">SSH_AUTH_SOCK=/tmp/ssh-FajlDG2702/agent.2702</value>
+ <value type="QString">TERM=xterm</value>
+ <value type="QString">USER=froger_a</value>
+ <value type="QString">USERNAME=froger_a</value>
+ <value type="QString">WINDOWID=16777252</value>
+ <value type="QString">WINDOWPATH=7:8:8:8:8:8:8</value>
+ <value type="QString">XAUTHORITY=/tmp/.gdmD2V5PW</value>
+ <value
type="QString">XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/</value>
+ <value
type="QString">XDG_SESSION_COOKIE=b24883b9b4dbfb80ea83575b00000a11-1357647755.876395-1204336646</value>
+ <value type="QString">XPSERVERLIST=:64 </value>
+ <value type="QString">XTERM_LOCALE=fr_FR.UTF-8</value>
+ <value type="QString">XTERM_SHELL=/bin/bash</value>
+ <value type="QString">XTERM_VERSION=XTerm(261)</value>
+ <value type="QString">_=/usr/bin/qtcreator</value>
+ </valuelist>
+ <valuelist key="abstractProcess.arguments"
type="QVariantList">
+ <value
type="QString">/amd/nfs/volume1/home/stage/froger_a/QT/Test2/Test2.pro</value>
+ <value type="QString">-spec</value>
+ <value type="QString">linux-g++</value>
+ <value type="QString">-r</value>
+ <value type="QString">CONFIG+=debug</value>
+ </valuelist>
+ <value key="abstractProcess.command"
type="QString">/usr/bin/qmake-qt4</value>
+ <value key="abstractProcess.enabled"
type="bool">false</value>
+ <value key="abstractProcess.workingDirectory"
type="QString">/amd/nfs/volume1/home/stage/froger_a/QT/Test2</value>
</valuemap>
</data>
<data>
<variable>buildconfiguration-Qt dans le PATH Debug-buildstep1</variable>
<valuemap type="QVariantMap">
<value key="ProjectExplorer.BuildConfiguration.DisplayName"
type="QString">Qt dans le PATH Debug</value>
+ <valuelist key="abstractProcess.Environment"
type="QVariantList">
+ <value
type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-e3k9D0Tv71,guid=99188e811458388b1144721a005572c8</value>
+ <value type="QString">DESKTOP_SESSION=fluxbox</value>
+ <value type="QString">DISPLAY=:0.0</value>
+ <value type="QString">GDMSESSION=fluxbox</value>
+ <value type="QString">GDM_LANG=fr_FR.UTF-8</value>
+ <value type="QString">GDM_XSERVER_LOCATION=local</value>
+ <value
type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-2ZyR97</value>
+ <value type="QString">GNOME_KEYRING_PID=2693</value>
+ <value type="QString">GTK_MODULES=canberra-gtk-module</value>
+ <value type="QString">HOME=/lrde/home/stage/froger_a</value>
+ <value type="QString">LANG=fr_FR.UTF-8</value>
+ <value
type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator</value>
+ <value type="QString">LOGNAME=froger_a</value>
+ <value
type="QString">OLDPWD=/lrde/home/stage/froger_a/QT</value>
+ <value
type="QString">PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games</value>
+ <value
type="QString">PWD=/lrde/home/stage/froger_a/QT/Test2</value>
+ <value type="QString">QTDIR=/usr/share/qt4</value>
+ <value type="QString">SHELL=/bin/bash</value>
+ <value type="QString">SHLVL=2</value>
+ <value type="QString">SSH_AGENT_PID=2775</value>
+ <value
type="QString">SSH_AUTH_SOCK=/tmp/ssh-FajlDG2702/agent.2702</value>
+ <value type="QString">TERM=xterm</value>
+ <value type="QString">USER=froger_a</value>
+ <value type="QString">USERNAME=froger_a</value>
+ <value type="QString">WINDOWID=16777252</value>
+ <value type="QString">WINDOWPATH=7:8:8:8:8:8:8</value>
+ <value type="QString">XAUTHORITY=/tmp/.gdmD2V5PW</value>
+ <value
type="QString">XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/</value>
+ <value
type="QString">XDG_SESSION_COOKIE=b24883b9b4dbfb80ea83575b00000a11-1357647755.876395-1204336646</value>
+ <value type="QString">XPSERVERLIST=:64 </value>
+ <value type="QString">XTERM_LOCALE=fr_FR.UTF-8</value>
+ <value type="QString">XTERM_SHELL=/bin/bash</value>
+ <value type="QString">XTERM_VERSION=XTerm(261)</value>
+ <value type="QString">_=/usr/bin/qtcreator</value>
+ </valuelist>
+ <value key="abstractProcess.IgnoreReturnValue"
type="bool">false</value>
+ <valuelist key="abstractProcess.arguments"
type="QVariantList">
+ <value type="QString">-w</value>
+ </valuelist>
+ <value key="abstractProcess.command"
type="QString">/usr/bin/make</value>
+ <value key="abstractProcess.enabled"
type="bool">true</value>
+ <value key="abstractProcess.workingDirectory"
type="QString">/amd/nfs/volume1/home/stage/froger_a/QT/Test2</value>
</valuemap>
</data>
<data>
<variable>buildconfiguration-Qt dans le PATH Debug-cleanstep0</variable>
<valuemap type="QVariantMap">
<value key="ProjectExplorer.BuildConfiguration.DisplayName"
type="QString">Qt dans le PATH Debug</value>
+ <valuelist key="abstractProcess.Environment"
type="QVariantList">
+ <value
type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-FsBbOLgRqU,guid=ef82eb23ef1b0e329a88f9f00055322b</value>
+ <value type="QString">DESKTOP_SESSION=fluxbox</value>
+ <value type="QString">DISPLAY=:0.0</value>
+ <value type="QString">GDMSESSION=fluxbox</value>
+ <value type="QString">GDM_LANG=fr_FR.UTF-8</value>
+ <value type="QString">GDM_XSERVER_LOCATION=local</value>
+ <value
type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-PyP4DN</value>
+ <value type="QString">GNOME_KEYRING_PID=31268</value>
+ <value type="QString">GTK_MODULES=canberra-gtk-module</value>
+ <value type="QString">HOME=/lrde/home/stage/froger_a</value>
+ <value type="QString">LANG=fr_FR.UTF-8</value>
+ <value
type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator</value>
+ <value type="QString">LOGNAME=froger_a</value>
+ <value
type="QString">OLDPWD=/lrde/home/stage/froger_a/QT</value>
+ <value
type="QString">PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games</value>
+ <value
type="QString">PWD=/lrde/home/stage/froger_a/QT/Test2</value>
+ <value type="QString">QTDIR=/usr/share/qt4</value>
+ <value type="QString">SHELL=/bin/bash</value>
+ <value type="QString">SHLVL=2</value>
+ <value type="QString">SSH_AGENT_PID=31343</value>
+ <value
type="QString">SSH_AUTH_SOCK=/tmp/ssh-sZdjN31277/agent.31277</value>
+ <value type="QString">TERM=xterm</value>
+ <value type="QString">USER=froger_a</value>
+ <value type="QString">USERNAME=froger_a</value>
+ <value type="QString">WINDOWID=10485796</value>
+ <value type="QString">WINDOWPATH=7:8:8:8:8:8</value>
+ <value type="QString">XAUTHORITY=/tmp/.gdm9DS8PW</value>
+ <value
type="QString">XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/</value>
+ <value
type="QString">XDG_SESSION_COOKIE=b24883b9b4dbfb80ea83575b00000a11-1357631215.605755-1933895318</value>
+ <value type="QString">XPSERVERLIST=:64 </value>
+ <value type="QString">XTERM_LOCALE=fr_FR.UTF-8</value>
+ <value type="QString">XTERM_SHELL=/bin/bash</value>
+ <value type="QString">XTERM_VERSION=XTerm(261)</value>
+ <value type="QString">_=/usr/bin/qtcreator</value>
+ </valuelist>
+ <value key="abstractProcess.IgnoreReturnValue"
type="bool">true</value>
+ <valuelist key="abstractProcess.arguments"
type="QVariantList">
+ <value type="QString">clean</value>
+ <value type="QString">-w</value>
+ </valuelist>
+ <value key="abstractProcess.command"
type="QString">/usr/bin/make</value>
+ <value key="abstractProcess.enabled"
type="bool">true</value>
+ <value key="abstractProcess.workingDirectory"
type="QString">/amd/nfs/volume1/home/stage/froger_a/QT/Test2</value>
+ <value key="cleanConfig" type="bool">true</value>
+ <valuelist key="makeargs" type="QVariantList">
+ <value type="QString">clean</value>
+ </valuelist>
</valuemap>
</data>
<data>
@@ -135,35 +273,35 @@
<valuemap type="QVariantMap">
<value key="ProjectExplorer.BuildConfiguration.DisplayName"
type="QString">Qt dans le PATH Release</value>
<valuelist key="abstractProcess.Environment"
type="QVariantList">
- <value
type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-tjjFCHqTTG,guid=bea096783d894ae902968dc400542147</value>
+ <value
type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-FsBbOLgRqU,guid=ef82eb23ef1b0e329a88f9f00055322b</value>
<value type="QString">DESKTOP_SESSION=fluxbox</value>
<value type="QString">DISPLAY=:0.0</value>
<value type="QString">GDMSESSION=fluxbox</value>
<value type="QString">GDM_LANG=fr_FR.UTF-8</value>
<value type="QString">GDM_XSERVER_LOCATION=local</value>
- <value
type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-fpBi9G</value>
- <value type="QString">GNOME_KEYRING_PID=30371</value>
+ <value
type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-PyP4DN</value>
+ <value type="QString">GNOME_KEYRING_PID=31268</value>
<value type="QString">GTK_MODULES=canberra-gtk-module</value>
<value type="QString">HOME=/lrde/home/stage/froger_a</value>
<value type="QString">LANG=fr_FR.UTF-8</value>
<value
type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator</value>
<value type="QString">LOGNAME=froger_a</value>
- <value
type="QString">OLDPWD=/lrde/home/stage/froger_a/olena</value>
+ <value
type="QString">OLDPWD=/lrde/home/stage/froger_a/QT</value>
<value
type="QString">PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games</value>
- <value type="QString">PWD=/lrde/home/stage/froger_a</value>
+ <value
type="QString">PWD=/lrde/home/stage/froger_a/QT/Test2</value>
<value type="QString">QTDIR=/usr/share/qt4</value>
<value type="QString">SHELL=/bin/bash</value>
<value type="QString">SHLVL=2</value>
- <value type="QString">SSH_AGENT_PID=30446</value>
- <value
type="QString">SSH_AUTH_SOCK=/tmp/ssh-QhbNn30380/agent.30380</value>
+ <value type="QString">SSH_AGENT_PID=31343</value>
+ <value
type="QString">SSH_AUTH_SOCK=/tmp/ssh-sZdjN31277/agent.31277</value>
<value type="QString">TERM=xterm</value>
<value type="QString">USER=froger_a</value>
<value type="QString">USERNAME=froger_a</value>
<value type="QString">WINDOWID=10485796</value>
- <value type="QString">WINDOWPATH=7:8:8:8:8</value>
- <value type="QString">XAUTHORITY=/tmp/.gdmT0ALQW</value>
+ <value type="QString">WINDOWPATH=7:8:8:8:8:8</value>
+ <value type="QString">XAUTHORITY=/tmp/.gdm9DS8PW</value>
<value
type="QString">XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/</value>
- <value
type="QString">XDG_SESSION_COOKIE=b24883b9b4dbfb80ea83575b00000a11-1357561355.444982-159607272</value>
+ <value
type="QString">XDG_SESSION_COOKIE=b24883b9b4dbfb80ea83575b00000a11-1357631215.605755-1933895318</value>
<value type="QString">XPSERVERLIST=:64 </value>
<value type="QString">XTERM_LOCALE=fr_FR.UTF-8</value>
<value type="QString">XTERM_SHELL=/bin/bash</value>
@@ -171,14 +309,14 @@
<value type="QString">_=/usr/bin/qtcreator</value>
</valuelist>
<valuelist key="abstractProcess.arguments"
type="QVariantList">
- <value
type="QString">/amd/nfs/volume1/home/stage/froger_a/Test2/Test2.pro</value>
+ <value
type="QString">/amd/nfs/volume1/home/stage/froger_a/QT/Test2/Test2.pro</value>
<value type="QString">-spec</value>
<value type="QString">linux-g++</value>
<value type="QString">-r</value>
</valuelist>
<value key="abstractProcess.command"
type="QString">/usr/bin/qmake-qt4</value>
<value key="abstractProcess.enabled"
type="bool">false</value>
- <value key="abstractProcess.workingDirectory"
type="QString">/amd/nfs/volume1/home/stage/froger_a/Test2</value>
+ <value key="abstractProcess.workingDirectory"
type="QString">/amd/nfs/volume1/home/stage/froger_a/QT/Test2</value>
</valuemap>
</data>
<data>
@@ -186,35 +324,35 @@
<valuemap type="QVariantMap">
<value key="ProjectExplorer.BuildConfiguration.DisplayName"
type="QString">Qt dans le PATH Release</value>
<valuelist key="abstractProcess.Environment"
type="QVariantList">
- <value
type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-tjjFCHqTTG,guid=bea096783d894ae902968dc400542147</value>
+ <value
type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-FsBbOLgRqU,guid=ef82eb23ef1b0e329a88f9f00055322b</value>
<value type="QString">DESKTOP_SESSION=fluxbox</value>
<value type="QString">DISPLAY=:0.0</value>
<value type="QString">GDMSESSION=fluxbox</value>
<value type="QString">GDM_LANG=fr_FR.UTF-8</value>
<value type="QString">GDM_XSERVER_LOCATION=local</value>
- <value
type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-fpBi9G</value>
- <value type="QString">GNOME_KEYRING_PID=30371</value>
+ <value
type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-PyP4DN</value>
+ <value type="QString">GNOME_KEYRING_PID=31268</value>
<value type="QString">GTK_MODULES=canberra-gtk-module</value>
<value type="QString">HOME=/lrde/home/stage/froger_a</value>
<value type="QString">LANG=fr_FR.UTF-8</value>
<value
type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator</value>
<value type="QString">LOGNAME=froger_a</value>
- <value
type="QString">OLDPWD=/lrde/home/stage/froger_a/olena</value>
+ <value
type="QString">OLDPWD=/lrde/home/stage/froger_a/QT</value>
<value
type="QString">PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games</value>
- <value type="QString">PWD=/lrde/home/stage/froger_a</value>
+ <value
type="QString">PWD=/lrde/home/stage/froger_a/QT/Test2</value>
<value type="QString">QTDIR=/usr/share/qt4</value>
<value type="QString">SHELL=/bin/bash</value>
<value type="QString">SHLVL=2</value>
- <value type="QString">SSH_AGENT_PID=30446</value>
- <value
type="QString">SSH_AUTH_SOCK=/tmp/ssh-QhbNn30380/agent.30380</value>
+ <value type="QString">SSH_AGENT_PID=31343</value>
+ <value
type="QString">SSH_AUTH_SOCK=/tmp/ssh-sZdjN31277/agent.31277</value>
<value type="QString">TERM=xterm</value>
<value type="QString">USER=froger_a</value>
<value type="QString">USERNAME=froger_a</value>
<value type="QString">WINDOWID=10485796</value>
- <value type="QString">WINDOWPATH=7:8:8:8:8</value>
- <value type="QString">XAUTHORITY=/tmp/.gdmT0ALQW</value>
+ <value type="QString">WINDOWPATH=7:8:8:8:8:8</value>
+ <value type="QString">XAUTHORITY=/tmp/.gdm9DS8PW</value>
<value
type="QString">XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/</value>
- <value
type="QString">XDG_SESSION_COOKIE=b24883b9b4dbfb80ea83575b00000a11-1357561355.444982-159607272</value>
+ <value
type="QString">XDG_SESSION_COOKIE=b24883b9b4dbfb80ea83575b00000a11-1357631215.605755-1933895318</value>
<value type="QString">XPSERVERLIST=:64 </value>
<value type="QString">XTERM_LOCALE=fr_FR.UTF-8</value>
<value type="QString">XTERM_SHELL=/bin/bash</value>
@@ -227,7 +365,7 @@
</valuelist>
<value key="abstractProcess.command"
type="QString">/usr/bin/make</value>
<value key="abstractProcess.enabled"
type="bool">true</value>
- <value key="abstractProcess.workingDirectory"
type="QString">/amd/nfs/volume1/home/stage/froger_a/Test2</value>
+ <value key="abstractProcess.workingDirectory"
type="QString">/amd/nfs/volume1/home/stage/froger_a/QT/Test2</value>
</valuemap>
</data>
<data>
diff --git a/Test2/mouseevent.cpp b/Test2/mouseevent.cpp
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/Test2/mouseevent.cpp
@@ -0,0 +1 @@
+
diff --git a/Test2/mouseevent.h b/Test2/mouseevent.h
new file mode 100644
index 0000000..37da0e1
--- /dev/null
+++ b/Test2/mouseevent.h
@@ -0,0 +1,14 @@
+#ifndef MOUSEEVENT_H
+#define MOUSEEVENT_H
+
+#include <QGraphicsView>
+
+class MouseEvent :
+ public QGraphicsView
+{
+:
+ void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+};
+
+#endif // MOUSEEVENT_H
diff --git a/Test2/picture.cpp b/Test2/picture.cpp
new file mode 100644
index 0000000..a3d1dfb
--- /dev/null
+++ b/Test2/picture.cpp
@@ -0,0 +1,79 @@
+#include "picture.h"
+
+Picture::Picture(QTextEdit *textEdit)
+{
+ setPos(0, 0);
+ isPush = false;
+ painter = new QPainter(&pixmap());
+ this->textEdit = textEdit;
+}
+
+Picture::Picture(const QString &filename, QTextEdit *textEdit)
+{
+ setAcceptedMouseButtons(Qt::LeftButton);
+ setPos(0, 0);
+ isPush = false;
+ load(filename);
+ painter = new QPainter(&pixmap());
+ this->textEdit = textEdit;
+}
+
+void Picture::load(const QString &filename)
+{
+ QPixmap image;
+ image.load(filename);
+ setPixmap(image);
+}
+
+QString Picture::pressPosition()
+{
+ return "Mouse Press Position : " + QString::number(pressPos.x()) + ",
" + QString::number(pressPos.y());
+}
+
+QString Picture::releasePosition()
+{
+ return "Mouse Release Position : " + QString::number(releasePos.x()) +
", " + QString::number(releasePos.y());
+}
+
+void Picture::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+ if(event->button() == Qt::LeftButton && !isPush)
+ {
+ pressPos = event->pos();
+ textEdit->setText(pressPosition());
+ isPush = true;
+ }
+}
+
+void Picture::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+{
+ if(event->button() == Qt::LeftButton)
+ {
+ releasePos = event->pos();
+ textEdit->setText(releasePosition());
+ QRectF rectangle;
+ if (pressPos.x() < releasePos.x())
+ {
+ rectangle.setX(pressPos.x());
+ rectangle.setWidth(releasePos.x() - pressPos.x());
+ }
+ else
+ {
+ rectangle.setX(releasePos.x());
+ rectangle.setWidth(pressPos.x() - releasePos.x());
+ }
+ if (pressPos.y() < releasePos.y())
+ {
+ rectangle.setY(pressPos.y());
+ rectangle.setHeight(releasePos.y() - pressPos.y());
+ }
+ else
+ {
+ rectangle.setY(releasePos.y());
+ rectangle.setHeight(pressPos.y() - releasePos.y());
+ }
+ painter->drawRoundedRect(rectangle, 20.0, 15.0);
+
+ isPush = false;
+ }
+}
diff --git a/Test2/picture.h b/Test2/picture.h
new file mode 100644
index 0000000..a0c308e
--- /dev/null
+++ b/Test2/picture.h
@@ -0,0 +1,34 @@
+#ifndef PICTURE_H
+#define PICTURE_H
+
+#include <QGraphicsObject>
+#include <QGraphicsSceneMouseEvent>
+#include <QMouseEvent>
+#include <QPainter>
+#include <QRectF>
+#include <QTextEdit>
+
+class Picture :
+ public QGraphicsPixmapItem
+{
+ public:
+ Picture(QTextEdit *textEdit);
+ Picture(const QString &filename, QTextEdit *textEdit);
+ void load(const QString &filename);
+
+ protected:
+ void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+
+ private:
+ QString pressPosition();
+ QString releasePosition();
+
+ QTextEdit *textEdit;
+ QPainter *painter;
+ QPointF pressPos;
+ QPointF releasePos;
+ bool isPush;
+};
+
+#endif // PICTURE_H
diff --git a/Test2/test2.cpp b/Test2/test2.cpp
index 6a02bf1..b918a42 100644
--- a/Test2/test2.cpp
+++ b/Test2/test2.cpp
@@ -1,6 +1,13 @@
#include <QFileDialog>
+#include <QScrollBar>
#include <QTextEdit>
+#include <QShortcut>
+#include <QGraphicsView>
+#include <QGraphicsScene>
+#include <QGraphicsPixmapItem>
+#include <QMouseEvent>
#include "test2.h"
+#include "picture.h"
#include "ui_test2.h"
Test2::Test2(QWidget *parent) :
@@ -8,11 +15,16 @@ Test2::Test2(QWidget *parent) :
ui(new Ui::Test2)
{
ui->setupUi(this);
- ui->label->setScaledContents(true);
- scrollArea = new QScrollArea;
- scrollArea->setBackgroundRole(QPalette::Dark);
- scrollArea->setWidget(ui->label);
- setCentralWidget(scrollArea);
+ scaleFactor = 1.0;
+ QGraphicsScene *scene = new QGraphicsScene(ui->scrollArea);
+ ui->graphicsView->setScene(scene);
+ ui->graphicsView->setGeometry(0, 0, ui->scrollArea->width(),
ui->scrollArea->height());
+ shortcutZoomIn = new QShortcut(QKeySequence("Ctrl++"), this);
+ shortcutZoomOut = new QShortcut(QKeySequence("Ctrl+-"), this);
+ connect(shortcutZoomOut, SIGNAL(activated()), this,
SLOT(on_actionZoomOut_triggered()));
+ connect(shortcutZoomIn, SIGNAL(activated()), this,
SLOT(on_actionZoomIn_triggered()));
+ picture = new Picture(ui->textEdit);
+ ui->graphicsView->scene()->addItem(picture);
}
Test2::~Test2()
@@ -23,18 +35,43 @@ Test2::~Test2()
void Test2::changeEvent(QEvent *e)
{
QMainWindow::changeEvent(e);
- switch (e->type()) {
- case QEvent::LanguageChange:
- ui->retranslateUi(this);
- break;
- default:
- break;
+ switch (e->type())
+ {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
}
}
+void Test2::adjustScrollBar(QScrollBar *scrollBar, double factor)
+{
+ scrollBar->setValue(int(factor * scrollBar->value() + ((factor-1) *
scrollBar->pageStep()/2)));
+}
+
+void Test2::scaleImage(double factor)
+{
+ scaleFactor *= factor;
+ ui->textEdit->clear();
+ ui->graphicsView->scale(factor, factor);
+ adjustScrollBar(ui->scrollArea->horizontalScrollBar(), factor);
+ adjustScrollBar(ui->scrollArea->verticalScrollBar(), factor);
+}
+
void Test2::on_actionOpen_triggered()
{
- QString file = QFileDialog::getOpenFileName(this);
- ui->label->setPixmap(QPixmap(file));
- ui->textEdit->setText(file);
+ QString filename = QFileDialog::getOpenFileName(this);
+ ui->textEdit->setText(filename);
+ picture->load(filename);
+}
+
+void Test2::on_actionZoomIn_triggered()
+{
+ scaleImage(1.25);
+}
+
+void Test2::on_actionZoomOut_triggered()
+{
+ scaleImage(0.75);
}
diff --git a/Test2/test2.h b/Test2/test2.h
index 6a629bf..7163fc8 100644
--- a/Test2/test2.h
+++ b/Test2/test2.h
@@ -4,8 +4,11 @@
#include <QScrollArea>
#include <QTextEdit>
#include <QMainWindow>
+#include <QShortcut>
+#include "picture.h"
-namespace Ui {
+namespace Ui
+{
class Test2;
}
@@ -19,10 +22,20 @@ protected:
void changeEvent(QEvent *e);
private:
+ void scaleImage(double factor);
+ void adjustScrollBar(QScrollBar *scrollBar, double factor);
+
Ui::Test2 *ui;
+ Picture *picture;
QScrollArea *scrollArea;
+ double scaleFactor;
+
+ QShortcut *shortcutZoomIn;
+ QShortcut *shortcutZoomOut;
private slots:
+ void on_actionZoomOut_triggered();
+ void on_actionZoomIn_triggered();
void on_actionOpen_triggered();
};
diff --git a/Test2/test2.ui b/Test2/test2.ui
index dfc1bc3..d09472c 100644
--- a/Test2/test2.ui
+++ b/Test2/test2.ui
@@ -24,21 +24,38 @@
</rect>
</property>
</widget>
- <widget class="QLabel" name="label">
+ <widget class="QScrollArea" name="scrollArea">
<property name="geometry">
<rect>
- <x>300</x>
- <y>70</y>
- <width>361</width>
- <height>281</height>
+ <x>270</x>
+ <y>30</y>
+ <width>521</width>
+ <height>321</height>
</rect>
</property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="text">
- <string/>
+ <property name="widgetResizable">
+ <bool>true</bool>
</property>
+ <widget class="QWidget" name="scrollAreaWidgetContents">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>517</width>
+ <height>317</height>
+ </rect>
+ </property>
+ <widget class="QGraphicsView" name="graphicsView">
+ <property name="geometry">
+ <rect>
+ <x>100</x>
+ <y>40</y>
+ <width>281</width>
+ <height>201</height>
+ </rect>
+ </property>
+ </widget>
+ </widget>
</widget>
</widget>
<widget class="QMenuBar" name="menuBar">
@@ -55,6 +72,8 @@
<string>File</string>
</property>
<addaction name="actionOpen"/>
+ <addaction name="actionZoomIn"/>
+ <addaction name="actionZoomOut"/>
</widget>
<addaction name="menuFile"/>
</widget>
@@ -72,6 +91,16 @@
<string>Open</string>
</property>
</action>
+ <action name="actionZoomIn">
+ <property name="text">
+ <string>ZoomIn</string>
+ </property>
+ </action>
+ <action name="actionZoomOut">
+ <property name="text">
+ <string>ZoomOut</string>
+ </property>
+ </action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>
--
1.7.2.5