Ejemplo n.º 1
0
EvaSystemTray::EvaSystemTray(TQWidget* parent, const char* name) 
	: KSystemTray(parent, name), 
	images(NULL), sysMenu(NULL), statusMenu(NULL), isBlinkOn(false)
{
	blinkTimer = new TQTimer(this);
	TQObject::connect(blinkTimer, SIGNAL(timeout()), SLOT(slotTimeout()));

	clickTimer = new TQTimer(this);
	TQObject::connect(clickTimer, SIGNAL(timeout()), SLOT(slotClickTimeout()));
}
Ejemplo n.º 2
0
bool EvaSystemTray::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: changeToolTip((const unsigned int)(*((const unsigned int*)static_QUType_ptr.get(_o+1))),(const QString&)static_QUType_QString.get(_o+2),(const short)(*((const short*)static_QUType_ptr.get(_o+3)))); break;
    case 1: setOnline(); break;
    case 2: setOffline(); break;
    case 3: setLeave(); break;
    case 4: setInvisible(); break;
    case 5: setLoginWaiting(); break;
    case 6: newTxtMessage((const unsigned int)(*((const unsigned int*)static_QUType_ptr.get(_o+1)))); break;
    case 7: newTxtMessage((const unsigned int)(*((const unsigned int*)static_QUType_ptr.get(_o+1))),(short)(*((short*)static_QUType_ptr.get(_o+2)))); break;
    case 8: gotTxtMessage((const unsigned int)(*((const unsigned int*)static_QUType_ptr.get(_o+1)))); break;
    case 9: newSysMessage(); break;
    case 10: gotSysMessage(); break;
    case 11: static_QUType_int.set(_o,getSenderID()); break;
    case 12: slotTimeout(); break;
    case 13: slotClickTimeout(); break;
    case 14: minMaxAction(); break;
    default:
	return KSystemTray::qt_invoke( _id, _o );
    }
    return TRUE;
}
Ejemplo n.º 3
0
void NotationSelector::handleMouseDoubleClick(const NotationMouseEvent *e)
{
    NOTATION_DEBUG << "NotationSelector::handleMouseDoubleClick" << endl;

    NotationStaff *staff = e->staff;
    if (!staff) return;
    m_selectedStaff = staff;

    bool advanced = (e->modifiers & Qt::ShiftModifier);

    if (e->element && e->exact) {

        emit editElement(staff, e->element, advanced);

    } else {

        //!!! This code is completely broken.  getBarExtents() appears to be
        // rubbish, and everything falls apart from there

        QRect rect = staff->getBarExtents(e->sceneX, e->sceneY);
        
        m_selectionRect->setRect(rect.x() + 0.5, rect.y() + 0.5,
                                 rect.width(), rect.height());
//        m_selectionRect->setY(rect.y());
//        m_selectionRect->setSize(rect.width() - 1, rect.height());

        m_selectionRect->show();
        m_updateRect = false;

        m_justSelectedBar = true;
        QTimer::singleShot(QApplication::doubleClickInterval(), this,
                           SLOT(slotClickTimeout()));
    }

    return;
}