1 #ifndef MEETINGROOMCOMBO_H_
\r
2 #define MEETINGROOMCOMBO_H_
\r
10 //! Userinterface class. Displays a list of selectable meeting rooms.
\r
12 * Userinterface class. Displays a list of selectable meeting rooms. Customized QComboBox which hides
\r
13 * all the not needed functionality of the "base" class.
\r
15 class MeetingRoomCombo : public QWidget
\r
22 * Constructs the MeetingRoomCombo.
\r
23 * \param aRooms List of available rooms.
\r
24 * \param aParent parent of the widget
\r
26 MeetingRoomCombo( QList<Room*> aRooms, QWidget *aParent = 0 );
\r
28 virtual ~MeetingRoomCombo();
\r
30 //! Number of rooms.
\r
32 * \return Number of rooms.
\r
37 * \return Index of currently selected item.
\r
42 * \return Pointer to the room currently selected.
\r
44 Room* currentRoom();
\r
47 //! Sets the current room
\r
49 * Sets the current room to match aIndex.
\r
50 * \param aIndex index of item to be selected.
\r
52 void setCurrentIndex( int aIndex );
\r
53 //! Sets the current room
\r
55 * Sets the current room to be aRoom.
\r
56 * \param aRoom Pointer to the room to be selected.
\r
58 void setCurrentRoom( Room *aRoom );
\r
59 //! Sets the current room
\r
61 * Sets the current room based on room's name.
\r
62 * \param aName Name of the room to be selected.
\r
64 void setCurrentRoomBy( const QString &aName );
\r
66 //! Searches for the room.
\r
68 * Searches for the room "aRoom".
\r
69 * \param aRoom Pointer to the room to be searched.
\r
70 * \return Index of room if found. Otherwise negative.
\r
72 int findRoom( Room *aRoom );
\r
73 //! Searches for the room.
\r
75 * Searches for the room by its name.
\r
76 * \param aName Name of the room to be searched.
\r
77 * \return Index of room if found. Otherwise negative.
\r
79 int findRoomBy( const QString &aName );
\r
82 //! Signals change of the current room.
\r
84 * Signal is emided when room is changed.
\r
85 * \param aNewIndex Index of the item now selected.
\r
87 void currentIndexChanged( int aNewIndex );
\r
88 //! Signals change of the current room.
\r
90 * Signal is emided when room is changed.
\r
91 * \param aNewRoom Pointer to the room now selected.
\r
93 void currentRoomChanged( Room *aNewRoom );
\r
96 //! Combobox containing the names of the rooms.
\r
97 QComboBox *iRoomCombo;
\r
99 QList<Room*> iRooms;
\r
102 #endif /*MEETINGROOMCOMBO_H_*/
\r