예제 #1
0
void KviIrcContextDisplayAction::setup()
{
	KviAction::setup();
	connect(g_pMainWindow,SIGNAL(activeConnectionServerInfoChanged()),this,SLOT(activeContextStateChanged()));
	connect(g_pMainWindow,SIGNAL(activeConnectionNickNameChanged()),this,SLOT(activeContextStateChanged()));
	connect(g_pMainWindow,SIGNAL(activeConnectionUserModeChanged()),this,SLOT(activeContextStateChanged()));
	connect(g_pMainWindow,SIGNAL(activeConnectionAwayStateChanged()),this,SLOT(activeContextStateChanged()));
	connect(g_pMainWindow,SIGNAL(activeConnectionLagChanged()),this,SLOT(activeContextStateChanged()));
}
예제 #2
0
QAction * KviConnectAction::addToCustomToolBar(KviCustomToolBar *t)
{
	if(!setupDone())setup();
	QAction * pAction = new QAction(*(g_pIconManager->getBigIcon(KVI_BIGICON_DISCONNECTED)), m_szConnectString, t);
	pAction->setStatusTip(m_szConnectString);
	pAction->setObjectName(KVI_COREACTION_CONNECT);
	t->addAction(pAction);
	connect(pAction, SIGNAL(triggered()), this, SLOT(activate()));
	registerAction(pAction);
	activeContextStateChanged();
	return pAction;
}
예제 #3
0
KviStatusBar::KviStatusBar(KviMainWindow * pFrame)
: QStatusBar(pFrame)
{
	setAutoFillBackground(false);

	setProperty("name","statusbar");
	m_pFrame = pFrame;
	// ugh :D
	setSizeGripEnabled(false);
	setAcceptDrops(true);

	m_pContextPopup = 0;
	m_pAppletsPopup = 0;
	m_pClickedApplet = 0;

	m_pAppletDescriptors = new KviPointerHashTable<QString,KviStatusBarAppletDescriptor>;
	m_pAppletDescriptors->setAutoDelete(true);

	KviStatusBarClock::selfRegister(this);
	KviStatusBarAwayIndicator::selfRegister(this);
	KviStatusBarLagIndicator::selfRegister(this);
	KviStatusBarConnectionTimer::selfRegister(this);
	KviStatusBarUpdateIndicator::selfRegister(this);
	KviStatusBarSeparator::selfRegister(this);

	m_pAppletList = new KviPointerList<KviStatusBarApplet>;
	m_pAppletList->setAutoDelete(false);

	m_pMessageQueue = new KviPointerList<KviStatusBarMessage>;
	m_pMessageQueue->setAutoDelete(true);

	m_pMessageTimer = 0;

	m_pMessageLabel = new QLabel("<b>[x]</b> x",this);
	m_pMessageLabel->setObjectName("msgstatuslabel");
	m_pMessageLabel->setMargin(1);
	insertWidget(0,m_pMessageLabel);
	m_iLastMinimumHeight = 0;
	m_bStopLayoutOnAddRemove = true;
	setContextMenuPolicy(Qt::CustomContextMenu);
	connect(this,SIGNAL(customContextMenuRequested(const QPoint &)),
		this,SLOT(contextMenuRequested(const QPoint &)));

	connect(m_pFrame,SIGNAL(activeContextChanged()),this,SLOT(setPermanentMessage()));
	connect(m_pFrame,SIGNAL(activeContextStateChanged()),this,SLOT(setPermanentMessage()));
	connect(m_pFrame,SIGNAL(activeConnectionUserModeChanged()),this,SLOT(setPermanentMessage()));
	connect(m_pFrame,SIGNAL(activeConnectionNickNameChanged()),this,SLOT(setPermanentMessage()));
	setPermanentMessage();

	m_bStopLayoutOnAddRemove = false;
}
예제 #4
0
void KviConnectAction::activeContextChanged()
{
	activeContextStateChanged();
}
예제 #5
0
void KviConnectAction::reloadImages()
{
	activeContextStateChanged();
}
예제 #6
0
void KviMainWindow::childContextStateChange(KviIrcContext * c)
{
	if(c != m_pActiveContext)
		return;
	emit activeContextStateChanged();
}