BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Slots | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
BALL::VIEW::LogView Class Reference

#include <BALL/VIEW/WIDGETS/logView.h>

Inheritance diagram for BALL::VIEW::LogView:
BALL::VIEW::DockWidget BALL::LogStreamNotifier QDockWidget BALL::VIEW::ModularWidget BALL::Embeddable BALL::VIEW::ConnectionObject

Public Slots

virtual void showGuestContextMenu (const QPoint &)
 
bool eventFilter (QObject *, QEvent *)
 Event filter logstream. More...
 
- Public Slots inherited from BALL::VIEW::DockWidget
virtual void dropEvent (QDropEvent *e)
 
virtual void dragEnterEvent (QDragEnterEvent *e)
 
virtual void showGuestContextMenu (const QPoint &)
 

Public Member Functions

 LogView (QWidget *parent=0, const char *name=0)
 
 LogView (const LogView &view)
 
virtual ~LogView ()
 
virtual void initializeWidget (MainControl &main_control)
 
virtual void finalizeWidget (MainControl &main_control)
 
void logString (const String &text)
 
- Public Member Functions inherited from BALL::VIEW::DockWidget
 DockWidget (QWidget *parent, const char *title=0)
 Use this constructor! More...
 
virtual ~DockWidget ()
 
void setGuest (QWidget &guest)
 
virtual void fetchPreferences (INIFile &inifile)
 
virtual void writePreferences (INIFile &inifile)
 
virtual void setWidgetVisible (bool state)
 For usage with Python: More...
 
virtual void registerForHelpSystem (const QObject *widget, const String &url)
 
QGridLayout * getGuestLayout ()
 
- Public Member Functions inherited from BALL::VIEW::ModularWidget
void setWorkingDirFromFilename_ (String filename)
 
virtual void showHelp (const String &url)
 
 ModularWidget (const char *name="<ModularWidget>")
 
 ModularWidget (const ModularWidget &widget)
 
virtual ~ModularWidget ()
 
virtual void destroy ()
 
virtual void clear ()
 
virtual void checkMenu (MainControl &main_control)
 
QAction * insertMenuEntry (Position parent_id, const String &name, const QObject *receiver=0, const char *slot=0, const String &description="", QKeySequence accel=QKeySequence())
 
void setMenuHint (const String &hint)
 
void setMenuHelp (const String &url)
 
virtual void addToolBarEntries (QToolBar *main_tb)
 
void setIcon (const String &filename, bool add_to_main_toolbar=true)
 
virtual void initializePreferencesTab (Preferences &preferences)
 
virtual void finalizePreferencesTab (Preferences &preferences)
 
virtual void applyPreferences ()
 
bool lockComposites ()
 
bool unlockComposites ()
 Unlock the Composites. More...
 
MainControlgetMainControl () const
 
virtual void setStatusbarText (const String &text, bool important=false)
 
virtual void setStatusbarText (const QString &text, bool important=false)
  More...
 
String getWorkingDir ()
 Implemented for convenience. More...
 
void setWorkingDir (const String &dir)
 Implemented for convenience. More...
 
FragmentDBgetFragmentDB () const
 
virtual void dump (std::ostream &s=std::cout, Size depth=0) const
 
virtual bool canHandle (const String &) const
 
virtual bool openFile (const String &)
 
- Public Member Functions inherited from BALL::Embeddable
 Embeddable (const String &identifier="<Embeddable>")
 
 Embeddable (const Embeddable &embeddable)
 
virtual ~Embeddable ()
 
void setIdentifier (const String &identifier)
 
const StringgetIdentifier () const
 
void unregisterThis ()
 
virtual void registerThis ()
 
- Public Member Functions inherited from BALL::VIEW::ConnectionObject
 ConnectionObject ()
 
virtual ~ConnectionObject ()
 
void registerConnectionObject (ConnectionObject &object)
 
void unregisterConnectionObject (ConnectionObject &object)
 
bool isConnectionObjectRegistered (const ConnectionObject &object)
 
ConnectionObjectgetParent () const
 
