Skip to content

Commit ec2fc2c

Browse files
committed
project structure refactor
0 parents  commit ec2fc2c

8 files changed

Lines changed: 315 additions & 0 deletions

File tree

.gitignore

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
###Qt###
2+
3+
# C++ objects and libs
4+
5+
*.slo
6+
*.lo
7+
*.o
8+
*.a
9+
*.la
10+
*.lai
11+
*.so
12+
*.dll
13+
*.dylib
14+
15+
# Qt-es
16+
17+
object_script.*.Release
18+
object_script.*.Debug
19+
*_plugin_import.cpp
20+
/.qmake.cache
21+
/.qmake.stash
22+
*.pro.user
23+
*.pro.user.*
24+
*.qbs.user
25+
*.qbs.user.*
26+
*.moc
27+
moc_*.cpp
28+
moc_*.h
29+
qrc_*.cpp
30+
ui_*.h
31+
*.qmlc
32+
*.jsc
33+
Makefile*
34+
*build-*
35+
36+
# Qt unit tests
37+
target_wrapper.*
38+
39+
# QtCreator
40+
41+
*.autosave
42+
43+
# QtCtreator Qml
44+
*.qmlproject.user
45+
*.qmlproject.user.*
46+
47+
# QtCtreator CMake
48+
CMakeLists.txt.user*
49+
50+
51+
52+
###Linux###
53+
54+
*~
55+
56+
# KDE directory preferences
57+
.directory
58+
59+
60+
###SublimeText###
61+
62+
# cache files for sublime text
63+
*.tmlanguage.cache
64+
*.tmPreferences.cache
65+
*.stTheme.cache
66+
67+
# workspace files are user-specific
68+
*.sublime-workspace
69+
70+
# project files should be checked into the repository, unless a significant
71+
# proportion of contributors will probably not be using SublimeText
72+
# *.sublime-project
73+
74+
# sftp configuration file
75+
sftp-config.json
76+
77+
78+
###Windows###
79+
80+
# Windows image file caches
81+
Thumbs.db
82+
ehthumbs.db
83+
84+
# Folder config file
85+
Desktop.ini
86+
87+
# Recycle Bin used on file shares
88+
$RECYCLE.BIN/
89+
90+
# Windows Installer files
91+
*.cab
92+
*.msi
93+
*.msm
94+
*.msp
95+
96+
# Windows shortcuts
97+
*.lnk
98+
99+
100+
###Python###
101+
102+
# Byte-compiled / optimized / DLL files
103+
__pycache__/
104+
*.py[cod]
105+
*$py.class
106+
107+
# C extensions
108+
*.so
109+
110+
# Distribution / packaging
111+
.Python
112+
build/
113+
develop-eggs/
114+
dist/
115+
downloads/
116+
eggs/
117+
.eggs/
118+
lib/
119+
lib64/
120+
parts/
121+
sdist/
122+
var/
123+
wheels/
124+
*.egg-info/
125+
.installed.cfg
126+
*.egg
127+
MANIFEST
128+
129+
# PyInstaller
130+
# Usually these files are written by a python script from a template
131+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
132+
*.manifest
133+
*.spec
134+
135+
# Installer logs
136+
pip-log.txt
137+
pip-delete-this-directory.txt
138+
139+
# Unit test / coverage reports
140+
htmlcov/
141+
.tox/
142+
.coverage
143+
.coverage.*
144+
.cache
145+
nosetests.xml
146+
coverage.xml
147+
*.cover
148+
.hypothesis/
149+
150+
# Translations
151+
*.mo
152+
*.pot
153+
154+
# Django stuff:
155+
*.log
156+
.static_storage/
157+
.media/
158+
local_settings.py
159+
160+
# Flask stuff:
161+
instance/
162+
.webassets-cache
163+
164+
# Scrapy stuff:
165+
.scrapy
166+
167+
# Sphinx documentation
168+
docs/_build/
169+
170+
# PyBuilder
171+
target/
172+
173+
# Jupyter Notebook
174+
.ipynb_checkpoints
175+
176+
# pyenv
177+
.python-version
178+
179+
# celery beat schedule file
180+
celerybeat-schedule
181+
182+
# SageMath parsed files
183+
*.sage.py
184+
185+
# Environments
186+
.env
187+
.venv
188+
env/
189+
venv/
190+
ENV/
191+
env.bak/
192+
venv.bak/
193+
194+
# Spyder project settings
195+
.spyderproject
196+
.spyproject
197+
198+
# Rope project settings
199+
.ropeproject
200+
201+
# mkdocs documentation
202+
/site
203+
204+
# mypy
205+
.mypy_cache/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "src/third-party/singleapplication"]
2+
path = src/third-party/singleapplication
3+
url = git@github.com:itay-grudev/SingleApplication.git

