Changeset 6191
- Timestamp:
- 05/11/08 06:43:50 (5 months ago)
- Location:
- trunk/qt4-gui/src
- Files:
-
- 6 modified
-
config/contactlist.cpp (modified) (3 diffs)
-
config/contactlist.h (modified) (3 diffs)
-
settings/contactlist.cpp (modified) (4 diffs)
-
settings/contactlist.h (modified) (1 diff)
-
views/userviewbase.cpp (modified) (1 diff)
-
views/userviewbase.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt4-gui/src/config/contactlist.cpp
r6156 r6191 63 63 iniFile.ReadBool("ScrollBar", myAllowScrollBar, true); 64 64 iniFile.ReadBool("SystemBackground", myUseSystemBackground, false); 65 iniFile.ReadBool("AutoScrolling", myAutoScroll, true); 65 66 66 67 unsigned short flash; … … 128 129 iniFile.WriteBool("ScrollBar", myAllowScrollBar); 129 130 iniFile.WriteBool("SystemBackground", myUseSystemBackground); 131 iniFile.WriteBool("AutoScrolling", myAutoScroll); 130 132 131 133 iniFile.WriteNum("NumColumns", myColumnCount); … … 311 313 } 312 314 315 void Config::ContactList::setAutoScroll(bool autoScroll) 316 { 317 myAutoScroll = autoScroll; 318 } 319 313 320 void Config::ContactList::setShowDividers(bool showDividers) 314 321 { -
trunk/qt4-gui/src/config/contactlist.h
r6156 r6191 110 110 bool allowScrollBar() const { return myAllowScrollBar; } 111 111 bool useSystemBackground() const { return myUseSystemBackground; } 112 bool autoScroll() const { return myAutoScroll; } 112 113 113 114 bool popupPicture() const { return myPopupPicture; } … … 160 161 void setAllowScrollBar(bool allowScrollBar); 161 162 void setUseSystemBackground(bool useSystemBackground); 163 void setAutoScroll(bool autoScroll); 162 164 163 165 void setPopupPicture(bool popupPicture); … … 240 242 bool myAllowScrollBar; 241 243 bool myUseSystemBackground; 244 bool myAutoScroll; 242 245 243 246 // Contact list sorting -
trunk/qt4-gui/src/settings/contactlist.cpp
r6156 r6191 161 161 myBehaviourLayout->addWidget(myMainWinStickyCheck, 0, 1); 162 162 163 myAutoScrollCheck = new QCheckBox(tr("Automatic scrolling")); 164 myAutoScrollCheck->setToolTip(tr("Automatically scroll to the selected item if it was moved out of the view.")); 165 myBehaviourLayout->addWidget(myAutoScrollCheck, 1, 1); 166 163 167 QHBoxLayout* mySortByLayout = new QHBoxLayout(); 164 168 mySortByLabel = new QLabel(tr("Additional sorting:")); … … 176 180 mySortByLabel->setBuddy(mySortByCombo); 177 181 mySortByLayout->addWidget(mySortByCombo); 178 myBehaviourLayout->addLayout(mySortByLayout, 1, 1);182 myBehaviourLayout->addLayout(mySortByLayout, 2, 1); 179 183 180 184 … … 347 351 myScrollBarCheck->setChecked(contactListConfig->allowScrollBar()); 348 352 mySysBackCheck->setChecked(contactListConfig->useSystemBackground()); 353 myAutoScrollCheck->setChecked(contactListConfig->autoScroll()); 349 354 350 355 int numColumns = contactListConfig->columnCount(); … … 419 424 contactListConfig->setAllowScrollBar(myScrollBarCheck->isChecked()); 420 425 contactListConfig->setUseSystemBackground(mySysBackCheck->isChecked()); 426 contactListConfig->setAutoScroll(myAutoScrollCheck->isChecked()); 421 427 422 428 for (unsigned short i = 0; i < MAX_COLUMNCOUNT; ++i) -
trunk/qt4-gui/src/settings/contactlist.h
r6156 r6191 90 90 QLineEdit* myFrameStyleEdit; 91 91 QComboBox* mySortByCombo; 92 QCheckBox* myAutoScrollCheck; 92 93 QCheckBox* mySSListCheck; 93 94 QCheckBox* myGridLinesCheck; -
trunk/qt4-gui/src/views/userviewbase.cpp
r6179 r6191 86 86 } 87 87 88 void UserViewBase::scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) 89 { 90 if (Config::ContactList::instance()->autoScroll()) 91 QTreeView::scrollTo(index, hint); 92 } 93 88 94 void UserViewBase::applySkin() 89 95 { -
trunk/qt4-gui/src/views/userviewbase.h
r6151 r6191 60 60 */ 61 61 virtual void setColors(QColor back); 62 63 /** 64 * Reloaded from base class 65 * 66 * @param index Index of the item to scroll to 67 * @param hint Relative viewport position 68 */ 69 virtual void scrollTo(const QModelIndex& index, ScrollHint hint = EnsureVisible); 62 70 63 71 signals:
