klog-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Klog-devel] Fwd: [Klog-svn] r55 - trunk/src


From: Jaime Robles
Subject: [Klog-devel] Fwd: [Klog-svn] r55 - trunk/src
Date: Thu, 8 Oct 2009 21:13:47 +0200

Andrew,

You have just overwritten the r54! :-( and these changes were lost... Any idea about how to recover them "automagically".

Jaime

Inicio del mensaje reenviado:

De: agoldie at BerliOS <address@hidden>
Fecha: 8 de octubre de 2009 20:49:30 GMT+02:00
Para: address@hidden
Asunto: [Klog-svn] r55 - trunk/src

Author: agoldie
Date: 2009-10-08 20:49:30 +0200 (Thu, 08 Oct 2009)
New Revision: 55

Modified:
  trunk/src/klog.cpp
  trunk/src/klog.h
  trunk/src/klog.ui
Log:
Add listwidget



Modified: trunk/src/klog.cpp
===================================================================
--- trunk/src/klog.cpp    2009-10-08 18:40:19 UTC (rev 54)
+++ trunk/src/klog.cpp    2009-10-08 18:49:30 UTC (rev 55)
@@ -99,17 +99,16 @@
    //connect(helpIndexAction, SIGNAL(triggered()), this, SLOT(helpIndex()));
    connect(iotaIntSpinBox, SIGNAL(valueChanged(int)), this, SLOT(slotIOTAChanged()));
    connect(iotaComboBox, SIGNAL(activated(QString)), this, SLOT(slotIOTAChanged()));
-//    connect(awardsComboBox, SIGNAL(textChanged(QString)), this, SLOT(slotLocalAwardChanged()));
+    connect(awardsComboBox, SIGNAL(textChanged(QString)), this, SLOT(slotLocalAwardChanged()));
    connect(toolsMerge_QSO_dataAction, SIGNAL(triggered()), this, SLOT(slotcompleteThePreviouslyWorked()));
    connect(ActionCabrilloImport, SIGNAL(triggered()), this, SLOT(slotImportCabrillo()));
    connect(qrzLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotQrzChanged()));
    connect(logTreeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(slotQsoSelectedForEdit(QTreeWidgetItem *, int)));
-    connect(logTreeWidget, SIGNAL(itemClicked(QTreeWidgetItem *, int)), this, SLOT(slotQsoRightButtonFromLog(QTreeWidgetItem *, int)));
    connect(searchQsosTreeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(slotQsoSearchSelectedForEdit(QTreeWidgetItem *, int)));
-    connect(dxclusterTreeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(slotClusterSpotToLog(QTreeWidgetItem *, int)));
+    connect(dxclusterListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem *, int)), this, SLOT(slotClusterSpotToLog(QListWidgetItem *, int)));
    connect(ActionQsoDelete, SIGNAL(triggered()), this, SLOT(slotQsoDelete()));
-    connect(ActionQslRec, SIGNAL(triggered()), this, SLOT(slotQSLRec()));
-    connect(ActionQsoSen, SIGNAL(triggered()), this, SLOT(slotQSLSent()));
+    connect(ActionQslRec, SIGNAL(triggered()), this, SLOT(slotQSLRec));
+    connect(ActionQsoSen, SIGNAL(triggered()), this, SLOT(slotQSLSent));



@@ -185,7 +184,6 @@
//qDebug() << "KLog::~KLog";
}

-
bool Klog::haveWorld(){
    //qDebug() << "KLog::haveWorld";
    //TODO:setTextFormat(Qt::RichText) to display an URL as a link
@@ -1469,33 +1467,15 @@

}

-void Klog::mousePressEvent(QMouseEvent *event){
-qDebug() << "KLog::mousePressEvent";
-  if (event->button() == Qt::LeftButton) {
-qDebug() << "KLog::mousePressEvent-left";    
-  }else if (event->button() == Qt::RightButton) {
-qDebug() << "KLog::mousePressEvent-right";        
-  }
-  lastPoint = event->pos();
-//  logTreeWidget
-}
-
-void Klog::mouseMoveEvent(QMouseEvent *event){}
-void Klog::mouseReleaseEvent(QMouseEvent *event){}
-
//TODO: DELETED FOR QT4 MIGRATION: Add the rightbutton
-void Klog::slotQsoRightButtonFromLog(QTreeWidgetItem * item, int){
- qDebug()  << "KLog::slotQsoRightButtonFromLog";
-
- if (QApplication::mouseButtons()==Qt::RightButton){
-   qDebug()  << "KLog::slotQsoRightButtonFromLog: right button";
-    if (item){
-        Klog::j = (item->text(0)).toInt(); // j is the QSO number
-        //showMenuRightButton(Klog::j, p);
-    }
-  }
-}
-
+// void Klog::slotQsoRightButtonFromLog(QTreeWidgetItem * item, const QPoint &p){
+// //cout << "KLog::slotQsoRightButtonFromLog" << endl;
+//    if (item){
+//        Klog::j = (item->text(0)).toInt(); // j is the QSO number
+//        showMenuRightButton(Klog::j, p);
+//    }
+// }
+//
// void Klog::slotQsoRightButtonFromSearch(QTreeWidgetItem * item, const QPoint &p){
// //Maybe This could be deleted and use the previous "slotQsoRightButtonFromLog" to perform
// // this actions...
@@ -4117,9 +4097,9 @@
    connect( socket, SIGNAL(error(int)), SLOT(slotClusterSocketError(int)) );
    // connect to the server

