OptionsWidget_windowListClassic::OptionsWidget_windowListClassic(QWidget * parent) : KviOptionsWidget(parent) { setObjectName("classicwindowlist_options_widget"); createLayout(); KviUIntSelector * u; addFontSelector(0, 0, 0, 0, __tr2qs_ctx("Font:", "options"), KviOption_fontWindowList); KviTalGroupBox * g = addGroupBox(0, 1, 0, 1, Qt::Horizontal, __tr2qs_ctx("Text/Alert Colors", "options")); addColorSelector(g, __tr2qs_ctx("Normal:", "options"), KviOption_colorWindowListNormalText); addColorSelector(g, __tr2qs_ctx("Minimized:", "options"), KviOption_colorWindowListMinimizedText); addColorSelector(g, __tr2qs_ctx("Alert level 1:", "options"), KviOption_colorWindowListHighlight1Text); addColorSelector(g, __tr2qs_ctx("Alert level 2:", "options"), KviOption_colorWindowListHighlight2Text); addColorSelector(g, __tr2qs_ctx("Alert level 3:", "options"), KviOption_colorWindowListHighlight3Text); addColorSelector(g, __tr2qs_ctx("Alert level 4:", "options"), KviOption_colorWindowListHighlight4Text); addColorSelector(g, __tr2qs_ctx("Alert level 5:", "options"), KviOption_colorWindowListHighlight5Text); addColorSelector(0, 2, 0, 2, __tr2qs_ctx("Progress bar color:", "options"), KviOption_colorWindowListProgressBar); u = addUIntSelector(0, 3, 0, 3, __tr2qs_ctx("Minimum width of buttons:", "options"), KviOption_uintWindowListButtonMinWidth, 24, 9999, 100); u->setSuffix(__tr2qs_ctx(" pixels", "options")); addBoolSelector(0, 4, 0, 4, __tr2qs_ctx("Set maximum button width", "options"), KviOption_boolClassicWindowListSetMaximumButtonWidth); u = addUIntSelector(0, 5, 0, 5, __tr2qs_ctx("Maximum width of buttons:", "options"), KviOption_uintClassicWindowListMaximumButtonWidth, 24, 9999, 100); u->setSuffix(__tr2qs_ctx(" pixels", "options")); addBoolSelector(0, 6, 0, 6, __tr2qs_ctx("Use flat buttons", "options"), KviOption_boolUseFlatClassicWindowListButtons); addBoolSelector(0, 7, 0, 7, __tr2qs_ctx("Show close button on window list items", "options"), KviOption_boolUseWindowListCloseButton); addRowSpacer(0, 8, 0, 8); }
KviFontSelector * KviOptionsWidget::addFontSelector(QWidget * pParent,const QString & txt,int optId,bool bEnabled) { m_iResetFlags |= (g_fontOptionsTable[optId].flags & KviOption_resetMask); KviFontSelector * d = addFontSelector(pParent,txt,&(KVI_OPTION_FONT(optId)),bEnabled); QString tmp = m_szBasicTipStart; tmp += g_fontOptionsTable[optId].name; tmp += m_szBasicTipEnd; KviTalToolTip::add(d,tmp); return d; }
OptionsWidget_topicLabel::OptionsWidget_topicLabel(QWidget *p):KviOptionsWidget(p, "topic_label_look_options_widget") { createLayout(); addFontSelector(0, 0, 0, 0, __tr2qs_ctx("Font","options"), KviOption_fontLabel); addColorSelector(0, 1, 0, 1, __tr2qs_ctx("Foreground color","options"), KviOption_colorLabelForeground); addColorSelector(0, 2, 0, 2, __tr2qs_ctx("Background color","options"), KviOption_colorLabelBackground); addPixmapSelector(0, 3, 0, 3, __tr2qs_ctx("Background image","options"), KviOption_pixmapLabelBackground); layout()->setRowStretch(3, 1); }
OptionsWidget_theme::OptionsWidget_theme(QWidget * parent) : KviOptionsWidget(parent) { createLayout(); KviBoolSelector * b = addBoolSelector(0,1,1,1,__tr2qs_ctx("Use global application font","options"),KviOption_boolUseGlobalApplicationFont); KviTalToolTip::add(b,__tr2qs_ctx("This option will force a static font for every widget that has no specific font setting","options")); addBoolSelector(0,0,1,0,__tr2qs_ctx("Show icons in popup menus","options"),KviOption_boolShowIconsInPopupMenus); KviFontSelector * f = addFontSelector(0,2,1,2,__tr2qs_ctx("Global application font:","options"),KviOption_fontApplication, KVI_OPTION_BOOL(KviOption_boolUseGlobalApplicationFont)); connect(b,SIGNAL(toggled(bool)),f,SLOT(setEnabled(bool))); addRowSpacer(0,3,1,3); }
OptionsWidget_windowListTreeForeground::OptionsWidget_windowListTreeForeground(QWidget * parent) : KviOptionsWidget(parent) { setObjectName("treewindowlist_options_widget"); createLayout(); addFontSelector(0, 0, 0, 0, __tr2qs_ctx("Font:", "options"), KviOption_fontTreeWindowList); KviTalGroupBox * g = addGroupBox(0, 1, 0, 1, Qt::Horizontal, __tr2qs_ctx("Text/Alert Colors", "options")); addColorSelector(g, __tr2qs_ctx("Normal:", "options"), KviOption_colorTreeWindowListForeground); addColorSelector(g, __tr2qs_ctx("Selected:", "options"), KviOption_colorTreeWindowListActiveForeground); addColorSelector(g, __tr2qs_ctx("Alert level 1:", "options"), KviOption_colorTreeWindowListHighlight1Foreground); addColorSelector(g, __tr2qs_ctx("Alert level 2:", "options"), KviOption_colorTreeWindowListHighlight2Foreground); addColorSelector(g, __tr2qs_ctx("Alert level 3:", "options"), KviOption_colorTreeWindowListHighlight3Foreground); addColorSelector(g, __tr2qs_ctx("Alert level 4:", "options"), KviOption_colorTreeWindowListHighlight4Foreground); addColorSelector(g, __tr2qs_ctx("Alert level 5:", "options"), KviOption_colorTreeWindowListHighlight5Foreground); addColorSelector(0, 2, 0, 2, __tr2qs_ctx("Progress bar color:", "options"), KviOption_colorTreeWindowListProgress); addRowSpacer(0, 3, 0, 3); }
OptionsWidget_userListForeground::OptionsWidget_userListForeground(QWidget * parent) : KviOptionsWidget(parent, "userlistlook_foreground_options_widget") { createLayout(); addFontSelector(0, 0, 1, 0, __tr2qs_ctx("Font:", "options"), KviOption_fontUserListView); KviTalGroupBox * g = addGroupBox(0, 1, 1, 1, Qt::Horizontal, __tr2qs_ctx("Nickname Colors", "options")); addColorSelector(g, __tr2qs_ctx("Normal:", "options"), KviOption_colorUserListViewNormalForeground); addColorSelector(g, __tr2qs_ctx("Selected:", "options"), KviOption_colorUserListViewSelectionForeground); addColorSelector(g, __tr2qs_ctx("IRC Op:", "options"), KviOption_colorUserListViewIrcOpForeground); addColorSelector(g, __tr2qs_ctx("Channel owner:", "options"), KviOption_colorUserListViewChanOwnerForeground); addColorSelector(g, __tr2qs_ctx("Channel admin:", "options"), KviOption_colorUserListViewChanAdminForeground); addColorSelector(g, __tr2qs_ctx("Op:", "options"), KviOption_colorUserListViewOpForeground); addColorSelector(g, __tr2qs_ctx("Half-op:", "options"), KviOption_colorUserListViewHalfOpForeground); addColorSelector(g, __tr2qs_ctx("Voice:", "options"), KviOption_colorUserListViewVoiceForeground); addColorSelector(g, __tr2qs_ctx("User-op:", "options"), KviOption_colorUserListViewUserOpForeground); KviTalHBox * ahb = new KviTalHBox(g); ahb->setSpacing(4); KviBoolSelector * ab = addBoolSelector(ahb, __tr2qs_ctx("Away (blend color):", "options"), KviOption_boolUserListViewUseAwayColor); QString szTip = __tr2qs("The color selected, will be blended with the user rank foreground color.<br>" "You should also consider your theme's style, color and the userlist background selected color for optimum visibility.<br>" "If no color is selected respective user rank color specified will be used instead."); KviColorSelector * as = addColorSelector(ahb, QString(), KviOption_colorUserListViewAwayForeground); connect(ab, SIGNAL(toggled(bool)), as, SLOT(setEnabled(bool))); mergeTip(ab, szTip); KviTalHBox * hb = new KviTalHBox(g); hb->setSpacing(4); KviBoolSelector * b = addBoolSelector(hb, __tr2qs_ctx("Use different color for own nick:", "options"), KviOption_boolUseDifferentColorForOwnNick); KviColorSelector * s = addColorSelector(hb, "", KviOption_colorUserListViewOwnForeground, KVI_OPTION_BOOL(KviOption_boolUseDifferentColorForOwnNick)); connect(b, SIGNAL(toggled(bool)), s, SLOT(setEnabled(bool))); addRowSpacer(0, 3, 0, 3); }
OptionsWidget_notifierLook::OptionsWidget_notifierLook(QWidget * parent) : KviOptionsWidget(parent) { setObjectName("notifierlook_options_widget"); createLayout(); addFontSelector(0, 0, 1, 0, __tr2qs_ctx("Font:", "options"), KviOption_fontNotifier); addColorSelector(0, 1, 1, 1, __tr2qs_ctx("Background color:", "options"), KviOption_colorNotifierBackground); addColorSelector(0, 2, 1, 2, __tr2qs_ctx("Foreground color:", "options"), KviOption_colorNotifierForeground); addFontSelector(0, 3, 1, 3, __tr2qs_ctx("Title font:", "options"), KviOption_fontNotifierTitle); addColorSelector(0, 4, 1, 4, __tr2qs_ctx("Title foreground color:", "options"), KviOption_colorNotifierTitleForeground); addPixmapSelector(0, 5, 1, 5, __tr2qs_ctx("Background image:", "options"), KviOption_pixmapNotifierBackground); addLabel(0, 6, 0, 6, __tr2qs_ctx("Horizontal align:", "options")); m_pHorizontalAlign = new QComboBox(this); addWidgetToLayout(m_pHorizontalAlign, 1, 6, 1, 6); addLabel(0, 7, 0, 7, __tr2qs_ctx("Vertical align:", "options")); m_pVerticalAlign = new QComboBox(this); addWidgetToLayout(m_pVerticalAlign, 1, 7, 1, 7); m_pHorizontalAlign->addItem(__tr2qs_ctx("Tile", "options")); m_pHorizontalAlign->addItem(__tr2qs_ctx("Left", "options")); m_pHorizontalAlign->addItem(__tr2qs_ctx("Right", "options")); m_pHorizontalAlign->addItem(__tr2qs_ctx("Center", "options")); m_pVerticalAlign->addItem(__tr2qs_ctx("Tile", "options")); m_pVerticalAlign->addItem(__tr2qs_ctx("Top", "options")); m_pVerticalAlign->addItem(__tr2qs_ctx("Bottom", "options")); m_pVerticalAlign->addItem(__tr2qs_ctx("Center", "options")); switch(KVI_OPTION_UINT(KviOption_uintNotifierPixmapAlign) & Qt::AlignHorizontal_Mask) { case Qt::AlignLeft: m_pHorizontalAlign->setCurrentIndex(1); break; case Qt::AlignRight: m_pHorizontalAlign->setCurrentIndex(2); break; case Qt::AlignHCenter: m_pHorizontalAlign->setCurrentIndex(3); break; default: m_pHorizontalAlign->setCurrentIndex(0); } switch(KVI_OPTION_UINT(KviOption_uintNotifierPixmapAlign) & Qt::AlignVertical_Mask) { case Qt::AlignTop: m_pVerticalAlign->setCurrentIndex(1); break; case Qt::AlignBottom: m_pVerticalAlign->setCurrentIndex(2); break; case Qt::AlignVCenter: m_pVerticalAlign->setCurrentIndex(3); break; default: m_pVerticalAlign->setCurrentIndex(0); } layout()->setRowStretch(5, 1); }
OptionsWidget_inputLook::OptionsWidget_inputLook(QWidget * parent) : KviOptionsWidget(parent) { setObjectName("inputlook_options_widget"); createLayout(); addFontSelector(0,0,1,0,__tr2qs_ctx("Font","options"),KviOption_fontInput); addColorSelector(0,1,1,1,__tr2qs_ctx("Background color","options"),KviOption_colorInputBackground); addColorSelector(0,2,1,2,__tr2qs_ctx("Foreground color","options"),KviOption_colorInputForeground); addColorSelector(0,3,1,3,__tr2qs_ctx("Selection background color","options"),KviOption_colorInputSelectionBackground); addColorSelector(0,4,1,4,__tr2qs_ctx("Selection foreground color","options"),KviOption_colorInputSelectionForeground); addColorSelector(0,5,1,5,__tr2qs_ctx("Control char color","options"),KviOption_colorInputControl); addColorSelector(0,6,1,6,__tr2qs_ctx("Cursor color","options"),KviOption_colorInputCursor); addPixmapSelector(0,7,1,7,__tr2qs_ctx("Background image","options"),KviOption_pixmapInputBackground); addLabel(0,8,0,8,__tr2qs_ctx("Horizontal align:","options")); m_pHorizontalAlign=new QComboBox(this); addWidgetToLayout(m_pHorizontalAlign,1,8,1,8); addLabel(0,9,0,9,__tr2qs_ctx("Vertical align:","options")); m_pVerticalAlign=new QComboBox(this); addWidgetToLayout(m_pVerticalAlign,1,9,1,9); m_pHorizontalAlign->addItem(__tr2qs_ctx("Tile","options")); m_pHorizontalAlign->addItem(__tr2qs_ctx("Left","options")); m_pHorizontalAlign->addItem(__tr2qs_ctx("Right","options")); m_pHorizontalAlign->addItem(__tr2qs_ctx("Center","options")); m_pVerticalAlign->addItem(__tr2qs_ctx("Tile","options")); m_pVerticalAlign->addItem(__tr2qs_ctx("Top","options")); m_pVerticalAlign->addItem(__tr2qs_ctx("Bottom","options")); m_pVerticalAlign->addItem(__tr2qs_ctx("Center","options")); switch( KVI_OPTION_UINT(KviOption_uintInputPixmapAlign) & Qt::AlignHorizontal_Mask) { case Qt::AlignLeft: m_pHorizontalAlign->setCurrentIndex(1); break; case Qt::AlignRight: m_pHorizontalAlign->setCurrentIndex(2); break; case Qt::AlignHCenter: m_pHorizontalAlign->setCurrentIndex(3); break; default: m_pHorizontalAlign->setCurrentIndex(0); } switch( KVI_OPTION_UINT(KviOption_uintInputPixmapAlign) & Qt::AlignVertical_Mask) { case Qt::AlignTop: m_pVerticalAlign->setCurrentIndex(1); break; case Qt::AlignBottom: m_pVerticalAlign->setCurrentIndex(2); break; case Qt::AlignVCenter: m_pVerticalAlign->setCurrentIndex(3); break; default: m_pVerticalAlign->setCurrentIndex(0); } layout()->setRowStretch(7,1); }