summaryrefslogtreecommitdiff
authorleseb <leseb>2002-07-09 16:50:46 (UTC)
committer leseb <leseb>2002-07-09 16:50:46 (UTC)
commit5f549398401acc5591ffcb67459dbf55ea323b91 (patch) (side-by-side diff)
treed7c8846531a263acfb5bdafbae24fc7cfbbce170
parent235f43313ac455b0240c5ab4d5a50f75f488edfd (diff)
downloadopie-5f549398401acc5591ffcb67459dbf55ea323b91.zip
opie-5f549398401acc5591ffcb67459dbf55ea323b91.tar.gz
opie-5f549398401acc5591ffcb67459dbf55ea323b91.tar.bz2
Check for Ir support
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebookday.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp
index 5474cfc..325b902 100644
--- a/core/pim/datebook/datebookday.cpp
+++ b/core/pim/datebook/datebookday.cpp
@@ -7,48 +7,49 @@
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include <qmessagebox.h>
#include "datebookday.h"
#include "datebookdayheaderimpl.h"
#include <qpe/datebookdb.h>
#include <qpe/resource.h>
#include <qpe/event.h>
#include <qpe/qpeapplication.h>
#include <qpe/timestring.h>
#include <qpe/qpedebug.h>
+#include <qpe/ir.h>
#include <qheader.h>
#include <qdatetime.h>
#include <qpainter.h>
#include <qsimplerichtext.h>
#include <qpopupmenu.h>
#include <qtextcodec.h>
#include <qpalette.h>
#include <qtimer.h>
DateBookDayView::DateBookDayView( bool whichClock, QWidget *parent,
const char *name )
: QTable( 24, 1, parent, name ),
ampm( whichClock )
{
enableClipper(TRUE);
setTopMargin( 0 );
horizontalHeader()->hide();
setLeftMargin(38);
setColumnStretchable( 0, TRUE );
setHScrollBarMode( QScrollView::AlwaysOff );
verticalHeader()->setPalette(white);
verticalHeader()->setResizeEnabled(FALSE);
@@ -701,49 +702,49 @@ void DateBookDayWidget::paintEvent( QPaintEvent *e )
p.drawPixmap( width() - 16, y, Resource::loadPixmap( "repeat" ) );
d = 20;
y += 20;
}
QSimpleRichText rt( text, font() );
rt.setWidth( geom.width() - d - 6 );
rt.draw( &p, 7, 0, e->region(), colorGroup() );
}
void DateBookDayWidget::mousePressEvent( QMouseEvent *e )
{
DateBookDayWidget *item;
item = dateBook->getSelectedWidget();
if (item) item->update();
dateBook->setSelectedWidget(this);
update();
dateBook->repaint();
QPopupMenu m;
m.insertItem( tr( "Edit" ), 1 );
m.insertItem( tr( "Delete" ), 2 );
- m.insertItem( tr( "Beam" ), 3 );
+ if(Ir::supported()) m.insertItem( tr( "Beam" ), 3 );
int r = m.exec( e->globalPos() );
if ( r == 1 ) {
emit editMe( ev.event() );
} else if ( r == 2 ) {
emit deleteMe( ev.event() );
} else if ( r == 3 ) {
emit beamMe( ev.event() );
}
}
void DateBookDayWidget::setGeometry( const QRect &r )
{
geom = r;
setFixedSize( r.width()+1, r.height()+1 );
dateBook->dayView()->moveChild( this, r.x(), r.y()-1 );
show();
}
//---------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------
DateBookDayTimeMarker::DateBookDayTimeMarker( DateBookDay *db )