-    dxclusterTreeWidget->setSortingEnabled ( false);
+    dxclusterListWidget->setSortingEnabled ( false);
    downTabs->setCurrentIndex(1); // We set the active tab to be the cluster's
-    dxClusterSpotItem * item = new dxClusterSpotItem(dxclusterTreeWidget, i18n("Trying to connect to the server\n"), defaultColor);
+    dxClusterSpotItem * item = new dxClusterSpotItem(dxclusterListWidget, i18n("Trying to connect to the server\n"), defaultColor);
    socket->connectToHost( DXClusterServerToUse.section(':',0,0), (DXClusterServerToUse.section(':',1,1)).toInt() );
}

@@ -4315,7 +4295,7 @@
        dxSpotColor = defaultColor;
    }
    if (dxClusterString.length()>=5){
-        dxClusterSpotItem * item = new dxClusterSpotItem(dxclusterTreeWidget, dxClusterString, dxSpotColor);
+        dxClusterSpotItem * item = new dxClusterSpotItem(dxclusterListWidget, dxClusterString, dxSpotColor);
        dxSpotColor = defaultColor; // The color should be default by default
    }
    }
@@ -4323,7 +4303,7 @@

void Klog::slotClusterSocketConnected(){
//qDebug() << "KLog::slotClusterSocketConnected" << endl;
-    dxClusterSpotItem * item = new dxClusterSpotItem(dxclusterTreeWidget, i18n("Connected to server"), defaultColor);
+    dxClusterSpotItem * item = new dxClusterSpotItem(dxclusterListWidget, i18n("Connected to server"), defaultColor);
    dxClusterConnected = true;

    if ( dxClusterConnected ) {
@@ -4340,13 +4320,13 @@

void Klog::slotClusterSocketConnectionClosed(){
//qDebug() << "KLog::slotClusterSocketConnectionClosed" << endl;
-    dxClusterSpotItem * item = new dxClusterSpotItem(dxclusterTreeWidget, i18n("Connection closed by the server"), defaultColor);
+    dxClusterSpotItem * item = new dxClusterSpotItem(dxclusterListWidget, i18n("Connection closed by the server"), defaultColor);
    dxClusterConnected = false;
}

void Klog::slotClusterSocketClosed(){
//qDebug() << "KLog::slotClusterSocketCluster" << endl;
-    dxClusterSpotItem * item = new dxClusterSpotItem(dxclusterTreeWidget, i18n("Connection closed"), defaultColor );
+    dxClusterSpotItem * item = new dxClusterSpotItem(dxclusterListWidget, i18n("Connection closed"), defaultColor );
    dxClusterConnected = false;
}

@@ -4400,7 +4380,7 @@

    } */

-  dxClusterSpotItem * item = new dxClusterSpotItem(dxclusterTreeWidget, i18n("Error number %1 occurred").arg(e), defaultColor);
+  dxClusterSpotItem * item = new dxClusterSpotItem(dxclusterListWidget, i18n("Error number %1 occurred").arg(e), defaultColor);
}

void Klog::slotClusterClearInputLine(){
@@ -4437,10 +4417,10 @@

// This takes a DX-spot from the DXCluster window and copies to the QSO entry box
// when the user clicks on it.
-void Klog::slotClusterSpotToLog(QTreeWidgetItem * item, int){
+void Klog::slotClusterSpotToLog(QListWidgetItem * item, int row){
//cout << "KLog::slotClusterSpotToLog" << endl;
    if (item)
-        dxClusterString = item->text(0);
+        dxClusterString = item->text();
    else
        return;
    slotClearBtn();
@@ -4472,10 +4452,10 @@
    showWhere(enti);
}

-void Klog::slotClusterSpotCheck(QTreeWidgetItem * item){
+void Klog::slotClusterSpotCheck(QListWidgetItem * item){
//cout << "KLog::slotClusterSpotCheck" << endl;
  if (item)
-    dxClusterString = item->text(0);
+    dxClusterString = item->text();
  else{
    //cout << "KLog: slotClusterSpotCheck Limpiamos con clearEntityBox-1" << endl;
    clearEntityBox();
@@ -5157,14 +5137,14 @@
** spots.                                                                 **
** It may be moved to a self .h & .cpp archives                           **
****************************************************************************/
-dxClusterSpotItem::dxClusterSpotItem( QTreeWidget *parent, const QString& spot, const QColor& color ) : QTreeWidgetItem( parent ){
+dxClusterSpotItem::dxClusterSpotItem( QListWidget *parent, const QString& spot, const QColor& color ) : QListWidgetItem( parent ){
//cout << "KLog::dxClusterSpotItem - Constructor" << endl;
  spotColor = color;
-  setText(0, spot);
+  setText(spot);
  // Experimenting with fonts for the cluster
  QFont f("Helvetica");
  f.setFixedPitch(TRUE);
-  setFont(0, f);
+  setFont(f);
}

dxClusterSpotItem::~dxClusterSpotItem(){

Modified: trunk/src/klog.h
===================================================================
--- trunk/src/klog.h    2009-10-08 18:40:19 UTC (rev 54)
+++ trunk/src/klog.h    2009-10-08 18:49:30 UTC (rev 55)
@@ -34,6 +34,7 @@
#include <QList>
#include <QPixmap>
#include <QTextStream>
+#include <QListWidget>
#include <QTreeWidget>
#include <QTreeWidgetItem>
#include <QFile>
@@ -169,7 +170,7 @@
    void slotQsoSelected (QTreeWidgetItem* item); // Just to see qso data

//TODO: DELETED FOR QT4 MIGRATION: Add the rightbutton
-    void slotQsoRightButtonFromLog(QTreeWidgetItem * item, int);
+//    void slotQsoRightButtonFromLog(Q3ListViewItem * item, const QPoint &p);
//    void slotQsoRightButtonFromSearch(Q3ListViewItem * item, const QPoint &p);
    void slotModifyBtn();
    void showLogList();   // Shows the log in the botton widget
@@ -205,18 +206,14 @@
    void slotClusterSocketError( int e );
    void slotClusterConnect();
    void slotClusterClearInputLine();
-    void slotClusterSpotToLog(QTreeWidgetItem* item, int);
-    void slotClusterSpotCheck(QTreeWidgetItem* item);
+    void slotClusterSpotToLog(QListWidgetItem* item, int);
+    void slotClusterSpotCheck(QListWidgetItem* item);
//    void slotClusterSetup();
//    void slotKlogSetup();
    void slotBugReport();
    void slotModeChanged (int i);
    void slotBandChanged ();
    void fillDXCCList();    // Fill the KLog tab
-  protected:
-    virtual void mousePressEvent(QMouseEvent *event);
-    virtual void mouseMoveEvent(QMouseEvent *event);
-    virtual void mouseReleaseEvent(QMouseEvent *event);

  private:

@@ -442,13 +439,11 @@
    QAction *recQSOAct;
    QAction *senQSOAct;
    QActionGroup *qsoActionsGroup;
-    
-    QPoint lastPoint;
};

-class dxClusterSpotItem : public QTreeWidgetItem {
+class dxClusterSpotItem : public QListWidgetItem {
public:
-dxClusterSpotItem( QTreeWidget* parent, const QString& spot, const QColor& color );
+dxClusterSpotItem( QListWidget* parent, const QString& spot, const QColor& color );
~dxClusterSpotItem();
virtual void paintCell( QPainter *p, const QPalette &cg,
int column, int width, int alignment );

Modified: trunk/src/klog.ui
===================================================================
--- trunk/src/klog.ui    2009-10-08 18:40:19 UTC (rev 54)
+++ trunk/src/klog.ui    2009-10-08 18:49:30 UTC (rev 55)
@@ -10,8 +10,8 @@
   <rect>
    <x>0</x>
    <y>0</y>
-    <width>968</width>
-    <height>720</height>
+    <width>966</width>
+    <height>718</height>
   </rect>
  </property>
  <property name="sizePolicy">
@@ -49,7 +49,7 @@
       </size>
      </property>
      <property name="currentIndex">
-       <number>0</number>
+       <number>1</number>
      </property>
      <widget class="QWidget" name="logdisplayTab">
       <attribute name="title">
@@ -120,15 +120,6 @@
        <string>Cluster</string>
       </attribute>
       <layout class="QGridLayout" name="gridLayout_5">
-        <item row="0" column="0" colspan="3">
-         <widget class="QTreeWidget" name="dxclusterTreeWidget">
-          <column>
-           <property name="text">
-            <string>KLog DX Cluster</string>
-           </property>
-          </column>
-         </widget>
-        </item>
        <item row="1" column="0">
         <widget class="QLineEdit" name="ClusterkLineEditInPut"/>
        </item>
@@ -146,6 +137,9 @@
          </property>
         </widget>
        </item>
+        <item row="0" column="0">
+         <widget class="QListWidget" name="dxclusterListWidget"/>
+        </item>
       </layout>
      </widget>
      <widget class="QWidget" name="dxccTab">
@@ -1282,7 +1276,7 @@
        </property>
        <layout class="QGridLayout" name="gridLayout">
         <item row="0" column="0">
-          <widget class="KLed" name="kledColor"/>
+          <widget class="KLed" name="kledColor" native="true"/>
         </item>
         <item row="0" column="1" colspan="2">
          <widget class="QLineEdit" name="qrzLineEdit">
@@ -2568,8 +2562,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-     <width>968</width>
-     <height>28</height>
+     <width>966</width>
+     <height>23</height>
    </rect>
   </property>
   <property name="defaultUp">

_______________________________________________
Klog-svn mailing list
address@hidden
https://lists.berlios.de/mailman/listinfo/klog-svn

reply via email to

[Prev in Thread] Current Thread [Next in Thread]