MCPcopy Create free account
hub / github.com/dannagle/PacketSender / CloudUI

Method CloudUI

src/cloudui.cpp:52–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52CloudUI::CloudUI(QWidget *parent) :
53 QDialog(parent),
54 ui(new Ui::CloudUI)
55{
56 ui->setupUi(this);
57
58
59 packetsToImport.clear();
60 packetsToExport.clear();
61 packetsFound.clear();
62 packetSets.clear();
63
64 ui->passwordConfirmEdit->hide();
65 ui->passwordConfirmLabel->hide();
66
67 ui->viewPublicButton->hide();
68
69
70 ui->cloudTabWidget->setCurrentIndex(0);
71
72 ui->createAccountButton->setIcon(QIcon("://icons/ic_person_black_24dp_2x.png"));
73 linkifyButton(ui->createAccountButton);
74
75 linkifyButton(ui->termsButton);
76 linkifyButton(ui->privacyButton);
77 linkifyButton(ui->cloudLinkButton);
78
79 suppressAlert = false;
80
81
82 http = new QNetworkAccessManager(this); //Cloud UI http object
83
84 if (! connect(http, SIGNAL(finished(QNetworkReply*)),
85 this, SLOT(replyFinished(QNetworkReply*)))) {
86
87 QDEBUG() << "http request finished connection false";
88
89 }
90
91
92 QIcon mIcon("://icons/ic_cloud_done_black_24dp_2x.png");
93 setWindowTitle("Packet Sender "+tr("Cloud"));
94 setWindowIcon(mIcon);
95
96 setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
97
98
99 QSettings settings(SETTINGSFILE, QSettings::IniFormat);
100
101 ui->usernameEdit->setText(settings.value("cloudUsername", "").toString());
102 ui->passwordEdit->setText(settings.value("cloudPassword", "").toString());
103 ui->rememberLoginCheck->setChecked(settings.value("rememberLoginCheck", false).toBool());
104
105 ui->usernameEdit->setFocus();
106
107
108 packets = Packet::fetchAllfromDB("");
109

Callers

nothing calls this directly

Calls 6

linkifyButtonFunction · 0.85
setIconMethod · 0.80
setTextMethod · 0.80
toStringMethod · 0.80
sizeMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected