hot fix: removed No-R

parent 8e302f43
...@@ -45,8 +45,8 @@ MainWindow::MainWindow(QWidget *parent) : ...@@ -45,8 +45,8 @@ MainWindow::MainWindow(QWidget *parent) :
QRegExp regexCall("[0-9A-Za-z/-]{3,20}[ ]?"); QRegExp regexCall("[0-9A-Za-z/-]{3,20}[ ]?");
ui->lineEdit_call->setValidator(new QRegExpValidator(regexCall, 0)); ui->lineEdit_call->setValidator(new QRegExpValidator(regexCall, 0));
ui->lineEdit_myCall->setValidator(new QRegExpValidator(regexCall, 0)); ui->lineEdit_myCall->setValidator(new QRegExpValidator(regexCall, 0));
QRegExp regexNrr("[0-9]{0,5}"); //QRegExp regexNrr("[0-9]{0,5}");
ui->lineEdit_nrr->setValidator(new QRegExpValidator(regexNrr, 0)); //ui->lineEdit_nrr->setValidator(new QRegExpValidator(regexNrr, 0));
QRegExp regexExc("[A-Za-z-]{0,6}[ ]?"); QRegExp regexExc("[A-Za-z-]{0,6}[ ]?");
ui->lineEdit_exc->setValidator(new QRegExpValidator(regexExc, 0)); ui->lineEdit_exc->setValidator(new QRegExpValidator(regexExc, 0));
ui->lineEdit_myExc->setValidator(new QRegExpValidator(regexExc, 0)); ui->lineEdit_myExc->setValidator(new QRegExpValidator(regexExc, 0));
...@@ -57,20 +57,20 @@ MainWindow::MainWindow(QWidget *parent) : ...@@ -57,20 +57,20 @@ MainWindow::MainWindow(QWidget *parent) :
timer->start(1000); timer->start(1000);
// Table resizing & order // Table resizing & order
ui->tableWidget->setColumnWidth(0,45); ui->tableWidget->setColumnWidth(0,50); // No-S
ui->tableWidget->setColumnWidth(1,45); ui->tableWidget->setColumnWidth(1,60); // Band
ui->tableWidget->setColumnWidth(2,45); ui->tableWidget->setColumnWidth(2,60); // Mode
ui->tableWidget->setColumnWidth(3,90); ui->tableWidget->setColumnWidth(3,100); // Date
ui->tableWidget->setColumnWidth(4,45); ui->tableWidget->setColumnWidth(4,60); // Time
ui->tableWidget->setColumnWidth(5,100); ui->tableWidget->setColumnWidth(5,100); // Call-S
ui->tableWidget->setColumnWidth(6,40); ui->tableWidget->setColumnWidth(6,70); // RST-S
ui->tableWidget->setColumnWidth(7,60); ui->tableWidget->setColumnWidth(7,70); // Exch-S
ui->tableWidget->setColumnWidth(8,100); ui->tableWidget->setColumnWidth(8,100); // Call-R
ui->tableWidget->setColumnWidth(9,40); ui->tableWidget->setColumnWidth(9,70); // RST-R
ui->tableWidget->setColumnWidth(10,60); ui->tableWidget->setColumnWidth(10,70); // Exch-R
ui->tableWidget->setColumnWidth(11,45); // ui->tableWidget->setColumnWidth(11,70); // No-R
ui->tableWidget->setColumnWidth(12,20); ui->tableWidget->setColumnWidth(11,30); // T
ui->tableWidget->setColumnWidth(13,20); ui->tableWidget->setColumnWidth(12,30); // X
ui->tableWidget->sortByColumn(0,Qt::DescendingOrder); ui->tableWidget->sortByColumn(0,Qt::DescendingOrder);
// data completer for input fields // data completer for input fields
...@@ -173,10 +173,10 @@ void MainWindow::on_lineEdit_call_returnPressed() ...@@ -173,10 +173,10 @@ void MainWindow::on_lineEdit_call_returnPressed()
saveQso(); saveQso();
} }
void MainWindow::on_lineEdit_nrr_returnPressed() // void MainWindow::on_lineEdit_nrr_returnPressed()
{ // {
saveQso(); // saveQso();
} // }
void MainWindow::on_lineEdit_exc_returnPressed() void MainWindow::on_lineEdit_exc_returnPressed()
{ {
...@@ -188,7 +188,8 @@ void MainWindow::on_lineEdit_exc_returnPressed() ...@@ -188,7 +188,8 @@ void MainWindow::on_lineEdit_exc_returnPressed()
void MainWindow::saveQso() void MainWindow::saveQso()
{ {
if(ui->lineEdit_call->text().size() < 3) { if((ui->lineEdit_call->text().size() < 3) |
(ui->lineEdit_exc->text().size() < 1)) {
return; return;
} }
if(ui->lineEdit_logfile->text() == "") { if(ui->lineEdit_logfile->text() == "") {
...@@ -213,7 +214,7 @@ void MainWindow::saveQso() ...@@ -213,7 +214,7 @@ void MainWindow::saveQso()
QTableWidgetItem *newItem10=new QTableWidgetItem(); QTableWidgetItem *newItem10=new QTableWidgetItem();
QTableWidgetItem *newItem11=new QTableWidgetItem(); QTableWidgetItem *newItem11=new QTableWidgetItem();
QTableWidgetItem *newItem12=new QTableWidgetItem(); QTableWidgetItem *newItem12=new QTableWidgetItem();
QTableWidgetItem *newItem13=new QTableWidgetItem(); //QTableWidgetItem *newItem13=new QTableWidgetItem();
newItem0->setData(Qt::DisplayRole, nrs); newItem0->setData(Qt::DisplayRole, nrs);
if(ui->label_band->text() == "70cm") if(ui->label_band->text() == "70cm")
...@@ -229,10 +230,10 @@ void MainWindow::saveQso() ...@@ -229,10 +230,10 @@ void MainWindow::saveQso()
newItem8->setText(ui->lineEdit_call->text()); newItem8->setText(ui->lineEdit_call->text());
newItem9->setText("59"); newItem9->setText("59");
newItem10->setText(ui->lineEdit_exc->text()); newItem10->setText(ui->lineEdit_exc->text());
newItem11->setText(ui->lineEdit_nrr->text()); //newItem11->setText(ui->lineEdit_nrr->text());
newItem12->setText("0"); newItem11->setText("0");
newItem13->data(Qt::CheckStateRole); newItem12->data(Qt::CheckStateRole);
newItem13->setCheckState(Qt::Unchecked); newItem12->setCheckState(Qt::Unchecked);
ui->tableWidget->setSortingEnabled(false); ui->tableWidget->setSortingEnabled(false);
ui->tableWidget->setItem(nrs-1,0,newItem0); ui->tableWidget->setItem(nrs-1,0,newItem0);
...@@ -246,9 +247,9 @@ void MainWindow::saveQso() ...@@ -246,9 +247,9 @@ void MainWindow::saveQso()
ui->tableWidget->setItem(nrs-1,8,newItem8); ui->tableWidget->setItem(nrs-1,8,newItem8);
ui->tableWidget->setItem(nrs-1,9,newItem9); ui->tableWidget->setItem(nrs-1,9,newItem9);
ui->tableWidget->setItem(nrs-1,10,newItem10); ui->tableWidget->setItem(nrs-1,10,newItem10);
//ui->tableWidget->setItem(nrs-1,11,newItem11);
ui->tableWidget->setItem(nrs-1,11,newItem11); ui->tableWidget->setItem(nrs-1,11,newItem11);
ui->tableWidget->setItem(nrs-1,12,newItem12); ui->tableWidget->setItem(nrs-1,12,newItem12);
ui->tableWidget->setItem(nrs-1,13,newItem13);
ui->tableWidget->setSortingEnabled(true); ui->tableWidget->setSortingEnabled(true);
saveLogfile(); saveLogfile();
...@@ -257,7 +258,7 @@ void MainWindow::saveQso() ...@@ -257,7 +258,7 @@ void MainWindow::saveQso()
ui->label_nrs->setText(QString::number(nrs)); ui->label_nrs->setText(QString::number(nrs));
ui->lineEdit_call->setText(""); ui->lineEdit_call->setText("");
ui->lineEdit_nrr->setText(""); //ui->lineEdit_nrr->setText("");
ui->lineEdit_exc->setText(""); ui->lineEdit_exc->setText("");
ui->lineEdit_call->setFocus(); ui->lineEdit_call->setFocus();
...@@ -312,8 +313,8 @@ void MainWindow::saveLogfile() { ...@@ -312,8 +313,8 @@ void MainWindow::saveLogfile() {
case 8: cellSize = 13; break; case 8: cellSize = 13; break;
case 9: cellSize = 3; break; case 9: cellSize = 3; break;
case 10: cellSize = 6; break; case 10: cellSize = 6; break;
case 11: cellSize = 0; break; //case 11: cellSize = 0; break;
case 12: cellSize = 1; break; case 11: cellSize = 1; break;
} }
cellText = cellText.leftJustified(cellSize, ' ', true); cellText = cellText.leftJustified(cellSize, ' ', true);
...@@ -397,9 +398,9 @@ void MainWindow::on_pushButton_clicked() ...@@ -397,9 +398,9 @@ void MainWindow::on_pushButton_clicked()
QTableWidgetItem *newItem8=new QTableWidgetItem(); QTableWidgetItem *newItem8=new QTableWidgetItem();
QTableWidgetItem *newItem9=new QTableWidgetItem(); QTableWidgetItem *newItem9=new QTableWidgetItem();
QTableWidgetItem *newItem10=new QTableWidgetItem(); QTableWidgetItem *newItem10=new QTableWidgetItem();
//QTableWidgetItem *newItem11=new QTableWidgetItem();
QTableWidgetItem *newItem11=new QTableWidgetItem(); QTableWidgetItem *newItem11=new QTableWidgetItem();
QTableWidgetItem *newItem12=new QTableWidgetItem(); QTableWidgetItem *newItem12=new QTableWidgetItem();
QTableWidgetItem *newItem13=new QTableWidgetItem();
newItem0->setData(Qt::DisplayRole, nrs); newItem0->setData(Qt::DisplayRole, nrs);
newItem0->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEnabled); newItem0->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEnabled);
...@@ -413,12 +414,12 @@ void MainWindow::on_pushButton_clicked() ...@@ -413,12 +414,12 @@ void MainWindow::on_pushButton_clicked()
newItem8->setText(rows[i].mid(55+offset,13).trimmed()); newItem8->setText(rows[i].mid(55+offset,13).trimmed());
newItem9->setText(rows[i].mid(69+offset,3).trimmed()); newItem9->setText(rows[i].mid(69+offset,3).trimmed());
newItem10->setText(rows[i].mid(73+offset,6).trimmed()); newItem10->setText(rows[i].mid(73+offset,6).trimmed());
newItem12->setText(rows[i].mid(80+offset,1).trimmed()); newItem11->setText(rows[i].mid(80+offset,1).trimmed());
newItem13->data(Qt::CheckStateRole); newItem12->data(Qt::CheckStateRole);
if(offset == 0) if(offset == 0)
newItem13->setCheckState(Qt::Unchecked); newItem12->setCheckState(Qt::Unchecked);
else else
newItem13->setCheckState(Qt::Checked); newItem12->setCheckState(Qt::Checked);
ui->tableWidget->setSortingEnabled(false); ui->tableWidget->setSortingEnabled(false);
ui->tableWidget->setItem(nrs-1,0,newItem0); ui->tableWidget->setItem(nrs-1,0,newItem0);
...@@ -432,9 +433,9 @@ void MainWindow::on_pushButton_clicked() ...@@ -432,9 +433,9 @@ void MainWindow::on_pushButton_clicked()
ui->tableWidget->setItem(nrs-1,8,newItem8); ui->tableWidget->setItem(nrs-1,8,newItem8);
ui->tableWidget->setItem(nrs-1,9,newItem9); ui->tableWidget->setItem(nrs-1,9,newItem9);
ui->tableWidget->setItem(nrs-1,10,newItem10); ui->tableWidget->setItem(nrs-1,10,newItem10);
//ui->tableWidget->setItem(nrs-1,11,newItem11);
ui->tableWidget->setItem(nrs-1,11,newItem11); ui->tableWidget->setItem(nrs-1,11,newItem11);
ui->tableWidget->setItem(nrs-1,12,newItem12); ui->tableWidget->setItem(nrs-1,12,newItem12);
ui->tableWidget->setItem(nrs-1,13,newItem13);
ui->tableWidget->setSortingEnabled(true); ui->tableWidget->setSortingEnabled(true);
nrs++; nrs++;
...@@ -471,6 +472,7 @@ void MainWindow::on_pushButton_clicked() ...@@ -471,6 +472,7 @@ void MainWindow::on_pushButton_clicked()
void MainWindow::completerSetData() { void MainWindow::completerSetData() {
// set data for callCompleter // set data for callCompleter
// FIXME Import this data from YAML/JSON file -- even SQLITE would be better. ;-)
*excList << "DX"; *excList << "DX";
*excList << "A" << "A-F" << "AM"<< "AMP"<< "B"<< "BA"<< "BEL"<< "BH-A"<< "BH-N"<< "BIB"<< "C"<< "E"<< "E-N" *excList << "A" << "A-F" << "AM"<< "AMP"<< "B"<< "BA"<< "BEL"<< "BH-A"<< "BH-N"<< "BIB"<< "C"<< "E"<< "E-N"
...@@ -555,10 +557,10 @@ void MainWindow::on_tableWidget_cellChanged(int row, int column) ...@@ -555,10 +557,10 @@ void MainWindow::on_tableWidget_cellChanged(int row, int column)
QString band = cell1->text(); QString band = cell1->text();
QTableWidgetItem *cell8 = tb->item(i, column); QTableWidgetItem *cell8 = tb->item(i, column);
QString call = cell8->text(); QString call = cell8->text();
QTableWidgetItem *cell13 = tb->item(i, 13); QTableWidgetItem *cell12 = tb->item(i, 12);
bool deleted = false; bool deleted = false;
if(cell13) if(cell12)
deleted = tb->item(i, 13)->checkState(); deleted = tb->item(i, 12)->checkState();
if(!deleted && call != "" && band == "144" && !workedVhf->contains(call)) if(!deleted && call != "" && band == "144" && !workedVhf->contains(call))
*workedVhf << call; *workedVhf << call;
...@@ -590,10 +592,10 @@ void MainWindow::on_tableWidget_cellChanged(int row, int column) ...@@ -590,10 +592,10 @@ void MainWindow::on_tableWidget_cellChanged(int row, int column)
QString band = cell1->text(); QString band = cell1->text();
QTableWidgetItem *cell10 = tb->item(i, column); QTableWidgetItem *cell10 = tb->item(i, column);
QString exc = cell10->text(); QString exc = cell10->text();
QTableWidgetItem *cell13 = tb->item(i, 13); QTableWidgetItem *cell12 = tb->item(i, 12);
bool deleted = false; bool deleted = false;
if(cell13) if(cell12)
deleted = tb->item(i, 13)->checkState(); deleted = tb->item(i, 12)->checkState();
if(!deleted && exc != "" && band == "144" && !multVhf->contains(exc)) if(!deleted && exc != "" && band == "144" && !multVhf->contains(exc))
*multVhf << exc; *multVhf << exc;
...@@ -604,7 +606,7 @@ void MainWindow::on_tableWidget_cellChanged(int row, int column) ...@@ -604,7 +606,7 @@ void MainWindow::on_tableWidget_cellChanged(int row, int column)
} }
// mark X-QSO lines as deleted // mark X-QSO lines as deleted
if(column == 13) { if(column == 12) {
for (int i = 0; i < tb->columnCount()-1; ++i) { for (int i = 0; i < tb->columnCount()-1; ++i) {
......
...@@ -28,7 +28,7 @@ private slots: ...@@ -28,7 +28,7 @@ private slots:
void updateTime(); void updateTime();
void completerSetData(); void completerSetData();
void on_lineEdit_call_returnPressed(); void on_lineEdit_call_returnPressed();
void on_lineEdit_nrr_returnPressed(); //void on_lineEdit_nrr_returnPressed();
void on_lineEdit_exc_returnPressed(); void on_lineEdit_exc_returnPressed();
void on_pushButton_clicked(); void on_pushButton_clicked();
void saveLogfile(); void saveLogfile();
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>800</width> <width>1001</width>
<height>600</height> <height>600</height>
</rect> </rect>
</property> </property>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</attribute> </attribute>
<column> <column>
<property name="text"> <property name="text">
<string>No-S</string> <string>No</string>
</property> </property>
</column> </column>
<column> <column>
...@@ -84,11 +84,6 @@ ...@@ -84,11 +84,6 @@
<string>Exch-R</string> <string>Exch-R</string>
</property> </property>
</column> </column>
<column>
<property name="text">
<string>No-R</string>
</property>
</column>
<column> <column>
<property name="text"> <property name="text">
<string>T</string> <string>T</string>
...@@ -324,8 +319,8 @@ ...@@ -324,8 +319,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>800</width> <width>1001</width>
<height>19</height> <height>31</height>
</rect> </rect>
</property> </property>
</widget> </widget>
...@@ -341,13 +336,13 @@ ...@@ -341,13 +336,13 @@
<widget class="QDockWidget" name="dockWidget_7"> <widget class="QDockWidget" name="dockWidget_7">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>700</width> <width>800</width>
<height>150</height> <height>150</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>700</width> <width>800</width>
<height>150</height> <height>150</height>
</size> </size>
</property> </property>
...@@ -410,7 +405,7 @@ ...@@ -410,7 +405,7 @@
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>No-S </string> <string>No</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
...@@ -426,8 +421,11 @@ ...@@ -426,8 +421,11 @@
</item> </item>
<item row="2" column="2"> <item row="2" column="2">
<widget class="QLabel" name="label_5"> <widget class="QLabel" name="label_5">
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 127);</string>
</property>
<property name="text"> <property name="text">
<string>Band</string> <string>Band (!)</string>
</property> </property>
</widget> </widget>
</item> </item>
...@@ -452,13 +450,6 @@ ...@@ -452,13 +450,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="7">
<widget class="QLabel" name="label_11">
<property name="text">
<string>No-R</string>
</property>
</widget>
</item>
<item row="3" column="0"> <item row="3" column="0">
<widget class="QLabel" name="label_nrs"> <widget class="QLabel" name="label_nrs">
<property name="sizePolicy"> <property name="sizePolicy">
...@@ -605,35 +596,7 @@ ...@@ -605,35 +596,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="7"> <item row="3" column="8">
<widget class="QLineEdit" name="lineEdit_nrr">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="9">
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_4">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
...@@ -687,6 +650,12 @@ ...@@ -687,6 +650,12 @@
</widget> </widget>
</widget> </widget>
<widget class="QDockWidget" name="dockWidget"> <widget class="QDockWidget" name="dockWidget">
<property name="minimumSize">
<size>
<width>200</width>
<height>52</height>
</size>
</property>
<attribute name="dockWidgetArea"> <attribute name="dockWidgetArea">
<number>4</number> <number>4</number>
</attribute> </attribute>
...@@ -697,7 +666,6 @@ ...@@ -697,7 +666,6 @@
<tabstops> <tabstops>
<tabstop>lineEdit_call</tabstop> <tabstop>lineEdit_call</tabstop>
<tabstop>lineEdit_exc</tabstop> <tabstop>lineEdit_exc</tabstop>
<tabstop>lineEdit_nrr</tabstop>
</tabstops> </tabstops>
<resources/> <resources/>
<connections/> <connections/>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment