-
Notifications
You must be signed in to change notification settings - Fork 0
/
framebookconfig.cpp
46 lines (33 loc) · 1.03 KB
/
framebookconfig.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "framebookconfig.h"
#include "ui_framebookconfig.h"
#include <QProcess>
#include <QDebug>
FrameBookConfig::FrameBookConfig(QWidget *parent) :
QWidget(parent),
ui(new Ui::FrameBookConfig)
{
ui->setupUi(this);
ui->kcfg_pass->setEchoMode(QLineEdit::Password);
connect(ui->installLabel,SIGNAL(linkActivated(QString)),this,SLOT(openBrowser(QString)));
}
FrameBookConfig::~FrameBookConfig()
{
delete ui;
}
void FrameBookConfig::openBrowser(QString link){
qDebug() << link;
cmd.start("xdg-open",QStringList() << link);
}
void FrameBookConfig::setAttributes(QString user,QString pass){
ui->kcfg_user->setText(user);
ui->kcfg_pass->setText(pass);
}
QString FrameBookConfig::getUser(){
return ui->kcfg_user->text();
}
QString FrameBookConfig::getPass(){
return ui->kcfg_pass->text();
}
void FrameBookConfig::setInstallURL(QString url){
ui->installLabel->setText((QString("You must add the FrameBook application to your Facebook account by clicking <a href=\"").append(url)).append("\">here.</a>"));
}