connect(mapper, SIGNAL(mapped(QWidget *)), this, SLOT(chooseColor(QWidget *)));
- //disable unused buttons:
+
+
#ifndef PHONDEV
ui.inactiveActivityUseBG->setEnabled(false);
ui.noActivityUseBG->setEnabled(false);
ui.modeFlagsUseBG->setEnabled(false);
ui.urlFG->setEnabled(false);
ui.urlUseBG->setEnabled(false);
-
- ui.onlineStatusUseBG->setEnabled(false);
- ui.awayStatusUseBG->setEnabled(false);
#endif
}
defaultUserActivity();
defaultMessage();
defaultMircColorCodes();
- defaultNickview();
widgetHasChanged();
bufferviewPreview();
ui.color15->setColor(QtUi::style()->format(UiStyle::FgCol15, Settings::Default).foreground().color());
}
-void ColorSettingsPage::defaultNickview() {
- ui.onlineStatusFG->setColor(QColor(Qt::black));
- ui.onlineStatusBG->setColor(QColor("white"));
- ui.onlineStatusBG->setEnabled(false);
- ui.onlineStatusUseBG->setChecked(false);
- ui.awayStatusFG->setColor(QColor(Qt::gray));
- ui.awayStatusBG->setColor(QColor("white"));
- ui.awayStatusBG->setEnabled(false);
- ui.awayStatusUseBG->setChecked(false);
-}
-
void ColorSettingsPage::load() {
QtUiStyleSettings s("Colors");
settings["InactiveActivityFG"] = s.value("inactiveActivityFG", QVariant(QColor(Qt::gray)));
ui.color14->setColor(QtUi::style()->format(UiStyle::FgCol14).foreground().color());
ui.color15->setColor(QtUi::style()->format(UiStyle::FgCol15).foreground().color());
- settings["OnlineStatusFG"] = s.value("onlineStatusFG", QVariant(QColor(Qt::black)));
- ui.onlineStatusFG->setColor(settings["OnlineStatusFG"].value<QColor>());
- settings["OnlineStatusBG"] = s.value("onlineStatusBG", QVariant(QColor(Qt::white)));
- ui.onlineStatusBG->setColor(settings["OnlineStatusBG"].value<QColor>());
- settings["OnlineStatusUseBG"] = s.value("onlineStatusUseBG");
- ui.onlineStatusUseBG->setChecked(settings["OnlineStatusUseBG"].toBool());
-
- settings["AwayStatusFG"] = s.value("awayStatusFG", QVariant(QColor(Qt::gray)));
- ui.awayStatusFG->setColor(settings["AwayStatusFG"].value<QColor>());
- settings["AwayStatusBG"] = s.value("awayStatusBG", QVariant(QColor(Qt::white)));
- ui.awayStatusBG->setColor(settings["AwayStatusBG"].value<QColor>());
- settings["AwayStatusUseBG"] = s.value("awayStatusUseBG");
- ui.awayStatusUseBG->setChecked(settings["AwayStatusUseBG"].toBool());
-
setChangedState(false);
bufferviewPreview();
chatviewPreview();
saveMircColor(14, ui.color14->color());
saveMircColor(15, ui.color15->color());
- s.setValue("onlineStatusFG", ui.onlineStatusFG->color());
- s.setValue("onlineStatusBG", ui.onlineStatusBG->color());
- s.setValue("onlineStatusUseBG", ui.onlineStatusUseBG->isChecked());
- s.setValue("awayStatusFG", ui.awayStatusFG->color());
- s.setValue("awayStatusBG", ui.awayStatusBG->color());
- s.setValue("awayStatusUseBG", ui.awayStatusUseBG->isChecked());
-
load(); //TODO: remove when settings hash map is unnescessary
setChangedState(false);
}
if(QtUi::style()->format(UiStyle::FgCol14).foreground().color() != ui.color14->color()) return true;
if(QtUi::style()->format(UiStyle::FgCol15).foreground().color() != ui.color15->color()) return true;
- if(settings["OnlineStatusFG"].value<QColor>() != ui.onlineStatusFG->color()) return true;
- if(settings["OnlineStatusBG"].value<QColor>() != ui.onlineStatusBG->color()) return true;
- if(settings["OnlineStatusUseBG"].toBool() != ui.onlineStatusUseBG->isChecked()) return true;
- if(settings["AwayStatusFG"].value<QColor>() != ui.awayStatusFG->color()) return true;
- if(settings["AwayStatusBG"].value<QColor>() != ui.awayStatusBG->color()) return true;
- if(settings["AwayStatusUseBG"].toBool() != ui.awayStatusUseBG->isChecked()) return true;
-
return false;
}
<number>0</number>
</property>
<widget class="QWidget" name="bufferview" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>487</width>
+ <height>485</height>
+ </rect>
+ </property>
<attribute name="title" >
<string>Bufferview</string>
</attribute>
</layout>
</widget>
<widget class="QWidget" name="chatview" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>487</width>
+ <height>485</height>
+ </rect>
+ </property>
<attribute name="title" >
<string>Chatview</string>
</attribute>
<number>0</number>
</property>
<widget class="QWidget" name="tab" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>441</width>
+ <height>294</height>
+ </rect>
+ </property>
<attribute name="title" >
<string>Server Activity</string>
</attribute>
</layout>
</widget>
<widget class="QWidget" name="tab_2" >
+ <property name="geometry" >
+ <rect>
+ <x>360</x>
+ <y>270</y>
+ <width>720</width>
+ <height>360</height>
+ </rect>
+ </property>
<attribute name="title" >
<string>User Activity</string>
</attribute>
</layout>
</widget>
<widget class="QWidget" name="Seite_2" >
+ <property name="geometry" >
+ <rect>
+ <x>360</x>
+ <y>270</y>
+ <width>720</width>
+ <height>360</height>
+ </rect>
+ </property>
<attribute name="title" >
<string>Message</string>
</attribute>
</layout>
</widget>
<widget class="QWidget" name="Mirc" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>487</width>
+ <height>485</height>
+ </rect>
+ </property>
<attribute name="title" >
<string>Mirc Color Codes</string>
</attribute>
</item>
</layout>
</widget>
- <widget class="QWidget" name="nickview" >
- <attribute name="title" >
- <string>Nickview</string>
- </attribute>
- <layout class="QGridLayout" >
- <item row="0" column="0" >
- <widget class="QGroupBox" name="groupBox_8" >
- <property name="title" >
- <string>Nick status:</string>
- </property>
- <layout class="QGridLayout" >
- <item row="0" column="1" >
- <widget class="QLabel" name="label_4" >
- <property name="text" >
- <string>FG</string>
- </property>
- <property name="alignment" >
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item row="0" column="2" >
- <widget class="QLabel" name="label_5" >
- <property name="text" >
- <string>BG</string>
- </property>
- <property name="alignment" >
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item row="0" column="3" >
- <widget class="QLabel" name="label_6" >
- <property name="text" >
- <string>Use BG</string>
- </property>
- <property name="alignment" >
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="label_62" >
- <property name="text" >
- <string>Online:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="ColorButton" name="onlineStatusFG" >
- <property name="text" >
- <string/>
- </property>
- </widget>
- </item>
- <item row="1" column="2" >
- <widget class="ColorButton" name="onlineStatusBG" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="text" >
- <string/>
- </property>
- </widget>
- </item>
- <item row="1" column="3" >
- <widget class="QCheckBox" name="onlineStatusUseBG" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Maximum" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="layoutDirection" >
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text" >
- <string/>
- </property>
- </widget>
- </item>
- <item row="2" column="0" >
- <widget class="QLabel" name="label_63" >
- <property name="text" >
- <string>Away:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1" >
- <widget class="ColorButton" name="awayStatusFG" >
- <property name="text" >
- <string/>
- </property>
- </widget>
- </item>
- <item row="2" column="2" >
- <widget class="ColorButton" name="awayStatusBG" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="text" >
- <string/>
- </property>
- </widget>
- </item>
- <item row="2" column="3" >
- <widget class="QCheckBox" name="awayStatusUseBG" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Maximum" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text" >
- <string/>
- </property>
- </widget>
- </item>
- <item row="3" column="0" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- </item>
- <item row="0" column="1" >
- <widget class="QGroupBox" name="groupBox_9" >
- <property name="title" >
- <string>Preview:</string>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="QTreeWidget" name="nickviewPreview" >
- <column>
- <property name="text" >
- <string>1</string>
- </property>
- </column>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="1" column="0" colspan="2" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>261</width>
- <height>151</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
</widget>
</item>
</layout>
</hint>
</hints>
</connection>
- <connection>
- <sender>onlineStatusUseBG</sender>
- <signal>clicked(bool)</signal>
- <receiver>onlineStatusBG</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>202</x>
- <y>111</y>
- </hint>
- <hint type="destinationlabel" >
- <x>150</x>
- <y>111</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>awayStatusUseBG</sender>
- <signal>clicked(bool)</signal>
- <receiver>awayStatusBG</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>202</x>
- <y>147</y>
- </hint>
- <hint type="destinationlabel" >
- <x>150</x>
- <y>147</y>
- </hint>
- </hints>
- </connection>
<connection>
<sender>errorMessageUseBG</sender>
<signal>clicked(bool)</signal>