Преглед на файлове

gitignore; fixed position bug

tags/v1.0.0
Robin Thoni преди 9 години
родител
ревизия
428ed3be10
променени са 3 файла, в които са добавени 12 реда и са изтрити 270 реда
  1. 2
    0
      .gitignore
  2. 0
    260
      calendar-window.pro.user
  3. 10
    10
      main.cpp

+ 2
- 0
.gitignore Целия файл

@@ -0,0 +1,2 @@
1
+*.user
2
+*.o

+ 0
- 260
calendar-window.pro.user Целия файл

@@ -1,260 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE QtCreatorProject>
3
-<!-- Written by QtCreator 3.0.1, 2015-05-31T20:14:23. -->
4
-<qtcreator>
5
- <data>
6
-  <variable>ProjectExplorer.Project.ActiveTarget</variable>
7
-  <value type="int">0</value>
8
- </data>
9
- <data>
10
-  <variable>ProjectExplorer.Project.EditorSettings</variable>
11
-  <valuemap type="QVariantMap">
12
-   <value type="bool" key="EditorConfiguration.AutoIndent">true</value>
13
-   <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
14
-   <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
15
-   <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
16
-    <value type="QString" key="language">Cpp</value>
17
-    <valuemap type="QVariantMap" key="value">
18
-     <value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
19
-    </valuemap>
20
-   </valuemap>
21
-   <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
22
-    <value type="QString" key="language">QmlJS</value>
23
-    <valuemap type="QVariantMap" key="value">
24
-     <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
25
-    </valuemap>
26
-   </valuemap>
27
-   <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
28
-   <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
29
-   <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
30
-   <value type="int" key="EditorConfiguration.IndentSize">4</value>
31
-   <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
32
-   <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
33
-   <value type="int" key="EditorConfiguration.PaddingMode">1</value>
34
-   <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
35
-   <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
36
-   <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
37
-   <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
38
-   <value type="int" key="EditorConfiguration.TabSize">8</value>
39
-   <value type="bool" key="EditorConfiguration.UseGlobal">true</value>
40
-   <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
41
-   <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
42
-   <value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
43
-   <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
44
-   <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
45
-  </valuemap>
46
- </data>
47
- <data>
48
-  <variable>ProjectExplorer.Project.PluginSettings</variable>
49
-  <valuemap type="QVariantMap"/>
50
- </data>
51
- <data>
52
-  <variable>ProjectExplorer.Project.Target.0</variable>
53
-  <valuemap type="QVariantMap">
54
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop - Qt4</value>
55
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop - Qt4</value>
56
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5feb06e2-1c9b-46d1-912f-beb5b4bc2562}</value>
57
-   <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
58
-   <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
59
-   <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
60
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
61
-    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/robin/projets/bin/calendar-window-Desktop_Qt4-Debug</value>
62
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
63
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
64
-      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
65
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
66
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
67
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
68
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
69
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
70
-      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
71
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
72
-     </valuemap>
73
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
74
-      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
75
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
76
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
77
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
78
-      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
79
-       <value type="QString">-w</value>
80
-       <value type="QString">-r</value>
81
-      </valuelist>
82
-      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
83
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
84
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
85
-     </valuemap>
86
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
87
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
88
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
89
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
90
-    </valuemap>
91
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
92
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
93
-      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
94
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
95
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
96
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
97
-      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
98
-       <value type="QString">-w</value>
99
-       <value type="QString">-r</value>
100
-      </valuelist>
101
-      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
102
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
103
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
104
-     </valuemap>
105
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
106
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
107
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
108
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
109
-    </valuemap>
110
-    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
111
-    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
112
-    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
113
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
114
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
115
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
116
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
117
-    <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
118
-   </valuemap>
119
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
120
-    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/robin/projets/bin/calendar-window-Desktop_Qt4-Release</value>
121
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
122
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
123
-      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
124
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
125
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
126
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
127
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
128
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
129
-      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
130
-      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
131
-     </valuemap>
132
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
133
-      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
134
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
135
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
136
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
137
-      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
138
-       <value type="QString">-w</value>
139
-       <value type="QString">-r</value>
140
-      </valuelist>
141
-      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
142
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
143
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
144
-     </valuemap>
145
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
146
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
147
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
148
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
149
-    </valuemap>
150
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
151
-     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
152
-      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
153
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
154
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
155
-      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
156
-      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
157
-       <value type="QString">-w</value>
158
-       <value type="QString">-r</value>
159
-      </valuelist>
160
-      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
161
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
162
-      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
163
-     </valuemap>
164
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
165
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
166
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
167
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
168
-    </valuemap>
169
-    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
170
-    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
171
-    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
172
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
173
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
174
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
175
-    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
176
-    <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
177
-   </valuemap>
178
-   <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
179
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
180
-    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
181
-     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
182
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
183
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
184
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
185
-    </valuemap>
186
-    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
187
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
188
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
189
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
190
-   </valuemap>
191
-   <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
192
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
193
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
194
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
195
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
196
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
197
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
198
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
199
-    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
200
-    <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
201
-    <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
202
-    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
203
-    <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
204
-    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
205
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
206
-    <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
207
-    <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
208
-    <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
209
-    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
210
-    <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
211
-    <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
212
-     <value type="int">0</value>
213
-     <value type="int">1</value>
214
-     <value type="int">2</value>
215
-     <value type="int">3</value>
216
-     <value type="int">4</value>
217
-     <value type="int">5</value>
218
-     <value type="int">6</value>
219
-     <value type="int">7</value>
220
-     <value type="int">8</value>
221
-     <value type="int">9</value>
222
-     <value type="int">10</value>
223
-     <value type="int">11</value>
224
-     <value type="int">12</value>
225
-     <value type="int">13</value>
226
-     <value type="int">14</value>
227
-    </valuelist>
228
-    <value type="int" key="PE.EnvironmentAspect.Base">2</value>
229
-    <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
230
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">calendar-window</value>
231
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
232
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/robin/projets/calendar-window/calendar-window.pro</value>
233
-    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
234
-    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">calendar-window.pro</value>
235
-    <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
236
-    <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
237
-    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
238
-    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
239
-    <value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
240
-    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
241
-    <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
242
-    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
243
-    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
244
-   </valuemap>
245
-   <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
246
-  </valuemap>
247
- </data>
248
- <data>
249
-  <variable>ProjectExplorer.Project.TargetCount</variable>
250
-  <value type="int">1</value>
251
- </data>
252
- <data>
253
-  <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
254
-  <value type="QByteArray">{2507e63c-ae51-4259-8bbb-dbe5f3c672bc}</value>
255
- </data>
256
- <data>
257
-  <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
258
-  <value type="int">15</value>
259
- </data>
260
-</qtcreator>

