[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:19:21 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=f978777
The following commit has been merged in the master branch:
commit f978777c7ea6e922f123286b1e906f774b7dce16
Author: Francesco Nwokeka <francesco.nwokeka at gmail.com>
Date: Sat Jun 11 02:34:06 2011 +0200
Part 1of3 - ADD new action buttons to caht handler
The new buttons are :
~ start a audio call
~ start a video call
~ start a file transfer
~ invite contact to chat
None of these are connected yet.
---
app/chat-window.cpp | 72 +++++++++++++++++++++++++++++++++++++++++++----------
app/chat-window.h | 11 ++++++--
2 files changed, 68 insertions(+), 15 deletions(-)
diff --git a/app/chat-window.cpp b/app/chat-window.cpp
index 59c2e9c..7fe5f51 100644
--- a/app/chat-window.cpp
+++ b/app/chat-window.cpp
@@ -55,17 +55,8 @@ ChatWindow::ChatWindow()
KStandardAction::findNext(this, SLOT(onFindNextText()), actionCollection())->setEnabled(false);
KStandardAction::findPrev(this, SLOT(onFindPreviousText()), actionCollection())->setEnabled(false);
- KAction *nextTabAction = new KAction(KIcon("go-next-view"), i18n("&Next Tab"), this);
- nextTabAction->setShortcuts(KStandardShortcut::tabNext());
- connect(nextTabAction, SIGNAL(triggered()), this, SLOT(onNextTabActionToggled()));
-
- KAction *previousTabAction = new KAction(KIcon("go-previous-view"), i18n("&Previous Tab"), this);
- previousTabAction->setShortcuts(KStandardShortcut::tabPrev());
- connect(previousTabAction, SIGNAL(triggered()), this, SLOT(onPreviousTabActionToggled()));
-
- // add custom actions to the collection
- actionCollection()->addAction("next-tab", nextTabAction);
- actionCollection()->addAction("previous-tab", previousTabAction);
+ // create custom actions
+ setupCustomActions();
// set up m_tabWidget
m_tabWidget = new KTabWidget(this);
@@ -172,6 +163,11 @@ void ChatWindow::closeCurrentTab()
removeTab(m_tabWidget->currentWidget());
}
+void ChatWindow::onAudioCallTriggered()
+{
+ /// TODO
+}
+
void ChatWindow::onCurrentIndexChanged(int index)
{
kDebug() << index;
@@ -199,6 +195,11 @@ void ChatWindow::onEnableSearchActions(bool enable)
actionCollection()->action(KStandardAction::name(KStandardAction::FindPrev))->setEnabled(enable);
}
+void ChatWindow::onFileTransferTriggered()
+{
+ /// TODO
+}
+
void ChatWindow::onFindNextText()
{
ChatTab *currChat = qobject_cast<ChatTab*>(m_tabWidget->currentWidget());
@@ -221,7 +222,12 @@ void ChatWindow::onFindPreviousText()
currChat->chatSearchBar()->onPreviousButtonClicked();
}
-void ChatWindow::onNextTabActionToggled()
+void ChatWindow::onInviteToChatTriggered()
+{
+ /// TODO
+}
+
+void ChatWindow::onNextTabActionTriggered()
{
int currIndex = m_tabWidget->currentIndex();
@@ -230,7 +236,7 @@ void ChatWindow::onNextTabActionToggled()
}
}
-void ChatWindow::onPreviousTabActionToggled()
+void ChatWindow::onPreviousTabActionTriggered()
{
int currIndex = m_tabWidget->currentIndex();
@@ -281,6 +287,11 @@ void ChatWindow::onTabTextChanged(const QString &newTitle)
}
}
+void ChatWindow::onVideoCallTriggered()
+{
+ /// TODO
+}
+
void ChatWindow::showSettingsDialog()
{
kDebug();
@@ -324,4 +335,39 @@ void ChatWindow::setupChatTabSignals(ChatTab *chatTab)
connect(chatTab->chatSearchBar(), SIGNAL(enableSearchButtonsSignal(bool)), this, SLOT(onEnableSearchActions(bool)));
}
+void ChatWindow::setupCustomActions()
+{
+ KAction *separator = new KAction(this);
+ separator->setSeparator(true);
+
+ KAction *nextTabAction = new KAction(KIcon("go-next-view"), i18n("&Next Tab"), this);
+ nextTabAction->setShortcuts(KStandardShortcut::tabNext());
+ connect(nextTabAction, SIGNAL(triggered()), this, SLOT(onNextTabActionTriggered()));
+
+ KAction *previousTabAction = new KAction(KIcon("go-previous-view"), i18n("&Previous Tab"), this);
+ previousTabAction->setShortcuts(KStandardShortcut::tabPrev());
+ connect(previousTabAction, SIGNAL(triggered()), this, SLOT(onPreviousTabActionTriggered()));
+
+ KAction *audioCallAction = new KAction(KIcon("voicecall"), i18n("&Audio Call"), this);
+ connect(audioCallAction, SIGNAL(triggered()), this, SLOT(onAudioCallTriggered()));
+
+ KAction *fileTransferAction = new KAction(KIcon("mail-attachment"), i18n("&Send File"), this);
+ connect(fileTransferAction, SIGNAL(triggered()), this, SLOT(onFileTransferTriggered()));
+
+ KAction *inviteToChat = new KAction(KIcon("user-group-new"), i18n("&Invite to chat"), this);
+ connect(inviteToChat, SIGNAL(triggered()), this, SLOT(onInviteToChatTriggered()));
+
+ KAction *videoCallAction = new KAction(KIcon("webcamsend"), i18n("&Video Call"), this);
+ connect(videoCallAction, SIGNAL(triggered()), this, SLOT(onVideoCallTriggered()));
+
+ // add custom actions to the collection
+ actionCollection()->addAction("separator", separator);
+ actionCollection()->addAction("next-tab", nextTabAction);
+ actionCollection()->addAction("previous-tab", previousTabAction);
+ actionCollection()->addAction("audio-call", audioCallAction);
+ actionCollection()->addAction("send-file", fileTransferAction);
+ actionCollection()->addAction("video-call", videoCallAction);
+ actionCollection()->addAction("invite-to-chat", inviteToChat);
+}
+
#include "chat-window.moc"
diff --git a/app/chat-window.h b/app/chat-window.h
index 010eea2..3db916e 100644
--- a/app/chat-window.h
+++ b/app/chat-window.h
@@ -52,16 +52,20 @@ public slots:
private slots:
void closeCurrentTab();
+ void onAudioCallTriggered(); /** start an audio call */
void onCurrentIndexChanged(int index);
void onEnableSearchActions(bool enable); /** enables/disables menu search actions */
+ void onFileTransferTriggered(); /** start a file transfer */
void onFindNextText(); /** go to next text the user is searching for */
void onFindPreviousText(); /** go to previous text the user is searching for */
- void onNextTabActionToggled(); /** go to next tab in the tabwidget */
- void onPreviousTabActionToggled(); /** go to previous tab in the tabwidget */
+ void onInviteToChatTriggered(); /** invite contact(s) to chat */
+ void onNextTabActionTriggered(); /** go to next tab in the tabwidget */
+ void onPreviousTabActionTriggered(); /** go to previous tab in the tabwidget */
void onSearchActionToggled(); /** toggle search bar visibility */
void onTabStateChanged();
void onTabTextChanged(const QString &newTitle);
void onTabIconChanged(const KIcon &newIcon);
+ void onVideoCallTriggered(); /** start a video call */
protected slots:
void showSettingsDialog();
@@ -78,6 +82,9 @@ private:
*/
void setupChatTabSignals(ChatTab *chatTab);
+ /** creates and adds custom actions for the chat window */
+ void setupCustomActions();
+
KTabWidget *m_tabWidget;
};
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list