├── 3rdparty
├── qwebdavlib
│ ├── qwebdavlib
│ │ ├── CHANGES
│ │ ├── LICENSE
│ │ ├── README
│ │ ├── qwebdavlib.pri
│ │ ├── CMakeLists.txt
│ │ ├── qwebdavlib.pro
│ │ ├── qnaturalsort.h
│ │ └── qwebdav_global.h
│ ├── qwebdavlib.pro
│ ├── qwebdavlibExample
│ │ ├── main.cpp
│ │ ├── qexample.h
│ │ ├── qwebdavlibExample.pro
│ │ └── qexample.cpp
│ ├── README
│ └── CHANGES
├── quazip
│ ├── quazip.pro
│ ├── quazip.pri
│ ├── quazip
│ │ ├── run_moc.bat
│ │ ├── quazip.sln
│ │ ├── quazip.pri
│ │ ├── CMakeLists.txt
│ │ ├── quacrc32.cpp
│ │ ├── quacrc32.h
│ │ ├── quaadler32.cpp
│ │ ├── quaadler32.h
│ │ ├── quazip_global.h
│ │ └── doc
│ │ │ └── faq.dox
│ ├── qztest
│ │ ├── coverage.sh
│ │ ├── testquazipfileinfo.h
│ │ ├── testquazipnewinfo.h
│ │ ├── run_moc.bat
│ │ ├── testquachecksum32.h
│ │ ├── testquaziodevice.h
│ │ ├── qztest.pro
│ │ ├── testquagzipfile.h
│ │ ├── qztest.sln
│ │ ├── testquazipdir.h
│ │ ├── testjlcompress.h
│ │ ├── testquachecksum32.cpp
│ │ ├── testquazipfile.h
│ │ ├── testquazip.h
│ │ └── qztest.h
│ ├── includes.pri
│ ├── FindQuaZip.cmake
│ ├── quazip.sln
│ └── CMakeLists.txt
└── CMakeLists.txt
├── pack
├── zip
│ ├── doublecontact.ini
│ └── make-zip-pkg.sample.bat
├── deb
│ ├── DEBIAN
│ │ ├── docs
│ │ ├── menu.ex
│ │ ├── rules
│ │ └── copyright
│ ├── make-debianized-src
│ ├── control-qt4
│ ├── control-qt5
│ └── make-deb-pkg
├── exe
│ ├── doublecontact.iss
│ └── make-exe-pkg.sample.bat
├── ann
│ ├── md2any
│ └── README.ann
├── appimage
│ ├── AppRun
│ ├── README
│ ├── make-appimage
│ └── doublecontact.appdata.xml
├── make-bin-current.bat
├── txz
│ ├── remove-doublecontact-root-build
│ └── make-txz-pkg
├── rpm
│ ├── make-rpm-pkg
│ └── doublecontact.spec
├── make-bin-image.bat
├── dmg
│ ├── make-dmg-pkg
│ └── Info.plist
├── make-bin-image
└── arch
│ └── PKGBUILD
├── TODO
├── .gitignore
├── app
├── doublecontact.rc
├── doublecontact.qrc
├── doublecontact.desktop
├── aboutdialog.h
├── sortdialog.h
├── languageselectdialog.h
├── multicontactdialog.h
├── tagremovedialog.h
├── csvprofiledialog.h
├── logwindow.h
├── phonetypedialog.h
├── settingsdialog.h
├── groupdialog.h
├── datedetailsdialog.h
├── callwindow.h
├── helpers.h
├── languageselectdialog.cpp
├── innerfilewindow.h
├── comparedialog.h
├── phonetypedialog.ui
├── multicontactdialog.cpp
├── languageselectdialog.ui
├── logwindow.cpp
├── callwindow.ui
├── tagremovedialog.cpp
├── logwindow.ui
├── sortdialog.cpp
├── phonetypedialog.cpp
├── innerfilewindow.ui
├── messagewindow.h
└── tagremovedialog.ui
├── img
├── 16x16
│ ├── del.png
│ └── doublecontact_16x16.png
├── multi
│ ├── doublecontact.icns
│ └── doublecontact.ico
├── 32x32
│ └── doublecontact_32x32.png
├── 64x64
│ └── doublecontact_64x64.png
├── 128x128
│ └── doublecontact_128x128.png
├── 256x256
│ └── doublecontact_256x256.png
├── 512x512
│ └── doublecontact_512x512.png
├── README.icons
└── CMakeLists.txt
├── testdata
├── empty.mpb
├── explay_bm50.csv
├── enc_koi8_cyr.vcf
├── enc_utf8_cyr.vcf
├── semicolon.vcf
├── custom_nonlatin_a8.vcf
├── csv_gen.csv
├── csv_gen_nonlatin.csv
├── contacts.xml
├── csv_gen.vcf
└── two_records.udx
├── doc
├── tech_details.rus.md
├── build-samples
│ ├── buildstat-486.bat
│ ├── buildstat-510.bat
│ └── build-qt-stat-512
└── csvprofiles.en.md
├── translations
├── README.tr
├── iso639-1.utf8
└── CMakeLists.txt
├── tests
├── carddav-owncloud-get.bat
├── carddav-nextcloud-get
├── castxmlcall
└── diff_ui
├── contconv
├── README.md
├── CMakeLists.txt
├── contconv.pro
├── main.cpp
├── consoleasyncui.h
├── convertor.h
└── consoleasyncui.cpp
├── all.pro
├── core
├── formats
│ ├── network
│ │ ├── imageloader.cpp
│ │ ├── imageloader.h
│ │ ├── asyncformat.cpp
│ │ ├── asyncformat.h
│ │ └── carddavformat.h
│ ├── formatfactory.h
│ ├── files
│ │ ├── htmlfile.h
│ │ ├── vcfdirectory.h
│ │ ├── nbffile.h
│ │ ├── vcffile.h
│ │ ├── xmlcontactfile.h
│ │ ├── udxfile.h
│ │ ├── mpbfile.h
│ │ ├── fileformat.h
│ │ ├── csvfile.h
│ │ ├── fileformat.cpp
│ │ ├── vcffile.cpp
│ │ └── nbufile.h
│ ├── common
│ │ ├── vmessagedata.h
│ │ ├── vdata.h
│ │ ├── textreport.h
│ │ ├── quotedprintable.h
│ │ ├── pdu.h
│ │ ├── vcarddata.h
│ │ └── nokiadata.h
│ ├── profiles
│ │ ├── osmoprofile.h
│ │ ├── explaybm50profile.h
│ │ ├── explaytv240profile.h
│ │ └── sylpheedprofile.h
│ └── iformat.h
├── corehelpers.cpp
├── bstring.h
├── languagemanager.h
└── corehelpers.h
├── model
├── modelhelpers.h
├── model.pri
├── modelhelpers.cpp
├── recentlist.h
├── CMakeLists.txt
├── callmodel.h
├── innerfilemodel.h
├── messagemodel.h
└── recentlist.cpp
├── cmake
└── modules
│ └── Findlibzip.cmake
├── .travis.yml
└── README.md
/3rdparty/qwebdavlib/qwebdavlib/CHANGES:
--------------------------------------------------------------------------------
1 | ../CHANGES
--------------------------------------------------------------------------------
/3rdparty/qwebdavlib/qwebdavlib/LICENSE:
--------------------------------------------------------------------------------
1 | ../LICENSE
--------------------------------------------------------------------------------
/3rdparty/qwebdavlib/qwebdavlib/README:
--------------------------------------------------------------------------------
1 | ../README
--------------------------------------------------------------------------------
/pack/zip/doublecontact.ini:
--------------------------------------------------------------------------------
1 | [%General]
2 | IsPortable=true
3 |
--------------------------------------------------------------------------------
/TODO:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarkHobbit/doublecontact/HEAD/TODO
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.pro.user*
2 | Makefile*
3 | *.qm
4 | *.moc
5 | *.obj
6 | qrc_*.cpp
7 |
--------------------------------------------------------------------------------
/app/doublecontact.rc:
--------------------------------------------------------------------------------
1 | IDI_ICON1 ICON DISCARDABLE "../img/multi/doublecontact.ico"
2 |
--------------------------------------------------------------------------------
/pack/deb/DEBIAN/docs:
--------------------------------------------------------------------------------
1 | README.md
2 | TODO
3 | doc/manual.en.md
4 | doc/manual.rus.md
5 |
--------------------------------------------------------------------------------
/img/16x16/del.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarkHobbit/doublecontact/HEAD/img/16x16/del.png
--------------------------------------------------------------------------------
/testdata/empty.mpb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarkHobbit/doublecontact/HEAD/testdata/empty.mpb
--------------------------------------------------------------------------------
/3rdparty/quazip/quazip.pro:
--------------------------------------------------------------------------------
1 | TEMPLATE=subdirs
2 | SUBDIRS=quazip qztest
3 | qztest.depends = quazip
4 |
--------------------------------------------------------------------------------
/doc/tech_details.rus.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarkHobbit/doublecontact/HEAD/doc/tech_details.rus.md
--------------------------------------------------------------------------------
/testdata/explay_bm50.csv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarkHobbit/doublecontact/HEAD/testdata/explay_bm50.csv
--------------------------------------------------------------------------------
/translations/README.tr:
--------------------------------------------------------------------------------
1 | lupdate MUST be called with WITH_MESSAGES and WITH_CALLS defines switched on!!!
2 |
--------------------------------------------------------------------------------
/pack/exe/doublecontact.iss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarkHobbit/doublecontact/HEAD/pack/exe/doublecontact.iss
--------------------------------------------------------------------------------
/testdata/enc_koi8_cyr.vcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarkHobbit/doublecontact/HEAD/testdata/enc_koi8_cyr.vcf
--------------------------------------------------------------------------------
/3rdparty/quazip/quazip.pri:
--------------------------------------------------------------------------------
1 | INCLUDEPATH+=$$PWD
2 | DEPENDPATH+=$$PWD/quazip
3 | include($$PWD/quazip/quazip.pri)
4 |
--------------------------------------------------------------------------------
/img/multi/doublecontact.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarkHobbit/doublecontact/HEAD/img/multi/doublecontact.icns
--------------------------------------------------------------------------------
/img/multi/doublecontact.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarkHobbit/doublecontact/HEAD/img/multi/doublecontact.ico
--------------------------------------------------------------------------------
/img/16x16/doublecontact_16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarkHobbit/doublecontact/HEAD/img/16x16/doublecontact_16x16.png
--------------------------------------------------------------------------------
/img/32x32/doublecontact_32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarkHobbit/doublecontact/HEAD/img/32x32/doublecontact_32x32.png
--------------------------------------------------------------------------------
/img/64x64/doublecontact_64x64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarkHobbit/doublecontact/HEAD/img/64x64/doublecontact_64x64.png
--------------------------------------------------------------------------------
/pack/ann/md2any:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | sed 's/*/[*]/' $1 > $1.bb
4 | sed -e 's/^* /
/' -e 's/$/<\/li>/' $1 > $1.html
5 |
6 |
--------------------------------------------------------------------------------
/3rdparty/qwebdavlib/qwebdavlib.pro:
--------------------------------------------------------------------------------
1 | TEMPLATE = subdirs
2 |
3 | SUBDIRS += \
4 | qwebdavlib \
5 | qwebdavlibExample
6 |
7 |
8 |
--------------------------------------------------------------------------------
/img/128x128/doublecontact_128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarkHobbit/doublecontact/HEAD/img/128x128/doublecontact_128x128.png
--------------------------------------------------------------------------------
/img/256x256/doublecontact_256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarkHobbit/doublecontact/HEAD/img/256x256/doublecontact_256x256.png
--------------------------------------------------------------------------------
/img/512x512/doublecontact_512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarkHobbit/doublecontact/HEAD/img/512x512/doublecontact_512x512.png
--------------------------------------------------------------------------------
/pack/appimage/AppRun:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | HERE="$(dirname "$(readlink -f "${0}")")"
4 | EXEC="${HERE}/usr/bin/doublecontact"
5 | exec "${EXEC}"
--------------------------------------------------------------------------------
/testdata/enc_utf8_cyr.vcf:
--------------------------------------------------------------------------------
1 | BEGIN:VCARD
2 | VERSION:3.0
3 | N:Олег;Ермолов;;;
4 | FN:Ермолов Олег
5 | TEL;TYPE=CELL:+79107654321
6 | END:VCARD
7 |
--------------------------------------------------------------------------------
/tests/carddav-owncloud-get.bat:
--------------------------------------------------------------------------------
1 | contconv.exe -i https://user:bitnami@192.168.56.101/remote.php/carddav/addressbooks/user/contacts -n carddav -o test.vcf -f vcf40 -w
2 |
--------------------------------------------------------------------------------
/contconv/README.md:
--------------------------------------------------------------------------------
1 | # Contconv
2 |
3 | Command-line contact convertor based on common DoubleContact code.
4 |
5 | Run `contconv` without arguments to get help.
6 |
7 |
--------------------------------------------------------------------------------
/pack/deb/DEBIAN/menu.ex:
--------------------------------------------------------------------------------
1 | ?package(doublecontact):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\
2 | title="doublecontact" command="/usr/bin/doublecontact"
3 |
--------------------------------------------------------------------------------
/3rdparty/quazip/quazip/run_moc.bat:
--------------------------------------------------------------------------------
1 | moc -o moc\moc_quazipfile.cpp quazipfile.h
2 | moc -o moc\moc_quagzipfile.cpp quagzipfile.h
3 | moc -o moc\moc_quaziodevice.cpp quaziodevice.h
4 |
--------------------------------------------------------------------------------
/3rdparty/quazip/qztest/coverage.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | lcov --capture -b ../quazip -d ../quazip/.obj --output-file cov.info
3 | genhtml --demangle-cpp cov.info --output-directory cov
4 |
--------------------------------------------------------------------------------
/3rdparty/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | cmake_minimum_required(VERSION 3.5)
3 |
4 | add_subdirectory(quazip/quazip)
5 |
6 | if (WITH_NETWORK)
7 | add_subdirectory(qwebdavlib/qwebdavlib)
8 | endif ()
9 |
--------------------------------------------------------------------------------
/img/README.icons:
--------------------------------------------------------------------------------
1 | Doublecontact icons made by Freepik from www.flaticon.com
2 | http://www.flaticon.com/free-icon/phone-book_16106#term=phone%20book&page=1&position=4
3 | http://www.freepik.com/
4 |
--------------------------------------------------------------------------------
/tests/carddav-nextcloud-get:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ./contconv -i https://OldUser@cloud.zaurus.ru/nextcloud/remote.php/dav/addressbooks/users/OldUser/contacts -n carddav -o test.vcf -f vcf40 -w
4 |
--------------------------------------------------------------------------------
/tests/castxmlcall:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | castxml ../core/globals.cpp --castxml-gccxml -o ./out.xml -I ../model -I ../core -I /usr/include/qt4/QtCore -I /usr/include/qt4/QtGui -I /usr/include/qt4
4 |
--------------------------------------------------------------------------------
/all.pro:
--------------------------------------------------------------------------------
1 | # Meta-project for all DoubleContact targets
2 |
3 | DEFINES += WITH_NETWORK
4 |
5 | TEMPLATE = subdirs
6 |
7 | SUBDIRS = \
8 | ./app/doublecontact.pro \
9 | ./contconv
10 |
--------------------------------------------------------------------------------
/pack/appimage/README:
--------------------------------------------------------------------------------
1 | On Ubuntu 18.04:
2 | sudo apt-get install appstream
3 | (without it, appstreamcli command not found)
4 | sudo apt-get install curl
5 | (without it, metadata cannot be verified)
6 |
7 |
--------------------------------------------------------------------------------
/3rdparty/quazip/includes.pri:
--------------------------------------------------------------------------------
1 | OBJECTS_DIR = .obj
2 | MOC_DIR = .moc
3 |
4 | unix {
5 | isEmpty(PREFIX): PREFIX=/usr/local
6 | }
7 |
8 | win32 {
9 | isEmpty(PREFIX): warning("PREFIX unspecified, make install won't work")
10 | }
11 |
--------------------------------------------------------------------------------
/pack/ann/README.ann:
--------------------------------------------------------------------------------
1 | Scripts for announces translation (changelog, full feature list) from markdowm to bbcode and HTML
2 |
3 | Manual markdown to HTML: https://markdowntohtml.com/ :
4 | - TODO local links not processed
5 | - TODO auto-set laquo and raquo
6 |
7 |
--------------------------------------------------------------------------------
/app/doublecontact.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | ../img/16x16/del.png
4 | ../img/16x16/doublecontact_16x16.png
5 | ../img/64x64/doublecontact_64x64.png
6 |
7 |
8 |
--------------------------------------------------------------------------------
/pack/make-bin-current.bat:
--------------------------------------------------------------------------------
1 | set PKG_NAME=doublecontact_current_win32_portable
2 | set PKG_DIR=..\%PKG_NAME%
3 |
4 | call .\make-bin-image.bat .. ..\..\build-all-Qt_4_8_6_st-Release C:\Qt\2009.05\mingw C:\Qt\4.8.6.st %PKG_DIR%
5 | copy .\zip\doublecontact.ini %PKG_DIR%\doublecontact.ini
6 |
--------------------------------------------------------------------------------
/3rdparty/qwebdavlib/qwebdavlibExample/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include "qexample.h"
4 |
5 | int main(int argc, char *argv[])
6 | {
7 | QCoreApplication a(argc, argv);
8 |
9 | QExample e;
10 | e.start();
11 |
12 | return a.exec();
13 | }
14 |
--------------------------------------------------------------------------------
/pack/deb/make-debianized-src:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | DC_VER=$1
4 | if [ -z "$DC_VER" ]
5 | then
6 | echo "Version number is missing"
7 | exit 1
8 | fi
9 |
10 | cd ../..
11 | git archive master --format=tar --prefix=doublecontact-${DC_VER}/ | tar xf -
12 | cp -R pack/deb/debian doublecontact-${DC_VER}/
--------------------------------------------------------------------------------
/pack/txz/remove-doublecontact-root-build:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | rm -rf /usr/bin/doublecontact
4 | rm -rf /usr/bin/contconv
5 |
6 | rm -rf /usr/share/doublecontact
7 | rm -rf /usr/share/applications/doublecontact.desktop
8 | rm -rf /usr/share/pixmaps/doublecontact_32x32.xpm
9 | rm -rf /usr/share/doc/doublecontact
10 |
11 |
--------------------------------------------------------------------------------
/testdata/semicolon.vcf:
--------------------------------------------------------------------------------
1 | BEGIN:VCARD
2 | VERSION:3.0
3 | N:Cucykoff;Michael
4 | TEL;TYPE=CELL:+79131133268
5 | NOTE;CHARSET=UTF-8:ООО Глобус\; собирает исходные данные
6 | LABEL;TYPE=dom,home,postal,parcel:Mr.John Q. Public\, Esq.\nMail Drop: TNE QB\n123 Main Street\nAny Town\, CA 91921-1234\nU.S.A.
7 | X-UNKNOWN:String \; one; String two
8 | END:VCARD
9 |
--------------------------------------------------------------------------------
/3rdparty/quazip/qztest/testquazipfileinfo.h:
--------------------------------------------------------------------------------
1 | #ifndef TESTQUAZIPFILEINFO_H
2 | #define TESTQUAZIPFILEINFO_H
3 |
4 | #include
5 |
6 | class TestQuaZipFileInfo : public QObject
7 | {
8 | Q_OBJECT
9 | public:
10 | explicit TestQuaZipFileInfo(QObject *parent = 0);
11 | private slots:
12 | void getNTFSTime();
13 | };
14 |
15 | #endif // TESTQUAZIPFILEINFO_H
16 |
--------------------------------------------------------------------------------
/3rdparty/quazip/qztest/testquazipnewinfo.h:
--------------------------------------------------------------------------------
1 | #ifndef TESTQUAZIPNEWINFO_H
2 | #define TESTQUAZIPNEWINFO_H
3 |
4 | #include
5 |
6 | class TestQuaZipNewInfo : public QObject
7 | {
8 | Q_OBJECT
9 | public:
10 | explicit TestQuaZipNewInfo(QObject *parent = 0);
11 | private slots:
12 | void setFileNTFSTimes();
13 | };
14 |
15 | #endif // TESTQUAZIPNEWINFO_H
16 |
--------------------------------------------------------------------------------
/testdata/custom_nonlatin_a8.vcf:
--------------------------------------------------------------------------------
1 | BEGIN:VCARD
2 | VERSION:2.1
3 | N;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=D0=9F=D1=80=D0=B5=D0=BA=D1=80=D0=B0=D1=81=D0=BD=D0=B0=D1=8F;=D0=92=D0=B0=D1=81=D0=B8=D0=BB=D0=B8=D1=81=D0=B0;;;
4 | X-ANDROID-CUSTOM;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:vnd.android.cursor.item/relation;=D0=98=D0=B1=D1=80=D0=B0=D0=B3=D0=B8=D0=BC=D0=BE=D0=B2;=34;;;;;;;;;;;;;
5 | END:VCARD
6 |
--------------------------------------------------------------------------------
/doc/build-samples/buildstat-486.bat:
--------------------------------------------------------------------------------
1 | SET QTDIR=c:\Qt\4.8.6.st
2 | SET MINGWDIR=c:\Qt\2009.05\mingw
3 | SET QMAKESPEC=win32-g++
4 |
5 | SET PATH=%PATH%;%QTDIR%\bin;%MINGWDIR%\bin
6 |
7 | configure -opensource -confirm-license -platform win32-g++ -static -release -no-exceptions -qt-zlib -qt-libpng -qt-libmng -qt-libjpeg -no-qt3support -no-phonon -no-webkit -nomake examples -nomake demos -prefix %QTDIR%
8 | mingw32-make
--------------------------------------------------------------------------------
/pack/zip/make-zip-pkg.sample.bat:
--------------------------------------------------------------------------------
1 | Rem Change paths to build and MinGW!
2 |
3 | set PKG_NAME=doublecontact_0.2.5beta3_win32_portable
4 | set PKG_DIR=..\..\%PKG_NAME%
5 |
6 | call ..\make-bin-image.bat ..\.. ..\..\..\build-all-Qt_4_8_6_st-Release C:\Qt\2009.05\mingw C:\Qt\4.8.6.st %PKG_DIR%
7 | copy doublecontact.ini %PKG_DIR%\doublecontact.ini
8 |
9 | cd %PKG_DIR%\..
10 | zip -r -9 %PKG_NAME%.zip %PKG_NAME%
11 |
--------------------------------------------------------------------------------
/tests/diff_ui:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Search differences between two *.ui files ignoring line numbers and obsolete mark
4 |
5 | SKIPPED_ATTRIBUTES='-e s/line=\"[0-9]*\"// -e s/\stype=\"obsolete\"//'
6 |
7 | sed ${SKIPPED_ATTRIBUTES} $1 > ${TMPDIR}/diffxml1
8 | sed ${SKIPPED_ATTRIBUTES} $2 > ${TMPDIR}/diffxml2
9 | diff -u ${TMPDIR}/diffxml1 ${TMPDIR}/diffxml2
10 | rm ${TMPDIR}/diffxml1
11 | rm ${TMPDIR}/diffxml2
12 |
13 |
--------------------------------------------------------------------------------
/testdata/csv_gen.csv:
--------------------------------------------------------------------------------
1 | "VERSION","FN","N","TEL;CELL","TEL;HOME","TEL;WORK","TEL;WORK","EMAIL;INTERNET","NOTE","ADR;HOME","IMPP;XMPP","LABEL","UNKNOWN"
2 | "2.1","James Smith","Smith","","233322","+19991112233","","james@smith.pp","","","jsmith@jabber.org","other data test",""
3 | "2.1","Jane Doe","Doe","+16541234567","","7766-3322","3344-1100","","add first name","321;66;Summertime;New York;==;123456789;USA","","","unknown data test"
4 |
--------------------------------------------------------------------------------
/translations/iso639-1.utf8:
--------------------------------------------------------------------------------
1 | de German Deutsch
2 | fr French Français
3 | en English English
4 | en_GB English (UnitedKingdom) English (United Kingdom)
5 | et Estonian Eesti keel
6 | ie Interlingue Interlingue
7 | nb_NO Norwegian Bokmål Norsk bokmål
8 | nl Dutch Nederlands
9 | pt Portuguese Português
10 | pt_BR Portuguese Português brasileiro
11 | ru_RU Russian Русский
12 | uk_UA Ukrainian Українська
13 | zh_Hant Chinese (Traditional) 简体中文
14 |
--------------------------------------------------------------------------------
/pack/exe/make-exe-pkg.sample.bat:
--------------------------------------------------------------------------------
1 | Rem This script requires Inno Setup
2 | Rem Change paths to build, MinGW and Inno Setup!
3 |
4 | set PKG_DIR=..\..\doublecontact_0.2.5beta3_win32
5 |
6 | call ..\make-bin-image.bat ..\.. ..\..\..\build-all-Qt_4_8_6_st-Release C:\Qt\2009.05\mingw C:\Qt\4.8.6.st %PKG_DIR%
7 | copy doublecontact.iss %PKG_DIR%\doublecontact.iss
8 |
9 | cd %PKG_DIR%
10 | "C:\Program Files (x86)\Inno Setup 5\Compil32.exe" /cc doublecontact.iss
11 | cd Output
12 |
--------------------------------------------------------------------------------
/3rdparty/qwebdavlib/qwebdavlib/qwebdavlib.pri:
--------------------------------------------------------------------------------
1 | QT += network xml
2 | INCLUDEPATH += $$PWD
3 | DEPENDPATH += $$PWD
4 |
5 | DEFINES += QWEBDAV_LIBRARY
6 |
7 | SOURCES += \
8 | $$PWD/qwebdav.cpp \
9 | $$PWD/qwebdavitem.cpp \
10 | $$PWD/qwebdavdirparser.cpp \
11 | $$PWD/qnaturalsort.cpp
12 |
13 | HEADERS += \
14 | $$PWD/qwebdav.h \
15 | $$PWD/qwebdavitem.h \
16 | $$PWD/qwebdavdirparser.h \
17 | $$PWD/qnaturalsort.h \
18 | $$PWD/qwebdav_global.h
19 |
20 |
--------------------------------------------------------------------------------
/doc/build-samples/buildstat-510.bat:
--------------------------------------------------------------------------------
1 | SET QTDIR=c:\Qt\5.10.0.st
2 | SET MINGWDIR=C:\Qt\5.10.0\Tools\mingw530_32
3 | SET PYTHON2DIR=C:\QNX650\host\win32\x86\unsupported\Python25
4 | SET PATH=%PATH%;%QTDIR%\bin;%MINGWDIR%\bin;%PYTHON2DIR%
5 | call configure -I "c:\Qt\3dparty\openssl-1.0.2m\include" -L "c:\Qt\3dparty\openssl-1.0.2m" -opensource -confirm-license -platform win32-g++ -static -release -opengl desktop -qt-zlib -qt-libpng -qt-libjpeg -openssl -nomake examples -prefix %QTDIR%
6 | mingw32-make
7 | mingw32-make install
8 |
--------------------------------------------------------------------------------
/testdata/csv_gen_nonlatin.csv:
--------------------------------------------------------------------------------
1 | "VERSION","FN","N","TEL;CELL","TEL;HOME","TEL;WORK","TEL;WORK","EMAIL;INTERNET","NOTE","ADR;HOME","IMPP;XMPP","LABEL","UNKNOWN"
2 | "2.1","James Smith","Smith","","233322","+19991112233","","james@smith.pp","","","jsmith@jabber.org","other data test",""
3 | "2.1","Jane Doe","Doe","+16541234567","","7766-3322","3344-1100","","add first name","321;66;Summertime;New York;==;123456789;USA","","","unknown data test"
4 | "2.1","Александр Иванов","Иванов;Александр","+79991234567","","","","","","","","",""
5 |
--------------------------------------------------------------------------------
/img/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | cmake_minimum_required(VERSION 3.5)
3 |
4 | if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
5 | install(FILES uchmviewer.png DESTINATION ${APP_ICONS_INSTALL_DIR})
6 | elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
7 | install(
8 | FILES
9 | 32x32/doublecontact_32x32.xpm
10 | DESTINATION ${APP_IMG_PATH})
11 | elseif (&{CMAKE_SYSTEM_NAME} MATCHES "Windows")
12 | install(
13 | FILES
14 | 32x32/doublecontact_32x32.png
15 | DESTINATION ${APP_IMG_PATH})
16 | endif ()
17 |
--------------------------------------------------------------------------------
/testdata/contacts.xml:
--------------------------------------------------------------------------------
1 |
2 | BEGIN:VCARD
3 | VERSION:3.0
4 | PRODID:-//Apple Inc.//iOS 9.2//EN
5 | ORG:Мегаполис Сервис;
6 | TEL;type=HOME;type=VOICE;type=pref:+74958887766
7 | END:VCARD
8 | BEGIN:VCARD
9 | VERSION:3.0
10 | PRODID:-//Apple Inc.//iOS 9.2//EN
11 | N:Алек;Костя;;;
12 | FN:Александров Константин
13 | TEL;type=HOME;type=VOICE;type=pref:+79051234567
14 | END:VCARD
15 |
--------------------------------------------------------------------------------
/3rdparty/quazip/qztest/run_moc.bat:
--------------------------------------------------------------------------------
1 | moc -o moc\moc_testjlcompress.cpp testjlcompress.h
2 | moc -o moc\moc_testquachecksum32.cpp testquachecksum32.h
3 | moc -o moc\moc_testquazip.cpp testquazip.h
4 | moc -o moc\moc_testquazipfile.cpp testquazipfile.h
5 | moc -o moc\moc_testquazipdir.cpp testquazipdir.h
6 | moc -o moc\moc_testquagzipfile.cpp testquagzipfile.h
7 | moc -o moc\moc_testquaziodevice.cpp testquaziodevice.h
8 | moc -o moc\moc_testquazipfileinfo.cpp testquazipfileinfo.h
9 | moc -o moc\moc_testquazipnewinfo.cpp testquazipnewinfo.h
10 |
--------------------------------------------------------------------------------
/pack/deb/control-qt4:
--------------------------------------------------------------------------------
1 | Source: doublecontact
2 | Section: misc
3 | Priority: optional
4 | Maintainer: Mikhail Y. Zvyozdochkin
5 | Build-Depends: debhelper (>= 9)
6 | Standards-Version: 3.9.5
7 | Homepage: https://github.com/DarkHobbit/doublecontact
8 | #Vcs-Git: https://github.com/DarkHobbit/doublecontact.git
9 | #Vcs-Browser: https://github.com/DarkHobbit/doublecontact
10 | Package: doublecontact
11 | Depends: libc6 (>= 2.4), libqtcore4 (>= 4.8), libqtgui4 (>= 4.8)
12 | Description: offline DE-independent contact manager
13 |
--------------------------------------------------------------------------------
/testdata/csv_gen.vcf:
--------------------------------------------------------------------------------
1 | BEGIN:VCARD
2 | VERSION:2.1
3 | N:Smith
4 | FN:James Smith
5 | TEL;HOME:233322
6 | TEL;WORK:+19991112233
7 | EMAIL;INTERNET:james@smith.pp
8 | X-JABBER:jsmith@jabber.org
9 | LABEL:other data test
10 | END:VCARD
11 | BEGIN:VCARD
12 | VERSION:2.1
13 | N:Doe
14 | FN:Jane Doe
15 | TEL;WORK:7766-3322
16 | TEL;WORK:3344-1100
17 | TEL;CELL:+16541234567
18 | ADR;HOME;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:321;66;Summertime;New York=
19 | ;=3D=3D;123456789;USA
20 | NOTE:add first name
21 | UNKNOWN:unknown data test
22 | END:VCARD
23 |
--------------------------------------------------------------------------------
/pack/deb/control-qt5:
--------------------------------------------------------------------------------
1 | Source: doublecontact
2 | Section: misc
3 | Priority: optional
4 | Maintainer: Mikhail Y. Zvyozdochkin
5 | Build-Depends: debhelper (>= 9)
6 | Standards-Version: 3.9.5
7 | Homepage: https://github.com/DarkHobbit/doublecontact
8 | #Vcs-Git: https://github.com/DarkHobbit/doublecontact.git
9 | #Vcs-Browser: https://github.com/DarkHobbit/doublecontact
10 | Package: doublecontact
11 | Depends: libc6 (>= 2.28), libqt5gui5 (>= 5.11), libqt5xml5 (>= 5.11)
12 | Description: offline DE-independent contact manager
13 |
--------------------------------------------------------------------------------
/contconv/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | cmake_minimum_required (VERSION 3.5)
3 |
4 | project(ContConv LANGUAGES CXX)
5 |
6 | add_executable(contconv)
7 | set_target_properties(contconv PROPERTIES AUTOMOC ON)
8 | target_link_libraries(contconv Qt::Core S_CORE)
9 |
10 | install(TARGETS contconv DESTINATION ${APP_BIN_PATH})
11 |
12 | target_sources(contconv
13 | PRIVATE
14 | # HEADERS
15 | ################
16 | convertor.h
17 | consoleasyncui.h
18 | # SOURCES
19 | ################
20 | main.cpp
21 | convertor.cpp
22 | consoleasyncui.cpp
23 | )
24 |
--------------------------------------------------------------------------------
/pack/rpm/make-rpm-pkg:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Example: make-rpm-pkg 0.2.4 4
4 |
5 | DC_VER=$1
6 | QT_MAJV=$2
7 | QTTR_DIR=/usr/share/qt${QT_MAJV}/translations
8 |
9 | if [ -z "$DC_VER" ]
10 | then
11 | echo "Version number is missing"
12 | exit 1
13 | fi
14 |
15 | PKG_NAME=doublecontact_${DC_VER}_amd64
16 |
17 | # cd .
18 | ../make-bin-image ../.. ../.. ../../${PKG_NAME} ${QTTR_DIR}
19 | if [ $? -ne 0 ]; then
20 | echo "make-bin-image failed!"
21 | exit 1
22 | fi
23 | # TODO change version number and arch in control file
24 | rpmbuild -bb --buildroot `pwd`/../../${PKG_NAME} ./doublecontact.spec
25 |
--------------------------------------------------------------------------------
/core/formats/network/imageloader.cpp:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: HTTP(s) images loader
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #include "imageloader.h"
14 |
15 | ImageLoader::ImageLoader(QObject *parent) : QObject(parent)
16 | {
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/pack/txz/make-txz-pkg:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Example: make-txz-pkg 0.2.4 /opt/Qt/5.12.12.st
4 |
5 | DC_VER=$1
6 | QT_DIR=$2
7 | QTTR_DIR=${QT_DIR}/translations
8 |
9 | if [ -z "$DC_VER" ]
10 | then
11 | echo "Version number is missing"
12 | exit 1
13 | fi
14 |
15 | PKG_NAME=doublecontact_${DC_VER}_amd64
16 |
17 | # cd .
18 | ../make-bin-image ../.. ../../../build-doublecontact ../../../${PKG_NAME} ${QTTR_DIR}
19 | if [ $? -ne 0 ]; then
20 | echo "make-bin-image failed!"
21 | exit 1
22 | fi
23 | cp ./remove-doublecontact-root-build ../../../${PKG_NAME}/
24 | tar -cJf ../../../${PKG_NAME}.tar.xz `pwd`/../../../${PKG_NAME}
25 |
26 |
--------------------------------------------------------------------------------
/app/doublecontact.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Version=1.0
3 | Type=Application
4 | Name=DoubleContact
5 | Name[ru]=DoubleContact
6 | GenericName=Contact manager
7 | GenericName[ru]=Редактор контактов
8 | GenericName[uk]=Редактор контактів
9 | Comment=Contact manager primarily for phonebooks editing/merging
10 | Comment[ru]=Редактор контактов, преимущественно ориентированный на редактирование, сравнение и слияние телефонных книг
11 | Comment[uk]=Редактор контактів, переважно орієнтований на редагування, порівняння та об'єднання телефонних книг
12 | Exec=doublecontact %U
13 | TryExec=doublecontact
14 | Icon=doublecontact_32x32
15 | Terminal=false
16 | Categories=Office;ContactManagement
17 |
--------------------------------------------------------------------------------
/model/modelhelpers.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Model Helpers
4 | *
5 | * Copyright 2021 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef MODELHELPERS_H
14 | #define MODELHELPERS_H
15 |
16 | #include
17 |
18 | // Empty items - to end
19 | QVariant emptyItemsToEnd(const QVariant& src);
20 |
21 | #endif // MODELHELPERS_H
22 |
--------------------------------------------------------------------------------
/3rdparty/qwebdavlib/qwebdavlibExample/qexample.h:
--------------------------------------------------------------------------------
1 | #ifndef QEXAMPLE_H
2 | #define QEXAMPLE_H
3 |
4 | #include
5 |
6 | #include
7 | #include
8 | #include
9 |
10 | class QExample : public QObject
11 | {
12 | Q_OBJECT
13 |
14 | QWebdav w;
15 | QWebdavDirParser p;
16 | QString m_path;
17 | QList m_replyList;
18 |
19 | public:
20 | QExample(QObject* parent = 0);
21 |
22 | signals:
23 |
24 | public slots:
25 | void printList();
26 | void printError(QString errorMsg);
27 | void replySkipRead();
28 |
29 | public:
30 | void start();
31 |
32 | };
33 |
34 | #endif // QEXAMPLE_H
35 |
--------------------------------------------------------------------------------
/model/model.pri:
--------------------------------------------------------------------------------
1 | # Model-related part of DoubleContact
2 |
3 | QT += gui
4 |
5 | INCLUDEPATH += $$PWD
6 |
7 | HEADERS += \
8 | $$PWD/contactmodel.h \
9 | $$PWD/innerfilemodel.h \
10 | $$PWD/modelhelpers.h \
11 | $$PWD/recentlist.h \
12 | $$PWD/configmanager.h
13 |
14 | SOURCES += \
15 | $$PWD/contactmodel.cpp \
16 | $$PWD/innerfilemodel.cpp \
17 | $$PWD/modelhelpers.cpp \
18 | $$PWD/recentlist.cpp \
19 | $$PWD/configmanager.cpp
20 |
21 | contains(DEFINES, WITH_MESSAGES) {
22 | HEADERS += $$PWD/messagemodel.h
23 | SOURCES += $$PWD/messagemodel.cpp
24 | }
25 |
26 | contains(DEFINES, WITH_MESSAGES) {
27 | HEADERS += $$PWD/callmodel.h
28 | SOURCES += $$PWD/callmodel.cpp
29 | }
30 |
--------------------------------------------------------------------------------
/pack/rpm/doublecontact.spec:
--------------------------------------------------------------------------------
1 | Summary: The Contact manager
2 | Name: doublecontact
3 | Version: 0.2.5beta3
4 | Release: 20200821.f29
5 | Group: Applications/PIM
6 | License: GPL v3 or above (some parts under GPL v2)
7 | Packager: Mikhail Y. Zvyozdochkin
8 |
9 | %define ubin /usr/bin
10 | %define ushare /usr/share
11 |
12 | %Description
13 | Offline DE-independent Qt-based contact manager primarily for phonebooks editing/merging
14 |
15 | %Files
16 |
17 | %defattr(-,root,root)
18 |
19 | %{ubin}/doublecontact
20 | %{ubin}/contconv
21 | %{ushare}/doublecontact/translations/*
22 | %{ushare}/doc/doublecontact/*
23 | %{ushare}/applications/*
24 | %{ushare}/pixmaps/*
25 | %Pre
26 |
27 | %Post
28 |
29 | %Preun
30 |
31 | %Postun
32 |
--------------------------------------------------------------------------------
/model/modelhelpers.cpp:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Model Helpers
4 | *
5 | * Copyright 2021 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #include
15 | #include "modelhelpers.h"
16 |
17 | QVariant emptyItemsToEnd(const QVariant &src)
18 | {
19 | if (src.toString().isEmpty())
20 | return QString("\uFFFD");
21 | else
22 | return src;
23 | }
24 |
--------------------------------------------------------------------------------
/3rdparty/qwebdavlib/qwebdavlib/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | cmake_minimum_required(VERSION 3.5)
3 |
4 | add_library(qwebdav STATIC)
5 | set_target_properties(qwebdav PROPERTIES AUTOMOC ON)
6 | target_link_libraries(qwebdav PUBLIC Qt::Core Qt::Network Qt::Xml)
7 | target_include_directories(qwebdav PUBLIC .)
8 | target_compile_definitions(qwebdav PRIVATE QWEBDAV_LIBRARY)
9 |
10 | target_sources(qwebdav
11 | PRIVATE
12 | # HEADERS
13 | ################
14 | qwebdav.h
15 | qwebdavitem.h
16 | qwebdavdirparser.h
17 | qnaturalsort.h
18 | qwebdav_global.h
19 | # SOURCES
20 | ################
21 | qwebdav.cpp
22 | qwebdavitem.cpp
23 | qwebdavdirparser.cpp
24 | qnaturalsort.cpp
25 | )
26 |
--------------------------------------------------------------------------------
/contconv/contconv.pro:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------
2 | #
3 | # Project created by QtCreator 2016-10-30T20:09:54
4 | #
5 | #-------------------------------------------------
6 |
7 | QT += core
8 | QT -= gui
9 | greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat
10 | DEFINES -= WITH_NETWORK
11 | include(../core/core.pri)
12 |
13 | TARGET = contconv
14 | CONFIG += console
15 | CONFIG -= app_bundle
16 |
17 |
18 | TEMPLATE = app
19 |
20 |
21 | SOURCES += main.cpp \
22 | convertor.cpp \
23 | consoleasyncui.cpp
24 |
25 | HEADERS += \
26 | convertor.h \
27 | consoleasyncui.h
28 |
29 | unix {
30 | OBJECTS_DIR = .obj
31 | MOC_DIR = .moc
32 | }
33 |
--------------------------------------------------------------------------------
/3rdparty/qwebdavlib/qwebdavlib/qwebdavlib.pro:
--------------------------------------------------------------------------------
1 | QT += network xml
2 |
3 | # for a qwebdavlib without support for GUI
4 | QT -= gui
5 |
6 | TARGET = qwebdav
7 | TEMPLATE = lib
8 |
9 | # Enable DEBUG output with qDebug()
10 | DEFINES += DEBUG_WEBDAV
11 |
12 | # Enable extended WebDAV properties (see QWebDavItem.h/cpp)
13 | #DEFINES += QWEBDAVITEM_EXTENDED_PROPERTIES
14 |
15 | # DO NOT REMOVE - REQUIRED BY qwebdav_global.h
16 | DEFINES += QWEBDAV_LIBRARY
17 |
18 | SOURCES += qwebdav.cpp \
19 | qwebdavitem.cpp \
20 | qwebdavdirparser.cpp \
21 | qnaturalsort.cpp
22 |
23 | HEADERS += qwebdav.h \
24 | qwebdavitem.h \
25 | qwebdavdirparser.h \
26 | qnaturalsort.h \
27 | qwebdav_global.h
28 |
29 | OTHER_FILES += \
30 | CHANGES \
31 | LICENSE \
32 | README
33 |
--------------------------------------------------------------------------------
/core/formats/network/imageloader.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: HTTP(s) images loader
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef IMAGELOADER_H
14 | #define IMAGELOADER_H
15 |
16 | #include
17 | class ImageLoader : public QObject
18 | {
19 | Q_OBJECT
20 | public:
21 | explicit ImageLoader(QObject *parent = 0);
22 |
23 | signals:
24 |
25 | public slots:
26 | };
27 |
28 | #endif // IMAGELOADER_H
29 |
--------------------------------------------------------------------------------
/contconv/main.cpp:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: console convertor main module
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #include "convertor.h"
15 | #ifdef Q_WS_WIN
16 | #include
17 | #endif
18 |
19 | int main(int argc, char *argv[])
20 | {
21 | #ifdef Q_WS_WIN
22 | Sleep(500); // for Qt Creator for Windows
23 | #endif
24 | Convertor a(argc, argv);
25 | int res = a.start();
26 | a.exit(res);
27 | return res;
28 | }
29 |
--------------------------------------------------------------------------------
/pack/make-bin-image.bat:
--------------------------------------------------------------------------------
1 | set SRC_DIR=%1
2 | set EXE_DIR=%2
3 | set MGW_DIR=%3
4 | set QT_DIR=%4
5 | set PKG_DIR=%5
6 |
7 | set BIN_PATH=%PKG_DIR%
8 | set TRANS_PATH=%PKG_DIR%
9 | set DOC_PATH=%PKG_DIR%\doc
10 |
11 | md %BIN_PATH%
12 | md %DOC_PATH%
13 |
14 | copy %EXE_DIR%\app\release\doublecontact.exe %BIN_PATH%\
15 | copy %EXE_DIR%\contconv\release\contconv.exe %BIN_PATH%\
16 | copy %SRC_DIR%\img\32x32\doublecontact_32x32.png %BIN_PATH%\
17 | copy %SRC_DIR%\translations\*.qm %TRANS_PATH%\
18 | copy %QT_DIR%\translations\qt_??.qm %TRANS_PATH%\
19 | copy %QT_DIR%\translations\qt_??_*.qm %TRANS_PATH%\
20 | copy %SRC_DIR%\translations\iso639-1.utf8 %TRANS_PATH%\
21 | copy %SRC_DIR%\doc\* %DOC_PATH%\
22 | copy %SRC_DIR%\COPYING %DOC_PATH%\
23 | copy %SRC_DIR%\README.md %DOC_PATH%\
24 | copy %MGW_DIR%\bin\libgcc_s_dw2-1.dll %BIN_PATH%\
25 | rem copy %MGW_DIR%\bin\mingwm10.dll %BIN_PATH%\
--------------------------------------------------------------------------------
/app/aboutdialog.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: About dialog
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef ABOUTDIALOG_H
15 | #define ABOUTDIALOG_H
16 |
17 | #include
18 |
19 | namespace Ui {
20 | class AboutDialog;
21 | }
22 |
23 | class AboutDialog : public QDialog
24 | {
25 | Q_OBJECT
26 |
27 | public:
28 | explicit AboutDialog(QWidget *parent = 0);
29 | ~AboutDialog();
30 |
31 | private:
32 | Ui::AboutDialog *ui;
33 | };
34 |
35 | #endif // ABOUTDIALOG_H
36 |
--------------------------------------------------------------------------------
/pack/dmg/make-dmg-pkg:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Example: make-dmg-pkg 0.2.4
4 | DC_VER=$1
5 |
6 | BUILD_PATH=../../../build-all-desktop_Qt_5_5_1_clang_64bit-Release
7 | QT_PATH=/Users/mac/Qt5.5.1/5.5/clang_64
8 |
9 | BUNDLE_MAC_PATH=${BUILD_PATH}/app/doublecontact.app/Contents/MacOS
10 | TRANS_PATH=${BUNDLE_MAC_PATH}/../Translations
11 | mkdir -p ${TRANS_PATH}
12 | # TODO docs
13 |
14 | cp ../../translations/*.qm ${TRANS_PATH}/
15 | cp ../../translations/iso639-1.utf8 ${TRANS_PATH}/
16 | cp ${BUILD_PATH}/contconv/contconv ${BUNDLE_MAC_PATH}/
17 | cp ./Info.plist ${BUILD_PATH}/app/doublecontact.app/Contents/
18 | # /usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${DC_VER}" ${BUILD_PATH}/app/doublecontact.app/Contents/Info.plist
19 | ${QT_PATH}/bin/macdeployqt ${BUILD_PATH}/app/doublecontact.app -dmg
20 | mv ${BUILD_PATH}/app/doublecontact.dmg ${BUILD_PATH}/app/doublecontact-${DC_VER}.dmg
--------------------------------------------------------------------------------
/doc/build-samples/build-qt-stat-512:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Need: libssl-dev
4 |
5 | # For system fonts:
6 | # libfreetype6-dev libfontconfig1-dev
7 |
8 | # For xcb:
9 | # sudo apt-get install libx11-*
10 | # sudo apt-get install libxcb-*
11 | # sudo apt-get install libxkbcommon-dev
12 | # sudo apt-get install libxkbcommon-x11-dev
13 |
14 | # -opengl desktop: mesa-common-dev, libgl1, libgl1-mesa-glx, libgl1-mesa-dri not helped
15 |
16 | QTDIR=/opt/Qt/5.12.12.st
17 |
18 | sudo mkdir -p ${QTDIR}
19 |
20 | ./configure -opensource -confirm-license -platform linux-g++ -static -release \
21 | -skip qtwebengine -skip declarative -no-opengl \
22 | -qt-xcb -I /usr/include/xcb/ -L /usr/lib/x86_64-linux/gnu/ \
23 | -fontconfig -feature-freetype -system-freetype FREETYPE_INCDIR=/usr/include/freetype2 \
24 | -qt-zlib -qt-libpng -qt-libjpeg -openssl-linked -nomake examples -prefix ${QTDIR}
25 |
26 | make
27 | sudo make install
--------------------------------------------------------------------------------
/pack/dmg/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleExecutable
6 | doublecontact
7 | CFBundleGetInfoString
8 | Created by Mikhail Y. Zvyozdochkin under GPLv3+
9 | CFBundleIconFile
10 | doublecontact.icns
11 | CFBundleIdentifier
12 | org.darkhobbit.doublecontact
13 | CFBundlePackageType
14 | APPL
15 | CFBundleShortVersionString
16 | 0.2.5 beta 3
17 | CFBundleSignature
18 | ????
19 | NOTE
20 | This file was generated by Qt/QMake.
21 | NSPrincipalClass
22 | NSApplication
23 |
24 |
25 |
--------------------------------------------------------------------------------
/core/formats/formatfactory.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Creator of file/network export/import format classes
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef FORMATFACTORY_H
14 | #define FORMATFACTORY_H
15 |
16 | #include
17 | #include
18 | #include "iformat.h"
19 |
20 | class FormatFactory
21 | {
22 | public:
23 | FormatFactory();
24 | static QStringList supportedFilters(QIODevice::OpenMode mode, bool isReportFormat);
25 | IFormat* createObject(const QString& url);
26 | QString error;
27 | };
28 |
29 | #endif // FORMATFACTORY_H
30 |
--------------------------------------------------------------------------------
/3rdparty/quazip/quazip/quazip.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 10.00
3 | # Visual C++ Express 2008
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "quazip", "quazip.vcproj", "{E4AC5F56-B711-4F0E-BC83-CDE8B6CD53AD}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {E4AC5F56-B711-4F0E-BC83-CDE8B6CD53AD}.Debug|Win32.ActiveCfg = Debug|Win32
13 | {E4AC5F56-B711-4F0E-BC83-CDE8B6CD53AD}.Debug|Win32.Build.0 = Debug|Win32
14 | {E4AC5F56-B711-4F0E-BC83-CDE8B6CD53AD}.Release|Win32.ActiveCfg = Release|Win32
15 | {E4AC5F56-B711-4F0E-BC83-CDE8B6CD53AD}.Release|Win32.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/cmake/modules/Findlibzip.cmake:
--------------------------------------------------------------------------------
1 | # Tries to find libzip
2 |
3 | cmake_minimum_required(VERSION 3.5)
4 |
5 | find_path(libzip_INCLUDE_DIR NAMES zip.h
6 | PATHS ${libzip_ROOT}
7 | PATH_SUFFIXES libzip/include include)
8 |
9 | find_library(libzip_LIBRARY NAMES zip
10 | PATHS ${libzip_ROOT}
11 | PATH_SUFFIXES libzip/lib lib)
12 |
13 | if (libzip_INCLUDE_DIR AND libzip_LIBRARY)
14 | set(libzip_FOUND TRUE)
15 | endif ()
16 |
17 |
18 | if (libzip_FOUND)
19 | if (NOT libzip_FIND_QUIETLY)
20 | message(STATUS "Found libzip: ${libzip_LIBRARY}")
21 | endif ()
22 |
23 | add_library(libzip::zip INTERFACE IMPORTED GLOBAL)
24 | set_target_properties(libzip::zip PROPERTIES
25 | INTERFACE_INCLUDE_DIRECTORIES ${libzip_INCLUDE_DIR}
26 | INTERFACE_LINK_LIBRARIES ${libzip_LIBRARY}
27 | )
28 | elseif (libzip_FIND_REQUIRED)
29 | message(FATAL_ERROR "Could not find libzip. Please install libzip and libzip-devel packages.")
30 | endif ()
31 |
--------------------------------------------------------------------------------
/model/recentlist.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Recent opened file/directory list
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef RECENTLIST_H
15 | #define RECENTLIST_H
16 |
17 | #include
18 | #include
19 |
20 | #define MAX_RECENT_COUNT 10
21 | #define S_CLEAR_RECENT QObject::tr("Clear recent list")
22 |
23 | class RecentList : public QStringList
24 | {
25 | public:
26 | explicit RecentList();
27 | void read();
28 | void write();
29 | void addItem(const QString& path);
30 | void removeItem(const QString& path);
31 | };
32 |
33 | #endif // RECENTLIST_H
34 |
--------------------------------------------------------------------------------
/pack/deb/DEBIAN/rules:
--------------------------------------------------------------------------------
1 | #!/usr/bin/make -f
2 | # See debhelper(7) (uncomment to enable)
3 | # output every command that modifies files on the build system.
4 | #DH_VERBOSE = 1
5 |
6 | # see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
7 | DPKG_EXPORT_BUILDFLAGS = 1
8 | include /usr/share/dpkg/default.mk
9 |
10 | # see FEATURE AREAS in dpkg-buildflags(1)
11 | #export DEB_BUILD_MAINT_OPTIONS = hardening=+all
12 |
13 | # see ENVIRONMENT in dpkg-buildflags(1)
14 | # package maintainers to append CFLAGS
15 | #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
16 | # package maintainers to append LDFLAGS
17 | #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
18 |
19 |
20 | # main packaging script based on dh7 syntax
21 | %:
22 | dh $@
23 |
24 | # debmake generated override targets
25 | # This is example for Cmake (See http://bugs.debian.org/641051 )
26 | #override_dh_auto_configure:
27 | # dh_auto_configure -- \
28 | # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/3rdparty/qwebdavlib/qwebdavlibExample/qwebdavlibExample.pro:
--------------------------------------------------------------------------------
1 | QT += core network xml
2 |
3 | QT -= gui
4 |
5 | TARGET = testConsole
6 | CONFIG += console
7 | CONFIG -= app_bundle
8 |
9 | TEMPLATE = app
10 |
11 | SOURCES += main.cpp \
12 | qexample.cpp
13 |
14 | win32:CONFIG(release, debug|release) {
15 | # WINDOWS RELEASE
16 | PRE_TARGETDEPS += $$OUT_PWD/../qwebdavlib/release/libqwebdav.a
17 | INCLUDEPATH += $$PWD/../qwebdavlib/
18 | LIBS += -L$$OUT_PWD/../qwebdavlib/release/ -lqwebdav
19 | } else:win32:CONFIG(debug, debug|release) {
20 | # WINDOWS DEBUG
21 | PRE_TARGETDEPS += $$OUT_PWD/../qwebdavlib/debug/libqwebdav.a
22 | INCLUDEPATH += $$PWD/../qwebdavlib/
23 | LIBS += -L$$OUT_PWD/../qwebdavlib/debug/ -lqwebdav
24 | }
25 | unix {
26 | # PRE_TARGETDEPS += $$OUT_PWD/../qwebdavlib/libqwebdav.a
27 | INCLUDEPATH += $$OUT_PWD/../qwebdavlib/
28 | LIBS += -L$$OUT_PWD/../qwebdavlib/ -lqwebdav
29 | }
30 |
31 | HEADERS += \
32 | qexample.h
33 |
--------------------------------------------------------------------------------
/app/sortdialog.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Hard sorting parameters dialog
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef SORTDIALOG_H
14 | #define SORTDIALOG_H
15 |
16 | #include
17 | #include "contactlist.h"
18 |
19 | namespace Ui {
20 | class SortDialog;
21 | }
22 |
23 | class SortDialog : public QDialog
24 | {
25 | Q_OBJECT
26 |
27 | public:
28 | explicit SortDialog(QWidget *parent = 0);
29 | ~SortDialog();
30 | ContactList::SortType getData();
31 | void setData(ContactList::SortType sortType);
32 | private:
33 | Ui::SortDialog *ui;
34 | };
35 |
36 | #endif // SORTDIALOG_H
37 |
--------------------------------------------------------------------------------
/core/formats/files/htmlfile.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: HTML file report
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef HTMLFILE_H
15 | #define HTMLFILE_H
16 |
17 | #include
18 | #include
19 | #include "fileformat.h"
20 |
21 | class HTMLFile : public FileFormat
22 | {
23 | public:
24 | HTMLFile();
25 |
26 | // IFormat interface
27 | public:
28 | static QStringList supportedExtensions();
29 | static QStringList supportedFilters();
30 | virtual bool importRecords(const QString &, ContactList &, bool);
31 | virtual bool exportRecords(const QString &url, ContactList &list);
32 | };
33 |
34 | #endif // HTMLFILE_H
35 |
--------------------------------------------------------------------------------
/core/formats/files/vcfdirectory.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: VCard directory export/import
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef VCFDIR_H
15 | #define VCFDIR_H
16 |
17 | #include "fileformat.h"
18 |
19 | class VCFDirectory : public FileFormat
20 | {
21 | public:
22 | VCFDirectory();
23 | virtual ~VCFDirectory();
24 |
25 | // IFormat interface
26 | public:
27 | virtual bool setCharSet(const QString& value);
28 | bool importRecords(const QString &url, ContactList &list, bool append);
29 | bool exportRecords(const QString &url, ContactList &list);
30 | private:
31 | QString charSet;
32 | };
33 |
34 | #endif // VCFDIR_H
35 |
--------------------------------------------------------------------------------
/app/languageselectdialog.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Human language select dialog
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef LANGUAGESELECTDIALOG_H
15 | #define LANGUAGESELECTDIALOG_H
16 |
17 | #include
18 |
19 | namespace Ui {
20 | class LanguageSelectDialog;
21 | }
22 |
23 | class LanguageSelectDialog : public QDialog
24 | {
25 | Q_OBJECT
26 |
27 | public:
28 | explicit LanguageSelectDialog(QWidget *parent = 0);
29 | ~LanguageSelectDialog();
30 | static QString selectLanguage();
31 | protected:
32 | void changeEvent(QEvent *e);
33 |
34 | private:
35 | Ui::LanguageSelectDialog *ui;
36 | };
37 |
38 | #endif // LANGUAGESELECTDIALOG_H
39 |
--------------------------------------------------------------------------------
/app/multicontactdialog.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Multi contact editing dialog
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef MULTICONTACTDIALOG_H
15 | #define MULTICONTACTDIALOG_H
16 |
17 | #include
18 | #include "contactlist.h"
19 |
20 | namespace Ui {
21 | class MultiContactDialog;
22 | }
23 |
24 | class MultiContactDialog : public QDialog
25 | {
26 | Q_OBJECT
27 |
28 | public:
29 | explicit MultiContactDialog(QWidget *parent = 0);
30 | ~MultiContactDialog();
31 | void setData(const ContactItem& item, bool firstItem);
32 | void getData(ContactItem& item);
33 | private:
34 | Ui::MultiContactDialog *ui;
35 | };
36 |
37 | #endif // MULTICONTACTDIALOG_H
38 |
--------------------------------------------------------------------------------
/app/tagremovedialog.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Mass tag remove dialog
4 | *
5 | * Copyright 2021 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef TAGREMOVEDIALOG_H
14 | #define TAGREMOVEDIALOG_H
15 |
16 | #include
17 | #include "contactlist.h"
18 |
19 | namespace Ui {
20 | class TagRemoveDialog;
21 | }
22 |
23 | class TagRemoveDialog : public QDialog
24 | {
25 | Q_OBJECT
26 |
27 | public:
28 | explicit TagRemoveDialog(QWidget *parent = 0);
29 | ~TagRemoveDialog();
30 | bool setData(ContactList& contacts);
31 | QStringList getData();
32 | private slots:
33 | void on_btnSelectAll_clicked();
34 |
35 | private:
36 | Ui::TagRemoveDialog *ui;
37 | };
38 |
39 | #endif // TAGREMOVEDIALOG_H
40 |
--------------------------------------------------------------------------------
/contconv/consoleasyncui.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Console UI for network/device io with connection and timeouts
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef CONSOLEASYNCUI_H
14 | #define CONSOLEASYNCUI_H
15 |
16 | #include
17 | #include "formats/network/asyncformat.h"
18 |
19 | class ConsoleAsyncUI : public IAsyncUI
20 | {
21 | public:
22 | ConsoleAsyncUI();
23 | virtual QString inputLogin();
24 | virtual QString inputPassword();
25 | virtual bool securityConfirm(const QString& question);
26 | private:
27 | QTextStream out, in;
28 | // http://www.cplusplus.com/forum/general/12256/
29 | void echo(bool on=true);
30 | };
31 |
32 | #endif // CONSOLEASYNCUI_H
33 |
--------------------------------------------------------------------------------
/3rdparty/quazip/quazip/quazip.pri:
--------------------------------------------------------------------------------
1 | INCLUDEPATH += $$PWD
2 | DEPENDPATH += $$PWD
3 | HEADERS += \
4 | $$PWD/crypt.h \
5 | $$PWD/ioapi.h \
6 | $$PWD/JlCompress.h \
7 | $$PWD/quaadler32.h \
8 | $$PWD/quachecksum32.h \
9 | $$PWD/quacrc32.h \
10 | $$PWD/quagzipfile.h \
11 | $$PWD/quaziodevice.h \
12 | $$PWD/quazipdir.h \
13 | $$PWD/quazipfile.h \
14 | $$PWD/quazipfileinfo.h \
15 | $$PWD/quazip_global.h \
16 | $$PWD/quazip.h \
17 | $$PWD/quazipnewinfo.h \
18 | $$PWD/unzip.h \
19 | $$PWD/zip.h
20 |
21 | SOURCES += $$PWD/qioapi.cpp \
22 | $$PWD/JlCompress.cpp \
23 | $$PWD/quaadler32.cpp \
24 | $$PWD/quacrc32.cpp \
25 | $$PWD/quagzipfile.cpp \
26 | $$PWD/quaziodevice.cpp \
27 | $$PWD/quazip.cpp \
28 | $$PWD/quazipdir.cpp \
29 | $$PWD/quazipfile.cpp \
30 | $$PWD/quazipfileinfo.cpp \
31 | $$PWD/quazipnewinfo.cpp \
32 | $$PWD/unzip.c \
33 | $$PWD/zip.c
34 |
--------------------------------------------------------------------------------
/app/csvprofiledialog.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: CSV profile selection dialog
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef CSVPROFILEDIALOG_H
15 | #define CSVPROFILEDIALOG_H
16 |
17 | #include
18 | #include "../core/formats/files/csvfile.h"
19 |
20 | namespace Ui {
21 | class CSVProfileDialog;
22 | }
23 |
24 | class CSVProfileDialog : public QDialog
25 | {
26 | Q_OBJECT
27 | public:
28 | explicit CSVProfileDialog(QWidget *parent = 0);
29 | ~CSVProfileDialog();
30 | void selectProfile(CSVFile *format);
31 | private slots:
32 | void on_cbProfile_currentIndexChanged(int);
33 | private:
34 | Ui::CSVProfileDialog *ui;
35 | };
36 |
37 | #endif // CSVPROFILEDIALOG_H
38 |
--------------------------------------------------------------------------------
/core/formats/files/nbffile.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Nokia NBF backup file import
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef NBFFILE_H
15 | #define NBFFILE_H
16 |
17 | #include "fileformat.h"
18 | #include "../common/vcarddata.h"
19 |
20 | class NBFFile : public FileFormat, VCardData
21 | {
22 | public:
23 | NBFFile();
24 |
25 | // IFormat interface
26 | public:
27 | static bool detect(const QString &url);
28 | static QStringList supportedExtensions();
29 | static QStringList supportedFilters();
30 | bool importRecords(const QString &url, ContactList &list, bool append);
31 | bool exportRecords(const QString &url, ContactList &list);
32 | };
33 |
34 | #endif // NBFFILE_H
35 |
--------------------------------------------------------------------------------
/core/formats/network/asyncformat.cpp:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Abstract class for network/device io with connection and timeouts
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #include
15 | #include "asyncformat.h"
16 |
17 | AsyncFormat::AsyncFormat()
18 | :state(StateOff), ui(0)
19 | {
20 | }
21 |
22 | void AsyncFormat::setUI(IAsyncUI *ptr)
23 | {
24 | ui = ptr;
25 | }
26 |
27 | QStringList AsyncFormat::errors()
28 | {
29 | return _errors;
30 | }
31 |
32 | QString AsyncFormat::fatalError()
33 | {
34 | return _fatalError;
35 | }
36 |
37 | void AsyncFormat::pause(int msecs)
38 | {
39 | QMutex mutex;
40 | mutex.lock();
41 | mutex.tryLock(msecs);
42 | mutex.unlock();
43 | }
44 |
--------------------------------------------------------------------------------
/core/formats/common/vmessagedata.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: IrMC vMessage data import
4 | *
5 | * Copyright 2019 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef VMESSAGEDATA_H
14 | #define VMESSAGEDATA_H
15 |
16 | #include "bstring.h"
17 | #include "contactlist.h"
18 | #include "decodedmessagelist.h"
19 | #include "vdata.h"
20 |
21 | class VMessageData: public VData
22 | {
23 | public:
24 | VMessageData();
25 | bool importRecords(const BStringList& lines, DecodedMessageList& list, bool append, QStringList& errors);
26 | bool importMPBRecords(const BStringList& lines, DecodedMessageList& list, bool append, QStringList& errors, bool fromArchive);
27 | static QString readMPBMsgSubfolder(const BString& src);
28 | };
29 |
30 | #endif // VMESSAGEDATA_H
31 |
--------------------------------------------------------------------------------
/core/formats/profiles/osmoprofile.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: CSV file profile for Osmo PIM
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef OSMOPROFILE_H
14 | #define OSMOPROFILE_H
15 |
16 | #include "csvprofilebase.h"
17 |
18 | class OsmoProfile : public CSVProfileBase
19 | {
20 | public:
21 | OsmoProfile();
22 | virtual bool detect(const QStringList &header) const;
23 | // Read
24 | virtual bool importRecord(const QStringList &row, ContactItem &item, QStringList &errors, QString& fatalError);
25 | // Write
26 | virtual QStringList makeHeader();
27 | virtual bool exportRecord(QStringList &row, const ContactItem &item, QStringList &errors);
28 | private:
29 | // Helpers
30 | };
31 |
32 | #endif // OSMOPROFILE_H
33 |
--------------------------------------------------------------------------------
/app/logwindow.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Export/Import log window
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef LOGWINDOW_H
15 | #define LOGWINDOW_H
16 |
17 | #include
18 | #include
19 | #include "contactlist.h"
20 |
21 | namespace Ui {
22 | class LogWindow;
23 | }
24 |
25 | class LogWindow : public QDialog
26 | {
27 | Q_OBJECT
28 |
29 | public:
30 | explicit LogWindow(QWidget *parent = 0);
31 | ~LogWindow();
32 | void setData(const QString& path, int itemCount, const QStringList& errors);
33 |
34 | protected:
35 | void changeEvent(QEvent *e);
36 |
37 | private slots:
38 | void on_btnToClipboard_clicked();
39 |
40 | private:
41 | Ui::LogWindow *ui;
42 | };
43 |
44 | #endif // LOGWINDOW_H
45 |
--------------------------------------------------------------------------------
/core/formats/profiles/explaybm50profile.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: CSV file profile for Explay BM50
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef EXPlAYBM50PROFILE_H
14 | #define EXPlAYBM50PROFILE_H
15 |
16 | #include "csvprofilebase.h"
17 |
18 |
19 | class ExplayBM50Profile: public CSVProfileBase
20 | {
21 | public:
22 | ExplayBM50Profile();
23 | virtual bool detect(const QStringList& header) const;
24 | // Read
25 | virtual bool importRecord(const QStringList& row, ContactItem& item, QStringList& errors, QString& fatalError);
26 | // Write
27 | virtual QStringList makeHeader();
28 | virtual bool exportRecord(QStringList& row, const ContactItem& item, QStringList& errors);
29 | };
30 |
31 | #endif // EXPlAYBM50PROFILE_H
32 |
--------------------------------------------------------------------------------
/core/formats/profiles/explaytv240profile.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Abstract class for CSV file profiles
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef EXPlAYTV240PROFILE_H
14 | #define EXPlAYTV240PROFILE_H
15 |
16 | #include "csvprofilebase.h"
17 |
18 |
19 | class ExplayTV240Profile: public CSVProfileBase
20 | {
21 | public:
22 | ExplayTV240Profile();
23 | virtual bool detect(const QStringList& header) const;
24 | // Read
25 | virtual bool importRecord(const QStringList& row, ContactItem& item, QStringList&, QString& fatalError);
26 | // Write
27 | virtual QStringList makeHeader();
28 | virtual bool exportRecord(QStringList& row, const ContactItem& item, QStringList& errors);
29 | };
30 |
31 | #endif // EXPlAYTV240PROFILE_H
32 |
--------------------------------------------------------------------------------
/core/formats/files/vcffile.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: VCard file export/import
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef VCFFILE_H
15 | #define VCFFILE_H
16 |
17 | #include "fileformat.h"
18 | #include "../common/vcarddata.h"
19 |
20 | class VCFFile : public FileFormat, VCardData
21 | {
22 | public:
23 | VCFFile();
24 |
25 | // IFormat interface
26 | public:
27 | virtual bool setCharSet(const QString& value);
28 | static bool detect(const QString &url);
29 | static QStringList supportedExtensions();
30 | static QStringList supportedFilters();
31 | bool importRecords(const QString &url, ContactList &list, bool append);
32 | bool exportRecords(const QString &url, ContactList &list);
33 | };
34 |
35 | #endif // VCFFILE_H
36 |
--------------------------------------------------------------------------------
/testdata/two_records.udx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | VendorUDX
5 | DeviceUDX
6 | 1.0
7 | AgentUDX
8 | UserUDX
9 | UTF-8
10 | 873
11 | 04.01.2017
12 | CHS
13 |
14 | 2.1
15 | 2
16 | 298
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | 1
26 |
27 | ;Doe John
28 | +1-213-555-1234
29 | MMI_NVRAM
30 |
31 |
32 |
33 | 2
34 |
35 | MMI_SIM
36 | ;Попов Александр
37 | +79101234567
38 | alexpopov@spb.ru
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/app/phonetypedialog.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Phone type selection dialog
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef PHONETYPEDIALOG_H
15 | #define PHONETYPEDIALOG_H
16 |
17 | #include
18 | #include
19 | #include
20 | #include "globals.h"
21 |
22 | namespace Ui {
23 | class PhoneTypeDialog;
24 | }
25 |
26 | class PhoneTypeDialog : public QDialog
27 | {
28 | Q_OBJECT
29 |
30 | public:
31 | explicit PhoneTypeDialog(const QString& title, const StandardTypes& sTypes);
32 | ~PhoneTypeDialog();
33 | QString getData() const;
34 | static void selectType(const QString& title, const StandardTypes& sTypes, QComboBox* cbT);
35 | private:
36 | Ui::PhoneTypeDialog *ui;
37 | };
38 |
39 | #endif // PHONETYPEDIALOG_H
40 |
--------------------------------------------------------------------------------
/contconv/convertor.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: console convertor application class
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef CONVERTOR_H
15 | #define CONVERTOR_H
16 |
17 | #include
18 | #include
19 | #include
20 |
21 | #include "consoleasyncui.h"
22 | #include "formats/iformat.h"
23 | #include "formats/files/csvfile.h"
24 |
25 | class Convertor : public QCoreApplication
26 | {
27 | Q_OBJECT
28 | public:
29 | Convertor(int &argc, char **argv);
30 | int start();
31 | void printUsage();
32 | private:
33 | QTextStream out;
34 | ConsoleAsyncUI aui;
35 | void logFormat(IFormat* format);
36 | void setCSVProfile(CSVFile* csvFormat, const QString& code);
37 | };
38 |
39 | #endif // CONVERTOR_H
40 |
--------------------------------------------------------------------------------
/core/formats/profiles/sylpheedprofile.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: CSV file profile for Sylpheed Email Client (checked on Sylpheed 3.7)
4 | *
5 | * Copyright 2024 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef SYLPHEEDPROFILE_H
14 | #define SYLPHEEDPROFILE_H
15 |
16 | #include
17 | #include "csvprofilebase.h"
18 |
19 | class SylpheedProfile : public CSVProfileBase
20 | {
21 | public:
22 | SylpheedProfile();
23 | virtual bool detect(const QStringList &header) const;
24 | // Read
25 | virtual bool importRecord(const QStringList &row, ContactItem &item, QStringList &errors, QString& fatalError);
26 | // Write
27 | virtual QStringList makeHeader();
28 | virtual bool exportRecord(QStringList &row, const ContactItem &item, QStringList &errors);
29 | };
30 |
31 | #endif // SYLPHEEDPROFILE_H
32 |
--------------------------------------------------------------------------------
/core/formats/files/xmlcontactfile.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Strange XML contact file export/import
4 | *
5 | * Copyright 2018 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef XMLCONTACTFILE_H
15 | #define XMLCONTACTFILE_H
16 |
17 | #include
18 | #include "fileformat.h"
19 | #include "../common/vcarddata.h"
20 |
21 | class XmlContactFile : public FileFormat, QDomDocument, VCardData
22 | {
23 | public:
24 | XmlContactFile();
25 | // IFormat interface
26 | static bool detect(const QString &url);
27 | static QStringList supportedExtensions();
28 | static QStringList supportedFilters();
29 | bool importRecords(const QString &url, ContactList &list, bool append);
30 | bool exportRecords(const QString &/*url*/, ContactList &/*list*/);
31 | };
32 |
33 | #endif // XMLCONTACTFILE_H
34 |
--------------------------------------------------------------------------------
/model/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Model-related part of DoubleContact
2 |
3 | cmake_minimum_required(VERSION 3.5)
4 |
5 | add_library(S_MODEL STATIC)
6 | set_target_properties(S_MODEL PROPERTIES AUTOMOC ON)
7 | target_link_libraries(S_MODEL PUBLIC Qt::Core Qt::Widgets S_CORE)
8 | target_include_directories(S_MODEL PUBLIC .)
9 |
10 | target_sources(S_MODEL
11 | PRIVATE
12 | # HEADERS
13 | ################
14 | contactmodel.h
15 | innerfilemodel.h
16 | modelhelpers.h
17 | recentlist.h
18 | configmanager.h
19 | # SOURCES
20 | ################
21 | contactmodel.cpp
22 | innerfilemodel.cpp
23 | modelhelpers.cpp
24 | recentlist.cpp
25 | configmanager.cpp
26 | )
27 |
28 | if (WITH_CALLS)
29 | target_compile_definitions(S_MODEL PRIVATE WITH_CALLS)
30 | target_sources(S_MODEL
31 | PRIVATE
32 | callmodel.h
33 | callmodel.cpp
34 | )
35 | endif ()
36 |
37 | if (WITH_MESSAGES)
38 | target_compile_definitions(S_MODEL PRIVATE WITH_MESSAGES)
39 | target_sources(S_MODEL
40 | PRIVATE
41 | messagemodel.h
42 | messagemodel.cpp
43 | )
44 | endif ()
45 |
--------------------------------------------------------------------------------
/core/formats/files/udxfile.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: UDX (Philips Xenium) file export/import
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef UDXFILE_H
15 | #define UDXFILE_H
16 |
17 |
18 | #include
19 | #include "fileformat.h"
20 |
21 | class UDXFile : public FileFormat, QDomDocument
22 | {
23 | public:
24 | UDXFile();
25 | // IFormat interface
26 | static bool detect(const QString &url);
27 | static QStringList supportedExtensions();
28 | static QStringList supportedFilters();
29 | bool importRecords(const QString &url, ContactList &list, bool append);
30 | bool exportRecords(const QString &url, ContactList &list);
31 | private:
32 | QDomElement addElement(QDomElement& parent, const QString& tagName, const QString& tagValue = "");
33 | };
34 |
35 | #endif // UDXFILE_H
36 |
--------------------------------------------------------------------------------
/pack/make-bin-image:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | SRC_DIR=$1
4 | BLD_DIR=$2
5 | PKG_DIR=$3
6 | QTTR_DIR=$4
7 |
8 | if ! [ -d ${SRC_DIR} ]; then
9 | echo "Source directory not exists"
10 | exit 1
11 | fi
12 | if ! [ -d ${BLD_DIR} ]; then
13 | echo "Build directory not exists"
14 | exit 1
15 | fi
16 |
17 |
18 | BIN_PATH=${PKG_DIR}/usr/bin
19 | TRANS_PATH=${PKG_DIR}/usr/share/doublecontact/translations
20 | DSK_PATH=${PKG_DIR}/usr/share/applications
21 | IMG_PATH=${PKG_DIR}/usr/share/pixmaps
22 | DOC_PATH=${PKG_DIR}/usr/share/doc/doublecontact
23 |
24 | mkdir -p ${BIN_PATH}
25 | mkdir -p ${TRANS_PATH}
26 | mkdir -p ${DSK_PATH}
27 | mkdir -p ${IMG_PATH}
28 | mkdir -p ${DOC_PATH}
29 |
30 | cp ${BLD_DIR}/app/doublecontact ${BIN_PATH}/
31 | cp ${BLD_DIR}/contconv/contconv ${BIN_PATH}/
32 | cp ${SRC_DIR}/translations/*.qm ${TRANS_PATH}/
33 | cp ${SRC_DIR}/translations/iso639-1.utf8 ${TRANS_PATH}/
34 | cp ${QTTR_DIR}//qt_??.qm ${TRANS_PATH}/
35 | cp ${QTTR_DIR}/qt_??_??.qm ${TRANS_PATH}/
36 | cp ${SRC_DIR}/app/doublecontact.desktop ${DSK_PATH}/
37 | cp ${SRC_DIR}/img/32x32/doublecontact_32x32.xpm ${IMG_PATH}/
38 | cp -r ${SRC_DIR}/doc/* ${DOC_PATH}/
39 | cp ${SRC_DIR}/COPYING ${DOC_PATH}/
40 | cp ${SRC_DIR}/README.md ${DOC_PATH}/
41 |
--------------------------------------------------------------------------------
/translations/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Create and install translation files.
2 |
3 | cmake_minimum_required(VERSION 3.5)
4 |
5 | find_program (LRELEASE_EXE lrelease)
6 |
7 | if (LRELEASE_EXE)
8 | message("-- Found lrelease")
9 | else ()
10 | message(WARNING "The lrelease was not found. Generation of translations will be skipped.")
11 | return()
12 | endif ()
13 |
14 | set(LANGUAGES de en_GB fr ie nb_NO nl pl pt pt_BR ru_RU uk_UA zh_Hant)
15 |
16 | foreach (LANG ${LANGUAGES})
17 | set(TS_FILE ${CMAKE_CURRENT_SOURCE_DIR}/doublecontact_${LANG}.ts)
18 | set(QM_FILE ${CMAKE_CURRENT_BINARY_DIR}/doublecontact_${LANG}.qm)
19 | list(APPEND QM_LIST ${QM_FILE})
20 | add_custom_command(OUTPUT ${QM_FILE}
21 | COMMAND ${LRELEASE_EXE} -silent ${TS_FILE} -qm ${QM_FILE}
22 | DEPENDS ${TS_FILE}
23 | COMMENT "Generate doublecontact_${LANG}.qm")
24 | install(FILES ${QM_FILE} DESTINATION ${APP_I18N_PATH})
25 | endforeach ()
26 |
27 | add_custom_target(translations ALL DEPENDS ${QM_LIST})
28 | install(FILES iso639-1.utf8 DESTINATION ${APP_I18N_PATH})
29 | # Needed for localisation when application is launched from the build directory.
30 | file(COPY_FILE iso639-1.utf8 ${CMAKE_CURRENT_BINARY_DIR}/iso639-1.utf8)
31 |
--------------------------------------------------------------------------------
/app/settingsdialog.h:
--------------------------------------------------------------------------------
1 | #ifndef SETTINGSDIALOG_H
2 | #define SETTINGSDIALOG_H
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | #include "configmanager.h"
9 | #include "globals.h"
10 |
11 | namespace Ui {
12 | class SettingsDialog;
13 | }
14 |
15 | class SettingsDialog : public QDialog
16 | {
17 | Q_OBJECT
18 |
19 | public:
20 | explicit SettingsDialog(QWidget *parent = 0);
21 | ~SettingsDialog();
22 | bool setData();
23 | bool getData();
24 | bool langChanged();
25 | private slots:
26 | void on_btnAddCol_clicked();
27 | void on_btnDelCol_clicked();
28 | void on_btnUpCol_clicked();
29 | void on_btnDownCol_clicked();
30 | void on_cbUseSystemDateTimeFormat_clicked(bool checked);
31 | void on_cbUseSystemFontsAndColors_clicked(bool checked);
32 | void on_btnTableFont_clicked();
33 | void on_btnGridColor1_clicked();
34 | void on_btnGridColor2_clicked();
35 | void on_lwAvailableColumns_itemDoubleClicked(QListWidgetItem *item);
36 |
37 | void on_lwVisibleColumns_itemDoubleClicked(QListWidgetItem *item);
38 |
39 | private:
40 | QString _lang;
41 | bool _langChanged;
42 | Ui::SettingsDialog *ui;
43 | };
44 |
45 | #endif // SETTINGSDIALOG_H
46 |
--------------------------------------------------------------------------------
/core/formats/files/mpbfile.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: MyPhoneExplorer backup file import
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef MPBFILE_H
15 | #define MPBFILE_H
16 |
17 | #include "fileformat.h"
18 | #include "../common/vcarddata.h"
19 |
20 | class MPBFile : public FileFormat, VCardData
21 | {
22 | public:
23 | MPBFile();
24 |
25 | // IFormat interface
26 | public:
27 | static bool detect(const QString &url);
28 | static QStringList supportedExtensions();
29 | static QStringList supportedFilters();
30 | bool importRecords(const QString &url, ContactList &list, bool append);
31 | bool exportRecords(const QString &url, ContactList &list);
32 | private:
33 | void writeSectionHeader(QIODevice& out, const BString& sectionName,
34 | bool writeEOL=true);
35 | void winEndl(QIODevice & out);
36 | };
37 |
38 | #endif // MPBFILE_H
39 |
--------------------------------------------------------------------------------
/core/corehelpers.cpp:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Core Helpers
4 | *
5 | * Copyright 2021 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #include
15 | #include "corehelpers.h"
16 |
17 | // Enum settings helper
18 | short EnumSetting::load(QSettings *settings) const
19 | {
20 | QString sVal = settings->value(section+"/"+item).toString();
21 | QStringList allV = possibleValues();
22 | for (int i=0; i=allV.count())
32 | value = defaultValue;
33 | settings->setValue(section+"/"+item, allV[value]);
34 | }
35 |
36 | QStringList EnumSetting::possibleValues() const
37 | {
38 | return allValues.split(";");
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | env:
2 | global:
3 | - secure: "Rf7ngZdoeyullT7yklka4qBQz+8pPIpxqiTUflvE8R3n1ciTbuoJHvL1lC9GhKR2YCf9ASJn4PAQnSD1lY+TlgfuuzGPIgzKn52sw5ScMzXhUyVMuObX8Nl+2XoBAITjH1I2yXcMzIuxk+aEAG850Yg7DZyRxe8dyxcPO0Tjzzz2X8cA9wZaTytA/IfNEz0v2szqOGNt0O9jf+WVr2WeAkQ+R5Q4Cg27T5Bf2NuMD6/cNyZUBlvCtm+2GygGeURPVsKc9seBbgs7env7QZtJeIq9RjF+8uVuz1vw90WJTf3simqV2eAHUp/Z2uEll5Qr/QC7LGlTcyxcUxCetwfGVEgA6vRI45XefnjAb3J9znOZFrNMZt5RHKpf1VKLppchuDoarE/RSuICFnckC1BE+cEansRvjMjKIqiHpgK65QfRZl9ajFCetNMVeHykxmFLnYdF08KtSsxggAcVCCvTVZx7lkexpq4+2sRJjN+SFCCHMZjmXBMhejzi5kP6x5/2P5qVkBdW8+8DW4HtcZG/2vjmMCrQz1ynOCtwPILnDak6K+F/MtZgdcIy7CkTh+ggoT0TCdKOXmj0Ea5Fdgl4+15FeNtwTe114SunQR0wloaW6SBNkMNnQtfKm/sGnVjJFi+wm8TDjLN1QdBQnAgiYNhHKw3i9Q9RfCgKz5qlMrw="
4 | addons:
5 | coverity_scan:
6 | project:
7 | name: "DarkHobbit/doublecontact"
8 | description: "Offline DE-independent Qt-based contact manager primarily for phonebooks editing/merging"
9 | notification_email: pub@zvyozdochkin.ru
10 | build_command_prepend: qmake all.pro
11 | build_command: make
12 | branch_pattern: master
13 |
14 | language: cpp
15 |
16 | before_install:
17 | - sudo apt-get update -qq
18 | - sudo apt-get install qt4-dev-tools qt4-qmake fakeroot
19 |
20 | script:
21 | - qmake all.pro
22 | - make
23 | - cd pack/deb
24 | - ./make-deb-pkg 0.2.4 test amd64 4
25 |
--------------------------------------------------------------------------------
/3rdparty/quazip/qztest/testquachecksum32.h:
--------------------------------------------------------------------------------
1 | #ifndef QUAZIP_TEST_QUACHECKSUM32_H
2 | #define QUAZIP_TEST_QUACHECKSUM32_H
3 |
4 | /*
5 | Copyright (C) 2005-2014 Sergey A. Tachenov
6 |
7 | This file is part of QuaZIP test suite.
8 |
9 | QuaZIP is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Lesser General Public License as published by
11 | the Free Software Foundation, either version 2.1 of the License, or
12 | (at your option) any later version.
13 |
14 | QuaZIP is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Lesser General Public License for more details.
18 |
19 | You should have received a copy of the GNU Lesser General Public License
20 | along with QuaZIP. If not, see .
21 |
22 | See COPYING file for the full LGPL text.
23 |
24 | Original ZIP package is copyrighted by Gilles Vollant and contributors,
25 | see quazip/(un)zip.h files for details. Basically it's the zlib license.
26 | */
27 |
28 | #include
29 |
30 | class TestQuaChecksum32: public QObject {
31 | Q_OBJECT
32 | private slots:
33 | void calculate();
34 | void update();
35 | };
36 |
37 | #endif // QUAZIP_TEST_QUACHECKSUM32_H
38 |
--------------------------------------------------------------------------------
/3rdparty/quazip/qztest/testquaziodevice.h:
--------------------------------------------------------------------------------
1 | #ifndef QUAZIP_TEST_QUAZIODEVICE_H
2 | #define QUAZIP_TEST_QUAZIODEVICE_H
3 |
4 | /*
5 | Copyright (C) 2005-2014 Sergey A. Tachenov
6 |
7 | This file is part of QuaZIP test suite.
8 |
9 | QuaZIP is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Lesser General Public License as published by
11 | the Free Software Foundation, either version 2.1 of the License, or
12 | (at your option) any later version.
13 |
14 | QuaZIP is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Lesser General Public License for more details.
18 |
19 | You should have received a copy of the GNU Lesser General Public License
20 | along with QuaZIP. If not, see .
21 |
22 | See COPYING file for the full LGPL text.
23 |
24 | Original ZIP package is copyrighted by Gilles Vollant and contributors,
25 | see quazip/(un)zip.h files for details. Basically it's the zlib license.
26 | */
27 |
28 | #include
29 |
30 | class TestQuaZIODevice: public QObject {
31 | Q_OBJECT
32 | private slots:
33 | void read();
34 | void readMany();
35 | void write();
36 | };
37 |
38 | #endif // QUAZIP_TEST_QUAZIODEVICE_H
39 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # DoubleContact [](https://travis-ci.org/DarkHobbit/doublecontact) [](https://scan.coverity.com/projects/darkhobbit-doublecontact)
2 | Offline DE-independent contact manager primarily for phonebooks editing/merging.
3 |
4 | License: GPLv3 or above. (Some parts of code, except NBU support can be distributed under GPLv2.)
5 |
6 | Language: C++.
7 |
8 | Libraries: Qt4/5.
9 |
10 | ## Build ##
11 |
12 | Build instructions contains in [separate manual](https://github.com/DarkHobbit/doublecontact/blob/master/doc/BUILD.en.md).
13 |
14 | ## User manual ##
15 |
16 | DoubleContact user manual [is also available](https://github.com/DarkHobbit/doublecontact/blob/master/doc/manual.en.md) on Github.
17 |
18 | ## Translations ##
19 |
20 | Please, use [Weblate](https://hosted.weblate.org/projects/doublecontact/) if you want to translate program on a new language. If you prefer edit separate files, you can [learn ready translation samples](https://github.com/DarkHobbit/doublecontact/tree/master/translations) and send your files to author.
21 |
22 | Please, don't place ellipsis and other non-latin character in source files directly. Place this into translation files (including English).
23 |
24 |
--------------------------------------------------------------------------------
/3rdparty/quazip/qztest/qztest.pro:
--------------------------------------------------------------------------------
1 | TEMPLATE = app
2 | QT -= gui
3 | QT += network
4 | CONFIG += qtestlib
5 | CONFIG += console
6 | CONFIG -= app_bundle
7 | DEPENDPATH += .
8 | INCLUDEPATH += .
9 | !win32: LIBS += -lz
10 | win32 {
11 | # workaround for qdatetime.h macro bug
12 | DEFINES += NOMINMAX
13 | }
14 |
15 | CONFIG(staticlib): DEFINES += QUAZIP_STATIC
16 |
17 | # Input
18 | HEADERS += qztest.h \
19 | testjlcompress.h \
20 | testquachecksum32.h \
21 | testquagzipfile.h \
22 | testquaziodevice.h \
23 | testquazipdir.h \
24 | testquazipfile.h \
25 | testquazip.h \
26 | testquazipnewinfo.h \
27 | testquazipfileinfo.h
28 |
29 | SOURCES += qztest.cpp \
30 | testjlcompress.cpp \
31 | testquachecksum32.cpp \
32 | testquagzipfile.cpp \
33 | testquaziodevice.cpp \
34 | testquazip.cpp \
35 | testquazipdir.cpp \
36 | testquazipfile.cpp \
37 | testquazipnewinfo.cpp \
38 | testquazipfileinfo.cpp
39 |
40 | OBJECTS_DIR = .obj
41 | MOC_DIR = .moc
42 |
43 | win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../quazip/release/ -lquazip
44 | else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../quazip/debug/ -lquazipd
45 | else:mac:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../quazip/ -lquazip_debug
46 | else:unix: LIBS += -L$$OUT_PWD/../quazip/ -lquazip
47 |
48 | INCLUDEPATH += $$PWD/..
49 | DEPENDPATH += $$PWD/../quazip
50 |
--------------------------------------------------------------------------------
/3rdparty/quazip/qztest/testquagzipfile.h:
--------------------------------------------------------------------------------
1 | #ifndef QUAZIP_TEST_QUAGZIPFILE_H
2 | #define QUAZIP_TEST_QUAGZIPFILE_H
3 |
4 | /*
5 | Copyright (C) 2005-2014 Sergey A. Tachenov
6 |
7 | This file is part of QuaZIP test suite.
8 |
9 | QuaZIP is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Lesser General Public License as published by
11 | the Free Software Foundation, either version 2.1 of the License, or
12 | (at your option) any later version.
13 |
14 | QuaZIP is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Lesser General Public License for more details.
18 |
19 | You should have received a copy of the GNU Lesser General Public License
20 | along with QuaZIP. If not, see .
21 |
22 | See COPYING file for the full LGPL text.
23 |
24 | Original ZIP package is copyrighted by Gilles Vollant and contributors,
25 | see quazip/(un)zip.h files for details. Basically it's the zlib license.
26 | */
27 |
28 | #include
29 |
30 | class TestQuaGzipFile: public QObject {
31 | Q_OBJECT
32 | private slots:
33 | void read();
34 | void write();
35 | void constructorDestructor();
36 | };
37 |
38 | #endif // QUAZIP_TEST_QUAGZIPFILE_H
39 |
--------------------------------------------------------------------------------
/core/formats/files/fileformat.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Abstract class for file export/import format
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef FILEFORMAT_H
15 | #define FILEFORMAT_H
16 |
17 | #include
18 | #include "../iformat.h"
19 |
20 | class FileFormat : public IFormat
21 | {
22 | public:
23 | FileFormat();
24 | virtual ~FileFormat();
25 | virtual bool setCharSet(const QString& value);
26 | QStringList errors();
27 | QString fatalError();
28 | static void lossData(QStringList& errors, const QString& contactName,
29 | const QString& fieldName, bool condition);
30 | static void lossData(QStringList& errors, const QString& contactName,
31 | const QString& fieldName, const QString& field);
32 | protected:
33 | QFile file;
34 | QStringList _errors;
35 | QString _fatalError;
36 | bool openFile(QString path, QIODevice::OpenMode mode);
37 | void closeFile();
38 | };
39 |
40 | #endif // FILEFORMAT_H
41 |
--------------------------------------------------------------------------------
/pack/appimage/make-appimage:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Example: make-appimage 0.2.4 x86_64 /opt/Qt/5.12.12.st
4 | DC_VER=$1
5 | PKG_ARCH=$2
6 | QT_DIR=$3
7 | QTTR_DIR=${QT_DIR}/translations
8 |
9 | if [ -z "$DC_VER" ]
10 | then
11 | echo "Version number is missing"
12 | exit 1
13 | fi
14 | if [ -z "$PKG_ARCH" ]
15 | then
16 | echo "Package architecture is missing"
17 | exit 1
18 | fi
19 |
20 | PKG_NAME=doublecontact_${DC_VER}_${PKG_ARCH}
21 | APP_DIR=${PKG_NAME}.AppDir
22 |
23 | # Make bin image (AppDir)
24 | cd ../..
25 | ./pack/make-bin-image . . ./${APP_DIR} ${QTTR_DIR}
26 | if [ $? -ne 0 ]; then
27 | echo "make-bin-image failed!"
28 | exit 1
29 | fi
30 |
31 | # Modify AppDir, see https://github.com/AppImage/AppImageKit/wiki/AppDir
32 | cp pack/appimage/AppRun ./${APP_DIR}
33 | # mkdir ./${APP_DIR}/usr/share/metainfo
34 | # cp pack/appimage/doublecontact.appdata.xml ./${APP_DIR}/usr/share/metainfo
35 | echo doublecontact_32x32.xpm > ./${APP_DIR}/.DirIcon
36 | cd ./${APP_DIR}
37 | # Modified .desktop with AppRun call instead executable placed to root package folder
38 | sed 's/Exec=doublecontact/Exec=.\/AppRun/' ./usr/share/applications/doublecontact.desktop > ./doublecontact.desktop
39 | cp ./usr/share/pixmaps/doublecontact_32x32.xpm ./
40 | # TODO icons theme?
41 |
42 | # appimagetool call!
43 | cd ..
44 | ARCH=x86_64 ../appimagetool-x86_64.AppImage ./${APP_DIR}
45 |
46 |
--------------------------------------------------------------------------------
/app/groupdialog.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Groups dialog
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef GROUPDIALOG_H
15 | #define GROUPDIALOG_H
16 |
17 | #include
18 | #include
19 | #include "contactmodel.h"
20 |
21 | namespace Ui {
22 | class GroupDialog;
23 | }
24 |
25 | class GroupDialog : public QDialog
26 | {
27 | Q_OBJECT
28 |
29 | public:
30 | explicit GroupDialog(ContactModel& _model);
31 | ~GroupDialog();
32 | protected:
33 | void showEvent(QShowEvent*);
34 | private slots:
35 | void on_btnAdd_clicked();
36 | void on_btnEdit_clicked();
37 | void on_btnRemove_clicked();
38 | void on_btnMerge_clicked();
39 | void on_btnSplit_clicked();
40 | void rowDoubleClicked(const QModelIndex&);
41 | private:
42 | Ui::GroupDialog *ui;
43 | ContactModel& model;
44 | bool askGroupName(QString& name);
45 | void updateTable(const QString& selectedGroup = "");
46 | bool checkSelection();
47 | };
48 |
49 | #endif // GROUPDIALOG_H
50 |
--------------------------------------------------------------------------------
/core/formats/common/vdata.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Common routines for VCard, VMessage, VCalendar...
4 | *
5 | * Copyright 2022 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef VDATA_H
14 | #define VDATA_H
15 |
16 | #include
17 | #include "bstring.h"
18 |
19 | struct VData
20 | {
21 | VData();
22 | //const
23 | QString decodeValue(const BString& src, QStringList& errors) const;
24 | BString encodeValue(const QString& src, int prefixLen) const;
25 | QString joinBySCAndDecode(const BStringList& src, QStringList& errors);
26 | //static
27 | static BStringList splitBySC(const BString& src);
28 | static QString joinBySC(const QStringList& src);
29 | static QString joinBySC(const BStringList& src);
30 | static QString sc(const QString& src);
31 | static QStringList splitByComma(const QString& src);
32 | static QString joinByComma(const QStringList& src);
33 | static QString cm(const QString& src);
34 | QString encoding;
35 | QString charSet;
36 | };
37 |
38 | #endif // VDATA_H
39 |
--------------------------------------------------------------------------------
/core/bstring.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Byte-based encoded (m.b. not unicode) string
4 | *
5 | * Copyright 2022 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef BSTRING_H
14 | #define BSTRING_H
15 |
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include
21 |
22 | class BStringList;
23 | class BString : public QByteArray
24 | {
25 | public:
26 | BString();
27 | BString(const char* str);
28 | BString(const char* data, int size);
29 | BString(const QByteArray& other);
30 | BStringList splitByLines() const; // Line split with CR, LF and CRLF support
31 | BString& removeS (const BString& str, Qt::CaseSensitivity cs = Qt::CaseSensitive);
32 | };
33 |
34 | class BStringList: public QList
35 | {
36 | public:
37 | QStringList toQStrings(QTextCodec* codec = 0) const;
38 | static BStringList fromQStrings(const QStringList& src, QTextCodec* codec = 0);
39 | BString joinByLines(); // TODO m.b. transfer line style
40 | };
41 |
42 | #endif // BSTRING_H
43 |
--------------------------------------------------------------------------------
/pack/deb/make-deb-pkg:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -o nounset
4 | set -o errexit
5 | # Example: make-deb-pkg 0.1.5 jessie amd64 4
6 | # Example: make-deb-pkg 0.2.0 stretch amd64 4
7 | # Example: make-deb-pkg 0.2.4 buster amd64 4
8 | DC_VER=$1
9 | PKG_DIST=$2
10 | PKG_ARCH=$3
11 | QT_MAJV=$4
12 | QTTR_DIR=/usr/share/qt${QT_MAJV}/translations
13 |
14 | if [ -z "$DC_VER" ]
15 | then
16 | echo "Version number is missing"
17 | exit 1
18 | fi
19 | if [ -z "$PKG_ARCH" ]
20 | then
21 | echo "Package architecture is missing"
22 | exit 1
23 | fi
24 |
25 | PKG_NAME=doublecontact_${DC_VER}-${PKG_DIST}_${PKG_ARCH}
26 | CTL_FIlE=./${PKG_NAME}/DEBIAN/control
27 |
28 | # Make bin image
29 | cd ../..
30 | ./pack/make-bin-image . ../build-doublecontact ./${PKG_NAME} ${QTTR_DIR}
31 | if [ $? -ne 0 ]; then
32 | echo "make-bin-image failed!"
33 | exit 1
34 | fi
35 | # Copy debianization template
36 | cp -R ./pack/deb/DEBIAN ./${PKG_NAME}/
37 | cp ./pack/deb/control-qt${QT_MAJV} ./${PKG_NAME}/DEBIAN/control
38 | # Add version number and arch to control file
39 | echo "Version: ${DC_VER}" >> ${CTL_FIlE}
40 | echo "Architecture: ${PKG_ARCH}" >> ${CTL_FIlE}
41 | # Add installed size to control file
42 | INST_SIZE=$(du -hks ./${PKG_NAME})
43 | INST_SIZE=(${INST_SIZE//" "/ })
44 | INST_SIZE=${INST_SIZE[0]}
45 | echo "Installed-Size: ${INST_SIZE}" >> ${CTL_FIlE}
46 | # Build!
47 | fakeroot dpkg-deb --build ./${PKG_NAME}/ ./${PKG_NAME}.deb
48 |
--------------------------------------------------------------------------------
/3rdparty/quazip/qztest/qztest.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 10.00
3 | # Visual C++ Express 2008
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qztest", "qztest.vcproj", "{7632B767-D089-4F15-8B1E-C4B3F9EBF592}"
5 | EndProject
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "quazip", "..\quazip\quazip.vcproj", "{E4AC5F56-B711-4F0E-BC83-CDE8B6CD53AD}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Win32 = Debug|Win32
11 | Release|Win32 = Release|Win32
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {7632B767-D089-4F15-8B1E-C4B3F9EBF592}.Debug|Win32.ActiveCfg = Debug|Win32
15 | {7632B767-D089-4F15-8B1E-C4B3F9EBF592}.Debug|Win32.Build.0 = Debug|Win32
16 | {7632B767-D089-4F15-8B1E-C4B3F9EBF592}.Release|Win32.ActiveCfg = Release|Win32
17 | {7632B767-D089-4F15-8B1E-C4B3F9EBF592}.Release|Win32.Build.0 = Release|Win32
18 | {E4AC5F56-B711-4F0E-BC83-CDE8B6CD53AD}.Debug|Win32.ActiveCfg = Debug|Win32
19 | {E4AC5F56-B711-4F0E-BC83-CDE8B6CD53AD}.Debug|Win32.Build.0 = Debug|Win32
20 | {E4AC5F56-B711-4F0E-BC83-CDE8B6CD53AD}.Release|Win32.ActiveCfg = Release|Win32
21 | {E4AC5F56-B711-4F0E-BC83-CDE8B6CD53AD}.Release|Win32.Build.0 = Release|Win32
22 | EndGlobalSection
23 | GlobalSection(SolutionProperties) = preSolution
24 | HideSolutionNode = FALSE
25 | EndGlobalSection
26 | EndGlobal
27 |
--------------------------------------------------------------------------------
/app/datedetailsdialog.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Date details dialog (time presence, time zone)
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef DATEDETAILSDIALOG_H
15 | #define DATEDETAILSDIALOG_H
16 |
17 | #include
18 | #include
19 | #include "contactlist.h"
20 |
21 | namespace Ui {
22 | class DateDetailsDialog;
23 | }
24 |
25 | class DateDetailsDialog : public QDialog
26 | {
27 | Q_OBJECT
28 |
29 | public:
30 | explicit DateDetailsDialog(QWidget *parent = 0);
31 | ~DateDetailsDialog();
32 | void setData(const DateItem& data);
33 | void getData(DateItem& data);
34 | static void setDateFormat(QDateTimeEdit* editor, const DateItem& date);
35 | static void setDateFormat(QDateTimeEdit* editor, bool hasYear, bool hasTime);
36 | private slots:
37 | void on_cbHasTime_toggled(bool checked);
38 | void on_cbHasTimeZone_toggled(bool checked);
39 | void on_cbHasYear_toggled(bool checked);
40 |
41 | private:
42 | Ui::DateDetailsDialog *ui;
43 | };
44 |
45 | #endif // DATEDETAILSDIALOG_H
46 |
--------------------------------------------------------------------------------
/3rdparty/quazip/qztest/testquazipdir.h:
--------------------------------------------------------------------------------
1 | #ifndef QUAZIP_TEST_QUAZIPDIR_H
2 | #define QUAZIP_TEST_QUAZIPDIR_H
3 |
4 | /*
5 | Copyright (C) 2005-2014 Sergey A. Tachenov
6 |
7 | This file is part of QuaZIP test suite.
8 |
9 | QuaZIP is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Lesser General Public License as published by
11 | the Free Software Foundation, either version 2.1 of the License, or
12 | (at your option) any later version.
13 |
14 | QuaZIP is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Lesser General Public License for more details.
18 |
19 | You should have received a copy of the GNU Lesser General Public License
20 | along with QuaZIP. If not, see .
21 |
22 | See COPYING file for the full LGPL text.
23 |
24 | Original ZIP package is copyrighted by Gilles Vollant and contributors,
25 | see quazip/(un)zip.h files for details. Basically it's the zlib license.
26 | */
27 |
28 | #include
29 |
30 | class TestQuaZipDir: public QObject {
31 | Q_OBJECT
32 | private slots:
33 | void entryList_data();
34 | void entryList();
35 | void cd_data();
36 | void cd();
37 | void entryInfoList();
38 | void operators();
39 | void filePath();
40 | };
41 |
42 | #endif // QUAZIP_TEST_QUAZIPDIR_H
43 |
--------------------------------------------------------------------------------
/core/formats/common/textreport.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Report helper for quick view, HTML report and office formats reports
4 | *
5 | * Copyright 2023 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef TEXTREPORT_H
15 | #define TEXTREPORT_H
16 |
17 | #include
18 | #include
19 | #include
20 | #include "../../contactlist.h"
21 |
22 | class TextReport
23 | {
24 | public:
25 | //TextReport();
26 | typedef QPair RepItem;
27 | struct RepItems: public QList {
28 | QString title;
29 | };
30 | static void exportRecord(const ContactItem& item, RepItems& out, const QString& itemSeparator);
31 | static void exportString(RepItems& items, const QString& field, const QString& title);
32 | template
33 | static void exportStringableItem(RepItems& items, const T& field, const QString& title);
34 | template
35 | static void exportTypedItems(RepItems& items, const QList& lst,
36 | const QString& title, const QString& itemSeparator);
37 | };
38 |
39 | #endif // TEXTREPORT_H
40 |
--------------------------------------------------------------------------------
/core/languagemanager.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Human language manager
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef LANGUAGEMANAGER_H
15 | #define LANGUAGEMANAGER_H
16 |
17 | #include
18 | #include
19 | #include
20 | #include
21 |
22 | class LanguageManager
23 | {
24 | public:
25 | LanguageManager();
26 | bool load(const QString& fileName);
27 | bool loadCodecs(const QString& language, bool& qtOk);
28 | QStringList nativeNames();
29 | QString nativeNameToCode(const QString& name);
30 | QString systemLanguageNativeName();
31 | static QString transPath();
32 | static QStringList availableCodecs();
33 | private:
34 | QTranslator tr, trQt;
35 | // Ported from Stellarium, but map is reversed
36 | // Native name is key, code is value
37 | QMap iso639codes;
38 | // English name is key, native name is value
39 | QMap nativeNamesByEnglish;
40 | };
41 |
42 | extern LanguageManager languageManager;
43 |
44 | #endif // LANGUAGEMANAGER_H
45 |
--------------------------------------------------------------------------------
/core/formats/common/quotedprintable.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Quoted-printable encoding support
4 | *
5 | * Copyright 2019 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef QUOTEDPRINTABLE_H
14 | #define QUOTEDPRINTABLE_H
15 |
16 | #define MAX_QUOTED_PRINTABLE_LEN 76
17 |
18 | #include
19 | #include
20 | #include
21 | #include "bstring.h"
22 |
23 | class QuotedPrintable
24 | {
25 | public:
26 | // Decode string
27 | static QByteArray decode(const BString &src);
28 | static QString decode(const BString &src, QTextCodec* codec);
29 | static QString decodeFromMime(const BString &src);
30 | // Encode string
31 | static BString encode(const QString &src, QTextCodec* codec, int prefixLen);
32 | // Merge quoted-printable linesets
33 | static void mergeLinesets(BStringList& lines);
34 | static void mergeLines(QString& line);
35 | private:
36 | // Check for soft line breaks (RFC 2045)
37 | static void checkSoftBreak(BString& buf, BString& lBuf, int prefixLen, int addSize, bool lastChar);
38 | };
39 |
40 | #endif // QUOTEDPRINTABLE_H
41 |
--------------------------------------------------------------------------------
/3rdparty/qwebdavlib/qwebdavlibExample/qexample.cpp:
--------------------------------------------------------------------------------
1 | #include "qexample.h"
2 |
3 | QExample::QExample(QObject *parent) :
4 | QObject(parent)
5 | {
6 | w.setConnectionSettings(QWebdav::HTTP, "127.0.0.1", "/", "USERNAME", "PASSWORD", 80);
7 | connect(&p, SIGNAL(finished()), this, SLOT(printList()));
8 | connect(&p, SIGNAL(errorChanged(QString)), this, SLOT(printError(QString)));
9 | connect(&w, SIGNAL(errorChanged(QString)), this, SLOT(printError(QString)));
10 | m_path = "/";
11 | }
12 |
13 | void QExample::printList()
14 | {
15 | QList list = p.getList();
16 |
17 | QWebdavItem item;
18 | foreach(item, list) {
19 | qDebug() << item.name();
20 |
21 | QNetworkReply *reply = w.get(item.path());
22 | connect(reply, SIGNAL(readyRead()), this, SLOT(replySkipRead()));
23 | m_replyList.append(reply);
24 | }
25 | }
26 |
27 | void QExample::printError(QString errorMsg)
28 | {
29 | qDebug() << "QWebdav::printErrors() errorMsg == " << errorMsg;
30 | }
31 |
32 | void QExample::replySkipRead()
33 | {
34 | QNetworkReply* reply = qobject_cast(QObject::sender());
35 | if (reply==0)
36 | return;
37 |
38 | QByteArray ba = reply->readAll();
39 |
40 | qDebug() << "QWebdav::replySkipRead() skipped " << ba.size() << " reply->url() == " << reply->url().toString(QUrl::RemoveUserInfo);
41 | }
42 |
43 | void QExample::start()
44 | {
45 | p.listDirectory(&w, m_path);
46 | }
47 |
--------------------------------------------------------------------------------
/3rdparty/quazip/quazip/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | cmake_minimum_required(VERSION 3.5)
3 |
4 | project(quazip VERSION 1.0.0 LANGUAGES C CXX)
5 |
6 | add_library(quazip_static STATIC)
7 | set_target_properties(quazip_static PROPERTIES AUTOMOC ON)
8 | target_link_libraries(quazip_static PUBLIC Qt::Core libzip::zip ZLIB::ZLIB)
9 | target_include_directories(quazip_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
10 | target_compile_definitions(quazip_static PRIVATE QUAZIP_BUILD)
11 |
12 | target_sources(quazip_static
13 | PRIVATE
14 | # HEADERS
15 | ################
16 | crypt.h
17 | ioapi.h
18 | JlCompress.h
19 | quaadler32.h
20 | quachecksum32.h
21 | quacrc32.h
22 | quagzipfile.h
23 | quaziodevice.h
24 | quazipdir.h
25 | quazipfile.h
26 | quazipfileinfo.h
27 | quazip_global.h
28 | quazip.h
29 | quazipnewinfo.h
30 | unzip.h
31 | zip.h
32 | # SOURCES
33 | ################
34 | qioapi.cpp
35 | JlCompress.cpp
36 | quaadler32.cpp
37 | quacrc32.cpp
38 | quagzipfile.cpp
39 | quaziodevice.cpp
40 | quazip.cpp
41 | quazipdir.cpp
42 | quazipfile.cpp
43 | quazipfileinfo.cpp
44 | quazipnewinfo.cpp
45 | unzip.c
46 | zip.c
47 | )
48 |
49 | if (TARGET ${QT}::Core5Compat)
50 | target_link_libraries(quazip_static PUBLIC ${QT}::Core5Compat)
51 | endif ()
52 |
--------------------------------------------------------------------------------
/core/formats/common/pdu.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: PDU SMS import
4 | *
5 | * Copyright 2018 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | * Partially based on code by Petr Vilem - see below
7 | *
8 | * This program is free software; you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation; either version 3 of the License, or
11 | * (at your option) any later version. See COPYING file for more details.
12 | *
13 | */
14 |
15 | #ifndef PDU_H
16 | #define PDU_H
17 |
18 | #include
19 | #include
20 | #include
21 | #include
22 | #include "../../decodedmessagelist.h"
23 |
24 | class PDU
25 | {
26 | public:
27 | PDU();
28 | static bool parseMessage(QDataStream& ds, DecodedMessage& msg, int& MsgType);
29 | private:
30 | static QString readPhoneNumber(QDataStream& s, bool lenInBytes = false);
31 | static QDateTime readDateTime(QDataStream& s);
32 | static void decodeMessageBody(bool udhi, bool ucs2, QDataStream& s, DecodedMessage& msg);
33 | static void decodeMessageText(bool udhi, bool ucs2, int len, quint8* buff, DecodedMessage& msg);
34 | static quint8* convert8to7(quint8* raw, int len, int inLen, int& outLen);
35 | static QString decode7bit(quint8* source, int length, int inLength);
36 | static quint8 readInvertDecimalByte(QDataStream& s);
37 | };
38 |
39 | #endif // PDU_H
40 |
--------------------------------------------------------------------------------
/model/callmodel.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Call Visualization Model
4 | *
5 | * Copyright 2021 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef CALLMODEL_H
14 | #define CALLMODEL_H
15 |
16 | #include
17 | #include
18 |
19 | #include "contactlist.h"
20 |
21 | enum CallColumn {
22 | cacType,
23 | cacTimeStamp,
24 | cacDuration,
25 | cacNumber,
26 | cacName,
27 | cacLast
28 | };
29 |
30 | class CallModel : public QAbstractTableModel
31 | {
32 | Q_OBJECT
33 |
34 | public:
35 | explicit CallModel(QObject *parent, ContactList* src);
36 | void update();
37 | // Header:
38 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
39 | // Basic functionality:
40 | int rowCount(const QModelIndex &parent = QModelIndex()) const;
41 | int columnCount(const QModelIndex &parent = QModelIndex()) const;
42 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
43 | // Helpers
44 | bool saveToCSV(const QString& path);
45 | private:
46 | ContactList* _src;
47 | QStringList headers;
48 | };
49 |
50 | #endif // CALLMODEL_H
51 |
--------------------------------------------------------------------------------
/core/formats/iformat.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Abstract interface for file/network export/import format
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef IFORMAT_H
15 | #define IFORMAT_H
16 |
17 | #include
18 | #include
19 | #include "../contactlist.h"
20 |
21 | enum FormatType {
22 | ftNew,
23 | ftFile,
24 | ftDirectory,
25 | #ifdef WITH_NETWORK
26 | ftNetwork,
27 | #endif
28 | ftAuto // file or dir - only for open existing source
29 | };
30 |
31 | class IFormat {
32 | public:
33 | virtual ~IFormat() {};
34 | virtual bool setCharSet(const QString& value)=0;
35 | virtual bool importRecords(const QString& url, ContactList& list, bool append)=0;
36 | virtual bool exportRecords(const QString& url, ContactList& list)=0;
37 | virtual QStringList errors()=0;
38 | virtual QString fatalError()=0;
39 | /* Subclasses also can create next _static_ methods:
40 | * bool detect(const QString& url); // tri-state?
41 | * QStringList supportedExtensions(); // only for files
42 | * QStringList supportedFilters(); // only for files
43 | */
44 | };
45 |
46 | #endif // IFORMAT_H
47 |
--------------------------------------------------------------------------------
/pack/deb/DEBIAN/copyright:
--------------------------------------------------------------------------------
1 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2 | Upstream-Name: doublecontact
3 | Source:
4 |
5 | Files: *
6 | Copyright:
7 |
8 | License: GPL-2.0+
9 |
10 | Files: debian/*
11 | Copyright: 2017 Михаил Юрьевич
12 | License: GPL-2.0+
13 |
14 | License: GPL-2.0+
15 | This package is free software; you can redistribute it and/or modify
16 | it under the terms of the GNU General Public License as published by
17 | the Free Software Foundation; either version 2 of the License, or
18 | (at your option) any later version.
19 | .
20 | This package is distributed in the hope that it will be useful,
21 | but WITHOUT ANY WARRANTY; without even the implied warranty of
22 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 | GNU General Public License for more details.
24 | .
25 | You should have received a copy of the GNU General Public License
26 | along with this program. If not, see
27 | .
28 | On Debian systems, the complete text of the GNU General
29 | Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
30 |
31 | # Please also look if there are files or directories which have a
32 | # different copyright/license attached and list them here.
33 | # Please avoid to pick license terms that are more restrictive than the
34 | # packaged work, as it may make Debian's contributions unacceptable upstream.
35 |
--------------------------------------------------------------------------------
/3rdparty/quazip/quazip/quacrc32.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2005-2014 Sergey A. Tachenov
3 |
4 | This file is part of QuaZIP.
5 |
6 | QuaZIP is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU Lesser General Public License as published by
8 | the Free Software Foundation, either version 2.1 of the License, or
9 | (at your option) any later version.
10 |
11 | QuaZIP is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU Lesser General Public License for more details.
15 |
16 | You should have received a copy of the GNU Lesser General Public License
17 | along with QuaZIP. If not, see .
18 |
19 | See COPYING file for the full LGPL text.
20 |
21 | Original ZIP package is copyrighted by Gilles Vollant and contributors,
22 | see quazip/(un)zip.h files for details. Basically it's the zlib license.
23 | */
24 |
25 | #include "quacrc32.h"
26 |
27 | #include "zlib.h"
28 |
29 | QuaCrc32::QuaCrc32()
30 | {
31 | reset();
32 | }
33 |
34 | quint32 QuaCrc32::calculate(const QByteArray &data)
35 | {
36 | return crc32( crc32(0L, Z_NULL, 0), (const Bytef*)data.data(), data.size() );
37 | }
38 |
39 | void QuaCrc32::reset()
40 | {
41 | checksum = crc32(0L, Z_NULL, 0);
42 | }
43 |
44 | void QuaCrc32::update(const QByteArray &buf)
45 | {
46 | checksum = crc32( checksum, (const Bytef*)buf.data(), buf.size() );
47 | }
48 |
49 | quint32 QuaCrc32::value()
50 | {
51 | return checksum;
52 | }
53 |
--------------------------------------------------------------------------------
/app/callwindow.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Call History Window
4 | *
5 | * Copyright 2021 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef CALLWINDOW_H
14 | #define CALLWINDOW_H
15 |
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include
21 |
22 | #include "contactlist.h"
23 | #include "callmodel.h"
24 |
25 | namespace Ui {
26 | class CallWindow;
27 | }
28 |
29 | class CallWindow : public QDialog
30 | {
31 | Q_OBJECT
32 |
33 | public:
34 | explicit CallWindow(ContactList* contacts);
35 | ~CallWindow();
36 |
37 | private slots:
38 | void toggleSort();
39 | void onSortIndicatorChanged(int,Qt::SortOrder);
40 | void on_actionCopy_text_triggered();
41 | void on_leFilter_textChanged(const QString &newText);
42 | void on_btnSaveAs_clicked();
43 |
44 | protected:
45 | void showEvent(QShowEvent*);
46 |
47 | private:
48 | Ui::CallWindow *ui;
49 | CallModel* model;
50 | QSortFilterProxyModel *proxy;
51 | QStatusBar* statusBar;
52 | QLabel *lbCount, *lbMode;
53 | void updateModel();
54 | void updateStatus();
55 | QModelIndex selectedRecord(bool errorIfNoSelected = true);
56 | };
57 |
58 | #endif // CALLWINDOW_H
59 |
--------------------------------------------------------------------------------
/3rdparty/quazip/quazip/quacrc32.h:
--------------------------------------------------------------------------------
1 | #ifndef QUACRC32_H
2 | #define QUACRC32_H
3 |
4 | /*
5 | Copyright (C) 2005-2014 Sergey A. Tachenov
6 |
7 | This file is part of QuaZIP.
8 |
9 | QuaZIP is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Lesser General Public License as published by
11 | the Free Software Foundation, either version 2.1 of the License, or
12 | (at your option) any later version.
13 |
14 | QuaZIP is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Lesser General Public License for more details.
18 |
19 | You should have received a copy of the GNU Lesser General Public License
20 | along with QuaZIP. If not, see .
21 |
22 | See COPYING file for the full LGPL text.
23 |
24 | Original ZIP package is copyrighted by Gilles Vollant and contributors,
25 | see quazip/(un)zip.h files for details. Basically it's the zlib license.
26 | */
27 |
28 | #include "quachecksum32.h"
29 |
30 | ///CRC32 checksum
31 | /** \class QuaCrc32 quacrc32.h
32 | * This class wrappers the crc32 function with the QuaChecksum32 interface.
33 | * See QuaChecksum32 for more info.
34 | */
35 | class QUAZIP_EXPORT QuaCrc32 : public QuaChecksum32 {
36 |
37 | public:
38 | QuaCrc32();
39 |
40 | quint32 calculate(const QByteArray &data);
41 |
42 | void reset();
43 | void update(const QByteArray &buf);
44 | quint32 value();
45 |
46 | private:
47 | quint32 checksum;
48 | };
49 |
50 | #endif //QUACRC32_H
51 |
--------------------------------------------------------------------------------
/model/innerfilemodel.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Inner Filesystem Model
4 | *
5 | * Copyright 2022 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef INNERFILEMODEL_H
14 | #define INNERFILEMODEL_H
15 |
16 | #include
17 | #include
18 |
19 | #include "contactlist.h"
20 |
21 | enum InnerFileColumn {
22 | ifcFolder,
23 | ifcName,
24 | ifcTime,
25 | ifcSize,
26 | ifcLast
27 | };
28 |
29 | class InnerFileModel : public QAbstractTableModel
30 | {
31 | Q_OBJECT
32 |
33 | public:
34 | explicit InnerFileModel(QObject *parent, ContactList* src);
35 | void update();
36 | // Header:
37 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
38 | // Basic functionality:
39 | int rowCount(const QModelIndex &parent = QModelIndex()) const;
40 | int columnCount(const QModelIndex &parent = QModelIndex()) const;
41 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
42 | // Helpers
43 | int totalSize();
44 | InnerFile& item(int index);
45 | bool saveAll(const QString &dirPath, QString &fatalError);
46 | private:
47 | ContactList* _src;
48 | QStringList headers;
49 | };
50 |
51 | #endif // INNERFILEMODEL_H
52 |
--------------------------------------------------------------------------------
/3rdparty/quazip/quazip/quaadler32.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2010 Adam Walczak
3 | Copyright (C) 2005-2014 Sergey A. Tachenov
4 |
5 | This file is part of QuaZIP.
6 |
7 | QuaZIP is free software: you can redistribute it and/or modify
8 | it under the terms of the GNU Lesser General Public License as published by
9 | the Free Software Foundation, either version 2.1 of the License, or
10 | (at your option) any later version.
11 |
12 | QuaZIP is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU Lesser General Public License for more details.
16 |
17 | You should have received a copy of the GNU Lesser General Public License
18 | along with QuaZIP. If not, see .
19 |
20 | See COPYING file for the full LGPL text.
21 |
22 | Original ZIP package is copyrighted by Gilles Vollant and contributors,
23 | see quazip/(un)zip.h files for details. Basically it's the zlib license.
24 | */
25 |
26 | #include "quaadler32.h"
27 |
28 | #include "zlib.h"
29 |
30 | QuaAdler32::QuaAdler32()
31 | {
32 | reset();
33 | }
34 |
35 | quint32 QuaAdler32::calculate(const QByteArray &data)
36 | {
37 | return adler32( adler32(0L, Z_NULL, 0), (const Bytef*)data.data(), data.size() );
38 | }
39 |
40 | void QuaAdler32::reset()
41 | {
42 | checksum = adler32(0L, Z_NULL, 0);
43 | }
44 |
45 | void QuaAdler32::update(const QByteArray &buf)
46 | {
47 | checksum = adler32( checksum, (const Bytef*)buf.data(), buf.size() );
48 | }
49 |
50 | quint32 QuaAdler32::value()
51 | {
52 | return checksum;
53 | }
54 |
--------------------------------------------------------------------------------
/core/formats/files/csvfile.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Comma-separated values (CSV) file export/import
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef CSVFILE_H
15 | #define CSVFILE_H
16 |
17 | #include
18 | #include
19 | #include
20 | #include "../profiles/csvprofilebase.h"
21 | #include "fileformat.h"
22 |
23 | class CSVFile : public FileFormat
24 | {
25 | public:
26 | CSVFile();
27 | virtual ~CSVFile();
28 | // IFormat interface
29 | public:
30 | static bool detect(const QString &url);
31 | static QStringList supportedExtensions();
32 | static QStringList supportedFilters();
33 | QStringList availableProfiles();
34 | bool setProfile(const QString& name);
35 | void setEncoding(const QString& encoding);
36 | void setSeparator(const QString& separator);
37 | QString profile();
38 | bool importRecords(const QString &url, ContactList &list, bool append);
39 | bool exportRecords(const QString &url, ContactList &list);
40 | private:
41 | QVector profiles;
42 | CSVProfileBase* currentProfile;
43 | QString _encoding, _separator;
44 | void putLine(QTextStream& stream, const QStringList& source);
45 | };
46 |
47 | #endif // CSVFILE_H
48 |
--------------------------------------------------------------------------------
/pack/arch/PKGBUILD:
--------------------------------------------------------------------------------
1 | # Maintainer:
2 |
3 | pkgname=doublecontact
4 | pkgver=0.2.4
5 | pkgrel=1
6 | pkgdesc="Offline DE-independent contact manager primarily for phonebooks editing/merging"
7 | arch=('x86_64')
8 | url="https://github.com/DarkHobbit/doublecontact/"
9 | license=('GPL')
10 | depends=('qt5-base' 'hicolor-icon-theme')
11 | source=(https://github.com/DarkHobbit/${pkgname}/archive/${pkgver}.tar.gz)
12 | sha512sums=('1e9662f23ed11a9fb5a8d3d0d6ede052263dc947ac7aedb1ef5272d2aaf027acfeb2f3158fcf9f447c9d63ceafdfe7b89126c7d04cab1291cd9ab2b98af20398')
13 |
14 |
15 | build() {
16 | cd "${pkgname}-${pkgver}"
17 | qmake-qt5 all.pro
18 | make
19 | }
20 |
21 | package() {
22 | cd "${pkgname}-${pkgver}"
23 | install -D -m755 app/doublecontact "${pkgdir}/usr/bin/doublecontact"
24 | install -D -m755 contconv/contconv "${pkgdir}/usr/bin/contconv"
25 |
26 | # install visuals
27 | install -D -m644 app/doublecontact.desktop "${pkgdir}/usr/share/applications/doublecontact.desktop"
28 | install -D -m644 "img/32x32/doublecontact_32x32.png" "${pkgdir}/usr/share/pixmaps/doublecontact_32x32.png"
29 | for format in {16x16,32x32,64x64,128x128,256x256,512x512}; do
30 | install -D -m644 "img/${format}/doublecontact_${format}.png" "${pkgdir}/usr/share/icons/hicolor/${format}/apps/doublecontact.png"
31 | done
32 |
33 | # install translations
34 | install -D -m644 translations/iso639-1.utf8 "$pkgdir"/usr/share/$pkgname/translations/iso639-1.utf8
35 | install -D -m644 translations/*.qm -t "$pkgdir"/usr/share/$pkgname/translations/
36 |
37 | # install docs
38 | install -D -m644 doc/* -t "$pkgdir"/usr/share/$pkgname/doc/
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/3rdparty/quazip/qztest/testjlcompress.h:
--------------------------------------------------------------------------------
1 | #ifndef QUAZIP_TEST_JLCOMPRESS_H
2 | #define QUAZIP_TEST_JLCOMPRESS_H
3 |
4 | /*
5 | Copyright (C) 2005-2014 Sergey A. Tachenov
6 |
7 | This file is part of QuaZIP test suite.
8 |
9 | QuaZIP is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Lesser General Public License as published by
11 | the Free Software Foundation, either version 2.1 of the License, or
12 | (at your option) any later version.
13 |
14 | QuaZIP is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Lesser General Public License for more details.
18 |
19 | You should have received a copy of the GNU Lesser General Public License
20 | along with QuaZIP. If not, see .
21 |
22 | See COPYING file for the full LGPL text.
23 |
24 | Original ZIP package is copyrighted by Gilles Vollant and contributors,
25 | see quazip/(un)zip.h files for details. Basically it's the zlib license.
26 | */
27 |
28 | #include
29 |
30 | class TestJlCompress: public QObject {
31 | Q_OBJECT
32 | private slots:
33 | void compressFile_data();
34 | void compressFile();
35 | void compressFiles_data();
36 | void compressFiles();
37 | void compressDir_data();
38 | void compressDir();
39 | void extractFile_data();
40 | void extractFile();
41 | void extractFiles_data();
42 | void extractFiles();
43 | void extractDir_data();
44 | void extractDir();
45 | void zeroPermissions();
46 | };
47 |
48 | #endif // QUAZIP_TEST_JLCOMPRESS_H
49 |
--------------------------------------------------------------------------------
/app/helpers.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Widget helpers
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef HELPERS_H
15 | #define HELPERS_H
16 |
17 | #include
18 | #include
19 | #include
20 | #include
21 | #include
22 |
23 | #include "configmanager.h"
24 | #include "contactlist.h"
25 |
26 | // Delegate for making table widgets read only
27 | // Thanx to Axis - http://axis.bplaced.net/news/460
28 | class ReadOnlyTableDelegate : public QItemDelegate
29 | {
30 | Q_OBJECT
31 | public:
32 | ReadOnlyTableDelegate(bool _silent, QObject* parent = 0);
33 | virtual QWidget* createEditor(
34 | QWidget*, const QStyleOptionViewItem&, const QModelIndex &) const;
35 | private:
36 | bool silent;
37 | };
38 |
39 | // Show photo on label
40 | void showPhoto(const Photo& photo, QLabel* label);
41 |
42 | // Show inner file from memory
43 | void showInnerFile(const InnerFile& f);
44 |
45 | // Set color/font for each table view
46 | void updateTableConfig(QTableView* table);
47 |
48 | // Table view sort settings
49 | void readTableSortConfig(QTableView* table, bool forceNeedSort, bool needSort = false);
50 | void writeTableSortConfig(QTableView* table);
51 | void writeTableSortConfig(QHeaderView* header);
52 |
53 | #endif // HELPERS_H
54 |
--------------------------------------------------------------------------------
/app/languageselectdialog.cpp:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Human language select dialog
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #include "languagemanager.h"
15 | #include "languageselectdialog.h"
16 | #include "ui_languageselectdialog.h"
17 |
18 | LanguageSelectDialog::LanguageSelectDialog(QWidget *parent) :
19 | QDialog(parent),
20 | ui(new Ui::LanguageSelectDialog)
21 | {
22 | ui->setupUi(this);
23 | }
24 |
25 | LanguageSelectDialog::~LanguageSelectDialog()
26 | {
27 | delete ui;
28 | }
29 |
30 | QString LanguageSelectDialog::selectLanguage()
31 | {
32 | QString language = languageManager.systemLanguageNativeName();
33 | LanguageSelectDialog* d = new LanguageSelectDialog(0);
34 | d->ui->cbLanguage->addItems(languageManager.nativeNames());
35 | int index = d->ui->cbLanguage->findText(language);
36 | if (index!=-1)
37 | d->ui->cbLanguage->setCurrentIndex(index);
38 | d->exec();
39 | language = d->ui->cbLanguage->currentText();
40 | delete d;
41 | return language;
42 | }
43 |
44 | void LanguageSelectDialog::changeEvent(QEvent *e)
45 | {
46 | QDialog::changeEvent(e);
47 | switch (e->type()) {
48 | case QEvent::LanguageChange:
49 | ui->retranslateUi(this);
50 | break;
51 | default:
52 | break;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/3rdparty/quazip/quazip/quaadler32.h:
--------------------------------------------------------------------------------
1 | #ifndef QUAADLER32_H
2 | #define QUAADLER32_H
3 |
4 | /*
5 | Copyright (C) 2010 Adam Walczak
6 | Copyright (C) 2005-2014 Sergey A. Tachenov
7 |
8 | This file is part of QuaZIP.
9 |
10 | QuaZIP is free software: you can redistribute it and/or modify
11 | it under the terms of the GNU Lesser General Public License as published by
12 | the Free Software Foundation, either version 2.1 of the License, or
13 | (at your option) any later version.
14 |
15 | QuaZIP is distributed in the hope that it will be useful,
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | GNU Lesser General Public License for more details.
19 |
20 | You should have received a copy of the GNU Lesser General Public License
21 | along with QuaZIP. If not, see .
22 |
23 | See COPYING file for the full LGPL text.
24 |
25 | Original ZIP package is copyrighted by Gilles Vollant and contributors,
26 | see quazip/(un)zip.h files for details. Basically it's the zlib license.
27 | */
28 |
29 | #include
30 |
31 | #include "quachecksum32.h"
32 |
33 | /// Adler32 checksum
34 | /** \class QuaAdler32 quaadler32.h
35 | * This class wrappers the adler32 function with the QuaChecksum32 interface.
36 | * See QuaChecksum32 for more info.
37 | */
38 | class QUAZIP_EXPORT QuaAdler32 : public QuaChecksum32
39 | {
40 |
41 | public:
42 | QuaAdler32();
43 |
44 | quint32 calculate(const QByteArray &data);
45 |
46 | void reset();
47 | void update(const QByteArray &buf);
48 | quint32 value();
49 |
50 | private:
51 | quint32 checksum;
52 | };
53 |
54 | #endif //QUAADLER32_H
55 |
--------------------------------------------------------------------------------
/3rdparty/quazip/qztest/testquachecksum32.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2005-2014 Sergey A. Tachenov
3 |
4 | This file is part of QuaZIP test suite.
5 |
6 | QuaZIP is free software: you can redistribute it and/or modify
7 | it under the terms of the GNU Lesser General Public License as published by
8 | the Free Software Foundation, either version 2.1 of the License, or
9 | (at your option) any later version.
10 |
11 | QuaZIP is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | GNU Lesser General Public License for more details.
15 |
16 | You should have received a copy of the GNU Lesser General Public License
17 | along with QuaZIP. If not, see .
18 |
19 | See COPYING file for the full LGPL text.
20 |
21 | Original ZIP package is copyrighted by Gilles Vollant and contributors,
22 | see quazip/(un)zip.h files for details. Basically it's the zlib license.
23 | */
24 |
25 | #include "testquachecksum32.h"
26 |
27 | #include
28 | #include
29 |
30 | #include
31 |
32 | void TestQuaChecksum32::calculate()
33 | {
34 | QuaCrc32 crc32;
35 | QCOMPARE(crc32.calculate("Wikipedia"), 0xADAAC02Eu);
36 | QuaAdler32 adler32;
37 | QCOMPARE(adler32.calculate("Wikipedia"), 0x11E60398u);
38 | }
39 |
40 | void TestQuaChecksum32::update()
41 | {
42 | QuaCrc32 crc32;
43 | crc32.update("Wiki");
44 | crc32.update("pedia");
45 | QCOMPARE(crc32.value(), 0xADAAC02Eu);
46 | QuaAdler32 adler32;
47 | adler32.update("Wiki");
48 | adler32.update("pedia");
49 | QCOMPARE(adler32.value(), 0x11E60398u);
50 | }
51 |
--------------------------------------------------------------------------------
/3rdparty/qwebdavlib/README:
--------------------------------------------------------------------------------
1 | QWebDAV Library (qwebdavlib) version 1.0
2 |
3 | is a library for Qt4 and provides access to WebDAV servers.
4 | WebDAV is an extension for HTTP, so that a Web server can
5 | provide write access in addition to read access. The WebDAV
6 | standard provides the essential functionalities to access
7 | a Web server like a file server.
8 |
9 | More information
10 | http://en.wikipedia.org/wiki/WebDAV
11 |
12 | WebDAV standard as RFC4918:
13 | "HTTP Extensions for Web Distributed Authoring and
14 | Versioning (WebDAV)" from June 2007
15 | http://tools.ietf.org/html/rfc4918
16 |
17 | This library has been derived from previous works
18 | QWebdav plugin for MeeDav (LGPL v2.1)
19 | http://projects.developer.nokia.com/meedav/
20 | QWebdav - WebDAV lib for Qt4 (LGPL v2.1)
21 | http://xf.iksaif.net/dev/qwebdav.html
22 |
23 | Tested WebDAV server:
24 | * Apache HTTP Server with mod_dav
25 | Apache/2.2.14, http://httpd.apache.org/
26 | * Microsoft Internet Information Service 7.5 (MS IIS 7.5)
27 | as used by Windows 7 and Windows Server 2008 R2
28 | * SabreDAV - WebDAV framework for PHP
29 | SabreDAV 1.6.1-stable, http://code.google.com/p/sabredav/
30 |
31 | QWebdav Library supports the following authentication methods:
32 | (as provided by Qt4)
33 |
34 | * Basic
35 | http://en.wikipedia.org/wiki/Basic_access_authentication
36 | * NTLM version 1 (older Windows challenge-response authentication)
37 | http://en.wikipedia.org/wiki/NTLM
38 | * Digest-MD5
39 | http://en.wikipedia.org/wiki/Digest_access_authentication
40 |
41 | More information on authentication by Qt4
42 | http://qt-project.org/doc/qt-4.7/qauthenticator.html
43 |
--------------------------------------------------------------------------------
/app/innerfilewindow.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Inner Filesystem Window
4 | *
5 | * Copyright 2022 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef INNERFILEWINDOW_H
14 | #define INNERFILEWINDOW_H
15 |
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include
21 |
22 | #include "contactlist.h"
23 | #include "innerfilemodel.h"
24 |
25 | namespace Ui {
26 | class InnerFileWindow;
27 | }
28 |
29 | class InnerFileWindow : public QDialog
30 | {
31 | Q_OBJECT
32 |
33 | public:
34 | explicit InnerFileWindow(ContactList* contacts);
35 | ~InnerFileWindow();
36 |
37 | private slots:
38 | void toggleSort();
39 | void onSortIndicatorChanged(int,Qt::SortOrder);
40 | void on_actionCopy_text_triggered();
41 | void on_leFilter_textChanged(const QString &newText);
42 | void on_btnSaveAll_clicked();
43 |
44 | void on_actionShowFile_triggered();
45 |
46 | void on_actionSave_file_triggered();
47 |
48 | protected:
49 | void showEvent(QShowEvent*);
50 |
51 | private:
52 | Ui::InnerFileWindow *ui;
53 | InnerFileModel* model;
54 | QSortFilterProxyModel *proxy;
55 | QStatusBar* statusBar;
56 | QLabel *lbCount, *lbMode;
57 | void updateModel();
58 | void updateStatus();
59 | QModelIndex selectedRecord(bool errorIfNoSelected = true);
60 | };
61 |
62 | #endif // INNERFILEWINDOW_H
63 |
--------------------------------------------------------------------------------
/3rdparty/quazip/qztest/testquazipfile.h:
--------------------------------------------------------------------------------
1 | #ifndef QUAZIP_TEST_QUAZIPFILE_H
2 | #define QUAZIP_TEST_QUAZIPFILE_H
3 |
4 | /*
5 | Copyright (C) 2005-2014 Sergey A. Tachenov
6 |
7 | This file is part of QuaZIP test suite.
8 |
9 | QuaZIP is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Lesser General Public License as published by
11 | the Free Software Foundation, either version 2.1 of the License, or
12 | (at your option) any later version.
13 |
14 | QuaZIP is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Lesser General Public License for more details.
18 |
19 | You should have received a copy of the GNU Lesser General Public License
20 | along with QuaZIP. If not, see .
21 |
22 | See COPYING file for the full LGPL text.
23 |
24 | Original ZIP package is copyrighted by Gilles Vollant and contributors,
25 | see quazip/(un)zip.h files for details. Basically it's the zlib license.
26 | */
27 |
28 | #include
29 | #include
30 |
31 | class TestQuaZipFile: public QObject {
32 | Q_OBJECT
33 | private slots:
34 | void zipUnzip_data();
35 | void zipUnzip();
36 | void bytesAvailable_data();
37 | void bytesAvailable();
38 | void atEnd_data();
39 | void atEnd();
40 | void posRead_data();
41 | void posRead();
42 | void posWrite_data();
43 | void posWrite();
44 | void getZip();
45 | void setZipName();
46 | void getFileInfo();
47 | void setFileName();
48 | void constructorDestructor();
49 | void setFileAttrs();
50 | void largeFile();
51 | };
52 |
53 | #endif // QUAZIP_TEST_QUAZIPFILE_H
54 |
--------------------------------------------------------------------------------
/app/comparedialog.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Contact comparison dialog
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #ifndef COMPAREDIALOG_H
15 | #define COMPAREDIALOG_H
16 |
17 | #include
18 | #include
19 | #include "comparecontainers.h"
20 |
21 | namespace Ui {
22 | class CompareDialog;
23 | }
24 |
25 | class CompareDialog : public QDialog
26 | {
27 | Q_OBJECT
28 |
29 | public:
30 | explicit CompareDialog(QWidget *parent = 0);
31 | ~CompareDialog();
32 | void setHeaders(const QString& left, const QString& right);
33 | void setData(const ContactItem& left, const ContactItem& right, bool dropRightItem);
34 | void getData(ContactItem& left, ContactItem& right, bool& dropRightItem);
35 | private:
36 | Ui::CompareDialog *ui;
37 | // Pairs
38 | StringPair* pFullName;
39 | NamePair* pNames;
40 | PhonesPair* pPhones;
41 | EmailsPair* pEmails;
42 | DateItemPair* pBDay;
43 | DateItemPair* pAnn;
44 | StringPair *pDesc, *pSortString;
45 | PhotoPair* pPhoto;
46 | StringPair *pOrg, *pTitle;
47 | PostalAddressPair *pAddrs;
48 | StringPair *pNickName, *pURL;
49 | MessengersPair *pIMs;
50 | // Bottom common elements
51 | QCheckBox* cbDropRightItem;
52 | template
53 | void checkPair(const QString& title, P** pair, T& leftData, T& rightData);
54 | };
55 |
56 | #endif // COMPAREDIALOG_H
57 |
--------------------------------------------------------------------------------
/3rdparty/quazip/qztest/testquazip.h:
--------------------------------------------------------------------------------
1 | #ifndef QUAZIP_TEST_QUAZIP_H
2 | #define QUAZIP_TEST_QUAZIP_H
3 |
4 | /*
5 | Copyright (C) 2005-2014 Sergey A. Tachenov
6 |
7 | This file is part of QuaZIP test suite.
8 |
9 | QuaZIP is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Lesser General Public License as published by
11 | the Free Software Foundation, either version 2.1 of the License, or
12 | (at your option) any later version.
13 |
14 | QuaZIP is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Lesser General Public License for more details.
18 |
19 | You should have received a copy of the GNU Lesser General Public License
20 | along with QuaZIP. If not, see .
21 |
22 | See COPYING file for the full LGPL text.
23 |
24 | Original ZIP package is copyrighted by Gilles Vollant and contributors,
25 | see quazip/(un)zip.h files for details. Basically it's the zlib license.
26 | */
27 |
28 | #include
29 |
30 | #if (QT_VERSION >= 0x050100)
31 | #define QUAZIP_TEST_QSAVEFILE
32 | #endif
33 |
34 | class TestQuaZip: public QObject {
35 | Q_OBJECT
36 | private slots:
37 | void getFileList_data();
38 | void getFileList();
39 | void add_data();
40 | void add();
41 | void setFileNameCodec_data();
42 | void setFileNameCodec();
43 | void setDataDescriptorWritingEnabled();
44 | void testQIODeviceAPI();
45 | void setZipName();
46 | void setIoDevice();
47 | void setCommentCodec();
48 | void setAutoClose();
49 | #ifdef QUAZIP_TEST_QSAVEFILE
50 | void saveFileBug();
51 | #endif
52 | void testSequential();
53 | };
54 |
55 | #endif // QUAZIP_TEST_QUAZIP_H
56 |
--------------------------------------------------------------------------------
/app/phonetypedialog.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | PhoneTypeDialog
4 |
5 |
6 |
7 | 0
8 | 0
9 | 400
10 | 300
11 |
12 |
13 |
14 | Phone type
15 |
16 |
17 | -
18 |
19 |
20 | -
21 |
22 |
23 | Qt::Horizontal
24 |
25 |
26 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | buttonBox
36 | accepted()
37 | PhoneTypeDialog
38 | accept()
39 |
40 |
41 | 248
42 | 254
43 |
44 |
45 | 157
46 | 274
47 |
48 |
49 |
50 |
51 | buttonBox
52 | rejected()
53 | PhoneTypeDialog
54 | reject()
55 |
56 |
57 | 316
58 | 260
59 |
60 |
61 | 286
62 | 274
63 |
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/core/formats/network/asyncformat.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Abstract class for network/device io with connection and timeouts
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef ASYNCFORMAT_H
14 | #define ASYNCFORMAT_H
15 |
16 | #include
17 | #include "formats/iformat.h"
18 |
19 | // Network errors
20 | #define S_HOST_NOT_FOUND QObject::tr("Server %1 not found")
21 | #define S_SRV_ERROR QObject::tr("Network error. Server %1 replied: %2")
22 | #define S_CHECK_CONN QObject::tr("\nCheck username, password, protocol and port")
23 |
24 | class IAsyncUI;
25 |
26 | class AsyncFormat : public QObject, public IFormat
27 | {
28 | Q_OBJECT
29 | public:
30 | AsyncFormat();
31 | void setUI(IAsyncUI* ptr);
32 | QStringList errors();
33 | QString fatalError();
34 | protected:
35 | enum State {
36 | StateOff,
37 | StateSSLRequest,
38 | StateConnect,
39 | StateTransfer,
40 | StateError
41 | } state;
42 | QString _url;
43 | QStringList _errors;
44 | QString _fatalError;
45 | IAsyncUI* ui;
46 | void pause(int msecs);
47 | signals:
48 | void connected();
49 | void progress(const QString& stage, int progress, int total);
50 | };
51 |
52 | class IAsyncUI {
53 | public:
54 | virtual QString inputLogin() = 0;
55 | virtual QString inputPassword() = 0;
56 | virtual bool securityConfirm(const QString& question) = 0;
57 | };
58 |
59 | #endif // ASYNCFORMAT_H
60 |
--------------------------------------------------------------------------------
/app/multicontactdialog.cpp:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Multi contact editing dialog
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #include "multicontactdialog.h"
15 | #include "ui_multicontactdialog.h"
16 |
17 | MultiContactDialog::MultiContactDialog(QWidget *parent) :
18 | QDialog(parent),
19 | ui(new Ui::MultiContactDialog)
20 | {
21 | ui->setupUi(this);
22 | }
23 |
24 | MultiContactDialog::~MultiContactDialog()
25 | {
26 | delete ui;
27 | }
28 |
29 | void MultiContactDialog::setData(const ContactItem &item, bool firstItem)
30 | {
31 | if (firstItem) {
32 | ui->leTitle->setText(item.title);
33 | ui->leOrganization->setText(item.organization);
34 | ui->edDescription->setPlainText(item.organization);
35 | }
36 | else {
37 | if (ui->leTitle->text()!=item.title)
38 | ui->leTitle->setText("*");
39 | if (ui->leOrganization->text()!=item.organization)
40 | ui->leOrganization->setText("*");
41 | if (ui->edDescription->toPlainText()!=item.description)
42 | ui->edDescription->setPlainText("*");
43 | }
44 | }
45 |
46 | void MultiContactDialog::getData(ContactItem &item)
47 | {
48 | if (ui->leTitle->text()!=("*"))
49 | item.title = ui->leTitle->text();
50 | if (ui->leOrganization->text()!=("*"))
51 | item.organization = ui->leOrganization->text();
52 | if (ui->edDescription->toPlainText()!=("*"))
53 | item.description = ui->edDescription->toPlainText();
54 | }
55 |
--------------------------------------------------------------------------------
/core/formats/network/carddavformat.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: CardDAV protocol support
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #include
15 |
16 | #include "asyncformat.h"
17 | #include "qwebdavdirparser.h"
18 | #include "qwebdav.h"
19 | #include "../common/vcarddata.h"
20 |
21 | #ifndef CARDDAVFORMAT_H
22 | #define CARDDAVFORMAT_H
23 |
24 | # define PATH_CARDDAV_OWNCLOUD QString("/remote.php/carddav/addressbooks/%1/contacts")
25 | # define PATH_CARDDAV_NEXTCLOUD QString("/nextcloud/remote.php/dav/addressbooks/users/%1/contacts")
26 |
27 | class CardDAVFormat : public AsyncFormat, VCardData
28 | {
29 | Q_OBJECT
30 | public:
31 | explicit CardDAVFormat();
32 | virtual bool importRecords(const QString& url, ContactList& list, bool append);
33 | virtual bool exportRecords(const QString& url, ContactList& list);
34 | QNetworkAccessManager* netManager();
35 | private:
36 | QWebdav w;
37 | QWebdavDirParser p;
38 | QString host; // for valid error messages
39 | // Certificate details
40 | QStringList sslMessages;
41 | QString digMd5, digSha1;
42 | // Reading data
43 | ContactList* readingList;
44 | public slots:
45 | void processSslCertifcate(const QList &errors);
46 | void onError(QString s);
47 | void onFinish();
48 | void replyFinished();
49 | void writeFinished();
50 | //void urlReqFinished();
51 | //void urlReqError(QNetworkReply::NetworkError code);
52 | };
53 |
54 | #endif // CARDDAVFORMAT_H
55 |
--------------------------------------------------------------------------------
/core/formats/files/fileformat.cpp:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Abstract class for file export/import format
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #include
15 |
16 | #include "fileformat.h"
17 | #include "globals.h"
18 |
19 | FileFormat::FileFormat()
20 | {}
21 |
22 | FileFormat::~FileFormat()
23 | {}
24 |
25 | bool FileFormat::setCharSet(const QString&)
26 | {
27 | return false; // not all formats support this feature
28 | }
29 |
30 | QStringList FileFormat::errors()
31 | {
32 | return _errors;
33 | }
34 |
35 | QString FileFormat::fatalError()
36 | {
37 | return _fatalError;
38 | }
39 |
40 | bool FileFormat::openFile(QString path, QIODevice::OpenMode mode)
41 | {
42 | file.setFileName(path);
43 | bool res = file.open(mode);
44 | if (!res)
45 | _fatalError = ((mode==QIODevice::ReadOnly) ? S_READ_ERR : S_WRITE_ERR).arg(path);
46 | return res;
47 | }
48 |
49 | void FileFormat::closeFile()
50 | {
51 | if (file.isOpen())
52 | file.close();
53 | }
54 |
55 | void FileFormat::lossData(QStringList &errors, const QString &contactName, const QString &fieldName, bool condition)
56 | {
57 | if (condition)
58 | errors << S_ERR_UNSUPPORTED_TAG.arg(contactName).arg(fieldName.toLower());
59 | }
60 |
61 | void FileFormat::lossData(QStringList &errors, const QString &contactName, const QString &fieldName, const QString &field)
62 | {
63 | lossData(errors, contactName, fieldName, !field.isEmpty());
64 | // TODO unify UDXFile with it
65 | }
66 |
--------------------------------------------------------------------------------
/core/corehelpers.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Core Helpers
4 | *
5 | * Copyright 2021 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef COREHELPERS_H
14 | #define COREHELPERS_H
15 |
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include
21 | #include
22 |
23 | // Enum settings helper
24 | struct EnumSetting {
25 | QString section; // section name in config/registry
26 | QString item; // config item name
27 | QString allValues; // semicolon-sepatated possible values
28 | short defaultValue; // index of default value
29 | short load(QSettings* settings) const;
30 | void save(QSettings* settings, short value) const;
31 | QStringList possibleValues() const;
32 | };
33 |
34 | // QFlag helper
35 | template
36 | void setQFlag(QFlags& flags, T f, bool value)
37 | {
38 | if (value)
39 | flags |= f;
40 | else
41 | flags &= ~f;
42 | }
43 |
44 | // Console output helper
45 | #define DSTR(x) x.toLocal8Bit().data()
46 |
47 | // Entire container sort syntax like qSort
48 | // In C++20, I can use std::ranges::sort... but later... later...
49 | #define sortO(X) std::sort(X.begin(), X.end())
50 | #define sortP(X) std::sort(X->begin(), X->end())
51 |
52 | // Qt inter-versional hacks
53 | #if QT_VERSION >= QT_VERSION_CHECK(5,14,0)
54 | #define ENDL Qt::endl
55 | #define SKIP_EMPTY_PARTS Qt::SkipEmptyParts
56 | #else
57 | #define ENDL endl
58 | #define SKIP_EMPTY_PARTS QString::SkipEmptyParts
59 | #endif
60 |
61 | #endif // COREHELPERS_H
62 |
--------------------------------------------------------------------------------
/model/messagemodel.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: SMS Visualization Model
4 | *
5 | * Copyright 2020 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef MESSAGEMODEL_H
14 | #define MESSAGEMODEL_H
15 |
16 | #include
17 |
18 | #include "contactlist.h"
19 | #include "decodedmessagelist.h"
20 |
21 | enum MessageColumn {
22 | mcDate,
23 | mcCorrespondent,
24 | mcNumber,
25 | mcFolder,
26 | mcFlags,
27 | mcText,
28 | mcLast
29 | };
30 |
31 | class MessageModel : public QAbstractTableModel
32 | {
33 | Q_OBJECT
34 |
35 | public:
36 | explicit MessageModel(QObject *parent, ContactList* src);
37 | void update(const MessageSourceFlags& flags, QStringList& errors);
38 | void updateView();
39 | // Header:
40 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
41 | // Basic functionality:
42 | int rowCount(const QModelIndex &parent = QModelIndex()) const;
43 | int columnCount(const QModelIndex &parent = QModelIndex()) const;
44 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
45 | // Helpers
46 | DecodedMessage& item(int index);
47 | int mmsCount();
48 | int mergeDupCount();
49 | int mergeMultiPartCount();
50 | bool saveToCSV(const QString& path);
51 | bool saveAllMMSFiles(const QString& dirPath, QString& fatalError) const;
52 | void hardSort();
53 | private:
54 | ContactList* _src;
55 | DecodedMessageList msgs;
56 | QStringList headers;
57 | };
58 |
59 | #endif // MESSAGEMODEL_H
60 |
--------------------------------------------------------------------------------
/3rdparty/quazip/quazip/quazip_global.h:
--------------------------------------------------------------------------------
1 | #ifndef QUAZIP_GLOBAL_H
2 | #define QUAZIP_GLOBAL_H
3 |
4 | /*
5 | Copyright (C) 2005-2014 Sergey A. Tachenov
6 |
7 | This file is part of QuaZIP.
8 |
9 | QuaZIP is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Lesser General Public License as published by
11 | the Free Software Foundation, either version 2.1 of the License, or
12 | (at your option) any later version.
13 |
14 | QuaZIP is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Lesser General Public License for more details.
18 |
19 | You should have received a copy of the GNU Lesser General Public License
20 | along with QuaZIP. If not, see .
21 |
22 | See COPYING file for the full LGPL text.
23 |
24 | Original ZIP package is copyrighted by Gilles Vollant and contributors,
25 | see quazip/(un)zip.h files for details. Basically it's the zlib license.
26 | */
27 |
28 | #include
29 |
30 | /**
31 | This is automatically defined when building a static library, but when
32 | including QuaZip sources directly into a project, QUAZIP_STATIC should
33 | be defined explicitly to avoid possible troubles with unnecessary
34 | importing/exporting.
35 | */
36 | #ifdef QUAZIP_STATIC
37 | #define QUAZIP_EXPORT
38 | #else
39 | /**
40 | * When building a DLL with MSVC, QUAZIP_BUILD must be defined.
41 | * qglobal.h takes care of defining Q_DECL_* correctly for msvc/gcc.
42 | */
43 | #if defined(QUAZIP_BUILD)
44 | #define QUAZIP_EXPORT Q_DECL_EXPORT
45 | #else
46 | #define QUAZIP_EXPORT Q_DECL_IMPORT
47 | #endif
48 | #endif // QUAZIP_STATIC
49 |
50 | #ifdef __GNUC__
51 | #define UNUSED __attribute__((__unused__))
52 | #else
53 | #define UNUSED
54 | #endif
55 |
56 | #define QUAZIP_EXTRA_NTFS_MAGIC 0x000Au
57 | #define QUAZIP_EXTRA_NTFS_TIME_MAGIC 0x0001u
58 |
59 | #endif // QUAZIP_GLOBAL_H
60 |
--------------------------------------------------------------------------------
/3rdparty/quazip/FindQuaZip.cmake:
--------------------------------------------------------------------------------
1 | # QUAZIP_FOUND - QuaZip library was found
2 | # QUAZIP_INCLUDE_DIR - Path to QuaZip include dir
3 | # QUAZIP_INCLUDE_DIRS - Path to QuaZip and zlib include dir (combined from QUAZIP_INCLUDE_DIR + ZLIB_INCLUDE_DIR)
4 | # QUAZIP_LIBRARIES - List of QuaZip libraries
5 | # QUAZIP_ZLIB_INCLUDE_DIR - The include dir of zlib headers
6 |
7 |
8 | IF (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIBRARIES)
9 | # in cache already
10 | SET(QUAZIP_FOUND TRUE)
11 | ELSE (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIBRARIES)
12 | IF (Qt5Core_FOUND)
13 | set(QUAZIP_LIB_VERSION_SUFFIX 5)
14 | ENDIF()
15 | IF (WIN32)
16 | FIND_PATH(QUAZIP_LIBRARY_DIR
17 | WIN32_DEBUG_POSTFIX d
18 | NAMES libquazip${QUAZIP_LIB_VERSION_SUFFIX}.dll
19 | HINTS "C:/Programme/" "C:/Program Files"
20 | PATH_SUFFIXES QuaZip/lib
21 | )
22 | FIND_LIBRARY(QUAZIP_LIBRARIES NAMES libquazip${QUAZIP_LIB_VERSION_SUFFIX}.dll HINTS ${QUAZIP_LIBRARY_DIR})
23 | FIND_PATH(QUAZIP_INCLUDE_DIR NAMES quazip.h HINTS ${QUAZIP_LIBRARY_DIR}/../ PATH_SUFFIXES include/quazip)
24 | FIND_PATH(QUAZIP_ZLIB_INCLUDE_DIR NAMES zlib.h)
25 | ELSE(WIN32)
26 | FIND_PACKAGE(PkgConfig)
27 | # pkg_check_modules(PC_QCA2 QUIET qca2)
28 | pkg_check_modules(PC_QUAZIP quazip)
29 | FIND_LIBRARY(QUAZIP_LIBRARIES
30 | WIN32_DEBUG_POSTFIX d
31 | NAMES quazip${QUAZIP_LIB_VERSION_SUFFIX}
32 | HINTS /usr/lib /usr/lib64
33 | )
34 | FIND_PATH(QUAZIP_INCLUDE_DIR quazip.h
35 | HINTS /usr/include /usr/local/include
36 | PATH_SUFFIXES quazip${QUAZIP_LIB_VERSION_SUFFIX}
37 | )
38 | FIND_PATH(QUAZIP_ZLIB_INCLUDE_DIR zlib.h HINTS /usr/include /usr/local/include)
39 | ENDIF (WIN32)
40 | INCLUDE(FindPackageHandleStandardArgs)
41 | SET(QUAZIP_INCLUDE_DIRS ${QUAZIP_INCLUDE_DIR} ${QUAZIP_ZLIB_INCLUDE_DIR})
42 | find_package_handle_standard_args(QUAZIP DEFAULT_MSG QUAZIP_LIBRARIES QUAZIP_INCLUDE_DIR QUAZIP_ZLIB_INCLUDE_DIR QUAZIP_INCLUDE_DIRS)
43 | ENDIF (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIBRARIES)
44 |
--------------------------------------------------------------------------------
/app/languageselectdialog.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | LanguageSelectDialog
4 |
5 |
6 |
7 | 0
8 | 0
9 | 269
10 | 115
11 |
12 |
13 |
14 | Language Selection
15 |
16 |
17 | -
18 |
19 |
20 | Select your language
21 |
22 |
23 |
24 | -
25 |
26 |
27 | -
28 |
29 |
30 | Qt::Horizontal
31 |
32 |
33 | QDialogButtonBox::Ok
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | buttonBox
43 | accepted()
44 | LanguageSelectDialog
45 | accept()
46 |
47 |
48 | 248
49 | 254
50 |
51 |
52 | 157
53 | 274
54 |
55 |
56 |
57 |
58 | buttonBox
59 | rejected()
60 | LanguageSelectDialog
61 | reject()
62 |
63 |
64 | 316
65 | 260
66 |
67 |
68 | 286
69 | 274
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/app/logwindow.cpp:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Export/Import log window
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #include
15 | #include
16 | #include
17 |
18 | #include "logwindow.h"
19 | #include "ui_logwindow.h"
20 |
21 | LogWindow::LogWindow(QWidget *parent) :
22 | QDialog(parent),
23 | ui(new Ui::LogWindow)
24 | {
25 | ui->setupUi(this);
26 | // Hack to set button from box as default
27 | if (ui->buttonBox->buttons().count()>0) {
28 | QAbstractButton* abtnClose = ui->buttonBox->buttons()[0];
29 | QPushButton* btnClose = dynamic_cast(abtnClose);
30 | if (btnClose)
31 | btnClose->setDefault(true);
32 | }
33 | }
34 |
35 | LogWindow::~LogWindow()
36 | {
37 | delete ui;
38 | }
39 |
40 | void LogWindow::setData(const QString& path, int itemCount, const QStringList &errors)
41 | {
42 | setWindowTitle(tr("File %1").arg(path));
43 | ui->lbSummary->setText(tr("%1 records has been read").arg(itemCount));
44 | ui->lwErrors->clear();
45 | ui->lwErrors->addItems(errors);
46 | }
47 |
48 | void LogWindow::changeEvent(QEvent *e)
49 | {
50 | QDialog::changeEvent(e);
51 | switch (e->type()) {
52 | case QEvent::LanguageChange:
53 | ui->retranslateUi(this);
54 | break;
55 | default:
56 | break;
57 | }
58 | }
59 |
60 | void LogWindow::on_btnToClipboard_clicked()
61 | {
62 | QString content = "";
63 | for (int i=0; ilwErrors->count(); i++) {
64 | if (i>0)
65 | content += "\n";
66 | content += ui->lwErrors->item(i)->text();
67 | }
68 | qApp->clipboard()->setText(content);
69 | }
70 |
--------------------------------------------------------------------------------
/3rdparty/quazip/quazip.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.40629.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "quazip", "quazip\quazip.vcxproj", "{E4AC5F56-B711-4F0E-BC83-CDE8B6CD53AD}"
7 | EndProject
8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qztest", "qztest\qztest.vcxproj", "{7632B767-D089-4F15-8B1E-C4B3F9EBF592}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Win32 = Debug|Win32
13 | Debug|x64 = Debug|x64
14 | Release|Win32 = Release|Win32
15 | Release|x64 = Release|x64
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {E4AC5F56-B711-4F0E-BC83-CDE8B6CD53AD}.Debug|Win32.ActiveCfg = Debug|Win32
19 | {E4AC5F56-B711-4F0E-BC83-CDE8B6CD53AD}.Debug|Win32.Build.0 = Debug|Win32
20 | {E4AC5F56-B711-4F0E-BC83-CDE8B6CD53AD}.Debug|x64.ActiveCfg = Debug|x64
21 | {E4AC5F56-B711-4F0E-BC83-CDE8B6CD53AD}.Debug|x64.Build.0 = Debug|x64
22 | {E4AC5F56-B711-4F0E-BC83-CDE8B6CD53AD}.Release|Win32.ActiveCfg = Release|Win32
23 | {E4AC5F56-B711-4F0E-BC83-CDE8B6CD53AD}.Release|Win32.Build.0 = Release|Win32
24 | {E4AC5F56-B711-4F0E-BC83-CDE8B6CD53AD}.Release|x64.ActiveCfg = Release|x64
25 | {E4AC5F56-B711-4F0E-BC83-CDE8B6CD53AD}.Release|x64.Build.0 = Release|x64
26 | {7632B767-D089-4F15-8B1E-C4B3F9EBF592}.Debug|Win32.ActiveCfg = Debug|Win32
27 | {7632B767-D089-4F15-8B1E-C4B3F9EBF592}.Debug|Win32.Build.0 = Debug|Win32
28 | {7632B767-D089-4F15-8B1E-C4B3F9EBF592}.Debug|x64.ActiveCfg = Debug|Win32
29 | {7632B767-D089-4F15-8B1E-C4B3F9EBF592}.Release|Win32.ActiveCfg = Release|Win32
30 | {7632B767-D089-4F15-8B1E-C4B3F9EBF592}.Release|Win32.Build.0 = Release|Win32
31 | {7632B767-D089-4F15-8B1E-C4B3F9EBF592}.Release|x64.ActiveCfg = Release|x64
32 | {7632B767-D089-4F15-8B1E-C4B3F9EBF592}.Release|x64.Build.0 = Release|x64
33 | EndGlobalSection
34 | GlobalSection(SolutionProperties) = preSolution
35 | HideSolutionNode = FALSE
36 | EndGlobalSection
37 | EndGlobal
38 |
--------------------------------------------------------------------------------
/3rdparty/qwebdavlib/CHANGES:
--------------------------------------------------------------------------------
1 | QWebDAV library (qwebdavlib) version 1.0 (LGPL v2.1)
2 |
3 | Changes* for version 1.0
4 | - Simple structure:
5 | * QWebdav inherits QNetworkAccessManager and is used to create
6 | requests and puts
7 | * QWebdavDirParser inherits QObject and is used together with QWebdav
8 | to request a directory listing and subsequent parsing of the
9 | response. QWebdavDirParser::getList() returns a QList of QWebdavItem.
10 | * QWebdavItem is used to handle all data related to a file or
11 | a directory
12 | * QNaturalSort make the function naturalCompare from
13 | http://qt.gitorious.org/qt/qt/blobs/4.7/src/gui/dialogs/qfilesystemmodel.cpp
14 | available for QWebdavDirParser to sort directory listings
15 | - SSL support added, so that certificates can be accepted explicitly
16 | with their MD5 and SHA1 digests. The lib can now also handle self-signed
17 | certificates which are not signed by a system-wide accepted certification
18 | authority (CA).
19 | - Source property has been removed (lack of support according to RFC4918)
20 | - Added custom port support
21 | - Added support of root path, which is prepended to the path
22 | argument of functions from class QWebdav, so that the root path can be used
23 | as WebDAV share path. The path arguments are relative to
24 | the root path.
25 | - FIX: request header destination (copy/move) has to be an absolute URI
26 | - username and password are not any longer part of the m_baseURL
27 | in qwebdav.cpp. They are only used to set parameters of QAuthenticator.
28 | - WebDAV server dependent handling of href of PROPFIND responses
29 | (Apache returns path without scheme and authority and
30 | MS IIS returns full URL)
31 |
32 | * in comparison to the initial libraries
33 | QWebdav plugin for MeeDav (LGPL v2.1)
34 | http://projects.developer.nokia.com/meedav/
35 | QWebdav - WebDAV lib for Qt4 (LGPL v2.1)
36 | http://xf.iksaif.net/dev/qwebdav.html
37 |
--------------------------------------------------------------------------------
/app/callwindow.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | CallWindow
4 |
5 |
6 |
7 | 0
8 | 0
9 | 1240
10 | 620
11 |
12 |
13 |
14 | Calls
15 |
16 |
17 | -
18 |
19 |
20 | QAbstractItemView::SelectRows
21 |
22 |
23 |
24 | -
25 |
26 |
-
27 |
28 |
-
29 |
30 |
31 | Filter
32 |
33 |
34 |
35 | -
36 |
37 |
38 |
39 |
40 | -
41 |
42 |
43 | Qt::Horizontal
44 |
45 |
46 |
47 | 40
48 | 20
49 |
50 |
51 |
52 |
53 | -
54 |
55 |
56 | &Save as...
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | Copy text
66 |
67 |
68 | Ctrl+C
69 |
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/model/recentlist.cpp:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Recent opened file/directory list
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #include
15 | #include "recentlist.h"
16 |
17 | RecentList::RecentList() : QStringList()
18 | {}
19 |
20 | void RecentList::read()
21 | {
22 | clear();
23 | QSettings settings("DarkHobbit", "doublecontact"); // TODO unify with main config
24 | #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
25 | // https://doc.qt.io/qt-6.2/qsettings.html#Format-enum
26 | // In line with most implementations today, QSettings will assume the
27 | // INI file is utf-8 encoded. This means that keys and values will be
28 | // decoded as utf-8 encoded entries and written back as utf-8.
29 | settings.setIniCodec("UTF8");
30 | #endif
31 | int _count = settings.value("Recent/Count", 0).toInt();
32 | for (int i=1; i<=_count; i++)
33 | push_back(settings.value(QString("Recent/Item%1").arg(i)).toString());
34 | }
35 |
36 | void RecentList::write()
37 | {
38 | QSettings settings("DarkHobbit", "doublecontact");
39 | settings.setValue("Recent/Count", count());
40 | for (int i=1; i<=count(); i++)
41 | settings.setValue(QString("Recent/Item%1").arg(i), at(i-1));
42 | for (int i=count()+1; i<=MAX_RECENT_COUNT; i++)
43 | settings.remove(QString("Recent/Item%1").arg(i));
44 | settings.sync();
45 | }
46 |
47 | void RecentList::addItem(const QString &path)
48 | {
49 | if (indexOf(path)!=-1)
50 | return;
51 | insert(0, path);
52 | if (count()>MAX_RECENT_COUNT)
53 | removeLast();
54 | write();
55 | }
56 |
57 | void RecentList::removeItem(const QString &path)
58 | {
59 | removeOne(path);
60 | write();
61 | }
62 |
--------------------------------------------------------------------------------
/3rdparty/quazip/qztest/qztest.h:
--------------------------------------------------------------------------------
1 | #ifndef QUAZIP_TEST_QZTEST_H
2 | #define QUAZIP_TEST_QZTEST_H
3 |
4 | /*
5 | Copyright (C) 2005-2014 Sergey A. Tachenov
6 |
7 | This file is part of QuaZIP test suite.
8 |
9 | QuaZIP is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU Lesser General Public License as published by
11 | the Free Software Foundation, either version 2.1 of the License, or
12 | (at your option) any later version.
13 |
14 | QuaZIP is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Lesser General Public License for more details.
18 |
19 | You should have received a copy of the GNU Lesser General Public License
20 | along with QuaZIP. If not, see .
21 |
22 | See COPYING file for the full LGPL text.
23 |
24 | Original ZIP package is copyrighted by Gilles Vollant and contributors,
25 | see quazip/(un)zip.h files for details. Basically it's the zlib license.
26 | */
27 |
28 | #include
29 | #include
30 | #include
31 | #include
32 |
33 | extern bool createTestFiles(const QStringList &fileNames,
34 | int size = -1,
35 | const QString &dir = "tmp");
36 | extern void removeTestFiles(const QStringList &fileNames, const QString
37 | &dir = "tmp");
38 | extern bool createTestArchive(const QString &zipName,
39 | const QStringList &fileNames,
40 | const QString &dir = "tmp");
41 | extern bool createTestArchive(const QString &zipName,
42 | const QStringList &fileNames,
43 | QTextCodec *codec,
44 | const QString &dir = "tmp");
45 | extern bool createTestArchive(QIODevice *ioDevice,
46 | const QStringList &fileNames,
47 | QTextCodec *codec,
48 | const QString &dir = "tmp");
49 |
50 | #endif // QUAZIP_TEST_QZTEST_H
51 |
--------------------------------------------------------------------------------
/core/formats/files/vcffile.cpp:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: VCard file export/import
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #include "corehelpers.h"
15 | #include "vcffile.h"
16 | #include
17 | #include
18 |
19 | VCFFile::VCFFile()
20 | :FileFormat()
21 | {
22 | }
23 |
24 | bool VCFFile::setCharSet(const QString &value)
25 | {
26 | charSet = value;
27 | return true;
28 | }
29 |
30 | bool VCFFile::detect(const QString &url)
31 | {
32 | QFile f(url);
33 | if (!f.open(QIODevice::ReadOnly)) return false;
34 | QTextStream stream(&f); // TODO file?
35 | QString s1 = stream.readLine();
36 | bool res = s1.startsWith("BEGIN:VCARD", Qt::CaseInsensitive);
37 | f.close();
38 | return res;
39 | }
40 |
41 | QStringList VCFFile::supportedExtensions()
42 | {
43 | return (QStringList() << "vcf" << "VCF");
44 | }
45 |
46 | QStringList VCFFile::supportedFilters()
47 | {
48 | return (QStringList() << "vCard (*.vcf *.VCF)");
49 | }
50 |
51 | bool VCFFile::importRecords(const QString &url, ContactList &list, bool append)
52 | {
53 | QStringList data;
54 | if (!openFile(url, QIODevice::ReadOnly))
55 | return false;
56 | _errors.clear();
57 | BStringList content = BString(file.readAll()).splitByLines();
58 | closeFile();
59 | return VCardData::importRecords(content, list, append, _errors);
60 | }
61 |
62 | bool VCFFile::exportRecords(const QString &url, ContactList &list)
63 | {
64 | BStringList content;
65 | if (!VCardData::exportRecords(content, list, _errors))
66 | return false;
67 | if (!openFile(url, QIODevice::WriteOnly))
68 | return false;
69 | _errors.clear();
70 | file.write(content.joinByLines());
71 | closeFile();
72 | return true;
73 | }
74 |
--------------------------------------------------------------------------------
/doc/csvprofiles.en.md:
--------------------------------------------------------------------------------
1 | # Supported CSV profiles list #
2 |
3 | ## Explay BM50 ##
4 |
5 | Has header: yes, 54 columns.
6 |
7 | Charset: UTF-16LE with BOM.
8 |
9 | Quote cells: yes.
10 |
11 | Header fields:
12 | * Title
13 | * First name
14 | * Middle name
15 | * Last name
16 | * Suffix
17 | * Job title
18 | * Company
19 | * Birthday
20 | * SIP address
21 | * Push-to-talk
22 | * Share view
23 | * User ID
24 | * General mobile
25 | * General phone
26 | * General fax
27 | * General video call
28 | * General web address
29 | * General VOIP address
30 | * General P.O.Box
31 | * General extension
32 | * General street
33 | * General postal/ZIP code
34 | * General city
35 | * General state/province
36 | * General country/region
37 | * Home mobile
38 | * Home phone
39 | * Home email
40 | * Home fax
41 | * Home video call
42 | * Home web address
43 | * Home VOIP address
44 | * Home P.O.Box
45 | * Home extension
46 | * Home street
47 | * Home postal/ZIP code
48 | * Home city
49 | * Home state/province
50 | * Home country/region
51 | * Business mobile
52 | * Business phone
53 | * Business email
54 | * Business fax
55 | * Business video call
56 | * Business web address
57 | * Business VOIP address
58 | * Business P.O.Box
59 | * Business extension
60 | * Business street
61 | * Business postal/ZIP code
62 | * Business city
63 | * Business state/province
64 | * Business country/retion
65 | *
66 |
67 | Notes: TODO: need check, how many columns really read by phone.
68 |
69 | ## Explay TV240 ##
70 |
71 | Has header: yes, 7 columns.
72 |
73 | Charset: UTF-16LE (BOM appearance: unknown).
74 |
75 | Quote cells: no (I don't known, what will happened, if contact contains commas in name).
76 |
77 | Header fields:
78 | * Name
79 | * Number
80 | * Home Number
81 | * Company Name
82 | * E-mail Address
83 | * Office Number
84 | * Fax Number
85 |
86 | Notes: In TV240, only name and first phone are used. Other fields are ignored.
87 |
88 | TODO: In sample at source site, some commas in header replaced by semicolon; maybe, it's a mistake.
89 |
90 | TODO: check BOM presence.
91 |
92 | Source: http://4pda.ru/forum/index.php?showtopic=494378&view=findpost&p=30153623 (on Russian)
93 |
94 |
--------------------------------------------------------------------------------
/core/formats/common/vcarddata.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: VCard data export/import (both for file and network media)
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef VCARDDATA_H
14 | #define VCARDDATA_H
15 |
16 | #include
17 | #include
18 |
19 | #include "../../contactlist.h"
20 | #include "bstring.h"
21 | #include "vdata.h"
22 |
23 | class VCardData: public VData
24 | {
25 | public:
26 | VCardData();
27 | void forceVersion(GlobalConfig::VCFVersion version);
28 | void unforceVersion();
29 | bool importRecords(BStringList& lines, ContactList& list, bool append, QStringList& errors);
30 | bool exportRecords(BStringList& lines, const ContactList& list, QStringList& errors);
31 | void exportRecord(BStringList& lines, const ContactItem& item, QStringList& errors);
32 | protected:
33 | bool useOriginalFileVersion;
34 | GlobalConfig::GroupFormat groupFormat;
35 | private:
36 | GlobalConfig::VCFVersion formatVersion;
37 | bool _forceVersion;
38 | QStringList typeableTags, // Tags with possible TYPE attribute
39 | unEditingTags; // Known but un-editing tags
40 | void importDate(DateItem& item, const QString& src, QStringList& errors, const QString& location) const;
41 | void importAddress(PostalAddress& item, const QStringList& aTypes, const BStringList& values, QStringList& errors) const;
42 | BString exportDate(const DateItem& item) const;
43 | BString exportAddress(const PostalAddress& item) const;
44 | BString encodeAll(const BString& tag, const QStringList *aTypes, bool forceCharSet, const QString& value) const;
45 | BString encodeTypes(const QStringList& aTypes, StandardTypes* st = 0, int syncMLRef = -1) const;
46 | public:
47 | void debugSave(QFile& logFile, const QString& s, bool firstRec);
48 | };
49 |
50 | #endif // VCARDDATA_H
51 |
--------------------------------------------------------------------------------
/app/tagremovedialog.cpp:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Mass tag remove dialog
4 | *
5 | * Copyright 2021 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #include
15 | #include
16 | #include
17 | #include "globals.h"
18 | #include "tagremovedialog.h"
19 | #include "ui_tagremovedialog.h"
20 |
21 | TagRemoveDialog::TagRemoveDialog(QWidget *parent) :
22 | QDialog(parent),
23 | ui(new Ui::TagRemoveDialog)
24 | {
25 | ui->setupUi(this);
26 | setWindowTitle(S_MASS_TAG_REMOVE);
27 | }
28 |
29 | TagRemoveDialog::~TagRemoveDialog()
30 | {
31 | delete ui;
32 | }
33 |
34 | bool TagRemoveDialog::setData(ContactList& contacts)
35 | {
36 | QMap usage = contacts.nonStandardTagUsage();
37 | if (usage.isEmpty()) {
38 | QMessageBox::critical(0, S_ERROR,
39 | tr("Unknown tags not found"));
40 | return false;
41 | }
42 | // Make remove candidates list
43 | QLayout* l = ui->gbTagsForRemove->layout();
44 | foreach(const QString& tagName, usage.keys())
45 | l->addWidget(new QCheckBox(QString("%1 (%2)")
46 | .arg(tagName).arg(usage[tagName])));
47 | l->addItem(new QSpacerItem(1, 1));
48 | return true;
49 | }
50 |
51 | QStringList TagRemoveDialog::getData()
52 | {
53 | QStringList victims;
54 | foreach(QObject* ch, ui->gbTagsForRemove->children()) {
55 | QCheckBox* c = dynamic_cast(ch);
56 | if (c) {
57 | if (c->isChecked())
58 | victims << c->text().split(" ").first();
59 | }
60 | }
61 | return victims;
62 | }
63 |
64 | void TagRemoveDialog::on_btnSelectAll_clicked()
65 | {
66 | foreach(QObject* ch, ui->gbTagsForRemove->children()) {
67 | QCheckBox* c = dynamic_cast(ch);
68 | if (c)
69 | c->setChecked(true);
70 | }
71 | }
72 |
73 |
--------------------------------------------------------------------------------
/contconv/consoleasyncui.cpp:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Console UI for network/device io with connection and timeouts
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #include
14 | #include "consoleasyncui.h"
15 |
16 | ConsoleAsyncUI::ConsoleAsyncUI()
17 | : out(stdout), in(stdin)
18 | {
19 | }
20 |
21 | QString ConsoleAsyncUI::inputLogin()
22 | {
23 | out << QObject::tr("Enter your user name:");
24 | out.flush();
25 | QString login = in.readLine();
26 | return login;
27 | }
28 |
29 | QString ConsoleAsyncUI::inputPassword()
30 | {
31 | out << QObject::tr("Enter your password:");
32 | out.flush();
33 | echo(false);
34 | QString pass = in.readLine();
35 | echo(true);
36 | out << "\n";
37 | //out << "you entered: " << pass << "\n"; //===>
38 | return pass;
39 | }
40 |
41 | bool ConsoleAsyncUI::securityConfirm(const QString &question)
42 | {
43 | out << question << " (y|n)";
44 | out.flush();
45 | int answer = getchar();
46 | return (answer=='y');
47 | }
48 |
49 | // http://www.cplusplus.com/forum/general/12256/
50 | #ifdef WIN32
51 | #include
52 |
53 | void ConsoleAsyncUI::echo(bool on)
54 | {
55 | DWORD mode;
56 | HANDLE hConIn = GetStdHandle( STD_INPUT_HANDLE );
57 | GetConsoleMode( hConIn, &mode );
58 | mode = on
59 | ? (mode | ENABLE_ECHO_INPUT )
60 | : (mode & ~(ENABLE_ECHO_INPUT));
61 | SetConsoleMode( hConIn, mode );
62 | }
63 |
64 | #else
65 | #include
66 | #include
67 |
68 | void ConsoleAsyncUI::echo(bool on)
69 | {
70 | struct termios settings;
71 | tcgetattr( STDIN_FILENO, &settings );
72 | settings.c_lflag = on
73 | ? (settings.c_lflag | ECHO )
74 | : (settings.c_lflag & ~(ECHO));
75 | tcsetattr( STDIN_FILENO, TCSANOW, &settings );
76 | }
77 |
78 | #endif
79 |
--------------------------------------------------------------------------------
/app/logwindow.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | LogWindow
4 |
5 |
6 |
7 | 0
8 | 0
9 | 400
10 | 299
11 |
12 |
13 |
14 | Log Window
15 |
16 |
17 | -
18 |
19 |
20 | Summary
21 |
22 |
23 |
24 | -
25 |
26 |
27 | -
28 |
29 |
-
30 |
31 |
32 | Copy to clipboard
33 |
34 |
35 |
36 | -
37 |
38 |
39 | Qt::Horizontal
40 |
41 |
42 | QDialogButtonBox::Close
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | buttonBox
54 | accepted()
55 | LogWindow
56 | accept()
57 |
58 |
59 | 248
60 | 254
61 |
62 |
63 | 157
64 | 274
65 |
66 |
67 |
68 |
69 | buttonBox
70 | rejected()
71 | LogWindow
72 | reject()
73 |
74 |
75 | 316
76 | 260
77 |
78 |
79 | 286
80 | 274
81 |
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/app/sortdialog.cpp:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Hard sorting parameters dialog
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #include "globals.h"
14 | #include "sortdialog.h"
15 | #include "ui_sortdialog.h"
16 |
17 | SortDialog::SortDialog(QWidget *parent) :
18 | QDialog(parent),
19 | ui(new Ui::SortDialog)
20 | {
21 | ui->setupUi(this);
22 | ui->rbBySortString->setText(tr("Sort string"));
23 | ui->rbByLastName->setText(S_LAST_NAME);
24 | ui->rbByFirstName->setText(S_FIRST_NAME);
25 | ui->rbByFullName->setText(S_FULL_NAME);
26 | ui->rbByNick->setText(S_NICK);
27 | ui->rbByGroup->setText(S_GROUP);
28 | }
29 |
30 | SortDialog::~SortDialog()
31 | {
32 | delete ui;
33 | }
34 |
35 | ContactList::SortType SortDialog::getData()
36 | {
37 | if (ui->rbBySortString->isChecked())
38 | return ContactList::SortBySortString;
39 | else if (ui->rbByLastName->isChecked())
40 | return ContactList::SortByLastName;
41 | else if (ui->rbByFirstName->isChecked())
42 | return ContactList::SortByFirstName;
43 | else if (ui->rbByFullName->isChecked())
44 | return ContactList::SortByFullName;
45 | else if (ui->rbByNick->isChecked())
46 | return ContactList::SortByNick;
47 | else
48 | return ContactList::SortByGroup;
49 | }
50 |
51 | void SortDialog::setData(ContactList::SortType sortType)
52 | {
53 | if (sortType==ContactList::SortBySortString)
54 | ui->rbBySortString->setChecked(true);
55 | else if (sortType==ContactList::SortByLastName)
56 | ui->rbByLastName->setChecked(true);
57 | else if (sortType==ContactList::SortByFirstName)
58 | ui->rbByFirstName->setChecked(true);
59 | else if (sortType==ContactList::SortByFullName)
60 | ui->rbByFullName->setChecked(true);
61 | else if (sortType==ContactList::SortByNick)
62 | ui->rbByNick->setChecked(true);
63 | else
64 | ui->rbByGroup->setChecked(true);
65 | }
66 |
--------------------------------------------------------------------------------
/pack/appimage/doublecontact.appdata.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | doublecontact.desktop
5 | DoubleContact
6 | Contact manager primarily for phonebooks editing/merging
7 |
8 | DoubleContact is offline DE-independent contact manager primarily for phonebooks editing/merging.
9 | DoubleContact UI is similar to two panel file manages, but second panel can be disabled.
10 | Features:
11 |
12 | - saving and loading addressbooks files:
13 |
14 | - VCF (vCard 2.1, 3.0 and 4.0 supported, VCF files directory as single address book also supported);
15 | - CSV (profiles for some Explay models, OSMO PIM, Sylpheed email client and generic profile for full contact information save);
16 | - MPB (MyPhoneExplorer backup);
17 | - NBF (modern Nokia backup file, read only);
18 | - NBU (older Nokia backup file, read only);
19 | - UDX (Philips Xenium file);
20 |
21 |
22 | - contact view in table, sorting and filtering supported;
23 | - two panel view of two address books, with copy/move features;
24 | - single record editing, insert and remove;
25 | - group operations under selected records:
26 |
27 | - first/last name swap;
28 | - first/last name splitting;
29 | - phone number internationalization for some countries (in general, for ex-USSR);
30 | - phone numbers formatting by user-defined template, such as +N-NNN-NNN-NN-NN;
31 | - contact splitting for SIM card export (one phone per contact);
32 | - contact merge;
33 | - drop slashes and other specials;
34 | - formatted name generation;
35 |
36 |
37 | - mass non-standard X-tags remove;
38 | - two address books comparison with highlighting of identical, similar and differ contacts;
39 | - interactive merge according to the comparison results;
40 | - HTML report generation.
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/3rdparty/quazip/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | project(QuaZip)
2 | cmake_minimum_required(VERSION 2.6)
3 |
4 | # CMP0042: Explicitly acknowledge MACOSX_RPATH
5 | # (introduced in CMake 2.8.12, enabled by default in CMake 3.0,
6 | # and producing a warning when unset since 3.7.1)
7 | cmake_policy(SET CMP0042 NEW)
8 |
9 | option(BUILD_WITH_QT4 "Build QuaZip with Qt4 no matter if Qt5 was found" OFF)
10 |
11 | if( NOT BUILD_WITH_QT4 )
12 | # try Qt5 first, and prefer that if found
13 | find_package(Qt5Core QUIET)
14 | endif()
15 |
16 | if(Qt5Core_FOUND)
17 | set(CMAKE_CXX_STANDARD 11)
18 | set(QTCORE_LIBRARIES ${Qt5Core_LIBRARIES})
19 | set(QUAZIP_LIB_VERSION_SUFFIX 5)
20 | # if there is no QT_ROOT, try to deduce it from Qt QtCore include
21 | if("${QT_ROOT}" STREQUAL "")
22 | set(QT_ROOT ${QT_QTCORE_INCLUDE_DIR}/../..)
23 | endif()
24 | include_directories(${Qt5Core_INCLUDE_DIRS})
25 |
26 | macro(qt_wrap_cpp)
27 | qt5_wrap_cpp(${ARGN})
28 | endmacro()
29 | else()
30 | set(qt_min_version "4.5.0")
31 | find_package(Qt4 REQUIRED)
32 | set(QT_USE_QTGUI false)
33 | include(${QT_USE_FILE})
34 | include_directories(${QT_INCLUDES})
35 | set(QTCORE_LIBRARIES ${QT_QTCORE_LIBRARY})
36 |
37 | macro(qt_wrap_cpp)
38 | qt4_wrap_cpp(${ARGN})
39 | endmacro()
40 | endif()
41 |
42 | # Use system zlib on unix and Qt ZLIB on Windows
43 | if(UNIX OR MINGW)
44 | find_package(ZLIB REQUIRED)
45 | else(UNIX OR MINGW)
46 | set(ZLIB_INCLUDE_DIRS "${QT_ROOT}/src/3rdparty/zlib" CACHE STRING "Path to ZLIB headers of Qt")
47 | set(ZLIB_LIBRARIES "")
48 | if(NOT EXISTS "${ZLIB_INCLUDE_DIRS}/zlib.h")
49 | message("Please specify a valid zlib include dir")
50 | endif(NOT EXISTS "${ZLIB_INCLUDE_DIRS}/zlib.h")
51 | endif(UNIX OR MINGW)
52 |
53 | # All build libraries are moved to this directory
54 | set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
55 |
56 | set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
57 | set(LIB_DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE STRING "Library directory name" FORCE)
58 | set(QUAZIP_LIB_TARGET_NAME quazip${QUAZIP_LIB_VERSION_SUFFIX} CACHE
59 | INTERNAL "Target name of libquazip" FORCE)
60 |
61 | add_subdirectory(quazip)
62 |
63 | install(FILES FindQuaZip.cmake RENAME FindQuaZip${QUAZIP_LIB_VERSION_SUFFIX}.cmake DESTINATION ${CMAKE_ROOT}/Modules)
64 |
--------------------------------------------------------------------------------
/3rdparty/quazip/quazip/doc/faq.dox:
--------------------------------------------------------------------------------
1 | /**
2 | * \page faq QuaZip FAQ
3 | *
4 | *
12 | *
13 | * \anchor faq-non-QIODevice Q. Is there any way to use QuaZipFile in Qt
14 | * where you are supposed to use normal (non-zipped) file, but not
15 | * through QIODevice API?
16 | *
17 | * A. Usually not. For example, if you are passing file name to some
18 | * database driver (like SQLite), Qt usually just passes this name down
19 | * to the 3rd-party library, which is usually does not know anything
20 | * about QIODevice and therefore there is no way to pass QuaZipFile as
21 | * normal file. However, if we are talking about some place where you
22 | * pass file name, and then indirectly use QFile to open it, then it is
23 | * a good idea to make overloaded method, which accepts a QIODevice
24 | * pointer. Then you would be able to pass QuaZipFile as well as many
25 | * other nice things such as QBuffer or QProcess.
26 | *
27 | * \anchor faq-zip64 Q. Can QuaZIP handle files larger than 4GB? What
28 | * about zip64 standard?
29 | *
30 | * A. Starting with version 0.6, QuaZIP uses Minizip 1.1 with zip64
31 | * support which should handle large files perfectly. The zip64 support
32 | * in Minizip looks like it's not 100% conforming to the standard, but
33 | * 3rd party tools seem to have no problem with the resulting archives.
34 | *
35 | * \anchor faq-seekable Q. Can QuaZIP write archives to a sequential QIODevice like QTcpSocket?
36 | *
37 | * A. Not yet. It is not supported by vanilla Minizip (the back-end
38 | * QuaZIP uses), although theoretically possible according to the ZIP
39 | * standard. It would require some Minizip modifications that would
40 | * allow it to detect non-seekable I/O and produce necessary output
41 | * structures. QuaZIP already writes data descriptor which is necessary
42 | * for non-seekable I/O. The only thing that is apparently left is to
43 | * make Minizip fill local headers with correct values and forget about
44 | * seeking after closing the file.
45 | **/
46 |
--------------------------------------------------------------------------------
/core/formats/common/nokiadata.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Nokia NBF/NBU common data parts import
4 | *
5 | * Copyright 2018 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 3 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef NOKIADATA_H
14 | #define NOKIADATA_H
15 |
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include "../../decodedmessagelist.h"
21 |
22 | /*
23 | External references for MMS parser:
24 | http://heyman.info/mmsdecoder.php
25 | http://www.openmobilealliance.org/tech/affiliates/LicenseAgreement.asp?DocName=/wap/wap-209-mmsencapsulation-20020105-a.pdf
26 | http://www.openmobilealliance.org/tech/affiliates/LicenseAgreement.asp?DocName=/wap/wap-230-wsp-20010705-a.pdf
27 | http://www.wapforum.org/wina/wsp-content-type.htm
28 | http://www.nowsms.com/discus/messages/board-topics.html
29 | http://www.nowsms.com/discus/messages/12/554.html
30 | http://www.nowsms.com/discus/messages/12/470.html
31 | http://www.nowsms.com/discus/messages/12/522.html
32 | */
33 |
34 | class NokiaData
35 | {
36 | public:
37 | NokiaData();
38 | static bool ReadPredefBinMessage(const QString& fileName, const QByteArray& src, DecodedMessageList &list, bool append, QStringList &errors);
39 | // TODO add other nokia message types import, if examples will be avaliable
40 | private:
41 | static quint8 getU8(QDataStream& stream);
42 | static bool ReadMMS(QDataStream& ds, DecodedMessage &msg, QStringList &errors);
43 | static QString ReadMMSTextString(QDataStream& ds);
44 | static QString ReadMMSEncodedString(QDataStream& ds);
45 | static QString ReadMMSYesNo(QDataStream& ds, QStringList &errors);
46 | static long ReadMMSLongInteger(QDataStream& ds, QStringList &errors);
47 | static QDateTime ReadMMSDateTime(QDataStream& ds, QStringList &errors);
48 | static QString ReadMMSMessageClass(QDataStream& ds);
49 | static quint64 ReadMMSValueLength(QDataStream& ds, QStringList &errors);
50 | static quint64 ReadMMSUint(QDataStream& ds, QStringList &errors);
51 | };
52 |
53 | #endif // NOKIADATA_H
54 |
--------------------------------------------------------------------------------
/3rdparty/qwebdavlib/qwebdavlib/qnaturalsort.h:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | **
3 | ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4 | ** All rights reserved.
5 | ** Contact: Nokia Corporation (qt-info@nokia.com)
6 | **
7 | ** This file is part of the QtGui module of the Qt Toolkit.
8 | **
9 | ** $QT_BEGIN_LICENSE:LGPL$
10 | ** GNU Lesser General Public License Usage
11 | ** This file may be used under the terms of the GNU Lesser General Public
12 | ** License version 2.1 as published by the Free Software Foundation and
13 | ** appearing in the file LICENSE.LGPL included in the packaging of this
14 | ** file. Please review the following information to ensure the GNU Lesser
15 | ** General Public License version 2.1 requirements will be met:
16 | ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
17 | **
18 | ** In addition, as a special exception, Nokia gives you certain additional
19 | ** rights. These rights are described in the Nokia Qt LGPL Exception
20 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
21 | **
22 | ** GNU General Public License Usage
23 | ** Alternatively, this file may be used under the terms of the GNU General
24 | ** Public License version 3.0 as published by the Free Software Foundation
25 | ** and appearing in the file LICENSE.GPL included in the packaging of this
26 | ** file. Please review the following information to ensure the GNU General
27 | ** Public License version 3.0 requirements will be met:
28 | ** http://www.gnu.org/copyleft/gpl.html.
29 | **
30 | ** Other Usage
31 | ** Alternatively, this file may be used in accordance with the terms and
32 | ** conditions contained in a signed written agreement between you and Nokia.
33 | **
34 | **
35 | **
36 | **
37 | **
38 | ** $QT_END_LICENSE$
39 | **
40 | ****************************************************************************/
41 |
42 | // naturalCompare from http://qt.gitorious.org/qt/qt/blobs/4.7/src/gui/dialogs/qfilesystemmodel.cpp
43 |
44 | #ifndef QNATURALSORT_H
45 | #define QNATURALSORT_H
46 |
47 | #include
48 |
49 | #include "qwebdav_global.h"
50 |
51 | class QWEBDAVSHARED_EXPORT QNaturalSort
52 | {
53 | public:
54 | QNaturalSort();
55 |
56 | static int naturalCompare(const QString &s1, const QString &s2, Qt::CaseSensitivity cs = Qt::CaseInsensitive);
57 | };
58 |
59 | #endif // QNATURALSORT_H
60 |
--------------------------------------------------------------------------------
/app/phonetypedialog.cpp:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: Phone type selection dialog
4 | *
5 | * Copyright 2016 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 |
14 | #include
15 | #include
16 | #include
17 | #include "phonetypedialog.h"
18 | #include "ui_phonetypedialog.h"
19 |
20 | #define COLUMN_COUNT 3
21 | PhoneTypeDialog::PhoneTypeDialog(const QString& title, const StandardTypes& sTypes) :
22 | QDialog(0),
23 | ui(new Ui::PhoneTypeDialog)
24 | {
25 | ui->setupUi(this);
26 | setWindowTitle(title);
27 | // Fill dialog by all available types
28 | short i=0;
29 | foreach (const QString& s, sTypes.displayValues) {
30 | short row = i / COLUMN_COUNT;
31 | short col = i % COLUMN_COUNT;
32 | QCheckBox* cb = new QCheckBox(s);
33 | cb->setObjectName(QString("cb%1").arg(i));
34 | ui->layTypes->addWidget(cb, row, col);
35 | i++;
36 | }
37 | }
38 |
39 | PhoneTypeDialog::~PhoneTypeDialog()
40 | {
41 | delete ui;
42 | }
43 |
44 | QString PhoneTypeDialog::getData() const
45 | {
46 | QStringList selectedTypes;
47 | foreach(QObject* obj, this->children()) {
48 | QCheckBox* cb = dynamic_cast(obj);
49 | if (cb)
50 | if (cb->isChecked())
51 | selectedTypes.push_back(cb->text());
52 | }
53 | return selectedTypes.join("+");
54 | }
55 |
56 | void PhoneTypeDialog::selectType(const QString &title, const StandardTypes &sTypes, QComboBox *cbT)
57 | {
58 | PhoneTypeDialog* dlg = new PhoneTypeDialog(title, sTypes);
59 | dlg->exec();
60 | if (dlg->result()==QDialog::Accepted) {
61 | cbT->setCurrentIndex(0); // prevent event recursion
62 | QString mix = dlg->getData();
63 | if (mix.contains("+")) {
64 | cbT->insertItem(0, mix);
65 | cbT->setCurrentIndex(0); // new mixed type
66 | }
67 | else // prevent adding non-mixed types
68 | cbT->setCurrentIndex(cbT->findText(mix));
69 | }
70 | delete dlg;
71 | }
72 |
--------------------------------------------------------------------------------
/app/innerfilewindow.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | InnerFileWindow
4 |
5 |
6 |
7 | 0
8 | 0
9 | 1240
10 | 620
11 |
12 |
13 |
14 | Files
15 |
16 |
17 | -
18 |
19 |
20 | QAbstractItemView::SelectRows
21 |
22 |
23 |
24 | -
25 |
26 |
-
27 |
28 |
-
29 |
30 |
31 | Filter
32 |
33 |
34 |
35 | -
36 |
37 |
38 |
39 |
40 | -
41 |
42 |
43 | Qt::Horizontal
44 |
45 |
46 |
47 | 40
48 | 20
49 |
50 |
51 |
52 |
53 | -
54 |
55 |
56 | &Save all
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | Copy text
66 |
67 |
68 | Ctrl+C
69 |
70 |
71 |
72 |
73 | Show file
74 |
75 |
76 |
77 |
78 | Save file
79 |
80 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/app/messagewindow.h:
--------------------------------------------------------------------------------
1 | /* Double Contact
2 | *
3 | * Module: SMS Window
4 | *
5 | * Copyright 2020 Mikhail Y. Zvyozdochkin aka DarkHobbit
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version. See COPYING file for more details.
11 | *
12 | */
13 | #ifndef MESSAGEWINDOW_H
14 | #define MESSAGEWINDOW_H
15 |
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include
21 |
22 | #include "contactlist.h"
23 | #include "decodedmessagelist.h"
24 | #include "messagemodel.h"
25 |
26 | namespace Ui {
27 | class MessageWindow;
28 | }
29 |
30 | class MessageWindow : public QDialog
31 | {
32 | Q_OBJECT
33 |
34 | public:
35 | explicit MessageWindow(ContactList* contacts);
36 | ~MessageWindow();
37 |
38 | private slots:
39 | void selectionChanged();
40 | void on_cbPDU_stateChanged(int);
41 | void on_cbPDUArchive_stateChanged(int);
42 | void on_cbBinary_stateChanged(int);
43 | void on_cbVmessage_stateChanged(int);
44 | void on_cbVmessageArchive_stateChanged(int);
45 | void on_cbMergeDups_stateChanged(int);
46 | void on_cbMergeMultiparts_stateChanged(int);
47 | void toggleSort();
48 | void onSortIndicatorChanged(int,Qt::SortOrder);
49 | void on_actionCopy_text_triggered();
50 | void on_actionProperties_triggered();
51 | void on_leFilter_textChanged(const QString &newText);
52 | void on_btnSaveAs_clicked();
53 | void on_actionSave_MMS_Files_triggered();
54 | void onShowMMSFile(bool);
55 |
56 | void on_btnApply_clicked();
57 |
58 | void on_btnHardSort_clicked();
59 |
60 | protected:
61 | void showEvent(QShowEvent*);
62 |
63 | private:
64 | Ui::MessageWindow *ui;
65 | MessageSourceFlags srcFlags;
66 | MessageModel* model;
67 | QSortFilterProxyModel *proxy;
68 | QStatusBar* statusBar;
69 | QLabel *lbCount, *lbMMSCount, *lbMode, *lbDups, *lbMultiParts;
70 | QMenu* menuMMSFiles;
71 | void updateModel();
72 | void updateStatus();
73 | void checkButtons();
74 | void checkMergeButton();
75 | QModelIndex selectedRecord(bool errorIfNoSelected = true);
76 | };
77 |
78 | #endif // MESSAGEWINDOW_H
79 |
--------------------------------------------------------------------------------
/app/tagremovedialog.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | TagRemoveDialog
4 |
5 |
6 |
7 | 0
8 | 0
9 | 400
10 | 302
11 |
12 |
13 |
14 | -
15 |
16 |
17 |