Commit e546c2c3c1d02f1b859f30d91858533dfc509c4e
- Diff rendering mode:
- inline
- side by side
qfacebookconnect.pro
(1 / 1)
|   | |||
| 17 | 17 | SOURCES += src/fbpermissiondialog.cpp | |
| 18 | 18 | SOURCES += src/fbstreamdialog.cpp | |
| 19 | 19 | SOURCES += src/fbfeeddialog.cpp | |
| 20 | |||
| 21 | 20 | HEADERS += inc/fbconnectglobal.h | |
| 22 | 21 | HEADERS += inc/fbsession.h | |
| 23 | 22 | HEADERS += inc/fbrequest.h | |
| … | … | ||
| 27 | 27 | HEADERS += inc/fbpermissiondialog.h | |
| 28 | 28 | HEADERS += inc/fbstreamdialog.h | |
| 29 | 29 | HEADERS += inc/fbfeeddialog.h | |
| 30 | RESOURCES += resource/qfbconnectimages.qrc |
resource/Thumbs.db
(71 / 0)
Binary files differ
resource/images/Thumbs.db
(92 / 0)
Binary files differ
resource/images/close.png
(3 / 0)
Binary files differ
resource/images/fbicon.png
(3 / 0)
Binary files differ
resource/images/login.png
(10 / 0)
Binary files differ
resource/images/login2.png
(16 / 0)
Binary files differ
resource/images/login2_down.png
(16 / 0)
Binary files differ
Binary files differ
resource/images/logout.png
(5 / 0)
Binary files differ
Binary files differ
resource/images/readme.txt
(2 / 0)
|   | |||
| 1 | These image files are taken from the iphone version of the facebook connect sdk. | ||
| 2 | If these are out of date, check the iphone version, which is officially maintained by facebook. |
resource/qfbconnectimages.qrc
(12 / 0)
|   | |||
| 1 | <RCC> | ||
| 2 | <qresource prefix="/images"> | ||
| 3 | <file>images/close.png</file> | ||
| 4 | <file>images/fbicon.png</file> | ||
| 5 | <file>images/login2.png</file> | ||
| 6 | <file>images/login2_down.png</file> | ||
| 7 | <file>images/login.png</file> | ||
| 8 | <file>images/login_down.png</file> | ||
| 9 | <file>images/logout.png</file> | ||
| 10 | <file>images/logout_down.png</file> | ||
| 11 | </qresource> | ||
| 12 | </RCC> |
resource/readme.txt
(9 / 0)
|   | |||
| 1 | Read http://qt.nokia.com/doc/4.6/resources.html for how to use resources. | ||
| 2 | Basicually you need to call | ||
| 3 | |||
| 4 | Q_INIT_RESOURCE(qfbconnectimages); // when you want to use the qfacebookconnect resources. | ||
| 5 | Q_CLEANUP_RESOURCE(qfbconnectimages); // when you no longer want to use the images resource and want to free some memory. | ||
| 6 | |||
| 7 | once you have the resources loaded you can access a particular resource like so: | ||
| 8 | |||
| 9 | cutAct = new QAction(QIcon(":/images/login2.png"), tr("Login to facebook"), this); |
sample/mainwindow.cpp.bak
(0 / 35)
|   | |||
| 1 | #include "mainwindow.h" | ||
| 2 | #include "ui_mainwindow.h" | ||
| 3 | |||
| 4 | #include <QtGlobal> | ||
| 5 | |||
| 6 | MainWindow::MainWindow(QWidget *parent) : | ||
| 7 | QMainWindow(parent), | ||
| 8 | ui(new Ui::MainWindow) | ||
| 9 | { | ||
| 10 | ui->setupUi(this); | ||
| 11 | |||
| 12 | iFBSession = FBSession::sessionForApplication("b4db7267221ecf6333e60c1213d724cb", "f054071e18bd026c0b2e2f97ff68a7c5", QString()); | ||
| 13 | } | ||
| 14 | |||
| 15 | MainWindow::~MainWindow() | ||
| 16 | { | ||
| 17 | delete ui; | ||
| 18 | } | ||
| 19 | |||
| 20 | void MainWindow::changeEvent(QEvent *e) | ||
| 21 | { | ||
| 22 | QMainWindow::changeEvent(e); | ||
| 23 | switch (e->type()) { | ||
| 24 | case QEvent::LanguageChange: | ||
| 25 | ui->retranslateUi(this); | ||
| 26 | break; | ||
| 27 | default: | ||
| 28 | break; | ||
| 29 | } | ||
| 30 | } | ||
| 31 | |||
| 32 | void MainWindow::on_pushButton_clicked() | ||
| 33 | { | ||
| 34 | iLoginDialog.load(); | ||
| 35 | } |

