tmp
diff --git a/src/chronochat.cpp b/src/chronochat.cpp
index 523a835..f4742be 100644
--- a/src/chronochat.cpp
+++ b/src/chronochat.cpp
@@ -1,3 +1,13 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2013, Regents of the University of California
+ * Yingdi Yu
+ *
+ * BSD license, See the LICENSE file for more information
+ *
+ * Author: Yingdi Yu <yingdi@cs.ucla.edu>
+ */
+
#include "chronochat.h"
#include "ui_chronochat.h"
diff --git a/src/chronochat.h b/src/chronochat.h
index 1bf307f..f4eb0fe 100644
--- a/src/chronochat.h
+++ b/src/chronochat.h
@@ -1,3 +1,13 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2013, Regents of the University of California
+ * Yingdi Yu
+ *
+ * BSD license, See the LICENSE file for more information
+ *
+ * Author: Yingdi Yu <yingdi@cs.ucla.edu>
+ */
+
#ifndef CHRONOCHAT_H
#define CHRONOCHAT_H
diff --git a/src/demo.icns b/src/demo.icns
new file mode 100644
index 0000000..c3661e6
--- /dev/null
+++ b/src/demo.icns
Binary files differ
diff --git a/src/images/icon_large.png b/src/images/icon_large.png
new file mode 100644
index 0000000..b0bde46
--- /dev/null
+++ b/src/images/icon_large.png
Binary files differ
diff --git a/src/images/icon_small.png b/src/images/icon_small.png
new file mode 100644
index 0000000..a9630a8
--- /dev/null
+++ b/src/images/icon_small.png
Binary files differ
diff --git a/src/images/note.png b/src/images/note.png
new file mode 100644
index 0000000..2881ccd
--- /dev/null
+++ b/src/images/note.png
Binary files differ
diff --git a/src/images/refresh.png b/src/images/refresh.png
new file mode 100644
index 0000000..72dd809
--- /dev/null
+++ b/src/images/refresh.png
Binary files differ
diff --git a/src/main.cpp b/src/main.cpp
new file mode 100644
index 0000000..5fcaaf2
--- /dev/null
+++ b/src/main.cpp
@@ -0,0 +1,30 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2013, Regents of the University of California
+ * Yingdi Yu
+ *
+ * BSD license, See the LICENSE file for more information
+ *
+ * Author: Yingdi Yu <yingdi@cs.ucla.edu>
+ */
+
+#include <QApplication>
+
+#include "chronochat.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+// #ifdef __APPLE__
+// app.setWindowIcon(QIcon(":/demo.icns"));
+// #else
+// app.setWindowIcon(QIcon(":/images/icon_large.png"));
+// #endif
+
+ ChronoChat dialog;
+
+ dialog.show ();
+
+ return app.exec();
+}
diff --git a/wscript b/wscript
index 80f3db1..51a3943 100644
--- a/wscript
+++ b/wscript
@@ -2,13 +2,15 @@
VERSION='0.1'
APPNAME='QT-Test'
+from waflib import Configure
+
def options(opt):
opt.load('compiler_c compiler_cxx boost protoc qt4')
def configure(conf):
conf.load("compiler_c compiler_cxx")
-# conf.add_supported_cxxflags (cxxflags = ['-O3', '-g'])
+ conf.add_supported_cxxflags (cxxflags = ['-O3', '-g'])
conf.load('protoc')
@@ -16,4 +18,33 @@
conf.load('boost')
- conf.check_boost(lib='system random thread')
\ No newline at end of file
+ conf.check_boost(lib='system random thread')
+
+ conf.write_config_header('config.h')
+
+
+def build (bld):
+ qt = bld (
+ target = "ChronoChat",
+ features = "qt4 cxx cxxprogram",
+ defines = "WAF",
+ source = bld.path.ant_glob(['src/*.cpp', 'src/*.ui']),
+ includes = ".",
+ use = "BOOST BOOST_THREAD QTCORE QTGUI",
+ )
+
+
+@Configure.conf
+def add_supported_cxxflags(self, cxxflags):
+ """
+ Check which cxxflags are supported by compiler and add them to env.CXXFLAGS variable
+ """
+ self.start_msg('Checking allowed flags for c++ compiler')
+
+ supportedFlags = []
+ for flag in cxxflags:
+ if self.check_cxx (cxxflags=[flag], mandatory=False):
+ supportedFlags += [flag]
+
+ self.end_msg (' '.join (supportedFlags))
+ self.env.CXXFLAGS += supportedFlags