Initial commit. Qt + OGL init
authorslack <slack@codemaniacs.com>
Sun, 10 Jan 2010 17:29:40 +0000 (18:29 +0100)
committerslack <slack@codemaniacs.com>
Sun, 10 Jan 2010 17:29:40 +0000 (18:29 +0100)
Makefile [new file with mode: 0644]
main.cpp [new file with mode: 0644]
mainwindow.cpp [new file with mode: 0644]
mainwindow.h [new file with mode: 0644]
mainwindow.ui [new file with mode: 0644]
md5view.pro [new file with mode: 0644]
md5view.pro.user [new file with mode: 0644]
viewerwidget.cpp [new file with mode: 0644]
viewerwidget.h [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..4aaff0a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,224 @@
+#############################################################################
+# Makefile for building: md5view
+# Generated by qmake (2.01a) (Qt 4.5.2) on: Sun Jan 10 04:17:42 2010
+# Project:  md5view.pro
+# Template: app
+# Command: /usr/bin/qmake-qt4 -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile md5view.pro
+#############################################################################
+
+####### Compiler, tools and options
+
+CC            = gcc
+CXX           = g++
+DEFINES       = -DQT_OPENGL_LIB -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/QtOpenGL -I/usr/include/qt4 -I/usr/X11R6/include -I. -I.
+LINK          = g++
+LFLAGS        = 
+LIBS          = $(SUBLIBS)  -L/usr/lib -L/usr/X11R6/lib -lQtOpenGL -lQtGui -lQtCore -lGLU -lGL -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
+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       = main.cpp \
+               mainwindow.cpp \
+               viewerwidget.cpp moc_mainwindow.cpp
+OBJECTS       = main.o \
+               mainwindow.o \
+               viewerwidget.o \
+               moc_mainwindow.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/opengl.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 \
+               md5view.pro
+QMAKE_TARGET  = md5view
+DESTDIR       = 
+TARGET        = md5view
+
+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_mainwindow.h $(OBJECTS)  
+       $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
+
+Makefile: md5view.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/opengl.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/libQtOpenGL.prl \
+               /usr/lib/libQtGui.prl \
+               /usr/lib/libQtCore.prl
+       $(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile md5view.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/opengl.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/libQtOpenGL.prl:
+/usr/lib/libQtGui.prl:
+/usr/lib/libQtCore.prl:
+qmake:  FORCE
+       @$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile md5view.pro
+
+dist: 
+       @$(CHK_DIR_EXISTS) .tmp/md5view1.0.0 || $(MKDIR) .tmp/md5view1.0.0 
+       $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/md5view1.0.0/ && $(COPY_FILE) --parents mainwindow.h viewerwidget.h .tmp/md5view1.0.0/ && $(COPY_FILE) --parents main.cpp mainwindow.cpp viewerwidget.cpp .tmp/md5view1.0.0/ && $(COPY_FILE) --parents mainwindow.ui .tmp/md5view1.0.0/ && (cd `dirname .tmp/md5view1.0.0` && $(TAR) md5view1.0.0.tar md5view1.0.0 && $(COMPRESS) md5view1.0.0.tar) && $(MOVE) `dirname .tmp/md5view1.0.0`/md5view1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/md5view1.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
+compiler_moc_header_clean:
+       -$(DEL_FILE) moc_mainwindow.cpp
+moc_mainwindow.cpp: mainwindow.h
+       /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) mainwindow.h -o moc_mainwindow.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_mainwindow.h
+compiler_uic_clean:
+       -$(DEL_FILE) ui_mainwindow.h
+ui_mainwindow.h: mainwindow.ui
+       /usr/bin/uic-qt4 mainwindow.ui -o ui_mainwindow.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 mainwindow.h
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
+
+mainwindow.o: mainwindow.cpp mainwindow.h \
+               ui_mainwindow.h
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cpp
+
+viewerwidget.o: viewerwidget.cpp viewerwidget.h
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o viewerwidget.o viewerwidget.cpp
+
+moc_mainwindow.o: moc_mainwindow.cpp 
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp
+
+####### Install
+
+install:   FORCE
+
+uninstall:   FORCE
+
+FORCE:
+
diff --git a/main.cpp b/main.cpp
new file mode 100644 (file)
index 0000000..6e7efd9
--- /dev/null
+++ b/main.cpp
@@ -0,0 +1,10 @@
+#include <QtGui/QApplication>
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+    QApplication a(argc, argv);
+    MainWindow w;
+    w.show();
+    return a.exec();
+}
diff --git a/mainwindow.cpp b/mainwindow.cpp
new file mode 100644 (file)
index 0000000..ea37e3f
--- /dev/null
@@ -0,0 +1,36 @@
+#include "mainwindow.h"
+#include "ui_mainwindow.h"
+
+MainWindow::MainWindow(QWidget *parent) :
+    QMainWindow(parent),
+    ui(new Ui::MainWindow)
+{
+    ui->setupUi(this);
+    viewer = new ViewerWidget(this);
+    viewer->setMinimumSize(800,600);
+    ui->horizontalLayout->addWidget(viewer);
+}
+
+MainWindow::~MainWindow()
+{
+    delete ui;
+}
+
+void MainWindow::writeLog(QString s)
+{
+    logString += s;
+    ui->textBrowser->setText(logString);
+}
+
+
+void MainWindow::changeEvent(QEvent *e)
+{
+    QMainWindow::changeEvent(e);
+    switch (e->type()) {
+    case QEvent::LanguageChange:
+        ui->retranslateUi(this);
+        break;
+    default:
+        break;
+    }
+}
diff --git a/mainwindow.h b/mainwindow.h
new file mode 100644 (file)
index 0000000..a42a5ed
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include <QString>
+#include "viewerwidget.h"
+
+namespace Ui {
+    class MainWindow;
+}
+
+class MainWindow : public QMainWindow {
+    Q_OBJECT
+public:
+    MainWindow(QWidget *parent = 0);
+    ~MainWindow();
+    void writeLog(QString s);
+
+protected:
+    void changeEvent(QEvent *e);
+
+private:
+    QString        logString;
+    Ui::MainWindow *ui;
+    ViewerWidget   *viewer;
+};
+
+#endif // MAINWINDOW_H
diff --git a/mainwindow.ui b/mainwindow.ui
new file mode 100644 (file)
index 0000000..e0acbec
--- /dev/null
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>1000</width>
+    <height>600</height>
+   </rect>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>1000</width>
+    <height>600</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralWidget">
+   <layout class="QHBoxLayout" name="horizontalLayout_2">
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <property name="spacing">
+       <number>0</number>
+      </property>
+      <item>
+       <widget class="QTextBrowser" name="textBrowser">
+        <property name="minimumSize">
+         <size>
+          <width>200</width>
+          <height>0</height>
+         </size>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menuBar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>1000</width>
+     <height>24</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuFile">
+    <property name="title">
+     <string>File</string>
+    </property>
+    <addaction name="actionOpen"/>
+    <addaction name="actionQuit"/>
+   </widget>
+   <addaction name="menuFile"/>
+  </widget>
+  <widget class="QToolBar" name="mainToolBar">
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+  </widget>
+  <widget class="QStatusBar" name="statusBar"/>
+  <action name="actionOpen">
+   <property name="text">
+    <string>Open</string>
+   </property>
+  </action>
+  <action name="actionQuit">
+   <property name="text">
+    <string>Quit</string>
+   </property>
+  </action>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/md5view.pro b/md5view.pro
new file mode 100644 (file)
index 0000000..99d63ef
--- /dev/null
@@ -0,0 +1,12 @@
+# -------------------------------------------------
+# Project created by QtCreator 2010-01-10T03:28:19
+# -------------------------------------------------
+QT += opengl
+TARGET = md5view
+TEMPLATE = app
+SOURCES += main.cpp \
+    mainwindow.cpp \
+    viewerwidget.cpp
+HEADERS += mainwindow.h \
+    viewerwidget.h
+FORMS += mainwindow.ui
diff --git a/md5view.pro.user b/md5view.pro.user
new file mode 100644 (file)
index 0000000..91dadb7
--- /dev/null
@@ -0,0 +1,243 @@
+<!DOCTYPE QtCreatorProject>
+<qtcreator>
+ <data>
+  <variable>RunConfiguration0-BaseEnvironmentBase</variable>
+  <value type="int">2</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-CommandLineArguments</variable>
+  <valuelist type="QVariantList"/>
+ </data>
+ <data>
+  <variable>RunConfiguration0-ProFile</variable>
+  <value type="QString">md5view.pro</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-RunConfiguration.name</variable>
+  <value type="QString">md5view</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UseDyldImageSuffix</variable>
+  <value type="bool">false</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UseTerminal</variable>
+  <value type="bool">false</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UserEnvironmentChanges</variable>
+  <valuelist type="QVariantList"/>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UserSetName</variable>
+  <value type="bool">false</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UserSetWorkingDirectory</variable>
+  <value type="bool">false</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UserWorkingDirectory</variable>
+  <value type="QString"></value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-type</variable>
+  <value type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
+ </data>
+ <data>
+  <variable>activeRunConfiguration</variable>
+  <value type="int">0</value>
+ </data>
+ <data>
+  <variable>activebuildconfiguration</variable>
+  <value type="QString">Debug</value>
+ </data>
+ <data>
+  <variable>buildConfiguration-Debug</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+   <value key="QtVersionId" type="int">0</value>
+   <value key="ToolChain" type="int">0</value>
+   <value key="addQDumper" type=""></value>
+   <value key="buildConfiguration" type="int">2</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildConfiguration-Release</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+   <value key="QtVersionId" type="int">0</value>
+   <value key="addQDumper" type=""></value>
+   <value key="buildConfiguration" type="int">0</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfiguration-Debug-buildstep0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+   <valuelist key="abstractProcess.Environment" type="QVariantList">
+    <value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-Dj3Bbe55NG,guid=c59e58cab9ff6389416a749d4b491a91</value>
+    <value type="QString">DESKTOP_SESSION=gnome</value>
+    <value type="QString">DISPLAY=:0.0</value>
+    <value type="QString">GDMSESSION=gnome</value>
+    <value type="QString">GDM_KEYBOARD_LAYOUT=es</value>
+    <value type="QString">GDM_LANG=es_ES.UTF-8</value>
+    <value type="QString">GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
+    <value type="QString">GNOME_KEYRING_PID=2234</value>
+    <value type="QString">GNOME_KEYRING_SOCKET=/tmp/keyring-iuKvkY/socket</value>
+    <value type="QString">GTK_MODULES=canberra-gtk-module</value>
+    <value type="QString">GTK_RC_FILES=/etc/gtk/gtkrc:/home/slack/.gtkrc-1.2-gnome2</value>
+    <value type="QString">HOME=/home/slack</value>
+    <value type="QString">LANG=es_ES.UTF-8</value>
+    <value type="QString">LANGUAGE=es_ES.UTF-8</value>
+    <value type="QString">LD_LIBRARY_PATH=/home/slack/qtcreator-1.3.0/lib/qtcreator:</value>
+    <value type="QString">LOGNAME=slack</value>
+    <value type="QString">ORBIT_SOCKETDIR=/tmp/orbit-slack</value>
+    <value type="QString">PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games</value>
+    <value type="QString">PWD=/home/slack</value>
+    <value type="QString">QTDIR=/usr/share/qt4</value>
+    <value type="QString">SESSION_MANAGER=local/ommadawn:@/tmp/.ICE-unix/2249,unix/ommadawn:/tmp/.ICE-unix/2249</value>
+    <value type="QString">SHELL=/bin/bash</value>
+    <value type="QString">SPEECHD_PORT=7560</value>
+    <value type="QString">SSH_AGENT_PID=2300</value>
+    <value type="QString">SSH_AUTH_SOCK=/tmp/keyring-iuKvkY/socket.ssh</value>
+    <value type="QString">USER=slack</value>
+    <value type="QString">USERNAME=slack</value>
+    <value type="QString">XAUTHORITY=/var/run/gdm/auth-for-slack-dbUjQ9/database</value>
+    <value type="QString">XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/</value>
+    <value type="QString">XDG_SESSION_COOKIE=b95e9de5c0255c87d4458400462bf263-1263082128.724084-492310790</value>
+   </valuelist>
+   <valuelist key="abstractProcess.arguments" type="QVariantList">
+    <value type="QString">/home/slack/md5view/md5view.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">/home/slack/md5view</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfiguration-Debug-buildstep1</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+   <valuelist key="abstractProcess.Environment" type="QVariantList">
+    <value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-Dj3Bbe55NG,guid=c59e58cab9ff6389416a749d4b491a91</value>
+    <value type="QString">DESKTOP_SESSION=gnome</value>
+    <value type="QString">DISPLAY=:0.0</value>
+    <value type="QString">GDMSESSION=gnome</value>
+    <value type="QString">GDM_KEYBOARD_LAYOUT=es</value>
+    <value type="QString">GDM_LANG=es_ES.UTF-8</value>
+    <value type="QString">GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
+    <value type="QString">GNOME_KEYRING_PID=2234</value>
+    <value type="QString">GNOME_KEYRING_SOCKET=/tmp/keyring-iuKvkY/socket</value>
+    <value type="QString">GTK_MODULES=canberra-gtk-module</value>
+    <value type="QString">GTK_RC_FILES=/etc/gtk/gtkrc:/home/slack/.gtkrc-1.2-gnome2</value>
+    <value type="QString">HOME=/home/slack</value>
+    <value type="QString">LANG=es_ES.UTF-8</value>
+    <value type="QString">LANGUAGE=es_ES.UTF-8</value>
+    <value type="QString">LD_LIBRARY_PATH=/home/slack/qtcreator-1.3.0/lib/qtcreator:</value>
+    <value type="QString">LOGNAME=slack</value>
+    <value type="QString">ORBIT_SOCKETDIR=/tmp/orbit-slack</value>
+    <value type="QString">PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games</value>
+    <value type="QString">PWD=/home/slack</value>
+    <value type="QString">QTDIR=/usr/share/qt4</value>
+    <value type="QString">SESSION_MANAGER=local/ommadawn:@/tmp/.ICE-unix/2249,unix/ommadawn:/tmp/.ICE-unix/2249</value>
+    <value type="QString">SHELL=/bin/bash</value>
+    <value type="QString">SPEECHD_PORT=7560</value>
+    <value type="QString">SSH_AGENT_PID=2300</value>
+    <value type="QString">SSH_AUTH_SOCK=/tmp/keyring-iuKvkY/socket.ssh</value>
+    <value type="QString">USER=slack</value>
+    <value type="QString">USERNAME=slack</value>
+    <value type="QString">XAUTHORITY=/var/run/gdm/auth-for-slack-dbUjQ9/database</value>
+    <value type="QString">XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/</value>
+    <value type="QString">XDG_SESSION_COOKIE=b95e9de5c0255c87d4458400462bf263-1263082128.724084-492310790</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">/home/slack/md5view</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfiguration-Debug-cleanstep0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+   <value key="cleanConfig" type="bool">true</value>
+   <valuelist key="makeargs" type="QVariantList">
+    <value type="QString">clean</value>
+   </valuelist>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfiguration-Release-buildstep0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfiguration-Release-buildstep1</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfiguration-Release-cleanstep0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfigurations</variable>
+  <valuelist type="QVariantList">
+   <value type="QString">Debug</value>
+   <value type="QString">Release</value>
+  </valuelist>
+ </data>
+ <data>
+  <variable>buildstep0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
+   <value key="mkspec" type="QString"></value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildstep1</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildsteps</variable>
+  <valuelist type="QVariantList">
+   <value type="QString">trolltech.qt4projectmanager.qmake</value>
+   <value type="QString">trolltech.qt4projectmanager.make</value>
+  </valuelist>
+ </data>
+ <data>
+  <variable>cleanstep0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
+   <value key="clean" type="bool">true</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>cleansteps</variable>
+  <valuelist type="QVariantList">
+   <value type="QString">trolltech.qt4projectmanager.make</value>
+  </valuelist>
+ </data>
+ <data>
+  <variable>defaultFileEncoding</variable>
+  <value type="QByteArray">System</value>
+ </data>
+ <data>
+  <variable>project</variable>
+  <valuemap type="QVariantMap"/>
+ </data>
+</qtcreator>
diff --git a/viewerwidget.cpp b/viewerwidget.cpp
new file mode 100644 (file)
index 0000000..7856195
--- /dev/null
@@ -0,0 +1,30 @@
+#include "viewerwidget.h"
+#include "mainwindow.h"
+
+ViewerWidget::ViewerWidget(MainWindow *parent):
+        QGLWidget(parent)
+{
+    mainWindow = parent;
+}
+
+void ViewerWidget::initializeGL()
+{
+    mainWindow->writeLog("Initializing...\n");
+    if (context()->format().openGLVersionFlags() & QGLFormat::OpenGL_Version_2_1)
+        mainWindow->writeLog("OpenGL 2.1 is available :)\n");
+    // Set up the rendering context, define display lists etc.:
+    glClearColor(0.0, 0.0, 0.0, 0.0);
+    glEnable(GL_DEPTH_TEST);
+}
+
+void ViewerWidget::resizeGL(int w, int h)
+{
+    // setup viewport, projection etc.:
+    glViewport(0, 0, (GLint)w, (GLint)h);
+}
+
+void ViewerWidget::paintGL()
+{
+    // draw the scene:
+    glClear(GL_COLOR_BUFFER_BIT);
+}
diff --git a/viewerwidget.h b/viewerwidget.h
new file mode 100644 (file)
index 0000000..916809f
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef VIEWERWIDGET_H
+#define VIEWERWIDGET_H
+
+#include <QGLWidget>
+
+class MainWindow;
+
+class ViewerWidget : public QGLWidget
+{
+public:
+    ViewerWidget(MainWindow *parent);
+
+protected:
+    void initializeGL();
+    void resizeGL(int w, int h);
+    void paintGL();
+
+private:
+    MainWindow *mainWindow;
+
+};
+
+#endif // VIEWERWIDGET_H