INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

probeview.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2006-2007 Alexei Makarenko
00005  *
00006  * This copy of Orca is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 
00011 #ifndef QTDRIVER_PROBE_VIEW_H
00012 #define QTDRIVER_PROBE_VIEW_H
00013 
00014 #include <QListView>
00015 
00016 #include <orcaqcm/ocmmodel.h>
00017 
00018 #include <orcaprobe/ibrowser.h>
00019 
00020 class QLabel;
00021 class QStatusBar;
00022 
00023 namespace probe
00024 {
00025 
00026 class ProbeView;
00027 class ProbeDelegate;
00028 
00029 class ProbeView : public QListView
00030 {
00031     Q_OBJECT
00032 
00033 public:
00034     ProbeView(  const QString & name,
00035                 orcaqcm::OcmModel       *model,
00036                 QWidget                 *parent=0 );
00037 
00038     void setNeighbors( ProbeView *left,
00039                        ProbeView *right );
00040 
00041     // hooks up to the model using parent's current index
00042     void putIntoFocus();
00043 
00044     static void config( orcaprobe::IBrowser *browser,
00045                         QLabel                   *label,
00046                         QStatusBar               *statusBar );
00047 
00048 private:
00049 
00050     virtual void keyPressEvent( QKeyEvent * event );
00051     virtual void mousePressEvent( QMouseEvent * event );
00052     virtual void focusInEvent( QFocusEvent * event );
00053     virtual void focusOutEvent( QFocusEvent * event );
00054 
00055     virtual void currentChanged( const QModelIndex & current, const QModelIndex & previous );
00056 
00057     QString name_;
00058     orcaqcm::OcmModel        *model_;
00059     ProbeDelegate            *delegate_;
00060 
00061     // need to keep track of left/right for several reasons:
00062     // - blank out right columns on vertical move
00063     // - display info about parent in label above
00064     // - hook us up to the model based on parent's current index
00065     ProbeView               *left_;
00066     ProbeView               *right_;
00067 
00068     // utilities to blank-out the display
00069     // turnOff is recursive to the right
00070     void turnOn();
00071     void turnOff();
00072     bool isOn_;
00073 
00074     static orcaprobe::IBrowser *_browser;
00075     static QLabel                   *_label;
00076     static QStatusBar               *_statusBar;
00077 };
00078 
00079 } // namespace
00080 
00081 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5