src/main.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#include "settings.h"
2+
#include <QApplication>
3+
#include <singleapplication.h>
4+
5+
int main(int argc, char *argv[])
6+
{
7+
QApplication a(argc, argv);
8+
settings w;
9+
w.show();
10+
11+
return a.exec();
12+
}

src/settings.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#include "settings.h"
2+
#include "ui_settings.h"
3+
4+
settings::settings(QWidget *parent) :
5+
QDialog(parent),
6+
ui(new Ui::settings)
7+
{
8+
ui->setupUi(this);
9+
}
10+
11+
settings::~settings()
12+
{
13+
delete ui;
14+
}

src/settings.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#ifndef SETTINGS_H
2+
#define SETTINGS_H
3+
4+
#include <QDialog>
5+
6+
namespace Ui {
7+
class settings;
8+
}
9+
10+
class settings : public QDialog
11+
{
12+
Q_OBJECT
13+
14+
public:
15+
explicit settings(QWidget *parent = 0);
16+
~settings();
17+
18+
private:
19+
Ui::settings *ui;
20+
};
21+
22+
#endif // SETTINGS_H

src/settings.ui

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<ui version="4.0">
2+
<class>settings</class>
3+
<widget class="QDialog" name="settings" >
4+
<property name="geometry" >
5+
<rect>
6+
<x>0</x>
7+
<y>0</y>
8+
<width>400</width>
9+
<height>300</height>
10+
</rect>
11+
</property>
12+
<property name="windowTitle" >
13+
<string>settings</string>
14+
</property>
15+
</widget>
16+
<layoutDefault spacing="6" margin="11" />
17+
<pixmapfunction></pixmapfunction>
18+
<resources/>
19+
<connections/>
20+
</ui>

src/third-party/singleapplication

Submodule singleapplication added at c03d32e

tomate.pro

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#-------------------------------------------------
2+
#
3+
# Project created by QtCreator 2018-06-09T22:39:51
4+
#
5+
#-------------------------------------------------
6+
7+
QT += core gui
8+
9+
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
10+
11+
12+
TARGET = tomate
13+
TEMPLATE = app
14+
15+
# The following define makes your compiler emit warnings if you use
16+
# any feature of Qt which has been marked as deprecated (the exact warnings
17+
# depend on your compiler). Please consult the documentation of the
18+
# deprecated API in order to know how to port your code away from it.
19+
DEFINES += QT_DEPRECATED_WARNINGS
20+
21+
include(src/third-party/singleapplication/singleapplication.pri)
22+
DEFINES += QAPPLICATION_CLASS=QApplication
23+
24+
# You can also make your code fail to compile if you use deprecated APIs.
25+
# In order to do so, uncomment the following line.
26+
# You can also select to disable deprecated APIs only up to a certain version of Qt.
27+
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
28+
CONFIG += c++11
29+
30+
SOURCES += \
31+
src/main.cpp \
32+
src/settings.cpp
33+
34+
HEADERS += \
35+
src/settings.h
36+
37+
FORMS += \
38+
src/settings.ui

0 commit comments

Comments
 (0)