mirror of https://github.com/qTox/qTox.git
12 changed files with 423 additions and 23 deletions
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
Copyright (C) 2014 by Project Tox <https://tox.im>
|
||||
|
||||
This file is part of qTox, a Qt-based graphical interface for Tox. |
||||
|
||||
This program is libre software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||||
|
||||
See the COPYING file for more details. |
||||
*/ |
||||
|
||||
#include "avform.h" |
||||
|
||||
AVForm::AVForm() |
||||
{ |
||||
prep(); |
||||
} |
||||
|
||||
AVForm::~AVForm() |
||||
{ |
||||
} |
@ -0,0 +1,33 @@
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
Copyright (C) 2014 by Project Tox <https://tox.im>
|
||||
|
||||
This file is part of qTox, a Qt-based graphical interface for Tox. |
||||
|
||||
This program is libre software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||||
|
||||
See the COPYING file for more details. |
||||
*/ |
||||
|
||||
#ifndef AVFORM_H |
||||
#define AVFORM_H |
||||
|
||||
#include "genericsettings.h" |
||||
|
||||
class AVForm : public GenericForm |
||||
{ |
||||
Q_OBJECT |
||||
public: |
||||
AVForm(); |
||||
~AVForm(); |
||||
|
||||
private: |
||||
|
||||
}; |
||||
|
||||
#endif |
@ -0,0 +1,46 @@
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
Copyright (C) 2014 by Project Tox <https://tox.im>
|
||||
|
||||
This file is part of qTox, a Qt-based graphical interface for Tox. |
||||
|
||||
This program is libre software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||||
|
||||
See the COPYING file for more details. |
||||
*/ |
||||
|
||||
#include "generalform.h" |
||||
#include "widget/form/settingswidget.h" |
||||
|
||||
GeneralForm::GeneralForm() |
||||
{ |
||||
prep(); |
||||
group = new QGroupBox(tr("General Settings")); |
||||
enableIPv6 = new QCheckBox(); |
||||
enableIPv6->setText(tr("Enable IPv6 (recommended)","Text on a checkbox to enable IPv6")); |
||||
useTranslations = new QCheckBox(); |
||||
useTranslations->setText(tr("Use translations","Text on a checkbox to enable translations")); |
||||
makeToxPortable = new QCheckBox(); |
||||
makeToxPortable->setText(tr("Make Tox portable","Text on a checkbox to make qTox a portable application")); |
||||
makeToxPortable->setToolTip(tr("Save settings to the working directory instead of the usual conf dir","describes makeToxPortable checkbox")); |
||||
|
||||
QVBoxLayout *vLayout = new QVBoxLayout(); |
||||
vLayout->addWidget(enableIPv6); |
||||
vLayout->addWidget(useTranslations); |
||||
vLayout->addWidget(makeToxPortable); |
||||
group->setLayout(vLayout); |
||||
|
||||
label.setText(tr("General Settings")); |
||||
|
||||
headLayout.addWidget(&label); |
||||
layout.addWidget(group); |
||||
} |
||||
|
||||
GeneralForm::~GeneralForm() |
||||
{ |
||||
} |
@ -0,0 +1,41 @@
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
Copyright (C) 2014 by Project Tox <https://tox.im>
|
||||
|
||||
This file is part of qTox, a Qt-based graphical interface for Tox. |
||||
|
||||
This program is libre software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||||
|
||||
See the COPYING file for more details. |
||||
*/ |
||||
|
||||
#ifndef GENERALFORM_H |
||||
#define GENERALFORM_H |
||||
|
||||
#include "genericsettings.h" |
||||
#include <QGroupBox> |
||||
#include <QCheckBox> |
||||
#include <QLabel> |
||||
|
||||
|
||||
class GeneralForm : public GenericForm |
||||
{ |
||||
Q_OBJECT |
||||
public: |
||||
GeneralForm(); |
||||
~GeneralForm(); |
||||
|
||||
private: |
||||
QGroupBox *group; |
||||
QCheckBox* enableIPv6; |
||||
QCheckBox* useTranslations; |
||||
QCheckBox* makeToxPortable; |
||||
QLabel label; |
||||
}; |
||||
|
||||
#endif |
@ -0,0 +1,46 @@
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
Copyright (C) 2014 by Project Tox <https://tox.im>
|
||||
|
||||
This file is part of qTox, a Qt-based graphical interface for Tox. |
||||
|
||||
This program is libre software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||||
|
||||
See the COPYING file for more details. |
||||
*/ |
||||
|
||||
#ifndef GENERICFORM_H |
||||
#define GENERICFORM_H |
||||
|
||||
#include <QObject> |
||||
#include <QVBoxLayout> |
||||
#include "widget/form/settingswidget.h" |
||||
|
||||
class GenericForm : public QObject |
||||
{ |
||||
Q_OBJECT |
||||
public: |
||||
virtual void show(SettingsWidget& sw) |
||||
{ |
||||
sw.body->layout()->addWidget(&body); |
||||
body.show(); |
||||
sw.head->layout()->addWidget(&head); |
||||
head.show(); |
||||
} |
||||
|
||||
protected: |
||||
QVBoxLayout layout, headLayout; |
||||
QWidget head, body; |
||||
void prep() // call in subclass constructor
|
||||
{ |
||||
head.setLayout(&headLayout); |
||||
body.setLayout(&layout); |
||||
} |
||||
}; |
||||
|
||||
#endif |
@ -0,0 +1,38 @@
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
Copyright (C) 2014 by Project Tox <https://tox.im>
|
||||
|
||||
This file is part of qTox, a Qt-based graphical interface for Tox. |
||||
|
||||
This program is libre software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||||
|
||||
See the COPYING file for more details. |
||||
*/ |
||||
|
||||
#include "identityform.h" |
||||
#include "widget/form/settingswidget.h" |
||||
#include <QLabel> |
||||
#include <QLineEdit> |
||||
|
||||
IdentityForm::IdentityForm() |
||||
{ |
||||
prep(); |
||||
toxGroup = new QGroupBox(tr("Tox ID")); |
||||
QLabel* toxIdLabel = new QLabel(tr("Your Tox ID")); |
||||
QLineEdit* toxID = new QLineEdit(); |
||||
toxID->setReadOnly(true); |
||||
QVBoxLayout* toxLayout = new QVBoxLayout(); |
||||
toxLayout->addWidget(toxIdLabel); |
||||
toxLayout->addWidget(toxID); |
||||
toxGroup->setLayout(toxLayout); |
||||
layout.addWidget(toxGroup); |
||||
} |
||||
|
||||
IdentityForm::~IdentityForm() |
||||
{ |
||||
} |
@ -0,0 +1,34 @@
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
Copyright (C) 2014 by Project Tox <https://tox.im>
|
||||
|
||||
This file is part of qTox, a Qt-based graphical interface for Tox. |
||||
|
||||
This program is libre software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||||
|
||||
See the COPYING file for more details. |
||||
*/ |
||||
|
||||
#ifndef IDENTITYFORM_H |
||||
#define IDENTITYFORM_H |
||||
|
||||
#include "genericsettings.h" |
||||
#include <QGroupBox> |
||||
|
||||
class IdentityForm : public GenericForm |
||||
{ |
||||
Q_OBJECT |
||||
public: |
||||
IdentityForm(); |
||||
~IdentityForm(); |
||||
|
||||
private: |
||||
QGroupBox* toxGroup; |
||||
}; |
||||
|
||||
#endif |
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
Copyright (C) 2014 by Project Tox <https://tox.im>
|
||||
|
||||
This file is part of qTox, a Qt-based graphical interface for Tox. |
||||
|
||||
This program is libre software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||||
|
||||
See the COPYING file for more details. |
||||
*/ |
||||
|
||||
#include "privacyform.h" |
||||
#include "widget/form/settingswidget.h" |
||||
|
||||
PrivacyForm::PrivacyForm() |
||||
{ |
||||
prep(); |
||||
} |
||||
|
||||
PrivacyForm::~PrivacyForm() |
||||
{ |
||||
} |
@ -0,0 +1,33 @@
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
Copyright (C) 2014 by Project Tox <https://tox.im>
|
||||
|
||||
This file is part of qTox, a Qt-based graphical interface for Tox. |
||||
|
||||
This program is libre software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||||
|
||||
See the COPYING file for more details. |
||||
*/ |
||||
|
||||
#ifndef PRIVACYFORM_H |
||||
#define PRIVACYFORM_H |
||||
|
||||
#include "genericsettings.h" |
||||
|
||||
class PrivacyForm : public GenericForm |
||||
{ |
||||
Q_OBJECT |
||||
public: |
||||
PrivacyForm(); |
||||
~PrivacyForm(); |
||||
|
||||
private: |
||||
|
||||
}; |
||||
|
||||
#endif |
Loading…
Reference in new issue