diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch) | |
tree | acaf47eb0fa12142d3896416a69e74cbf5a72242 /languages/cpp/app_templates/cmakeqt3app | |
download | tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/app_templates/cmakeqt3app')
-rw-r--r-- | languages/cpp/app_templates/cmakeqt3app/CMakeLists.txt | 14 | ||||
-rw-r--r-- | languages/cpp/app_templates/cmakeqt3app/CMakeLists.txt.src | 28 | ||||
-rw-r--r-- | languages/cpp/app_templates/cmakeqt3app/Makefile.am | 18 | ||||
-rw-r--r-- | languages/cpp/app_templates/cmakeqt3app/cmakeqt3app | 8 | ||||
-rw-r--r-- | languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.cpp | 283 | ||||
-rw-r--r-- | languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.h | 39 | ||||
-rw-r--r-- | languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.kdevtemplate | 126 | ||||
-rw-r--r-- | languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.png | bin | 0 -> 5034 bytes | |||
-rw-r--r-- | languages/cpp/app_templates/cmakeqt3app/fileopen.xpm | 22 | ||||
-rw-r--r-- | languages/cpp/app_templates/cmakeqt3app/fileprint.xpm | 24 | ||||
-rw-r--r-- | languages/cpp/app_templates/cmakeqt3app/filesave.xpm | 22 | ||||
-rw-r--r-- | languages/cpp/app_templates/cmakeqt3app/main.cpp | 13 |
12 files changed, 597 insertions, 0 deletions
diff --git a/languages/cpp/app_templates/cmakeqt3app/CMakeLists.txt b/languages/cpp/app_templates/cmakeqt3app/CMakeLists.txt new file mode 100644 index 00000000..819d0a7e --- /dev/null +++ b/languages/cpp/app_templates/cmakeqt3app/CMakeLists.txt @@ -0,0 +1,14 @@ + +PROJECT(%{APPNAMELC}) + +# at least cmake version 2.4.0 is required +CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0) + +# uncomment the following line if you require a special version of Qt +# and adjust it accordingly +# SET(QT_MIN_VERSION "3.0.0") + +# try to find Qt 3 +FIND_PACKAGE(Qt3 REQUIRED) + +ADD_SUBDIRECTORY(src) diff --git a/languages/cpp/app_templates/cmakeqt3app/CMakeLists.txt.src b/languages/cpp/app_templates/cmakeqt3app/CMakeLists.txt.src new file mode 100644 index 00000000..c4ce3e70 --- /dev/null +++ b/languages/cpp/app_templates/cmakeqt3app/CMakeLists.txt.src @@ -0,0 +1,28 @@ +# this is just a basic CMakeLists.txt +# for more information see the cmake man page + +# add definitions, compiler switches, etc. +ADD_DEFINITIONS(${QT_DEFINITIONS} -Wall -O2 -g) + +# add the Qt include dir to the include path +INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR}) + +# list all source files in a variable +SET(%{APPNAMELC}_SRCS main.cpp %{APPNAMELC}.cpp) + +# specify the headers which have to be processed by moc +# and collect the results in the variable given above +QT_WRAP_CPP (%{APPNAMELC} %{APPNAMELC}_SRCS %{APPNAMELC}.h) + +# create tan executable from the list of source files +ADD_EXECUTABLE(%{APPNAMELC} ${%{APPNAMELC}_SRCS}) + +# link the application to the Qt libs +TARGET_LINK_LIBRARIES(%{APPNAMELC} ${QT_LIBRARIES} ) + +# create an install rule for the executable +INSTALL(TARGETS %{APPNAMELC} DESTINATION bin ) + +# if you need to install more things, take a look at the install() command +# in the cmake man page + diff --git a/languages/cpp/app_templates/cmakeqt3app/Makefile.am b/languages/cpp/app_templates/cmakeqt3app/Makefile.am new file mode 100644 index 00000000..c5fca50a --- /dev/null +++ b/languages/cpp/app_templates/cmakeqt3app/Makefile.am @@ -0,0 +1,18 @@ +dataFiles = main.cpp cmakeqt3app.cpp cmakeqt3app.h cmakeqt3app.png \ + filesave.xpm fileopen.xpm fileprint.xpm CMakeLists.txt CMakeLists.txt.src + +templateName = cmakeqt3app + +### no need to change below: +template_DATA = $(templateName).kdevtemplate +templatedir = ${appwizarddatadir}/templates + +appwizarddatadir = ${kde_datadir}/kdevappwizard +$(templateName).tar.gz: ${dataFiles} + $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} + $(GZIP_COMMAND) -f9 $(templateName).tar + +archivedir = ${appwizarddatadir} +archive_DATA = $(templateName).tar.gz ${templateName}.png + +CLEANFILES = *.tar.gz diff --git a/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app b/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app new file mode 100644 index 00000000..6ef2974f --- /dev/null +++ b/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app @@ -0,0 +1,8 @@ +# QMake application +[General] +Name=Qt3 Application +Icon=cmakeqt3app.png +Category=C++/CMake based projects +Comment=Generate a CMake based Qt3 application +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=src/APPNAMELC.cpp diff --git a/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.cpp b/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.cpp new file mode 100644 index 00000000..841f88d4 --- /dev/null +++ b/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.cpp @@ -0,0 +1,283 @@ +%{CPP_TEMPLATE} + +#include "%{APPNAMELC}.h" + +#include <qimage.h> +#include <qpixmap.h> +#include <qtoolbar.h> +#include <qtoolbutton.h> +#include <qpopupmenu.h> +#include <qmenubar.h> +#include <qtextedit.h> +#include <qfile.h> +#include <qfiledialog.h> +#include <qstatusbar.h> +#include <qmessagebox.h> +#include <qprinter.h> +#include <qapplication.h> +#include <qaccel.h> +#include <qtextstream.h> +#include <qpainter.h> +#include <qpaintdevicemetrics.h> +#include <qwhatsthis.h> + +#include "filesave.xpm" +#include "fileopen.xpm" +#include "fileprint.xpm" + +%{APPNAME}::%{APPNAME}() + : QMainWindow( 0, "%{APPNAME}", WDestructiveClose ) +{ + printer = new QPrinter; + QPixmap openIcon, saveIcon, printIcon; + + QToolBar * fileTools = new QToolBar( this, "file operations" ); + fileTools->setLabel( tr("File Operations") ); + + openIcon = QPixmap( fileopen ); + QToolButton * fileOpen + = new QToolButton( openIcon, tr("Open File"), QString::null, + this, SLOT(choose()), fileTools, "open file" ); + + saveIcon = QPixmap( filesave ); + QToolButton * fileSave + = new QToolButton( saveIcon, tr("Save File"), QString::null, + this, SLOT(save()), fileTools, "save file" ); + + printIcon = QPixmap( fileprint ); + QToolButton * filePrint + = new QToolButton( printIcon, tr("Print File"), QString::null, + this, SLOT(print()), fileTools, "print file" ); + + + (void)QWhatsThis::whatsThisButton( fileTools ); + + QString fileOpenText = tr("<p><img source=\"fileopen\"> " + "Click this button to open a <em>new file</em>. <br>" + "You can also select the <b>Open</b> command " + "from the <b>File</b> menu.</p>"); + + QWhatsThis::add( fileOpen, fileOpenText ); + + QMimeSourceFactory::defaultFactory()->setPixmap( "fileopen", openIcon ); + + QString fileSaveText = tr("<p>Click this button to save the file you " + "are editing. You will be prompted for a file name.\n" + "You can also select the <b>Save</b> command " + "from the <b>File</b> menu.</p>"); + + QWhatsThis::add( fileSave, fileSaveText ); + + QString filePrintText = tr("Click this button to print the file you " + "are editing.\n You can also select the Print " + "command from the File menu."); + + QWhatsThis::add( filePrint, filePrintText ); + + + QPopupMenu * file = new QPopupMenu( this ); + menuBar()->insertItem( tr("&File"), file ); + + + file->insertItem( tr("&New"), this, SLOT(newDoc()), CTRL+Key_N ); + + int id; + id = file->insertItem( openIcon, tr("&Open..."), + this, SLOT(choose()), CTRL+Key_O ); + file->setWhatsThis( id, fileOpenText ); + + id = file->insertItem( saveIcon, tr("&Save"), + this, SLOT(save()), CTRL+Key_S ); + file->setWhatsThis( id, fileSaveText ); + + id = file->insertItem( tr("Save &As..."), this, SLOT(saveAs()) ); + file->setWhatsThis( id, fileSaveText ); + + file->insertSeparator(); + + id = file->insertItem( printIcon, tr("&Print..."), + this, SLOT(print()), CTRL+Key_P ); + file->setWhatsThis( id, filePrintText ); + + file->insertSeparator(); + + file->insertItem( tr("&Close"), this, SLOT(close()), CTRL+Key_W ); + + file->insertItem( tr("&Quit"), qApp, SLOT( closeAllWindows() ), CTRL+Key_Q ); + + menuBar()->insertSeparator(); + + QPopupMenu * help = new QPopupMenu( this ); + menuBar()->insertItem( tr("&Help"), help ); + + help->insertItem( tr("&About"), this, SLOT(about()), Key_F1 ); + help->insertItem( tr("About &Qt"), this, SLOT(aboutQt()) ); + help->insertSeparator(); + help->insertItem( tr("What's &This"), this, SLOT(whatsThis()), SHIFT+Key_F1 ); + + e = new QTextEdit( this, "editor" ); + e->setFocus(); + setCentralWidget( e ); + statusBar()->message( tr("Ready"), 2000 ); + + resize( 450, 600 ); +} + + +%{APPNAME}::~%{APPNAME}() +{ + delete printer; +} + + + +void %{APPNAME}::newDoc() +{ + %{APPNAME} *ed = new %{APPNAME}; + ed->setCaption(tr("Qt Example - Application")); + ed->show(); +} + +void %{APPNAME}::choose() +{ + QString fn = QFileDialog::getOpenFileName( QString::null, QString::null, + this); + if ( !fn.isEmpty() ) + load( fn ); + else + statusBar()->message( tr("Loading aborted"), 2000 ); +} + + +void %{APPNAME}::load( const QString &fileName ) +{ + QFile f( fileName ); + if ( !f.open( IO_ReadOnly ) ) + return; + + QTextStream ts( &f ); + e->setText( ts.read() ); + e->setModified( FALSE ); + setCaption( fileName ); + statusBar()->message( tr("Loaded document %1").arg(fileName), 2000 ); +} + + +void %{APPNAME}::save() +{ + if ( filename.isEmpty() ) { + saveAs(); + return; + } + + QString text = e->text(); + QFile f( filename ); + if ( !f.open( IO_WriteOnly ) ) { + statusBar()->message( tr("Could not write to %1").arg(filename), + 2000 ); + return; + } + + QTextStream t( &f ); + t << text; + f.close(); + + e->setModified( FALSE ); + + setCaption( filename ); + + statusBar()->message( tr( "File %1 saved" ).arg( filename ), 2000 ); +} + + +void %{APPNAME}::saveAs() +{ + QString fn = QFileDialog::getSaveFileName( QString::null, QString::null, + this ); + if ( !fn.isEmpty() ) { + filename = fn; + save(); + } else { + statusBar()->message( tr("Saving aborted"), 2000 ); + } +} + + +void %{APPNAME}::print() +{ + // ###### Rewrite to use QSimpleRichText to print here as well + const int Margin = 10; + int pageNo = 1; + + if ( printer->setup(this) ) { // printer dialog + statusBar()->message( tr("Printing...") ); + QPainter p; + if( !p.begin( printer ) ) // paint on printer + return; + + p.setFont( e->font() ); + int yPos = 0; // y-position for each line + QFontMetrics fm = p.fontMetrics(); + QPaintDeviceMetrics metrics( printer ); // need width/height + // of printer surface + for( int i = 0 ; i < e->lines() ; i++ ) { + if ( Margin + yPos > metrics.height() - Margin ) { + QString msg( "Printing (page " ); + msg += QString::number( ++pageNo ); + msg += ")..."; + statusBar()->message( msg ); + printer->newPage(); // no more room on this page + yPos = 0; // back to top of page + } + p.drawText( Margin, Margin + yPos, + metrics.width(), fm.lineSpacing(), + ExpandTabs | DontClip, + e->text( i ) ); + yPos = yPos + fm.lineSpacing(); + } + p.end(); // send job to printer + statusBar()->message( tr("Printing completed"), 2000 ); + } else { + statusBar()->message( tr("Printing aborted"), 2000 ); + } +} + +void %{APPNAME}::closeEvent( QCloseEvent* ce ) +{ + if ( !e->isModified() ) { + ce->accept(); + return; + } + + switch( QMessageBox::information( this, tr("Qt Application Example"), + tr("Do you want to save the changes" + " to the document?"), + tr("Yes"), tr("No"), tr("Cancel"), + 0, 1 ) ) { + case 0: + save(); + ce->accept(); + break; + case 1: + ce->accept(); + break; + case 2: + default: // just for sanity + ce->ignore(); + break; + } +} + + +void %{APPNAME}::about() +{ + QMessageBox::about( this, tr("Qt Application Example"), + tr("This example demonstrates simple use of " + "QMainWindow,\nQMenuBar and QToolBar.")); +} + + +void %{APPNAME}::aboutQt() +{ + QMessageBox::aboutQt( this, tr("Qt Application Example") ); +} diff --git a/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.h b/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.h new file mode 100644 index 00000000..2d372da9 --- /dev/null +++ b/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.h @@ -0,0 +1,39 @@ +%{H_TEMPLATE} + +#ifndef %{APPNAMEUC}_H +#define %{APPNAMEUC}_H + +#include <qmainwindow.h> + +class QTextEdit; + +class %{APPNAME}: public QMainWindow +{ + Q_OBJECT + +public: + %{APPNAME}(); + ~%{APPNAME}(); + +protected: + void closeEvent( QCloseEvent* ); + +private slots: + void newDoc(); + void choose(); + void load( const QString &fileName ); + void save(); + void saveAs(); + void print(); + + void about(); + void aboutQt(); + +private: + QPrinter *printer; + QTextEdit *e; + QString filename; +}; + + +#endif diff --git a/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.kdevtemplate b/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.kdevtemplate new file mode 100644 index 00000000..ff69203c --- /dev/null +++ b/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.kdevtemplate @@ -0,0 +1,126 @@ +# KDE Config File +[General] +Name=Qt3 Application +Name[br]=Meziant Qt3 +Name[ca]=Aplicació Qt3 +Name[da]=Qt3-Program +Name[de]=Qt3-Anwendung +Name[el]=Εφαρμογή Qt3 +Name[es]=Aplicación Qt3 +Name[et]=Qt3 rakendus +Name[fr]=Application Qt3 +Name[hu]=Qt3-alapú alkalmazások +Name[it]=Applicazione Qt3 +Name[ja]=Qt3 アプリケーション +Name[nds]=Qt3-Programm +Name[nl]=Qt3-toepassing +Name[pl]=Program Qt3 +Name[pt]=Aplicação do Qt3 +Name[pt_BR]=Aplicação do Qt3 +Name[ru]=Приложение Qt 3 +Name[sk]=Qt3 aplikácia +Name[sr]=Qt3 програм +Name[sr@Latn]=Qt3 program +Name[sv]=Qt3-program +Name[zh_TW]=Qt3 應用程式 +Icon=cmakeqt3app.png +Category=C++/CMake based projects +Comment=Generate a CMake based Qt3 application +Comment[ca]=Genera una aplicació Qt3 basada en CMake +Comment[da]=Opretter et CMake-baseret Qt3-program +Comment[de]=Erstellt eine auf CMake basierende Qt3-Anwendung +Comment[el]=Δημιουργία μιας εφαρμογής Qt3 με βάση το CMake +Comment[es]=Genera una aplicación Qt3 basada en CMake +Comment[et]=Qt3 rakenduse loomine CMake'i põhjal +Comment[fr]=Génère une application Qt3 basée sur CMake +Comment[hu]=Létrehoz egy CMake-alapú Qt3-alkalmazást +Comment[it]=Genera un'applicazione Qt3 basata su CMake +Comment[ja]=CMake ベースの Qt3 アプリケーションを作成 +Comment[nds]=Stellt en op CMake opbuut Qt3-Programm op +Comment[nl]=Genereer een CMake-gebaseerde Qt3-toepassing +Comment[pl]=Generuje program Qt3 używający CMake +Comment[pt]=Gera uma aplicação em Qt3 baseada no CMake +Comment[pt_BR]=Gera uma aplicação em Qt3 baseada no CMake +Comment[ru]=Создание основанного на CMake приложения Qt 3 +Comment[sk]=Vygeneruje Qt3 aplikáciu založenú na CMake +Comment[sr]=Прави Qt3 програм на основу CMake-а +Comment[sr@Latn]=Pravi Qt3 program na osnovu CMake-a +Comment[sv]=Skapar ett CMake-baserat Qt3-program +Comment[zh_TW]=產生使用 CMake 的 Qt3 應用程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=cmakeqt3app.tar.gz + +[FILE1] +Type=install +Source=%{src}/CMakeLists.txt +Dest=%{dest}/CMakeLists.txt + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE2] +Type=install +Source=%{src}/CMakeLists.txt.src +Dest=%{dest}/src/CMakeLists.txt + +[FILE3] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE4] +Type=install +Source=%{src}/cmakeqt3app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE5] +Type=install +Source=%{src}/cmakeqt3app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE6] +Type=install +Source=%{src}/fileopen.xpm +Dest=%{dest}/src/fileopen.xpm + +[FILE7] +Type=install +Source=%{src}/filesave.xpm +Dest=%{dest}/src/filesave.xpm + +[FILE8] +Type=install +Source=%{src}/fileprint.xpm +Dest=%{dest}/src/fileprint.xpm + +[CMAKE] +Type=finishcmd +Command=cmake ./ -GKDevelop3 +Directory=%{dest} + +[MSG] +Type=message +Comment=A CMake based Qt3 application was created in %{dest} +Comment[ca]=Una aplicació Qt3 basada en CMake ha estat creada en %{dest} +Comment[da]=Et CMake-baseret Qt3-program blev oprettet i %{dest} +Comment[de]=Eine auf CMake basierende Qt3-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή Qt3 βασισμένη στο Qmake δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación Qt3 basada en CMake ha sido creada en %{dest} +Comment[et]=Qt3 rakendus CMake'i põhjal loodi asukohta %{dest} +Comment[fr]=Une application Qt3 basée sur CMake a été créée dans %{dest} +Comment[hu]=Létrejött egy CMake-alapú Qt3-alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione Qt3 basata su CMake in %{dest} +Comment[ja]=CMake ベースの Qt3 アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en op CMake opbuut Qt3-Programm opstellt +Comment[nl]=Een Cmake-gebaseerde Qt3-toepassing is aangemaakt in %{dest} +Comment[pl]=Program Qt3 oparty na CMake został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do Qt3 baseada no CMake em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do Qt3 baseada no CMake em %{dest} +Comment[ru]=Использующее CMake приложение Qt 3 создано в %{dest} +Comment[sk]=Qt3 aplikácia založená na CMake bola vytvorená v %{dest} +Comment[sr]=Qt3 програм на основу CMake-а направљен је у %{dest} +Comment[sr@Latn]=Qt3 program na osnovu CMake-a napravljen je u %{dest} +Comment[sv]=Ett CMake-baserat Qt3-program skapades i %{dest} +Comment[zh_TW]=一個以 Cmake 為基礎的 Qt3 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.png b/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.png Binary files differnew file mode 100644 index 00000000..dda0a10b --- /dev/null +++ b/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.png diff --git a/languages/cpp/app_templates/cmakeqt3app/fileopen.xpm b/languages/cpp/app_templates/cmakeqt3app/fileopen.xpm new file mode 100644 index 00000000..880417ee --- /dev/null +++ b/languages/cpp/app_templates/cmakeqt3app/fileopen.xpm @@ -0,0 +1,22 @@ +/* XPM */ +static const char *fileopen[] = { +" 16 13 5 1", +". c #040404", +"# c #808304", +"a c None", +"b c #f3f704", +"c c #f3f7f3", +"aaaaaaaaa...aaaa", +"aaaaaaaa.aaa.a.a", +"aaaaaaaaaaaaa..a", +"a...aaaaaaaa...a", +".bcb.......aaaaa", +".cbcbcbcbc.aaaaa", +".bcbcbcbcb.aaaaa", +".cbcb...........", +".bcb.#########.a", +".cb.#########.aa", +".b.#########.aaa", +"..#########.aaaa", +"...........aaaaa" +}; diff --git a/languages/cpp/app_templates/cmakeqt3app/fileprint.xpm b/languages/cpp/app_templates/cmakeqt3app/fileprint.xpm new file mode 100644 index 00000000..6ada912f --- /dev/null +++ b/languages/cpp/app_templates/cmakeqt3app/fileprint.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static const char *fileprint[] = { +" 16 14 6 1", +". c #000000", +"# c #848284", +"a c #c6c3c6", +"b c #ffff00", +"c c #ffffff", +"d c None", +"ddddd.........dd", +"dddd.cccccccc.dd", +"dddd.c.....c.ddd", +"ddd.cccccccc.ddd", +"ddd.c.....c....d", +"dd.cccccccc.a.a.", +"d..........a.a..", +".aaaaaaaaaa.a.a.", +".............aa.", +".aaaaaa###aa.a.d", +".aaaaaabbbaa...d", +".............a.d", +"d.aaaaaaaaa.a.dd", +"dd...........ddd" +}; diff --git a/languages/cpp/app_templates/cmakeqt3app/filesave.xpm b/languages/cpp/app_templates/cmakeqt3app/filesave.xpm new file mode 100644 index 00000000..bd6870f4 --- /dev/null +++ b/languages/cpp/app_templates/cmakeqt3app/filesave.xpm @@ -0,0 +1,22 @@ +/* XPM */ +static const char *filesave[] = { +" 14 14 4 1", +". c #040404", +"# c #808304", +"a c #bfc2bf", +"b c None", +"..............", +".#.aaaaaaaa.a.", +".#.aaaaaaaa...", +".#.aaaaaaaa.#.", +".#.aaaaaaaa.#.", +".#.aaaaaaaa.#.", +".#.aaaaaaaa.#.", +".##........##.", +".############.", +".##.........#.", +".##......aa.#.", +".##......aa.#.", +".##......aa.#.", +"b............." +}; diff --git a/languages/cpp/app_templates/cmakeqt3app/main.cpp b/languages/cpp/app_templates/cmakeqt3app/main.cpp new file mode 100644 index 00000000..bd26f19a --- /dev/null +++ b/languages/cpp/app_templates/cmakeqt3app/main.cpp @@ -0,0 +1,13 @@ +%{CPP_TEMPLATE} + +#include <qapplication.h> +#include "%{APPNAMELC}.h" + +int main( int argc, char ** argv ) { + QApplication a( argc, argv ); + %{APPNAME} * mw = new %{APPNAME}(); + mw->setCaption( "%{APPNAME}" ); + mw->show(); + a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) ); + return a.exec(); +} |