From f44b1d4abe82cfb74db68bffcaf240f6f6134708 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Mon, 05 Apr 2004 13:49:07 +0000 Subject: use opie debugging --- (limited to 'examples/simple-pim') diff --git a/examples/simple-pim/config.in b/examples/simple-pim/config.in index aa1a426..9e6adc9 100644 --- a/examples/simple-pim/config.in +++ b/examples/simple-pim/config.in @@ -1,4 +1,4 @@ config SIMPLE_PIM_EXAMPLE boolean "Mainwindow with PIM and QCOP usage" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && EXAMPLES && LIBOPIEPIM2 + depends ( LIBQPE || LIBQPE-X11 ) && EXAMPLES && LIBOPIE2CORE && LIBOPIE2PIM diff --git a/examples/simple-pim/example.pro b/examples/simple-pim/example.pro index ebcdb2b..b8b2c69 100644 --- a/examples/simple-pim/example.pro +++ b/examples/simple-pim/example.pro @@ -12,6 +12,6 @@ DEPENDPATH += $(OPIEDIR)/include # we now also include opie -LIBS += -lqpe -lopiepim2 -lopieui2 +LIBS += -lqpe -lopiecore2 -lopiepim2 -lopieui2 include ( $(OPIEDIR)/include.pro ) diff --git a/examples/simple-pim/simple.cpp b/examples/simple-pim/simple.cpp index 50905bf..efd5070 100644 --- a/examples/simple-pim/simple.cpp +++ b/examples/simple-pim/simple.cpp @@ -1,3 +1,24 @@ +/* We use a sane order of include files, from the most special to the least special + That helps to reduce the number of implicit includes hence increases the reuse */ + +/* First the local include files */ +#include "simple.h" + +/* Then the Ope include files. +This includes qpe stuff which will eventually be merged with libopie2 */ +#include // for odebug streams +#include // a template + macro to save the main method and allow quick launching +#include +#include +#include // the QPEApplication +#include +#include +#include +#include +#include +using namespace Opie::Core; + +/* Now the Qt includes */ #include // action #include // menubar #include // toolbar @@ -10,18 +31,8 @@ #include #include // for whats this -#include // the QPEApplication -#include -#include -#include -#include -#include - -#include // a template + macro to save the main method and allow quick launching -#include -#include - -#include "simple.h" +/* Add standard includes here if you need some + Examples are: stdlib.h, socket.h, etc. */ /* * implementation of simple @@ -35,7 +46,6 @@ * either a main method or one for our component plugin system */ -using namespace Opie::Core; OPIE_EXPORT_APP( OApplicationFactory ) MainWindow::MainWindow(QWidget *parent, const char* name, WFlags fl ) @@ -304,7 +314,7 @@ void MainWindow::slotDate() { * at the current mouse position with a DateChooser * to select the day */ - qWarning("slot Date"); + odebug << "slot Date" << oendl; QPopupMenu *menu = new QPopupMenu(); /* A Month to select a date from TRUE for auto close */ DateBookMonth *month = new DateBookMonth(menu, 0, true ); -- cgit v0.9.0.2