diff --git a/cockatrice/.qdevelop b/cockatrice/.qdevelop
new file mode 100644
index 00000000..d361b40f
Binary files /dev/null and b/cockatrice/.qdevelop differ
diff --git a/cockatrice/resources/icon.svg b/cockatrice/resources/icon.svg
new file mode 100644
index 00000000..7c5792fe
--- /dev/null
+++ b/cockatrice/resources/icon.svg
@@ -0,0 +1,477 @@
+
+
+
diff --git a/cockatrice/resources/icon_draw.svg b/cockatrice/resources/icon_draw.svg
new file mode 100644
index 00000000..51918274
--- /dev/null
+++ b/cockatrice/resources/icon_draw.svg
@@ -0,0 +1,192 @@
+
+
+
diff --git a/cockatrice/resources/icon_general_v1.svg b/cockatrice/resources/icon_general_v1.svg
new file mode 100644
index 00000000..dd684e40
--- /dev/null
+++ b/cockatrice/resources/icon_general_v1.svg
@@ -0,0 +1,237 @@
+
+
+
diff --git a/cockatrice/resources/icon_messages_settings.svg b/cockatrice/resources/icon_messages_settings.svg
new file mode 100644
index 00000000..9c0be570
--- /dev/null
+++ b/cockatrice/resources/icon_messages_settings.svg
@@ -0,0 +1,98 @@
+
+
+
diff --git a/cockatrice/resources/icon_messages_v1.svg b/cockatrice/resources/icon_messages_v1.svg
new file mode 100644
index 00000000..49fe1964
--- /dev/null
+++ b/cockatrice/resources/icon_messages_v1.svg
@@ -0,0 +1,197 @@
+
+
+
diff --git a/cockatrice/resources/icon_standard_settings.svg b/cockatrice/resources/icon_standard_settings.svg
new file mode 100644
index 00000000..05013339
--- /dev/null
+++ b/cockatrice/resources/icon_standard_settings.svg
@@ -0,0 +1,183 @@
+
+
+
diff --git a/cockatrice/resources/icon_untap.svg b/cockatrice/resources/icon_untap.svg
new file mode 100644
index 00000000..2f4d8173
--- /dev/null
+++ b/cockatrice/resources/icon_untap.svg
@@ -0,0 +1,198 @@
+
+
+
diff --git a/cockatrice/src/dlg_settings.cpp b/cockatrice/src/dlg_settings.cpp
index 61d4da48..43c40c9e 100644
--- a/cockatrice/src/dlg_settings.cpp
+++ b/cockatrice/src/dlg_settings.cpp
@@ -49,6 +49,14 @@ GeneralSettingsPage::GeneralSettingsPage()
QPushButton *cardDatabasePathButton = new QPushButton("...");
connect(cardDatabasePathButton, SIGNAL(clicked()), this, SLOT(cardDatabasePathButtonClicked()));
+ /*
+ cardBackgroundPathLabel = new QLabel;
+ cardBackgroundPathEdit = new QLineEdit(settings.value("cardbackground").toString());
+ cardBackgroundPathEdit->setReadOnly(true);
+ QPushButton *cardBackgroundPathButton = new QPushButton("...");
+ connect(cardBackgroundPathButton, SIGNAL(clicked()), this, SLOT(cardBackgroundPathButtonClicked()));
+ */
+
QGridLayout *pathsGrid = new QGridLayout;
pathsGrid->addWidget(deckPathLabel, 0, 0);
pathsGrid->addWidget(deckPathEdit, 0, 1);
@@ -59,6 +67,11 @@ GeneralSettingsPage::GeneralSettingsPage()
pathsGrid->addWidget(cardDatabasePathLabel, 2, 0);
pathsGrid->addWidget(cardDatabasePathEdit, 2, 1);
pathsGrid->addWidget(cardDatabasePathButton, 2, 2);
+ /*
+ pathsGrid->addWidget(cardBackgroundPathLabel, 3, 0);
+ pathsGrid->addWidget(cardBackgroundPathEdit, 3, 1);
+ pathsGrid->addWidget(cardBackgroundPathButton, 3, 2);
+ */
pathsGroupBox->setLayout(pathsGrid);
QVBoxLayout *mainLayout = new QVBoxLayout;
@@ -125,6 +138,19 @@ void GeneralSettingsPage::cardDatabasePathButtonClicked()
emit cardDatabasePathChanged(path);
}
+void GeneralSettingsPage::cardBackgroundPathButtonClicked()
+{
+ QString path = QFileDialog::getOpenFileName(this, tr("Choose path"));
+ if (path.isEmpty())
+ return;
+ QSettings settings;
+ settings.beginGroup("paths");
+ settings.setValue("cardbackground", path);
+ cardBackgroundPathEdit->setText(path);
+
+ emit cardBackgroundPathChanged(path);
+}
+
void GeneralSettingsPage::languageBoxChanged(int index)
{
QString qmFile = languageBox->itemData(index).toString();
@@ -142,6 +168,7 @@ void GeneralSettingsPage::retranslateUi()
deckPathLabel->setText(tr("Decks directory:"));
picsPathLabel->setText(tr("Pictures directory:"));
cardDatabasePathLabel->setText(tr("Path to card database:"));
+ //cardBackgroundPathLabel->setText(tr("Path to card background:"));
}
AppearanceSettingsPage::AppearanceSettingsPage()
@@ -302,7 +329,11 @@ void DlgSettings::retranslateUi()
setWindowTitle(tr("Settings"));
generalButton->setText(tr("General"));
+ QIcon generalIcon("resources/icon_general_v1.svg");
+ generalButton->setIcon(generalIcon);
appearanceButton->setText(tr("Appearance"));
+ QIcon messagesIcon("resources/icon_messages_v1.svg");
+ messagesButton->setIcon(messagesIcon);
messagesButton->setText(tr("Messages"));
closeButton->setText(tr("&Close"));
diff --git a/cockatrice/src/dlg_settings.h b/cockatrice/src/dlg_settings.h
index 85a0a560..72156a6f 100644
--- a/cockatrice/src/dlg_settings.h
+++ b/cockatrice/src/dlg_settings.h
@@ -28,18 +28,20 @@ private slots:
void deckPathButtonClicked();
void picsPathButtonClicked();
void cardDatabasePathButtonClicked();
+ void cardBackgroundPathButtonClicked();
void languageBoxChanged(int index);
signals:
void picsPathChanged(const QString &path);
void cardDatabasePathChanged(const QString &path);
+ void cardBackgroundPathChanged(const QString &path);
void changeLanguage(const QString &qmFile);
private:
QStringList findQmFiles();
QString languageName(const QString &qmFile);
- QLineEdit *deckPathEdit, *picsPathEdit, *cardDatabasePathEdit;
+ QLineEdit *deckPathEdit, *picsPathEdit, *cardDatabasePathEdit, *cardBackgroundPathEdit;
QGroupBox *personalGroupBox, *pathsGroupBox;
QComboBox *languageBox;
- QLabel *languageLabel, *deckPathLabel, *picsPathLabel, *cardDatabasePathLabel;
+ QLabel *languageLabel, *deckPathLabel, *picsPathLabel, *cardDatabasePathLabel, *cardBackgroundPathLabel;
};
class AppearanceSettingsPage : public AbstractSettingsPage {
diff --git a/cockatrice/src/main.cpp b/cockatrice/src/main.cpp
index 835c0899..109bb0d9 100644
--- a/cockatrice/src/main.cpp
+++ b/cockatrice/src/main.cpp
@@ -66,8 +66,16 @@ int main(int argc, char *argv[])
translator.load(lang);
app.installTranslator(&translator);
+
+
MainWindow ui(&translator);
qDebug("main(): MainWindow constructor finished");
+
+ //set Icon
+ QIcon icon("resources/icon.svg");
+ ui.setWindowIcon(icon);
+ //
+
ui.show();
qDebug("main(): ui.show() finished");