ConnectionObjectgetRoot ()
 
virtual void onNotify (Message *message)
 
virtual bool isValid () const
 
- Public Member Functions inherited from BALL::LogStreamNotifier
 LogStreamNotifier ()
 
virtual ~LogStreamNotifier ()
 
void registerAt (LogStream &log_stream, int min_level=LogStreamBuf::MIN_LEVEL, int max_level=LogStreamBuf::MAX_LEVEL)
 
void unregister ()
 

Protected Member Functions

void logNotify ()
 
- Protected Member Functions inherited from BALL::VIEW::DockWidget
 DockWidget ()
 
 DockWidget (const DockWidget &)
 

Private Attributes

QTextEdit * text_edit_
 

Additional Inherited Members

- Public Types inherited from BALL::Embeddable
typedef std::vector< Embeddable * > EmbeddableVector
 
- Static Public Member Functions inherited from BALL::VIEW::ModularWidget
static void registerWidget (ModularWidget *mwidget) throw (Exception::NullPointer)
 
- Static Protected Member Functions inherited from BALL::Embeddable
static void registerInstance_ (const std::type_info &type, const Embeddable *instance)
 
static void unregisterInstance_ (const Embeddable *instance)
 
static Size countInstances_ (const std::type_info &type)
 
static EmbeddablegetInstance_ (const std::type_info &type, Position index)
 
static EmbeddablegetInstance_ (const std::type_info &type, const String &identifier)
 
- Protected Attributes inherited from BALL::VIEW::DockWidget
QWidgetcontainer_
 
QWidgetguest_
 
QGridLayout * layout_
 
- Protected Attributes inherited from BALL::LogStreamNotifier
std::stringstream stream_
 
LogStreamregistered_at_
 

Detailed Description

LogView class. The class LogView records all messages sent to the Log object and displays them as a text history. The class is derived from LogStreamNotifier that provides the connection to the Log object. The class QTextEdit from the qt - library is responsible for the visualization of the text history. Use the class LogView as a widget. There are no initializations necessary. Just create this widget as a child widget of your application and it will record and show all messages sent to the Log object. The LogView supports URLs, that are included into the LogStream. The links must only be one line long. If such a link is clicked, it's document is shown in the HelpViewer. This can be used to show the corresponding section in the BALLView documentation for an occuring problem.

Definition at line 63 of file logView.h.

Constructor & Destructor Documentation

BALL::VIEW::LogView::LogView ( QWidget parent = 0,
const char *  name = 0 
)

Default Constructor. The contructor connects the own stringstream with the Log object. If a string is written into Log this will be notified and the string will be displayed by this logView.

See Also
BALL::LogStream
BALL::VIEW::LogView::LogView ( const LogView view)

Copy constructor. Only for Python Interface The text of view will be copied into this logView.

virtual BALL::VIEW::LogView::~LogView ( )
virtual

Destructor. Calls clear.

Member Function Documentation

bool BALL::VIEW::LogView::eventFilter ( QObject ,
QEvent  
)
slot

Event filter logstream.

virtual void BALL::VIEW::LogView::finalizeWidget ( MainControl main_control)
virtual

Remove menu entries.

Reimplemented from BALL::VIEW::ModularWidget.

virtual void BALL::VIEW::LogView::initializeWidget ( MainControl main_control)
virtual

Setup the menu entry in "Edit->Clear Logs".

Reimplemented from BALL::VIEW::DockWidget.

void BALL::VIEW::LogView::logNotify ( )
protectedvirtual

Overridden notify call. Will be called by Log whenever a string is written to it. That string will then be displayed.

Parameters
sourcethe notification source
Returns
bool returns always true

Reimplemented from BALL::LogStreamNotifier.

void BALL::VIEW::LogView::logString ( const String text)
virtual void BALL::VIEW::LogView::showGuestContextMenu ( const QPoint &  )
virtualslot

Member Data Documentation

QTextEdit* BALL::VIEW::LogView::text_edit_
private

Definition at line 123 of file logView.h.