summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/groupwise/ui/gwchatpropsdialog.h
blob: b3ecc6f34250c94834a889692a340943e5b917fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
    Kopete Groupwise Protocol
    gwchatpropsdialog.h - dialog for viewing/modifying chat properties

    Copyright (c) 2005      SUSE Linux AG	 	 http://www.suse.com
    
    Kopete (c) 2002-2005 by the Kopete developers <kopete-devel@kde.org>
 
    *************************************************************************
    *                                                                       *
    * This library is free software; you can redistribute it and/or         *
    * modify it under the terms of the GNU General Public                   *
    * License as published by the Free Software Foundation; either          *
    * version 2 of the License, or (at your option) any later version.      *
    *                                                                       *
    *************************************************************************
*/

#ifndef GWCHATPROPSDIALOG_H
#define GWCHATPROPSDIALOG_H

#include <kdialogbase.h>

#include "gwchatrooms.h"

class GroupWiseChatPropsWidget;
/**
 * Dialog for viewing/modifying chat properties.
 * Chatroom list dialog gets props from manager
 * Chatroom list dialog opens chatpropsdlg using props, connects to OkClicked signal
 * User makes changes
 * CLD asks CPD for changes.
 * CLD passes changes to manager
 * manager sends ChatUpdate to server
 * on success, manager updates own model.

 1) Create dialog with populated widget from supplied Chatroom.
 2) Add readonly mode.
 3) Track which things changed?  Easier to get the changed Chatroom back and diff in the manager, simpler api connecting 
 */
class GroupWiseChatPropsDialog : public KDialogBase
{
	Q_OBJECT
  TQ_OBJECT
	public:
		/**
		 * Construct an empty dialog
		 */
		GroupWiseChatPropsDialog( TQWidget * parent, const char * name );
		/**
		 * Construct a populated dialog
		 */
		GroupWiseChatPropsDialog( const GroupWise::Chatroom & room, bool readOnly,
									   TQWidget * parent, const char * name );
		
		~GroupWiseChatPropsDialog() {}
		
		bool dirty() { return m_dirty; };
		GroupWise::Chatroom room();
	protected:
		void initialise();
	protected slots:
		void slotWidgetChanged();
	private:
		GroupWiseChatPropsWidget * m_widget;
		GroupWise::Chatroom m_room;
		bool m_dirty;
};

#endif