Changeset 23:0568f64da6a9 in SMSSender


Ignore:
Timestamp:
Jun 30, 2009 9:15:01 PM (13 years ago)
Author:
Sämy Zehnder <saemy.zehnder@…>
Branch:
3.0
Convert:
svn:3639001d-8e34-449c-bb86-3782b86c4877/branches/3.0@21
Message:
  • Renamed SMSSender into smssender
  • Added blank image ressource
  • UIUtils returns now a QImage with no content instead of NULL.
  • typeconvert has now a new function called isChildOf (But I'm not sure, if this realy works... ;) )
  • VCMain handles now properly the recipients (add / remove contacts or whole groups)
Files:
1 added
14 edited
1 moved

Legend:

Unmodified
Added
Removed
  • Makefile

    r22 r23  
    11#############################################################################
    2 # Makefile for building: SMSSender
    3 # Generated by qmake (2.01a) (Qt 4.5.0) on: Tue Jun 23 11:40:16 2009
    4 # Project:  SMSSender.pro
     2# Makefile for building: smssender
     3# Generated by qmake (2.01a) (Qt 4.5.0) on: Tue Jun 30 20:18:51 2009
     4# Project:  smssender.pro
    55# Template: app
    6 # Command: /usr/bin/qmake -unix CONFIG+=debug_and_release -o Makefile SMSSender.pro
     6# Command: /usr/bin/qmake -unix CONFIG+=debug_and_release -o Makefile smssender.pro
    77#############################################################################
    88
     
    6464        $(MAKE) -f $(MAKEFILE).Debug uninstall
    6565
    66 Makefile: SMSSender.pro  /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/g++.conf \
     66Makefile: smssender.pro  /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/g++.conf \
    6767                /usr/share/qt4/mkspecs/common/unix.conf \
    6868                /usr/share/qt4/mkspecs/common/linux.conf \
     
    8686                /usr/lib/libQtGui.prl \
    8787                /usr/lib/libQtCore.prl
    88         $(QMAKE) -unix CONFIG+=debug_and_release -o Makefile SMSSender.pro
     88        $(QMAKE) -unix CONFIG+=debug_and_release -o Makefile smssender.pro
    8989/usr/share/qt4/mkspecs/common/g++.conf:
    9090/usr/share/qt4/mkspecs/common/unix.conf:
     
    110110/usr/lib/libQtCore.prl:
    111111qmake: qmake_all FORCE
    112         @$(QMAKE) -unix CONFIG+=debug_and_release -o Makefile SMSSender.pro
     112        @$(QMAKE) -unix CONFIG+=debug_and_release -o Makefile smssender.pro
    113113
    114114qmake_all: FORCE
  • Makefile.Debug

    r22 r23  
    11#############################################################################
    2 # Makefile for building: SMSSender
    3 # Generated by qmake (2.01a) (Qt 4.5.0) on: Tue Jun 23 11:40:15 2009
    4 # Project:  SMSSender.pro
     2# Makefile for building: smssender
     3# Generated by qmake (2.01a) (Qt 4.5.0) on: Tue Jun 30 20:18:51 2009
     4# Project:  smssender.pro
    55# Template: app
    66#############################################################################
     
    1111CXX           = g++
    1212DEFINES       = -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
    13 CFLAGS        = -pipe -g -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wall -W -D_REENTRANT $(DEFINES)
    14 CXXFLAGS      = -pipe -g -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wall -W -D_REENTRANT $(DEFINES)
     13CFLAGS        = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
     14CXXFLAGS      = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
    1515INCPATH       = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -Iapp -Idebug -I.
    1616LINK          = g++
    1717LFLAGS        =
    18 LIBS          = $(SUBLIBS)  -L/usr/lib -ltntdb -lglibmm-2.4 -lgobject-2.0 -lsigc-2.0 -lglib-2.0 -lQtGui -lQtCore -lpthread
     18LIBS          = $(SUBLIBS)  -L/usr/lib -ltntdb -lQtGui -lQtCore -lpthread
    1919AR            = ar cqs
    2020RANLIB        =
     
    118118                /usr/share/qt4/mkspecs/features/yacc.prf \
    119119                /usr/share/qt4/mkspecs/features/lex.prf \
    120                 SMSSender.pro
    121 QMAKE_TARGET  = SMSSender
     120                smssender.pro
     121QMAKE_TARGET  = smssender
    122122DESTDIR       =
    123 TARGET        = SMSSender
     123TARGET        = smssender
    124124
    125125first: all
     
    151151
    152152qmake:  FORCE
    153         @$(QMAKE) -unix CONFIG+=debug_and_release -o Makefile.Debug SMSSender.pro
     153        @$(QMAKE) -unix CONFIG+=debug_and_release -o Makefile.Debug smssender.pro
    154154
    155155dist:
    156         @$(CHK_DIR_EXISTS) debug/SMSSender1.0.0 || $(MKDIR) debug/SMSSender1.0.0
    157         $(COPY_FILE) --parents $(SOURCES) $(DIST) debug/SMSSender1.0.0/ && $(COPY_FILE) --parents src/ui/VCEditGroup/vceditgroup.h src/business/BCGroup.h src/persistence/interfaces/igroupmanager.h src/persistence/DAGroupManager.h src/business/BCGroupManager.h src/business/interfaces/igroup.h src/business/BCBinary.h src/business/interfaces/ibinary.h src/ui/UIHelper.h src/ui/VCEditContact/vceditcontact.h src/persistence/DASettings.h src/exceptions/EParseException.h src/exceptions/EReadException.h src/utils/strutils.h src/business/BCNumber.h src/business/interfaces/inumber.h src/ui/VCAddressBook/vcaddressbook.h src/utils/typeconvert.h src/business/BCContactManager.h src/business/BCContact.h src/business/interfaces/icontact.h src/business/BusinessFactory.h src/business/interfaces/iinterface.h src/business/interfaces/istorable.h src/business/BCShortcut.h src/business/interfaces/iaccount.h src/business/interfaces/ishortcut.h src/persistence/storage/DASQLiteStorage.h src/persistence/interfaces/istorage.h src/persistence/interfaces/icontactmanager.h src/persistence/DAContactManager.h src/business/BCSettings.h src/persistence/PersistenceFactory.h src/persistence/interfaces/isettings.h src/ui/VCMain/vcmain.h src/ui/VCSettings/vcsettings.h debug/SMSSender1.0.0/ && $(COPY_FILE) --parents lib/resource.qrc debug/SMSSender1.0.0/ && $(COPY_FILE) --parents src/ui/VCEditGroup/vceditgroup.cpp src/business/BCGroup.cpp src/persistence/DAGroupManager.cpp src/business/BCGroupManager.cpp src/utils/strutils.cpp src/business/BCBinary.cpp src/ui/UIHelper.cpp src/ui/VCEditContact/vceditcontact.cpp src/persistence/DASettings.cpp src/business/BCNumber.cpp src/ui/VCAddressBook/vcaddressbook.cpp src/business/BCContactManager.cpp src/business/BCContact.cpp src/business/BusinessFactory.cpp src/business/BCShortcut.cpp src/persistence/storage/DASQLiteStorage.cpp src/business/BCSettings.cpp src/persistence/PersistenceFactory.cpp src/persistence/DAContactManager.cpp src/main.cpp src/ui/VCMain/vcmain.cpp src/ui/VCSettings/vcsettings.cpp debug/SMSSender1.0.0/ && $(COPY_FILE) --parents src/ui/VCEditGroup/vceditgroup.ui src/ui/VCEditContact/vceditcontact.ui src/ui/VCAddressBook/vcaddressbook.ui src/ui/VCMain/vcmain.ui src/ui/VCSettings/vcsettings.ui debug/SMSSender1.0.0/ && $(COPY_FILE) --parents locale/de.ts debug/SMSSender1.0.0/ && (cd `dirname debug/SMSSender1.0.0` && $(TAR) SMSSender1.0.0.tar SMSSender1.0.0 && $(COMPRESS) SMSSender1.0.0.tar) && $(MOVE) `dirname debug/SMSSender1.0.0`/SMSSender1.0.0.tar.gz . && $(DEL_FILE) -r debug/SMSSender1.0.0
     156        @$(CHK_DIR_EXISTS) debug/smssender1.0.0 || $(MKDIR) debug/smssender1.0.0
     157        $(COPY_FILE) --parents $(SOURCES) $(DIST) debug/smssender1.0.0/ && $(COPY_FILE) --parents src/ui/VCEditGroup/vceditgroup.h src/business/BCGroup.h src/persistence/interfaces/igroupmanager.h src/persistence/DAGroupManager.h src/business/BCGroupManager.h src/business/interfaces/igroup.h src/business/BCBinary.h src/business/interfaces/ibinary.h src/ui/UIHelper.h src/ui/VCEditContact/vceditcontact.h src/persistence/DASettings.h src/exceptions/EParseException.h src/exceptions/EReadException.h src/utils/strutils.h src/business/BCNumber.h src/business/interfaces/inumber.h src/ui/VCAddressBook/vcaddressbook.h src/utils/typeconvert.h src/business/BCContactManager.h src/business/BCContact.h src/business/interfaces/icontact.h src/business/BusinessFactory.h src/business/interfaces/iinterface.h src/business/interfaces/istorable.h src/business/BCShortcut.h src/business/interfaces/iaccount.h src/business/interfaces/ishortcut.h src/persistence/storage/DASQLiteStorage.h src/persistence/interfaces/istorage.h src/persistence/interfaces/icontactmanager.h src/persistence/DAContactManager.h src/business/BCSettings.h src/persistence/PersistenceFactory.h src/persistence/interfaces/isettings.h src/ui/VCMain/vcmain.h src/ui/VCSettings/vcsettings.h debug/smssender1.0.0/ && $(COPY_FILE) --parents lib/resource.qrc debug/smssender1.0.0/ && $(COPY_FILE) --parents src/ui/VCEditGroup/vceditgroup.cpp src/business/BCGroup.cpp src/persistence/DAGroupManager.cpp src/business/BCGroupManager.cpp src/utils/strutils.cpp src/business/BCBinary.cpp src/ui/UIHelper.cpp src/ui/VCEditContact/vceditcontact.cpp src/persistence/DASettings.cpp src/business/BCNumber.cpp src/ui/VCAddressBook/vcaddressbook.cpp src/business/BCContactManager.cpp src/business/BCContact.cpp src/business/BusinessFactory.cpp src/business/BCShortcut.cpp src/persistence/storage/DASQLiteStorage.cpp src/business/BCSettings.cpp src/persistence/PersistenceFactory.cpp src/persistence/DAContactManager.cpp src/main.cpp src/ui/VCMain/vcmain.cpp src/ui/VCSettings/vcsettings.cpp debug/smssender1.0.0/ && $(COPY_FILE) --parents src/ui/VCEditGroup/vceditgroup.ui src/ui/VCEditContact/vceditcontact.ui src/ui/VCAddressBook/vcaddressbook.ui src/ui/VCMain/vcmain.ui src/ui/VCSettings/vcsettings.ui debug/smssender1.0.0/ && $(COPY_FILE) --parents locale/de.ts debug/smssender1.0.0/ && (cd `dirname debug/smssender1.0.0` && $(TAR) smssender1.0.0.tar smssender1.0.0 && $(COMPRESS) smssender1.0.0.tar) && $(MOVE) `dirname debug/smssender1.0.0`/smssender1.0.0.tar.gz . && $(DEL_FILE) -r debug/smssender1.0.0
    158158
    159159
     
    206206        /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) src/ui/VCAddressBook/vcaddressbook.h -o debug/moc_vcaddressbook.cpp
    207207
    208 debug/moc_vcmain.cpp: ui_vcmain.h \
     208debug/moc_vcmain.cpp: src/business/interfaces/icontact.h \
     209                src/business/interfaces/iinterface.h \
     210                src/business/interfaces/ibinary.h \
     211                src/business/interfaces/inumber.h \
     212                src/business/interfaces/istorable.h \
     213                src/business/interfaces/igroup.h \
     214                ui_vcmain.h \
    209215                src/ui/VCMain/vcmain.h
    210216        /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) src/ui/VCMain/vcmain.h -o debug/moc_vcmain.cpp
     
    229235                lib/preferences.png \
    230236                lib/about.png \
     237                lib/blank.png \
    231238                lib/user.png \
    232239                lib/keyboard_key.png \
     
    520527
    521528debug/main.o: src/main.cpp src/ui/VCMain/vcmain.h \
     529                src/business/interfaces/icontact.h \
     530                src/business/interfaces/iinterface.h \
     531                src/business/interfaces/ibinary.h \
     532                src/business/interfaces/inumber.h \
     533                src/business/interfaces/istorable.h \
     534                src/business/interfaces/igroup.h \
    522535                ui_vcmain.h \
    523536                src/business/BCSettings.h \
    524537                src/persistence/interfaces/isettings.h \
    525                 src/business/interfaces/iinterface.h \
    526                 src/business/interfaces/iaccount.h \
    527                 src/business/interfaces/istorable.h \
     538                src/business/interfaces/iaccount.h \
    528539                src/business/interfaces/ishortcut.h
    529540        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/main.o src/main.cpp
    530541
    531542debug/vcmain.o: src/ui/VCMain/vcmain.cpp src/ui/VCMain/vcmain.h \
     543                src/business/interfaces/icontact.h \
     544                src/business/interfaces/iinterface.h \
     545                src/business/interfaces/ibinary.h \
     546                src/business/interfaces/inumber.h \
     547                src/business/interfaces/istorable.h \
     548                src/business/interfaces/igroup.h \
    532549                ui_vcmain.h \
     550                src/business/BCContactManager.h \
     551                src/business/BCGroupManager.h \
     552                src/utils/typeconvert.h \
     553                src/ui/UIHelper.h \
    533554                src/ui/VCAddressBook/vcaddressbook.h \
    534555                ui_vcaddressbook.h \
    535                 src/business/interfaces/icontact.h \
    536                 src/business/interfaces/iinterface.h \
    537                 src/business/interfaces/ibinary.h \
    538                 src/business/interfaces/inumber.h \
    539                 src/business/interfaces/istorable.h \
    540                 src/business/interfaces/igroup.h \
    541556                src/ui/VCSettings/vcsettings.h \
    542557                ui_vcsettings.h
  • Makefile.Release

    r22 r23  
    11#############################################################################
    2 # Makefile for building: SMSSender
    3 # Generated by qmake (2.01a) (Qt 4.5.0) on: Tue Jun 23 11:40:15 2009
    4 # Project:  SMSSender.pro
     2# Makefile for building: smssender
     3# Generated by qmake (2.01a) (Qt 4.5.0) on: Tue Jun 30 20:18:51 2009
     4# Project:  smssender.pro
    55# Template: app
    66#############################################################################
     
    1111CXX           = g++
    1212DEFINES       = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
    13 CFLAGS        = -pipe -O2 -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wall -W -D_REENTRANT $(DEFINES)
    14 CXXFLAGS      = -pipe -O2 -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wall -W -D_REENTRANT $(DEFINES)
     13CFLAGS        = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
     14CXXFLAGS      = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
    1515INCPATH       = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -Iapp -Irelease -I.
    1616LINK          = g++
    1717LFLAGS        = -Wl,-O1
    18 LIBS          = $(SUBLIBS)  -L/usr/lib -ltntdb -lglibmm-2.4 -lgobject-2.0 -lsigc-2.0 -lglib-2.0 -lQtGui -lQtCore -lpthread
     18LIBS          = $(SUBLIBS)  -L/usr/lib -ltntdb -lQtGui -lQtCore -lpthread
    1919AR            = ar cqs
    2020RANLIB        =
     
    118118                /usr/share/qt4/mkspecs/features/yacc.prf \
    119119                /usr/share/qt4/mkspecs/features/lex.prf \
    120                 SMSSender.pro
    121 QMAKE_TARGET  = SMSSender
     120                smssender.pro
     121QMAKE_TARGET  = smssender
    122122DESTDIR       =
    123 TARGET        = SMSSender
     123TARGET        = smssender
    124124
    125125first: all
     
    151151
    152152qmake:  FORCE
    153         @$(QMAKE) -unix CONFIG+=debug_and_release -o Makefile.Release SMSSender.pro
     153        @$(QMAKE) -unix CONFIG+=debug_and_release -o Makefile.Release smssender.pro
    154154
    155155dist:
    156         @$(CHK_DIR_EXISTS) release/SMSSender1.0.0 || $(MKDIR) release/SMSSender1.0.0
    157         $(COPY_FILE) --parents $(SOURCES) $(DIST) release/SMSSender1.0.0/ && $(COPY_FILE) --parents src/ui/VCEditGroup/vceditgroup.h src/business/BCGroup.h src/persistence/interfaces/igroupmanager.h src/persistence/DAGroupManager.h src/business/BCGroupManager.h src/business/interfaces/igroup.h src/business/BCBinary.h src/business/interfaces/ibinary.h src/ui/UIHelper.h src/ui/VCEditContact/vceditcontact.h src/persistence/DASettings.h src/exceptions/EParseException.h src/exceptions/EReadException.h src/utils/strutils.h src/business/BCNumber.h src/business/interfaces/inumber.h src/ui/VCAddressBook/vcaddressbook.h src/utils/typeconvert.h src/business/BCContactManager.h src/business/BCContact.h src/business/interfaces/icontact.h src/business/BusinessFactory.h src/business/interfaces/iinterface.h src/business/interfaces/istorable.h src/business/BCShortcut.h src/business/interfaces/iaccount.h src/business/interfaces/ishortcut.h src/persistence/storage/DASQLiteStorage.h src/persistence/interfaces/istorage.h src/persistence/interfaces/icontactmanager.h src/persistence/DAContactManager.h src/business/BCSettings.h src/persistence/PersistenceFactory.h src/persistence/interfaces/isettings.h src/ui/VCMain/vcmain.h src/ui/VCSettings/vcsettings.h release/SMSSender1.0.0/ && $(COPY_FILE) --parents lib/resource.qrc release/SMSSender1.0.0/ && $(COPY_FILE) --parents src/ui/VCEditGroup/vceditgroup.cpp src/business/BCGroup.cpp src/persistence/DAGroupManager.cpp src/business/BCGroupManager.cpp src/utils/strutils.cpp src/business/BCBinary.cpp src/ui/UIHelper.cpp src/ui/VCEditContact/vceditcontact.cpp src/persistence/DASettings.cpp src/business/BCNumber.cpp src/ui/VCAddressBook/vcaddressbook.cpp src/business/BCContactManager.cpp src/business/BCContact.cpp src/business/BusinessFactory.cpp src/business/BCShortcut.cpp src/persistence/storage/DASQLiteStorage.cpp src/business/BCSettings.cpp src/persistence/PersistenceFactory.cpp src/persistence/DAContactManager.cpp src/main.cpp src/ui/VCMain/vcmain.cpp src/ui/VCSettings/vcsettings.cpp release/SMSSender1.0.0/ && $(COPY_FILE) --parents src/ui/VCEditGroup/vceditgroup.ui src/ui/VCEditContact/vceditcontact.ui src/ui/VCAddressBook/vcaddressbook.ui src/ui/VCMain/vcmain.ui src/ui/VCSettings/vcsettings.ui release/SMSSender1.0.0/ && $(COPY_FILE) --parents locale/de.ts release/SMSSender1.0.0/ && (cd `dirname release/SMSSender1.0.0` && $(TAR) SMSSender1.0.0.tar SMSSender1.0.0 && $(COMPRESS) SMSSender1.0.0.tar) && $(MOVE) `dirname release/SMSSender1.0.0`/SMSSender1.0.0.tar.gz . && $(DEL_FILE) -r release/SMSSender1.0.0
     156        @$(CHK_DIR_EXISTS) release/smssender1.0.0 || $(MKDIR) release/smssender1.0.0
     157        $(COPY_FILE) --parents $(SOURCES) $(DIST) release/smssender1.0.0/ && $(COPY_FILE) --parents src/ui/VCEditGroup/vceditgroup.h src/business/BCGroup.h src/persistence/interfaces/igroupmanager.h src/persistence/DAGroupManager.h src/business/BCGroupManager.h src/business/interfaces/igroup.h src/business/BCBinary.h src/business/interfaces/ibinary.h src/ui/UIHelper.h src/ui/VCEditContact/vceditcontact.h src/persistence/DASettings.h src/exceptions/EParseException.h src/exceptions/EReadException.h src/utils/strutils.h src/business/BCNumber.h src/business/interfaces/inumber.h src/ui/VCAddressBook/vcaddressbook.h src/utils/typeconvert.h src/business/BCContactManager.h src/business/BCContact.h src/business/interfaces/icontact.h src/business/BusinessFactory.h src/business/interfaces/iinterface.h src/business/interfaces/istorable.h src/business/BCShortcut.h src/business/interfaces/iaccount.h src/business/interfaces/ishortcut.h src/persistence/storage/DASQLiteStorage.h src/persistence/interfaces/istorage.h src/persistence/interfaces/icontactmanager.h src/persistence/DAContactManager.h src/business/BCSettings.h src/persistence/PersistenceFactory.h src/persistence/interfaces/isettings.h src/ui/VCMain/vcmain.h src/ui/VCSettings/vcsettings.h release/smssender1.0.0/ && $(COPY_FILE) --parents lib/resource.qrc release/smssender1.0.0/ && $(COPY_FILE) --parents src/ui/VCEditGroup/vceditgroup.cpp src/business/BCGroup.cpp src/persistence/DAGroupManager.cpp src/business/BCGroupManager.cpp src/utils/strutils.cpp src/business/BCBinary.cpp src/ui/UIHelper.cpp src/ui/VCEditContact/vceditcontact.cpp src/persistence/DASettings.cpp src/business/BCNumber.cpp src/ui/VCAddressBook/vcaddressbook.cpp src/business/BCContactManager.cpp src/business/BCContact.cpp src/business/BusinessFactory.cpp src/business/BCShortcut.cpp src/persistence/storage/DASQLiteStorage.cpp src/business/BCSettings.cpp src/persistence/PersistenceFactory.cpp src/persistence/DAContactManager.cpp src/main.cpp src/ui/VCMain/vcmain.cpp src/ui/VCSettings/vcsettings.cpp release/smssender1.0.0/ && $(COPY_FILE) --parents src/ui/VCEditGroup/vceditgroup.ui src/ui/VCEditContact/vceditcontact.ui src/ui/VCAddressBook/vcaddressbook.ui src/ui/VCMain/vcmain.ui src/ui/VCSettings/vcsettings.ui release/smssender1.0.0/ && $(COPY_FILE) --parents locale/de.ts release/smssender1.0.0/ && (cd `dirname release/smssender1.0.0` && $(TAR) smssender1.0.0.tar smssender1.0.0 && $(COMPRESS) smssender1.0.0.tar) && $(MOVE) `dirname release/smssender1.0.0`/smssender1.0.0.tar.gz . && $(DEL_FILE) -r release/smssender1.0.0
    158158
    159159
     
    206206        /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) src/ui/VCAddressBook/vcaddressbook.h -o release/moc_vcaddressbook.cpp
    207207
    208 release/moc_vcmain.cpp: ui_vcmain.h \
     208release/moc_vcmain.cpp: src/business/interfaces/icontact.h \
     209                src/business/interfaces/iinterface.h \
     210                src/business/interfaces/ibinary.h \
     211                src/business/interfaces/inumber.h \
     212                src/business/interfaces/istorable.h \
     213                src/business/interfaces/igroup.h \
     214                ui_vcmain.h \
    209215                src/ui/VCMain/vcmain.h
    210216        /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) src/ui/VCMain/vcmain.h -o release/moc_vcmain.cpp
     
    229235                lib/preferences.png \
    230236                lib/about.png \
     237                lib/blank.png \
    231238                lib/user.png \
    232239                lib/keyboard_key.png \
     
    520527
    521528release/main.o: src/main.cpp src/ui/VCMain/vcmain.h \
     529                src/business/interfaces/icontact.h \
     530                src/business/interfaces/iinterface.h \
     531                src/business/interfaces/ibinary.h \
     532                src/business/interfaces/inumber.h \
     533                src/business/interfaces/istorable.h \
     534                src/business/interfaces/igroup.h \
    522535                ui_vcmain.h \
    523536                src/business/BCSettings.h \
    524537                src/persistence/interfaces/isettings.h \
    525                 src/business/interfaces/iinterface.h \
    526                 src/business/interfaces/iaccount.h \
    527                 src/business/interfaces/istorable.h \
     538                src/business/interfaces/iaccount.h \
    528539                src/business/interfaces/ishortcut.h
    529540        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/main.o src/main.cpp
    530541
    531542release/vcmain.o: src/ui/VCMain/vcmain.cpp src/ui/VCMain/vcmain.h \
     543                src/business/interfaces/icontact.h \
     544                src/business/interfaces/iinterface.h \
     545                src/business/interfaces/ibinary.h \
     546                src/business/interfaces/inumber.h \
     547                src/business/interfaces/istorable.h \
     548                src/business/interfaces/igroup.h \
    532549                ui_vcmain.h \
     550                src/business/BCContactManager.h \
     551                src/business/BCGroupManager.h \
     552                src/utils/typeconvert.h \
     553                src/ui/UIHelper.h \
    533554                src/ui/VCAddressBook/vcaddressbook.h \
    534555                ui_vcaddressbook.h \
    535                 src/business/interfaces/icontact.h \
    536                 src/business/interfaces/iinterface.h \
    537                 src/business/interfaces/ibinary.h \
    538                 src/business/interfaces/inumber.h \
    539                 src/business/interfaces/istorable.h \
    540                 src/business/interfaces/igroup.h \
    541556                src/ui/VCSettings/vcsettings.h \
    542557                ui_vcsettings.h
  • lib/resource.qrc

    r22 r23  
    11<RCC>
    22  <qresource prefix="ico" >
     3    <file>blank.png</file>
    34    <file>navigate_right.png</file>
    45    <file>navigate_left.png</file>
  • smssender.pro

    r22 r23  
    22INCLUDEPATH += app
    33LIBS += -ltntdb
    4 PKGCONFIG = glibmm-2.4
    5 TARGET = SMSSender
     4#PKGCONFIG = glibmm-2.4
     5TARGET = smssender
    66QT += core \
    77    gui
  • src/ui/UIHelper.cpp

    r19 r23  
    1616
    1717IBinary* UIHelper::QImageToBinary(const QImage& image) {
     18    if (image.isNull()){
     19        return new BCBinary();
     20    }
     21
    1822    QByteArray ba;
    1923    QBuffer buffer(&ba);
     
    2731QImage* UIHelper::BinaryToQImage(const IBinary& binary) {
    2832    if ((&binary == NULL) || (binary.size() == 0)) {
    29         return NULL;
     33        return new QImage();
    3034    }
    3135    QByteArray ba(binary.data(), binary.size());
  • src/ui/VCAddressBook/vcaddressbook.cpp

    r22 r23  
    128128    cell = new QTableWidgetItem();
    129129    QImage* contactImage = UIHelper::BinaryToQImage(*contact->image());
    130     if (contactImage != NULL){
     130    if ((contactImage != NULL) && (!contactImage->isNull())){
    131131        cell->setIcon(QPixmap::fromImage(*contactImage));
    132132        cell->setSizeHint(QSize(tblContacts->iconSize().width() + 4, tblContacts->iconSize().height() + 4));
  • src/ui/VCEditContact/vceditcontact.cpp

    r22 r23  
    3737    setIcon(UIHelper::BinaryToQImage(*contact->image()));
    3838
     39
     40    // First "signal" to initialize some slots
    3941    on_lstAliases_itemSelectionChanged();
    4042}
     
    7375}
    7476void VCEditContact::setIcon(const QImage* image){
    75     if (image != NULL){
     77    if ((image != NULL) && (!image->isNull())){
    7678        ui.btnIcon->setIcon(QPixmap::fromImage(*image));
    7779
     
    206208
    207209        IBinary* imageData = NULL;
    208         if (contactImage_ != NULL) {
     210        if ((contactImage_ != NULL) && (!contactImage_->isNull())) {
    209211            contactImage_ = new QImage(contactImage_->scaledToHeight(72, Qt::SmoothTransformation));
    210212            imageData = UIHelper::QImageToBinary(*contactImage_);
  • src/ui/VCEditGroup/vceditgroup.cpp

    r22 r23  
    4747    setGroupImage(UIHelper::BinaryToQImage(*group->image()));
    4848
     49
     50    // First "signal" to initialize some slots
    4951    //on_lstAliases_itemSelectionChanged();
    5052}
     
    8385}
    8486void VCEditGroup::setGroupImage(const QImage* image){
    85     if (image != NULL){
     87    if ((image != NULL) && (!image->isNull())){
    8688        ui.btnIcon->setIcon(QPixmap::fromImage(*image));
    8789
     
    188190
    189191        IBinary* imageData = NULL;
    190         if (groupImage_ != NULL) {
     192        if ((groupImage_ != NULL) && (!groupImage_->isNull())) {
    191193            groupImage_ = new QImage(groupImage_->scaledToHeight(72, Qt::SmoothTransformation));
    192194            imageData = UIHelper::QImageToBinary(*groupImage_);
  • src/ui/VCMain/vcmain.cpp

    r21 r23  
    11#include "vcmain.h"
     2
     3#include "../../business/BCContactManager.h"
     4#include "../../business/BCGroupManager.h"
     5
     6#include "../../utils/typeconvert.h"
     7
     8#include "../UIHelper.h"
    29
    310#include "../VCAddressBook/vcaddressbook.h"
    411#include "../VCSettings/vcsettings.h"
    512
    6 VCMain::VCMain(QWidget *parent)
    7     : QMainWindow(parent){
     13VCMain::VCMain(QWidget *parent) : QMainWindow(parent){
    814        ui.setupUi(this);
    9 }
    10 
    11 VCMain::~VCMain(){
    12 
     15
     16        connect(ui.lstContacts->lineEdit(), SIGNAL(returnPressed()), this, SLOT(on_btnAddRecipient_clicked()));
     17
     18        init();
     19}
     20
     21
     22void VCMain::init(){
     23    //refillAccountList();
     24    refillContactList();
     25
     26    // First "signal" to initialize some slots
     27    on_treeRecipients_itemSelectionChanged();
     28}
     29
     30
     31/* Contacts & Recipients... */
     32
     33void VCMain::refillContactList(){
     34    ui.lstContacts->clear();
     35    nameToContact.clear();
     36    nameToGroup.clear();
     37
     38    QPixmap blankIcon = QPixmap(":/ico/blank.png");
     39
     40    QSetIterator<IContact*> contacts(BCContactManager::instance()->getContactList());
     41    while (contacts.hasNext()){
     42        IContact* contact = contacts.next();
     43
     44        QPixmap icon = QPixmap::fromImage(*UIHelper::BinaryToQImage(*contact->image()));
     45        if (icon.isNull()){
     46            icon = blankIcon;
     47        }
     48        ui.lstContacts->addItem(QIcon(icon), contact->name());
     49        nameToContact.insert(contact->name().toLower(), contact);
     50    }
     51
     52    QSetIterator<IGroup*> groups(BCGroupManager::instance()->getGroupList());
     53    while (groups.hasNext()){
     54        IGroup* group = groups.next();
     55
     56        QPixmap icon = QPixmap::fromImage(*UIHelper::BinaryToQImage(*group->image()));
     57        if (icon.isNull()){
     58            icon = blankIcon;
     59        }
     60        ui.lstContacts->addItem(QIcon(icon), group->name());
     61        nameToGroup.insert(group->name().toLower(), group);
     62    }
     63    ui.lstContacts->model()->sort(0);
     64
     65    //ui.lstContacts->insertItem(0, blankIcon, ""); // Empty item at first position to prevent default recipient selection
     66    ui.lstContacts->setCurrentIndex(-1);
     67}
     68
     69
     70bool VCMain::isContactNode(const QTreeWidgetItem* node){
     71    return nodeToContact.contains(const_cast<QTreeWidgetItem*>(node));
     72}
     73bool VCMain::isGroupNode(const QTreeWidgetItem* node){
     74    return nodeToGroup.contains(const_cast<QTreeWidgetItem*>(node));
     75}
     76
     77IContact* VCMain::getContactOfNode(const QTreeWidgetItem* node){
     78    if (!isContactNode(node)){
     79        return (IContact*)0;
     80    } else {
     81        return nodeToContact[const_cast<QTreeWidgetItem*>(node)];
     82    }
     83}
     84IGroup* VCMain::getGroupOfNode(const QTreeWidgetItem* node){
     85    if (!isGroupNode(node)){
     86        return (IGroup*)0;
     87    } else {
     88        return nodeToGroup[const_cast<QTreeWidgetItem*>(node)];
     89    }
     90}
     91
     92bool VCMain::isNodeContactOrHasContact(const QTreeWidgetItem* node, IContact* contact){
     93    if (isContactNode(node)){
     94        IContact* contact_ = getContactOfNode(node);
     95        if (contact->id() == contact_->id()){
     96            return true;
     97        }
     98    } else {
     99        // group...
     100        for (int x = 0; x < node->childCount(); ++x){
     101            if (isNodeContactOrHasContact(node->child(x), contact)){
     102                return true;
     103            }
     104        }
     105    }
     106    return false;
     107
     108}
     109
     110bool VCMain::isContactAlreadyRecipient(IContact* contact){
     111    for (int x = 0; x < ui.treeRecipients->topLevelItemCount(); ++x){
     112        if (isNodeContactOrHasContact(ui.treeRecipients->topLevelItem(x), contact)){
     113            return true;
     114        }
     115    }
     116    return false;
     117}
     118bool VCMain::isGroupAlreadyRecipient(IGroup* group){
     119    for (int x = 0; x < ui.treeRecipients->topLevelItemCount(); ++x){
     120        if (isGroupNode(ui.treeRecipients->topLevelItem(x))){
     121            if (getGroupOfNode(ui.treeRecipients->topLevelItem(x))->id() == group->id()){
     122                return true;
     123            }
     124        }
     125    }
     126    return false;
     127}
     128
     129void VCMain::addRecipient(IContact* contact, QTreeWidgetItem* parent /*= (QTreeWidget*)0*/){
     130    if (isContactAlreadyRecipient(contact)){
     131        return;
     132    }
     133    QTreeWidgetItem* node;
     134    if (parent) {
     135        node = new QTreeWidgetItem(parent); // parent->addChild is done in here
     136    } else {
     137        node = new QTreeWidgetItem(ui.treeRecipients);
     138        ui.treeRecipients->addTopLevelItem(node);
     139    }
     140
     141    node->setText(0, contact->name());
     142    node->setIcon(0, QPixmap::fromImage(*UIHelper::BinaryToQImage(*contact->image())));
     143    nodeToContact[node] = contact;
     144}
     145
     146void VCMain::addRecipient(IGroup* group){
     147    if (isGroupAlreadyRecipient(group)){
     148        return;
     149    }
     150
     151    QTreeWidgetItem* node = new QTreeWidgetItem(ui.treeRecipients);
     152    ui.treeRecipients->addTopLevelItem(node);
     153
     154    node->setText(0, group->name());
     155    node->setIcon(0, QPixmap::fromImage(*UIHelper::BinaryToQImage(*group->image())));
     156    nodeToGroup[node] = group;
     157
     158    QSetIterator<IContact*> i(group->contacts());
     159    while (i.hasNext()){
     160        addRecipient(i.next(), node);
     161    }
     162}
     163
     164void VCMain::removeNode(QTreeWidgetItem* node){
     165    QTreeWidgetItem* parent = node->parent();
     166    if (parent){
     167        parent->removeChild(node);
     168
     169        if (parent->childCount() == 0){
     170            removeRecipient(parent);
     171        }
     172    } else {
     173        ui.treeRecipients->takeTopLevelItem(ui.treeRecipients->indexOfTopLevelItem(node));
     174    }
     175}
     176void VCMain::removeRecipient(QTreeWidgetItem* node){
     177    if (isContactNode(node)){
     178        removeNode(node);
     179
     180        nodeToContact.remove(node);
     181    } else { // Group
     182        for (int x = 0; x < node->childCount(); ++x){
     183            removeRecipient(node->child(x)); // Remove all contacts of this group
     184        }
     185
     186        removeNode(node);
     187        nodeToGroup.remove(node);
     188    }
     189}
     190
     191
     192/* SIGNALS... */
     193
     194void VCMain::on_treeRecipients_itemSelectionChanged(){
     195    ui.btnRemoveRecipient->setEnabled(ui.treeRecipients->selectedItems().count() > 0);
     196}
     197
     198void VCMain:: on_btnAddRecipient_clicked(){
     199    QString name = ui.lstContacts->lineEdit()->text().trimmed().toLower();
     200    if (nameToContact.contains(name)){
     201        addRecipient(nameToContact[name]);
     202    } else if (nameToGroup.contains(name)){
     203        addRecipient(nameToGroup[name]);
     204    } else {
     205        // TODO: Add new numbers to the address book
     206    }
     207    ui.lstContacts->setCurrentIndex(-1);
     208}
     209
     210void VCMain::on_btnRemoveRecipient_clicked(){
     211    QListIterator<QTreeWidgetItem*> i(ui.treeRecipients->selectedItems());
     212    while (i.hasNext()){
     213        removeRecipient(i.next());
     214    }
    13215}
    14216
  • src/ui/VCMain/vcmain.h

    r21 r23  
    22#define VCMAIN_H
    33
     4#include <QMap>
    45#include <QtGui/QMainWindow>
     6#include <QtGui/QTreeWidgetItem>
     7
     8#include "../../business/interfaces/icontact.h"
     9#include "../../business/interfaces/igroup.h"
     10
    511#include "ui_vcmain.h"
    612
     
    1016public:
    1117        VCMain(QWidget *parent = 0);
    12     ~VCMain();
     18    ~VCMain() {};
    1319
    1420private:
    1521    Ui::VCMainClass ui;
    1622
     23    QMap<QString, IContact*>          nameToContact;
     24    QMap<QString, IGroup*>            nameToGroup;
     25
     26    QMap<QTreeWidgetItem*, IContact*> nodeToContact;
     27    QMap<QTreeWidgetItem*, IGroup*>   nodeToGroup;
     28
     29    void init();
     30    void refillContactList();
     31
     32    /* Recipient list */
     33    bool isContactNode(const QTreeWidgetItem* node);
     34    bool isGroupNode(const QTreeWidgetItem* node);
     35    IContact* getContactOfNode(const QTreeWidgetItem* node);
     36    IGroup*   getGroupOfNode(const QTreeWidgetItem* node);
     37    bool isNodeContactOrHasContact(const QTreeWidgetItem* node, IContact* contact);
     38    bool isContactAlreadyRecipient(IContact* contact);
     39    bool isGroupAlreadyRecipient(IGroup* group);
     40
     41    void addRecipient(IContact* contact, QTreeWidgetItem* parent = (QTreeWidgetItem*)0);
     42    void addRecipient(IGroup* group);
     43
     44    void removeNode(QTreeWidgetItem* node);
     45    void removeRecipient(QTreeWidgetItem* node);
     46
    1747private slots:
     48    void on_btnAddRecipient_clicked();
     49    void on_btnRemoveRecipient_clicked();
     50    void on_treeRecipients_itemSelectionChanged();
     51
    1852    void on_actionAddressBook_activated();
    1953        void on_actionPreferences_activated();
  • src/ui/VCMain/vcmain.ui

    r22 r23  
    77    <x>0</x>
    88    <y>0</y>
    9     <width>757</width>
    10     <height>353</height>
     9    <width>750</width>
     10    <height>411</height>
    1111   </rect>
    1212  </property>
     
    1818  </property>
    1919  <widget class="QWidget" name="centralwidget">
    20    <widget class="QGroupBox" name="groupBox">
    21     <property name="geometry">
    22      <rect>
    23       <x>9</x>
    24       <y>9</y>
    25       <width>451</width>
    26       <height>301</height>
    27      </rect>
    28     </property>
    29     <property name="title">
    30      <string>Message</string>
    31     </property>
    32     <layout class="QVBoxLayout" name="verticalLayout_2">
    33      <item>
    34       <widget class="QTextBrowser" name="message">
    35        <property name="readOnly">
    36         <bool>false</bool>
    37        </property>
    38       </widget>
    39      </item>
    40     </layout>
    41    </widget>
    42    <widget class="QWidget" name="">
    43     <property name="geometry">
    44      <rect>
    45       <x>472</x>
    46       <y>2</y>
    47       <width>271</width>
    48       <height>291</height>
    49      </rect>
    50     </property>
    51     <layout class="QVBoxLayout" name="verticalLayout_3">
    52      <item>
    53       <widget class="QGroupBox" name="groupBox_3">
    54        <property name="maximumSize">
    55         <size>
    56          <width>269</width>
    57          <height>16777215</height>
    58         </size>
    59        </property>
    60        <property name="title">
    61         <string>Account</string>
    62        </property>
    63        <layout class="QVBoxLayout" name="verticalLayout">
    64         <item>
    65          <widget class="QComboBox" name="comboBox">
    66           <property name="minimumSize">
    67            <size>
    68             <width>0</width>
    69             <height>0</height>
    70            </size>
    71           </property>
    72          </widget>
    73         </item>
    74        </layout>
    75       </widget>
    76      </item>
    77      <item>
    78       <widget class="QGroupBox" name="groupBox_4">
    79        <property name="maximumSize">
    80         <size>
    81          <width>269</width>
    82          <height>16777215</height>
    83         </size>
    84        </property>
    85        <property name="title">
    86         <string>Recipients</string>
    87        </property>
    88        <layout class="QGridLayout" name="gridLayout">
    89         <item row="0" column="0">
    90          <widget class="QComboBox" name="comboBox_2"/>
    91         </item>
    92         <item row="0" column="1">
    93          <widget class="QPushButton" name="pushButton">
    94           <property name="text">
    95            <string>Add</string>
    96           </property>
    97          </widget>
    98         </item>
    99         <item row="1" column="0" rowspan="2">
    100          <widget class="QListWidget" name="listWidget"/>
    101         </item>
    102         <item row="1" column="1">
    103          <spacer name="verticalSpacer">
    104           <property name="orientation">
    105            <enum>Qt::Vertical</enum>
    106           </property>
    107           <property name="sizeHint" stdset="0">
    108            <size>
    109             <width>20</width>
    110             <height>98</height>
    111            </size>
    112           </property>
    113          </spacer>
    114         </item>
    115         <item row="2" column="1">
    116          <widget class="QPushButton" name="pushButton_2">
    117           <property name="text">
    118            <string>Remove</string>
    119           </property>
    120          </widget>
    121         </item>
    122        </layout>
    123       </widget>
    124      </item>
    125      <item>
    126       <spacer name="verticalSpacer_2">
    127        <property name="orientation">
    128         <enum>Qt::Vertical</enum>
    129        </property>
    130        <property name="sizeType">
    131         <enum>QSizePolicy::Fixed</enum>
    132        </property>
    133        <property name="sizeHint" stdset="0">
    134         <size>
    135          <width>20</width>
    136          <height>17</height>
    137         </size>
    138        </property>
    139       </spacer>
    140      </item>
    141      <item>
    142       <layout class="QHBoxLayout" name="horizontalLayout">
     20   <layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,0">
     21    <item>
     22     <widget class="QGroupBox" name="groupBox">
     23      <property name="title">
     24       <string>Message</string>
     25      </property>
     26      <layout class="QVBoxLayout" name="verticalLayout_2">
    14327       <item>
    144         <spacer name="horizontalSpacer">
    145          <property name="orientation">
    146           <enum>Qt::Horizontal</enum>
    147          </property>
    148          <property name="sizeHint" stdset="0">
    149           <size>
    150            <width>40</width>
    151            <height>20</height>
    152           </size>
    153          </property>
    154         </spacer>
    155        </item>
    156        <item>
    157         <widget class="QPushButton" name="pushButton_3">
    158          <property name="sizePolicy">
    159           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
    160            <horstretch>0</horstretch>
    161            <verstretch>0</verstretch>
    162           </sizepolicy>
    163          </property>
    164          <property name="minimumSize">
    165           <size>
    166            <width>111</width>
    167            <height>0</height>
    168           </size>
    169          </property>
    170          <property name="maximumSize">
    171           <size>
    172            <width>111</width>
    173            <height>16777215</height>
    174           </size>
    175          </property>
    176          <property name="text">
    177           <string>Send</string>
     28        <widget class="QTextBrowser" name="message">
     29         <property name="readOnly">
     30          <bool>false</bool>
    17831         </property>
    17932        </widget>
    18033       </item>
    181        <item>
    182         <spacer name="horizontalSpacer_2">
    183          <property name="orientation">
    184           <enum>Qt::Horizontal</enum>
    185          </property>
    186          <property name="sizeHint" stdset="0">
    187           <size>
    188            <width>40</width>
    189            <height>20</height>
    190           </size>
    191          </property>
    192         </spacer>
    193        </item>
    19434      </layout>
    195      </item>
    196     </layout>
    197    </widget>
     35     </widget>
     36    </item>
     37    <item>
     38     <layout class="QVBoxLayout" name="verticalLayout_3">
     39      <item>
     40       <widget class="QGroupBox" name="groupBox_3">
     41        <property name="maximumSize">
     42         <size>
     43          <width>269</width>
     44          <height>16777215</height>
     45         </size>
     46        </property>
     47        <property name="title">
     48         <string>Account</string>
     49        </property>
     50        <layout class="QVBoxLayout" name="verticalLayout">
     51         <item>
     52          <widget class="QComboBox" name="lstAccounts">
     53           <property name="minimumSize">
     54            <size>
     55             <width>0</width>
     56             <height>0</height>
     57            </size>
     58           </property>
     59          </widget>
     60         </item>
     61        </layout>
     62       </widget>
     63      </item>
     64      <item>
     65       <widget class="QGroupBox" name="groupBox_4">
     66        <property name="maximumSize">
     67         <size>
     68          <width>269</width>
     69          <height>16777215</height>
     70         </size>
     71        </property>
     72        <property name="title">
     73         <string>Recipients</string>
     74        </property>
     75        <layout class="QGridLayout" name="gridLayout">
     76         <item row="0" column="0">
     77          <widget class="QComboBox" name="lstContacts">
     78           <property name="editable">
     79            <bool>true</bool>
     80           </property>
     81           <property name="currentIndex">
     82            <number>-1</number>
     83           </property>
     84           <property name="insertPolicy">
     85            <enum>QComboBox::NoInsert</enum>
     86           </property>
     87          </widget>
     88         </item>
     89         <item row="0" column="1">
     90          <widget class="QPushButton" name="btnAddRecipient">
     91           <property name="text">
     92            <string>Add</string>
     93           </property>
     94          </widget>
     95         </item>
     96         <item row="2" column="1">
     97          <spacer name="verticalSpacer">
     98           <property name="orientation">
     99            <enum>Qt::Vertical</enum>
     100           </property>
     101           <property name="sizeHint" stdset="0">
     102            <size>
     103             <width>20</width>
     104             <height>98</height>
     105            </size>
     106           </property>
     107          </spacer>
     108         </item>
     109         <item row="3" column="1">
     110          <widget class="QPushButton" name="btnRemoveRecipient">
     111           <property name="text">
     112            <string>Remove</string>
     113           </property>
     114          </widget>
     115         </item>
     116         <item row="1" column="0" rowspan="3">
     117          <widget class="QTreeWidget" name="treeRecipients">
     118           <property name="editTriggers">
     119            <set>QAbstractItemView::NoEditTriggers</set>
     120           </property>
     121           <property name="selectionMode">
     122            <enum>QAbstractItemView::ExtendedSelection</enum>
     123           </property>
     124           <property name="iconSize">
     125            <size>
     126             <width>24</width>
     127             <height>24</height>
     128            </size>
     129           </property>
     130           <property name="columnCount">
     131            <number>1</number>
     132           </property>
     133           <attribute name="headerVisible">
     134            <bool>false</bool>
     135           </attribute>
     136           <column>
     137            <property name="text">
     138             <string notr="true">1</string>
     139            </property>
     140           </column>
     141          </widget>
     142         </item>
     143        </layout>
     144       </widget>
     145      </item>
     146      <item>
     147       <spacer name="verticalSpacer_2">
     148        <property name="orientation">
     149         <enum>Qt::Vertical</enum>
     150        </property>
     151        <property name="sizeType">
     152         <enum>QSizePolicy::Fixed</enum>
     153        </property>
     154        <property name="sizeHint" stdset="0">
     155         <size>
     156          <width>20</width>
     157          <height>17</height>
     158         </size>
     159        </property>
     160       </spacer>
     161      </item>
     162      <item>
     163       <layout class="QHBoxLayout" name="horizontalLayout">
     164        <item>
     165         <spacer name="horizontalSpacer">
     166          <property name="orientation">
     167           <enum>Qt::Horizontal</enum>
     168          </property>
     169          <property name="sizeHint" stdset="0">
     170           <size>
     171            <width>40</width>
     172            <height>20</height>
     173           </size>
     174          </property>
     175         </spacer>
     176        </item>
     177        <item>
     178         <widget class="QPushButton" name="btnSend">
     179          <property name="sizePolicy">
     180           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
     181            <horstretch>0</horstretch>
     182            <verstretch>0</verstretch>
     183           </sizepolicy>
     184          </property>
     185          <property name="minimumSize">
     186           <size>
     187            <width>111</width>
     188            <height>0</height>
     189           </size>
     190          </property>
     191          <property name="maximumSize">
     192           <size>
     193            <width>111</width>
     194            <height>16777215</height>
     195           </size>
     196          </property>
     197          <property name="text">
     198           <string>Send</string>
     199          </property>
     200         </widget>
     201        </item>
     202        <item>
     203         <spacer name="horizontalSpacer_2">
     204          <property name="orientation">
     205           <enum>Qt::Horizontal</enum>
     206          </property>
     207          <property name="sizeHint" stdset="0">
     208           <size>
     209            <width>40</width>
     210            <height>20</height>
     211           </size>
     212          </property>
     213         </spacer>
     214        </item>
     215       </layout>
     216      </item>
     217     </layout>
     218    </item>
     219   </layout>
    198220  </widget>
    199221  <widget class="QMenuBar" name="menubar">
     
    202224     <x>0</x>
    203225     <y>0</y>
    204      <width>757</width>
     226     <width>750</width>
    205227     <height>25</height>
    206228    </rect>
  • src/utils/typeconvert.h

    r22 r23  
    3636}
    3737
     38template <class DstType, class SrcType>
     39inline bool isChildOf(const SrcType* src){
     40    return dynamic_cast<const DstType*>(src) != 0;
     41}
     42
    3843
    3944#endif /* TYPECONVERT_H_ */
  • ui_vcaddressbook.h

    r22 r23  
    22** Form generated from reading ui file 'vcaddressbook.ui'
    33**
    4 ** Created: Tue Jun 23 09:47:48 2009
     4** Created: Mon Jun 29 18:06:07 2009
    55**      by: Qt User Interface Compiler version 4.5.0
    66**
     
    225225        QObject::connect(tblContacts, SIGNAL(cellClicked(int,int)), tblContacts, SLOT(resizeRowsToContents()));
    226226
    227         tabWidget->setCurrentIndex(1);
     227        tabWidget->setCurrentIndex(0);
    228228
    229229
  • ui_vcmain.h

    r22 r23  
    22** Form generated from reading ui file 'vcmain.ui'
    33**
    4 ** Created: Mon Jun 22 20:08:01 2009
     4** Created: Tue Jun 30 21:02:33 2009
    55**      by: Qt User Interface Compiler version 4.5.0
    66**
     
    2020#include <QtGui/QHBoxLayout>
    2121#include <QtGui/QHeaderView>
    22 #include <QtGui/QListWidget>
    2322#include <QtGui/QMainWindow>
    2423#include <QtGui/QMenu>
     
    2827#include <QtGui/QStatusBar>
    2928#include <QtGui/QTextBrowser>
     29#include <QtGui/QTreeWidget>
    3030#include <QtGui/QVBoxLayout>
    3131#include <QtGui/QWidget>
     
    4242    QAction *actionAddressBook;
    4343    QWidget *centralwidget;
     44    QHBoxLayout *horizontalLayout_2;
    4445    QGroupBox *groupBox;
    4546    QVBoxLayout *verticalLayout_2;
    4647    QTextBrowser *message;
    47     QWidget *widget;
    4848    QVBoxLayout *verticalLayout_3;
    4949    QGroupBox *groupBox_3;
    5050    QVBoxLayout *verticalLayout;
    51     QComboBox *comboBox;
     51    QComboBox *lstAccounts;
    5252    QGroupBox *groupBox_4;
    5353    QGridLayout *gridLayout;
    54     QComboBox *comboBox_2;
    55     QPushButton *pushButton;
    56     QListWidget *listWidget;
     54    QComboBox *lstContacts;
     55    QPushButton *btnAddRecipient;
    5756    QSpacerItem *verticalSpacer;
    58     QPushButton *pushButton_2;
     57    QPushButton *btnRemoveRecipient;
     58    QTreeWidget *treeRecipients;
    5959    QSpacerItem *verticalSpacer_2;
    6060    QHBoxLayout *horizontalLayout;
    6161    QSpacerItem *horizontalSpacer;
    62     QPushButton *pushButton_3;
     62    QPushButton *btnSend;
    6363    QSpacerItem *horizontalSpacer_2;
    6464    QMenuBar *menubar;
     
    7272        if (VCMainClass->objectName().isEmpty())
    7373            VCMainClass->setObjectName(QString::fromUtf8("VCMainClass"));
    74         VCMainClass->resize(757, 353);
     74        VCMainClass->resize(750, 411);
    7575        VCMainClass->setContextMenuPolicy(Qt::DefaultContextMenu);
    7676        actionExit = new QAction(VCMainClass);
     
    101101        centralwidget = new QWidget(VCMainClass);
    102102        centralwidget->setObjectName(QString::fromUtf8("centralwidget"));
     103        horizontalLayout_2 = new QHBoxLayout(centralwidget);
     104        horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
    103105        groupBox = new QGroupBox(centralwidget);
    104106        groupBox->setObjectName(QString::fromUtf8("groupBox"));
    105         groupBox->setGeometry(QRect(9, 9, 451, 301));
    106107        verticalLayout_2 = new QVBoxLayout(groupBox);
    107108        verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
     
    112113        verticalLayout_2->addWidget(message);
    113114
    114         widget = new QWidget(centralwidget);
    115         widget->setObjectName(QString::fromUtf8("widget"));
    116         widget->setGeometry(QRect(472, 2, 271, 291));
    117         verticalLayout_3 = new QVBoxLayout(widget);
     115
     116        horizontalLayout_2->addWidget(groupBox);
     117
     118        verticalLayout_3 = new QVBoxLayout();
    118119        verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
    119         verticalLayout_3->setContentsMargins(0, 0, 0, 0);
    120         groupBox_3 = new QGroupBox(widget);
     120        groupBox_3 = new QGroupBox(centralwidget);
    121121        groupBox_3->setObjectName(QString::fromUtf8("groupBox_3"));
    122122        groupBox_3->setMaximumSize(QSize(269, 16777215));
    123123        verticalLayout = new QVBoxLayout(groupBox_3);
    124124        verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
    125         comboBox = new QComboBox(groupBox_3);
    126         comboBox->setObjectName(QString::fromUtf8("comboBox"));
    127         comboBox->setMinimumSize(QSize(0, 0));
    128 
    129         verticalLayout->addWidget(comboBox);
     125        lstAccounts = new QComboBox(groupBox_3);
     126        lstAccounts->setObjectName(QString::fromUtf8("lstAccounts"));
     127        lstAccounts->setMinimumSize(QSize(0, 0));
     128
     129        verticalLayout->addWidget(lstAccounts);
    130130
    131131
    132132        verticalLayout_3->addWidget(groupBox_3);
    133133
    134         groupBox_4 = new QGroupBox(widget);
     134        groupBox_4 = new QGroupBox(centralwidget);
    135135        groupBox_4->setObjectName(QString::fromUtf8("groupBox_4"));
    136136        groupBox_4->setMaximumSize(QSize(269, 16777215));
    137137        gridLayout = new QGridLayout(groupBox_4);
    138138        gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
    139         comboBox_2 = new QComboBox(groupBox_4);
    140         comboBox_2->setObjectName(QString::fromUtf8("comboBox_2"));
    141 
    142         gridLayout->addWidget(comboBox_2, 0, 0, 1, 1);
    143 
    144         pushButton = new QPushButton(groupBox_4);
    145         pushButton->setObjectName(QString::fromUtf8("pushButton"));
    146 
    147         gridLayout->addWidget(pushButton, 0, 1, 1, 1);
    148 
    149         listWidget = new QListWidget(groupBox_4);
    150         listWidget->setObjectName(QString::fromUtf8("listWidget"));
    151 
    152         gridLayout->addWidget(listWidget, 1, 0, 2, 1);
     139        lstContacts = new QComboBox(groupBox_4);
     140        lstContacts->setObjectName(QString::fromUtf8("lstContacts"));
     141        lstContacts->setEditable(true);
     142        lstContacts->setInsertPolicy(QComboBox::NoInsert);
     143
     144        gridLayout->addWidget(lstContacts, 0, 0, 1, 1);
     145
     146        btnAddRecipient = new QPushButton(groupBox_4);
     147        btnAddRecipient->setObjectName(QString::fromUtf8("btnAddRecipient"));
     148
     149        gridLayout->addWidget(btnAddRecipient, 0, 1, 1, 1);
    153150
    154151        verticalSpacer = new QSpacerItem(20, 98, QSizePolicy::Minimum, QSizePolicy::Expanding);
    155152
    156         gridLayout->addItem(verticalSpacer, 1, 1, 1, 1);
    157 
    158         pushButton_2 = new QPushButton(groupBox_4);
    159         pushButton_2->setObjectName(QString::fromUtf8("pushButton_2"));
    160 
    161         gridLayout->addWidget(pushButton_2, 2, 1, 1, 1);
     153        gridLayout->addItem(verticalSpacer, 2, 1, 1, 1);
     154
     155        btnRemoveRecipient = new QPushButton(groupBox_4);
     156        btnRemoveRecipient->setObjectName(QString::fromUtf8("btnRemoveRecipient"));
     157
     158        gridLayout->addWidget(btnRemoveRecipient, 3, 1, 1, 1);
     159
     160        treeRecipients = new QTreeWidget(groupBox_4);
     161        QTreeWidgetItem *__qtreewidgetitem = new QTreeWidgetItem();
     162        __qtreewidgetitem->setText(0, QString::fromUtf8("1"));
     163        treeRecipients->setHeaderItem(__qtreewidgetitem);
     164        treeRecipients->setObjectName(QString::fromUtf8("treeRecipients"));
     165        treeRecipients->setEditTriggers(QAbstractItemView::NoEditTriggers);
     166        treeRecipients->setSelectionMode(QAbstractItemView::ExtendedSelection);
     167        treeRecipients->setIconSize(QSize(24, 24));
     168        treeRecipients->setColumnCount(1);
     169        treeRecipients->header()->setVisible(false);
     170
     171        gridLayout->addWidget(treeRecipients, 1, 0, 3, 1);
    162172
    163173
     
    174184        horizontalLayout->addItem(horizontalSpacer);
    175185
    176         pushButton_3 = new QPushButton(widget);
    177         pushButton_3->setObjectName(QString::fromUtf8("pushButton_3"));
     186        btnSend = new QPushButton(centralwidget);
     187        btnSend->setObjectName(QString::fromUtf8("btnSend"));
    178188        QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
    179189        sizePolicy.setHorizontalStretch(0);
    180190        sizePolicy.setVerticalStretch(0);
    181         sizePolicy.setHeightForWidth(pushButton_3->sizePolicy().hasHeightForWidth());
    182         pushButton_3->setSizePolicy(sizePolicy);
    183         pushButton_3->setMinimumSize(QSize(111, 0));
    184         pushButton_3->setMaximumSize(QSize(111, 16777215));
    185 
    186         horizontalLayout->addWidget(pushButton_3);
     191        sizePolicy.setHeightForWidth(btnSend->sizePolicy().hasHeightForWidth());
     192        btnSend->setSizePolicy(sizePolicy);
     193        btnSend->setMinimumSize(QSize(111, 0));
     194        btnSend->setMaximumSize(QSize(111, 16777215));
     195
     196        horizontalLayout->addWidget(btnSend);
    187197
    188198        horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
     
    193203        verticalLayout_3->addLayout(horizontalLayout);
    194204
     205
     206        horizontalLayout_2->addLayout(verticalLayout_3);
     207
     208        horizontalLayout_2->setStretch(0, 1);
    195209        VCMainClass->setCentralWidget(centralwidget);
    196210        menubar = new QMenuBar(VCMainClass);
    197211        menubar->setObjectName(QString::fromUtf8("menubar"));
    198         menubar->setGeometry(QRect(0, 0, 757, 25));
     212        menubar->setGeometry(QRect(0, 0, 750, 25));
    199213        menuFile = new QMenu(menubar);
    200214        menuFile->setObjectName(QString::fromUtf8("menuFile"));
     
    220234        retranslateUi(VCMainClass);
    221235        QObject::connect(actionExit, SIGNAL(activated()), VCMainClass, SLOT(close()));
     236
     237        lstContacts->setCurrentIndex(-1);
     238
    222239
    223240        QMetaObject::connectSlotsByName(VCMainClass);
     
    235252        groupBox_3->setTitle(QApplication::translate("VCMainClass", "Account", 0, QApplication::UnicodeUTF8));
    236253        groupBox_4->setTitle(QApplication::translate("VCMainClass", "Recipients", 0, QApplication::UnicodeUTF8));
    237         pushButton->setText(QApplication::translate("VCMainClass", "Add", 0, QApplication::UnicodeUTF8));
    238         pushButton_2->setText(QApplication::translate("VCMainClass", "Remove", 0, QApplication::UnicodeUTF8));
    239         pushButton_3->setText(QApplication::translate("VCMainClass", "Send", 0, QApplication::UnicodeUTF8));
     254        btnAddRecipient->setText(QApplication::translate("VCMainClass", "Add", 0, QApplication::UnicodeUTF8));
     255        btnRemoveRecipient->setText(QApplication::translate("VCMainClass", "Remove", 0, QApplication::UnicodeUTF8));
     256        btnSend->setText(QApplication::translate("VCMainClass", "Send", 0, QApplication::UnicodeUTF8));
    240257        menuFile->setTitle(QApplication::translate("VCMainClass", "&File", 0, QApplication::UnicodeUTF8));
    241258        menuHelp->setTitle(QApplication::translate("VCMainClass", "&Help", 0, QApplication::UnicodeUTF8));
Note: See TracChangeset for help on using the changeset viewer.