[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/pim/kcall
From:       Eva Brucherseifer <eva () kde ! org>
Date:       2007-07-22 10:42:30
Message-ID: 1185100950.817912.9393.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 690830 by eva:

- fix CMakeLists.txt again 
  (mlaurent: it would be a lot nicer to notify by email instead
  of breaking the build system...)
- some functions are actually slots
- remove delete button for search line as this is now integrated


 M  +61 -6     CMakeLists.txt  
 M  +18 -24    kcall/kcallview.cpp  
 M  +5 -3      kcall/kcallview.h  
 M  +18 -40    kcall/kcallview.ui  
 M  +2 -1      kcall/vcardview.h  


--- trunk/playground/pim/kcall/CMakeLists.txt #690829:690830
@@ -1,20 +1,75 @@
-PROJECT(KCall)
-
+PROJECT(kcall)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.4.3)
+SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
 SET(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
 
+FIND_PACKAGE(Qt4 REQUIRED)
 FIND_PACKAGE(KDE4 REQUIRED)
 INCLUDE(UsePkgConfig REQUIRED)
+INCLUDE(FindDoxygen)
 
+IF (APPLE)
+    SET(CMAKE_INSTALL_NAME_DIR ${LIB_INSTALL_DIR})
+    SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
+ENDIF (APPLE)
+
+ADD_DEFINITIONS(${QT4_DEFINITIONS} ${KDE4_DEFINITIONS})
+
 SET(MAYOR_VERSION "0")
-SET(MINOR_VERSION "6")
+SET(MINOR_VERSION "7")
 SET(PATCH_LEVEL "0")
 
 SET(VERSION "${MAYOR_VERSION}.${MINOR_VERSION}.${PATCH_LEVEL}")
+SET(SO_VERSION "${VERSION}")
 
 SET(CMAKE_VERBOSE_MAKEFILE ON)
 
-ADD_DEFINITIONS(${QT4_DEFINITIONS} ${KDE4_DEFINITIONS})
+# Suffix for x86/x86_64:
+SET(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
 
-ADD_SUBDIRECTORY(applet) 
-ADD_SUBDIRECTORY(kcall) 
+SET(LIB_INSTALL_DIR
+    "lib${LIB_SUFFIX}"
+    CACHE PATH "The subdirectory relative to the install prefix where libraries will \
be installed (default is lib${LIB_SUFFIX})." +    FORCE
+)
 
+SET(DATA_INSTALL_DIR
+    "share"
+    CACHE PATH "The subdirectory relative to the install prefix where shared data \
will be installed (default is share)." +    FORCE
+)
+
+SET(COMPONENT_SEARCH_DIR
+    "${DATA_INSTALL_DIR}/Decibel/components"
+    CACHE PATH "The subdirectory relative to the install prefix where Decibel will \
look for its components (default is ${DATA_INSTALL_DIR}/Decibel/components)." +    \
FORCE +)
+
+SET(DBUS_SERVICES_INSTALL_DIR
+    "${DATA_INSTALL_DIR}/dbus-1/services"
+    CACHE PATH "D-Bus services directory (default is \
${DATA_INSTALL_DIR}/dbus-1/services)." +    FORCE
+)
+
+SET(DOC_INSTALL_DIR
+    "${DATA_INSTALL_DIR}/doc/kcall"
+    CACHE PATH "The subdirectory relative to the install prefix for documentation \
files (default is ${DATA_INSTALL_DIR}/doc/Decibel)." +    FORCE
+)
+
+
+PKGCONFIG(QtTapioca
+          QTTAPIOCA_INC_DIR
+          QTTAPIOCA_LIB_DIR
+          QTTAPIOCA_LDFLAGS
+          QTTAPIOCA_CFLAGS
+)
+FIND_LIBRARY(QTTAPIOCA_LIBRARIES NAMES QtTapioca
+    PATHS ${QTTAPIOCA_LIB_DIR}
+)
+
+ADD_SUBDIRECTORY(kcall)
+#ADD_SUBDIRECTORY(applet) 
+
+
+
--- trunk/playground/pim/kcall/kcall/kcallview.cpp #690829:690830
@@ -43,16 +43,6 @@
  {
     ui.setupUi(this);
 
-    connect( ui.hangupButton, SIGNAL(clicked()), this, SLOT(hangupCall()));
-    connect( ui.acceptButton, SIGNAL(clicked()), this, SLOT(acceptCall()));
-    connect( ui.actCalls, SIGNAL(selectionChanged()), this, \
                SLOT(setButtonsActCalls()));
-    connect( ui.actCalls, SIGNAL(clicked(QListViewItem*)), this, \
                SLOT(setVisCard(QListViewItem*)));
-    connect( ui.eraseButton, SIGNAL(clicked()), ui.searchInput, SLOT(clear()));
-    connect( ui.nrInput, SIGNAL(returnPressed(const QString&)), this, \
                SLOT(dialByInput(const QString&amp;)));
-    connect( ui.nrInput, SIGNAL(textChanged(const QString&)), ui.nrInput, \
                SLOT(setCompletedText(const QString&)));
-    connect( ui.phonebookList, SIGNAL(clicked(QListViewItem*)), this, \
                SLOT(setVisCard(QListViewItem*)));
-    connect( ui.acceptButton, SIGNAL(clicked()), this, SLOT(decideAcceptAction()));
-
     //load the history and completion list for ui.nrInput
     QStringList nrInputHistoryList;
     nrInputHistoryList = KCallSettings::completion();
@@ -72,14 +62,9 @@
     statusPix[5] = SmallIcon("canceled");
     statusPix[6] = SmallIcon("active");
     
-    // init searchInput
-    ui.eraseButton->setIcon(SmallIcon(QApplication::isRightToLeft() ? "clear_left" : \
                "locationbar_erase" ) );
-    ui.eraseButton->setShortcut( QKeySequence( Qt::CTRL + Qt::ALT + Qt::Key_S ) );
-    ui.eraseButton->setAutoRaise( true );
-    
     // init dialing
-    ui.acceptButton->setIcon( SmallIconSet("phone_accept") );
-    ui.hangupButton->setIcon( SmallIconSet("phone_reject") );
+    ui.acceptButton->setIcon( KIcon("phone_accept") );
+    ui.hangupButton->setIcon( KIcon("phone_reject") );
     //hangupButton->setIconSet( SmallIconSet("phone_reject",22 ) );
 
     //init actCalls-List
@@ -90,13 +75,13 @@
     actCallNrCol = ui.actCalls->addColumn("CallNr",0);
     
     //init phonebookList        
-    ab = KABC::StdAddressBook::self( true );
     ui.phonebookList->addColumn("Name");
-    pbLCallNrCol = ui.phonebookList->addColumn("PhoneNumber");
     ui.phonebookList->addColumn("ABId",0);
-    setPhonebookList();
+    pbLCallNrCol = ui.phonebookList->addColumn("PhoneNumber");
     
-    connect(ab, SIGNAL(addressBookChanged(AddressBook*)), this, \
SLOT(setPhonebookList())); +    ab = KABC::StdAddressBook::self( true );
+    updatePhonebookView();
+    connect(ab, SIGNAL(addressBookChanged(AddressBook*)), this, \
SLOT(updatePhonebookView()));  
     //init historyList
 /** @todo port to decibel history api and/or save length in local settings*/
@@ -125,6 +110,15 @@
     setDialTab();
     
     //newCall("buh", "sip:244@192.168.2.230", "", 1);
+
+    connect( ui.hangupButton, SIGNAL(clicked()), this, SLOT(hangupCall()));
+    connect( ui.acceptButton, SIGNAL(clicked()), this, SLOT(acceptCall()));
+    connect( ui.actCalls, SIGNAL(selectionChanged()), this, \
SLOT(setButtonsActCalls())); +    connect( ui.actCalls, \
SIGNAL(clicked(QListViewItem*)), this, SLOT(setVisCard(QListViewItem*))); +    \
connect( ui.nrInput, SIGNAL(returnPressed(const QString&)), this, \
SLOT(dialByInput(const QString&))); +    connect( ui.nrInput, \
SIGNAL(textChanged(const QString&)), ui.nrInput, SLOT(setCompletedText(const \
QString&))); +    connect( ui.phonebookList, SIGNAL(clicked(QListViewItem*)), this, \
SLOT(setVisCard(QListViewItem*))); +    connect( ui.acceptButton, SIGNAL(clicked()), \
this, SLOT(decideAcceptAction()));  }
 
 KCallView::~KCallView()
@@ -156,7 +150,7 @@
         
     new K3ListViewItem( ui.actCalls, callerText, subject, "", callid, caller );
     setCallStatus(callid, status);
-    
+     
     //setButtonsActCalls();
     //actCalls->insertItem(newcalltmp);
     
@@ -289,9 +283,9 @@
 }
 
 
-void KCallView::setPhonebookList()
+void KCallView::updatePhonebookView()
 {
-    kDebug() << "KCallView::setPhonebookList()" << endl;    
+    kDebug() << "KCallView::updatePhonebookView()" << endl;    
         
     ab->load();
     KABC::AddressBook::ConstIterator it;
--- trunk/playground/pim/kcall/kcall/kcallview.h #690829:690830
@@ -52,6 +52,9 @@
     KCallView(QWidget *parent = 0);
     ~KCallView();
 
+    KABC::Addressee getPersonFromNumber(QString phoneNumber);
+
+public slots:
     void newCall(QString callid, QString caller, QString subject, int status);
     void dialByInput(const QString &phoneNr);
     void decideAcceptAction();
@@ -60,14 +63,13 @@
     void hangupCall();
     void cancelCall(QString callId);
     void setCallStatus(QString callid, int status);
+    void updatePhonebookView();
     void kCallStatus(bool online);
-    void setPhonebookList();
     void setHistoryList();
     void setVCard(Q3ListViewItem* item);
     void setDialTab();
     void setButtonsActCalls();
-    KABC::Addressee getPersonFromNumber(QString phoneNumber);
-
+    
 signals:
     void accept(QString);
     void reject(QString);
--- trunk/playground/pim/kcall/kcall/kcallview.ui #690829:690830
@@ -50,13 +50,6 @@
         <item>
          <layout class="QHBoxLayout" >
           <item>
-           <widget class="QToolButton" name="eraseButton" >
-            <property name="text" >
-             <string>...</string>
-            </property>
-           </widget>
-          </item>
-          <item>
            <widget class="QLabel" name="searchLabel" >
             <property name="text" >
              <string>Search</string>
@@ -88,7 +81,7 @@
          </layout>
         </item>
         <item>
-         <widget class="K3ListView" native="1" name="phonebookList" >
+         <widget class="K3ListView" name="phonebookList" >
           <property name="sizePolicy" >
            <sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
             <horstretch>0</horstretch>
@@ -175,13 +168,13 @@
           </widget>
          </item>
          <item>
-          <widget class="KHistoryComboBox" native="1" name="nrInput" >
-           <property name="autoCompletion" stdset="0" >
-            <bool>true</bool>
-           </property>
-           <property name="duplicatesEnabled" stdset="0" >
+          <widget class="KHistoryComboBox" name="nrInput" >
+           <property name="duplicatesEnabled" >
             <bool>false</bool>
            </property>
+           <property name="autoCompletion" >
+            <bool>true</bool>
+           </property>
           </widget>
          </item>
         </layout>
@@ -189,7 +182,7 @@
        <item>
         <layout class="QHBoxLayout" >
          <item>
-          <widget class="QPushButton" native="1" name="acceptButton" >
+          <widget class="QPushButton" name="acceptButton" >
            <property name="enabled" >
             <bool>false</bool>
            </property>
@@ -199,13 +192,13 @@
              <height>0</height>
             </size>
            </property>
-           <property name="text" stdset="0" >
+           <property name="text" >
             <string>Accep&amp;t</string>
            </property>
           </widget>
          </item>
          <item>
-          <widget class="QPushButton" native="1" name="hangupButton" >
+          <widget class="QPushButton" name="hangupButton" >
            <property name="enabled" >
             <bool>false</bool>
            </property>
@@ -218,7 +211,7 @@
            <property name="toolTip" >
             <string>Deny/Hangup</string>
            </property>
-           <property name="text" stdset="0" >
+           <property name="text" >
             <string>Ha&amp;ngUp</string>
            </property>
           </widget>
@@ -265,7 +258,7 @@
           </attribute>
           <layout class="QVBoxLayout" >
            <item>
-            <widget class="K3ListView" native="1" name="actCalls" >
+            <widget class="K3ListView" name="actCalls" >
              <property name="maximumSize" >
               <size>
                <width>32767</width>
@@ -297,7 +290,7 @@
             <number>0</number>
            </property>
            <item>
-            <widget class="K3ListView" native="1" name="historyList" />
+            <widget class="K3ListView" name="historyList" />
            </item>
           </layout>
          </widget>
@@ -312,14 +305,16 @@
  <layoutdefault spacing="3" margin="0" />
  <customwidgets>
   <customwidget>
+   <class>K3ListView</class>
+   <extends>Q3ListView</extends>
+   <header>k3listview.h</header>
+  </customwidget>
+  <customwidget>
    <class>KHistoryComboBox</class>
-   <extends>QWidget</extends>
+   <extends>KComboBox</extends>
    <header>khistorycombobox.h</header>
   </customwidget>
   <customwidget>
-   <class>K3ListView</class>
-  </customwidget>
-  <customwidget>
    <class>K3ListViewSearchLine</class>
    <extends>QWidget</extends>
    <header>k3listviewsearchline.h</header>
@@ -331,27 +326,10 @@
   <include location="global" >khistorycombobox.h</include>
   <include location="local" >klineedit.h</include>
   <include location="local" >kpushbutton.h</include>
-  <include location="local" >k3listview.h</include>
  </includes>
  <resources/>
  <connections>
   <connection>
-   <sender>eraseButton</sender>
-   <signal>clicked()</signal>
-   <receiver>searchInput</receiver>
-   <slot>clear()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>31</x>
-     <y>63</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>30</x>
-     <y>41</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
    <sender>nrInput</sender>
    <signal>textChanged(QString)</signal>
    <receiver>nrInput</receiver>
--- trunk/playground/pim/kcall/kcall/vcardview.h #690829:690830
@@ -33,10 +33,11 @@
     VCardView(QWidget *parent = 0);
     ~VCardView() {}
 
+public slots:
     void setByAddressee(KABC::Addressee person);
     void dial(const QString &nr);
     void setPhoneNrs(KABC::Addressee person);
-    void dialFromList( const QString &nr );
+    //void dialFromList( const QString &nr );
 
 signals:
     void dialNr( const QString &nr);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic