~ubuntu-branches/ubuntu/maverick/smplayer/maverick

« back to all changes in this revision

Viewing changes to src/findsubtitles/findsubtitlesconfigdialog.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Maia Kozheva
  • Date: 2009-03-31 23:05:43 UTC
  • mfrom: (1.1.9 upstream) (3.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090331230543-1ned1omblgt4qiak
Tags: 0.6.7-1
* New upstream release. (Closes: #523791)
  - Reworked subtitle font preferences. (Closes: #503295)
  - No longer installs qt_fr.qm. (Closes: #486314)
* debian/control:
  - Bumped Standards-Version to 3.8.1.
  - Changed maintainer name (still the same person and GPG key).
  - Changed section to video.
  - Build-depend on zlib1g-dev for findsubtitles.
  - Require Qt >= 4.3 per readme.
  - Added ${misc:Depends}.
  - Make smplayer-translations depend on smplayer and smplayer recommend
    smplayer-translations, not the other way round. (Closes: #489375)
* debian/copyright:
  - Significantly expanded per-file with new upstream authors.
* debian/rules:
  - Make make use correct uic in install.
  - Clean svn_revision.
  - Removed get-orig-source - not needed with uscan --repack.
* debian/patches/01_gl_translation.patch:
  - Added patch to fix lrelease error on smplayer_gl.ts.
* Added debian/README.source for simple-patchsys.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*  smplayer, GUI front-end for mplayer.
 
2
    Copyright (C) 2006-2009 Ricardo Villalba <rvm@escomposlinux.org>
 
3
 
 
4
    This program is free software; you can redistribute it and/or modify
 
5
    it under the terms of the GNU General Public License as published by
 
6
    the Free Software Foundation; either version 2 of the License, or
 
7
    (at your option) any later version.
 
8
 
 
9
    This program is distributed in the hope that it will be useful,
 
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
    GNU General Public License for more details.
 
13
 
 
14
    You should have received a copy of the GNU General Public License
 
15
    along with this program; if not, write to the Free Software
 
16
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
17
*/
 
18
 
 
19
#include "findsubtitlesconfigdialog.h"
 
20
#include <QNetworkProxy>
 
21
 
 
22
FindSubtitlesConfigDialog::FindSubtitlesConfigDialog( QWidget* parent, Qt::WindowFlags f )
 
23
        : QDialog(parent, f)
 
24
{
 
25
        setupUi(this);
 
26
 
 
27
        proxy_type_combo->addItem( tr("Http"), QNetworkProxy::HttpProxy);
 
28
        proxy_type_combo->addItem( tr("Socks5"), QNetworkProxy::Socks5Proxy);
 
29
 
 
30
        use_proxy_check->setWhatsThis( tr("Enable/disable the use of the proxy.") );
 
31
        proxy_hostname_edit->setWhatsThis( tr("The host name of the proxy.") );
 
32
        proxy_port_spin->setWhatsThis( tr("The port of the proxy.") );
 
33
        proxy_username_edit->setWhatsThis( tr("If the proxy requires authentication, this sets the username.") );
 
34
        proxy_password_edit->setWhatsThis( 
 
35
        tr("The password for the proxy. <b>Warning:</b> the password will be saved "
 
36
           "as plain text in the configuration file.") );
 
37
        proxy_type_combo->setWhatsThis( tr("Select the proxy type to be used.") );
 
38
 
 
39
        layout()->setSizeConstraint(QLayout::SetFixedSize);
 
40
}
 
41
 
 
42
FindSubtitlesConfigDialog::~FindSubtitlesConfigDialog() {
 
43
}
 
44
 
 
45
void FindSubtitlesConfigDialog::setUseProxy(bool b) {
 
46
        use_proxy_check->setChecked(b);
 
47
}
 
48
 
 
49
bool FindSubtitlesConfigDialog::useProxy() {
 
50
        return  use_proxy_check->isChecked();
 
51
}
 
52
 
 
53
void FindSubtitlesConfigDialog::setProxyHostname(QString host) {
 
54
        proxy_hostname_edit->setText(host);
 
55
}
 
56
 
 
57
QString FindSubtitlesConfigDialog::proxyHostname() {
 
58
        return proxy_hostname_edit->text();
 
59
}
 
60
 
 
61
void FindSubtitlesConfigDialog::setProxyPort(int port) {
 
62
        proxy_port_spin->setValue(port);
 
63
}
 
64
 
 
65
int FindSubtitlesConfigDialog::proxyPort() {
 
66
        return proxy_port_spin->value();
 
67
}
 
68
 
 
69
void FindSubtitlesConfigDialog::setProxyUsername(QString username) {
 
70
        proxy_username_edit->setText(username);
 
71
}
 
72
 
 
73
QString FindSubtitlesConfigDialog::proxyUsername() {
 
74
        return proxy_username_edit->text();
 
75
}
 
76
 
 
77
void FindSubtitlesConfigDialog::setProxyPassword(QString password) {
 
78
        proxy_password_edit->setText(password);
 
79
}
 
80
 
 
81
QString FindSubtitlesConfigDialog::proxyPassword() {
 
82
        return proxy_password_edit->text();
 
83
}
 
84
 
 
85
void FindSubtitlesConfigDialog::setProxyType(int type) {
 
86
        int index = proxy_type_combo->findData(type);
 
87
        if (index == -1) index = 0;
 
88
        proxy_type_combo->setCurrentIndex(index);
 
89
}
 
90
 
 
91
int FindSubtitlesConfigDialog::proxyType() {
 
92
        int index = proxy_type_combo->currentIndex();
 
93
        return proxy_type_combo->itemData(index).toInt();
 
94
}
 
95
 
 
96
#include "moc_findsubtitlesconfigdialog.cpp"