Commit e150cdb7 authored by Laurent Montel's avatar Laurent Montel 😁

Prepare to port to new API

parent 9f831247
......@@ -8,7 +8,6 @@ set(fbresource_SRCS
listjob.cpp
eventslistjob.cpp
birthdaylistjob.cpp
settingsdialog.cpp
tokenjobs.cpp
graph.cpp
${fbresource_common_SRCS}
......@@ -39,3 +38,31 @@ install(
FILES facebookresource.desktop
DESTINATION "${KDE_INSTALL_DATAROOTDIR}/akonadi/agents"
)
############################### Config plugin ################################
#set(facebookconfig_ui_SRCS)
#ki18n_wrap_ui(facebookconfig_ui_SRCS facebookagentsettingswidget.ui)
#set(facebookconfig_SRCS
# facebooksettingswidget.cpp
# ${facebookconfig_ui_SRCS}
# ${fbresource_common_SRCS}
# )
#kcoreaddons_add_plugin(facebookconfig
# SOURCES ${facebookconfig_SRCS}
# JSON "facebookconfig.json"
# INSTALL_NAMESPACE "akonadi/config"
# )
#target_link_libraries(facebookconfig
# KF5::AkonadiCore
# KF5::CalendarCore
# KF5::Codecs
# KF5::AkonadiAgentBase
# KF5::Contacts
# KF5::AkonadiWidgets
# KF5::I18n
# KF5::KIOWidgets
# )
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>FacebookAgentSettingsWidget</class>
<widget class="QWidget" name="FacebookAgentSettingsWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>401</width>
<height>484</height>
</rect>
</property>
<property name="windowTitle">
<string>Configuration</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Account</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="loginStatusLbl">
<property name="text">
<string>Login status: unknown</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="loginBtn">
<property name="text">
<string>Login with Facebook</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="logoutBtn">
<property name="text">
<string>Logout</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Reminders</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="attendingReminderChkBox">
<property name="text">
<string>Show reminders for events I'm attending</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="maybeAttendingReminderChkBox">
<property name="text">
<string>Show reminders for events I may be attending</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="notAttendingReminderChkBox">
<property name="text">
<string>Show reminders for events I'm not attending</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="notRespondedReminderChkBox">
<property name="text">
<string>Show reminders for events I have not responded to</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="birthdayReminderChkBox">
<property name="text">
<string>Show reminders for friends' birthdays</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Show event reminders</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="eventReminderHoursSpinBox">
<property name="suffix">
<string/>
</property>
<property name="value">
<number>1</number>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_3">
<property name="text">
<string>hour(s) before</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Show birthday reminders</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="birthdayReminderDaysSpinBox"/>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_6">
<property name="text">
<string>day(s) before</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
{
"X-Akonadi-PluginType": "AgentConfig",
"X-Akonadi-Library": "facebookconfig",
"X-Akonadi-AgentConfig-Type": "akonadi_facebook_resource"
}
......@@ -19,7 +19,6 @@
#include "resource_debug.h"
#include "eventslistjob.h"
#include "birthdaylistjob.h"
#include "settingsdialog.h"
#include "tokenjobs.h"
#include <AkonadiCore/EntityDisplayAttribute>
......@@ -34,12 +33,13 @@ FacebookResource::FacebookResource(const QString &id)
{
setNeedsNetwork(true);
setName(i18n("Facebook"));
}
FacebookResource::~FacebookResource()
{
}
#if 0
void FacebookResource::configure(WId windowId)
{
Q_UNUSED(windowId);
......@@ -52,6 +52,7 @@ void FacebookResource::configure(WId windowId)
Q_EMIT configurationDialogRejected();
}
}
#endif
void FacebookResource::abortActivity()
{
......
......@@ -32,7 +32,6 @@ public:
explicit FacebookResource(const QString &id);
~FacebookResource() override;
void configure(WId windowId) override;
void abortActivity() override;
void cleanup() override;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment