[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdenetwork/kopete
From: Duncan Mac-Vicar Prett <duncan () kde ! org>
Date: 2007-11-13 20:14:58
Message-ID: 1194984898.069140.7408.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 736272 by dmacvicar:
- Make the chat window usable in KDE4 again
- remove the sidebar
- use a members list based on a dockable widget, but
without using all features or space
- use a model over a chat session to show it
- port the Q3 stuff to Qt 4 there
- remove _lot_ of uneeded and non robust code
M +1 -1 kopete/chatwindow/CMakeLists.txt
A kopete/chatwindow/chatmemberslistview.cpp [License: LGPL (v2+)]
A kopete/chatwindow/chatmemberslistview.h [License: LGPL (v2+)]
D kopete/chatwindow/chatmemberslistwidget.cpp
D kopete/chatwindow/chatmemberslistwidget.h
M +3 -2 kopete/chatwindow/chatmessagepart.cpp
M +21 -7 kopete/chatwindow/kopetechatwindow.cpp
M +2 -3 kopete/chatwindow/kopetechatwindow.h
M +1 -1 kopete/chatwindow/kopetechatwindow.rc
D kopete/chatwindow/sidebarwidget.cpp
D kopete/chatwindow/sidebarwidget.h
M +1 -0 libkopete/CMakeLists.txt
A libkopete/chatsessionmemberslistmodel.cpp [License: LGPL (v2+)]
A libkopete/chatsessionmemberslistmodel.h [License: LGPL (v2+)]
--- trunk/KDE/kdenetwork/kopete/kopete/chatwindow/CMakeLists.txt #736271:736272
@@ -39,7 +39,7 @@
########### next target ###############
-set(kopete_chatwindow_PART_SRCS chatview.cpp kopetechatwindow.cpp \
chatmemberslistwidget.cpp sidebarwidget.cpp) +set(kopete_chatwindow_PART_SRCS \
chatview.cpp kopetechatwindow.cpp chatmemberslistview.cpp)
kde4_add_plugin(kopete_chatwindow ${kopete_chatwindow_PART_SRCS})
--- trunk/KDE/kdenetwork/kopete/kopete/chatwindow/chatmessagepart.cpp #736271:736272
@@ -232,8 +232,9 @@
connect( this, SIGNAL(popupMenu(const QString &, const QPoint &)),
this, SLOT(slotRightClick(const QString &, const QPoint &)) );
- connect( view()->horizontalScrollBar(), SIGNAL(sliderMoved(int)),
- this, SLOT(slotScrollingTo(int)) );
+ // FIXME no longer compiles
+ //connect( view()->horizontalScrollBar(), SIGNAL(sliderMoved(int)),
+ // this, SLOT(slotScrollingTo(int)) );
//initActions
d->copyAction = KStandardAction::copy( this, SLOT(copy()), actionCollection() );
--- trunk/KDE/kdenetwork/kopete/kopete/chatwindow/kopetechatwindow.cpp #736271:736272
@@ -34,6 +34,7 @@
#include <QLabel>
#include <QVBoxLayout>
#include <QMenu>
+#include <QDockWidget>
#ifdef CHRONO
#include <QTime>
@@ -84,6 +85,8 @@
#include "kopetestdaction.h"
#include "kopeteviewmanager.h"
#include "sidebarwidget.h"
+#include "chatmemberslistview.h"
+#include "chatsessionmemberslistmodel.h"
#include <qtoolbutton.h>
#include <kxmlguifactory.h>
@@ -93,6 +96,8 @@
typedef QMap<Kopete::MetaContact*,KopeteChatWindow*> MetaContactMap;
typedef QList<KopeteChatWindow*> WindowList;
+using Kopete::ChatSessionMembersListModel;
+
namespace
{
AccountMap accountMap;
@@ -204,13 +209,22 @@
updateBg = true;
m_tabBar = 0L;
- m_sideBar = new SidebarWidget(this);
- m_sideBar->setAllowedAreas(Qt::RightDockWidgetArea | Qt::LeftDockWidgetArea);
- m_sideBar->setObjectName("SideBar"); //object name is required for automatic \
position and settings save. + m_participantsWidget = new QDockWidget(this);
+ m_participantsWidget->setAllowedAreas(Qt::RightDockWidgetArea | \
Qt::LeftDockWidgetArea); \
+ m_participantsWidget->setFeatures(QDockWidget::NoDockWidgetFeatures); \
+ m_participantsWidget->setTitleBarWidget(0L); \
+ m_participantsWidget->setObjectName("Participants"); //object name is required for \
automatic position and settings save.
+ ChatSessionMembersListModel *members_model = new ChatSessionMembersListModel(this);
+
+ connect(this, SIGNAL(chatSessionChanged(Kopete::ChatSession *)), members_model, \
SLOT(setChatSession(Kopete::ChatSession *))); +
+ ChatMembersListView *chatmembers = new ChatMembersListView(m_participantsWidget);
+ chatmembers->setModel(members_model);
+ m_participantsWidget->setWidget(chatmembers);
initActions();
- addDockWidget(Qt::RightDockWidgetArea, m_sideBar);
+ addDockWidget(Qt::RightDockWidgetArea, m_participantsWidget);
KVBox *vBox = new KVBox( this );
vBox->setLineWidth( 0 );
@@ -447,9 +461,9 @@
toggleAutoSpellCheck->setChecked( true );
connect( toggleAutoSpellCheck, SIGNAL(triggered(bool)), this, \
SLOT(toggleAutoSpellChecking()) );
- QAction *toggleSideBarAction = m_sideBar->toggleViewAction( );
- toggleSideBarAction->setText( i18n( "Show Sidebar" ) );
- coll->addAction ( "show_sidebar_widget", toggleSideBarAction );
+ QAction *toggleParticipantsAction = m_participantsWidget->toggleViewAction( );
+ toggleParticipantsAction->setText( i18n( "Show Participants" ) );
+ coll->addAction ( "show_participants_widget", toggleParticipantsAction );
actionSmileyMenu = new KopeteEmoticonAction( coll );
coll->addAction( "format_smiley", actionSmileyMenu );
--- trunk/KDE/kdenetwork/kopete/kopete/chatwindow/kopetechatwindow.h #736271:736272
@@ -48,6 +48,7 @@
class KopeteEmoticonAction;
class ChatView;
class SidebarWidget;
+class QDockWidget;
namespace Kopete
{
@@ -133,9 +134,7 @@
//why did we ever need this method??
//const QString fileContents( const QString &file ) const;
- // Sidebar
- SidebarWidget *m_sideBar;
- QTabWidget *m_sideBarTabWidget;
+ QDockWidget *m_participantsWidget;
//
QPointer<ChatView> m_activeView;
--- trunk/KDE/kdenetwork/kopete/kopete/chatwindow/kopetechatwindow.rc #736271:736272
@@ -32,7 +32,7 @@
<text>&Settings</text>
<Merge name="StandardToolBarMenuHandler" />
<Action name="enable_auto_spell_check" />
- <Action append="show_merge" name="show_sidebar_widget" />
+ <Action append="show_merge" name="show_participants_widget" />
<Action append="show_merge" name="options_styles"/>
<Action append="configure_merge" name="settings_prefs" />
</Menu>
--- trunk/KDE/kdenetwork/kopete/libkopete/CMakeLists.txt #736271:736272
@@ -100,6 +100,7 @@
kopeteutils.cpp
kopetewalletmanager.cpp
networkstatuscommon.h
+ chatsessionmemberslistmodel.cpp
# REMOVED FOR NOW
# connectionmanager.cpp
# managedconnectionaccount.cpp
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic