CMS 3D CMS Logo

IgQtCallbacks.cc File Reference

#include "Iguana/Studio/interface/IgQtCallbacks.h"
#include <qwidget.h>
#include <qtabwidget.h>

Go to the source code of this file.

Functions

voidcreateQtConnection (QObject *source, const char *signal, QObject *dest, const char *slot)
voidcreateQtTabConnection (QTabWidget *tab, QWidget *panel)
void qtConnectionCallback (void *data, bool focus)
void qtShowHideCallback (void *data, bool focus)
void qtTabCallback (void *data, bool focus)


Function Documentation

void* createQtConnection ( QObject *  source,
const char *  signal,
QObject *  dest,
const char *  slot 
)

Definition at line 18 of file IgQtCallbacks.cc.

References IgQtConnection::m_dest, IgQtConnection::m_signal, IgQtConnection::m_slot, and IgQtConnection::m_source.

Referenced by IgQtAppToolBarService::toolBarButton().

00022 {
00023     IgQtConnection *connection = new IgQtConnection;
00024     connection->m_source = source;
00025     connection->m_dest = dest;
00026     connection->m_slot = slot;
00027     connection->m_signal = signal;    
00028     return static_cast <void *> (connection);    
00029 }

void* createQtTabConnection ( QTabWidget *  tab,
QWidget *  panel 
)

Definition at line 50 of file IgQtCallbacks.cc.

References IgQtTabConnection::m_panel, and IgQtTabConnection::m_tab.

00051 {
00052     IgQtTabConnection *connection = new IgQtTabConnection;
00053     connection->m_tab = tab;
00054     connection->m_panel = panel;
00055     return (void *) connection;    
00056 }

void qtConnectionCallback ( void data,
bool  focus 
)

Definition at line 32 of file IgQtCallbacks.cc.

References HLT_VtxMuL3::connect, cmsTiming_parser::dest, IgQtConnection::m_dest, IgQtConnection::m_signal, IgQtConnection::m_slot, IgQtConnection::m_source, signal, and source.

Referenced by IgQtAppToolBarService::toolBarButton().

00033 {
00034     IgQtConnection *connection = static_cast<IgQtConnection *> (data);
00035     QObject *source = connection->m_source;
00036     QObject *dest = connection->m_dest;
00037     const char *slot = connection->m_slot.c_str ();
00038     const char *signal = connection->m_signal.c_str ();
00039     
00040     if (focus)
00041     {
00042         QObject::connect (source, signal, dest, slot);  
00043     }    
00044     else
00045     {
00046         QObject::disconnect (source, signal, dest, slot);       
00047     }
00048 }

void qtShowHideCallback ( void data,
bool  focus 
)

Definition at line 67 of file IgQtCallbacks.cc.

Referenced by IgQtAppToolBarService::toolBarButton().

00068 {
00069     QWidget *widget = static_cast<QWidget *> (data);
00070     widget->setEnabled (focus);    
00071 }

void qtTabCallback ( void data,
bool  focus 
)

Definition at line 58 of file IgQtCallbacks.cc.

References IgQtTabConnection::m_panel, and IgQtTabConnection::m_tab.

00059 {
00060     IgQtTabConnection *connection = static_cast<IgQtTabConnection *> (data);
00061     QTabWidget *tab = connection->m_tab;
00062     QWidget *panel = connection->m_panel;
00063     
00064     tab->setTabEnabled (panel, focus);    
00065 }


Generated on Tue Jun 9 17:54:15 2009 for CMSSW by  doxygen 1.5.4