Show main.cpp.html syntax highlighted
<!-- Generator: GNU source-highlight 2.4
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><i><font color="#9A1900">/*</font></i>
<i><font color="#9A1900">** Copyright (C) 2007 Graham Percival </font></i><u><font color="#0000FF"><gperciva@uvic.ca></font></u>
<i><font color="#9A1900">** </font></i>
<i><font color="#9A1900">** This program is free software; you can redistribute it and/or modify</font></i>
<i><font color="#9A1900">** it under the terms of the GNU General Public License as published by</font></i>
<i><font color="#9A1900">** the Free Software Foundation; either version 2 of the License, or</font></i>
<i><font color="#9A1900">** (at your option) any later version.</font></i>
<i><font color="#9A1900">** </font></i>
<i><font color="#9A1900">** This program is distributed in the hope that it will be useful,</font></i>
<i><font color="#9A1900">** but WITHOUT ANY WARRANTY; without even the implied warranty of</font></i>
<i><font color="#9A1900">** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</font></i>
<i><font color="#9A1900">** GNU General Public License for more details.</font></i>
<i><font color="#9A1900">** </font></i>
<i><font color="#9A1900">** You should have received a copy of the GNU General Public License</font></i>
<i><font color="#9A1900">** along with this program; if not, write to the Free Software </font></i>
<i><font color="#9A1900">** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</font></i>
<i><font color="#9A1900">*/</font></i>
<b><font color="#000080">#include</font></b> <font color="#FF0000">"mainwindow.h"</font>
<font color="#009900">int</font> <b><font color="#000000">main</font></b><font color="#990000">(</font><font color="#009900">int</font> argc<font color="#990000">,</font> <font color="#009900">char</font> <font color="#990000">*</font>argv<font color="#990000">[])</font>
<font color="#FF0000">{</font>
<i><font color="#9A1900">// to keep this example as simple as possible, we only take the</font></i>
<i><font color="#9A1900">// filename from the command-line.</font></i>
string fileName<font color="#990000">;</font>
<b><font color="#0000FF">if</font></b> <font color="#990000">(</font>argc<font color="#990000"><</font><font color="#993399">2</font><font color="#990000">)</font>
<font color="#FF0000">{</font>
cout<font color="#990000"><<</font><font color="#FF0000">"Please enter filename."</font><font color="#990000"><<</font>endl<font color="#990000">;</font>
<b><font color="#000000">exit</font></b><font color="#990000">(</font><font color="#993399">1</font><font color="#990000">);</font>
<font color="#FF0000">}</font>
<b><font color="#0000FF">else</font></b>
<font color="#FF0000">{</font>
fileName <font color="#990000">=</font> argv<font color="#990000">[</font><font color="#993399">1</font><font color="#990000">];</font>
<font color="#FF0000">}</font>
QApplication <b><font color="#000000">app</font></b><font color="#990000">(</font>argc<font color="#990000">,</font> argv<font color="#990000">);</font>
MarQTwindow <b><font color="#000000">marqt</font></b><font color="#990000">(</font>fileName<font color="#990000">);</font>
marqt<font color="#990000">.</font><b><font color="#000000">show</font></b><font color="#990000">();</font>
<b><font color="#0000FF">return</font></b> app<font color="#990000">.</font><b><font color="#000000">exec</font></b><font color="#990000">();</font>
<font color="#FF0000">}</font>
</tt></pre>
See more files for this project here