mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
preview of emoticons
This commit is contained in:
parent
1d31244273
commit
fc0ed91c74
|
@ -38,6 +38,7 @@ GeneralForm::GeneralForm() :
|
||||||
bodyUI->smileyPackBrowser->addItem(entry.first, entry.second);
|
bodyUI->smileyPackBrowser->addItem(entry.first, entry.second);
|
||||||
}
|
}
|
||||||
bodyUI->smileyPackBrowser->setCurrentIndex(bodyUI->smileyPackBrowser->findData(Settings::getInstance().getSmileyPack()));
|
bodyUI->smileyPackBrowser->setCurrentIndex(bodyUI->smileyPackBrowser->findData(Settings::getInstance().getSmileyPack()));
|
||||||
|
reloadSmiles();
|
||||||
|
|
||||||
bodyUI->cbUDPDisabled->setChecked(Settings::getInstance().getForceTCP());
|
bodyUI->cbUDPDisabled->setChecked(Settings::getInstance().getForceTCP());
|
||||||
bodyUI->proxyAddr->setText(Settings::getInstance().getProxyAddr());
|
bodyUI->proxyAddr->setText(Settings::getInstance().getProxyAddr());
|
||||||
|
@ -89,6 +90,7 @@ void GeneralForm::onSmileyBrowserIndexChanged(int index)
|
||||||
{
|
{
|
||||||
QString filename = bodyUI->smileyPackBrowser->itemData(index).toString();
|
QString filename = bodyUI->smileyPackBrowser->itemData(index).toString();
|
||||||
Settings::getInstance().setSmileyPack(filename);
|
Settings::getInstance().setSmileyPack(filename);
|
||||||
|
reloadSmiles();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeneralForm::onUDPUpdated()
|
void GeneralForm::onUDPUpdated()
|
||||||
|
@ -119,3 +121,14 @@ void GeneralForm::onUseProxyUpdated()
|
||||||
bodyUI->proxyPort->setEnabled(state);
|
bodyUI->proxyPort->setEnabled(state);
|
||||||
Settings::getInstance().setUseProxy(state);
|
Settings::getInstance().setUseProxy(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GeneralForm::reloadSmiles()
|
||||||
|
{
|
||||||
|
QString smiles[] = {":)", ";)", ":p", ":O", ":'("};
|
||||||
|
int pixSize = 30;
|
||||||
|
bodyUI->smile1->setPixmap(SmileyPack::getInstance().getAsIcon(smiles[0]).pixmap(pixSize, pixSize));
|
||||||
|
bodyUI->smile2->setPixmap(SmileyPack::getInstance().getAsIcon(smiles[1]).pixmap(pixSize, pixSize));
|
||||||
|
bodyUI->smile3->setPixmap(SmileyPack::getInstance().getAsIcon(smiles[2]).pixmap(pixSize, pixSize));
|
||||||
|
bodyUI->smile4->setPixmap(SmileyPack::getInstance().getAsIcon(smiles[3]).pixmap(pixSize, pixSize));
|
||||||
|
bodyUI->smile5->setPixmap(SmileyPack::getInstance().getAsIcon(smiles[4]).pixmap(pixSize, pixSize));
|
||||||
|
}
|
||||||
|
|
|
@ -45,6 +45,7 @@ private slots:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::GeneralSettings *bodyUI;
|
Ui::GeneralSettings *bodyUI;
|
||||||
|
void reloadSmiles();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>527</width>
|
<width>527</width>
|
||||||
<height>369</height>
|
<height>397</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -72,6 +72,60 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="smileyPackBrowser"/>
|
<widget class="QComboBox" name="smileyPackBrowser"/>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="smile1">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>:)</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>:)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="smile2">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>;)</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>;)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="smile3">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>:p</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>:p</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="smile4">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>:O</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>:O</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="smile5">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>:'(</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>:'(</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user