195 m_helloSounds.append(QString("/Sounds/voices/%1/Hello.ogg").arg(vp)); |
195 m_helloSounds.append(QString("/Sounds/voices/%1/Hello.ogg").arg(vp)); |
196 } |
196 } |
197 |
197 |
198 m_hilightSound = "/Sounds/beep.ogg"; |
198 m_hilightSound = "/Sounds/beep.ogg"; |
199 |
199 |
200 mainLayout.setSpacing(1); |
200 mainLayout.setMargin(0); |
201 mainLayout.setMargin(1); |
201 |
202 mainLayout.setSizeConstraint(QLayout::SetMinimumSize); |
202 QWidget * leftSideContainer = new QWidget(); |
203 mainLayout.setColumnStretch(0, 76); |
203 leftSideContainer->setObjectName("leftSideContainer"); |
204 mainLayout.setColumnStretch(1, 24); |
204 leftSideContainer->setStyleSheet("#leftSideContainer { border-width: 0px; background-color: #ffcc00; border-radius: 10px;} QTextBrowser, SmartLineEdit { background-color: rgb(13, 5, 68); }"); |
205 |
205 QVBoxLayout * leftSide = new QVBoxLayout(leftSideContainer); |
206 chatEditLine = new SmartLineEdit(this); |
206 leftSide->setSpacing(3); |
207 chatEditLine->setMaxLength(300); |
207 leftSide->setMargin(3); |
208 connect(chatEditLine, SIGNAL(returnPressed()), this, SLOT(returnPressed())); |
208 mainLayout.addWidget(leftSideContainer, 76); |
209 |
209 |
210 mainLayout.addWidget(chatEditLine, 2, 0); |
210 // Chat view |
211 |
211 |
212 chatText = new QTextBrowser(this); |
212 chatText = new QTextBrowser(this); |
213 |
|
214 chatText->document()->setDefaultStyleSheet(styleSheet()); |
213 chatText->document()->setDefaultStyleSheet(styleSheet()); |
215 |
|
216 chatText->setMinimumHeight(20); |
214 chatText->setMinimumHeight(20); |
217 chatText->setMinimumWidth(10); |
215 chatText->setMinimumWidth(10); |
218 chatText->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
216 chatText->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
219 chatText->setOpenLinks(false); |
217 chatText->setOpenLinks(false); |
|
218 chatText->setStyleSheet("QTextBrowser { background-color: rgb(23, 11, 54); border-width: 0px; }"); |
220 connect(chatText, SIGNAL(anchorClicked(const QUrl&)), |
219 connect(chatText, SIGNAL(anchorClicked(const QUrl&)), |
221 this, SLOT(linkClicked(const QUrl&))); |
220 this, SLOT(linkClicked(const QUrl&))); |
222 mainLayout.addWidget(chatText, 0, 0, 2, 1); |
221 leftSide->addWidget(chatText, 1); |
|
222 |
|
223 // Input box |
|
224 |
|
225 // Normal: rgb(23, 11, 54) |
|
226 // Hover: rgb(13, 5, 68) |
|
227 |
|
228 chatEditLine = new SmartLineEdit(); |
|
229 chatEditLine->setMaxLength(300); |
|
230 chatEditLine->setStyleSheet("SmartLineEdit { background-color: rgb(23, 11, 54); padding: 2px 8px; border-width: 0px; border-radius: 7px; } SmartLineEdit:hover, SmartLineEdit:focus { background-color: rgb(13, 5, 68); }"); |
|
231 chatEditLine->setFixedHeight(24); |
|
232 chatEditLine->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
|
233 connect(chatEditLine, SIGNAL(returnPressed()), this, SLOT(returnPressed())); |
|
234 |
|
235 leftSide->addWidget(chatEditLine, 0); |
|
236 |
|
237 // Nickname list |
223 |
238 |
224 chatNicks = new QListView(this); |
239 chatNicks = new QListView(this); |
225 chatNicks->setIconSize(QSize(24, 16)); |
240 chatNicks->setIconSize(QSize(24, 16)); |
226 chatNicks->setSelectionMode(QAbstractItemView::SingleSelection); |
241 chatNicks->setSelectionMode(QAbstractItemView::SingleSelection); |
227 chatNicks->setEditTriggers(QAbstractItemView::NoEditTriggers); |
242 chatNicks->setEditTriggers(QAbstractItemView::NoEditTriggers); |
233 connect(chatNicks, SIGNAL(doubleClicked(QModelIndex)), |
248 connect(chatNicks, SIGNAL(doubleClicked(QModelIndex)), |
234 this, SLOT(chatNickDoubleClicked(QModelIndex))); |
249 this, SLOT(chatNickDoubleClicked(QModelIndex))); |
235 |
250 |
236 connect(chatNicks, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(nicksContextMenuRequested(QPoint))); |
251 connect(chatNicks, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(nicksContextMenuRequested(QPoint))); |
237 |
252 |
238 mainLayout.addWidget(chatNicks, 0, 1, 3, 1); |
253 mainLayout.addSpacing(0); |
|
254 mainLayout.addWidget(chatNicks, 24); |
239 |
255 |
240 // the userData is used to flag things that are even available when user |
256 // the userData is used to flag things that are even available when user |
241 // is offline |
257 // is offline |
242 acInfo = new QAction(QAction::tr("Info"), chatNicks); |
258 acInfo = new QAction(QAction::tr("Info"), chatNicks); |
243 acInfo->setIcon(QIcon(":/res/info.png")); |
259 acInfo->setIcon(QIcon(":/res/info.png")); |