+ 10
- 10
main.cpp Целия файл

@@ -23,17 +23,7 @@ int main(int argc, char *argv[])
23 23
         if (arg.contains(reg_geo))
24 24
         {
25 25
             int x = reg_geo.cap(2).toInt();
26
-            if (x < 300)
27
-            {
28
-                qDebug() << "WIDTH < 300:" << x;
29
-                return usage();
30
-            }
31 26
             int y = reg_geo.cap(3).toInt();
32
-            if (y < 210)
33
-            {
34
-                qDebug() << "HEIGHT < 210:" << y;
35
-                return usage();
36
-            }
37 27
             if (reg_geo.cap(1) == "position")
38 28
             {
39 29
                 qDebug() << "Moving to" << x << y;
@@ -41,6 +31,16 @@ int main(int argc, char *argv[])
41 31
             }
42 32
             else
43 33
             {
34
+                if (x < 300)
35
+                {
36
+                    qDebug() << "WIDTH < 300:" << x;
37
+                    return usage();
38
+                }
39
+                if (y < 210)
40
+                {
41
+                    qDebug() << "HEIGHT < 210:" << y;
42
+                    return usage();
43
+                }
44 44
                 qDebug() << "Resizing to" << x << y;
45 45
                 w.resize(x, y);
46 46
             }

Loading…
Отказ
Запис