kopete/kopete
chatview.cpp
Go to the documentation of this file.
144 connect( mgr, SIGNAL(onlineStatusChanged(Kopete::Contact*,Kopete::OnlineStatus,Kopete::OnlineStatus)),
145 this, SLOT(slotContactStatusChanged(Kopete::Contact*,Kopete::OnlineStatus,Kopete::OnlineStatus)) );
255 response = KMessageBox::warningContinueCancel( this, i18n("<qt>You have received a message from <b>%1</b> in the last "
256 "second. Are you sure you want to clear this chat?</qt>", unreadMessageFrom ), i18n( "Unread Message" ),
257 KGuiItem( i18nc( "@action:button", "Clear Chat" ) ), KStandardGuiItem::cancel(), QLatin1String("AskClearChatRecentMessage" ) );
274 QString contactListGroup = QString(QLatin1String("chatwindow_") + QString(mc->metaContactId()));
293 KWindowSystem::setCurrentDesktop(KWindowSystem::windowInfo(m_mainWindow->winId(), NET::WMDesktop).desktop());
356 response = KMessageBox::warningContinueCancel( this, i18n("<qt>You are about to leave the groupchat session <b>%1</b>.<br />"
357 "You will not receive future messages from this conversation.</qt>", shortCaption ), i18n( "Closing Group Chat" ),
358 KGuiItem( i18nc( "@action:button", "Close Chat" ) ), KStandardGuiItem::cancel(), QLatin1String( "AskCloseGroupChat" ) );
363 response = KMessageBox::warningContinueCancel( this, i18n("<qt>You have received a message from <b>%1</b> in the last "
364 "second. Are you sure you want to close this chat?</qt>", unreadMessageFrom ), i18n( "Unread Message" ),
365 KGuiItem( i18nc( "@action:button", "Close Chat" ) ), KStandardGuiItem::cancel(), QLatin1String("AskCloseChatRecentMessage" ) );
370 response = KMessageBox::warningContinueCancel( this, i18n( "You have a message send in progress, which will be "
371 "aborted if this chat is closed. Are you sure you want to close this chat?" ), i18n( "Message in Transit" ),
372 KGuiItem( i18nc( "@action:button", "Close Chat" ) ), KStandardGuiItem::cancel(), QLatin1String( "AskCloseChatMessageInProgress" ) );
399 else if ( newState != Typing && ( newState != Changed || ( m_tabState != Message && m_tabState != Highlighted ) )
401 { //if the new state is not a typing state and we don't already have a message or a highlighted message
580 if( !suppress && Kopete::BehaviorSettings::self()->showEvents() && m_manager->members().count() > 1 )
585 connect( m_manager->members().first(), SIGNAL(canAcceptFilesChanged()), this, SIGNAL(canAcceptFilesChanged()) );
591 disconnect( m_manager->members().first(), SIGNAL(canAcceptFilesChanged()), this, SIGNAL(canAcceptFilesChanged()) );
608 void ChatView::slotContactRemoved( const Kopete::Contact *contact, const QString &reason, Qt::TextFormat format, bool suppressNotification )
739 void ChatView::slotContactStatusChanged( Kopete::Contact *contact, const Kopete::OnlineStatus &newStatus, const Kopete::OnlineStatus &oldStatus )
811 KConfigGroup kopeteChatWindowMainWinSettings( config, ( msgManager()->form() == Kopete::ChatSession::Chatroom ? QLatin1String( "KopeteChatWindowGroupMode" ) : QLatin1String( "KopeteChatWindowIndividualMode" ) ) );
812 kopeteChatWindowMainWinSettings.writeEntry( QLatin1String("ChatViewSplitter"), d->splitter->saveState().toBase64() );
831 // If settings are the same as default delete entry from config. This will propagate global setting change.
856 bool enableRichText = config.readEntry( "EnableRichText", Kopete::BehaviorSettings::self()->richTextByDefault() );
859 bool enableAutoSpell = config.readEntry( "EnableAutoSpellCheck", Kopete::BehaviorSettings::self()->spellCheck() );
866 KConfigGroup kopeteChatWindowMainWinSettings( KGlobal::config(), ( msgManager()->form() == Kopete::ChatSession::Chatroom ? QLatin1String( "KopeteChatWindowGroupMode" ) : QLatin1String( "KopeteChatWindowIndividualMode" ) ) );
901 // Remove the topmost timer from the list. Why does QPtrDict use void* keys and not typed keys? *sigh*
void loadChatSettings()
read the chat settings (rich text, auto spelling)
Definition: chatview.cpp:846
Definition: chatview.h:62
Definition: chatview.h:70
void setCaption(const QString &text, bool modified)
Sets the text to be displayed on tab label and window caption.
Definition: chatview.cpp:659
virtual void dropEvent(QDropEvent *event)
iterator erase(iterator pos)
void appendMessage(Kopete::Message &message, bool restoring=false)
Appends a message to the messave view.
Definition: chatmessagepart.cpp:474
static ChatWindowStyleManager * self()
Singleton access to this class.
Definition: kopetechatwindowstylemanager.cpp:66
const QMimeData * mimeData() const
void setRichTextEnabled(bool enable)
enable/disable rich text support
Definition: kopeterichtextwidget.cpp:215
void keepScrolledDown()
Immediately scroll the chat to the bottom, as long as it has not been intentionally scrolled away fro...
Definition: chatmessagepart.cpp:672
void resetConfig(KConfigGroup &config)
Definition: chattexteditpart.cpp:547
bool isDragEventAccepted(const QDragMoveEvent *) const
Definition: chatview.cpp:929
virtual void registerContextMenuHandler(QObject *target, const char *slot)
Reimplemented from KopeteView.
Definition: chatview.cpp:1022
virtual void dragEnterEvent(QDragEnterEvent *event)
void detachChatView(ChatView *chat)
Detach a chat view from this window.
Definition: kopetechatwindow.cpp:804
void captionChanged(bool active)
virtual Kopete::ChatSession * manager(Kopete::Contact::CanCreateFlags)
Definition: chatwindowconfig.cpp:94
Definition: chatmessagepart.h:44
QString formatName(const Kopete::Contact *contact, Qt::TextFormat format) const
Format contact's nickname/displayname according to preferences.
Definition: chatmessagepart.cpp:1250
virtual void appendMessage(Kopete::Message &message)
Called when a message is received from someone.
Definition: chatview.cpp:685
Definition: chatview.h:70
QString join(const QString &separator) const
virtual void dragMoveEvent(QDragMoveEvent *event)
QString & remove(int position, int n)
Definition: chatview.h:70
virtual bool provides(const char *mimeType) const
void readConfig(KConfigGroup &config)
Definition: chattexteditpart.cpp:518
bool isNull() const
void remoteTyping(const Kopete::Contact *contact, bool typing)
Called when a typing event is received from a contact Updates the typing map and outputs the typing m...
Definition: chatview.cpp:432
K_PLUGIN_FACTORY(KopeteAccountConfigFactory, registerPlugin< KopeteAccountConfig >();) KopeteAccountConfig
Definition: kopeteaccountconfig.cpp:56
void clear()
Definition: kopeteitembase.h:57
bool canDecode(const QMimeSource *source)
int count(const T &value) const
void append(const T &value)
void updateChatState(ChatView *, int)
Emitted when the state of the chat changes.
bool isEmpty() const
static KopeteChatWindow * window(Kopete::ChatSession *manager)
Find the appropriate window for a ChatView of the given protocol to dock into.
Definition: kopetechatwindow.cpp:105
bool isEmpty() const
void copy()
Initiates a copy action If there is text selected in the HTML view, that text is copied Otherwise...
Definition: chatview.cpp:226
void setStatusText(const QString &text)
Sets the text to be displayed on the status label.
Definition: chatview.cpp:478
virtual Kopete::Message currentMessage()
Returns the message currently in the edit area.
Definition: chatview.cpp:211
T & first()
iterator end()
iterator begin()
Definition: chatview.h:70
void activated(KopeteView *)
void paste()
Initiates a paste action into the edit area of the chat view.
Definition: chatview.cpp:234
void sendMessage()
Sends the text currently entered into the edit area.
Definition: chattexteditpart.cpp:263
void resetFontAndColor()
Reset font and color of the edit area and outgoing messages.
Definition: chatview.cpp:264
void saveChatSettings()
save the chat settings (rich text, auto spelling)
Definition: chatview.cpp:817
QString & replace(int position, int n, QChar after)
void slotRecalculateSize(int difference)
Triggers text edit's size recalculation.
Definition: chatview.cpp:485
void updateStatusIcon(ChatView *)
virtual void setCurrentMessage(const Kopete::Message &newMessage)
Sets the current message in the chat window.
Definition: chatview.cpp:216
Kopete::Message contents()
Returns the message currently in the edit area.
Definition: chattexteditpart.cpp:412
QByteArray fromBase64(const QByteArray &base64)
void writeConfig(KConfigGroup &config)
Definition: chattexteditpart.cpp:537
void setMainWindow(KopeteChatWindow *parent)
Changes the pointer to the chat window.
Definition: chatview.cpp:417
void closing(KopeteView *)
virtual void registerTooltipHandler(QObject *target, const char *slot)
Reimplemented from KopeteView.
Definition: chatview.cpp:1031
void setWindowTitle(const QString &)
KopeteView * createView(Kopete::ChatSession *manager)
Definition: chatview.cpp:65
T & last()
void messageSuccess(ChatView *)
void setActiveView(QWidget *active)
Definition: kopetechatwindow.cpp:946
Definition: chatview.h:70
QString fromLatin1(const char *str, int size)
iterator insert(const Key &key, const T &value)
bool isEmpty() const
virtual void sendMessage()
Sends the text currently entered into the edit area.
Definition: chatview.cpp:796
Definition: kopetechatwindow.h:61
void updateChatTooltip(ChatView *, const QString &)
Emitted when a possible tab tooltip needs updating.
ChatView(Kopete::ChatSession *manager, ChatWindowPlugin *parent)
Definition: chatview.cpp:82
void setContents(const Kopete::Message &message)
Sets the message in the edit field.
Definition: chattexteditpart.cpp:403
maximum
void autoSpellCheckEnabled(ChatView *, bool)
void canAcceptFilesChanged()
void copy(bool justselection=false)
Initiates a copy action If there is text selected in the HTML view, that text is copied Otherwise if ...
Definition: chatmessagepart.cpp:893
iterator find(const Key &key)
void updateChatLabel(ChatView *, const QString &)
Emitted when a possible tab label needs updating.
int remove(const Key &key)
singleShot
Definition: chatview.h:70
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.