Changeset 5446
- Timestamp:
- 09/28/07 21:38:59 (12 months ago)
- Location:
- branches/qt-gui_qt4/src
- Files:
-
- 7 modified
-
gui-defines.h (modified) (1 diff)
-
mainwin.cpp (modified) (2 diffs)
-
mainwin.h (modified) (1 diff)
-
messagebox.cpp (modified) (2 diffs)
-
optionsdlg.cpp (modified) (3 diffs)
-
optionsdlg.h (modified) (1 diff)
-
userinfodlg.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/qt-gui_qt4/src/gui-defines.h
r5375 r5446 20 20 #ifndef GUIDEFINES_H 21 21 #define GUIDEFINES_H 22 23 #define NUM_MSG_PER_HISTORY 4024 #define COLOR_SENT "blue"25 #define COLOR_RECEIVED "red"26 22 27 23 #define DOCK_DIR "dock/" -
branches/qt-gui_qt4/src/mainwin.cpp
r5444 r5446 380 380 licqConf.ReadStr("DateFormat", szTemp, "hh:mm:ss"); 381 381 m_chatDateFormat = QString::fromLatin1(szTemp); 382 licqConf.ReadNum("HistoryMessagesPerPage", m_histMsgNum, 40); 382 383 licqConf.ReadNum("HistoryMessageStyle", m_histMsgStyle, 0); 383 384 licqConf.ReadBool("HistoryVerticalSpacing", m_histVertSpacing, true); … … 2784 2785 licqConf.WriteStr("ChatBackground", m_colorChatBkg.name().toLatin1()); 2785 2786 licqConf.WriteStr("DateFormat", m_chatDateFormat.toLatin1()); 2787 licqConf.WriteNum("HistoryMessagesPerPage", m_histMsgNum); 2786 2788 licqConf.WriteNum("HistoryMessageStyle", m_histMsgStyle); 2787 2789 licqConf.WriteBool("HistoryVerticalSpacing", m_histVertSpacing); -
branches/qt-gui_qt4/src/mainwin.h
r5422 r5446 203 203 m_nSortColumn, 204 204 m_chatMsgStyle, 205 m_histMsgStyle; 205 m_histMsgStyle, 206 m_histMsgNum; 206 207 207 208 QString m_chatDateFormat, -
branches/qt-gui_qt4/src/messagebox.cpp
r5378 r5446 34 34 35 35 #include "eventdesc.h" 36 #include "gui-defines.h"37 36 38 37 using namespace LicqQtGui; … … 73 72 QColor foreColor; 74 73 if (myMsg->Direction() == D_SENDER) 75 foreColor = QColor( COLOR_SENT);74 foreColor = QColor("blue"); 76 75 else 77 foreColor = QColor( COLOR_RECEIVED);76 foreColor = QColor("red"); 78 77 setForeground(0, foreColor); 79 78 setForeground(1, foreColor); -
branches/qt-gui_qt4/src/optionsdlg.cpp
r5421 r5446 207 207 chkHistReverse->setChecked(mainwin->m_histReverse); 208 208 cmbHistDateFormat->lineEdit()->setText(mainwin->m_histDateFormat); 209 spnHistMsgNum->setValue(mainwin->m_histMsgNum); 209 210 btnColorRcv->setColor(mainwin->m_colorRcv); 210 211 btnColorSnt->setColor(mainwin->m_colorSnt); … … 497 498 mainwin->m_chatMsgStyle = cmbChatStyle->currentIndex(); 498 499 mainwin->m_chatDateFormat = cmbChatDateFormat->currentText(); 500 mainwin->m_histMsgNum = spnHistMsgNum->value(); 499 501 mainwin->m_histMsgStyle = cmbHistStyle->currentIndex(); 500 502 mainwin->m_histVertSpacing = chkHistVertSpacing->isChecked(); … … 1119 1121 layHistDisp->addLayout(layHistDateFormat); 1120 1122 1123 QHBoxLayout *layHistMsgNum = new QHBoxLayout(); 1124 lblHistMsgNum = new QLabel(tr("Entries per page:")); 1125 layHistMsgNum->addWidget(lblHistMsgNum); 1126 spnHistMsgNum = new QSpinBox(); 1127 spnHistMsgNum->setRange(2, 200); 1128 layHistMsgNum->addWidget(spnHistMsgNum); 1129 layHistDisp->addLayout(layHistMsgNum); 1130 1121 1131 QHBoxLayout *layHistOpts = new QHBoxLayout(); 1122 1132 chkHistVertSpacing = new QCheckBox(tr("Insert vertical spacing")); -
branches/qt-gui_qt4/src/optionsdlg.h
r5417 r5446 269 269 QVBoxLayout *layHistDisp; 270 270 QVBoxLayout *layHistPreview; 271 QLabel *lblHistStyle, *lblHistDateFormat ;271 QLabel *lblHistStyle, *lblHistDateFormat, *lblHistMsgNum; 272 272 QComboBox *cmbHistStyle; 273 273 QCheckBox *chkHistVertSpacing; 274 274 QCheckBox *chkHistReverse; 275 275 QComboBox *cmbHistDateFormat; 276 QSpinBox *spnHistMsgNum; 276 277 HistoryView* msgHistViewer; 277 278 -
branches/qt-gui_qt4/src/userinfodlg.cpp
r5385 r5446 80 80 #include "ewidgets.h" 81 81 #include "eventdesc.h" 82 #include "gui-defines.h"83 82 #include "historyview.h" 84 83 #include "mainwin.h" … … 1954 1953 m_iHistorySIter = m_iHistoryEIter; 1955 1954 for (unsigned short i = 0; 1956 (i < NUM_MSG_PER_HISTORY) && (m_iHistorySIter != m_lHistoryList.begin());1955 (i < gMainWindow->m_histMsgNum) && (m_iHistorySIter != m_lHistoryList.begin()); 1957 1956 i++) 1958 1957 { … … 1994 1993 { 1995 1994 m_iHistoryEIter = m_iHistorySIter; 1996 m_nHistoryIndex -= NUM_MSG_PER_HISTORY;1995 m_nHistoryIndex -= gMainWindow->m_histMsgNum; 1997 1996 for (unsigned short i = 0; 1998 (i < NUM_MSG_PER_HISTORY) && (m_iHistorySIter != m_lHistoryList.begin());1997 (i < gMainWindow->m_histMsgNum) && (m_iHistorySIter != m_lHistoryList.begin()); 1999 1998 i++) 2000 1999 { … … 2013 2012 m_iHistorySIter = m_iHistoryEIter; 2014 2013 for (unsigned short i = 0; 2015 (i < NUM_MSG_PER_HISTORY) && (m_iHistoryEIter != m_lHistoryList.end());2014 (i < gMainWindow->m_histMsgNum) && (m_iHistoryEIter != m_lHistoryList.end()); 2016 2015 i++) 2017 2016 { … … 2066 2065 gUserManager.DropUser(u); 2067 2066 } 2068 barFiltering->setRange(0, NUM_MSG_PER_HISTORY);2067 barFiltering->setRange(0, gMainWindow->m_histMsgNum); 2069 2068 char* ftxt = qstrdup(codec->fromUnicode(lneFilter->text())); 2070 2069 int flen = strlen(ftxt); … … 2083 2082 mlvHistory->clear(); 2084 2083 mlvHistory->setReverse(m_bHistoryReverse); 2085 while (m_nHistoryShowing < (NUM_MSG_PER_HISTORY))2084 while (m_nHistoryShowing < gMainWindow->m_histMsgNum) 2086 2085 { 2087 2086 if(UserInfoDlg::chkContains((*tempIter)->Text(), ftxt, flen))
