Commit cdb368cc authored by bobbyblues's avatar bobbyblues

Initialization of the project.

parent b18e30e9
......@@ -28,3 +28,5 @@
*.out
*.app
# For QtCreator
*.user
cmake_minimum_required(VERSION 2.8.9)
PROJECT(Alakajam-Alchkmy)
# CMake configuration
#-------------------------------------------------------------------------------
if(CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-std=gnu++0x)
add_definitions(-DCLM_INTEROPERABILITY)
add_definitions(-DCLM_VERBOSE)
endif()
# Qt5 configuration
#-------------------------------------------------------------------------------
# As moc files are generated in the binary dir, tell CMake
# to always look for includes there:
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
# To run moc when necessary
SET(CMAKE_AUTOMOC ON)
# We load the desired Qt5 modules
FIND_PACKAGE(Qt5Widgets)
# Include and library directories
#-------------------------------------------------------------------------------
INCLUDE_DIRECTORIES(
src
# If compiling on windows, add the path to boost here
)
LINK_DIRECTORIES(
)
# Definition of the source and headers files for the project
#-------------------------------------------------------------------------------
SET(AA_HEADERS
src/mainwindow.h
)
SET(AA_SOURCES
src/mainwindow.cpp
)
SET(AA_DATA
data
)
# Compilation
#-------------------------------------------------------------------------------
ADD_EXECUTABLE(
AA
${AA_SOURCES}
${AA_HEADERS}
src/main.cpp
)
TARGET_LINK_LIBRARIES(
AA
)
# Linking with proper Qt5 modules
#-------------------------------------------------------------------------------
qt5_use_modules(AA Widgets PrintSupport)
# Definition of the files to copy with the executable
#-------------------------------------------------------------------------------
INSTALL(
DIRECTORY ${AA_DATA}
DESTINATION ${CMAKE_BINARY_DIR}
)
IF (WIN32)
INSTALL(TARGETS AA RUNTIME DESTINATION ${CMAKE_BINARY_DIR})
ENDIF (WIN32)
QT += widgets
QT += printsupport
SOURCES += src/mainwindow.cpp \
src/main.cpp
HEADERS += src/mainwindow.h
INCLUDEPATH += src
# Uncomment the next line to compile on windows
# and change the path to boost to the correct one
# INCLUDEPATH += C:/boost_1_55_0/
QMAKE_CXXFLAGS+= -std=c++11
# DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
#include <QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MainWindow vv;
vv.setWindowTitle("Alakajam - Alchemy");
vv.show();
return app.exec();
return 0;
}
#include "mainwindow.h"
#include <iostream>
#include <QFileDialog>
#include <QMessageBox>
#include <QTime>
#include <QCoreApplication>
#include <unistd.h>
#include <QStyle>
///=============================================================================
/// Constructors
///=============================================================================
MainWindow::MainWindow(QWidget * parent)
:QWidget(parent)
{
this->resize(QSize(1400, 900));
this->setLayout(&m_layout);
}
MainWindow::~MainWindow()
{
}
///=============================================================================
/// Methods
///=============================================================================
///=============================================================================
/// Public slots
///=============================================================================
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
/**
* The purpose of this class is to create the main application window
* and handle the interaction between the different components.
*/
#include <QGridLayout>
#include <QWidget>
class MainWindow : public QWidget
{
Q_OBJECT
private:
// === Attributes
QGridLayout m_layout; // Main layout for the window
public:
// === Constructors
explicit MainWindow(QWidget * parent = 0);
virtual ~MainWindow();
// === Methods
public slots:
// === Slots
private:
};
#endif//MAINWINDOW_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment