forked from shervinkh/sgu-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofilestatus.cpp
More file actions
34 lines (28 loc) · 802 Bytes
/
Copy pathprofilestatus.cpp
File metadata and controls
34 lines (28 loc) · 802 Bytes
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
#include "profilestatus.h"
#include "accountmanager.h"
#include "statusprocessor.h"
#include "statusview.h"
#include <QtGui>
ProfileStatus::ProfileStatus(QWidget *parent, AccountManager *am, const QString &id) :
QDialog(parent)
{
StatusProcessor sp;
if (id == am->ID())
sp = am->ownStatus();
else if (am->isFriend(id) && am->statOf(id).isValid())
sp = am->statOf(id);
else
sp = am->statData(id);
isVal = sp.isValid();
if (isVal)
{
ID = new QLabel(tr("<h2>Submit status for ID %1:</h2>").arg(id));
sv = new StatusView(this, am);
sv->setData(sp.data());
lay = new QVBoxLayout;
lay->addWidget(ID);
lay->addWidget(sv);
setLayout(lay);
setWindowTitle(tr("Submit Status"));
}
}