Changeset 4793
- Timestamp:
- 11/30/06 07:02:54 (2 years ago)
- Location:
- branches/qt-gui_qt4/src
- Files:
-
- 3 added
- 3 modified
-
CMakeLists.txt (modified) (1 diff)
-
optionsdlg.cpp (modified) (6 diffs)
-
optionsdlg.h (modified) (3 diffs)
-
widgets (added)
-
widgets/colorbutton.cpp (added)
-
widgets/colorbutton.h (added)
Legend:
- Unmodified
- Added
- Removed
-
branches/qt-gui_qt4/src/CMakeLists.txt
r4761 r4793 1 # Widgets 2 set(widgets_SRCS 3 widgets/colorbutton.cpp 4 ) 5 1 6 # Sources common for both Qt- and KDE-GUI 2 7 set(Qt-GUI_SRCS 8 ${widgets_SRCS} 3 9 adduserdlg.cpp 4 10 authuserdlg.cpp -
branches/qt-gui_qt4/src/optionsdlg.cpp
r4756 r4793 20 20 21 21 #include "config.h" 22 23 #include "widgets/colorbutton.h" 22 24 23 25 #include <Qt/qdir.h> … … 235 237 chkLineBreak->setChecked(mainwin->m_bAppendLineBreak); 236 238 cmbStyle->setCurrentItem(mainwin->m_nMsgStyle); 237 btnColorRcv->set PaletteBackgroundColor(mainwin->m_colorRcv);238 btnColorSnt->set PaletteBackgroundColor(mainwin->m_colorSnt);239 btnColorRcvHistory->set PaletteBackgroundColor(mainwin->m_colorRcvHistory);240 btnColorSntHistory->set PaletteBackgroundColor(mainwin->m_colorSntHistory);241 btnColorNotice->set PaletteBackgroundColor(mainwin->m_colorNotice);242 /*btnColorTabLabel->set PaletteBackgroundColor(mainwin->m_colorTab);*/243 btnColorTypingLabel->set PaletteBackgroundColor(mainwin->m_colorTabTyping);244 btnColorChatBkg->set PaletteBackgroundColor(mainwin->m_colorChatBkg);239 btnColorRcv->setColor(mainwin->m_colorRcv); 240 btnColorSnt->setColor(mainwin->m_colorSnt); 241 btnColorRcvHistory->setColor(mainwin->m_colorRcvHistory); 242 btnColorSntHistory->setColor(mainwin->m_colorSntHistory); 243 btnColorNotice->setColor(mainwin->m_colorNotice); 244 /*btnColorTabLabel->setColor(mainwin->m_colorTab);*/ 245 btnColorTypingLabel->setColor(mainwin->m_colorTabTyping); 246 btnColorChatBkg->setColor(mainwin->m_colorChatBkg); 245 247 slot_refresh_msgViewer(); 246 248 … … 533 535 mainwin->m_nMsgStyle = cmbStyle->currentItem(); 534 536 mainwin->m_nDateFormat = getCurrentDateFormat(); 535 mainwin->m_colorRcv = btnColorRcv-> paletteBackgroundColor();536 mainwin->m_colorSnt = btnColorSnt-> paletteBackgroundColor();537 mainwin->m_colorRcvHistory = btnColorRcvHistory-> paletteBackgroundColor();538 mainwin->m_colorSntHistory = btnColorSntHistory-> paletteBackgroundColor();539 mainwin->m_colorNotice = btnColorNotice-> paletteBackgroundColor();540 /*mainwin->m_colorTab = btnColorTabLabel-> paletteBackgroundColor();*/541 mainwin->m_colorTabTyping = btnColorTypingLabel-> paletteBackgroundColor();542 mainwin->m_colorChatBkg = btnColorChatBkg-> paletteBackgroundColor();537 mainwin->m_colorRcv = btnColorRcv->getColor(); 538 mainwin->m_colorSnt = btnColorSnt->getColor(); 539 mainwin->m_colorRcvHistory = btnColorRcvHistory->getColor(); 540 mainwin->m_colorSntHistory = btnColorSntHistory->getColor(); 541 mainwin->m_colorNotice = btnColorNotice->getColor(); 542 /*mainwin->m_colorTab = btnColorTabLabel->getColor();*/ 543 mainwin->m_colorTabTyping = btnColorTypingLabel->getColor(); 544 mainwin->m_colorChatBkg = btnColorChatBkg->getColor(); 543 545 544 546 mainwin->m_bTabbedChatting = chkTabbedChatting->isChecked(); … … 1637 1639 1638 1640 new QLabel(tr("Message Received:"), boxColors); 1639 btnColorRcv = new CColor Option(boxColors);1641 btnColorRcv = new CColorButton(boxColors); 1640 1642 1641 1643 new QLabel(tr("Message Sent:"), boxColors); 1642 btnColorSnt = new CColor Option(boxColors);1644 btnColorSnt = new CColorButton(boxColors); 1643 1645 1644 1646 new QLabel(tr("History Received:"), boxColors); 1645 btnColorRcvHistory = new CColor Option(boxColors);1647 btnColorRcvHistory = new CColorButton(boxColors); 1646 1648 1647 1649 new QLabel(tr("History Sent:"), boxColors); 1648 btnColorSntHistory = new CColor Option(boxColors);1650 btnColorSntHistory = new CColorButton(boxColors); 1649 1651 1650 1652 new QLabel(tr("Notice:"), boxColors); 1651 btnColorNotice = new CColor Option(boxColors);1653 btnColorNotice = new CColorButton(boxColors); 1652 1654 1653 1655 /*new QLabel(tr("Tab Label Color:"), boxColors); 1654 btnColorTabLabel = new CColor Option(boxColors);*/1656 btnColorTabLabel = new CColorButton(boxColors);*/ 1655 1657 1656 1658 new QLabel(tr("Typing Notification Color:"), boxColors); 1657 btnColorTypingLabel = new CColor Option(boxColors);1659 btnColorTypingLabel = new CColorButton(boxColors); 1658 1660 1659 1661 new QLabel(tr("Background Color:"), boxColors); 1660 btnColorChatBkg = new CColor Option(boxColors);1662 btnColorChatBkg = new CColorButton(boxColors); 1661 1663 1662 1664 connect(btnColorSnt, SIGNAL(changed()), this, SLOT(slot_refresh_msgViewer())); … … 1707 1709 msgViewer->m_nMsgStyle = cmbStyle->currentItem(); 1708 1710 msgViewer->m_bAppendLineBreak = chkLineBreak->isChecked(); 1709 msgViewer->m_colorSnt = btnColorSnt-> paletteBackgroundColor();1710 msgViewer->m_colorRcv = btnColorRcv-> paletteBackgroundColor();1711 msgViewer->m_colorSntHistory = btnColorSntHistory-> paletteBackgroundColor();1712 msgViewer->m_colorRcvHistory = btnColorRcvHistory-> paletteBackgroundColor();1713 msgViewer->m_colorNotice = btnColorNotice-> paletteBackgroundColor();1714 tabViewer->setPaletteForegroundColor(btnColorTypingLabel-> paletteBackgroundColor());1715 msgViewer->setPalette BackgroundColor(btnColorChatBkg->paletteBackgroundColor());1711 msgViewer->m_colorSnt = btnColorSnt->getColor(); 1712 msgViewer->m_colorRcv = btnColorRcv->getColor(); 1713 msgViewer->m_colorSntHistory = btnColorSntHistory->getColor(); 1714 msgViewer->m_colorRcvHistory = btnColorRcvHistory->getColor(); 1715 msgViewer->m_colorNotice = btnColorNotice->getColor(); 1716 tabViewer->setPaletteForegroundColor(btnColorTypingLabel->getColor()); 1717 msgViewer->setPaletteForegroundColor(btnColorChatBkg->getColor()); 1716 1718 1717 1719 msgViewer->m_nDateFormat = getCurrentDateFormat(); … … 1730 1732 } 1731 1733 1732 CColorOption::CColorOption (QWidget* parent)1733 : QPushButton(parent)1734 {1735 setFixedSize(40, 20);1736 connect(this, SIGNAL(clicked()), this, SLOT(slot_select_color()));1737 }1738 1739 void CColorOption::slot_select_color()1740 {1741 QColor color = QColorDialog::getColor(1742 paletteBackgroundColor(), this);1743 if (color.isValid())1744 {1745 setPaletteBackgroundColor(color);1746 emit changed();1747 }1748 }1749 1750 1734 // ----------------------------------------------------------------------------- 1751 1735 QWidget* OptionsDlg::new_phone_options() -
branches/qt-gui_qt4/src/optionsdlg.h
r4752 r4793 29 29 #include <QtGui/QLabel> 30 30 31 class CColorButton; 31 32 class CMainWindow; 32 33 class MLEditWrap; … … 56 57 }; 57 58 #endif 58 59 class CColorOption : public QPushButton60 {61 Q_OBJECT62 public:63 CColorOption (QWidget* parent=0);64 65 signals:66 void changed();67 68 protected slots:69 void slot_select_color();70 };71 59 72 60 class OptionsDlg : public LicqDialog … … 169 157 QLineEdit *customDateFormat; 170 158 QCheckBox *chkLineBreak; 171 CColor Option *btnColorRcv;172 CColor Option *btnColorSnt;173 CColor Option *btnColorRcvHistory;174 CColor Option *btnColorSntHistory;175 CColor Option *btnColorNotice;176 CColor Option *btnColorTabLabel;177 CColor Option *btnColorTypingLabel;178 CColor Option *btnColorChatBkg;159 CColorButton *btnColorRcv; 160 CColorButton *btnColorSnt; 161 CColorButton *btnColorRcvHistory; 162 CColorButton *btnColorSntHistory; 163 CColorButton *btnColorNotice; 164 CColorButton *btnColorTabLabel; 165 CColorButton *btnColorTypingLabel; 166 CColorButton *btnColorChatBkg; 179 167 // Phone & celluar tab 180 168 QWidget* new_phone_options();
