BlueDevil runtime dependencies:
- -obex-data-server
+ -bluez5
+ -General Bluetooth management
+
+ -bluez-obexd
-Be able to "Browse File" aka kio_obexftp
+ -Be able to "Send Files" (bluedevil-sendfile)
-Be able to receive files
- -obexd-client
- -Be able to Send files (bluedevil-sendfile)
-
- -If you're using Alsa:
- The best way of having "automagical headset configuration" is having the bluetooth.conf hook
- enabled
-
- NOTE: Be sure to install only obexd-client and not obexd-server, since the last will conflic
- with obex-data-server.
\ No newline at end of file
+ -pulseaudio-module-bluetooth
+ -Be able to connect A2DP profile
--- /dev/null
+function get_files
+{
+ echo bluedevil-mime.xml
+}
+
+function po_for_file
+{
+ case "$1" in
+ bluedevil-mime.xml)
+ echo bluedevil_xml_mimetypes.po
+ ;;
+ esac
+}
+
+function tags_for_file
+{
+ case "$1" in
+ bluedevil-mime.xml)
+ echo comment
+ ;;
+ esac
+}
<sub-class-of type="inode/directory"/>
<generic-icon name="video-display"/>
<comment>Known Device</comment>
+ <comment xml:lang="ca">Dispositiu conegut</comment>
+ <comment xml:lang="cs">Známé zařízení</comment>
+ <comment xml:lang="da">Kendt enhed</comment>
+ <comment xml:lang="de">Bekanntes Gerät</comment>
+ <comment xml:lang="el">Γνωστή συσκευή</comment>
+ <comment xml:lang="en_GB">Known Device</comment>
+ <comment xml:lang="es">Dispositivo conocido</comment>
+ <comment xml:lang="fi">Tunnettu laite</comment>
+ <comment xml:lang="it">Dispositivo conosciuto</comment>
+ <comment xml:lang="nl">Bekend apparaat</comment>
+ <comment xml:lang="pl">Znane urządzenie</comment>
+ <comment xml:lang="pt">Dispositivo Conhecido</comment>
+ <comment xml:lang="pt_BR">Dispositivo conhecido</comment>
+ <comment xml:lang="sk">Známe zariadenie</comment>
+ <comment xml:lang="sl">Znana naprava</comment>
+ <comment xml:lang="sr">познати уређај</comment>
+ <comment xml:lang="sr@ijekavian">познати уређај</comment>
+ <comment xml:lang="sr@ijekavianlatin">poznati uređaj</comment>
+ <comment xml:lang="sr@latin">poznati uređaj</comment>
+ <comment xml:lang="uk">Відомий пристрій</comment>
</mime-type>
<mime-type type="inode/vnd.kde.bluedevil.device.discovered">
<sub-class-of type="inode/vnd.kde.bluedevil.device"/>
<generic-icon name="video-display"/>
<comment>Discovered Device</comment>
+ <comment xml:lang="ca">Dispositiu descobert</comment>
+ <comment xml:lang="cs">Objevené zařízení</comment>
+ <comment xml:lang="da">Opdaget enhed</comment>
+ <comment xml:lang="de">Erkanntes Gerät</comment>
+ <comment xml:lang="el">Ευρεθείσα συσκευή</comment>
+ <comment xml:lang="en_GB">Discovered Device</comment>
+ <comment xml:lang="es">Dispositivo descubierto</comment>
+ <comment xml:lang="fi">Löydetty palvelu</comment>
+ <comment xml:lang="it">Dispositivo scoperto</comment>
+ <comment xml:lang="nl">Gevonden apparaat</comment>
+ <comment xml:lang="pl">Odkryte urządzenie</comment>
+ <comment xml:lang="pt">Dispositivo Descoberto</comment>
+ <comment xml:lang="pt_BR">Dispositivo descoberto</comment>
+ <comment xml:lang="sk">Objavené zariadenie</comment>
+ <comment xml:lang="sl">Odkrita naprava</comment>
+ <comment xml:lang="sr">откривени уређај</comment>
+ <comment xml:lang="sr@ijekavian">откривени уређај</comment>
+ <comment xml:lang="sr@ijekavianlatin">otkriveni uređaj</comment>
+ <comment xml:lang="sr@latin">otkriveni uređaj</comment>
+ <comment xml:lang="uk">Виявлений пристрій</comment>
</mime-type>
<mime-type type="inode/vnd.kde.bluedevil.service">
<sub-class-of type="inode/directory"/>
<generic-icon name="preferences-system-bluetooth"/>
<comment>Service</comment>
+ <comment xml:lang="ca">Servei</comment>
+ <comment xml:lang="cs">Služba</comment>
+ <comment xml:lang="da">Tjeneste</comment>
+ <comment xml:lang="de">Dienst</comment>
+ <comment xml:lang="el">Υπηρεσία</comment>
+ <comment xml:lang="en_GB">Service</comment>
+ <comment xml:lang="es">Servicio</comment>
+ <comment xml:lang="fi">Palvelu</comment>
+ <comment xml:lang="it">Servizio</comment>
+ <comment xml:lang="nl">Service</comment>
+ <comment xml:lang="pl">Usługa</comment>
+ <comment xml:lang="pt">Serviço</comment>
+ <comment xml:lang="pt_BR">Serviço</comment>
+ <comment xml:lang="sk">Služba</comment>
+ <comment xml:lang="sl">Storitev</comment>
+ <comment xml:lang="sr">сервис</comment>
+ <comment xml:lang="sr@ijekavian">сервис</comment>
+ <comment xml:lang="sr@ijekavianlatin">servis</comment>
+ <comment xml:lang="sr@latin">servis</comment>
+ <comment xml:lang="uk">Служба</comment>
</mime-type>
<mime-type type="application/vnd.kde.bluedevil-audio">
<comment>Service</comment>
+ <comment xml:lang="ca">Servei</comment>
+ <comment xml:lang="cs">Služba</comment>
+ <comment xml:lang="da">Tjeneste</comment>
+ <comment xml:lang="de">Dienst</comment>
+ <comment xml:lang="el">Υπηρεσία</comment>
+ <comment xml:lang="en_GB">Service</comment>
+ <comment xml:lang="es">Servicio</comment>
+ <comment xml:lang="fi">Palvelu</comment>
+ <comment xml:lang="it">Servizio</comment>
+ <comment xml:lang="nl">Service</comment>
+ <comment xml:lang="pl">Usługa</comment>
+ <comment xml:lang="pt">Serviço</comment>
+ <comment xml:lang="pt_BR">Serviço</comment>
+ <comment xml:lang="sk">Služba</comment>
+ <comment xml:lang="sl">Storitev</comment>
+ <comment xml:lang="sr">сервис</comment>
+ <comment xml:lang="sr@ijekavian">сервис</comment>
+ <comment xml:lang="sr@ijekavianlatin">servis</comment>
+ <comment xml:lang="sr@latin">servis</comment>
+ <comment xml:lang="uk">Служба</comment>
</mime-type>
<mime-type type="application/vnd.kde.bluedevil-network-panu">
<comment>Service</comment>
+ <comment xml:lang="ca">Servei</comment>
+ <comment xml:lang="cs">Služba</comment>
+ <comment xml:lang="da">Tjeneste</comment>
+ <comment xml:lang="de">Dienst</comment>
+ <comment xml:lang="el">Υπηρεσία</comment>
+ <comment xml:lang="en_GB">Service</comment>
+ <comment xml:lang="es">Servicio</comment>
+ <comment xml:lang="fi">Palvelu</comment>
+ <comment xml:lang="it">Servizio</comment>
+ <comment xml:lang="nl">Service</comment>
+ <comment xml:lang="pl">Usługa</comment>
+ <comment xml:lang="pt">Serviço</comment>
+ <comment xml:lang="pt_BR">Serviço</comment>
+ <comment xml:lang="sk">Služba</comment>
+ <comment xml:lang="sl">Storitev</comment>
+ <comment xml:lang="sr">сервис</comment>
+ <comment xml:lang="sr@ijekavian">сервис</comment>
+ <comment xml:lang="sr@ijekavianlatin">servis</comment>
+ <comment xml:lang="sr@latin">servis</comment>
+ <comment xml:lang="uk">Служба</comment>
</mime-type>
<mime-type type="application/vnd.kde.bluedevil-network-dun">
<comment>Service</comment>
+ <comment xml:lang="ca">Servei</comment>
+ <comment xml:lang="cs">Služba</comment>
+ <comment xml:lang="da">Tjeneste</comment>
+ <comment xml:lang="de">Dienst</comment>
+ <comment xml:lang="el">Υπηρεσία</comment>
+ <comment xml:lang="en_GB">Service</comment>
+ <comment xml:lang="es">Servicio</comment>
+ <comment xml:lang="fi">Palvelu</comment>
+ <comment xml:lang="it">Servizio</comment>
+ <comment xml:lang="nl">Service</comment>
+ <comment xml:lang="pl">Usługa</comment>
+ <comment xml:lang="pt">Serviço</comment>
+ <comment xml:lang="pt_BR">Serviço</comment>
+ <comment xml:lang="sk">Služba</comment>
+ <comment xml:lang="sl">Storitev</comment>
+ <comment xml:lang="sr">сервис</comment>
+ <comment xml:lang="sr@ijekavian">сервис</comment>
+ <comment xml:lang="sr@ijekavianlatin">servis</comment>
+ <comment xml:lang="sr@latin">servis</comment>
+ <comment xml:lang="uk">Служба</comment>
</mime-type>
<mime-type type="application/vnd.kde.bluedevil-sendfile">
<comment>Service</comment>
+ <comment xml:lang="ca">Servei</comment>
+ <comment xml:lang="cs">Služba</comment>
+ <comment xml:lang="da">Tjeneste</comment>
+ <comment xml:lang="de">Dienst</comment>
+ <comment xml:lang="el">Υπηρεσία</comment>
+ <comment xml:lang="en_GB">Service</comment>
+ <comment xml:lang="es">Servicio</comment>
+ <comment xml:lang="fi">Palvelu</comment>
+ <comment xml:lang="it">Servizio</comment>
+ <comment xml:lang="nl">Service</comment>
+ <comment xml:lang="pl">Usługa</comment>
+ <comment xml:lang="pt">Serviço</comment>
+ <comment xml:lang="pt_BR">Serviço</comment>
+ <comment xml:lang="sk">Služba</comment>
+ <comment xml:lang="sl">Storitev</comment>
+ <comment xml:lang="sr">сервис</comment>
+ <comment xml:lang="sr@ijekavian">сервис</comment>
+ <comment xml:lang="sr@ijekavianlatin">servis</comment>
+ <comment xml:lang="sr@latin">servis</comment>
+ <comment xml:lang="uk">Служба</comment>
</mime-type>
</mime-info>
[Global]
IconName=preferences-system-bluetooth
Comment=Bluetooth system
+Comment[bs]=Blutut sistem
Comment[ca]=Sistema Bluetooth
Comment[ca@valencia]=Sistema Bluetooth
Comment[cs]=Systém Bluetooth
Comment[da]=Bluetooth-system
Comment[de]=Bluetooth-System
Comment[el]=Σύστημα Bluetooth
+Comment[en_GB]=Bluetooth system
Comment[es]=Sistema Bluetooth
+Comment[et]=Bluetoothi süsteem
Comment[fi]=Bluetooth-järjestelmä
Comment[fr]=Système Bluetooth
Comment[gl]=Sistema Bluetooth
Comment[hu]=Bluetooth rendszer
Comment[it]=Sistema Bluetooth
+Comment[ja]=Bluetooth システム
Comment[kk]=Bluetooth жүйесі
+Comment[ko]=블루투스 시스템
Comment[lt]=Bluetooth
Comment[mr]=ब्लूटूथ प्रणाली
Comment[nb]=Blåtann-system
+Comment[nds]=Bluetooth-Systeem
Comment[nl]=Bluetooth-systeem
Comment[pa]=ਬਲਿਊਟੁੱਥ ਸਿਸਟਮ
Comment[pl]=System Bluetooth
Comment[x-test]=xxBluetooth systemxx
Comment[zh_TW]=藍牙系統
Name=Bluetooth
+Name[bs]=Bluetooth
Name[ca]=Bluetooth
Name[ca@valencia]=Bluetooth
Name[cs]=Bluetooth
Name[da]=Bluetooth
Name[de]=Bluetooth
Name[el]=Bluetooth
+Name[en_GB]=Bluetooth
Name[es]=Bluetooth
+Name[et]=Bluetooth
Name[fi]=Bluetooth
Name[fr]=Bluetooth
Name[gl]=Bluetooth
Name[hu]=Bluetooth
Name[it]=Bluetooth
+Name[ja]=Bluetooth
Name[kk]=Bluetooth
+Name[ko]=블루투스
Name[lt]=Bluetooth
Name[mr]=ब्लूटूथ
Name[nb]=Blåtann
+Name[nds]=Bluetooth
Name[nl]=Bluetooth
Name[pa]=ਬਲਿਊਟੁੱਥ
Name[pl]=Bluetooth
[Event/bluedevilAuthorize]
Name=Authorization Requested
+Name[bs]=Zahtijeva odobrenje
Name[ca]=Sol·licitud d'autorització
Name[ca@valencia]=Sol·licitud d'autorització
Name[cs]=Je vyžadováno udělení oprávnění
Name[da]=Godkendelse kræves
Name[de]=Autorisierung gefordert
Name[el]=Απαιτείται ταυτοποίηση
+Name[en_GB]=Authorisation Requested
Name[es]=Se ha solicitado autorización
+Name[et]=Autentimise nõue
Name[fi]=Valtuutusta pyydetty
Name[fr]=Autorisation demandée
Name[gl]=Requírese autorización
Name[hu]=Felhatalmazás kérve
Name[it]=Richiesta autorizzazione
Name[kk]=Авторизация сұралды
+Name[ko]=인증 요청됨
Name[lt]=Prašoma prieigos teisių
Name[mr]=अधिप्रमाणाची विनंती केली
Name[nb]=Autorisasjon kreves
+Name[nds]=Identiteetprööv anfraagt
Name[nl]=Autorisatie gevraagd
Name[pa]=ਪਰਮਾਣਕਿਤਾ ਚਾਹੀਦੀ ਹੈ
Name[pl]=Wymagane uwierzytelnienie
Name[x-test]=xxAuthorization Requestedxx
Name[zh_TW]=請求認證
Comment=A device wants to connect
+Comment[bs]=Uređaj se zeli konektovati
Comment[ca]=Un dispositiu es vol connectar
Comment[ca@valencia]=Un dispositiu es vol connectar
Comment[cs]=Zařízení se chce připojit
Comment[da]=En enhed prøver at forbinde
Comment[de]=Ein Gerät möchte sich verbinden
Comment[el]=Μία συσκευή επιθυμεί να συνδεθεί
+Comment[en_GB]=A device wants to connect
Comment[es]=Un dispositivo desea conectarse
+Comment[et]=Seade soovib ühendust luua
Comment[fi]=Laite haluaa ottaa yhteyden
Comment[fr]=Un périphérique veut se connecter
Comment[gl]=Un dispositivo quere conectarse
Comment[hu]=Egy eszköz szeretne csatlakozni
Comment[it]=Un dispositivo vuole connettersi
Comment[kk]=Бір құрылғы байланысуды қалайды
+Comment[ko]=장치가 연결하려고 함
Comment[lt]=Įrenginys nori prijungti prie Jūsų
Comment[mr]=एक साधन जोडू इच्छिते
Comment[nb]=En enhet vil koble til
+Comment[nds]=En Reedschap will sik tokoppeln
Comment[nl]=Een apparaat wil een verbinding maken
Comment[pa]=ਜੰਤਰ ਕੁਨੈਕਟ ਹੋਣਾ ਚਾਹੁੰਦਾ ਹੈ
Comment[pl]=Urządzenie chce się podłączyć
[Event/bluedevilConfirmModechange]
Name=Confirm Mode Change
+Name[bs]=Povrdi promijene moda
Name[ca]=Confirmació del canvi de mode
Name[ca@valencia]=Confirmació del canvi de mode
Name[cs]=Potvrdit změnu režimu
Name[da]=Bekræft tilstandsændring
Name[de]=Moduswechsel bestätigen
Name[el]=Επιβεβαίωση αλλαγής λειτουργίας
+Name[en_GB]=Confirm Mode Change
Name[es]=Confirmar el cambio de modo
+Name[et]=Režiimimuutuse kinnitus
Name[fi]=Vahvistan tilan vaihto
Name[fr]=Confirmer le changement de mode
Name[gl]=Confirmación do cambio de modo
Name[hu]=Módváltoztatás megerősítése
Name[it]=Conferma cambio di modalità
Name[kk]=Күйін өзгертуді құптау
+Name[ko]=모드 변경 확인
Name[lt]=Patvirtinti veiksenos pakeitimą
Name[mr]=पद्धत बदल खात्री करा
Name[nb]=Bekreft endring i kjøremåte
+Name[nds]=Bedriefännern-Beglöven
Name[nl]=Moduswisseling bevestigen
Name[pl]=Potwierdź zmianę trybu
Name[pt]=Confirmar a Mudança de Modo
Comment[it]=La modalità del Bluetooth sta per essere cambiata (da «normale» a «flight», ad esempio)
Comment[kk]=Bluetooth режімі өзгертілмек (мысалы, кәдімгіден ұшқандағыға)
Comment[km]=របៀបប៊្លូធូសដែលហៀបនឹងផ្លាស់ប្ដូរ (ឧទាហរណ៍របៀបហោះហើរធម្មតា)
+Comment[ko]=블루투스 모드가 변경될 예정 (예: 일반에서 비행기 모드로)
Comment[lt]=Bluetooth veiksena bus pakeista (pvz. iš normalaus į skrydžio)
Comment[mr]=ब्लूटूथ पद्धतीत बदल होत आहे (उदा. सामान्य ते फ्लाइट)
Comment[nb]=Blåtann-kjøremåte skal til å bli endret (f.eks. normal til fly)
[Event/bluedevilRequestConfirmation]
Name=Confirm PIN
+Name[bs]=Potvrdi pin
Name[ca]=Confirmació del PIN
Name[ca@valencia]=Confirmació del PIN
Name[cs]=Potvrdit PIN
Name[da]=Bekræft PIN-kode
Name[de]=PIN bestätigen
Name[el]=Επιβεβαίωση PIN
+Name[en_GB]=Confirm PIN
Name[es]=Confirmar PIN
+Name[et]=PIN-i kinnitus
Name[fi]=Vahvista PIN
Name[fr]=Confirmer le code « PIN »
Name[gl]=Confirmación do PIN
Name[hu]=PIN megerősítése
Name[it]=Conferma PIN
Name[kk]=PIN-кодын құптау
+Name[ko]=PIN 확인
Name[lt]=Patvirtinti PIN
Name[mr]=पिनची खात्री करा
Name[nb]=Bekreft PIN
+Name[nds]=Beglöven-PIN
Name[nl]=PIN bevestigen
Name[pa]=ਪਿੰਨ ਪੁਸ਼ਟੀ
Name[pl]=Potwierdź numer PIN
Name[x-test]=xxConfirm PINxx
Name[zh_TW]=確認 PIN 碼
Comment=Confirm a device request using matching PINs
+Comment[bs]=Potvrdi zahtjev uređaja koristeci odgovarajuce pinove
Comment[ca]=Confirma una sol·licitud d'un dispositiu usant PIN que coincideixin
Comment[ca@valencia]=Confirma una sol·licitud d'un dispositiu usant PIN que coincidisquen
Comment[cs]=Potvrďte požadavek zařízení použitím odpovídajících PINů
Comment[da]=Bekræft en enhedsanmodning med brug af matchende PIN-koder
Comment[de]=Eine Geräteanforderung mit passenden PINs bestätigen
Comment[el]=Επιβεβαίωση αίτησης συσκευής που χρησιμοποιεί ταιριαστά PIN
+Comment[en_GB]=Confirm a device request using matching PINs
Comment[es]=Confirmar la petición de un dispositivo usando PIN emparejados
+Comment[et]=Seadme nõude kinnitamine sobivate PIN-idega
Comment[fi]=Vahvista laitepyyntö käyttämällä samoja PIN-lukuja
Comment[fr]=Confirme une demande d'un périphérique utilisant une correspondance de codes « PIN »
Comment[gl]=Confirmar a solicitude dun dispositivo empregando PIN coincidentes
Comment[hu]=Eszközkérés megerősítése egyező PIN-ek használatával
Comment[it]=Conferma la richiesta di un dispositivo usando PIN corrispondenti
Comment[kk]=Сәйкесті PIN-дерді келтіріп құрылғының талабын құптау
+Comment[ko]=장치 요청을 PIN 일치로 확인
Comment[lt]=Pavirtinti įrenginio užklausą naudojant atitinkančius PIN
Comment[mr]=एक साधन विनंती पिन जुळवणी वापरून खात्री करा
Comment[nb]=Bekreft en enhetsforespørsel med samsvarende PIN-er
+Comment[nds]=En Reedschap-Anfraag mit passen PINs beglöven
Comment[nl]=Een apparaataanvraag bevestigen met overeenkomstige PIN's
Comment[pl]=Potwierdź żądanie urządzenia przy użyciu zgodnych numerów PIN
Comment[pt]=Confirmar o pedido de um dispositivo com PIN's correspondentes
Name[it]=Richiesta PIN
Name[kk]=PIN талабы
Name[km]=ស្នើ PIN
+Name[ko]=PIN 요청
Name[lt]=Prašyti PIN
Name[mr]=PIN ची विनंती करा
Name[nb]=Be om PIN
Comment[gl]=Necesítase un PIN.
Comment[hu]=PIN-kód szükséges
Comment[it]=Un PIN è richiesto
+Comment[ja]=PIN が必要です
Comment[kk]=PIN -коды керек
Comment[km]=ត្រូវការ PIN
+Comment[ko]=PIN이 필요함
Comment[lt]=Reikia PIN
Comment[mr]=PIN ची गरज आहे
Comment[nb]=En PIN kreves
Name[it]=File in arrivo
Name[kk]=Файлды қабылдау
Name[km]=ឯកសារចូល
+Name[ko]=파일 들어옴
Name[lt]=Atsiunčiamas failas
Name[mr]=आत येणारी फाईल
Name[nb]=Innkommende fil
Name[zh_CN]=正在传入的文件
Name[zh_TW]=要傳進來的檔案
Comment=Incoming file transfer
+Comment[bs]=Prijenos dolazne datoteke
Comment[ca]=Transferència de fitxer entrant
Comment[ca@valencia]=Transferència de fitxer entrant
Comment[cs]=Příchozí přenos souboru
Comment[da]=Indkommende filoverførsel
Comment[de]=Eingehende Dateiübertragung
Comment[el]=Μεταφορά εισερχόμενου αρχείου
+Comment[en_GB]=Incoming file transfer
Comment[es]=Transferencia de archivo entrante
+Comment[et]=Sisenev failiedastus
Comment[fi]=Saapuva tiedostonsiirto
Comment[fr]=Transfert de fichier entrant
Comment[gl]=Transferencia de ficheiros entrante
Comment[hu]=Bejövő fájlátvitel
Comment[it]=Trasferimento di file in arrivo
Comment[kk]=Кіріс файл тасымалы
+Comment[ko]=들어오는 파일 전송 요청
Comment[lt]=Gaunamo failo perdavimas
Comment[mr]=आत येणारी फाईल बदली
Comment[nb]=Innkommende filoverføring
+Comment[nds]=Ankamen Dateiöverdregen
Comment[nl]=Inkomende bestandsoverdracht
Comment[pa]=ਆ ਰਹੀ ਫਾਇਲ ਟਰਾਂਸਫਰ
Comment[pl]=Przychodzące przesyłanie pliku
kde4_add_executable(bluedevil-authorize ${authorize_SRCS})
target_link_libraries(bluedevil-authorize
- ${KDE4_KIO_LIBRARY} ${KDE4_KDEUI_LIBS} bluedevil)
+ ${KDE4_KIO_LIBRARY} ${KDE4_KDEUI_LIBS} ${LibBlueDevil_LIBRARIES})
install(TARGETS bluedevil-authorize
DESTINATION ${LIBEXEC_INSTALL_DIR})
<rect>
<x>0</x>
<y>0</y>
- <width>273</width>
- <height>95</height>
+ <width>259</width>
+ <height>113</height>
</rect>
</property>
- <widget class="QWidget" name="gridLayoutWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>271</width>
- <height>91</height>
- </rect>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QLabel" name="pixmap">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="1" column="0">
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>PIN:</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="1" column="1">
- <widget class="KLineEdit" name="pin">
- <property name="inputMask">
- <string notr="true">99999999; </string>
- </property>
- <property name="maxLength">
- <number>8</number>
- </property>
- <property name="urlDropsEnabled">
- <bool>false</bool>
- </property>
- <property name="trapEnterKeyEvent" stdset="0">
- <bool>true</bool>
- </property>
- <property name="clickMessage">
- <string extracomment="Introduce PIN"/>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="descLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string notr="true"/>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="pixmap">
+ <property name="minimumSize">
+ <size>
+ <width>64</width>
+ <height>64</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="descLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string notr="true"/>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>PIN:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="KLineEdit" name="pin">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="inputMask">
+ <string notr="true"/>
+ </property>
+ <property name="maxLength">
+ <number>32767</number>
+ </property>
+ <property name="placeholderText">
+ <string>1234</string>
+ </property>
+ <property name="urlDropsEnabled">
+ <bool>false</bool>
+ </property>
+ <property name="trapEnterKeyEvent" stdset="0">
+ <bool>true</bool>
+ </property>
+ <property name="clickMessage">
+ <string extracomment="Introduce PIN"/>
+ </property>
+ </widget>
+ </item>
+ </layout>
</widget>
<customwidgets>
<customwidget>
#include <QtCore/QDebug>
#include <QtCore/QCoreApplication>
#include <QtCore/QTimer>
+#include <QValidator>
+#include <QRegExpValidator>
+#include <QRegExp>
#include <KIcon>
#include <knotification.h>
connect(m_notification, SIGNAL(ignored()), this, SLOT(quit()));
//We're using persistent notifications so we have to use our own timeout (10s)
- QTimer::singleShot(10000, m_notification, SLOT(close()));
+ m_timer.setSingleShot(true);
+ m_timer.setInterval(10000);
+ m_timer.start();
+ connect(&m_timer, SIGNAL(timeout()), m_notification, SLOT(close()));
+
m_notification->setPixmap(KIcon("preferences-system-bluetooth").pixmap(42,42));
m_notification->sendEvent();
}
void RequestPin::introducePin()
{
- disconnect(m_notification, SIGNAL(closed()), this, SLOT(quit()));
- disconnect(m_notification, SIGNAL(ignored()), this, SLOT(quit()));
+ m_timer.stop();
+ m_notification->disconnect();
+ m_notification->close();
+ m_notification->deleteLater();
KIcon icon("preferences-system-bluetooth");
);
dialogWidget->pixmap->setPixmap(icon.pixmap(64,64));
- KDialog *dialog = new KDialog();
- dialog->setMainWidget(mainWidget);
-
- dialog->setCaption(i18nc(
+ m_dialog = new KDialog();
+ m_dialog->setMainWidget(mainWidget);
+ m_dialog->setCaption(i18nc(
"Shown in the caption of a dialog where the user introduce the PIN",
"Introduce PIN"
));
- QObject::connect(dialogWidget->pin, SIGNAL(returnPressed()),
- dialog, SLOT(accept()));
+ connect(dialogWidget->pin, SIGNAL(textChanged(QString)), SLOT(checkPin(QString)));
+ connect(dialogWidget->pin, SIGNAL(returnPressed()),
+ m_dialog, SLOT(accept()));
- dialog->setButtons(KDialog::Ok | KDialog::Cancel);
- dialog->setMinimumWidth(300);
- dialog->setMinimumHeight(150);
- dialog->setMaximumWidth(300);
- dialog->setMaximumHeight(150);
+ m_dialog->setButtons(KDialog::Ok | KDialog::Cancel);
dialogWidget->pin->setFocus(Qt::ActiveWindowFocusReason);
+ qDebug() << qApp->arguments();
+ if (qApp->arguments().count() > 2 && qApp->arguments()[2] == QLatin1String("numeric")) {
+ dialogWidget->pin->setValidator(new QRegExpValidator(QRegExp("[0-9]{1,6}"), this ));
+ } else {
+ dialogWidget->pin->setValidator(new QRegExpValidator(QRegExp("[A-Za-z0-9]{1,16}"), this ));
+ }
- if (dialog->exec()) {
- cout << dialogWidget->pin->text().toLatin1().data();
+ m_dialog->enableButtonOk(false);
+ m_dialog->setMinimumSize(m_dialog->sizeHint());
+ m_dialog->setMaximumSize(m_dialog->sizeHint());
+ if (m_dialog->exec()) {
+ cout << dialogWidget->pin->text().toLatin1().constData();
flush(cout);
qApp->exit(0);
return;
}
- delete dialog;
+ delete m_dialog;
qApp->exit(1);
}
+void RequestPin::checkPin(const QString& pin)
+{
+ m_dialog->enableButtonOk(!pin.isEmpty());
+}
+
void RequestPin::quit()
{
qApp->exit(1);
#define REQUESTPIN_H
#include <QtCore/QObject>
+#include <QTimer>
+
+class KDialog;
class KNotification;
/**
* If the notification is ignored or closed, then we have to quit the helper
*/
void quit();
+ void checkPin(const QString &pin);
private:
+ QTimer m_timer;
+ KDialog *m_dialog;
KNotification *m_notification;
};
#endif //REQUESTPIN_H
QList <DeviceInfo> m_discovered;
QTimer m_timer;
KComponentData m_componentData;
+ QHash<QString, bool> m_adapterPoweredHash;
};
BlueDevilDaemon::BlueDevilDaemon(QObject *parent, const QList<QVariant>&)
connect(Manager::self(), SIGNAL(usableAdapterChanged(Adapter*)),
this, SLOT(usableAdapterChanged(Adapter*)));
- connect(Manager::self()->usableAdapter(), SIGNAL(deviceFound(Device*)), this, SLOT(deviceFound(Device*)));
- connect(&d->m_timer, SIGNAL(timeout()), Manager::self()->usableAdapter(), SLOT(stopDiscovery()));
+ // Catch suspend/resume events
+ QDBusConnection::systemBus().connect("org.freedesktop.login1",
+ "/org/freedesktop/login1",
+ "org.freedesktop.login1.Manager",
+ "PrepareForSleep",
+ this,
+ SLOT(login1PrepareForSleep(bool))
+ );
d->m_status = Private::Offline;
- if (Manager::self()->usableAdapter()) {
- onlineMode();
+ usableAdapterChanged(Manager::self()->usableAdapter());
+
+ if (!Manager::self()->adapters().isEmpty()) {
+ executeMonolithic();
}
}
delete d;
}
+static Adapter *adapterForAddress(const QString &address)
+{
+ Q_FOREACH (Adapter *adapter, Manager::self()->adapters()) {
+ if (adapter->address() == address) {
+ return adapter;
+ }
+ }
+ return 0;
+}
+
+void BlueDevilDaemon::login1PrepareForSleep(bool active)
+{
+ if (active) {
+ kDebug(dblue()) << "About to suspend";
+ d->m_adapterPoweredHash.clear();
+ Q_FOREACH (Adapter *adapter, Manager::self()->adapters()) {
+ kDebug(dblue()) << "Saving" << adapter->address() << adapter->isPowered();
+ d->m_adapterPoweredHash.insert(adapter->address(), adapter->isPowered());
+ }
+ } else {
+ kDebug(dblue()) << "About to resume";
+ QHashIterator<QString, bool> it(d->m_adapterPoweredHash);
+ while (it.hasNext()) {
+ it.next();
+ Adapter *adapter = adapterForAddress(it.key());
+ if (adapter) {
+ kDebug(dblue()) << "Restoring" << adapter->address() << it.value();
+ adapter->setPowered(it.value());
+ }
+ }
+ d->m_adapterPoweredHash.clear();
+ }
+}
+
bool BlueDevilDaemon::isOnline()
{
if (d->m_status == Private::Offline) {
d->m_bluezAgent = new BluezAgent(new QObject());
connect(d->m_bluezAgent, SIGNAL(agentReleased()), this, SLOT(agentReleased()));
- d->m_adapter = Manager::self()->usableAdapter();
+ connect(d->m_adapter, SIGNAL(deviceFound(Device*)), this, SLOT(deviceFound(Device*)));
+ connect(&d->m_timer, SIGNAL(timeout()), d->m_adapter, SLOT(stopDiscovery()));
FileReceiverSettings::self()->readConfig();
if (!d->m_fileReceiver && FileReceiverSettings::self()->enabled()) {
d->m_placesModel->removePlace(index);
}
- killMonolithic();
+ if (BlueDevil::Manager::self()->adapters().isEmpty()) {
+ killMonolithic();
+ }
d->m_status = Private::Offline;
}
return info;
}
-extern int dblue() { static int s_area = KDebug::registerArea("BlueDaemon", false); return s_area; }
\ No newline at end of file
+extern int dblue() { static int s_area = KDebug::registerArea("BlueDaemon", false); return s_area; }
*/
void agentReleased();
+ void login1PrepareForSleep(bool active);
+
void deviceFound(Device*);
void monolithicQuit(QDBusPendingCallWatcher* watcher);
void monolithicFinished(const QString &);
${KDE4_KDECORE_LIBS}
${KDE4_KDEUI_LIBS}
${KDE4_KFILE_LIBS}
- bluedevil
+ ${LibBlueDevil_LIBRARIES}
)
install(TARGETS kded_bluedevil DESTINATION ${PLUGIN_INSTALL_DIR})
X-KDE-Kded-phase=1
Name=Bluetooth
+Name[bs]=Bluetooth
Name[ca]=Bluetooth
Name[ca@valencia]=Bluetooth
Name[cs]=Bluetooth
Name[da]=Bluetooth
Name[de]=Bluetooth
Name[el]=Bluetooth
+Name[en_GB]=Bluetooth
Name[es]=Bluetooth
+Name[et]=Bluetooth
Name[fi]=Bluetooth
Name[fr]=Bluetooth
Name[gl]=Bluetooth
Name[hu]=Bluetooth
Name[it]=Bluetooth
+Name[ja]=Bluetooth
Name[kk]=Bluetooth
+Name[ko]=블루투스
Name[lt]=Bluetooth
Name[mr]=ब्लूटूथ
Name[nb]=Blåtann
+Name[nds]=Bluetooth
Name[nl]=Bluetooth
Name[pa]=ਬਲਿਊਟੁੱਥ
Name[pl]=Bluetooth
Name[zh_TW]=藍牙
Comment=Handles Bluetooth events
+Comment[bs]=Obrađuje Bluetooth događaje
Comment[ca]=Gestiona els esdeveniments del Bluetooth
Comment[ca@valencia]=Gestiona els esdeveniments del Bluetooth
Comment[cs]=Ovládá události Bluetooth
Comment[da]=Håndterer Bluetooth-hændelser
Comment[de]=Verarbeitung von Bluetooth-Ereignissen
Comment[el]=Χειρίζεται γεγονότα Bluetooth
+Comment[en_GB]=Handles Bluetooth events
Comment[es]=Maneja eventos de Bluetooth
+Comment[et]=Bluetoothi sündmuste käitlemine
Comment[fi]=Käsittelee Bluetooth-tapahtumia
Comment[fr]=Gère les évènements Bluetooth
Comment[gl]=Xestiona acontecementos de Bluetooth
Comment[hu]=Kezeli a Bluetooth eseményeket
Comment[it]=Gestisce eventi Bluetooth
Comment[kk]=Bluetooth оқиғаларын өңдеу
+Comment[ko]=블루투스 이벤트 처리
Comment[lt]=Valdo Bluetooth įvykius
Comment[mr]=ब्लूटूथ घटना हाताळतो
Comment[nb]=Håndterer Blåtann-hendelser
+Comment[nds]=Verarbeidt Bluetooth-Begeefnissen
Comment[nl]=Behandelt bluetooth-gebeurtenissen
Comment[pa]=ਬਲਿਊਟੁੱਥ ਘਟਨਾਵਾਂ ਕੰਟਰੋਲ ਕਰਨ ਲਈ
-Comment[pl]=Obsługuje zdarzenia Bluetooth
+Comment[pl]=Obsługa zdarzeń Bluetooth
Comment[pt]=Lida com os eventos de Bluetooth
Comment[pt_BR]=Lida com os eventos de Bluetooth
Comment[ro]=Manipulează evenimente Bluetooth
return;
}
- BlueDevil::Manager::self()->registerAgent(AGENT_PATH,BlueDevil::Manager::DisplayYesNo);
+ BlueDevil::Manager::self()->registerAgent(AGENT_PATH, BlueDevil::Manager::DisplayYesNo);
BlueDevil::Manager::self()->requestDefaultAgent(AGENT_PATH);
m_process = new QProcess(this);
m_msg.setDelayedReply(true);
QStringList list(deviceName(device.path()));
+ list << QLatin1String("numeric");
+
connect(m_process, SIGNAL(finished(int)), this, SLOT(processClosedPasskey(int)));
m_process->start(KStandardDirs::findExe("bluedevil-requestpin"), list);
#include "filereceiver.h"
#include "../BlueDevilDaemon.h"
#include "obexagent.h"
-#include "obex_agent_manager.h"
#include <QDBusConnection>
#include <QDBusPendingCall>
#include <QDBusPendingCallWatcher>
+#include <QDBusServiceWatcher>
#include <KDebug>
-FileReceiver::FileReceiver(const KComponentData& componentData, QObject* parent) : QObject(parent)
+FileReceiver::FileReceiver(const KComponentData& componentData, QObject* parent)
+ : QObject(parent)
+ , m_agentManager(0)
{
kDebug(dblue());
qDBusRegisterMetaType<QVariantMap>();
new ObexAgent(componentData, this);
- org::bluez::obex::AgentManager1 *agent = new org::bluez::obex::AgentManager1("org.bluez.obex", "/org/bluez/obex", QDBusConnection::sessionBus(), this);
+ m_agentManager = new org::bluez::obex::AgentManager1("org.bluez.obex", "/org/bluez/obex", QDBusConnection::sessionBus(), this);
+ registerAgent();
- QDBusPendingReply <void > r = agent->RegisterAgent(QDBusObjectPath("/BlueDevil_receiveAgent"));
- QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(r, this);
- connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), SLOT(agentRegistered(QDBusPendingCallWatcher*)));
+ // obexd should be set to auto-start by D-Bus (D-Bus activation), so this should restart it in case of crash
+ QDBusServiceWatcher *serviceWatcher = new QDBusServiceWatcher("org.bluez.obex", QDBusConnection::sessionBus(),
+ QDBusServiceWatcher::WatchForUnregistration, this);
+ connect(serviceWatcher, SIGNAL(serviceUnregistered(QString)), this, SLOT(registerAgent()));
}
FileReceiver::~FileReceiver()
}
+void FileReceiver::registerAgent()
+{
+ QDBusPendingReply <void > r = m_agentManager->RegisterAgent(QDBusObjectPath("/BlueDevil_receiveAgent"));
+ QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(r, this);
+ connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), SLOT(agentRegistered(QDBusPendingCallWatcher*)));
+}
+
void FileReceiver::agentRegistered(QDBusPendingCallWatcher* call)
{
QDBusPendingReply <void > r = *call;
}
call->deleteLater();
-}
\ No newline at end of file
+}
#include <QObject>
#include <KComponentData>
+#include "obex_agent_manager.h"
+
class QDBusPendingCallWatcher;
class FileReceiver : public QObject
{
virtual ~FileReceiver();
private Q_SLOTS:
+ void registerAgent();
void agentRegistered(QDBusPendingCallWatcher* call);
+
+ private:
+ org::bluez::obex::AgentManager1 *m_agentManager;
};
-#endif //FILE_RECEIVER_H
\ No newline at end of file
+#endif //FILE_RECEIVER_H
KIO::getJobTracker()->registerJob(this);
KGlobal::setActiveComponent(data);
+ m_originalFileName = m_transfer->name();
m_tempPath = createTempPath(m_transfer->name());
kDebug(dblue()) << m_tempPath;
QDBusMessage msg = m_msg.createReply(m_tempPath);
FileReceiverSettings::self()->readConfig();
KUrl savePath = FileReceiverSettings::self()->saveUrl();
- savePath.setFileName(m_transfer->name());
+ savePath.addPath(m_originalFileName);
if (status == QLatin1String("active")) {
emit description(this, i18n("Receiving file over Bluetooth"),
QString ReceiveFileJob::createTempPath(const QString &fileName) const
{
- QString xdgCacheHome = QLatin1String(qgetenv("XDG_CACHE_HOME"));
+ QString xdgCacheHome = QFile::decodeName(qgetenv("XDG_CACHE_HOME"));
if (xdgCacheHome.isEmpty()) {
xdgCacheHome = QDir::homePath() + QLatin1String("/.cache");
}
}
return path;
-}
\ No newline at end of file
+}
qulonglong m_speedBytes;
QString m_path;
QString m_tempPath;
+ QString m_originalFileName;
QString m_deviceName;
QDBusMessage m_msg;
KComponentData m_componentData;
kde4_add_plugin(bluetoothfiletiemaction sendfileitemaction.cpp)
-target_link_libraries(bluetoothfiletiemaction ${KDE4_KIO_LIBS} bluedevil)
+target_link_libraries(bluetoothfiletiemaction ${KDE4_KIO_LIBS} ${LibBlueDevil_LIBRARIES})
install(TARGETS bluetoothfiletiemaction DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES bluedevilsendfile.desktop DESTINATION ${SERVICES_INSTALL_DIR})
\ No newline at end of file
Name[da]=Send fil via Bluetooth
Name[de]=Datei über Bluetooth versenden
Name[el]=Αποστολή αρχείου μέσω Bluetooth
+Name[en_GB]=Send file via Bluetooth
Name[es]=Enviar archivo por Bluetooth
Name[et]=Faili saatmine Bluetoothi kaudu
Name[fi]=Lähetä tiedosto Bluetoothin kautta
Name[gl]=Enviar o ficheiro por Bluetooth
Name[hu]=Fájl küldése Bluetoothon
Name[it]=Invia file via Bluetooth
+Name[ja]=Bluetooth を通してファイルを送信
Name[kk]=Bluetooth арқылы файлды жіберу
Name[km]=ផ្ញើឯកសារតាមប៊្លូធូស
+Name[ko]=블루투스로 파일 보내기
Name[lt]=Siųsti per Bluetooth
Name[mr]=ब्लूटूथ द्वारे फाईल पाठवा
Name[nb]=Send fil over Blåtann
X-KDE-Submenu[da]=Bluetooth
X-KDE-Submenu[de]=Bluetooth
X-KDE-Submenu[el]=Bluetooth
+X-KDE-Submenu[en_GB]=Bluetooth
X-KDE-Submenu[es]=Bluetooth
X-KDE-Submenu[et]=Bluetooth
X-KDE-Submenu[fi]=Bluetooth
X-KDE-Submenu[gl]=Bluetooth
X-KDE-Submenu[hu]=Bluetooth
X-KDE-Submenu[it]=Bluetooth
+X-KDE-Submenu[ja]=Bluetooth
X-KDE-Submenu[kk]=Bluetooth
X-KDE-Submenu[km]=ប៊្លូធូស
+X-KDE-Submenu[ko]=블루투스
X-KDE-Submenu[lt]=Bluetooth
X-KDE-Submenu[mr]=ब्लूटूथ
X-KDE-Submenu[nb]=Blåtann
bluedeviltransfer.cpp
systemcheck.cpp
kded.cpp
- columnresizer.cpp
- sharedfilesdialog/sharedfilesdialog.cpp
- sharedfilesdialog/linkproxymodel.cpp
)
-kde4_add_ui_files(kcm_bluedeviltransfer_PART_SRCS_UI transfer.ui sharedfilesdialog/sharedfiles.ui)
+kde4_add_ui_files(kcm_bluedeviltransfer_PART_SRCS_UI transfer.ui)
kde4_add_kcfg_files(kcm_bluedeviltransfer_PART_SRCS
../settings/filereceiversettings.kcfgc
${kcm_bluedeviladapters}
${kcm_bluedeviltransfer})
-target_link_libraries(kcm_bluedevildevices ${KDE4_KIO_LIBS} ${QT_QTGUI_LIBRARY} bluedevil)
-target_link_libraries(kcm_bluedeviladapters ${KDE4_KIO_LIBS} ${QT_QTGUI_LIBRARY} bluedevil)
-target_link_libraries(kcm_bluedeviltransfer ${KDE4_KIO_LIBS} ${QT_QTGUI_LIBRARY} bluedevil)
+target_link_libraries(kcm_bluedevildevices ${KDE4_KIO_LIBS} ${QT_QTGUI_LIBRARY} ${LibBlueDevil_LIBRARIES})
+target_link_libraries(kcm_bluedeviladapters ${KDE4_KIO_LIBS} ${QT_QTGUI_LIBRARY} ${LibBlueDevil_LIBRARIES})
+target_link_libraries(kcm_bluedeviltransfer ${KDE4_KIO_LIBS} ${QT_QTGUI_LIBRARY} ${LibBlueDevil_LIBRARIES})
install(TARGETS kcm_bluedevildevices
kcm_bluedeviladapters
buttonGroup->addButton(m_alwaysVisible);
buttonGroup->addButton(m_temporaryVisible);
- m_name->setText(adapter->name());
- m_nameOrig = adapter->name();
+ m_name->setText(adapter->alias());
+ m_nameOrig = adapter->alias();
m_hiddenOrig = false;
m_alwaysVisibleOrig = false;
m_temporaryVisibleOrig = false;
connect(m_powered, SIGNAL(stateChanged(int)), this, SLOT(slotSettingsChanged()));
if (BlueDevil::Manager::self()->usableAdapter() == adapter) {
- setTitle(i18n("Default adapter: %1 (%2)", adapter->name(), adapter->address()));
+ setTitle(i18n("Default adapter: %1 (%2)", adapter->alias(), adapter->address()));
} else {
- setTitle(i18n("Adapter: %1 (%2)", adapter->name(), adapter->address()));
+ setTitle(i18n("Adapter: %1 (%2)", adapter->alias(), adapter->address()));
}
}
m_temporaryVisible->isChecked() != m_temporaryVisibleOrig ||
m_discoverTime->value() != m_discoverTimeOrig || m_powered->isChecked() != m_poweredOrig;
}
-
+#include <QDebug>
void AdapterSettings::applyChanges()
{
- /* TODO: Find new way to set adapter name in bluez5
- if (m_name->text() != m_nameOrig) {
- m_adapter->setName(m_name->text());
- } */
+ if (m_name->text() != m_nameOrig) {
+ qDebug() << "Setting alias";
+ m_adapter->setAlias(m_name->text());
+ }
if (m_hidden->isChecked()) {
m_adapter->setDiscoverable(false);
{
blockSignals(true);
- m_nameOrig = m_adapter->name();
+ m_nameOrig = m_adapter->alias();
m_hiddenOrig = !m_adapter->isDiscoverable();
m_alwaysVisibleOrig = m_adapter->isDiscoverable() && !m_adapter->discoverableTimeout();
m_temporaryVisibleOrig = m_adapter->isDiscoverable() && m_adapter->discoverableTimeout();
m_discoverTimeLabel->setText(i18np("1 minute", "%1 minutes", m_discoverTime->value()));
if (BlueDevil::Manager::self()->usableAdapter() == m_adapter) {
- setTitle(i18n("Default adapter: %1 (%2)", m_adapter->name(), m_adapter->address()));
+ setTitle(i18n("Default adapter: %1 (%2)", m_adapter->alias(), m_adapter->address()));
} else {
- setTitle(i18n("Adapter: %1 (%2)", m_adapter->name(), m_adapter->address()));
+ setTitle(i18n("Adapter: %1 (%2)", m_adapter->alias(), m_adapter->address()));
}
blockSignals(false);
Name[gl]=Adaptadores
Name[hu]=Adapterek
Name[it]=Adattatori
+Name[ja]=アダプタ
Name[kk]=Адаптерлері
Name[km]=អាដាប់ទ័រ
+Name[ko]=어댑터
Name[lt]=Adapteriai
Name[mr]=एडाप्टर्स
Name[nb]=Adaptere
-Name[nds]=Koorten
+Name[nds]=Adaptern
Name[nl]=Adapters
Name[pa]=ਐਡਪਟਰ
Name[pl]=Adaptery
Name[zh_TW]=轉接器
Comment=Configure Bluetooth adapters
+Comment[bs]=Konfigurisanje Blutut adaptera
Comment[ca]=Configura els adaptadors Bluetooth
Comment[ca@valencia]=Configura els adaptadors Bluetooth
Comment[cs]=Nastavte adaptéry Bluetooth
Comment[da]=Indstil Bluetooth-adaptere
Comment[de]=Bluetooth-Adapter einrichten
Comment[el]=Διαμόρφωση προσαρμογέων Bluetooth
+Comment[en_GB]=Configure Bluetooth adapters
Comment[es]=Configurar adaptadores Bluetooth
+Comment[et]=Bluetoothi adapterite seadistamine
Comment[fi]=Bluetooth-sovittimien asetukset
Comment[fr]=Configure les adaptateurs Bluetooth
Comment[gl]=Configurar os adaptadores de Bluetooth
Comment[hu]=Bluetooth adapterek beállítása
Comment[it]=Configura gli adattatori Bluetooth
Comment[kk]=Bluetooth адаптерлерін баптау
+Comment[ko]=블루투스 어댑터 설정
Comment[lt]=Konfigūruoti prieinamus Bluetooth adapterius
Comment[mr]=ब्लूटूथ एडाप्टर्स संयोजीत करा
Comment[nb]=Sett opp Blåtann-adaptere
+Comment[nds]=Bluetooth-Adaptern instellen
Comment[nl]=Bluetooth-adapters instellen
Comment[pa]=ਬਲਿਊਟੁੱਥ ਐਡਪਟਰ ਸੰਰਚਨਾ
-Comment[pl]=Konfiguruj adaptery Bluetooth
+Comment[pl]=Ustawienia adapterów Bluetooth
Comment[pt]=Configurar os adaptadores de Bluetooth
Comment[pt_BR]=Configura os adaptadores Bluetooth
Comment[ro]=Configurează adaptoare Bluetooth
X-KDE-Keywords[da]=Netværk,forbindelse,Bluetooth
X-KDE-Keywords[de]=Netzwerk,Verbindungen,Bluetooth
X-KDE-Keywords[el]=Δίκτυο,Συνδεσιμότητα,Bluetooth
+X-KDE-Keywords[en_GB]=Network,Connectivity,Bluetooth
X-KDE-Keywords[es]=Red,Conectividad,Bluetooth
X-KDE-Keywords[et]=Võrk,Ühenduvus,Bluetooth
X-KDE-Keywords[fi]=Verkko,Yhteydet,Bluetooth
X-KDE-Keywords[it]=Rete,Connettività,Bluetooth
X-KDE-Keywords[kk]=Network,Connectivity,Bluetooth
X-KDE-Keywords[km]=បណ្ដាញ ការតភ្ជាប់ ប៊្លូធូស
+X-KDE-Keywords[ko]=Network,Connectivity,Bluetooth,네트워크,연결,블루투스
X-KDE-Keywords[lt]=Tinklas,Junglumas,Bluetooth
X-KDE-Keywords[mr]=संजाळ,जुळवणी,ब्लूटूथ
X-KDE-Keywords[nb]=Nettverk,sammenkobling,blåtann
X-KDE-Keywords[pa]=ਨੈੱਟਵਰਕ,ਕੁਨੈਕਟਵਿਟੀ,ਬਲਿਊਟੁੱਥ
X-KDE-Keywords[pl]=Sieć,Łączność,Bluetooth
X-KDE-Keywords[pt]=Rede,Conectividade,Bluetooth
-X-KDE-Keywords[pt_BR]=rede,conectividade,bluetooth
+X-KDE-Keywords[pt_BR]=Rede,Conectividade,Bluetooth
X-KDE-Keywords[ro]=Rețea,Conectivitate,Bluetooth
X-KDE-Keywords[ru]=Сеть,Соединение,Bluetooth
X-KDE-Keywords[sk]=Sieť,Konektivita,Bluetooth
#include <QtCore/QAbstractItemModel>
+#include <QtGui/QFontMetrics>
#include <QtGui/QLabel>
#include <QtGui/QPainter>
#include <QtGui/QCheckBox>
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
private:
+ const int smallIconSize;
QPixmap m_blockedPixmap;
QPixmap m_trustedPixmap;
QPixmap m_untrustedPixmap;
};
BluetoothDevicesDelegate::BluetoothDevicesDelegate(QObject *parent)
- : QStyledItemDelegate(parent)
+ : QStyledItemDelegate(parent),
+ smallIconSize(IconSize(KIconLoader::Toolbar))
{
KIcon blockedIcon("dialog-cancel");
- m_blockedPixmap = blockedIcon.pixmap(22, 22);
+ m_blockedPixmap = blockedIcon.pixmap(smallIconSize, smallIconSize);
KIcon trustedIcon("security-high");
- m_trustedPixmap = trustedIcon.pixmap(22, 22);
+ m_trustedPixmap = trustedIcon.pixmap(smallIconSize, smallIconSize);
KIcon untrustedIcon("security-low");
- m_untrustedPixmap = untrustedIcon.pixmap(22, 22);
+ m_untrustedPixmap = untrustedIcon.pixmap(smallIconSize, smallIconSize);
KIcon connectedIcon("user-online");
- m_connectedPixmap = connectedIcon.pixmap(22, 22);
+ m_connectedPixmap = connectedIcon.pixmap(smallIconSize, smallIconSize);
KIcon disconnectedIcon("user-offline");
- m_disconnectedPixmap = disconnectedIcon.pixmap(22, 22);
+ m_disconnectedPixmap = disconnectedIcon.pixmap(smallIconSize, smallIconSize);
}
BluetoothDevicesDelegate::~BluetoothDevicesDelegate()
painter->setPen(option.palette.highlightedText().color());
}
+ QRect r = option.rect;
+
// Draw icon
const QModelIndex iconIndex = index.model()->index(index.row(), 0);
const QPixmap icon = iconIndex.data(BluetoothDevicesModel::IconModelRole).value<QPixmap>();
- painter->drawPixmap(option.rect.left() + 5, option.rect.top() + 5, icon);
+ painter->drawPixmap(r.left() + 5, r.top() + (r.height() - icon.height()) / 2, icon);
// Draw alias and device type
const QModelIndex idx = index.model()->index(index.row(), 0);
- QRect r = option.rect;
- r.setTop(r.top() + 10);
- r.setBottom(r.bottom() - 10);
- r.setLeft(r.left() + KIconLoader::SizeLarge + 10);
+ r.setTop(r.top() + smallIconSize / 2);
+ r.setBottom(r.bottom() - smallIconSize / 2);
+ r.setLeft(r.left() + IconSize(KIconLoader::Dialog) * 1.8);
QFont f = kapp->font();
f.setBold(true);
painter->save();
Device *const device = static_cast<Device*>(index.data(BluetoothDevicesModel::DeviceModelRole).value<void*>());
r = option.rect;
- r.setTop(r.top() + r.height() / 2 - 11);
- r.setLeft(r.right() - 5 - 22);
- r.setSize(QSize(22, 22));
+ r.setTop(r.top() + r.height() / 2 - smallIconSize / 2);
+ r.setLeft(r.right() - 5 - smallIconSize);
+ r.setSize(QSize(smallIconSize, smallIconSize));
if (!device->isBlocked()) {
if (device->isConnected()) {
painter->drawPixmap(r, m_disconnectedPixmap);
}
- r.setLeft(r.right() - 5 - 22 - 22);
- r.setSize(QSize(22, 22));
+ r.setLeft(r.right() - 5 - smallIconSize * 2);
+ r.setSize(QSize(smallIconSize, smallIconSize));
if (device->isTrusted()) {
painter->drawPixmap(r, m_trustedPixmap);
QSize BluetoothDevicesDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
{
- const QSize res = QStyledItemDelegate::sizeHint(option, index);
- return QSize(res.width(), KIconLoader::SizeLarge + 10);
+ const int width = QStyledItemDelegate::sizeHint(option, index).width();
+ const int height = qMax( QFontMetrics(kapp->font()).height() * 2 + QFontMetrics(kapp->font()).xHeight(), (int)(IconSize(KIconLoader::Dialog) * 1.5)) + 10;
+ return QSize(width, height);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
if (adapter) {
connect(adapter, SIGNAL(discoverableChanged(bool)),
this, SLOT(adapterDiscoverableChanged()));
- connect(adapter, SIGNAL(devicesChanged(QList<Device*>)),
+ connect(adapter, SIGNAL(deviceChanged(Device*)),
+ this, SLOT(adapterDevicesChanged()));
+ connect(adapter, SIGNAL(deviceRemoved(Device*)),
+ this, SLOT(adapterDevicesChanged()));
+ connect(adapter, SIGNAL(deviceFound(Device*)),
this, SLOT(adapterDevicesChanged()));
}
fillRemoteDevicesModelInformation();
m_devices->setViewport(viewport);
}
m_devicesModel->insertRows(0, deviceList.count());
+ const QSize iconSize = QSize(IconSize(KIconLoader::Dialog) * 1.5, IconSize(KIconLoader::Dialog) * 1.5);
int i = 0;
Q_FOREACH (Device *const device, deviceList) {
QModelIndex index = m_devicesModel->index(i, 0);
- m_devicesModel->setData(index, KIcon(device->icon()).pixmap(48, 48), BluetoothDevicesModel::IconModelRole);
+ m_devicesModel->setData(index, KIcon(device->icon()).pixmap(iconSize), BluetoothDevicesModel::IconModelRole);
QString deviceType;
const quint32 type = BlueDevil::classToType(device->deviceClass());
switch (type) {
Name[gl]=Dispositivos
Name[hu]=Eszközök
Name[it]=Dispositivi
+Name[ja]=デバイス
Name[kk]=Құрылғылар
Name[km]=ឧបករណ៍
+Name[ko]=장치
Name[lt]=Įrenginiai
Name[mai]=डिवाइस
Name[mr]=साधने
Name[zh_TW]=裝置
Comment=Manage Bluetooth devices
+Comment[bs]=Upravljanje Blutut uređaje
Comment[ca]=Gestiona els dispositius Bluetooth
Comment[ca@valencia]=Gestiona els dispositius Bluetooth
Comment[cs]=Spravovat zařízení Bluetooth
Comment[da]=Håndtér Bluetooth-enheder
Comment[de]=Bluetooth-Geräte verwalten
Comment[el]=Διαχείριση συσκευών Bluetooth
+Comment[en_GB]=Manage Bluetooth devices
Comment[es]=Gestión de dispositivos Bluetooth
+Comment[et]=Bluetoothi seadmete haldamine
Comment[fi]=Bluetooth-laitteiden asetukset
Comment[fr]=Gère les périphériques Bluetooth
Comment[gl]=Xestionar os dispositivos Bluetooth
Comment[hu]=Bluetooth eszközök kezelése
Comment[it]=Gestisci i dispositivi Bluetooth
+Comment[ja]=Bluetooth デバイスを管理
Comment[kk]=Bluetooth құрылығыларын басқару
+Comment[ko]=블루투스 장치 관리
Comment[lt]=Konfigūruoti Bluetooth failų gavimą
Comment[mr]=ब्लूटूथ साधने व्यवस्थापीत करा
Comment[nb]=Håndter Blåtann-enheter
+Comment[nds]=Bluetooth-Reedschappen plegen
Comment[nl]=Bluetooth-apparaten beheren
Comment[pa]=ਬਲਿਊਟੁੱਥ ਜੰਤਰ ਪਰਬੰਧ
Comment[pl]=Zarządzaj urządzeniami Bluetooth
X-KDE-Keywords[da]=Netværk,forbindelse,Bluetooth
X-KDE-Keywords[de]=Netzwerk,Verbindungen,Bluetooth
X-KDE-Keywords[el]=Δίκτυο,Συνδεσιμότητα,Bluetooth
+X-KDE-Keywords[en_GB]=Network,Connectivity,Bluetooth
X-KDE-Keywords[es]=Red,Conectividad,Bluetooth
X-KDE-Keywords[et]=Võrk,Ühenduvus,Bluetooth
X-KDE-Keywords[fi]=Verkko,Yhteydet,Bluetooth
X-KDE-Keywords[it]=Rete,Connettività,Bluetooth
X-KDE-Keywords[kk]=Network,Connectivity,Bluetooth
X-KDE-Keywords[km]=បណ្ដាញ ការតភ្ជាប់ ប៊្លូធូស
+X-KDE-Keywords[ko]=Network,Connectivity,Bluetooth,네트워크,연결,블루투스
X-KDE-Keywords[lt]=Tinklas,Junglumas,Bluetooth
X-KDE-Keywords[mr]=संजाळ,जुळवणी,ब्लूटूथ
X-KDE-Keywords[nb]=Nettverk,sammenkobling,blåtann
X-KDE-Keywords[pa]=ਨੈੱਟਵਰਕ,ਕੁਨੈਕਟਵਿਟੀ,ਬਲਿਊਟੁੱਥ
X-KDE-Keywords[pl]=Sieć,Łączność,Bluetooth
X-KDE-Keywords[pt]=Rede,Conectividade,Bluetooth
-X-KDE-Keywords[pt_BR]=rede,conectividade,bluetooth
+X-KDE-Keywords[pt_BR]=Rede,Conectividade,Bluetooth
X-KDE-Keywords[ro]=Rețea,Conectivitate,Bluetooth
X-KDE-Keywords[ru]=Сеть,Соединение,Bluetooth
X-KDE-Keywords[sk]=Sieť,Konektivita,Bluetooth
#include "bluedeviltransfer.h"
#include "systemcheck.h"
-#include "columnresizer.h"
#include "ui_transfer.h"
#include "filereceiversettings.h"
#include "bluedevil_service.h"
-#include "sharedfilesdialog/sharedfilesdialog.h"
#include <QtCore/QTimer>
m_uiTransfer->kcfg_autoAccept->addItem(i18nc("'Auto accept' option value", "Trusted devices"), QVariant(1));
m_uiTransfer->kcfg_autoAccept->addItem(i18nc("'Auto accept' option value", "All devices"), QVariant(2));
- m_uiTransfer->kcfg_requirePin->addItem(i18nc("'Require PIN' option value", "Never"), QVariant(false));
- m_uiTransfer->kcfg_requirePin->addItem(i18nc("'Require PIN' option value", "Always"), QVariant(true));
-
- m_uiTransfer->kcfg_allowWrite->addItem(i18nc("'Permissions' option value", "Read Only"), QVariant(false));
- m_uiTransfer->kcfg_allowWrite->addItem(i18nc("'Permissions' option value", "Modify and Read"), QVariant(true));
-
addConfig(FileReceiverSettings::self(), transfer);
- connect(m_uiTransfer->sharedFiles, SIGNAL(clicked(bool)), this, SLOT(showSharedFilesDialog()));
connect(BlueDevil::Manager::self(), SIGNAL(usableAdapterChanged(Adapter*)),
this, SLOT(usableAdapterChanged(Adapter*)));
updateInformationState();
-
- ColumnResizer *resizer = new ColumnResizer(this);
- resizer->addWidgetsFromFormLayout(m_uiTransfer->formLayout, QFormLayout::LabelRole);
- resizer->addWidgetsFromFormLayout(m_uiTransfer->formLayout_2, QFormLayout::LabelRole);
}
KCMBlueDevilTransfer::~KCMBlueDevilTransfer()
m_systemCheck->updateInformationState();
}
-void KCMBlueDevilTransfer::showSharedFilesDialog()
-{
- SharedFilesDialog *d = new SharedFilesDialog();
- d->exec();
-}
-
void KCMBlueDevilTransfer::changed(bool changed)
{
m_restartNeeded = changed;
Name[da]=Filoverførsler
Name[de]=Dateiübertragungen
Name[el]=Μεταφορές αρχείων
+Name[en_GB]=File Transfers
Name[es]=Transferencias de archivo
Name[et]=Failiedastused
Name[fi]=Tiedostonsiirto
Name[it]=Trasferimenti di file
Name[kk]=Файл тасымалдаулары
Name[km]=ផ្ទេរឯកសារ
+Name[ko]=파일 전송
Name[lt]=Failų perdavimai
Name[mr]=फाईल देवाणघेवाण
Name[nb]=Filoverføringer
Name[nds]=Dateiöverdregen
Name[nl]=Bestandsoverdrachten
Name[pa]=ਫਾਇਲ ਟਰਾਂਸਫਰ
-Name[pl]=Przesyłania plików
+Name[pl]=Przesyłanie plików
Name[pt]=Transferência de Ficheiros
Name[pt_BR]=Transferência de arquivos
Name[ro]=Transferuri de fișiere
Name[zh_TW]=檔案傳輸
Comment=Configure Bluetooth file sharing and transfers
+Comment[bs]=Konfiguriranje Blutut dijeljenje datoteka i prijenos
Comment[ca]=Configura la compartició i transferència de fitxers per Bluetooth
Comment[ca@valencia]=Configura la compartició i transferència de fitxers per Bluetooth
Comment[cs]=Nastavte sdílení souborů přes Bluetooth
Comment[da]=Indstil fildeling og -overførsler via Bluetooth
Comment[de]=Dateifreigaben und Dateiübertragung für Bluetooth einrichten
Comment[el]=Διαμόρφωση διαμοιρασμού και μεταφοράς αρχείων με Bluetooth
+Comment[en_GB]=Configure Bluetooth file sharing and transfers
Comment[es]=Configurar compartición y transferencias de archivos por Bluetooth
+Comment[et]=Bluetoothi failide jagamise ja edastamine seadistamine
Comment[fi]=Bluetooth-tiedostonjaon ja -siirron asetukset
Comment[fr]=Configure le partage et les transferts de fichiers par Bluetooth
Comment[gl]=Configurar a compartición e a transferencia de ficheiros por Bluetooth
Comment[hu]=Bluetooth fájlmegosztás és átvitelek beállítása
Comment[it]=Configura la condivisione e il trasferimento di file via Bluetooth
Comment[kk]=Bluetooth файл ортақтастыру және тасымалдауды баптау
+Comment[ko]=블루투스 파일 공유 및 전송 설정
Comment[lt]=Konfigūruoti Bluetooth failų gavimą
Comment[mr]=ब्लूटूथ फाईल शेअर करणे व बदली संयोजीत करा
Comment[nb]=Sett opp deling og overføring av filer over Blåtann
+Comment[nds]=Bluetooth - Överdregen un Delen vun Dateien instellen
Comment[nl]=Bestandsdeling en -overdracht via bluetooth instellen
Comment[pa]=ਬਲਿਊਟੁੱਥ ਫਾਇਲ ਸਾਂਝ ਤੇ ਟਰਾਂਸਫਰ ਸੰਰਚਨਾ
-Comment[pl]=Konfiguruj udostępnianie i przesyłanie plików przez Bluetooth
+Comment[pl]=Ustawienia udostępniania i przesyłanie plików przez Bluetooth
Comment[pt]=Configura a partilha e as transferências de ficheiros por Bluetooth
-Comment[pt_BR]=Configura o compartilhamento e as transferências de arquivos por Bluetooth
+Comment[pt_BR]=Configura o compartilhamento e a transferência de arquivos por Bluetooth
Comment[ro]=Configurează partajarea și transferul de fișiere Bluetooth
Comment[ru]=Настройка доступа и передачи файлов через Bluetooth
Comment[sk]=Nastaviť zdieľanie súborov a prenosy Bluetooth
X-KDE-Keywords[da]=Netværk,forbindelse,Bluetooth
X-KDE-Keywords[de]=Netzwerk,Verbindungen,Bluetooth
X-KDE-Keywords[el]=Δίκτυο,Συνδεσιμότητα,Bluetooth
+X-KDE-Keywords[en_GB]=Network,Connectivity,Bluetooth
X-KDE-Keywords[es]=Red,Conectividad,Bluetooth
X-KDE-Keywords[et]=Võrk,Ühenduvus,Bluetooth
X-KDE-Keywords[fi]=Verkko,Yhteydet,Bluetooth
X-KDE-Keywords[it]=Rete,Connettività,Bluetooth
X-KDE-Keywords[kk]=Network,Connectivity,Bluetooth
X-KDE-Keywords[km]=បណ្ដាញ ការតភ្ជាប់ ប៊្លូធូស
+X-KDE-Keywords[ko]=Network,Connectivity,Bluetooth,네트워크,연결,블루투스
X-KDE-Keywords[lt]=Tinklas,Junglumas,Bluetooth
X-KDE-Keywords[mr]=संजाळ,जुळवणी,ब्लूटूथ
X-KDE-Keywords[nb]=Nettverk,sammenkobling,blåtann
X-KDE-Keywords[pa]=ਨੈੱਟਵਰਕ,ਕੁਨੈਕਟਵਿਟੀ,ਬਲਿਊਟੁੱਥ
X-KDE-Keywords[pl]=Sieć,Łączność,Bluetooth
X-KDE-Keywords[pt]=Rede,Conectividade,Bluetooth
-X-KDE-Keywords[pt_BR]=rede,conectividade,bluetooth
+X-KDE-Keywords[pt_BR]=Rede,Conectividade,Bluetooth
X-KDE-Keywords[ro]=Rețea,Conectivitate,Bluetooth
X-KDE-Keywords[ru]=Сеть,Соединение,Bluetooth
X-KDE-Keywords[sk]=Sieť,Konektivita,Bluetooth
void usableAdapterChanged(Adapter *adapter);
void adapterDiscoverableChanged();
void updateInformationState();
- void showSharedFilesDialog();
void changed(bool);
private:
+++ /dev/null
-/*
- * Copyright 2011 Aurélien Gâteau <agateau@kde.org>
- * License: LGPL v2.1 or later (see COPYING)
- */
-#include <columnresizer.h>
-
-#include <QDebug>
-#include <QEvent>
-#include <QFormLayout>
-#include <QGridLayout>
-#include <QTimer>
-#include <QWidget>
-
-class FormLayoutWidgetItem : public QWidgetItem
-{
-public:
- FormLayoutWidgetItem(QWidget* widget, QFormLayout* formLayout, QFormLayout::ItemRole itemRole)
- : QWidgetItem(widget)
- , m_width(-1)
- , m_formLayout(formLayout)
- , m_itemRole(itemRole)
- {}
-
- QSize sizeHint() const
- {
- QSize size = QWidgetItem::sizeHint();
- if (m_width != -1) {
- size.setWidth(m_width);
- }
- return size;
- }
-
- QSize minimumSize() const
- {
- QSize size = QWidgetItem::minimumSize();
- if (m_width != -1) {
- size.setWidth(m_width);
- }
- return size;
- }
-
- QSize maximumSize() const
- {
- QSize size = QWidgetItem::maximumSize();
- if (m_width != -1) {
- size.setWidth(m_width);
- }
- return size;
- }
-
- void setWidth(int width)
- {
- if (width != m_width) {
- m_width = width;
- invalidate();
- }
- }
-
- void setGeometry(const QRect& _rect)
- {
- QRect rect = _rect;
- int width = widget()->sizeHint().width();
- if (m_itemRole == QFormLayout::LabelRole && m_formLayout->labelAlignment() & Qt::AlignRight) {
- rect.setLeft(rect.right() - width);
- }
- QWidgetItem::setGeometry(rect);
- }
-
- QFormLayout* formLayout() const
- {
- return m_formLayout;
- }
-
-private:
- int m_width;
- QFormLayout* m_formLayout;
- QFormLayout::ItemRole m_itemRole;
-};
-
-typedef QPair<QGridLayout*, int> GridColumnInfo;
-
-class ColumnResizerPrivate
-{
-public:
- ColumnResizerPrivate(ColumnResizer* q_ptr)
- : q(q_ptr)
- , m_updateTimer(new QTimer(q))
- {
- m_updateTimer->setSingleShot(true);
- m_updateTimer->setInterval(0);
- QObject::connect(m_updateTimer, SIGNAL(timeout()), q, SLOT(updateWidth()));
- }
-
- void scheduleWidthUpdate()
- {
- m_updateTimer->start();
- }
-
- ColumnResizer* q;
- QTimer* m_updateTimer;
- QList<QWidget*> m_widgets;
- QList<FormLayoutWidgetItem*> m_wrWidgetItemList;
- QList<GridColumnInfo> m_gridColumnInfoList;
-};
-
-ColumnResizer::ColumnResizer(QObject* parent)
-: QObject(parent)
-, d(new ColumnResizerPrivate(this))
-{}
-
-ColumnResizer::~ColumnResizer()
-{
- delete d;
-}
-
-void ColumnResizer::addWidget(QWidget* widget)
-{
- d->m_widgets.append(widget);
- widget->installEventFilter(this);
- d->scheduleWidthUpdate();
-}
-
-void ColumnResizer::updateWidth()
-{
- int width = 0;
- Q_FOREACH(QWidget* widget, d->m_widgets) {
- width = qMax(widget->sizeHint().width(), width);
- }
- Q_FOREACH(FormLayoutWidgetItem* item, d->m_wrWidgetItemList) {
- item->setWidth(width);
- item->formLayout()->update();
- }
- Q_FOREACH(GridColumnInfo info, d->m_gridColumnInfoList) {
- info.first->setColumnMinimumWidth(info.second, width);
- }
-}
-
-bool ColumnResizer::eventFilter(QObject*, QEvent* event)
-{
- if (event->type() == QEvent::Resize) {
- d->scheduleWidthUpdate();
- }
- return false;
-}
-
-void ColumnResizer::addWidgetsFromLayout(QLayout* layout, int column)
-{
- Q_ASSERT(column >= 0);
- QGridLayout* gridLayout = qobject_cast<QGridLayout*>(layout);
- QFormLayout* formLayout = qobject_cast<QFormLayout*>(layout);
- if (gridLayout) {
- addWidgetsFromGridLayout(gridLayout, column);
- } else if (formLayout) {
- if (column > QFormLayout::SpanningRole) {
- qCritical() << "column should not be more than" << QFormLayout::SpanningRole << "for QFormLayout";
- return;
- }
- QFormLayout::ItemRole role = static_cast<QFormLayout::ItemRole>(column);
- addWidgetsFromFormLayout(formLayout, role);
- } else {
- qCritical() << "Don't know how to handle layout" << layout;
- }
-}
-
-void ColumnResizer::addWidgetsFromGridLayout(QGridLayout* layout, int column)
-{
- for (int row = 0; row < layout->rowCount(); ++row) {
- QLayoutItem* item = layout->itemAtPosition(row, column);
- if (!item) {
- continue;
- }
- QWidget* widget = item->widget();
- if (!widget) {
- continue;
- }
- addWidget(widget);
- }
- d->m_gridColumnInfoList << GridColumnInfo(layout, column);
-}
-
-void ColumnResizer::addWidgetsFromFormLayout(QFormLayout* layout, QFormLayout::ItemRole role)
-{
- for (int row = 0; row < layout->rowCount(); ++row) {
- QLayoutItem* item = layout->itemAt(row, role);
- if (!item) {
- continue;
- }
- QWidget* widget = item->widget();
- if (!widget) {
- continue;
- }
- layout->removeItem(item);
- delete item;
- FormLayoutWidgetItem* newItem = new FormLayoutWidgetItem(widget, layout, role);
- layout->setItem(row, role, newItem);
- addWidget(widget);
- d->m_wrWidgetItemList << newItem;
- }
-}
-
-#include <columnresizer.moc>
-// vi: ts=4 sw=4 et
+++ /dev/null
-/*
- * Copyright 2011 Aurélien Gâteau <agateau@kde.org>
- * License: LGPL v2.1 or later (see COPYING)
- */
-#ifndef COLUMNRESIZER_H
-#define COLUMNRESIZER_H
-
-#include <QtGui/QFormLayout>
-
-#include <QtCore/QObject>
-#include <QtCore/QList>
-
-class QEvent;
-class QGridLayout;
-class QLayout;
-class QWidget;
-
-class ColumnResizerPrivate;
-class ColumnResizer : public QObject
-{
- Q_OBJECT
-public:
- ColumnResizer(QObject* parent = 0);
- ~ColumnResizer();
-
- void addWidget(QWidget* widget);
- void addWidgetsFromLayout(QLayout*, int column);
- void addWidgetsFromGridLayout(QGridLayout*, int column);
- void addWidgetsFromFormLayout(QFormLayout*, QFormLayout::ItemRole role);
-
-private Q_SLOTS:
- void updateWidth();
-
-protected:
- bool eventFilter(QObject*, QEvent* event);
-
-private:
- ColumnResizerPrivate* const d;
-};
-
-#endif /* COLUMNRESIZER_H */
+++ /dev/null
-/***************************************************************************
- * Copyright (C) 2010-2011 Alejandro Fiestas Olivares <afiestas@kde.org> *
- * Copyright (C) 2010-2011 UFO Coders <info@ufocoders.com> *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
- ***************************************************************************/
-
-#include "linkproxymodel.h"
-#include <QDebug>
-#include <QModelIndex>
-#include <QFileSystemModel>
-
-bool LinkProxyModel::filterAcceptsRow(int source_row, const QModelIndex& source_parent) const
-{
- QFileSystemModel *model = qobject_cast< QFileSystemModel *>(sourceModel());
- QModelIndex in = model->index(source_row, source_parent.column(), source_parent);
- const QString path = in.data(QFileSystemModel::FilePathRole).toString();
-
- if (path == model->rootPath()) {
- return true;
- }
-
- QFileInfo file(path);
- return file.isSymLink();
-}
+++ /dev/null
-/***************************************************************************
- * Copyright (C) 2010-2011 Alejandro Fiestas Olivares <afiestas@kde.org> *
- * Copyright (C) 2010-2011 UFO Coders <info@ufocoders.com> *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
- ***************************************************************************/
-
-#ifndef LINKPROXYMODEL_H
-#define LINKPROXYMODEL_H
-
-#include <QSortFilterProxyModel>
-
-class LinkProxyModel : public QSortFilterProxyModel
-{
- virtual bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const;
-};
-
-#endif // LINKPROXYMODEL_H
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>sharedFiles</class>
- <widget class="QWidget" name="sharedFiles">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>400</width>
- <height>300</height>
- </rect>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QListView" name="listView"/>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="KPushButton" name="addBtn">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KPushButton" name="removeBtn"/>
- </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>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>KPushButton</class>
- <extends>QPushButton</extends>
- <header>kpushbutton.h</header>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
+++ /dev/null
-/***************************************************************************
- * Copyright (C) 2010-2011 Alejandro Fiestas Olivares <afiestas@kde.org> *
- * Copyright (C) 2010-2011 UFO Coders <info@ufocoders.com> *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
- ***************************************************************************/
-
-#include "sharedfilesdialog.h"
-#include "ui_sharedfiles.h"
-#include "linkproxymodel.h"
-#include "filereceiversettings.h"
-
-#include <QDebug>
-#include <QFileSystemModel>
-#include <QDesktopServices>
-
-#include <KFileDialog>
-#include <kstandarddirs.h>
-
-SharedFilesDialog::SharedFilesDialog(QWidget* parent, Qt::WFlags flags): KDialog(parent, flags)
-{
- QWidget *sharedFiles = new QWidget(this);
- m_ui = new Ui::sharedFiles();
- m_ui->setupUi(sharedFiles);
- setMainWidget(sharedFiles);
- m_ui->listView->setSelectionMode(QAbstractItemView::ExtendedSelection);
-
- QFileSystemModel *model = new QFileSystemModel();
- QModelIndex in = model->setRootPath(FileReceiverSettings::self()->rootFolder().path());
-
- LinkProxyModel *proxy = new LinkProxyModel();
- proxy->setSourceModel(model);
-
- m_ui->listView->setModel(proxy);
- m_ui->listView->setRootIndex(proxy->mapFromSource(in));
-
- m_ui->addBtn->setIcon(KIcon("list-add"));
- m_ui->removeBtn->setIcon(KIcon("list-remove"));
-
- connect(this, SIGNAL(finished(int)), this, SLOT(slotFinished(int)));
- connect(m_ui->addBtn, SIGNAL(clicked(bool)), this, SLOT(addFiles()));
- connect(m_ui->removeBtn, SIGNAL(clicked(bool)), this, SLOT(removeFiles()));
-}
-
-void SharedFilesDialog::slotFinished(int result)
-{
- if (result == 1) {
- return;
- }
-
- KUrl url;
- QString baseDir = FileReceiverSettings::self()->rootFolder().path().append("/");
- if (!m_added.isEmpty()) {
- Q_FOREACH(const QString &filePath, m_added) {
- url.setPath(filePath);
- QFile::remove(baseDir + url.fileName());
- }
- }
- if (!m_removed.isEmpty()) {
- Q_FOREACH(const QString &filePath, m_removed) {
- url.setPath(filePath);
- QFile::link(filePath, baseDir + url.fileName());
- }
- }
-}
-
-void SharedFilesDialog::addFiles()
-{
- KFileDialog *dialog = new KFileDialog(QDesktopServices::storageLocation(QDesktopServices::HomeLocation), "*", this);
- dialog->setMode(KFile::Directory | KFile::Files | KFile::LocalOnly);
- dialog->exec();
-
- QFile fileExist;
- KUrl url;
- QString linkPath;
- QString baseDir = FileReceiverSettings::self()->rootFolder().path().append("/");
-
- QStringList files = dialog->selectedFiles();
- Q_FOREACH(const QString &filePath, files) {
- url.setPath(filePath);
-
- linkPath = baseDir + url.fileName();
- fileExist.setFileName(linkPath);
- if (fileExist.exists()) {
- continue;
- }
-
- QFile::link(filePath, linkPath);
- if (m_removed.contains(filePath)) {
- m_removed.removeOne(filePath);
- continue;
- }
- if (!m_added.contains(filePath)) {
- m_added.append(filePath);
- }
- }
-}
-
-void SharedFilesDialog::removeFiles()
-{
- QItemSelectionModel *select = m_ui->listView->selectionModel();
- QModelIndexList list = select->selectedIndexes();
-
- QFile file;
- QString linkPath;
- Q_FOREACH(const QModelIndex &index, list) {
- linkPath = index.data(QFileSystemModel::FilePathRole).toString();
- file.setFileName(linkPath);
- if (m_added.contains(file.symLinkTarget())) {
- m_added.removeOne(file.symLinkTarget());
- continue;
- }
- if (!m_removed.contains(file.symLinkTarget())) {
- m_removed.append(file.symLinkTarget());
- }
-
- file.remove();
- }
-}
\ No newline at end of file
+++ /dev/null
-/***************************************************************************
- * Copyright (C) 2010-2011 Alejandro Fiestas Olivares <afiestas@kde.org> *
- * Copyright (C) 2010-2011 UFO Coders <info@ufocoders.com> *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
- ***************************************************************************/
-
-#ifndef SHAREDFILESDIALOG_H
-#define SHAREDFILESDIALOG_H
-
-#include <kdialog.h>
-
-class Ui_sharedFiles;
-class SharedFilesDialog : public KDialog
-{
- Q_OBJECT
-public:
- SharedFilesDialog(QWidget* parent = 0, Qt::WFlags flags = 0);
-
-private Q_SLOTS:
- void slotFinished(int result);
- void addFiles();
- void removeFiles();
-
-private:
- Ui_sharedFiles *m_ui;
- QStringList m_removed;
- QStringList m_added;
-};
-
-#endif // SHAREDFILESDIALOG_H
</widget>
</item>
<item>
- <widget class="QLabel" name="label_8">
- <property name="text">
- <string><b>Sharing</b></string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QWidget" name="gridWidget2" native="true">
- <layout class="QFormLayout" name="formLayout_2">
- <property name="fieldGrowthPolicy">
- <enum>QFormLayout::ExpandingFieldsGrow</enum>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="label_4">
- <property name="text">
- <string>Share Files:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- <property name="buddy">
- <cstring>kcfg_shareEnabled</cstring>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QCheckBox" name="kcfg_shareEnabled">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_5">
- <property name="text">
- <string>Require PIN:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QComboBox" name="kcfg_requirePin"/>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_6">
- <property name="text">
- <string>Permissions:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QComboBox" name="kcfg_allowWrite"/>
- </item>
- <item row="5" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>300</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="KPushButton" name="sharedFiles">
- <property name="text">
- <string>Shared Files</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="4" column="1">
- <widget class="KUrlRequester" name="kcfg_rootFolder">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>400</width>
- <height>0</height>
- </size>
- </property>
- <property name="mode">
- <set>KFile::Directory|KFile::ExistingOnly|KFile::LocalOnly</set>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QLabel" name="label_9">
- <property name="text">
- <string>Shared Folder:</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
<extends>QFrame</extends>
<header>kurlrequester.h</header>
</customwidget>
- <customwidget>
- <class>KPushButton</class>
- <extends>QPushButton</extends>
- <header>kpushbutton.h</header>
- </customwidget>
</customwidgets>
<resources/>
<connections/>
${KDE4_KDECORE_LIBS}
${KDE4_KIO_LIBRARY}
${KDE4_KDEUI_LIBS}
- bluedevil
+ ${LibBlueDevil_LIBRARIES}
)
########### install files ###############
s.uuid = "00001106-0000-1000-8000-00805F9B34FB";
m_supportedServices.insert("00001106-0000-1000-8000-00805F9B34FB", s);
+ kDebug() << "Kio Bluetooth instanced!";
+ m_kded = new org::kde::BlueDevil("org.kde.kded", "/modules/bluedevil", QDBusConnection::sessionBus(), 0);
+
if (!Manager::self()->usableAdapter()) {
kDebug() << "No available interface";
infoMessage(i18n("No Bluetooth adapters have been found."));
return;
}
-
- kDebug() << "Kio Bluetooth instanced!";
- m_kded = new org::kde::BlueDevil("org.kde.kded", "/modules/bluedevil", QDBusConnection::sessionBus(), 0);
}
QList<KioBluetooth::Service> KioBluetooth::getSupportedServices(const QStringList &uuids)
set(obexftpfiletransfer_xml ${CMAKE_CURRENT_SOURCE_DIR}/obexftp/filetransfer.xml)
-set(SENDER_PLUGIN_PATH ../../sendfile/)
+set(SENDER_PLUGIN_PATH ${CMAKE_SOURCE_DIR}/src/sendfile/)
qt4_add_dbus_interface(kio_obexftp_SRCS ${SENDER_PLUGIN_PATH}org.bluez.obex.Transfer1.xml obexd_transfer)
kde4_add_plugin(kio_obexftp ${kio_obexftp_SRCS})
createsessionjob.cpp
)
-set(SENDER_PLUGIN_PATH ../../../sendfile/)
+set(SENDER_PLUGIN_PATH ${CMAKE_SOURCE_DIR}/src/sendfile/)
qt4_add_dbus_interface(kded_obexftp_SRCS ${SENDER_PLUGIN_PATH}org.bluez.obex.Client1.xml obexd_client)
set(OBJECT_MANAGER_FILE org.freedesktop.DBus.ObjectManager.xml)
${KDE4_KDECORE_LIBS}
${KDE4_KDEUI_LIBS}
${KDE4_KFILE_LIBS}
- bluedevil
+ ${LibBlueDevil_LIBRARIES}
)
install(TARGETS kded_obexftpdaemon DESTINATION ${PLUGIN_INSTALL_DIR})
X-KDE-Kded-phase=1
Name=Bluetooth File Transfer
+Name[bs]=Transfer Bluetooth Daoteke
Name[ca]=Transferència de fitxer per Bluetooth
Name[ca@valencia]=Transferència de fitxer per Bluetooth
Name[cs]=Přenos souborů Bluetooth
Name[da]=Bluetooth filoverførsel
Name[de]=Bluetooth-Dateiübertragung
Name[el]=Μεταφορά αρχείων με Bluetooth
+Name[en_GB]=Bluetooth File Transfer
Name[es]=Transferencia de archivo por Bluetooth
+Name[et]=Bluetoothi failiedastus
Name[fi]=Bluetooth-tiedostonsiirto
Name[fr]=Transfert de fichiers Bluetooth
Name[gl]=Transferencias de ficheiros mediante Bluetooth
Name[hu]=Bluetooth fájlátvitel
Name[it]=Trasferimento file via Bluetooth
Name[kk]=Bluetooth арқылы файлды тасымалдау
+Name[ko]=블루투스 파일 전송
Name[lt]=Failų perdavimai
Name[mr]=ब्लूटूथ फाईल बदली
Name[nb]=Blåtann filoverføring
+Name[nds]=Bluetooth-Dateiöverdregen
Name[nl]=Bestandsoverdracht via bluetooth
Name[pa]=ਬਲਿਊਟੁੱਥ ਫਾਇਲ ਟਰਾਂਸਫਰ
Name[pl]=Przesyłanie plików Bluetooth
Name[zh_TW]=藍牙檔案傳輸
Comment=Supports Bluetooth file transfer using ObexFTP
+Comment[bs]=Podržava Blutut prijenos datoteka koristeći ObexFTP
Comment[ca]=Accepta transferència de fitxer per Bluetooth usant ObexFTP
Comment[ca@valencia]=Accepta transferència de fitxer per Bluetooth usant ObexFTP
Comment[cs]=Podporuje přenos souborů Bluetooth použitím ObexFTP
Comment[da]=Understøtter Bluetooth filoverførsel med ObexFTP
Comment[de]=Unterstützt Bluetooth-Datenübertragung mittels ObexFTP
Comment[el]=Υποστηρίζει μεταφορά αρχείων με Bluetooth με χρήση ObexFTP
+Comment[en_GB]=Supports Bluetooth file transfer using ObexFTP
Comment[es]=Permite transferencias de archivos por Bluetooth usando ObexFTP
+Comment[et]=Bluetoothi failiedastuse toetamine ObexFTP vahendusel
Comment[fi]=Tukee Bluetooth-tiedostonsiirtoa ObexFTP:tä käyttäen
Comment[fr]=Prend en charge le transfert de fichiers Bluetooth à l'aide de « ObexFTP »
Comment[gl]=Permite a transferencia de ficheiros por Bluetooth empregando ObexFTP
Comment[hu]=Támogatja a Bluetooth fájlátvitelt az ObexFTP használatával
Comment[it]=Supporta i trasferimenti di file Bluetooth usando ObexFTP
Comment[kk]=ObexFTP-мен Bluetooth арқылы файлды тасымалдау
+Comment[ko]=ObexFTP를 통한 블루투스 파일 전송 지원
Comment[lt]=Palaiko Bluetooth failų perdavimą naudojant ObexFTP
Comment[mr]=ओबेक्स-एफटीपी वापरून ब्लूटूथ फाईल बदली समर्थीत करतो
Comment[nb]=Støtter Blåtann filoverføring vhja ObexFTP
+Comment[nds]=Ünnerstütt Bluetooth-Dateiöverdregen över ObexFTP
Comment[nl]=Ondersteunt bestandsoverdracht via bluetooth met ObexFTP
Comment[pl]=Wspiera przesyłanie plików przez Bluetooth przy użyciu ObexFTP
Comment[pt]=Suporta a transferência de ficheiros por Bluetooth com o ObexFTP
Comment[pt_BR]=Suporte à transferência de arquivos por Bluetooth usando o ObexFTP
+Comment[ro]=Susține transfer de fișiere Bluetooth folosind ObexFTP
Comment[ru]=Поддерживает передачу файлов по Bluetooth на базе ObexFTP
Comment[sk]=Podporuje Bluetooth prenosy súborov pomocou ObexFTP
Comment[sl]=Podpira prenose datotek preko Bluetooth z uporabo ObexFTP
QDBusPendingReply <QVariantMapList > reply = m_transfer->ListFolder();
reply.waitForFinished();
+ if (reply.isError()) {
+ kDebug() << reply.error().message();
+ error(KIO::ERR_SLAVE_DEFINED, i18n("Bluetooth is not enabled"));
+ finished();
+ return;
+ }
QVariantMapList folderList = reply.value();
Q_FOREACH(const QVariantMap folder, folderList) {
KIO::UDSEntry entry = entryFromInfo(folder);
kde4_add_executable(bluedevil-monolithic ${monolithic_SRCS})
-target_link_libraries(bluedevil-monolithic ${KDE4_KIO_LIBRARY} ${KDE4_KDEUI_LIBS} bluedevil)
+target_link_libraries(bluedevil-monolithic ${KDE4_KIO_LIBRARY} ${KDE4_KDEUI_LIBS} ${LibBlueDevil_LIBRARIES})
install(TARGETS bluedevil-monolithic ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES bluedevil-monolithic.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
Name[gl]=BlueDevil
Name[hu]=BlueDevil
Name[it]=BlueDevil
+Name[ja]=BlueDevil
Name[kk]=BlueDevil
Name[km]=BlueDevil
+Name[ko]=BlueDevil
Name[lt]=BlueDevil
Name[mr]=ब्लु-डेव्हिल
Name[nb]=BlueDevil
GenericName[gl]=BlueDevil
GenericName[hu]=BlueDevil
GenericName[it]=BlueDevil
+GenericName[ja]=BlueDevil
GenericName[kk]=BlueDevil
GenericName[km]=BlueDevil
+GenericName[ko]=BlueDevil
GenericName[lt]=BlueDevil
GenericName[mr]=ब्लु-डेव्हिल
GenericName[nb]=BlueDevil
Comment[gl]=Funcionalidades de Bluetooth para KDE.
Comment[hu]=KDE bluetooth támogatás
Comment[it]=Supporto Bluetooth per KDE
+Comment[ja]=KDE Bluetooth サポート
Comment[kk]=KDE Bluetooth қолдауы
Comment[km]=គាំទ្រប៊្លូធូសរបស់ KDE
+Comment[ko]=KDE 블루투스 지원
Comment[lt]=KDE Bluetooth palaikymas
Comment[mr]=केडीई ब्लूटूथ समर्थन
Comment[nb]=KDE Blåtann-støtte
offlineMode();
- if (Manager::self()->usableAdapter()) {
+ if (!Manager::self()->adapters().isEmpty()) {
onlineMode();
}
setStandardActionsEnabled(false);
setAssociatedWidget(contextMenu());
+
+ setStatus(KStatusNotifierItem::Active);
+ poweredChanged();
}
void Monolithic::adapterChanged()
if (Manager::self()->usableAdapter()) {
onlineMode();
}
+
+ poweredChanged();
}
quint32 sortHelper(quint32 type)
//Shortcut configuration actions, mainly checkables for discovering and powering
menu->addSeparator();
+ Adapter *usableAdapter = Manager::self()->usableAdapter();
+
KAction *discoverable = new KAction(i18n("Discoverable"), menu);
discoverable->setCheckable(true);
- discoverable->setChecked(Manager::self()->usableAdapter()->isDiscoverable());
+ discoverable->setChecked(usableAdapter && usableAdapter->isDiscoverable());
connect(discoverable, SIGNAL(toggled(bool)), this, SLOT(activeDiscoverable(bool)));
menu->addAction(discoverable);
}
}
+void Monolithic::setupDevice(Device *device)
+{
+ connect(device, SIGNAL(propertyChanged(QString,QVariant)), this, SLOT(regenerateConnectedDevices()));
+ connect(device, SIGNAL(connectedChanged(bool)), this, SLOT(regenerateDeviceEntries()));
+ connect(device, SIGNAL(UUIDsChanged(QStringList)), this, SLOT(UUIDsChanged(QStringList)));
+}
+
void Monolithic::onlineMode()
{
- setStatus(KStatusNotifierItem::Active);
+ setStatus(Active);
QList<Adapter*> adapters = Manager::self()->adapters();
Q_FOREACH(Adapter *adapter, adapters) {
QList<Device*> devices = Manager::self()->devices();
Q_FOREACH(Device* device, devices) {
- connect(device, SIGNAL(propertyChanged(QString,QVariant)), this, SLOT(regenerateConnectedDevices()));
+ setupDevice(device);
}
-
- regenerateDeviceEntries();
- regenerateConnectedDevices();
- poweredChanged();
}
void Monolithic::actionTriggered()
void Monolithic::deviceCreated(Device *device)
{
- connect(device, SIGNAL(propertyChanged(QString,QVariant)), this, SLOT(regenerateConnectedDevices()));
- connect(device, SIGNAL(UUIDsChanged(QStringList)), this, SLOT(UUIDsChanged(QStringList)));
+ setupDevice(device);
regenerateDeviceEntries();
regenerateConnectedDevices();
}
void Monolithic::offlineMode()
{
- setStatus(KStatusNotifierItem::Passive);
+ setStatus(Passive);
setTooltipTitleStatus(false);
KMenu *const menu = contextMenu();
separator->setSeparator(true);
menu->addAction(separator);
// menu->addAction(KStandardAction::quit(QCoreApplication::instance(), SLOT(quit()), menu));
+
+ QList<Adapter*> adapters = Manager::self()->adapters();
+ Q_FOREACH(Adapter *adapter, adapters) {
+ adapter->disconnect(this);
+ }
+
+ QList<Device*> devices = Manager::self()->devices();
+ Q_FOREACH(Device* device, devices) {
+ device->QObject::disconnect(this);
+ }
}
bool Monolithic::poweredAdapters()
subMenu->addAction(action);
}
- KAction *connectAction = new KAction(i18nc("Connect to a bluetooth device", "Connect"), deviceAction);
- connect(connectAction, SIGNAL(triggered()), device, SLOT(connectDevice()));
- subMenu->addAction(connectAction);
+ if (device->isConnected()) {
+ KAction *reconnectAction = new KAction(i18nc("Re-connect to a bluetooth device", "Re-connect"), deviceAction);
+ KAction* disconnectAction = new KAction(i18nc("Disconnect to a bluetooth device", "Disconnect"), deviceAction);
+ connect(reconnectAction, SIGNAL(triggered()), device, SLOT(connectDevice()));
+ connect(disconnectAction, SIGNAL(triggered()), device, SLOT(disconnect()));
+ subMenu->addAction(reconnectAction);
+ subMenu->addAction(disconnectAction);
+ } else {
+ KAction *connectAction = new KAction(i18nc("Connect to a bluetooth device", "Connect"), deviceAction);
+ connect(connectAction, SIGNAL(triggered()), device, SLOT(connectDevice()));
+ subMenu->addAction(connectAction);
+ }
//Enable when we can know if we should show Connect or not
// if (deviceServices.isEmpty()) {
private:
void onlineMode();
void offlineMode();
+ void setupDevice(Device *device);
/**
* Returns true or false wether there are powered adapters
kde4_add_executable(bluedevil-sendfile ${sendfilehelper_SRCS})
target_link_libraries(bluedevil-sendfile
- ${KDE4_KIO_LIBRARY} ${KDE4_KDEUI_LIBS} ${KDE4_KFILE_LIBS} bluedevil)
+ ${KDE4_KIO_LIBRARY} ${KDE4_KDEUI_LIBS} ${KDE4_KFILE_LIBS} ${LibBlueDevil_LIBRARIES})
install(TARGETS bluedevil-sendfile DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES bluedevil-sendfile.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
Name[it]=Invio file di BlueDevil
Name[kk]=BlueDevil файл жіберуі
Name[km]=ផ្ញើឯកសារ BlueDevil
+Name[ko]=BlueDevil 파일 보내기
Name[lt]=BlueDevil siųsti failą
Name[mr]=ब्लु-डेव्हिल फाईल पाठवा
Name[nb]=BlueDevil send fil
GenericName[it]=Invio file di BlueDevil
GenericName[kk]=BlueDevil файлды жіберуі
GenericName[km]=ផ្ញើឯកសារ BlueDevil
+GenericName[ko]=BlueDevil 파일 보내기
GenericName[lt]=BlueDevil siųsti failą
GenericName[mr]=ब्लु-डेव्हिल फाईल पाठवा
GenericName[nb]=BlueDevil send fil
Comment[it]=Invio file di BlueDevil
Comment[kk]=BlueDevil файлды жіберуі
Comment[km]=ផ្ញើឯកសារ BlueDevil
+Comment[ko]=BlueDevil 파일 보내기
Comment[lt]=BlueDevil siųsti failą
Comment[mr]=ब्लु-डेव्हिल फाईल पाठवा
Comment[nb]=BlueDevil send fil
connect(deviceList, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this,
SLOT(itemSelected(QListWidgetItem*)));
- connect(Manager::self()->usableAdapter(), SIGNAL(deviceFound(QVariantMap)), this,
- SLOT(deviceFound(QVariantMap)));
+ connect(Manager::self()->usableAdapter(), SIGNAL(deviceFound(Device*)), this,
+ SLOT(deviceFound(Device*)));
startScan();
}
<!-- Includes -->
<include>QDesktopServices</include>
<kcfgfile name="bluedevilreceiverrc"/>
- <include>kglobalsettings.h</include>
- <include>QFile</include>
- <include>QDir</include>
- <include>kdebug.h</include>
- <include>KUrl</include>
- <include>KGlobal</include>
- <include>KConfig</include>
- <include>kstandarddirs.h</include>
<group name="General">
<!-- File Receiving -->
<label>Whether allow to modify shared files</label>
<default>0</default>
</entry>
-<!-- File Sharing -->
- <entry name="shareEnabled" type="bool" key="shareEnabled">
- <label>Enable or disable file sharing</label>
- <default>true</default>
- </entry>
- <entry name="requirePin" type="bool" key="requirePin">
- <label>Whether require the PIN</label>
- <default>true</default>
- </entry>
- <entry name="allowWrite" type="bool" key="allowWrite">
- <label>Allow external devices to modify the shared files</label>
- <default>false</default>
- </entry>
- <entry key="rootFolder" type="Url" key="rootFolder">
- <code>
- QString downloadPath;
- const QString xdgUserDirs = KGlobal::dirs()->localxdgconfdir() + QLatin1String( "user-dirs.dirs" );
- if( QFile::exists( xdgUserDirs ) ) {
- KConfig xdgUserConf( xdgUserDirs, KConfig::SimpleConfig );
- KConfigGroup g( &xdgUserConf, "" );
- downloadPath = g.readPathEntry( "XDG_PUBLICSHARE_DIR", downloadPath ).remove( '"' );
- if ( downloadPath.isEmpty() ) {
- downloadPath = KStandardDirs().saveLocation("data", "bluedevil/shared_files/");
- }
- }
-
- downloadPath = QDir::cleanPath( downloadPath );
- QDir dir(downloadPath);
- if (!dir.exists()) {
- KUrl url(downloadPath);
- QString dirname = dir.dirName();
- dir.setPath(url.upUrl().path());
- if (!dir.mkdir(dirname)) {
- downloadPath = KStandardDirs().saveLocation("data", "bluedevil/shared_files/");
- }
- }
-
- KUrl rootFolderUrl(downloadPath);
- </code>
- <default code="true">rootFolderUrl</default>
- </entry>
</group>
</kcfg>
kde4_add_executable(bluedevil-wizard ${wizard_SRCS})
target_link_libraries(bluedevil-wizard
- ${KDE4_KIO_LIBRARY} ${KDE4_KDEUI_LIBS} bluedevil)
+ ${KDE4_KIO_LIBRARY} ${KDE4_KDEUI_LIBS} ${LibBlueDevil_LIBRARIES})
install(TARGETS bluedevil-wizard ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES bluedevil-wizard.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
Name[gl]=Asistente de BlueDevil
Name[hu]=BlueDevil varázsló
Name[it]=Procedura guidata di BlueDevil
+Name[ja]=BlueDevil ウィザード
Name[kk]=BlueDevil шебері
Name[km]=អ្នកជំនួយការ BlueDevil
+Name[ko]=BlueDevil 마법사
Name[lt]=BlueDevil vedlys
Name[mr]=ब्लु-डेव्हिल विझार्ड
Name[nb]=BlueDevil veiviser
Name[nds]=BlueDevil-Hölper
Name[nl]=BlueDevil assistent
Name[pa]=BlueDevil ਸਹਾਇਕ
-Name[pl]=Asystent BlueDevil
+Name[pl]=Pomocnik BlueDevil
Name[pt]=Assistente BlueDevil
Name[pt_BR]=Assistente BlueDevil
Name[ro]=Asistent BlueDevil
GenericName[gl]=Asistente de BlueDevil
GenericName[hu]=BlueDevil varázsló
GenericName[it]=Procedura guidata di BlueDevil
+GenericName[ja]=BlueDevil ウィザード
GenericName[kk]=BlueDevil шебері
GenericName[km]=អ្នកជំនួយការ BlueDevil
+GenericName[ko]=BlueDevil 마법사
GenericName[lt]=BlueDevil vedlys
GenericName[mr]=ब्लु-डेव्हिल विझार्ड
GenericName[nb]=BlueDevil veiviser
GenericName[nds]=BlueDevil-Hölper
GenericName[nl]=BlueDevil assistent
GenericName[pa]=BlueDevil ਸਹਾਇਕ
-GenericName[pl]=Asystent BlueDevil
+GenericName[pl]=Pomocnik BlueDevil
GenericName[pt]=Assistente BlueDevil
GenericName[pt_BR]=Assistente BlueDevil
GenericName[ro]=Asistent BlueDevil
Comment[gl]=Asistente de BlueDevil.
Comment[hu]=BlueDevil varázsló
Comment[it]=Procedura guidata di BlueDevil
+Comment[ja]=BlueDevil ウィザード
Comment[kk]=BlueDevil шебері
Comment[km]=អ្នកជំនួយការ BlueDevil
+Comment[ko]=BlueDevil 마법사
Comment[lt]=BlueDevil vedlys
Comment[mr]=ब्लु-डेव्हिल विझार्ड
Comment[nb]=BlueDevil veiviser
Comment[nds]=BlueDevil-Hölper
Comment[nl]=BlueDevil assistent
Comment[pa]=BlueDevil ਸਹਾਇਕ
-Comment[pl]=Asystent BlueDevil
+Comment[pl]=Pomocnik BlueDevil
Comment[pt]=Assistente BlueDevil
Comment[pt_BR]=Assistente BlueDevil
Comment[ro]=Asistent BlueDevil
kDebug() << "Wizard done: " << result;
QWizard::done(result);
+ qApp->exit(result);
}
Device* BlueWizard::device() const
void BlueWizard::setDeviceAddress(const QByteArray& address)
{
kDebug() << "Device Address: " << address;
+ if (!Manager::self()->usableAdapter()) {
+ kDebug() << "No usable adapter available";
+ return;
+ }
+
m_deviceAddress = address;
m_device = Manager::self()->usableAdapter()->deviceForAddress(m_deviceAddress);
}
}
KApplication app;
+ app.disableSessionManagement();
app.setQuitOnLastWindowClosed(false);
new BlueWizard(url);
<height>40</height>
</size>
</property>
- <property name="inputMask">
- <string>999999999; </string>
- </property>
<property name="readOnly">
<bool>false</bool>
</property>
#include <QListView>
#include <QLabel>
#include <QTimer>
+#include <QRegExpValidator>
#include <KDebug>
#include <kpixmapsequenceoverlaypainter.h>
list << QWizard::CancelButton;
m_wizard->setButtonLayout(list);
+ QRegExp rx("[0-9]{0,9}");
+ QRegExpValidator *validator = new QRegExpValidator(rx);
+ pinText->setValidator(validator);
+
connect(Manager::self()->usableAdapter(), SIGNAL(unpairedDeviceFound(Device*)), this,
SLOT(deviceFound(Device*)));
connect(manualPin, SIGNAL(toggled(bool)), pinText, SLOT(setEnabled(bool)));
bool DiscoverPage::isComplete() const
{
- if (m_wizard->deviceAddress().isEmpty()) {
+ if (m_wizard->deviceAddress().isEmpty() || !m_wizard->device()) {
return false;
}
if (manualPin->isChecked() && pinText->text().isEmpty()) {
return BlueWizard::Discover;
}
- if (m_wizard->deviceAddress().isEmpty()) {
+ if (m_wizard->deviceAddress().isEmpty() || !m_wizard->device()) {
return BlueWizard::Discover;
}
kDebug() << "Stopping scanning";
+ if (!Manager::self()->usableAdapter()) {
+ return BlueWizard::Fail;
+ }
+
Manager::self()->usableAdapter()->stopDiscovery();
Device *device = m_wizard->device();
if (device->isPaired()) {
if (deviceName.isEmpty()) {
failLbl->setText(i18nc("This string is shown when the wizard fail","The setup of the device has failed"));
} else {
- failLbl->setText(failLbl->text().arg(deviceName));
+ failLbl->setText(i18n("The setup of %1 has failed", deviceName));
}
}
<item>
<widget class="QLabel" name="failLbl">
<property name="text">
- <string>The setup of %1 has failed</string>
+ <string/>
</property>
</widget>
</item>
<device type="keyboard" oui="00:13:6C:" name="TomTom Remote" pin="0000"/>
<!-- Sony PlayStation 3 Remote Control -->
- <device oui="00:19:C1:" name="BD Remote Control" pin="NULL"/>
- <device oui="00:1E:3D:" name="BD Remote Control" pin="NULL"/>
- <device oui="00:06:F5:" name="BD Remote Control" pin="NULL"/>
+ <device oui="00:19:C1:" name="PLAYSTATION(R)3 Controller" pin="NULL"/>
+ <device oui="00:1E:3D:" name="PLAYSTATION(R)3 Controller" pin="NULL"/>
+ <device oui="00:06:F5:" name="PLAYSTATION(R)3 Controller" pin="NULL"/>
<!-- Apple Wireless and Mighty Mouse
Note: Apple doesn't follow the specs, and requires their mice
Q_UNUSED(device);
Q_UNUSED(msg);
kDebug() << "AGENT-RequestPasskey " << device.path();
- return 0;
+ emit pinRequested(m_pin);
+ return m_pin.toUInt();
}
-void WizardAgent::DisplayPasskey(const QDBusObjectPath& device, quint32 passkey)
+void WizardAgent::DisplayPasskey(const QDBusObjectPath& device, quint32 passkey, quint8 entered)
{
Q_UNUSED(device);
- Q_UNUSED(passkey);
+ Q_UNUSED(entered);
kDebug() << "AGENT-DisplayPasskey " << device.path() << ", " << QString::number(passkey);
+ emit pinRequested(QString("%1").arg(passkey, 6, 10, QLatin1Char('0')));
}
void WizardAgent::DisplayPinCode(const QDBusObjectPath& device, const QString& pincode)
QString RequestPinCode(const QDBusObjectPath &device, const QDBusMessage &msg);
quint32 RequestPasskey(const QDBusObjectPath &device, const QDBusMessage &msg);
void DisplayPinCode(const QDBusObjectPath &device, const QString & pincode);
- void DisplayPasskey(const QDBusObjectPath &device, quint32 passkey);
+ void DisplayPasskey(const QDBusObjectPath &device, quint32 passkey, quint8 entered);
void RequestConfirmation(const QDBusObjectPath &device, quint32 passkey, const QDBusMessage &msg);
void Cancel();