qviaggiatreno-2013.7.3/0000775000175000017500000000000012215772725014601 5ustar locutuslocutusqviaggiatreno-2013.7.3/qviaggiatreno.pro0000664000175000017500000000012212215773056020154 0ustar locutuslocutusSUBDIRS += src TEMPLATE = subdirs CONFIG += ordered warn_on qt debug_and_release qviaggiatreno-2013.7.3/qviaggiatreno.desktop0000664000175000017500000000036412215773056021035 0ustar locutuslocutus[Desktop Entry] Name=QViaggiaTreno Comment=Interfaccia grafica per ViaggiaTreno Exec=qviaggiatreno Terminal=false Type=Application GenericName=Informazioni in tempo reale sulla circolazione ferroviaria Categories=Qt;Network; StartupNotify=true qviaggiatreno-2013.7.3/src/0000775000175000017500000000000012215773217015365 5ustar locutuslocutusqviaggiatreno-2013.7.3/src/application.qrc0000664000175000017500000000145412215773217020403 0ustar locutuslocutus doc/GPL-2.txt img/avvia.png img/chiudi.png img/interrompi.png traduzioni/qt_it.qm img/stazione.png img/listatreni.png img/treno.png img/aggiungi.png img/rimuovi.png img/cancella-tutti.png img/apri.png img/salva.png img/salva-come.png img/cronometro.png img/configura.png img/aggiorna.png img/stampa.png img/esporta.png img/trenord.png qviaggiatreno-2013.7.3/src/download_viaggiatreno.h0000664000175000017500000001365212215773056022114 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2010-2011 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef DOWNLOAD_VIAGGIATRENO_H #define DOWNLOAD_VIAGGIATRENO_H #include class QViaggiaTreno; class DownloadViaggiaTreno; class DownloadViaggiaTrenoItem; class SchedaQViaggiaTreno; //questa classe è la classe in cui viene centralizzato il download delle schede //da viaggiatreno class DownloadViaggiaTreno : public QObject { Q_OBJECT public: DownloadViaggiaTreno(QViaggiaTreno* qvt, QNetworkAccessManager* nam); signals: void statoViaggiaTreno(bool); public slots: //mette in coda la richiesta di scaricare da Viaggiatreno la scheda di una stazione, fornendo il nome della stazione void downloadStazione(quint32 idScheda, const QString& nomeStazione); //mette in coda la richiesta di scaricare da ViaggiaTreno la scheda di una stazione, fornendone il codice void downloadStazioneCodice(quint32 idScheda, const QString& codiceStazione); //mette in coda la richiesta di scaricare da ViaggiaTreno la scheda di riepilogo di un treno, fornendone il numero void downloadRiepilogoTreno(quint32 idScheda, const QString& numero); //mette in coda la richiesta di scaricare da ViaggiaTreno la scheda di riepilogo di un treno, fornendo il numero //e il codice della stazione di origine void downloadRiepilogoTreno(quint32 idScheda, const QString &numero, const QString& codiceStazOrigine); //mette in coda la richiesta di scaricare da ViaggiaTreno la scheda con i dettagli di un treno, fornendone il numero void downloadDettagliTreno(quint32 idScheda, const QString& numero); //mette in coda la richiesta di scaricare da ViaggiaTreno la scheda con i dettagli di un treno //fornendo il numero e il codice della stazione di origine void downloadDettagliTreno(quint32 idScheda, const QString &numero, const QString& codiceStazOrigine); //avvia il download void avvia(); private: //corregge alcuni errori nel codice XHTML generato da viaggiatreno che ne impediscono //il corretto parsing da parte della classe QDom QString correggiOutputVT(QString testoVT); void richiestaHTTPStazioneConNome(DownloadViaggiaTrenoItem *item); void richiestaHTTPStazioneConCodice(DownloadViaggiaTrenoItem *item); void richiestaHTTPRiepilogoTreno(DownloadViaggiaTrenoItem* item); void richiestaHTTPRiepilogoTrenoConOrigine(DownloadViaggiaTrenoItem *item); void richiestaHTTPDettagliTreno(DownloadViaggiaTrenoItem *item); void richiestaHTTPDettagliTrenoConOrigine(DownloadViaggiaTrenoItem * item); private slots: void download(); void downloadEffettuato(); bool controllaViaggiaTreno(); private: QViaggiaTreno* m_qvt; QNetworkAccessManager* m_nam; //intervallo tra due download successivi dal server di viaggiatreno int m_intervalloDownload; //intervallo di aggiornamento delle cache int m_intervalloAggiornamentoCache; //tempo in cui una scheda rimane in cache int m_tempoCache; QQueue m_codaDownload; QTimer *m_timerDownload, *m_timerControlloVT; //costanti //valore di default dell'intervallo di download (in ms) static const int s_intervalloDownload; //valore di default dell'intervallo di aggiornamento della cache (in ms) static const int s_intervalloAggiornamentoCache; //valore di default del tempo di permanenza in cache (in s) static const int s_tempoCache; //valore di default dell'intervallo di controllo del corretto funzionamento di Viaggiatreno (in m) static const int s_itervalloCheckViaggiaTreno; }; //l'enum elenca i tipi diversi di dati possibili scaricabili da viaggiatreno enum TipoSchedaViaggiaTreno {StazioneConNome, StazioneConCodice, RiepilogoTreno, RiepilogoTrenoConOrigine, DettagliTreno, DettagliTrenoConOrigine}; //questa classe memorizza i dati di ogni singolo download class DownloadViaggiaTrenoItem : public QObject { Q_OBJECT public: DownloadViaggiaTrenoItem(quint32 idScheda, TipoSchedaViaggiaTreno tipoScheda); //restituisce il tipo di scheda TipoSchedaViaggiaTreno tipoScheda() const {return m_tipoSchedaVT;} //restituisce data e ora della richiesta di download QDateTime dataEOra() const {return m_dataEOra;} //restituisce puntatore alla scheda che ha effettuato la richiesta di download quint32 idScheda() const {return m_scheda;} //restituisce uno dei dati impostati QString dato(const QString& nome) const {return m_dati[nome];} //imposta un dato void impostaDato(const QString& nome, const QString& valore) { m_dati[nome] = valore; } private: quint32 m_scheda; TipoSchedaViaggiaTreno m_tipoSchedaVT; QMap m_dati; QDateTime m_dataEOra; }; #endif // DOWNLOAD_VIAGGIATRENO_H qviaggiatreno-2013.7.3/src/schedaavvisitrenord.cpp0000664000175000017500000000570512215771022022137 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2008-2012 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "download_trenord.h" #include "schedaavvisitrenord.h" #include "qviaggiatreno.h" #include "parser_trenord.h" SchedaAvvisiTrenord::SchedaAvvisiTrenord(QViaggiaTreno *parent, const unsigned int intervalloStandard) : SchedaQViaggiaTreno(parent, tsAvvisiTrenord, intervalloStandard) { m_stato = statoNuovaScheda; //crea il widget con le tabelle contenti gli avvisi m_parser = new ParserTrenord(this); m_avvisi = new ModelloAvvisiTrenord(this); m_widgetAvvisi = new WidgetAvvisiTrenord(this, m_avvisi); addWidget(m_widgetAvvisi); //connessioni connect(this, SIGNAL(statoCambiato(quint32)), parent, SLOT(aggiornaStatoScheda(quint32))); //TODO: una volta terminato codice scheda verificare se questa connessione sia realmente necessaria connect(this, SIGNAL(messaggioStatus(const QString&)), parent, SLOT(mostraMessaggioStatusBar(const QString&))); connect(this, SIGNAL(aggiornaListaDirettrici()), qViaggiaTreno()->downloadTrenord(), SLOT(aggiornaListaDirettrici())); } SchedaAvvisiTrenord::~SchedaAvvisiTrenord() { if (m_parser) delete m_parser; if (m_avvisi) delete m_avvisi; } void SchedaAvvisiTrenord::avvia() { SchedaQViaggiaTreno::avvia(); } void SchedaAvvisiTrenord::ferma() { SchedaQViaggiaTreno::ferma(); } void SchedaAvvisiTrenord::aggiorna() { cambiaStato(statoInAggiornamento); emit aggiornaListaDirettrici(); } void SchedaAvvisiTrenord::downloadFinito(const QString &rispostaTN) { if (m_parser->analizzaListaDirettrici(rispostaTN)) qViaggiaTreno()->downloadTrenord()->scaricaAvvisi(m_parser); } qviaggiatreno-2013.7.3/src/dialogo_configurazione.cpp0000664000175000017500000002216712215773056022622 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2010-2011 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "dialogo_configurazione.h" #include "qviaggiatreno.h" DialogoConfigurazione::DialogoConfigurazione(QViaggiaTreno* qvt) : QDialog(qvt) { m_qvt = qvt; setupUi(this); connect(buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(pulsantePremuto(QAbstractButton*))); connect(checkBoxUsareProxy, SIGNAL(clicked(bool)), this, SLOT(checkBoxUsareProxyCliccato(bool))); connect(checkBoxAutenticazione, SIGNAL(clicked(bool)), this, SLOT(checkBoxAutenticazioneCliccato(bool))); connect(checkBoxUsareProxySistema, SIGNAL(clicked(bool)), this, SLOT(checkBoxUsareProxySistemaCliccato(bool))); } //questo metodo legge i valori di configurazione ed imposta i corrispondenti controlli //nella finestra di dialogo void DialogoConfigurazione::impostaConfigurazione() { //scheda ViaggiaTreno spinBoxControlloVT->setValue(m_qvt->configurazione().intervalloControlloVT()); spinBoxTimeoutControlloVT->setValue(m_qvt->configurazione().timeoutControlloVT()); doubleSpinBoxQueryVT->setValue(m_qvt->configurazione().intervalloQueryVT()); //scheda Proxy lineEditHost->setText(m_qvt->configurazione().hostProxy()); spinBoxPorta->setValue(m_qvt->configurazione().portaProxy()); lineEditNomeUtente->setText(m_qvt->configurazione().nomeUtenteProxy()); lineEditPassword->setText(m_qvt->configurazione().passwordProxy()); checkBoxUsareProxy->setChecked(m_qvt->configurazione().proxyUtilizzato()); checkBoxAutenticazione->setChecked(m_qvt->configurazione().proxyRichiedeAutenticazione()); checkBoxUsareProxySistema->setChecked(m_qvt->configurazione().proxyDiSistemaUtilizzato()); // simula la selezione delle due checkbox nella scheda Proxy checkBoxUsareProxySistemaCliccato(m_qvt->configurazione().proxyDiSistemaUtilizzato()); checkBoxUsareProxyCliccato(m_qvt->configurazione().proxyUtilizzato()); checkBoxAutenticazioneCliccato(m_qvt->configurazione().proxyRichiedeAutenticazione()); } //questo metodo, richiamato se il dialogo è stato chiuso premendo il pulsante Ok imposta i //parametri di configurazione leggendo i valodi dei controli della finestra di dialogo void DialogoConfigurazione::applicaConfigurazione() { //scheda ViaggiaTreno m_qvt->configurazione().impostaIntervalloControlloVT(spinBoxControlloVT->value()); m_qvt->configurazione().impostaTimeoutControllVT(spinBoxTimeoutControlloVT->value()); m_qvt->configurazione().impostaIntervalloQueryVT(doubleSpinBoxQueryVT->value()); //scheda proxy m_qvt->configurazione().impostaUtilizzoProxy(checkBoxUsareProxy->isChecked()); m_qvt->configurazione().impostaRichiestaAutenticazioneProxy(checkBoxAutenticazione->isChecked()); m_qvt->configurazione().impostaHostProxy(lineEditHost->text()); m_qvt->configurazione().impostaPortaProxy(spinBoxPorta->value()); m_qvt->configurazione().impostaNomeUtenteProxy(lineEditNomeUtente->text()); m_qvt->configurazione().impostaPasswordProxy(lineEditPassword->text()); m_qvt->configurazione().impostaUtilizzoProxyDiSistema(checkBoxUsareProxySistema->isChecked()); } void DialogoConfigurazione::pulsantePremuto(QAbstractButton *pulsante) { //controlla che sia stato premuto il pulsante per reimpostare i valori predefiniti //a questo scopo è sufficiente controllare il corrispondente ButtonRole if (buttonBox->buttonRole(pulsante) == QDialogButtonBox::ResetRole) ripristinaValoriPredefiniti(); } //ripristina i valori predefiniti leggendoli dalla coppia privata della classe che memorizza la configurazione void DialogoConfigurazione::ripristinaValoriPredefiniti() { //scheda ViaggiaTreno spinBoxControlloVT->setValue(m_qvt->configurazione().intervalloControlloVTDefault()); spinBoxTimeoutControlloVT->setValue(m_qvt->configurazione().timeoutControlloVTDefault()); doubleSpinBoxQueryVT->setValue(m_qvt->configurazione().intervalloQueryVTDefault()); //scheda Proxy lineEditHost->setText(m_qvt->configurazione().hostProxyDefault()); spinBoxPorta->setValue(m_qvt->configurazione().portaProxyDefault()); lineEditNomeUtente->setText(m_qvt->configurazione().nomeUtenteProxyDefault()); lineEditPassword->setText(m_qvt->configurazione().passwordProxyDefault()); checkBoxUsareProxy->setChecked(m_qvt->configurazione().proxyUtilizzatoDefault()); checkBoxAutenticazione->setChecked(m_qvt->configurazione().proxyRichiedeAutenticazioneDefault()); checkBoxUsareProxySistema->setChecked(m_qvt->configurazione().proxyDiSistemaUtilizzatoDefault()); // simula la selezione delle due checkbox nella scheda Proxy checkBoxAutenticazioneCliccato(m_qvt->configurazione().proxyRichiedeAutenticazioneDefault()); checkBoxUsareProxyCliccato(m_qvt->configurazione().proxyUtilizzatoDefault()); } //abilita/disabilita i controlli a seconda dello stato del check box checkBoxUsareProxy void DialogoConfigurazione::checkBoxUsareProxyCliccato(bool selezionato) { if (selezionato) { checkBoxUsareProxySistema->setEnabled(true); if (!checkBoxUsareProxySistema->isChecked()) { lineEditHost->setEnabled(true); spinBoxPorta->setEnabled(true); labelHost->setEnabled(true); labelPorta->setEnabled(true); checkBoxAutenticazione->setEnabled(true); checkBoxAutenticazioneCliccato(checkBoxAutenticazione->isChecked()); } } else //disattiva tutto { checkBoxUsareProxySistema->setDisabled(true); lineEditHost->setDisabled(true); spinBoxPorta->setDisabled(true); checkBoxAutenticazione->setDisabled(true); lineEditNomeUtente->setDisabled(true); lineEditPassword->setDisabled(true); labelHost->setDisabled(true); labelPorta->setDisabled(true); labelNomeUtente->setDisabled(true); labelPassword->setDisabled(true); } } //abilita/disabilita i controlli a seconda dello stato del check box checkBoxAutenticazione void DialogoConfigurazione::checkBoxAutenticazioneCliccato(bool selezionato) { if (selezionato) { lineEditNomeUtente->setEnabled(true); lineEditPassword->setEnabled(true); labelNomeUtente->setEnabled(true); labelPassword->setEnabled(true); } else { lineEditNomeUtente->setDisabled(true); lineEditPassword->setDisabled(true); labelNomeUtente->setDisabled(true); labelPassword->setDisabled(true); } } //abilita/disabilita i controlli a seconda dello stato del check box checkBoxUsareProxySistema void DialogoConfigurazione::checkBoxUsareProxySistemaCliccato(bool selezionato) { //il checkbox è stato selezionato, disattivare tutti i controlli per la configurazione //manuale del proxy if (selezionato) { lineEditHost->setDisabled(true); spinBoxPorta->setDisabled(true); checkBoxAutenticazione->setDisabled(true); lineEditNomeUtente->setDisabled(true); lineEditPassword->setDisabled(true); labelHost->setDisabled(true); labelPorta->setDisabled(true); labelNomeUtente->setDisabled(true); labelPassword->setDisabled(true); } else //il checkBox non è stato selezionato, attivare i controlli { lineEditHost->setEnabled(true); spinBoxPorta->setEnabled(true); labelHost->setEnabled(true); labelPorta->setEnabled(true); checkBoxAutenticazione->setEnabled(true); //abilita i controlli per l'autenticazione solo se il checkbox corrispondente è selezionato if (checkBoxAutenticazione->isChecked()) { labelNomeUtente->setEnabled(true); labelPassword->setEnabled(true); lineEditNomeUtente->setEnabled(true); lineEditPassword->setEnabled(true); } } } qviaggiatreno-2013.7.3/src/schedalistatreni_widget.cpp0000664000175000017500000003666312215773217023000 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2009-2011 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "schedalistatreni.h" #include "items.h" WidgetListaTreni::WidgetListaTreni(SchedaListaTreni* parent): QWidget(parent) { //imposta il layout del widget; QVBoxLayout * layout = new QVBoxLayout; setLayout(layout); //costruisce l'etichetta per il titolo m_labelTitolo = new QLabel(this); //l'etichetta sarà centrata m_labelTitolo->setAlignment(Qt::AlignCenter); //imposta font con dimensioni del 50% maggiori di quella standard e in grassetto QFont font = m_labelTitolo->font(); font.setBold(true); font.setPointSize(font.pointSize()*1.5); m_labelTitolo->setFont(font); //aggiunge l'etichetta al layout layout->addWidget(m_labelTitolo, 0); //costruisce l'etichetta con ora/data di aggiornamento m_labelAggiornamento = new QLabel(this); //l'etichetta sarà centrata m_labelAggiornamento->setAlignment(Qt::AlignCenter); layout->addWidget(m_labelAggiornamento, 0); m_tabella = new TabellaLista(this); //imposta le colonne della tabella QStringList righe; righe<setRowCount(righe.count()); m_tabella->setVerticalHeaderLabels(righe); layout->addWidget(m_tabella, 1 ); //connessioni // connect(m_tabella, SIGNAL(cellEntered(int, int)), this, SLOT(ingressoCella(int, int))); //connect(m_tabella, SIGNAL(itemActivated(QTableWidgetItem *)), this, SLOT(itemAttivato(QTableWidgetItem*))); connect(m_tabella, SIGNAL(itemClicked(QTableWidgetItem *)), this, SLOT(itemAttivato(QTableWidgetItem*))); connect(this, SIGNAL(apriSchedaStazione(const QString&, bool)), parent, SIGNAL(apriSchedaStazione(const QString&, bool))); connect(this, SIGNAL(apriSchedaTreno(const QString&)), parent, SIGNAL(apriSchedaTreno(const QString&))); } void WidgetListaTreni::itemAttivato(QTableWidgetItem* item) { int riga = item->row(); if (riga == ListaVT::rigaNumero) if (item->text() != "") emit(apriSchedaTreno(item->text())); if ((riga == ListaVT::rigaOrigine) || (riga == ListaVT::rigaDestinazione) || (riga == ListaVT::rigaUltimaFermata)) if (item->text() != "") emit(apriSchedaStazione(ParserViaggiaTrenoBase::sostituisciNomeStazione(item->text()), true)); } //aggiunge un treno al widget void WidgetListaTreni::aggiungiTreno(ListaVT::DatiTreno *treno) { int col; for (col = 0; col < m_tabella->columnCount(); col++) { QTableWidgetItem *item = m_tabella->item(ListaVT::rigaNumero, col); if (!item) break; else if (treno->numero().toInt() < item->text().toInt()) break; } //aggiungi una nuova riga in fondo alla tabella m_tabella->insertColumn(col); //imposta le celle impostaCella(ListaVT::rigaNumero, col, treno->numero()); impostaCella(ListaVT::rigaStato, col, treno->stringaStatoTreno()); } //rimuove un treno dal widget void WidgetListaTreni::rimuoviTreno(const QString& treno) { for (int col = 0; col < m_tabella->columnCount(); col++) { QTableWidgetItem *item = m_tabella->item(ListaVT::rigaNumero, col); if (item) if (item->text() == treno) { m_tabella->removeColumn(col); return; } } } //imposta il testo della cella impostando contemporaneamente ogni eventuale formattazione necessaria void WidgetListaTreni::impostaCella(int riga, int colonna, const QString& testo) { QTableWidgetItem *item = new QTableWidgetItem; item->setText(testo.simplified()); QFont font = item->font(); //sottolinea il testo nelle colonne in cui è necessario ed usa il colore dei link if (riga == ListaVT::rigaNumero || riga == ListaVT::rigaOrigine || riga == ListaVT::rigaDestinazione || riga == ListaVT::rigaUltimaFermata) { font.setUnderline(true); item->setForeground(QApplication::palette().link()); } item->setFont(font); m_tabella->setItem(riga, colonna, item); } int WidgetListaTreni::larghezzaItem(const QTableWidgetItem* item) { if (!item) return -1; QFontMetrics fm(item->font()); int larghezza = fm.width(item->text()); return larghezza; } //aggiusta la dimensione delle colonne della tabella in modo che il contenuto delle celle sia visibile //non usa resizeColumnsToContents perché funziona solo sulla parte visibile delle colonne void WidgetListaTreni::ridimensionaColonne() { int larghezza; //calcola la larghezza massima for (int col = 0; col <= m_tabella->columnCount(); col++) { larghezza = m_tabella->horizontalHeader()->sectionSizeHint(col); for (int riga = 0; riga < m_tabella->rowCount(); riga++) larghezza = qMax(larghezza, larghezzaItem(m_tabella->item(riga, col))); m_tabella->setColumnWidth(col, larghezza+10); } } void WidgetListaTreni::impostaTitolo(const QString& titolo) { m_labelTitolo->setText(titolo); } void WidgetListaTreni::aggiornaTreno(const ListaVT::DatiTreno* treno) { int colonna = -1; //ricerca la riga relativa al treno da aggiornare for (int i=0; icolumnCount();i++) { QTableWidgetItem* item = m_tabella->item(ListaVT::rigaNumero, i); if (!(item->text().compare(treno->numero()))) colonna = i; } //aggiorna tutte le colonne (tranne quella del numero) impostaCella(ListaVT::rigaCategoria, colonna, treno->dato(ListaVT::dtCategoria)); impostaCella(ListaVT::rigaStato, colonna, treno->stringaStatoTreno()); impostaCella(ListaVT::rigaOrigine, colonna, treno->dato(ListaVT::dtOrigine)); impostaCella(ListaVT::rigaPartenzaProgrammata, colonna, treno->dato(ListaVT::dtPartenzaProgrammata)); impostaCella(ListaVT::rigaPartenzaEffettiva, colonna, treno->dato(ListaVT::dtPartenzaEffettiva)); impostaCella(ListaVT::rigaDestinazione, colonna, treno->dato(ListaVT::dtDestinazione)); impostaCella(ListaVT::rigaArrivoProgrammato, colonna, treno->dato(ListaVT::dtArrivoProgrammato)); impostaCella(ListaVT::rigaArrivoEffettivo, colonna, treno->dato(ListaVT::dtArrivoEffettivo)); impostaCella(ListaVT::rigaUltimaFermata, colonna, treno->dato(ListaVT::dtUltimaFermata)); impostaCella(ListaVT::rigaOrarioFermataProgrammato, colonna, treno->dato(ListaVT::dtOrarioFermataProgrammato)); impostaCella(ListaVT::rigaOrarioFermataEffettivo, colonna, treno->dato(ListaVT::dtOrarioFermataEffettivo)); impostaCella(ListaVT::rigaUltimoRilevamento, colonna, treno->dato(ListaVT::dtUltimoRilevamento)); impostaCella(ListaVT::rigaOrarioTransito, colonna, treno->dato(ListaVT::dtOrarioTransito)); impostaCella(ListaVT::rigaRitardoTransito, colonna, treno->dato(ListaVT::dtRitardoTransito)); ridimensionaColonne(); } //imposta l'etichetta con ora e data del completamento dell'ultimo treno void WidgetListaTreni::impostaAggiornamento(const QString& testo, bool errore) { //se errore è true allora il parsing non è andato a buon fine, imposta il messaggio in rosso //e grassetto per evidenziarlo if (errore) m_labelAggiornamento->setText(QString("%1").arg(testo)); else m_labelAggiornamento->setText(testo); } //Questo dialogo viene visualizzato quando si è scelto da menu o toolbar la voce per //aggiungere uno o più treni alla lista dei treni da monitorare DialogoAggiuntaTreni::DialogoAggiuntaTreni(QWidget *parent) : QDialog(parent) { //imposta il titolo setWindowTitle(QString::fromUtf8("Aggiunta treni alla lista")); //layout principale del dialogo QVBoxLayout *layout = new QVBoxLayout; setLayout(layout); //layout orizzontale QHBoxLayout *hlayout = new QHBoxLayout; layout->addLayout(hlayout, 0); //casella di testo per l'inserimento del numero del treno QLabel *labelLineEdit = new QLabel(QString::fromUtf8("Numero treno:"), this); hlayout->addWidget(labelLineEdit, 0); m_lineedit = new QLineEdit(this); //la casella accetta solo numeri interi tra 1 e 99999 QIntValidator *validator = new QIntValidator(1, 99999, this); m_lineedit->setValidator(validator); QPushButton *aggiungi = new QPushButton(QString::fromUtf8("Aggiungi treno"), this); aggiungi->setDefault(true); hlayout->addWidget(m_lineedit, 1); hlayout->addWidget(aggiungi, 0); QLabel *labelListWidget = new QLabel(QString::fromUtf8("Elenco treni da aggiungere:")); layout->addWidget(labelListWidget, 0); m_listwidget = new QListWidget(this); layout->addWidget(m_listwidget, 1); QDialogButtonBox *buttonBox = new QDialogButtonBox(Qt::Horizontal, this); buttonBox->addButton(QString::fromUtf8("&Aggiungi treni"), QDialogButtonBox::AcceptRole); buttonBox->addButton(QDialogButtonBox::Cancel); qobject_cast(buttonBox->buttons().at(0))->setAutoDefault(true); layout->addWidget(buttonBox, 0); //abilita l'ordinamento m_listwidget->setSortingEnabled(true); //connessioni connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); connect(aggiungi, SIGNAL(clicked()), this, SLOT(aggiungiTreno())); } //elimina tutti i treni dalla tabella void WidgetListaTreni::rimuoviTuttiITreni() { m_tabella->clearContents(); m_tabella->setColumnCount(0); } //slot void DialogoAggiuntaTreni::aggiungiTreno() { //richiesto da QIntValidator ma non utilizzato int pos; QString treno = m_lineedit->text(); if (m_lineedit->validator()->validate(treno, pos) == QValidator::Acceptable) { //verifica che il numero non sia già nell'elenco dei numeri da aggiungere for (int i = 0; i < m_listwidget->count(); i++) {// i numeri sono uguali, esci dalla funzione senza far niente if (treno.compare(m_listwidget->item(i)->text()) == 0) return; } SortedAsIntListWidgetItem * item = new SortedAsIntListWidgetItem(treno); m_listwidget->addItem(item); m_lineedit->clear(); } m_listwidget->sortItems(); } //restituisce una lista di stringa contentente tutti i numeri dei treni //di cui è stata richiesta l'aggiunta QStringList DialogoAggiuntaTreni::listaTreni() const { QStringList lista; for (int i = 0; i < m_listwidget->count(); i++ ) lista.append(m_listwidget->item(i)->text()); return lista; } //restituisce true se non ci sono treni da aggiungere, false in caso contrario bool DialogoAggiuntaTreni::listaVuota() const { return (m_listwidget->count() == 0); } //Questo dialogo viene visualizzato quando si è scelto da menu o toolbar la voce per //rimuovere uno o più treni dalla lista dei treni da monitorare DialogoRimozioneTreni::DialogoRimozioneTreni(const QStringList& lista, QWidget * parent) : QDialog(parent) { setWindowTitle(QString::fromUtf8("Rimozione treni dalla lista")); //layout principale del dialogo QVBoxLayout *layout = new QVBoxLayout; setLayout(layout); QLabel *labelLista = new QLabel(QString::fromUtf8("Elenco treni:")); layout->addWidget(labelLista, 0); m_listwidget = new QListWidget(this); layout->addWidget(m_listwidget, 1); m_listwidget->setSelectionMode(QAbstractItemView::ExtendedSelection); m_listwidget->setSortingEnabled(true); m_buttonBox = new QDialogButtonBox(Qt::Horizontal, this); m_buttonBox->addButton(QString::fromUtf8("&Rimuovi treni"), QDialogButtonBox::AcceptRole); m_buttonBox->addButton(QDialogButtonBox::Cancel); layout->addWidget(m_buttonBox, 0); //riempie il listwidget QStringListIterator it(lista); while (it.hasNext()) m_listwidget->addItem(new SortedAsIntListWidgetItem(it.next())); //disabilita il pulsante "rimuovi treni" m_buttonBox->buttons().at(0)->setEnabled(false); //connessioni connect(m_buttonBox, SIGNAL(accepted()), this, SLOT(accept())); connect(m_buttonBox, SIGNAL(rejected()), this, SLOT(reject())); connect(m_listwidget, SIGNAL(itemSelectionChanged()), this, SLOT(selezioneModificata())); } //slot //questo slot attiva il pulsante "rimuovi treni" solo nel caso che ci sia almeno //un item selezionato nel listwidget, altrimenti lo disattiva void DialogoRimozioneTreni::selezioneModificata() { m_buttonBox->buttons().at(0)->setEnabled(m_listwidget->selectedItems().count()); } //restituisce la lista dei treni attualmente selezionati per la rimozione QStringList DialogoRimozioneTreni::listaTreni() const { QStringList lista; QListIterator it(m_listwidget->selectedItems()); while (it.hasNext()) { lista.append(it.next()->text()); } return lista; } TabellaLista::TabellaLista(QWidget *parent) : QTableWidget(parent) { //imposta le caratteristiche della tabella //righe a colori alternati setAlternatingRowColors(true); //disattiva selezione setSelectionMode(QAbstractItemView::NoSelection); //disattiva modifiche delle celle setEditTriggers(QAbstractItemView::NoEditTriggers); //attiva il tracking del mouse setMouseTracking(true); verticalHeader()->setMouseTracking(true); horizontalHeader()->setVisible(false); } void TabellaLista::mouseMoveEvent(QMouseEvent *event) { //cambia cursore solo se c'è almeno un treno in lista if (columnCount() != 0) { int riga = rowAt(event->y()); if (riga == ListaVT::rigaNumero || riga == ListaVT::rigaOrigine || riga == ListaVT::rigaDestinazione || riga == ListaVT::rigaUltimaFermata ) setCursor(Qt::PointingHandCursor); else setCursor(Qt::ArrowCursor); } event->accept(); } qviaggiatreno-2013.7.3/src/qviaggiatreno.cpp0000664000175000017500000005457412215773217020750 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2008-2011 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include #include "schedastazione.h" #include "schedalistatreni.h" #include "qviaggiatreno.h" #include "download_viaggiatreno.h" #include "download_trenord.h" #include "qledindicator.h" //numero versione QString QViaggiaTreno::s_versione = QString("2013.7"); QViaggiaTreno::QViaggiaTreno() { m_licenseDialog = 0L; m_nam = new QNetworkAccessManager(this); //crea una istanza delle varie classi per il download m_downloadViaggiaTreno = new DownloadViaggiaTreno(this, m_nam); m_downloadTrenord = new DownloadTrenord(this, m_nam); creaAzioni(); creaMenu(); creaToolBar(); creaStatusBar(); creaWidgetCentrale(); setWindowTitle(QString::fromUtf8("QViaggiaTreno")); leggiImpostazioniFinestra(); impostaProxy(); //avvia le varie classi per il download //per il momento esiste solo la classe per il download da viaggiatreno in futuro è conveniente //incapsulare l'avvio in un metodo connect(m_downloadViaggiaTreno, SIGNAL(statoViaggiaTreno(bool)), this, SLOT(statoViaggiaTrenoCambiato(bool))); m_downloadViaggiaTreno->avvia(); ripristinaSchede(); } void QViaggiaTreno::creaAzioni() { m_exitAct = new QAction(QString::fromUtf8("E&sci"), this); m_exitAct->setShortcut(QString("Ctrl+Q")); m_exitAct->setStatusTip(QString::fromUtf8("Chiude l'applicazione")); connect(m_exitAct, SIGNAL(triggered()), this, SLOT(close())); m_licenseAct = new QAction(QString::fromUtf8("Licen&za"), this); m_licenseAct->setStatusTip(QString::fromUtf8("Mostra la licenza di QViaggiaTreno")); connect(m_licenseAct, SIGNAL(triggered()), this, SLOT(visualizzaLicenza())); m_aboutAct = new QAction(QString::fromUtf8("Informazioni &su QViaggiaTreno"), this); m_aboutAct->setStatusTip(QString::fromUtf8("Mostra la finestra di informazione sull'applicazione")); connect(m_aboutAct, SIGNAL(triggered()), this, SLOT(about())); m_aboutQtAct = new QAction(QString::fromUtf8("Informazioni su &Qt"), this); m_aboutQtAct->setStatusTip(QString::fromUtf8("Mostra la finestra di informazioni sulla libreria Qt")); connect(m_aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt())); m_nuovaStazioneAct = new QAction(QString::fromUtf8("Stazione..."), this); m_nuovaStazioneAct->setStatusTip(QString::fromUtf8("Controlla una stazione con ViaggiaTreno")); m_nuovaStazioneAct->setIcon(QIcon(":/img/stazione.png")); connect(m_nuovaStazioneAct, SIGNAL(triggered()), this ,SLOT(nuovaStazione())); m_nuovoTrenoAct = new QAction(QString::fromUtf8("Treno..."), this); m_nuovoTrenoAct->setStatusTip(QString::fromUtf8("Controlla un treno con ViaggiaTreno")); m_nuovoTrenoAct->setIcon(QIcon(":/img/treno.png")); connect(m_nuovoTrenoAct, SIGNAL(triggered()), this, SLOT(nuovoTreno())); m_nuovaListaTreniAct = new QAction(QString::fromUtf8("Lista di treni"), this); m_nuovaListaTreniAct->setStatusTip(QString::fromUtf8("Controlla una lista di treni con ViaggiaTreno")); m_nuovaListaTreniAct->setIcon(QIcon(":/img/listatreni.png")); connect(m_nuovaListaTreniAct, SIGNAL(triggered()), this, SLOT(nuovaListaTreni())); m_avvisiTrenordAct = new QAction(QString::fromUtf8("Avvisi Trenord"), this); m_avvisiTrenordAct->setStatusTip(QString::fromUtf8("Controlla gli avvisi di Trenord")); m_avvisiTrenordAct->setIcon(QIcon(":/img/trenord.png")); connect(m_avvisiTrenordAct, SIGNAL(triggered()), this, SLOT(nuovaSchedaAvvisiTrenord())); m_intervalloAct = new QAction(QString::fromUtf8("Cambia intervallo aggiornamento..."), this); m_intervalloAct->setStatusTip(QString::fromUtf8("Cambia l'intervallo di aggiornamento della scheda corrente")); m_intervalloAct->setIcon(QIcon(":/img/cronometro.png")); connect(m_intervalloAct, SIGNAL(triggered()), this, SLOT(modificaIntervallo())); m_intervalloAct->setDisabled(true); m_avviaAct = new QAction(QString::fromUtf8("Avvia"), this); m_avviaAct->setStatusTip(QString::fromUtf8("Avvia/riprendi il monitoraggio con Viaggiatreno")); m_avviaAct->setIcon(QIcon(":/img/avvia.png")); connect(m_avviaAct, SIGNAL(triggered()), this, SLOT(avvia())); m_avviaAct->setDisabled(true); m_fermaAct = new QAction(QString::fromUtf8("Ferma"), this); m_fermaAct->setStatusTip(QString::fromUtf8("Interrompi il monitoraggio con ViaggiaTreno")); m_fermaAct->setIcon(QIcon(":/img/interrompi.png")); connect(m_fermaAct, SIGNAL(triggered()), this, SLOT(ferma())); m_fermaAct->setDisabled(true); m_fermaTutteAct = new QAction(QString::fromUtf8("Ferma tutte le schede"), this); m_fermaTutteAct->setStatusTip(QString::fromUtf8("Interrompi il monitoraggio con ViaggiaTreno per tutte le schede")); connect(m_fermaTutteAct, SIGNAL(triggered()), this, SLOT(fermaTutte())); m_avviaTutteAct = new QAction(QString::fromUtf8("Avvia tutte le schede"), this); m_avviaTutteAct->setStatusTip(QString::fromUtf8("Avvia/riprendi il monitoraggio con ViaggiaTreno per tutte le schede")); connect(m_avviaTutteAct, SIGNAL(triggered()), this, SLOT(avviaTutte())); m_riprovaComunicazioneConVTAct = new QAction(QString::fromUtf8("Ritenta comunicazione con &ViaggiaTreno"), this); m_riprovaComunicazioneConVTAct->setStatusTip(QString::fromUtf8("prova a verificare se la comunicazione con" "ViaggiaTreno ha ripreso a funzionare normalmente")); connect(m_riprovaComunicazioneConVTAct, SIGNAL(triggered()), m_downloadViaggiaTreno, SLOT(avvia())); m_riprovaComunicazioneConVTAct->setDisabled(true); m_aggiornaAct = new QAction(QString::fromUtf8("Aggiorna"), this); m_aggiornaAct-> setStatusTip(QString::fromUtf8("Aggiorna la scheda corrente")); m_aggiornaAct->setIcon(QIcon(":/img/aggiorna.png")); connect(m_aggiornaAct, SIGNAL(triggered()), this, SLOT(aggiorna())); m_aggiornaAct->setDisabled(true); m_configuraAct = new QAction(QString::fromUtf8("Configura QViaggiaTreno..."), this); m_configuraAct->setStatusTip(QString::fromUtf8("Mostra la finestra di configurazione di QViaggiaTreno")); m_configuraAct->setIcon(QIcon(":/img/configura.png")); connect(m_configuraAct, SIGNAL(triggered()), this, SLOT(configura())); m_stampaSchedaAct = new QAction(QString::fromUtf8("Stam&pa scheda corrente..."), this); m_stampaSchedaAct->setStatusTip(QString::fromUtf8("Stampa la scheda corrente")); m_stampaSchedaAct->setIcon(QIcon(":img/stampa.png")); connect(m_stampaSchedaAct, SIGNAL(triggered()), this, SLOT(stampaSchedaCorrente())); m_stampaSchedaAct->setDisabled(true); m_esportaSchedaAct = new QAction(QString::fromUtf8("Esporta sche&da corrente..."), this); m_esportaSchedaAct->setStatusTip(QString::fromUtf8("Esporta la scheda corrente in formato HTML o PDF")); m_esportaSchedaAct->setIcon(QIcon(":img/esporta.png")); connect(m_esportaSchedaAct, SIGNAL(triggered()), this, SLOT(esportaSchedaCorrente())); m_esportaSchedaAct->setDisabled(true); //crea azioni per i vari menu specifici per tipo di scheda m_cambiaNomeStazioneAct = new QAction(QString::fromUtf8("Cambia nome sta&zione..."), this); connect(m_cambiaNomeStazioneAct, SIGNAL(triggered()), this, SLOT(modificaNomeStazione())); m_apriAct = new QAction(QString::fromUtf8("Apri..."), this); m_apriAct->setStatusTip(QString::fromUtf8("Apre una lista di treni")); m_apriAct->setIcon(QIcon(":/img/apri.png")); connect(m_apriAct, SIGNAL(triggered()), this, SLOT(apri())); m_salvaAct = new QAction(QString::fromUtf8("Salva"), this); m_salvaAct->setStatusTip(QString::fromUtf8("Salva una lista di treni")); m_salvaAct->setIcon(QIcon(":/img/salva.png")); connect(m_salvaAct, SIGNAL(triggered()), this, SLOT(salva())); m_salvaConNomeAct = new QAction(QString::fromUtf8("Salva con nome..."), this); m_salvaConNomeAct->setStatusTip(QString::fromUtf8("Salva una lista di treni con un nuovo nome")); m_salvaConNomeAct->setIcon(QIcon(":/img/salva-come.png")); connect(m_salvaConNomeAct, SIGNAL(triggered()), this, SLOT(salvaConNome())); m_aggiungiTrenoAct = new QAction(QString::fromUtf8("Aggiungi treni alla lista..."), this); m_aggiungiTrenoAct->setStatusTip(QString::fromUtf8("Aggiungi uno o più treni alla lista dei treni da controllare")); m_aggiungiTrenoAct->setIcon(QIcon(":/img/aggiungi.png")); connect(m_aggiungiTrenoAct, SIGNAL(triggered()), this, SLOT(aggiungiTreni())); m_rimuoviTrenoAct = new QAction(QString::fromUtf8("Rimuovi treni dalla lista..."), this); m_rimuoviTrenoAct->setStatusTip(QString::fromUtf8("Rimuovi uno o più treni dalla lista dei treni da controllare")); m_rimuoviTrenoAct->setIcon(QIcon(":/img/rimuovi.png")); connect(m_rimuoviTrenoAct, SIGNAL(triggered()), this, SLOT(rimuoviTreni())); m_rimuoviTuttiAct = new QAction(QString::fromUtf8("Rimuovi tutti i treni dalla lista"), this); m_rimuoviTuttiAct->setStatusTip(QString::fromUtf8("Rimuovi tutti i treni dalla lista dei treni da controllare")); m_rimuoviTuttiAct->setIcon(QIcon(":/img/cancella-tutti.png")); connect(m_rimuoviTuttiAct, SIGNAL(triggered()), this, SLOT(rimuoviTuttiITreni())); m_impostaTitoloAct = new QAction(QString::fromUtf8("Imposta il titolo..."), this); m_impostaTitoloAct->setStatusTip(QString::fromUtf8("Imposta il titolo della lista di treni")); connect(m_impostaTitoloAct, SIGNAL(triggered()), this, SLOT(impostaTitolo())); } void QViaggiaTreno::creaMenu() { m_viaggiatrenoMenu = menuBar()->addMenu("&QViaggiaTreno"); m_viaggiatrenoMenu->addAction(m_nuovaStazioneAct); m_viaggiatrenoMenu->addAction(m_nuovoTrenoAct); m_viaggiatrenoMenu->addAction(m_nuovaListaTreniAct); m_viaggiatrenoMenu->addSeparator(); //TODO rimossa temporaneamente voce scheda trenord ripristinare // m_viaggiatrenoMenu->addAction(m_avvisiTrenordAct); m_viaggiatrenoMenu->addSeparator(); //TODO: rimuovere commenti quando sarà pronto il codice per l'esportazione/stampa // m_viaggiatrenoMenu->addAction(m_esportaSchedaAct); // m_viaggiatrenoMenu->addAction(m_stampaSchedaAct); // m_viaggiatrenoMenu->addSeparator(); m_viaggiatrenoMenu->addAction(m_avviaAct); m_viaggiatrenoMenu->addAction(m_fermaAct); m_viaggiatrenoMenu->addAction(m_aggiornaAct); m_viaggiatrenoMenu->addAction(m_intervalloAct); m_viaggiatrenoMenu->addSeparator(); m_viaggiatrenoMenu->addAction(m_avviaTutteAct); m_viaggiatrenoMenu->addAction(m_fermaTutteAct); m_viaggiatrenoMenu->addAction(m_riprovaComunicazioneConVTAct); m_viaggiatrenoMenu->addSeparator(); m_viaggiatrenoMenu->addAction(m_exitAct); //crea menu specifici per ogni tipo di scheda // scheda stazione m_stazioneMenu = menuBar()->addMenu("Sta&zione"); m_stazioneMenu->addAction(m_cambiaNomeStazioneAct); //scheda treno m_trenoMenu = menuBar()->addMenu("Tre&no"); //scheda lista treni m_listaTreniMenu = menuBar()->addMenu("Lis&ta treni"); m_listaTreniMenu->addAction(m_apriAct); m_listaTreniMenu->addAction(m_salvaAct); m_listaTreniMenu->addAction(m_salvaConNomeAct); m_listaTreniMenu->addSeparator(); m_listaTreniMenu->addAction(m_aggiungiTrenoAct); m_listaTreniMenu->addAction(m_rimuoviTrenoAct); m_listaTreniMenu->addAction(m_rimuoviTuttiAct); m_listaTreniMenu->addSeparator(); m_listaTreniMenu->addAction(m_impostaTitoloAct); //nascondi i menu specifici per ogni scheda m_stazioneMenu->menuAction()->setVisible(false); m_trenoMenu->menuAction()->setVisible(false); m_listaTreniMenu->menuAction()->setVisible(false); m_opzioniMenu = menuBar()->addMenu(QString::fromUtf8("&Strumenti")); m_opzioniMenu->addAction(m_configuraAct); m_helpMenu = menuBar()->addMenu("&Aiuto"); m_helpMenu->addAction(m_licenseAct); m_helpMenu->addSeparator(); m_helpMenu->addAction(m_aboutAct); m_helpMenu->addAction(m_aboutQtAct); } void QViaggiaTreno::creaToolBar() { m_mainToolBar = addToolBar("Barra strumenti principale"); m_mainToolBar->addAction(m_nuovaStazioneAct); m_mainToolBar->addAction(m_nuovoTrenoAct); m_mainToolBar->addAction(m_nuovaListaTreniAct); //TODO rimossaa icona scheda trenod da toolbar ripristinare // m_mainToolBar->addAction(m_avvisiTrenordAct); m_mainToolBar->addSeparator(); //TODO: rimuovere commenti quando sarà pronto il codice per l'esportazione/stampa // m_mainToolBar->addAction(m_stampaSchedaAct); // m_mainToolBar->addAction(m_esportaSchedaAct); // m_mainToolBar->addSeparator(); m_mainToolBar->addAction(m_aggiornaAct); m_mainToolBar->addAction(m_avviaAct); m_mainToolBar->addAction(m_fermaAct); m_spinIntervallo = new QSpinBox(this); m_spinIntervallo->setRange(1, 1440); m_spinIntervallo->setSuffix(" min"); m_spinIntervalloAct = m_mainToolBar->addWidget(m_spinIntervallo); m_spinIntervalloAct->setDisabled(true); //connessioni connect(m_spinIntervallo, SIGNAL(valueChanged(int)), this, SLOT(modificaIntervalloConSpinBox(int))); m_listaToolbar = addToolBar("Barra strumenti lista treni"); m_listaToolbar->addAction(m_apriAct); m_listaToolbar->addAction(m_salvaAct); m_listaToolbar->addAction(m_salvaConNomeAct); m_listaToolbar->addSeparator(); m_listaToolbar->addAction(m_aggiungiTrenoAct); m_listaToolbar->addAction(m_rimuoviTrenoAct); m_listaToolbar->addAction(m_rimuoviTuttiAct); m_listaToolbar->setVisible(false); } void QViaggiaTreno::creaWidgetCentrale() { m_schede = new QTabWidget(this); //rende le schede muovibili m_schede->setMovable(true); //aggiunge pulsante di chiusura della scheda corrente m_schede->setTabsClosable(true); setCentralWidget(m_schede); //connessioni connect(m_schede, SIGNAL(currentChanged(int)), this, SLOT(schedaCambiata(int))); connect(m_schede, SIGNAL(tabCloseRequested(int)), this, SLOT(chiudiScheda(int))); } void QViaggiaTreno::creaStatusBar() { //crea un indicatore a LED per visualizzare lo stato della connessione a viaggiatreno m_ledStatoViaggiaTreno = new QLedIndicator(this); statusBar()->addPermanentWidget(m_ledStatoViaggiaTreno); statusBar()->showMessage("Pronto"); } void QViaggiaTreno::leggiImpostazioniFinestra() { QSettings settings(QSettings::IniFormat, QSettings::UserScope, "fra74", "QViaggiaTreno"); //legge impostazioni su posizione e dimensione finestra settings.beginGroup("Finestra principale"); resize(settings.value("dimensione", QSize(400, 400)).toSize()); move(settings.value("posizione", QPoint(200, 200)).toPoint()); settings.endGroup(); //legge lista delle ultime stazioni monitorate settings.beginGroup("Stazioni monitorate"); maxStazioni = settings.value("max", 20).toInt(); m_listaStazioniMonitorate = settings.value("Lista").toStringList(); settings.endGroup(); } //ripristina le schede aperte nella sessione precedente di QviaggiaTreno void QViaggiaTreno::ripristinaSchede() { QSettings settings(QSettings::IniFormat, QSettings::UserScope, "fra74", "QViaggiaTreno"); //recupera il numero di schede da ripristinare settings.beginGroup("Schede aperte"); int numero = settings.value("numero", 0).toInt(); //recupera l'indice della scheda corrente al momento della chiusura int schedaCorrente = settings.value("scheda corrente", -1).toInt(); settings.endGroup(); for (int i = 1; i <= numero; i++) { settings.beginGroup(QString("Scheda %1").arg(i)); //recupera il tipo di scheda QString tipo = settings.value("tipo scheda").toString(); if (tipo == "treno") { //recupera numero treno e intervallo di aggiornamento QString numero = settings.value("numero treno").toString(); int intervallo = settings.value("intervallo").toInt(); QString codice = settings.value("codice stazione origine").toString(); //crea la scheda nuovoTreno(numero, codice, intervallo); } if (tipo == "stazione") { //recupera intervallo di aggiornamento e nome stazione int intervallo = settings.value("intervallo").toInt(); QString stazione = settings.value("nome stazione").toString(); QString codice = settings.value("codice stazione").toString(); //crea la scheda ma NON la avvia SchedaStazione *scheda = nuovaStazione(stazione, false, intervallo, true); if (codice != "") scheda->cambiaCodiceStazione(codice); else { scheda->aggiorna(); scheda->avvia(); scheda->ripristinaFiltri(settings); } } if (tipo == "lista treni") { //recupera nome file QString nomefile = settings.value("nome file").toString(); SchedaListaTreni * scheda = nuovaListaTreni(); if (nomefile != "") scheda->apriFile(nomefile); } settings.endGroup(); } //seleziona come scheda corrente la scheda che era selezionata al momento della chiusura m_schede->setCurrentIndex(schedaCorrente); } void QViaggiaTreno::salvaSchede() { QSettings settings(QSettings::IniFormat, QSettings::UserScope, "fra74", "QViaggiaTreno"); //rimuove i gruppi relativi alle singole schede aperte in sessioni precedenti settings.beginGroup("Schede aperte"); int schede = settings.value("numero", 0).toInt(); settings.endGroup(); for (int i = 1; i <= schede; i++) { settings.beginGroup(QString("Scheda %1").arg(i)); settings.remove(""); settings.endGroup(); } //scrive numero di schede aperte settings.beginGroup("Schede aperte"); schede = m_listaSchede.count(); settings.setValue("numero", schede); //scrive il numero della scheda attualmente selezionata settings.setValue("scheda corrente", m_schede->currentIndex()); settings.endGroup(); //scrive informazioni sulle schede aperte for (int i = 0; i < m_schede->count(); i++) { settings.beginGroup(QString("Scheda %1").arg(i+1)); SchedaQViaggiaTreno* scheda = qobject_cast (m_schede->widget(i)); scheda->salvaScheda(settings); settings.endGroup(); } } void QViaggiaTreno::scriviImpostazioniFinestra() { QSettings settings(QSettings::IniFormat, QSettings::UserScope, "fra74", "QViaggiaTreno"); //scrive impostazioni su posizione e dimensione finestra settings.beginGroup("Finestra principale"); settings.setValue("dimensione", size()); settings.setValue("posizione", pos()); settings.endGroup(); //scrive lista delle ultime stazioni monitorate settings.beginGroup("Stazioni monitorate"); settings.setValue("max", maxStazioni); settings.setValue("Lista", m_listaStazioniMonitorate); settings.endGroup(); } //questo metodo imposta il proxy utilizzato per tutte le connessioni alla rete. viene chiamato all'avvio del programma ed ogni volkta che si modifica la configurazione void QViaggiaTreno::impostaProxy() { //se è stato selezionato utilizza il proxy di sistema if (configurazione().proxyDiSistemaUtilizzato()) QNetworkProxyFactory::setUseSystemConfiguration(true); else { QNetworkProxy networkProxy; if (configurazione().proxyUtilizzato()) { networkProxy.setType(QNetworkProxy::HttpProxy); networkProxy.setHostName(configurazione().hostProxy()); networkProxy.setPort(configurazione().portaProxy()); if (configurazione().proxyRichiedeAutenticazione()) { networkProxy.setUser(configurazione().nomeUtenteProxy()); networkProxy.setPassword(configurazione().passwordProxy()); } } else networkProxy.setType(QNetworkProxy::NoProxy); QNetworkProxy::setApplicationProxy(networkProxy); } } QViaggiaTreno::~QViaggiaTreno() { } //restituisce un puntatore alla scheda corrente (se esiste) SchedaQViaggiaTreno * QViaggiaTreno::schedaCorrente() { //non ci sono schede restituisce un puntatore nullo if (!m_schede->count()) return 0L; else return m_listaSchede.value(qobject_cast(m_schede->currentWidget())->idScheda()); } SchedaQViaggiaTreno* QViaggiaTreno::scheda(quint32 id) { //non ci sono schede aperte, restituisci un puntatore nullo if (!m_schede->count()) return 0L; //non esiste una scheda con questo id if (!m_listaSchede.contains(id)) return 0L; else return m_listaSchede[id]; } //eventi void QViaggiaTreno::closeEvent(QCloseEvent *event) { salvaSchede(); scriviImpostazioniFinestra(); //per il momento accettare senza condizioni l'evento di chiusura, //lo scopo è solo quello di richiamare le funzioni di salvataggio delle impostazioni event->accept(); } //restituisce true se la scheda è ancora aperta bool QViaggiaTreno::schedaAperta(SchedaQViaggiaTreno *scheda) { //cerca l'indice della scheda nel tab widget //se è diverso da -1 allora la scheda esiste return (m_schede->indexOf(scheda) != -1); } qviaggiatreno-2013.7.3/src/schedaavvisitrenord_widget.cpp0000664000175000017500000000330312214355774023505 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2008-2012 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "schedaavvisitrenord.h" WidgetAvvisiTrenord::WidgetAvvisiTrenord(QWidget *parent, ModelloAvvisiTrenord* avvisi) : QWidget(parent) { setupUi(this); QFont font = labelTitolo->font(); font.setBold(true); font.setPointSize(font.pointSize()*1.5); labelTitolo->setFont(font); tabellaAvvisi->setModel(avvisi); } qviaggiatreno-2013.7.3/src/qledindicator.h0000664000175000017500000000577112215773056020373 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2010 by Tn * * thenobody@poczta.fm * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Library General Public License as * * published by the Free Software Foundation; either version 3 of the * * License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef QLEDINDICATOR_H #define QLEDINDICATOR_H #include #include #include #include class QLedIndicator : public QAbstractButton { Q_PROPERTY(QColor onColor1 WRITE setOnColor1 READ getOnColor1 ); Q_PROPERTY(QColor onColor2 WRITE setOnColor2 READ getOnColor2 ); Q_PROPERTY(QColor offColor1 WRITE setOffColor1 READ getOffColor1 ); Q_PROPERTY(QColor offColor2 WRITE setOffColor2 READ getOffColor2 ); Q_OBJECT public: QLedIndicator(QWidget *parent); void setOnColor1(QColor c) { onColor1 = c; } void setOffColor1(QColor c) { offColor1 = c; } void setOnColor2(QColor c) { onColor2 = c; } void setOffColor2(QColor c) { offColor2 = c; } QColor getOnColor1(void) { return onColor1; } QColor getOffColor1(void) { return offColor1; } QColor getOnColor2(void) { return onColor2; } QColor getOffColor2(void) { return offColor2; } protected: virtual void paintEvent (QPaintEvent *event); virtual void resizeEvent(QResizeEvent *event); //trucchetto: il pulsante deve essere checkable altrimenti non è possibile cambiare stato //ma non voglio che un utente possa cambiare stato con un click virtual void nextCheckState() {setChecked(isChecked());}; private: static const qreal scaledSize; /* init in cpp */ QColor onColor1, offColor1; QColor onColor2, offColor2; QPixmap ledBuffer; }; #endif // QLEDINDICATOR_H qviaggiatreno-2013.7.3/src/qledindicator.cpp0000664000175000017500000000652012215773217020716 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2010 by Tn * * thenobody@poczta.fm * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Library General Public License as * * published by the Free Software Foundation; either version 3 of the * * License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include #include "qledindicator.h" const qreal QLedIndicator::scaledSize = 1000; /* Visual Studio static const mess */ QLedIndicator::QLedIndicator(QWidget *parent) : QAbstractButton(parent) { setMinimumSize(24,24); setCheckable(true); onColor1 = QColor(0,255,0); onColor2 = QColor(0, 192, 0); offColor1 = QColor(255,0,0); offColor2 = QColor(192,0,0); } void QLedIndicator::resizeEvent(QResizeEvent *event) { Q_UNUSED(event) update(); } void QLedIndicator::paintEvent(QPaintEvent *event) { Q_UNUSED(event) qreal realSize = qMin(width(), height()); QRadialGradient gradient; QPainter painter(this); QPen pen(Qt::black); pen.setWidth(1); painter.setRenderHint(QPainter::Antialiasing); painter.translate(width()/2, height()/2); painter.scale(realSize/scaledSize, realSize/scaledSize); gradient = QRadialGradient (QPointF(-500,-500), 1500, QPointF(-500,-500)); gradient.setColorAt(0, QColor(224,224,224)); gradient.setColorAt(1, QColor(28,28,28)); painter.setPen(pen); painter.setBrush(QBrush(gradient)); painter.drawEllipse(QPointF(0,0), 500, 500); gradient = QRadialGradient (QPointF(500,500), 1500, QPointF(500,500)); gradient.setColorAt(0, QColor(224,224,224)); gradient.setColorAt(1, QColor(28,28,28)); painter.setPen(pen); painter.setBrush(QBrush(gradient)); painter.drawEllipse(QPointF(0,0), 450, 450); painter.setPen(pen); if( isChecked() ) { gradient = QRadialGradient (QPointF(-500,-500), 1500, QPointF(-500,-500)); gradient.setColorAt(0, onColor1); gradient.setColorAt(1, onColor2); } else { gradient = QRadialGradient (QPointF(500,500), 1500, QPointF(500,500)); gradient.setColorAt(0, offColor1); gradient.setColorAt(1, offColor2); } painter.setBrush(gradient); painter.drawEllipse(QPointF(0,0), 400, 400); } qviaggiatreno-2013.7.3/src/dialogo_nomestazione.h0000664000175000017500000000367312215773056021761 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2010 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef DIALOGO_NOMESTAZIONE_H #define DIALOGO_NOMESTAZIONE_H #include "ui_dlgnomestazione.h" class DialogoNomeStazione: public QDialog, private Ui::dlgNomeStazione { public: DialogoNomeStazione(QWidget *parent, const QStringList& listaStazioni); //restituisce true se il checkBox per cercare tutte le stazioni che iniziano con il testo inserito è marcato bool cercaTutteStazioni(); //restituisce il nome della stazione scelto QString nomeStazione(); }; #endif // DIALOGO_NOMESTAZIONE_H qviaggiatreno-2013.7.3/src/dlgconfigurazione.ui0000664000175000017500000001750712215773056021450 0ustar locutuslocutus dlgConfigurazione 0 0 556 260 Configurazione di QViaggiaTreno 0 Proxy Usare un &proxy HTTP per l'accesso alla rete Nome &host: lineEditHost Por&ta: spinBoxPorta 65535 Il proxy richiede &autenticazione Nome &utente: lineEditNomeUtente Pass&word: lineEditPassword QLineEdit::Password Utilizzare il pro&xy di sistema ViaggiaTreno &Frequenza controllo corretto funzionamento di ViaggiaTreno (in minuti): spinBoxControlloVT 1 120 &Timeout del controllo corretto funzionamento di ViaggiaTreno (in secondi) spinBoxTimeoutControlloVT 15 90 Frequenza &richieste schede a ViaggiaTreno (in secondi): doubleSpinBoxQueryVT 1 0.100000000000000 600.000000000000000 0.100000000000000 Qt::Vertical 20 43 Qt::Horizontal QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults spinBoxControlloVT spinBoxTimeoutControlloVT doubleSpinBoxQueryVT buttonBox tabWidget buttonBox accepted() dlgConfigurazione accept() 171 279 157 207 buttonBox rejected() dlgConfigurazione reject() 171 279 286 207 pulsantePremuto(QAbstractButton*) qviaggiatreno-2013.7.3/src/parser_trenord.h0000664000175000017500000000543712215771022020570 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2012 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef PARSER_TRENORD_H #define PARSER_TRENORD_H #include class SchedaQViaggiaTreno; class AvvisoTrenord { public: void impostaOrario(QDateTime orario) {m_orario = orario;} QDateTime orario() const {return m_orario;} void impostaDirettrice(const QString& direttrice) {m_direttrice = direttrice;} QString direttrice() const {return m_direttrice;} void impostaTesto(const QString& testo) {m_testo = testo;} QString testo() const {return m_testo;} private: QDateTime m_orario; QString m_direttrice, m_testo; }; class ParserTrenord : public QObject { Q_OBJECT public: ParserTrenord(SchedaQViaggiaTreno* scheda); bool analizzaListaDirettrici(const QString& rispostaTN); QQueue listaDirettrici() const {return m_direttrici;} private: QQueue m_direttrici; SchedaQViaggiaTreno* m_scheda; }; class ModelloAvvisiTrenord : public QAbstractTableModel { Q_OBJECT public: ModelloAvvisiTrenord(QWidget* parent); virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; virtual QVariant data(const QModelIndex &index, int role) const; virtual int rowCount(const QModelIndex &parent) const; virtual int columnCount(const QModelIndex &parent) const; private: QList m_avvisi; }; #endif // PARSER_TRENORD_H qviaggiatreno-2013.7.3/src/wgtstazione.ui0000664000175000017500000001637312215773056020315 0ustar locutuslocutus wgtStazione 0 0 485 576 Form 15 75 true Qt::AlignCenter Ultimo aggiornamento: aggiornamento in corso Qt::AlignCenter 0 0 Qt::Vertical 75 true Arrivi Qt::AlignCenter QAbstractItemView::NoEditTriggers true QAbstractItemView::NoSelection false false false Filtra treni in arrivo in base a false Non filtrare Categoria treno Stazione di origine QComboBox::AdjustToContents Qt::Horizontal 40 20 75 true Partenze Qt::AlignCenter QAbstractItemView::NoEditTriggers true QAbstractItemView::NoSelection QAbstractItemView::SelectItems false false false Filtra treni in partenza in base a false Non filtrare Categoria treno Stazione di destinazione QComboBox::AdjustToContents Qt::Horizontal 40 20 qviaggiatreno-2013.7.3/src/items.h0000664000175000017500000000335212215773217016662 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2009-2010 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef ITEMS_H #define ITEMS_H #include class SortedAsIntListWidgetItem : public QListWidgetItem { public: SortedAsIntListWidgetItem(const QString& string) : QListWidgetItem(string) {} virtual bool operator < (const QListWidgetItem& other) const; }; #endif // ITEMS_H qviaggiatreno-2013.7.3/src/parser_viaggiatreno_treno.cpp0000664000175000017500000005610712215773217023344 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2011 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "parser_viaggiatreno_treno.h" #include "utils.h" #include #include ParserTrenoViaggiaTreno::ParserTrenoViaggiaTreno(SchedaQViaggiaTreno* scheda) { m_scheda = scheda; m_err = ""; m_riga = m_col = -1; m_rispostaVTAnalizzata = ""; m_rispostaVTDettagli = ""; m_rispostaVTRiepilogo = ""; } void ParserTrenoViaggiaTreno::inizializza() { m_err = ""; m_riga = m_col = -1; } //cerca nel testo la stringa "non valido" perché VT quando trova un numero non valido visualizza il messaggio //"numero treno non valido" bool ParserTrenoViaggiaTreno::trenoNonPrevisto() const { return m_rispostaVTRiepilogo.contains("non valido", Qt::CaseInsensitive); } //cerca nel testo la stringa "option". Essa è presente quando il numero del treno è ambiguo //e ViaggiaTreno presenta una lista di alternative bool ParserTrenoViaggiaTreno::numeroTrenoAmbiguo() const { return m_rispostaVTRiepilogo.contains("option", Qt::CaseInsensitive); } QMap ParserTrenoViaggiaTreno::listaCodiciTreno(const QString& rispostaVT) { QDomDocument docDom; QString msg; int riga, col; QMap lista; //ottiene la lista di tutti gli elementi figli del tag "select" //ogni nodo è un elemento "option" che contiene il numero del treno seguito dall'origine //ad esempio "518 - NAPOLI CENTRALE" e nell'attributo "value" un codice ottenuto combinando //il numero del treno con il codice di origine della stazione, ad esempio "518;S09218"; docDom.setContent(rispostaVT, &msg, &riga, &col); QDomElement body = docDom.documentElement().firstChildElement("body"); QDomElement corpocentrale = body.firstChildElement("div").nextSiblingElement("div"); QDomElement form = corpocentrale.firstChildElement("form"); QDomElement select = form.firstChildElement("p").firstChildElement("select"); QDomNodeList nodi = select.childNodes(); //scorre la lista dei nodi //per ogni elemento "option" crea un elemento della lista, la cui chiave è il nome della stazioone //mentre il codice è memorizzato nella voce corrispondente alla chiame for (int j = 0; j < nodi.count(); j++) lista[nodi.at(j).toElement().text()] = nodi.at(j).toElement().attribute("value"); return lista; } //cerca nel testo la stringa "cancellato" e anche "" //entrambe le stringhe sono presenti nella pagina che viene generata quando si introduce il //numero di un treno cancellato bool ParserTrenoViaggiaTreno::trenoSoppressoTotalmente() const { return (m_rispostaVTRiepilogo.contains("cancellato") && m_rispostaVTRiepilogo. contains("")); } //analizza il testo della scheda con il riepilogo del treno bool ParserTrenoViaggiaTreno::analizzaRiepilogo(TrenoVT::DatiTreno& orarioTreno) { QString temp; QList listaNodi; QDomDocument documentoDOM; int idx; m_rispostaVTAnalizzata = m_rispostaVTRiepilogo; if (!documentoDOM.setContent(m_rispostaVTAnalizzata, &m_err, &m_riga, &m_col)) return false; //inizia l'analisi dell'albero DOM //rintraccia il tag body QDomElement body = documentoDOM.documentElement().firstChildElement("body"); //rintraccia il tag H1 che contiene categoria e numero treno temp = body.firstChildElement("h1").text(); orarioTreno.impostaNumeroTreno(temp); orarioTreno.impostaCategoriaTreno(temp.section(" ", 0, 0)); //ottiene una lista di tutti gli elementi div QDomNodeList elementiDiv = body.elementsByTagName("div"); QDomElement div; if (m_rispostaVTAnalizzata.contains("arrivato")) { orarioTreno.impostaStatoTreno(TrenoVT::TrenoArrivato); } if (m_rispostaVTAnalizzata.contains("ancora partito")) { orarioTreno.impostaStatoTreno(TrenoVT::TrenoNonPartito); } if (m_rispostaVTAnalizzata.contains("viaggia ")) { orarioTreno.impostaStatoTreno(TrenoVT::TrenoInViaggio); } //rintraccia l'elemento DIV con gli eventuali provvedimenti di limitazione/soppressione for (int i = 0; i < elementiDiv.count(); i++) if (elementiDiv.at(i).toElement().attribute("style").contains("B02D2D")) orarioTreno.impostaDato(TrenoVT::dtProvvedimenti, elementiDiv.at(i).toElement().text()); //rintraccia l'elemento DIV con i dati della stazione di partenza for (int i = 0; i < elementiDiv.count(); i++) if (elementiDiv.at(i).toElement().text().contains("Partenza")) div = elementiDiv.at(i).toElement(); //estrai i dati sulla stazione di partenza dall'elemento appena ottenuto orarioTreno.impostaDato(TrenoVT::dtPartenza, div.firstChildElement("h2").text()); orarioTreno.impostaDato(TrenoVT::dtOrarioPartenzaProgrammato, div.firstChildElement("p").firstChildElement("strong").text()); orarioTreno.impostaDato(TrenoVT::dtOrarioPartenzaReale, div.firstChildElement("p").nextSiblingElement("p") .firstChildElement("strong").text()); //ottiene la lista di tutti i nodi di tipo testo for(QDomNode n = div.firstChild(); !n.isNull(); n = n.nextSibling()) { QDomText t = n.toText(); if (!t.isNull()) listaNodi.append(n); } //se la lista dei nodi è vuota allora la pagina non è completa, per evitare //crash ritorna false segnalando che c'è stato un errore inaspettato if (listaNodi.isEmpty()) return false; orarioTreno.impostaDato(TrenoVT::dtBinarioPartenzaProgrammato, listaNodi.at(1).toText().data()); if (listaNodi.count() == 4) orarioTreno.impostaDato(TrenoVT::dtBinarioPartenzaReale, listaNodi.at(3).toText().data()); else orarioTreno.impostaDato(TrenoVT::dtBinarioPartenzaReale, div.firstChildElement("strong").text()); //rintraccia l'elemento DIV con i dati della stazione di arrivo for (int i = 0; i < elementiDiv.count(); i++) if (elementiDiv.at(i).toElement().text().contains("Arrivo")) div = elementiDiv.at(i).toElement(); //estrai i dati sulla stazione di arrivo dall'elemento appena ottenuto orarioTreno.impostaDato(TrenoVT::dtArrivo, div.firstChildElement("h2").text()); orarioTreno.impostaDato(TrenoVT::dtOrarioArrivoProgrammato, div.firstChildElement("p").firstChildElement("strong").text()); orarioTreno.impostaDato(TrenoVT::dtOrarioArrivo, div.firstChildElement("p").nextSiblingElement("p") .firstChildElement("strong").text()); //ottiene la lista di tutti i nodi di tipo testo listaNodi.clear(); for(QDomNode n = div.firstChild(); !n.isNull(); n = n.nextSibling()) { QDomText t = n.toText(); if (!t.isNull()) listaNodi.append(n); } orarioTreno.impostaDato(TrenoVT::dtBinarioArrivoProgrammato, listaNodi.at(1).toText().data()); if (listaNodi.count() == 4) orarioTreno.impostaDato(TrenoVT::dtBinarioArrivoReale, listaNodi.at(3).toText().data()); else orarioTreno.impostaDato(TrenoVT::dtBinarioArrivoReale, div.firstChildElement("strong").text()); //estra il ritardo attuale per un treno in viaggio if (m_rispostaVTAnalizzata.contains("viaggia ")) { //rintraccia l'elemento DIV con il ritardo attuale idx = -1; for (int i = 0; i < elementiDiv.count(); i++) if (elementiDiv.at(i).toElement().text().contains("Il treno viaggia")) idx = i; if (idx != -1) { QString ritardo, transito; div = elementiDiv.at(idx).toElement(); temp = div.firstChildElement("strong").text(); idx = temp.indexOf("Ultimo"); if (idx == -1) { ritardo = temp; transito = ""; } else { ritardo = temp.left(idx); transito = temp.mid(idx); } //esistono i dati sull'ora e la località dell'ultimo transito //TODO qui dovrà essere aggiunto il codice per l'aggiunta di questo transito alla lista di tutti i transiti if (transito != "") { orarioTreno.impostaDato(TrenoVT::dtOrarioTransito, transito.section(' ', -2, -2)); orarioTreno.impostaDato(TrenoVT::dtUltimoRilevamento, transito.section(' ', 3, -5)); } if (ritardo.contains("orario")) orarioTreno.impostaDato(TrenoVT::dtRitardoTransito, QString::fromUtf8("in orario")); else { temp = ritardo.section(' ', 5, 5); if (temp == "1") orarioTreno.impostaDato(TrenoVT::dtRitardoTransito, QString::fromUtf8("1 minuto in %1").arg(ritardo.section(' ', 8, 8))); else orarioTreno.impostaDato(TrenoVT::dtRitardoTransito, QString::fromUtf8("%1 minuti in %2").arg(temp).arg(ritardo.section(' ', 8, 8))); } } } return true; } //analizza il testo della scheda con i dettagli del treno bool ParserTrenoViaggiaTreno::analizzaDettagli(TrenoVT::DatiTreno& orarioTreno) { QList listaNodi; QDomDocument documentoDOM; m_rispostaVTAnalizzata = m_rispostaVTDettagli; if (!documentoDOM.setContent(m_rispostaVTAnalizzata, &m_err, &m_riga, &m_col)) return false; QDomElement body = documentoDOM.documentElement().firstChildElement("body"); //ottiene la lista degli elementi div QDomNodeList elementiDiv = body.elementsByTagName("div"); //i dati delle fermate si trovano dal secondo al penultimo elemento div //ma siccome abbiamo già scritto i dati per la stazione di partenza e di arrivo //ci interessano solo gli elementi dal terzo al terz'ultimo for (int i = 2; i < elementiDiv.count()-2; i++) { TrenoVT::Fermata *fermata = new TrenoVT::Fermata(); QDomElement div = elementiDiv.at(i).toElement(); //verifica se la fermata è già stata effettuata o no, sfruttando l'attributo class if (div.attribute("class") == "corpocentrale") fermata->impostaEffetuata(false); else fermata->impostaEffetuata(true); //verifica se per caso la fermata non sia stata soppressa if (div.text().contains("soppressa")) fermata->impostaSoppressa(true); //imposta il nome della fermata fermata->impostaNomeFermata(div.firstChildElement("h2").text()); //imposta l'ora di arriva programmata ed effettiva fermata->impostaOraArrivoProgrammata(div.firstChildElement("p").firstChildElement("strong").text()); if (fermata->effettuata()) fermata->impostaOraArrivoReale(div.firstChildElement("p").nextSiblingElement("p").firstChildElement("strong").text()); else fermata->impostaOraArrivoStimata(div.firstChildElement("p").nextSiblingElement("p").firstChildElement("strong").text()); listaNodi.clear(); for(QDomNode n = div.firstChild(); !n.isNull(); n = n.nextSibling()) { QDomText t = n.toText(); if (!t.isNull()) listaNodi.append(n); } //se ci sono 4 elementi nella lista allora né binario previsto né reale sono scritti in grassetto if ( listaNodi.count() == 4) { fermata->impostaBinarioProgrammato(listaNodi.at(1).toText().data().simplified()); fermata->impostaBinarioReale(listaNodi.at(3).toText().data().simplified()); } //ce ne sono 3 allora le possibilità sono varie //se la fermata è stata effettuata allora il binario reale è in grassetto else if (fermata->effettuata()) { fermata->impostaBinarioProgrammato(listaNodi.at(1).toText().data().simplified()); fermata->impostaBinarioReale(div.firstChildElement("strong").text().simplified()); } //oppure la fermata non è stata effettuata else //è indicato in grassetto il binario reale (evento raro ma succede) if (listaNodi.at(2).toText().data().contains("Binario")) { fermata->impostaBinarioProgrammato(listaNodi.at(1).toText().data().simplified()); fermata->impostaBinarioReale(div.firstChildElement("strong").text().simplified()); } //è indicato in grassetto il binario programmato else { fermata->impostaBinarioProgrammato(div.firstChildElement("strong").text().simplified()); fermata->impostaBinarioReale(listaNodi.at(2).toText().data().simplified()); } orarioTreno.aggiungiFermata(fermata); } return true; } void TrenoVT::DatiTreno::inizializza() { m_statoTreno = DatiSconosciuti; m_dati.clear(); m_fermate.clear(); } TrenoVT::Fermata::Fermata() { m_effettuata = false; m_soppressa = false; m_fermata = ""; m_binProgrammato = ""; m_binReale = ""; m_oraArrivoProgrammata = ""; m_oraArrivoReale = ""; m_oraArrivoStimata = ""; } TrenoVT::Transito::Transito() { m_ritardo = 0; m_localita = ""; m_orarioTransito = ""; } ListaVT::DatiTreno::DatiTreno(const QString& numero) { m_numero = numero; m_codice = ""; m_stato = TrenoVT::DatiSconosciuti; } //cancella tutti i dati del treno tranne numero void ListaVT::DatiTreno::cancella() { m_dati.clear(); m_stato = TrenoVT::DatiSconosciuti; } //restituisce una stringa con lo stato del treno QString ListaVT::DatiTreno::stringaStatoTreno() const { QString stringa; switch(m_stato) { case TrenoVT::DatiSconosciuti: stringa = QString::fromUtf8("Stato sconosciuto"); break; case TrenoVT::TrenoNonPrevisto: stringa = QString::fromUtf8("Non previsto oggi"); break; case TrenoVT::TrenoNonPartito: stringa = QString::fromUtf8("Non ancora partito"); break; case TrenoVT::TrenoInViaggio: stringa = QString::fromUtf8("In viaggio"); break; case TrenoVT::TrenoArrivato: stringa = QString::fromUtf8("Arrivato"); break; case TrenoVT::TrenoCancellato: stringa = QString::fromUtf8("Soppresso"); break; } return stringa; } bool ParserTrenoViaggiaTreno::analizzaRiepilogoPerLista(ListaVT::DatiTreno &treno) { QDomDocument documentoDOM; int idx; QString temp; treno.cancella(); //analizza il testo della risposta di viaggiatreno m_rispostaVTAnalizzata = m_rispostaVTRiepilogo; if (!documentoDOM.setContent(m_rispostaVTAnalizzata, &m_err, &m_riga, &m_col )) return false; //inizia l'analisi dell'albero DOM //rintraccia il tag body QDomElement body = documentoDOM.documentElement().firstChildElement("body"); //rintraccia il tag H1 che contiene categoria e numero treno temp = body.firstChildElement("h1").text(); treno.impostaDato(ListaVT::dtCategoria, temp.section(' ', 0, 0)); //ottiene una lista di tutti gli elementi div QDomNodeList elementiDiv = body.elementsByTagName("div"); QDomElement div; //imposta lo stato del treno if (m_rispostaVTAnalizzata.contains("ancora partito")) treno.impostaStatoTreno(TrenoVT::TrenoNonPartito); if (m_rispostaVTAnalizzata.contains("viaggia ")) treno.impostaStatoTreno(TrenoVT::TrenoInViaggio); if (m_rispostaVTAnalizzata.contains("arrivato")) treno.impostaStatoTreno(TrenoVT::TrenoArrivato); //rintraccia l'elemento DIV con i dati della stazione di partenza for (int i = 0; i < elementiDiv.count(); i++) if (elementiDiv.at(i).toElement().text().contains("Partenza")) div = elementiDiv.at(i).toElement(); //estrai i dati sulla stazione di partenza dall'elemento appena ottenuto treno.impostaDato(ListaVT::dtOrigine, div.firstChildElement("h2").text()); treno.impostaDato(ListaVT::dtPartenzaProgrammata, div.firstChildElement("p").firstChildElement("strong").text()); //non cercare l'orario di partenza effettivo se il treno risulta non ancora partito if (!m_rispostaVTAnalizzata.contains("ancora partito")) treno.impostaDato(ListaVT::dtPartenzaEffettiva, div.firstChildElement("p").nextSiblingElement("p") .firstChildElement("strong").text()); //rintraccia l'elemento DIV con i dati della stazione di arrivo for (int i = 0; i < elementiDiv.count(); i++) if (elementiDiv.at(i).toElement().text().contains("Arrivo")) div = elementiDiv.at(i).toElement(); //estrai i dati sulla stazione di arrivo dall'elemento appena ottenuto treno.impostaDato(ListaVT::dtDestinazione, div.firstChildElement("h2").text()); treno.impostaDato(ListaVT::dtArrivoProgrammato, div.firstChildElement("p").firstChildElement("strong").text()); //cerca l'orario di arrivo effettivo solo se il treno risulta già arrivato if (m_rispostaVTAnalizzata.contains("arrivato")) treno.impostaDato(ListaVT::dtArrivoEffettivo, div.firstChildElement("p").nextSiblingElement("p") .firstChildElement("strong").text()); //cerca solo per i treni ancora in viaggio il dato sull'ultima fermata effettuata if (m_rispostaVTAnalizzata.contains("viaggia ")) { idx = -1; for (int i = 0; i < elementiDiv.count(); i++) if (elementiDiv.at(i).toElement().text().contains("Ultima fermata effettuata")) idx = i+1; //è stata trovato? allora estrai i dati if (idx != -1) { div = elementiDiv.at(idx).toElement(); treno.impostaDato(ListaVT::dtUltimaFermata, div.firstChildElement("h2").text()); treno.impostaDato(ListaVT::dtOrarioFermataProgrammato, div.firstChildElement("p").firstChildElement("strong").text()); treno.impostaDato(ListaVT::dtOrarioFermataEffettivo, div.firstChildElement("p").nextSiblingElement("p") .firstChildElement("strong").text()); } } //cerca il ritardo in arrivo per un treno già arrivato if (m_rispostaVTAnalizzata.contains("arrivato")) { idx = -1; for (int i = 0; i < elementiDiv.count(); i++) if (elementiDiv.at(i).toElement().text().contains("Il treno e' arrivato")) idx = i; if (idx != -1) { div = elementiDiv.at(idx).toElement(); //il treno è arrivato in orario, non c'è ragione di estrarre il ritardo if (div.text().contains("orario")) treno.impostaDato(ListaVT::dtRitardoTransito, QString::fromUtf8("In orario")); else { QString minuti = div.text().section(' ', 6, 6); QString ritOAnticipo = div.text().section(' ', 9, 9); if (minuti == "1") temp = QString::fromUtf8("1 minuto in %1").arg(ritOAnticipo); else temp = QString::fromUtf8("%1 minuti in %2").arg(minuti).arg(ritOAnticipo); treno.impostaDato(ListaVT::dtRitardoTransito, temp); } } } //cerca il ritardo per i treni ancora in viaggio if (m_rispostaVTAnalizzata.contains("viaggia ")) { idx = -1; for (int i = 0; i < elementiDiv.count(); i++) if (elementiDiv.at(i).toElement().text().contains("Il treno viaggia")) idx = i; if (idx != -1) { QString ritardo, transito; div = elementiDiv.at(idx).toElement(); temp = div.firstChildElement("strong").text(); idx = temp.indexOf("Ultimo"); if (idx == -1) { ritardo = temp; transito = ""; } else { ritardo = temp.left(idx); transito = temp.mid(idx); } //esistono i dati sull'ora e la località dell'ultimo transito if (transito != "") { treno.impostaDato(ListaVT::dtOrarioTransito, transito.section(' ', -2, -2)); treno.impostaDato(ListaVT::dtUltimoRilevamento, transito.section(' ', 3, -5)); } if (ritardo.contains("orario")) treno.impostaDato(ListaVT::dtRitardoTransito, QString::fromUtf8("in orario")); else { temp = ritardo.section(' ', 5, 5); if (temp == "1") treno.impostaDato(ListaVT::dtRitardoTransito, QString::fromUtf8("1 minuto in %1").arg(ritardo.section(' ', 8, 8))); else treno.impostaDato(ListaVT::dtRitardoTransito, QString::fromUtf8("%1 minuti in %2").arg(temp).arg(ritardo.section(' ', 8, 8))); } } } return true; } qviaggiatreno-2013.7.3/src/parser_viaggiatreno_treno.h0000664000175000017500000002241212215773217023001 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2010-2011 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef PARSER_VIAGGIATRENO_TRENO_H #define PARSER_VIAGGIATRENO_TRENO_H #include #include #include "parser_viaggiatreno_base.h" class SchedaQViaggiaTreno; namespace TrenoVT { enum StatoTreno {DatiSconosciuti, TrenoCancellato, TrenoNonPrevisto, TrenoNonPartito, TrenoInViaggio, TrenoArrivato}; enum Dati {dtPartenza, dtOrarioPartenzaProgrammato, dtOrarioPartenzaReale, dtBinarioPartenzaProgrammato, dtBinarioPartenzaReale, dtArrivo, dtOrarioArrivoProgrammato, dtOrarioArrivo, dtBinarioArrivoProgrammato, dtBinarioArrivoReale, dtOrarioTransito, dtRitardoTransito, dtUltimoRilevamento, dtProvvedimenti }; enum {colFermata = 0, colEffettuata, colBinarioProgrammato, colBinarioReale, colArrivoProgrammato, colArrivoStimato, colArrivoReale, colUltima=colArrivoReale}; enum {colLocalita = 0, colOrarioTransito, colRitardo}; class Fermata { public: Fermata(); QString nomeFermata() const {return m_fermata;} QString binarioProgrammato() const {return m_binProgrammato;} QString binarioReale() const {return m_binReale;} QString oraArrivoProgrammata() const {return m_oraArrivoProgrammata;} QString oraArrivoStimata() const {return m_oraArrivoStimata;} QString oraArrivoReale() const {return m_oraArrivoReale;} bool effettuata() const {return m_effettuata;} bool soppressa() const {return m_soppressa;} void impostaNomeFermata(const QString& fermata) {m_fermata = fermata;} void impostaBinarioProgrammato(const QString& binarioProgrammato) {m_binProgrammato = binarioProgrammato;} void impostaBinarioReale(const QString& binarioReale) {m_binReale = binarioReale;} void impostaOraArrivoProgrammata(const QString& oraArrivoProgrammata) {m_oraArrivoProgrammata = oraArrivoProgrammata;} void impostaOraArrivoStimata(const QString& oraArrivoStimata) {m_oraArrivoStimata = oraArrivoStimata;} void impostaOraArrivoReale(const QString& oraArrivoReale) {m_oraArrivoReale = oraArrivoReale;} void impostaEffetuata(bool eff) {m_effettuata = eff;} void impostaSoppressa(bool sopp) {m_soppressa = sopp; m_effettuata = false;} private: QString m_fermata; QString m_binProgrammato, m_binReale; QString m_oraArrivoProgrammata, m_oraArrivoStimata, m_oraArrivoReale; bool m_effettuata, m_soppressa; }; class Transito { public: Transito(); QString nomeLocalita() const {return m_localita;} QString orarioTransito() const {return m_orarioTransito;} int ritardo() const {return m_ritardo;} void impostaLocalita(const QString& localita) {m_localita = localita;} void impostaOrarioTransito(const QString& orarioTransito) {m_orarioTransito = orarioTransito;} void impostaRitardo(int ritardo) {m_ritardo = ritardo;} private: QString m_localita; QString m_orarioTransito; int m_ritardo; }; class DatiTreno { public: DatiTreno() {m_statoTreno = DatiSconosciuti;} void impostaStatoTreno(StatoTreno stato) {m_statoTreno = stato;} StatoTreno statoTreno() const {return m_statoTreno;} void inizializza(); QString categoriaTreno() const {return m_categoria;} void impostaCategoriaTreno(const QString& cat) {m_categoria = cat;} QString numeroTreno() const {return m_numero; } void impostaNumeroTreno(const QString& numero) {m_numero = numero; } void impostaDato(Dati tipoDato, const QString& valore) {m_dati[tipoDato] = valore; } QString dato(Dati tipoDato) const {return m_dati[tipoDato]; } QList fermate() const {return m_fermate;} void aggiungiFermata(Fermata* f) {m_fermate.append(f);} private: StatoTreno m_statoTreno; //il numero treno contiene *anche* la categoria QString m_numero; QString m_categoria; QMap m_dati; QList m_fermate; }; }; namespace ListaVT { enum Dati {dtCategoria, dtOrigine, dtDestinazione, dtUltimaFermata, dtOrarioFermataProgrammato, dtOrarioFermataEffettivo, dtUltimoRilevamento, dtOrarioTransito, dtRitardoTransito, dtPartenzaProgrammata, dtPartenzaEffettiva, dtArrivoProgrammato, dtArrivoEffettivo}; enum {rigaNumero = 0, rigaCategoria, rigaStato, rigaOrigine, rigaPartenzaProgrammata, rigaPartenzaEffettiva, rigaDestinazione, rigaArrivoProgrammato, rigaArrivoEffettivo, rigaUltimaFermata, rigaOrarioFermataProgrammato, rigaOrarioFermataEffettivo, rigaUltimoRilevamento, rigaOrarioTransito, rigaRitardoTransito, rigaUltima = rigaRitardoTransito}; //questa classe memorizza i dati di ogni singolo treno della lista di treni class DatiTreno { public: DatiTreno(const QString& numero); void cancella(); void impostaDato(Dati tipoDato, const QString& valore) {m_dati[tipoDato] = valore; } QString dato(Dati tipoDato) const {return m_dati[tipoDato]; } TrenoVT::StatoTreno statoTreno() const {return m_stato;} void impostaStatoTreno(TrenoVT::StatoTreno stato) {m_stato = stato;} QString stringaStatoTreno() const; QString numero() const {return m_numero;} void impostaNumero(const QString& numero) {m_numero = numero;} QString codiceOrigine() const {return m_codice;} void impostaCodiceOrigine(const QString& codice) {m_codice = codice;} private: QString m_numero, m_codice; QMap m_dati; TrenoVT::StatoTreno m_stato; }; }; class ParserTrenoViaggiaTreno: public ParserViaggiaTrenoBase { Q_OBJECT public: ParserTrenoViaggiaTreno(SchedaQViaggiaTreno *scheda); void inizializza(); //imposta il testo della risposta di viaggiatreno contenente il riepilogo del treno //che dovrà essere analizzata dal parser void impostaRispostaVTRiepilogo(const QString& rispostaVT) {m_rispostaVTRiepilogo = rispostaVT;} //imposta il testo della risposta di viaggiatreno contenente i dettagli del treno //che dovrà essere analizzata dal parser void impostaRispostaVTDettagli(const QString& rispostaVT) {m_rispostaVTDettagli = rispostaVT;} //analizza il testo della risposta di viaggiatreno e restituisce true se non sono incontrati errori sintattici bool analizzaRiepilogo(TrenoVT::DatiTreno& orarioTreno); bool analizzaDettagli(TrenoVT::DatiTreno& orarioTreno); //analizza il riepilogo ma estrai dati necessari alla scheda Lista Treni bool analizzaRiepilogoPerLista(ListaVT::DatiTreno &treno); //restituisce true se il numero treno non è stato trovato bool trenoNonPrevisto() const; //restituisce true se il treno è stato soppresso totalmente bool trenoSoppressoTotalmente() const; //restituisce true se il numero del treno è ambiguo //cioè se esistono più treni con lo stesso numero bool numeroTrenoAmbiguo() const; //restituisce una QMap con una corrispodenza Numero/origine treno<->Codice treno //utile quando ViaggiaTreno segnala che il numero del treno è ambiguo e produce una lista con numero treno //seguito da origine del treno //esempio se si cerca "518" ViaggiaTreno restituirà //"518 - NAPOLI CENTRALE" //"518 - SARONNO" QMap listaCodiciTreno(const QString& rispostaVT ); //restituisce riga dove è stato incontrato errore int rigaErrore() const {return m_riga;} //restituisce colonna dove è stato incontrato errore int colErrore() const {return m_col;} //restituisce il messaggio di errore QString errore() const {return m_err;} //restituisce il testo della risposta di viaggiatreno con il riepilogo QString rispostaVTRiepilogo() const {return m_rispostaVTRiepilogo;} // restituisce il testo della risposta di viaggiatreno con i dettagli QString rispostaVTDettagli() const {return m_rispostaVTDettagli;} //restituisce il testo dell'ultima risposta di viaggiatreno analizzata QString rispostaVTAnalizzata() const {return m_rispostaVTAnalizzata;} private: SchedaQViaggiaTreno *m_scheda; QString m_rispostaVTDettagli, m_rispostaVTRiepilogo, m_rispostaVTAnalizzata; int m_riga, m_col; QString m_err; }; #endif qviaggiatreno-2013.7.3/src/dialogoconfigurazione.h0000664000175000017500000000014312215773056022116 0ustar locutuslocutus#ifndef DIALOGOCONFIGURAZIONE_H #define DIALOGOCONFIGURAZIONE_H #endif // DIALOGOCONFIGURAZIONE_H qviaggiatreno-2013.7.3/src/utils.cpp0000664000175000017500000000365712215773217017244 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2008-2011 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "utils.h" //funzioni varie per il debug dei nodi DOM QString dumpNodo(QDomNode nodo) { QString temp; QTextStream stream(&temp, QIODevice::WriteOnly); nodo.save(stream, 3); return temp; } void debugNodo(QDomNode nodo) { QMessageBox msg; msg.setTextFormat(Qt::PlainText); msg.setText(dumpNodo(nodo)); msg.exec(); } void debugStringa(QString stringa) { QMessageBox msg; msg.setTextFormat(Qt::PlainText); msg.setText(stringa); msg.exec(); } qviaggiatreno-2013.7.3/src/qviaggiatrenoslots.cpp0000664000175000017500000005220012215773217022015 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2008-2012 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include #include "dialogo_nomestazione.h" #include "dialogo_configurazione.h" #include "schedalistatreni.h" #include "schedastazione.h" #include "schedatreno.h" #include "schedaavvisitrenord.h" #include "qviaggiatreno.h" #include "utils.h" #include "qledindicator.h" // slot void QViaggiaTreno::about() { QMessageBox::about(this, QString::fromUtf8("Informazioni su QViaggiaTreno"), QString::fromUtf8("QViaggiaTreno versione %1\n\n(C) 2008-2012 fra74\n\n%2").arg(s_versione) .arg(QString::fromUtf8("QViaggiaTreno è un'interfaccia a ViaggiaTreno, il servizio web di Trenitalia per monitorare la marcia dei treni passeggeri\n\n" "Questo programma è distribuito secondo i termini della licenza GNU GPL v.2" "\n\nQViaggiaTreno utilizza il widget 'QLedIndicator' scritto da 'Tn'"))); } void QViaggiaTreno::visualizzaLicenza() { if (!m_licenseDialog) { //costruzione della finestra di dialogo solo se non è già stata costruita precedentemente m_licenseDialog = new QDialog(this); m_licenseDialog->setWindowTitle(QString::fromUtf8("Testo licenza GNU GPL v.2")); QVBoxLayout *vbox = new QVBoxLayout; QTextEdit *textEdit = new QTextEdit(m_licenseDialog); //imposta una larghezza minima per leggere decentemente il testo della licenza //senza eccessivo a capo textEdit->setMinimumWidth(500); vbox->addWidget(textEdit); QPushButton *button = new QPushButton(QString::fromUtf8("Ok"), this); vbox->addWidget(button, 0, Qt::AlignCenter); m_licenseDialog->setLayout(vbox); connect(button, SIGNAL(clicked()), m_licenseDialog, SLOT(accept())); //lettura del file di testo contenente il testo della licenza GPL textEdit->setReadOnly(true); textEdit->setCursorWidth(0); //cursore non visibile QString linea; QFile testoLicenza(":/doc/GPL-2.txt"); testoLicenza.open(QFile::ReadOnly); QString txt = testoLicenza.readAll(); textEdit->insertPlainText(txt); //riporta il cursore all'inizio del documento textEdit->moveCursor(QTextCursor::Start); } m_licenseDialog->show(); } //avvia il monitoraggio nella scheda corrente void QViaggiaTreno::avvia() { schedaCorrente()->avvia(); //attiva/disattiva le azioni coerentemente con il fatto che nella scheda corrente ora il monitoraggio è attivo m_avviaAct->setDisabled(true); m_fermaAct->setEnabled(true); statusBar()->showMessage(QString::fromUtf8("Monitoraggio avviato nella scheda '%1'").arg(schedaCorrente()->titolo()), 3000); } void QViaggiaTreno::ferma() { schedaCorrente()->ferma(); //attiva/disattiva le azioni coerentemente con il fatto che nella scheda corrente ora il monitoraggio è attivo m_avviaAct->setEnabled(true); m_fermaAct->setDisabled(true); statusBar()->showMessage(QString::fromUtf8("Monitoraggio fermato nella scheda '%1'").arg(schedaCorrente()->titolo()), 3000); } //slot //crea una nuova scheda per il monitoraggio di un treno void QViaggiaTreno::nuovoTreno() { bool ok; int num = QInputDialog::getInt(this, QString::fromUtf8("Monitoraggio treno"), QString::fromUtf8("Inserire il numero del treno da monitorare con ViaggiaTreno"), 0, 1, 99999, 1, &ok); if (ok) { //converte il numero del treno in una stringa QString numero; numero.setNum(num); nuovoTreno(numero); } } void QViaggiaTreno::nuovaStazione() { //ordina la lista delle stazioni già monitorate QStringList listaOrdinata = m_listaStazioniMonitorate; listaOrdinata.sort(); DialogoNomeStazione *dialogo = new DialogoNomeStazione(this, listaOrdinata); // QString stazione = QInputDialog::getItem(this, QString::fromUtf8("Monitoraggio stazione"), QString::fromUtf8("Inserire il nome della stazione da monitorare con ViaggiaTreno:"), listaOrdinata, -1, true, &ok); if (dialogo->exec()) { QString stazione = dialogo->nomeStazione(); //verifica che non ci sia già una scheda aperta per questa stazione //se esiste allora la relativa scheda diventerà la scheda corrente QMapIterator it(m_listaSchede); while (it.hasNext()) { it.next(); //la scheda è una scheda di stazione? if (it.value()->tipoScheda() == SchedaQViaggiaTreno::tsStazione) { SchedaStazione *scheda = qobject_cast(it.value()); if (!QString::compare(stazione, scheda->nomeStazione(), Qt::CaseInsensitive)) { m_schede->setCurrentWidget(scheda); return; } } } //non ci sono schede già aperte, aprine una nuova nuovaStazione(stazione, !(dialogo->cercaTutteStazioni())); } delete dialogo; } SchedaTreno* QViaggiaTreno::nuovoTreno(const QString& treno, int intervallo) { //verifica che non esista già una scheda aperta per questo treno QMapIterator it(m_listaSchede); while (it.hasNext()) { it.next(); if (it.value()->tipoScheda() == SchedaQViaggiaTreno::tsTreno) { SchedaTreno* scheda = qobject_cast(it.value()); // c'è un problema //supponiamo di avere un treno con numero ambiguo (esempio 518) //apro la scheda per il 518 su rete RFI //ma se poi controllo solo il numero treno allora non potrò mai aprire una scheda //per quello su rete FNM //workaround: controllo che il codice origine sia nullo, in tal caso impedisco //l'apertura di una nuova scheda if (!QString::compare(treno, scheda->numero()) && (scheda->codiceOrigine().isEmpty())) { //esiste già una scheda con questo nome, selezionala ed esci m_schede->setCurrentWidget(scheda); return 0L; } } } //crea la scheda della stazione SchedaTreno *scheda = new SchedaTreno(this, treno); //aggiorna la lista delle schede e degli item m_listaSchede.insert(scheda->idScheda(), scheda); //cambia intervallo di aggiornamento se intervallo != 0 if (intervallo) scheda->impostaIntervallo(intervallo); //aggiorna la scheda e avvia il timer scheda->aggiorna(); scheda->avvia(); //aggiunge la scheda al tabwidget assicurandosi che diventi la scheda corrente m_schede->addTab(scheda, QIcon(":/img/treno.png"), scheda->titolo()); m_schede->setCurrentWidget(scheda); return scheda; } //crea una nuova scheda Treno specificando anche il codice di origine SchedaTreno* QViaggiaTreno::nuovoTreno(const QString& treno, const QString &codiceOrigine, int intervallo) { //verifica che non esista già una scheda aperta per questo treno QMapIterator it(m_listaSchede); while (it.hasNext()) { it.next(); if (it.value()->tipoScheda() == SchedaQViaggiaTreno::tsTreno) { SchedaTreno* scheda = qobject_cast(it.value()); if (!QString::compare(treno, scheda->numero()) && !QString::compare(codiceOrigine, scheda->codiceOrigine())) { //esiste già una scheda con questo nome, selezionala ed esci m_schede->setCurrentWidget(scheda); return 0L; } } } //crea la scheda della stazione SchedaTreno *scheda = new SchedaTreno(this, treno); //aggiorna la lista delle schede m_listaSchede.insert(scheda->idScheda(), scheda); //cambia intervallo di aggiornamento se intervallo != 0 if (intervallo) scheda->impostaIntervallo(intervallo); // il metodo cambiaCodiceOrigine automaticamente avvia la scheda scheda->cambiaCodiceOrigine(codiceOrigine); //aggiorna la scheda e avvia il timer //scheda->aggiorna(); //scheda->avvia(); //aggiunge la scheda al tabwidget assicurandosi che diventi la scheda corrente m_schede->addTab(scheda, QIcon(":/img/treno.png"), scheda->titolo()); m_schede->setCurrentWidget(scheda); return scheda; } SchedaStazione* QViaggiaTreno::nuovaStazione(const QString& stazione, bool nomeEsatto, int intervallo, bool nonAvviare) { //verifica che non esista già una scheda aperta per questa stazione QMapIterator it(m_listaSchede); while (it.hasNext()) { it.next(); if (it.value()->tipoScheda() == SchedaQViaggiaTreno::tsStazione) { SchedaStazione* scheda = qobject_cast(it.value()); if (!QString::compare(stazione, scheda->nomeStazione())) { //esiste già una scheda con questo nome, selezionala ed esci m_schede->setCurrentWidget(scheda); return 0L; } } } //verifica che la stazione non sia già nella lista delle stazioni monitorate if (!m_listaStazioniMonitorate.contains(stazione, Qt::CaseInsensitive)) { //aggiunge la stazione alla lista delle stazioni monitorate, assicurandosi di non superare //il massimo numero di stazioni previste if (m_listaStazioniMonitorate.size() < maxStazioni) m_listaStazioniMonitorate.append(stazione); else { m_listaStazioniMonitorate.removeFirst(); m_listaStazioniMonitorate.append(stazione); } } //se nel nome è presente un accento, sostituiscilo con l'entità QString temp = stazione; temp.replace("'", "'"); //crea la scheda della stazione SchedaStazione *scheda = new SchedaStazione(this, temp, nomeEsatto); //aggiorna la lista delle schede e degli item m_listaSchede.insert(scheda->idScheda(), scheda); //cambia intervallo di aggiornamento se intervallo != 0 if (intervallo) scheda->impostaIntervallo(intervallo); //aggiorna la scheda e avvia il timer if (!nonAvviare) { scheda->aggiorna(); scheda->avvia(); } //aggiunge la scheda al tabwidget assicurandosi che diventi la scheda corrente m_schede->addTab(scheda, QIcon(":/img/stazione.png"), scheda->titolo()); m_schede->setCurrentWidget(scheda); return scheda; } SchedaListaTreni* QViaggiaTreno::nuovaListaTreni() { //crea la scheda per la nuova lista dei treni SchedaListaTreni* scheda = new SchedaListaTreni(this); //aggiorna la lista delle schede m_listaSchede.insert(scheda->idScheda(), scheda); //aggiorna la scheda e avvia il timer scheda->aggiorna(); scheda->avvia(); //aggiunge la scheda al tabwidget assicurandosi che diventi la scheda corrente m_schede->addTab(scheda, QIcon(":/img/listatreni.png"), scheda->titolo()); m_schede->setCurrentWidget(scheda); //sincronizza la GUI con la scheda sincronizzaGUI(scheda->idScheda()); return scheda; } SchedaAvvisiTrenord* QViaggiaTreno::nuovaSchedaAvvisiTrenord() { //crea la scheda SchedaAvvisiTrenord* scheda = new SchedaAvvisiTrenord(this); //aggiorna la lista delle schede e aggiunge la scheda al tabwidget, //assicurandosi che diventi la scheda corrente m_listaSchede.insert(scheda->idScheda(), scheda); m_schede->addTab(scheda, QIcon(":img/trenord.png"), scheda->titolo()); m_schede->setCurrentWidget(scheda); //avvia la scheda ed aggiorna il timer scheda->aggiorna(); scheda->avvia(); sincronizzaGUI(scheda->idScheda()); //disattiva la voce di menu per creare scheda avvisi trenord visto che non ha senso averne più di una m_avvisiTrenordAct->setDisabled(true); return scheda; } void QViaggiaTreno::chiudiScheda(int id) { //ottiene un puntatore alla scheda corrente SchedaQViaggiaTreno *scheda = qobject_cast(m_schede->widget(id)); if (scheda) { //rimuove la scheda dal tab widget m_schede->removeTab(id); //elimina scheda dalle rispettiva lista m_listaSchede.remove(scheda->idScheda()); //verifica se la scheda era la scheda con gli avvisi Trenord //ed in caso positivo riabilita la corrispondente voce di menu if (scheda->tipoScheda() == SchedaQViaggiaTreno::tsAvvisiTrenord) m_avvisiTrenordAct->setEnabled(true); //infine cancella scheda e item delete scheda; } } //questo slot viene richiamato quando cambia la scheda selezionata //questo può succedere quando viene chiusa la scheda corrente, //o quando ne viene selezionata un'altra cliccando sulla rispettiva linguetta void QViaggiaTreno::schedaCambiata(int indice) { //nasconde menu specifico per schede m_trenoMenu->menuAction()->setVisible(false); m_stazioneMenu->menuAction()->setVisible(false); m_listaTreniMenu->menuAction()->setVisible(false); //nascondi anche la Toolbar m_listaToolbar->setVisible(false); if (indice == -1) //non ci sono più schede, disattiva tutti i controlli { m_avviaAct->setDisabled(true); m_avviaTutteAct->setDisabled(true); m_fermaAct->setDisabled(true); m_fermaTutteAct->setDisabled(true); m_aggiornaAct->setDisabled(true); m_intervalloAct->setDisabled(true); m_spinIntervalloAct->setDisabled(true); m_esportaSchedaAct->setDisabled(true); m_stampaSchedaAct->setDisabled(true); setWindowTitle(QString::fromUtf8("QViaggiaTreno")); return; } //ottiene un puntatore alla scheda corrente SchedaQViaggiaTreno *scheda = qobject_cast(m_schede->currentWidget()); //cambia titolo della finestra di QViaggiaTreno setWindowTitle(QString::fromUtf8("QViaggiaTreno - %1").arg(scheda->titolo())); //attiva/disattiva le azioni che non dipendono dallo stato della scheda m_avviaTutteAct->setEnabled(true); m_fermaTutteAct->setEnabled(true); m_aggiornaAct->setEnabled(true); m_intervalloAct->setEnabled(true); m_spinIntervalloAct->setEnabled(true); m_spinIntervallo->setValue(scheda->intervallo()); //attiva/disattiva le azioni che dipendono dallo stato della scheda if (scheda->fermata()) { m_avviaAct->setEnabled(true); m_fermaAct->setEnabled(false); } else { m_avviaAct->setEnabled(false); m_fermaAct->setEnabled(true); } m_esportaSchedaAct->setEnabled(scheda->esportabile()); m_stampaSchedaAct->setEnabled(scheda->stampabile()); //attiva/disattiva azioni o menu a seconda del tipo di scheda e dello stato della scheda switch(scheda->tipoScheda()) { //non visualizzare il menu a tendina treno perché attualmente è senza voci case SchedaQViaggiaTreno::tsTreno: m_trenoMenu->menuAction()->setVisible(false); break; case SchedaQViaggiaTreno::tsStazione: m_stazioneMenu->menuAction()->setVisible(true); break; case SchedaQViaggiaTreno::tsListaTreni: { m_listaTreniMenu->menuAction()->setVisible(true); m_listaToolbar->setVisible(true); }; break; case SchedaQViaggiaTreno::tsAvvisiTrenord: break; } } //Questo slot viene chiamato se l'utente ha scelto di modificare l'intervallo di aggiornamento //attraverso la corrispondente voce di menu void QViaggiaTreno::modificaIntervallo() { bool Ok; SchedaQViaggiaTreno *scheda = schedaCorrente(); int intervallo = QInputDialog::getInt(this, QString::fromUtf8("Modifica intervallo di aggiornamento"), QString::fromUtf8("Inserire il nuovo intervallo di aggiornamento in minuti:"), scheda->intervallo(), 1, 1440, 1, &Ok); if (Ok) { scheda->impostaIntervallo(intervallo); m_spinIntervallo->setValue(intervallo); } } //Questo slot viene richiamato quando si modifica l'intervallo di aggiornamento attraverso la spin box void QViaggiaTreno::modificaIntervalloConSpinBox(int valore) { schedaCorrente()->impostaIntervallo(valore); } //questo slot viene richiamato quando lo stato di una scheda cambia void QViaggiaTreno::aggiornaStatoScheda(quint32 idScheda) { SchedaQViaggiaTreno *scheda = m_listaSchede.value(idScheda); //attiva/disattiva pulsanti per fermare/riavviare il timer a seconda dello stato della scheda... m_avviaAct->setEnabled(scheda->fermata()); m_fermaAct->setDisabled(scheda->fermata()); } //la scheda ha emesso un segnale per avvisare che la GUI potrebbe non essere più sincronizzata //con lo stato della scheda. Questo slot si occupa di risincronizzare lo stato della //GUI con quello della scheda void QViaggiaTreno::sincronizzaGUI(quint32 idScheda) { //ottieni puntatore alla scheda SchedaQViaggiaTreno *scheda = m_listaSchede.value(idScheda); switch(scheda->tipoScheda()) { case SchedaQViaggiaTreno::tsListaTreni: { SchedaListaTreni* listaTreni = qobject_cast(scheda); //se la lista non è modificata disattiva l'azione per salvare if (!listaTreni->modificata()) m_salvaAct->setDisabled(true); else m_salvaAct->setEnabled(true); //disattiva le azioni per rimuovere uno o più treni se la lista dei treni è vuota if (listaTreni->numeroTreni()== 0) { m_rimuoviTrenoAct->setDisabled(true); m_rimuoviTuttiAct->setDisabled(true); } else { m_rimuoviTrenoAct->setEnabled(true); m_rimuoviTuttiAct->setEnabled(true); } }; break; default: ; //per le altre tipologie di schede non c'è bisogno di far niente } } //slot //mostra un messaggio nella status bar void QViaggiaTreno::mostraMessaggioStatusBar(const QString& msg) { statusBar()->showMessage(msg); } //slot //mostra la finestra di dialogo di configurazione void QViaggiaTreno::configura() { DialogoConfigurazione *dlg = new DialogoConfigurazione(this); dlg->impostaConfigurazione(); if (dlg->exec()) { dlg->applicaConfigurazione(); //reimposta il proxy impostaProxy(); } delete dlg; } //aggiorna la scheda corrente void QViaggiaTreno::aggiorna() { schedaCorrente()->aggiorna(); } //ferma tutte le schede void QViaggiaTreno::fermaTutte() { SchedaQViaggiaTreno* scheda; foreach(scheda, m_listaSchede) scheda->ferma(); } void QViaggiaTreno::avviaTutte() { SchedaQViaggiaTreno* scheda; foreach(scheda, m_listaSchede) scheda->avvia(); } //Questo slot viene richiamato durante il controllo periodico del corretto funzionamento di viaggiatreno void QViaggiaTreno::statoViaggiaTrenoCambiato(bool stato) { //attiva/disattiva la voce del menu a seconda dello stato della comunicazione con VT m_riprovaComunicazioneConVTAct->setDisabled(stato); //cambia lo stato del LED m_ledStatoViaggiaTreno->setChecked(stato); //cambia il tooltip if (stato) m_ledStatoViaggiaTreno->setToolTip(QString::fromUtf8("ViaggiaTreno funziona normalmente")); else m_ledStatoViaggiaTreno->setToolTip(QString::fromUtf8("ViaggiaTreno al momento non sembra funzionare")); } //stampa la scheda corrente richiamandone il rispettivo metodo void QViaggiaTreno::stampaSchedaCorrente() { schedaCorrente()->stampa(); } //esporta la scheda corrente chiamandone il rispettivo metodo void QViaggiaTreno::esportaSchedaCorrente() { schedaCorrente()->esporta(); } qviaggiatreno-2013.7.3/src/download_trenord.cpp0000664000175000017500000001006412215771022021426 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2010-2012 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "download_trenord.h" #include "schedaviaggiatreno.h" #include "qviaggiatreno.h" //TODO Rimuvovere l'include seguente quando non è più necessario fare debug #include "utils.h" #include "parser_trenord.h" DownloadTrenord::DownloadTrenord(QViaggiaTreno *qvt, QNetworkAccessManager *nam) { m_qvt = qvt; m_nam = nam; m_parser = 0L; m_timerAvvisi = new QTimer(this); } //richiede al sito webTrenord la pagina con la lista delle direttrici void DownloadTrenord::aggiornaListaDirettrici() { QNetworkRequest request; //invia una richiesta HTTP GET per scaricare la pagina con la lista delle direttrici request.setUrl(QUrl("http://www.trenord.it/mobile/it/breaking-news.aspx")); request.setOriginatingObject(sender()); QNetworkReply* reply = m_nam->get(request); connect(reply, SIGNAL(finished()), this, SLOT(downloadFinito())); } void DownloadTrenord::downloadFinito() { QNetworkReply* reply = qobject_cast(sender()); QString risposta = QString::fromUtf8(reply->readAll()); //recupera il puntatore della scheda che ha inviato la richiesta di download SchedaQViaggiaTreno *scheda = qobject_cast(reply->request().originatingObject()); //controlla se la scheda è aperta, se lo è richiama il metodo downloadFinito della scheda if (m_qvt->schedaAperta(scheda)) scheda->downloadFinito(risposta); reply->deleteLater(); } void DownloadTrenord::scaricaAvvisi(ParserTrenord *parser) { m_parser = parser; m_coda = parser->listaDirettrici(); if (!m_coda.count()) //non ci sono nuovi avvisi da scaricare, inutile continuare return; //imposta il timer //TODO: per il momento scarica gli avvisi con un intervallo fisso di 1 s, successivamente da configurare m_timerAvvisi->setInterval(1000); connect(m_timerAvvisi, SIGNAL(timeout()), this, SLOT(scaricaNuovaDirettrice())); m_timerAvvisi->start(); } //questo slot viene richiamato dal timer. Ad ogni esecuzione preleva l'indirizzo della pagina di una direttrice //corregge l'url aggiungendo http://www.trenord.it //e avvia il download della pagina //se non ci sono più direttrici allora semplicemente interrompe il timeout ed esce void DownloadTrenord::scaricaNuovaDirettrice() { //controlla che ci siano ancora direttrici da scaricare ed in caso negativo //arresta il timer ed esce if (!m_coda.count()) { //TODO: questo e' il punto in cui si può aggiornare il modello! disconnect(m_timerAvvisi); m_timerAvvisi->stop(); return; } QString url = QString("http://www.trenord.it%1").arg(m_coda.dequeue()); } qviaggiatreno-2013.7.3/src/qviaggiatrenoslots_schede.cpp0000664000175000017500000000717612215773056023345 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2009-2010 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include #include "schedalistatreni.h" #include "schedastazione.h" #include "schedatreno.h" #include "qviaggiatreno.h" //questo file sorgente raggruppa tutti gli slot richiamati da azioni specifiche per ogni scheda //questo slot viene richiamato quando cambia il nome di una scheda //(per esempio perché si è cambiato nome della stazione void QViaggiaTreno::aggiornaNomeScheda(quint32 idScheda) { SchedaQViaggiaTreno *scheda = m_listaSchede.value(idScheda); m_schede->setTabText(m_schede->indexOf(scheda), scheda->titolo()); } //questo slot viene richiato quando si sceglie la voce per cambiare il nome della stazione //nel menu stazione. La funzione richiama semplicemente la funzione omonima nella scheda corrente void QViaggiaTreno::modificaNomeStazione() { SchedaStazione *scheda = qobject_cast(schedaCorrente()); scheda->modificaNomeStazione(); } //questo slot viene richiamato quando si sceglie la voce "apri" nel menu specifico di una scheda //lo slot richiama semplicemente la funzione corrispondente della scheda void QViaggiaTreno::apri() { //per il momento solo la scheda lista treni ha una funzione apri, non c'è bisogno di //"indovinare" il tipo della scheda SchedaListaTreni *scheda = qobject_cast(schedaCorrente()); scheda->apri(); } void QViaggiaTreno::salva() { SchedaListaTreni *scheda = qobject_cast(schedaCorrente()); scheda->salva(); } void QViaggiaTreno::salvaConNome() { SchedaListaTreni *scheda = qobject_cast(schedaCorrente()); scheda->salvaConNome(); } void QViaggiaTreno::aggiungiTreni() { SchedaListaTreni *scheda = qobject_cast(schedaCorrente()); scheda->aggiungiTreni(); } void QViaggiaTreno::rimuoviTreni() { SchedaListaTreni *scheda = qobject_cast(schedaCorrente()); scheda->rimuoviTreni(); } void QViaggiaTreno::rimuoviTuttiITreni() { SchedaListaTreni *scheda = qobject_cast(schedaCorrente()); scheda->rimuoviTuttiITreni(); } void QViaggiaTreno::impostaTitolo() { SchedaListaTreni *scheda = qobject_cast(schedaCorrente()); scheda->impostaTitolo(); } qviaggiatreno-2013.7.3/src/items.cpp0000664000175000017500000000340112215773056017211 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2009-2010 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "items.h" //confronta il testo di due listwidgetitem, convertendolo in int //in modo da ordinarli numericamente e non alfabeticamente bool SortedAsIntListWidgetItem::operator < (const QListWidgetItem& item) const { //assume che text() si possa convertire in int return (text().toInt() < item.text().toInt()); } qviaggiatreno-2013.7.3/src/dialogo_configurazione.h0000664000175000017500000000420712215773056022262 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2010 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef DIALOGO_CONFIGURAZIONE_H #define DIALOGO_CONFIGURAZIONE_H #include "ui_dlgconfigurazione.h" #include "config.h" class QViaggiaTreno; class DialogoConfigurazione: public QDialog, private Ui::dlgConfigurazione { Q_OBJECT public: DialogoConfigurazione(QViaggiaTreno *qvt); void impostaConfigurazione(); void applicaConfigurazione(); private slots: void pulsantePremuto(QAbstractButton* pulsante); void checkBoxAutenticazioneCliccato(bool selezionato); void checkBoxUsareProxyCliccato(bool selezionato); void checkBoxUsareProxySistemaCliccato(bool selezionato); private: void ripristinaValoriPredefiniti(); QViaggiaTreno* m_qvt; }; #endif // DIALOGO_CONFIGURAZIONE_H qviaggiatreno-2013.7.3/src/download_viaggiatreno.cpp0000664000175000017500000003404212215773217022442 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2010-2011 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "qviaggiatreno.h" #include "download_viaggiatreno.h" #include "schedaviaggiatreno.h" DownloadViaggiaTreno::DownloadViaggiaTreno(QViaggiaTreno* qvt, QNetworkAccessManager *nam) { m_nam = nam; m_qvt = qvt; //crea e connette i timer m_timerDownload = new QTimer(this); m_timerControlloVT = new QTimer(this); connect(m_timerControlloVT, SIGNAL(timeout()), this, SLOT(controllaViaggiaTreno())); connect(m_timerDownload, SIGNAL(timeout()), this, SLOT(download())); } QString DownloadViaggiaTreno::correggiOutputVT(QString testoVT) { //effettua alcune sostituzione nel codice XHTML generato da ViaggiaTreno, che NON è valido //sostituisci
con
QString temp = testoVT.simplified(); //sostutuisce l'entità per gli accenti.... temp.replace("'", "'"); //sostituisce gli ampersend negli URL con & temp.replace("&", "&"); // sostituisce
con
temp.replace("
", "
"); temp.replace("

", "


"); return temp; } //slot // questo slot viene richiamato ad intervalli prefissati //lo slot controlla se ci sono altre richieste di schede da caricare in coda, in caso positivo scarica la prima e richiama la funzione //privata più opportuna per impostare la richiesta HTTP //in futuro in questo slot si verificherà anche se la scheda è già nella cache void DownloadViaggiaTreno::download() { // se non ci sono richieste in coda esce immediatamente if (!m_codaDownload.count()) return; //altrimenti prende il primo elemento in coda DownloadViaggiaTrenoItem * item = m_codaDownload.dequeue(); //individua il tipo di scheda richiesta a viaggiaTreno e richiama la funzione privata giusta //per generare la richiesta HTTP switch(item->tipoScheda()) { case StazioneConNome: richiestaHTTPStazioneConNome(item); break; case StazioneConCodice: richiestaHTTPStazioneConCodice(item); break; case RiepilogoTreno: richiestaHTTPRiepilogoTreno(item); break; case RiepilogoTrenoConOrigine: richiestaHTTPRiepilogoTrenoConOrigine(item); break; case DettagliTreno: richiestaHTTPDettagliTreno(item); break; case DettagliTrenoConOrigine: richiestaHTTPDettagliTrenoConOrigine(item); } } // slot richiamati dalle schede per mettere in coda un download void DownloadViaggiaTreno::downloadStazione(quint32 idScheda, const QString &nomeStazione) { DownloadViaggiaTrenoItem *item = new DownloadViaggiaTrenoItem(idScheda, StazioneConNome); item->impostaDato("NomeStazione", nomeStazione); m_codaDownload.enqueue(item); } void DownloadViaggiaTreno::downloadStazioneCodice(quint32 idScheda, const QString &codiceStazione) { DownloadViaggiaTrenoItem *item = new DownloadViaggiaTrenoItem(idScheda, StazioneConCodice); item->impostaDato("CodiceStazione", codiceStazione); m_codaDownload.enqueue(item); } void DownloadViaggiaTreno::downloadRiepilogoTreno(quint32 idScheda, const QString &numero) { DownloadViaggiaTrenoItem *item = new DownloadViaggiaTrenoItem(idScheda, RiepilogoTreno); item->impostaDato("Numero", numero); m_codaDownload.enqueue(item); } void DownloadViaggiaTreno::downloadRiepilogoTreno(quint32 idScheda, const QString &numero, const QString &codiceStazOrigine) { DownloadViaggiaTrenoItem *item = new DownloadViaggiaTrenoItem(idScheda, RiepilogoTrenoConOrigine); item->impostaDato("Numero", numero); item->impostaDato("CodiceStazione", codiceStazOrigine ); m_codaDownload.enqueue(item); } void DownloadViaggiaTreno::downloadDettagliTreno(quint32 idScheda, const QString &numero) { DownloadViaggiaTrenoItem * item = new DownloadViaggiaTrenoItem(idScheda, DettagliTreno); item->impostaDato("Numero", numero); m_codaDownload.enqueue(item); } void DownloadViaggiaTreno::downloadDettagliTreno(quint32 idScheda, const QString &numero, const QString &codiceStazOrigine) { DownloadViaggiaTrenoItem * item = new DownloadViaggiaTrenoItem(idScheda, DettagliTrenoConOrigine); item->impostaDato("Numero", numero); item->impostaDato("CodiceStazione", codiceStazOrigine ); m_codaDownload.enqueue(item); } //costruisce un'istanza della classe DownloadViaggiaTrenoItem DownloadViaggiaTrenoItem::DownloadViaggiaTrenoItem(quint32 idScheda, TipoSchedaViaggiaTreno tipoScheda) { m_scheda = idScheda; m_tipoSchedaVT = tipoScheda; //imposta data/ora richiesta m_dataEOra = QDateTime::currentDateTime(); } //invia richiesta HTTP al server di ViaggiaTreno per ottenere la scheda della stazione, fornendo come parametro il nome della stazione void DownloadViaggiaTreno::richiestaHTTPStazioneConNome(DownloadViaggiaTrenoItem *item) { QNetworkRequest request; QString dati; dati = QString("stazione=%1").arg(item->dato("NomeStazione")); dati.replace(" ", "+"); // request.setUrl(QUrl("http://mobile.viaggiatreno.it/viaggiatreno/mobile/stazione?lang=IT")); request.setUrl(QUrl("http://mobile.viaggiatreno.it/vt_pax_internet/mobile/stazione?lang=IT")); request.setRawHeader("Content-type", "application/x-www-form-urlencoded"); request.setOriginatingObject(item); QNetworkReply *reply = m_nam->post(request, dati.toUtf8()); connect(reply, SIGNAL(finished()), this, SLOT(downloadEffettuato())); } //invia richiesta HTTP al server di ViaggiaTreno per ottenere la scheda della stazione, fornendo come parametro il codice della stazione void DownloadViaggiaTreno::richiestaHTTPStazioneConCodice(DownloadViaggiaTrenoItem *item) { QNetworkRequest request; QString dati; dati = QString("codiceStazione=%1").arg(item->dato("CodiceStazione")); dati.replace(" ", "+"); //request.setUrl(QUrl("http://mobile.viaggiatreno.it/viaggiatreno/mobile/stazione?lang=IT")); request.setUrl(QUrl("http://mobile.viaggiatreno.it/vt_pax_internet/mobile/stazione?lang=IT")); request.setRawHeader("Content-type", "application/x-www-form-urlencoded"); request.setOriginatingObject(item); QNetworkReply *reply = m_nam->post(request, dati.toUtf8()); connect(reply, SIGNAL(finished()), this, SLOT(downloadEffettuato())); } //invia richiesta HTTP a ViaggiaTreno per ottenere la scheda di un treno dato il suo numero void DownloadViaggiaTreno::richiestaHTTPRiepilogoTreno(DownloadViaggiaTrenoItem *item) { QNetworkRequest request; QString str; str = QString("numeroTreno=%1&tipoRicerca=numero&lang=IT").arg(item->dato("Numero")); // request.setUrl(QUrl("http://mobile.viaggiatreno.it/viaggiatreno/mobile/numero")); request.setUrl(QUrl("http://mobile.viaggiatreno.it/vt_pax_internet/mobile/numero")); request.setRawHeader("Content-type", "application/x-www-form-urlencoded"); request.setOriginatingObject(item); QNetworkReply *reply = m_nam->post(request, str.toUtf8()); connect(reply, SIGNAL(finished()), this, SLOT(downloadEffettuato())); } //invia richiesta HTTP a ViaggiaTreno per ottenere la scheda di un treno dato il suo numero //ed il codice della stazione di origine void DownloadViaggiaTreno::richiestaHTTPRiepilogoTrenoConOrigine(DownloadViaggiaTrenoItem *item) { QNetworkRequest request; QString str; str = QString("cbxTreno=%1;").arg(item->dato("Numero")); str += QString("%1&tipoRicerca=numero&lang=IT").arg(item->dato("CodiceStazione")); //request.setUrl(QUrl("http://mobile.viaggiatreno.it/viaggiatreno/mobile/numero")); request.setUrl(QUrl("http://mobile.viaggiatreno.it/vt_pax_internet/mobile/numero")); request.setRawHeader("Content-type", "application/x-www-form-urlencoded"); request.setOriginatingObject(item); QNetworkReply *reply = m_nam->post(request, str.toUtf8()); connect(reply, SIGNAL(finished()), this, SLOT(downloadEffettuato())); } //invia richiesta HTTP a ViaggiaTreno per ottenere la scheda con i dettagli di un treno dato il suo numero void DownloadViaggiaTreno::richiestaHTTPDettagliTreno(DownloadViaggiaTrenoItem *item) { QNetworkRequest request; // request.setUrl(QUrl(QString("http://mobile.viaggiatreno.it/viaggiatreno/mobile/scheda?dettaglio=visualizza&numeroTreno=%1&tipoRicerca=numero&lang=IT").arg(item->dato("Numero")))); request.setUrl(QUrl(QString("http://mobile.viaggiatreno.it/vt_pax_internet/mobile/scheda?dettaglio=visualizza&numeroTreno=%1&tipoRicerca=numero&lang=IT").arg(item->dato("Numero")))); request.setOriginatingObject(item); QNetworkReply *reply = m_nam->get(request); connect(reply, SIGNAL(finished()), this, SLOT(downloadEffettuato())); } //invia richiesta HTTP a ViaggiaTreno per ottenere la scheda con i dettagli di un treno //dati il suo numero ed il codice della stazione di origine void DownloadViaggiaTreno::richiestaHTTPDettagliTrenoConOrigine(DownloadViaggiaTrenoItem *item) { QNetworkRequest request; // request.setUrl(QUrl(QString("http://mobile.viaggiatreno.it/viaggiatreno/mobile/scheda?dettaglio=visualizza&numeroTreno=%1&&codLocOrig=%2&tipoRicerca=numero&lang=IT"). request.setUrl(QUrl(QString("http://mobile.viaggiatreno.it/vt_pax_internet/mobile/scheda?dettaglio=visualizza&numeroTreno=%1&&codLocOrig=%2&tipoRicerca=numero&lang=IT"). arg(item->dato("Numero")).arg(item->dato("CodiceStazione")))); request.setOriginatingObject(item); QNetworkReply *reply = m_nam->get(request); connect(reply, SIGNAL(finished()), this, SLOT(downloadEffettuato())); } //slot //questo slot viene chiamato quando un download da ViaggiaTreno è terminato void DownloadViaggiaTreno::downloadEffettuato() { QNetworkReply *reply = qobject_cast(sender()); QString risposta = QString::fromUtf8(reply->readAll()); //il file XHTML generato da viaggiatreno non è sintatticamente corretto, vanno corretti alcuni errori risposta = correggiOutputVT(risposta); // debugStringa(risposta); //ricava l'item corrispondente a questo downloadQNetworkReply DownloadViaggiaTrenoItem * item = qobject_cast(reply->request().originatingObject()); //recupera puntatore alla scheda SchedaQViaggiaTreno* scheda = m_qvt->scheda(item->idScheda()); //se la scheda è ancora aperta richiama la funzione downloadFinito della scheda, altrimenti non fare nulla if (scheda) scheda->downloadFinito(risposta); //in questa sezione andrà aggiunta il testo della scheda alla cache se necessario //l'item non serve più, liberare memoria delete item; //la risposta non serve più, liberare memoria reply->deleteLater(); } //slot //effettua un controllo periodico sul corretto funzionamento del servizio web di viaggiatreno bool DownloadViaggiaTreno::controllaViaggiaTreno() { //prova a scaricare la pagina di query di un treno di ViaggiaTreno QNetworkRequest request; //request.setUrl(QUrl("http://mobile.viaggiatreno.it/viaggiatreno/mobile/")); request.setUrl(QUrl("http://mobile.viaggiatreno.it/vt_pax_internet/mobile")); QNetworkReply *reply = m_nam->get(request); // usa un event loop per effettuare una richiesta sincrona QEventLoop loop; connect(reply, SIGNAL(finished()), &loop, SLOT(quit())); //ed usa un timer singleshot per il timeout QTimer::singleShot(m_qvt->configurazione().intervalloControlloVT()*1000, &loop, SLOT(quit())); //esegui l'event loop loop.exec(); //si è usciti dal loop o perché c'è stato un timeout o perché il download si è concluso positivamente //verifica se non si è concluso positivamente if (reply->error()!= QNetworkReply::NoError) { emit statoViaggiaTreno(false); //ferma i donwload da ViaggiaTreno m_timerDownload->stop(); return false; } else { //il download sembra essersi concluso positivamente, estraiamo il codice HTML QString paginaVT = QString::fromUtf8(reply->readAll()); //e cerchiamo se la pagina contiene il testo "Numero treno" if (paginaVT.contains("Numero treno")) { emit statoViaggiaTreno(true); return true; } else { emit statoViaggiaTreno(false); //ferma i donwload da ViaggiaTreno m_timerDownload->stop(); return false; } } } //avvia il downloader void DownloadViaggiaTreno::avvia() { //inizializza i timer m_timerDownload->setInterval(m_qvt->configurazione().intervalloQueryVT()*1000); m_timerControlloVT->setInterval(m_qvt->configurazione().intervalloControlloVT()*60*1000); //avvia il timer per il controllo periodico del funzionamento di ViaggiaTreno m_timerControlloVT->start(); //esegue un controllo preliminare sul funzionamento di Viaggiatreno if (!controllaViaggiaTreno()) // viaggiatreno non funziona return; else m_timerDownload->start(); } qviaggiatreno-2013.7.3/src/parser_viaggiatreno_lista.h0000664000175000017500000000313412215773056022767 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2010-2011 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef PARSER_VIAGGIATRENO_LISTA_H #define PARSER_VIAGGIATRENO_LISTA_H #include class SchedaQViaggiaTreno; #endif // PARSER_VIAGGIATRENO_LISTA_H qviaggiatreno-2013.7.3/src/parser_viaggiatreno_base.cpp0000664000175000017500000000424212214355774023123 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2010-2013 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "parser_viaggiatreno_base.h" //sostituisce il nome della stazione per ovviare ad alcuni bug di ViaggiaTreno che fanno si che in //alcuni casi i nomi delle stazioni siano incoerenti //per esempio sulla rete FNM i treni vengono riportati con origine destinazione "M N Cadorna" ma poi // non esiste tale stazione in ViaggiaTreno, bensì "Milano Nord Cadorna" QString ParserViaggiaTrenoBase::sostituisciNomeStazione(const QString &nome) { if (nome.contains("M N CADORNA")) return QString(nome).replace("M N CADORNA", "MILANO NORD CADORNA", Qt::CaseInsensitive); if (nome.contains("CAMNAGO LENTATE")) return QString(nome).replace("CAMNAGO LENTATE", "CAMNAGO-LENTATE", Qt::CaseInsensitive); return nome; } qviaggiatreno-2013.7.3/src/qviaggiatreno.h0000664000175000017500000001304412215773217020400 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2008-2010 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef QVIAGGIATRENO_H #define QVIAGGIATRENO_H #include #include #include "config.h" class SchedaStazione; class SchedaTreno; class SchedaListaTreni; class SchedaAvvisiTrenord; class SchedaQViaggiaTreno; class DownloadViaggiaTreno; class DownloadTrenord; class QLedIndicator; class QViaggiaTreno:public QMainWindow { Q_OBJECT public: QViaggiaTreno(); ~QViaggiaTreno(); //restituisce un puntatore al QNetworkAccessManager che è globale per l'applicazione QNetworkAccessManager* networkAccessManager() {return m_nam;} //restituisce un puntatore alla classe per il download da viaggiatreno DownloadViaggiaTreno * downloadViaggiaTreno() {return m_downloadViaggiaTreno;} //restituisce un puntatore alla classe per il download dal sito Trenord DownloadTrenord* downloadTrenord() {return m_downloadTrenord;} //restituisce un puntatore ad una scheda dato il suo id SchedaQViaggiaTreno* scheda(quint32 id); //restituisce true se il puntatore punta ad una scheda ancora aperta bool schedaAperta(SchedaQViaggiaTreno* scheda); Configurazione& configurazione() {return m_configurazione;} protected: private slots: void about(); void visualizzaLicenza(); void nuovaStazione(); SchedaStazione* nuovaStazione(const QString& stazione, bool nomeEsatto = false, int intervallo = 0, bool nonAvviare = false); SchedaListaTreni* nuovaListaTreni(); SchedaAvvisiTrenord* nuovaSchedaAvvisiTrenord(); void nuovoTreno(); SchedaTreno* nuovoTreno(const QString& numeroTreno, int intervallo = 0); SchedaTreno* nuovoTreno(const QString& numeroTreno, const QString& codiceOrigine, int intervallo = 0); void chiudiScheda(int id); void avvia(); void avviaTutte(); void ferma(); void fermaTutte(); void aggiorna(); void configura(); void schedaCambiata(int indice); void modificaIntervallo(); void modificaIntervalloConSpinBox(int intervallo); void aggiornaStatoScheda(quint32 idScheda); void aggiornaNomeScheda(quint32 idScheda); void sincronizzaGUI(quint32 idScheda); void mostraMessaggioStatusBar(const QString& msg); void stampaSchedaCorrente(); void esportaSchedaCorrente(); //azioni per menu/toolbar specifici per tipo di scheda //implementazione in qviaggiatrenoslots_schede.cpp void modificaNomeStazione(); void apri(); void salva(); void salvaConNome(); void aggiungiTreni(); void rimuoviTreni(); void rimuoviTuttiITreni(); void impostaTitolo(); void statoViaggiaTrenoCambiato(bool); private: void creaWidgetCentrale(); void creaAzioni(); void creaMenu(); void creaToolBar(); void creaStatusBar(); void leggiImpostazioniFinestra(); void ripristinaSchede(); void salvaSchede(); void scriviImpostazioniFinestra(); SchedaQViaggiaTreno * schedaCorrente(); void impostaProxy(); void closeEvent(QCloseEvent *event); QMenu *m_viaggiatrenoMenu, *m_opzioniMenu, *m_helpMenu; QMenu *m_stazioneMenu, *m_trenoMenu, *m_listaTreniMenu; QToolBar *m_mainToolBar, *m_listaToolbar; QAction *m_exitAct, *m_nuovaStazioneAct, *m_nuovoTrenoAct, *m_nuovaListaTreniAct; QAction *m_avvisiTrenordAct; QAction *m_configuraAct; QAction *m_aboutAct, *m_aboutQtAct, *m_licenseAct; QAction *m_fermaAct, *m_avviaAct, *m_fermaTutteAct, *m_avviaTutteAct; QAction *m_aggiornaAct, *m_intervalloAct, *m_aggiungiTrenoAct; QAction *m_riprovaComunicazioneConVTAct; QAction *m_rimuoviTrenoAct, *m_rimuoviTuttiAct, *m_impostaTitoloAct; QAction *m_spinIntervalloAct; QAction *m_cambiaNomeStazioneAct, *m_apriAct, *m_salvaAct, *m_salvaConNomeAct; QAction *m_stampaSchedaAct, *m_esportaSchedaAct; QTabWidget *m_schede; QSpinBox *m_spinIntervallo; QDialog *m_licenseDialog; QLedIndicator *m_ledStatoViaggiaTreno; int maxStazioni; QStringList m_listaStazioniMonitorate; QMap m_listaSchede; DownloadViaggiaTreno* m_downloadViaggiaTreno; DownloadTrenord* m_downloadTrenord; QNetworkAccessManager* m_nam; //impostazioni Configurazione m_configurazione; //numero di versione static QString s_versione; }; #endif qviaggiatreno-2013.7.3/src/schedalistatreni.cpp0000664000175000017500000004312512215773217021424 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2009-2011 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "schedalistatreni.h" #include "download_viaggiatreno.h" #include "qviaggiatreno.h" #include "schedatreno.h" #include "utils.h" int SchedaListaTreni::s_count = 0; SchedaListaTreni::SchedaListaTreni(QViaggiaTreno* parent, const unsigned int intervalloStandard): SchedaQViaggiaTreno(parent, tsListaTreni, intervalloStandard) { s_count++; m_stato = statoNuovaScheda; m_modificata = false; m_titoloLista = ""; m_idTabella = m_idNumeroAmbiguo = -1; //imposta il widget m_widget = new WidgetListaTreni(this); m_idTabella = addWidget(m_widget); setCurrentIndex(m_idTabella); m_widget->impostaTitolo(titolo(true)); m_widget->ridimensionaColonne(); //imposta il parser m_parser = new ParserTrenoViaggiaTreno(this); //imposta connessioni connect(this, SIGNAL(statoCambiato(quint32)), parent, SLOT(aggiornaStatoScheda(quint32))); connect(this, SIGNAL(nomeSchedaCambiato(quint32)), parent, SLOT(aggiornaNomeScheda(quint32))); connect(this, SIGNAL(apriSchedaStazione(const QString&, bool)), parent, SLOT(nuovaStazione(const QString&, bool))); connect(this, SIGNAL(apriSchedaTreno(const QString&)), parent, SLOT(nuovoTreno(const QString&))); connect(this, SIGNAL(GuiNonSincronizzata(quint32)), parent, SLOT(sincronizzaGUI(quint32))); connect(this, SIGNAL(messaggioStatus(const QString&)), parent, SLOT(mostraMessaggioStatusBar(const QString&))); connect(this, SIGNAL(downloadRiepilogoTreno(quint32, QString)), qViaggiaTreno()->downloadViaggiaTreno(), SLOT(downloadRiepilogoTreno(quint32, QString))); connect(this, SIGNAL(downloadRiepilogoTreno(quint32,QString,QString)), qViaggiaTreno()->downloadViaggiaTreno(), SLOT(downloadRiepilogoTreno(quint32, QString, QString))); } //restituisce una stringa con il "titolo" di questa scheda, che viene ad esempio usato come etichetta della TabBar // se titoloItem == true restituisce un titolo per l'item dell'albero QString SchedaListaTreni::titolo(bool titoloBreve) const { if (m_titoloLista.isEmpty()) { if (titoloBreve) return(QString::fromUtf8("Lista di treni senza titolo #%1").arg(s_count)); else return(QString::fromUtf8("Lista di treni: senza titolo #%1").arg(s_count)); } else { if (titoloBreve) return m_titoloLista; else return(QString::fromUtf8("Lista di treni: %1").arg(m_titoloLista)); } } void SchedaListaTreni::impostaTitolo() { bool ok; QString titolo = QInputDialog::getText(this, QString::fromUtf8("Impostare titolo della lista"), QString::fromUtf8("Inserire il nuovo titolo della lista di treni"), QLineEdit::Normal, m_titoloLista, &ok); if (ok) { m_titoloLista = titolo; m_widget->impostaTitolo(titolo); m_modificata = true; emit GuiNonSincronizzata(idScheda()); emit nomeSchedaCambiato(idScheda()); } } void SchedaListaTreni::avvia() { SchedaQViaggiaTreno::avvia(); } void SchedaListaTreni::ferma() { SchedaQViaggiaTreno::ferma(); m_codatreni.clear(); m_trenoAttuale = ""; } void SchedaListaTreni::aggiorna() { //cancella dallo StackedWidget i widget creati per gestire gli errori if (m_idNumeroAmbiguo != -1) { QWidget *widgetDaRimuovere = widget(m_idNumeroAmbiguo); widgetDaRimuovere->deleteLater(); m_idNumeroAmbiguo = -1; } //ottiene una lista di tutti i numeri dei treni che si stanno attualmente controllando QStringList listaNumeri = m_listatreni.keys(); //e li aggiunge alla coda QStringListIterator it(listaNumeri); while (it.hasNext()) m_codatreni.enqueue(it.next()); //preleva il primo elemento dalla coda e procedi... prossimoTreno(); } void SchedaListaTreni::downloadFinito(const QString &rispostaVT) { ListaVT::DatiTreno* treno; //procedi solo se nel frattempo non è stato cancellato il numero del treno attuale //questo succede ad esempio se nel frattempo il treno è stato rimosso dalla lista dei treni if (m_trenoAttuale != "") { treno = m_listatreni.value(m_trenoAttuale); m_parser->impostaRispostaVTRiepilogo(rispostaVT); //sono possibili 6 risposte //1) il numero del treno non è valido //2) il treno non è partito ancora //3) il treno è in viaggio //4) il treno è già arrivato //5) il treno è stato soppresso totalmente //6) il numero treno è ambiguo //nei casi 1) 5) e 6) non è necessario fare il parsing della risposta... //verifichiamo quindi se siamo in questa situazione e nel caso aggiorniamo immediatamente il treno //o lasciamo risolvere all'utente l'ambiguità sul numero treno if (m_parser->trenoNonPrevisto()) { treno->cancella(); treno->impostaStatoTreno(TrenoVT::TrenoNonPrevisto); } else if (m_parser->trenoSoppressoTotalmente()) { treno->cancella(); treno->impostaStatoTreno(TrenoVT::TrenoCancellato); } else if (m_parser->numeroTrenoAmbiguo()) { m_trenoAmbiguo = m_trenoAttuale; ferma(); m_idNumeroAmbiguo = addWidget(new WidgetDisambiguaNumeroTreno(this, treno->numero(), m_parser->listaCodiciTreno(rispostaVT))); setCurrentIndex(m_idNumeroAmbiguo); cambiaStato(statoErrore); return; } else { if (!m_parser->analizzaRiepilogoPerLista(*treno)) { cambiaStato(statoErrore); treno->impostaStatoTreno(TrenoVT::DatiSconosciuti); return; } } //aggiorna la riga del treno attuale nel widget m_widget->aggiornaTreno(treno); emit messaggioStatus(QString::fromUtf8("Aggiornati dati treno %1 della lista '%2' Rimangono %3 su %4 treni da analizzare") .arg(treno->numero()).arg(titolo(true)).arg(m_codatreni.count()).arg(m_listatreni.count())); //non ci sono altri treni in coda? if (m_codatreni.isEmpty()) //no, cambia stato e memorizza l'ora di fine aggiornamento { m_trenoAttuale = ""; m_ultimoAgg = QDateTime::currentDateTime(); m_widget->impostaAggiornamento(m_ultimoAgg.toString("dd/MM/yyyy hh:mm")); cambiaStato(statoMonitoraggioAttivo); } else //si, preleva il treno successivo prossimoTreno(); } } //slot //questo metodo risponde all'attivazione dell'azione per l'apertura di un file void SchedaListaTreni::apri() { QString filename = QFileDialog::getOpenFileName(this, QString::fromUtf8("Apri lista treni"), QDir::homePath(), QString::fromUtf8("File QViaggiaTreno (*.qvt);;Tutti i file (*.*)")); if (filename != "") apriFile(filename); } void SchedaListaTreni::apriFile(const QString& filename) { QFile fileaperto(filename); if (!fileaperto.open(QIODevice::ReadOnly)) { //errore durante l'apertura del file QMessageBox::critical(this, QString::fromUtf8("Errore apertura file"), QString::fromUtf8("Impossibile aprire il file '%1'").arg(filename)); return; } QString errore; int riga, col; if (!m_dom.setContent(&fileaperto, &errore, &riga, &col)) { //errore nel parsing QMessageBox msgBox; msgBox.setIcon(QMessageBox::Critical); msgBox.setText(QString::fromUtf8("Errore durante la lettura della lista di treni.")); msgBox.setDetailedText(QString::fromUtf8("Ricevuto messaggio di errore %1 alla riga %2, colonna %3.").arg(errore).arg(riga).arg(col)); msgBox.exec(); return; } //legge il file xml QDomElement radice = m_dom.documentElement(); //verifica che il tag dell'elemento radice sia "qviaggiatreno" if (radice.tagName() != "qviaggiatreno") { QMessageBox::warning(this, QString::fromUtf8("Errore nel file"), QString::fromUtf8("Il file non sembra essere un file dati di QViaggiaTreno")); return; } //in futuro si dovrà verificare la versione del file, ora non è necessario if (radice.attribute("tipo") != "lista_treni") { QMessageBox::warning(this, QString::fromUtf8("Errore nel file"), QString::fromUtf8("Il file è un file di dati di QViaggiaTreno," " ma non sembra contenere una lista treni")); return; } // il file contiene una lista di treni... //recupera il titolo m_titoloLista = radice.firstChildElement("titolo").text(); m_widget->impostaTitolo(titolo(true)); emit nomeSchedaCambiato(idScheda()); //ottiene una lista di tutti gli elementi con tag name "treno" QDomNodeList listaTreni = m_dom.elementsByTagName("treno"); //scorre la lista ed aggiunge i singoli treni for (int i = 0; i < listaTreni.count(); i++) { aggiungiTreno(listaTreni.at(i).toElement().attribute("numero"), listaTreni.at(i).toElement().attribute("codice", "")); } fileaperto.close(); //forza l'aggiornamento aggiorna(); m_modificata = false; m_nomefile = filename; //sincronizza la GUI emit GuiNonSincronizzata(idScheda()); } //slot //viene richiamato quando viene scelto da menu o toolbar l'azione epr salvare il file void SchedaListaTreni::salva() { if (m_nomefile != "") salvaFile(m_nomefile); else salvaConNome(); } void SchedaListaTreni::salvaConNome() { QString filename = QFileDialog::getSaveFileName(this, QString::fromUtf8("Salva file con nome"), QDir::homePath(), QString::fromUtf8("File QViaggiaTreno (*.qvt)")); if (filename != "") { // se il file non ha una estensione, aggiungi l'estensione .qvt if (QFileInfo(filename).suffix() == "") filename.append(".qvt"); salvaFile(filename); } } void SchedaListaTreni::salvaFile(const QString& filename) { //prova ad aprire il file QFile fileDaSalvare(filename); //l'apertura non è andata a buon fine if (!fileDaSalvare.open(QIODevice::WriteOnly)) { QMessageBox::critical(this, QString::fromUtf8("Errore salvataggio file"), QString::fromUtf8("Errore nell'apertura in scrittura del file %1").arg(filename)); return; } //cancella il documento dom m_dom = QDomDocument("qviaggiatreno"); //crea l'elemento radice QDomElement radice = m_dom.createElement("qviaggiatreno"); m_dom.appendChild(radice); //imposta versione e tipo file radice.setAttribute("versione", "2"); radice.setAttribute("tipo", "lista_treni"); //aggiunge la radice al documento //crea l'elemento per il titolo QDomElement titolo = m_dom.createElement("titolo"); QDomText testo = m_dom.createTextNode(m_titoloLista); titolo.appendChild(testo); radice.appendChild(titolo); //scorre la lista dei treni monitorati QDomElement lista = m_dom.createElement("listatreni"); radice.appendChild(lista); QStringListIterator it(m_listatreni.keys()); while (it.hasNext()) { QString numero = it.next(); QDomElement elementoTreno = m_dom.createElement("treno"); elementoTreno.setAttribute("numero", numero); if (!m_listatreni[numero]->codiceOrigine().isEmpty()) elementoTreno.setAttribute("codice", m_listatreni[numero]->codiceOrigine()); lista.appendChild(elementoTreno); } //salva l'albero DOM QTextStream stream(&fileDaSalvare); m_dom.save(stream, 4); fileDaSalvare.close(); //cambia nome file m_nomefile = filename; m_modificata = false; emit GuiNonSincronizzata(idScheda()); } //aggiunge un singolo treno alla lista dei treni da monitorare void SchedaListaTreni::aggiungiTreno(const QString& numero, const QString& codice) { //verifica se si sta già controllando questo treno, //in caso positivo esci dalla funzione senza fare niente if (m_listatreni.contains(numero)) return; //crea una nuova istanza di ListaVT::DatiTreno per memorizzare i dati del treno ListaVT::DatiTreno *treno = new ListaVT::DatiTreno(numero); //imposta, se esiste, il codice della stazione di origine if (!codice.isEmpty()) treno->impostaCodiceOrigine(codice); //aggiunge il treno alla mappa dei treni m_listatreni.insert(numero, treno); //e lo aggiunge al widget m_widget->aggiungiTreno(treno); } //rimuove un singolo treno alla lista dei treni da monitorare void SchedaListaTreni::rimuoviTreno(const QString& numero) { //rimuove il treno dalla lista dei treni m_listatreni.remove(numero); //verifica che non sia nella coda dei treni, se c'è rimuovilo m_codatreni.removeAll(numero); if (m_trenoAttuale == numero) m_trenoAttuale = ""; m_widget->rimuoviTreno(numero); } //slot //questo slot è connesso all'azione per aggiungere treni void SchedaListaTreni::aggiungiTreni() { DialogoAggiuntaTreni dialogo(this); if (dialogo.exec() == QDialog::Accepted) { if (!dialogo.listaVuota()) { QStringListIterator it(dialogo.listaTreni()); while (it.hasNext()) aggiungiTreno(it.next()); } } //sono stati aggiunti tutti i treni, aggiornare la larghezza delle colonne m_widget->ridimensionaColonne(); m_modificata = true; //c'è stato un cambiamento nella scheda che ha influenza sull'aspetto della GUI //va quindi emesso il segnale per sincronizzare la gui emit(GuiNonSincronizzata(idScheda())); //forza un aggiornamento immediato dei treni aggiorna(); } void SchedaListaTreni::rimuoviTreni() { DialogoRimozioneTreni dialogo(m_listatreni.keys(), this); if (dialogo.exec() == QDialog::Accepted) { QStringListIterator it(dialogo.listaTreni()); while (it.hasNext()) rimuoviTreno(it.next()); } m_modificata = true; //c'è stato un cambiamento nella scheda che ha influenza sull'aspetto della GUI //va quindi emesso il segnale per sincronizzare la gui emit(GuiNonSincronizzata(idScheda())); } //slot //questo slot è connesso all'azione per rimuovere tutti i treni dalla lista void SchedaListaTreni::rimuoviTuttiITreni() { //rimuovi tutti i treni dalla tabella m_widget->rimuoviTuttiITreni(); //rimuovi tutti i treni dalla coda m_codatreni.clear(); m_trenoAttuale = ""; //elimina la lista di treni m_listatreni.clear(); m_modificata = true; //sincronizza la gui emit(GuiNonSincronizzata(idScheda())); } //questa funziona preleva il prossimo treno dalla coda dei treni //e richiede i dati a viaggiatreno void SchedaListaTreni::prossimoTreno() { //verifica che ci siano elementi nella coda, altrimenti esci if (m_codatreni.isEmpty()) return; m_trenoAttuale = m_codatreni.dequeue(); QString temp = m_listatreni[m_trenoAttuale]->codiceOrigine(); if (m_listatreni[m_trenoAttuale]->codiceOrigine().isEmpty()) emit (downloadRiepilogoTreno(idScheda(), m_trenoAttuale)); else emit (downloadRiepilogoTreno(idScheda(), m_trenoAttuale, m_listatreni[m_trenoAttuale]->codiceOrigine())); } void SchedaListaTreni::salvaScheda(QSettings& settings) { //la scheda è modificata, proponi di salvare il contenuto if (modificata()) { int risposta = QMessageBox::warning(this, QString::fromUtf8("La scheda è modificata"), QString::fromUtf8("La scheda '%1' è stata modificata, ma la lista di treni non è ancora stata salvata e non ne sarà possibile il ripristino.
" "Si desidera salvare la lista?").arg(titolo(true)), QMessageBox::Yes, QMessageBox::No); if (risposta == QMessageBox::Yes) salva(); } //salva semplicemente il nome del file settings.setValue("tipo scheda", "lista treni"); settings.setValue("nome file", m_nomefile); } void SchedaListaTreni::cambiaCodiceOrigine(const QString &nuovoCodice) { m_listatreni[m_trenoAmbiguo]->impostaCodiceOrigine(nuovoCodice); aggiorna(); avvia(); } qviaggiatreno-2013.7.3/src/doc/0000775000175000017500000000000012214333074016122 5ustar locutuslocutusqviaggiatreno-2013.7.3/src/doc/GPL-2.txt0000664000175000017500000004310312215773056017456 0ustar locutuslocutus GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. qviaggiatreno-2013.7.3/src/schedaavvisitrenord.h0000664000175000017500000000447212214355774021617 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2008-2012 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef SCHEDAAVVISITRENORD_H #define SCHEDAAVVISITRENORD_H #include "parser_trenord.h" #include "schedaviaggiatreno.h" #include "ui_wgtavvisitrenord.h" class QViaggiaTreno; class WidgetAvvisiTrenord: public QWidget, private Ui::wgtAvvisiTrenord { Q_OBJECT public: WidgetAvvisiTrenord(QWidget *parent, ModelloAvvisiTrenord* modello); }; class SchedaAvvisiTrenord: public SchedaQViaggiaTreno { Q_OBJECT public: SchedaAvvisiTrenord(QViaggiaTreno* parent, const unsigned int intervalloStandard = 5); QString titolo(bool = false) const {return QString::fromUtf8("Avvisi Trenord");} virtual void avvia(); virtual void ferma(); virtual void aggiorna(); virtual void downloadFinito(const QString &); virtual ~SchedaAvvisiTrenord(); private: WidgetAvvisiTrenord* m_widgetAvvisi; ParserTrenord* m_parser; ModelloAvvisiTrenord *m_avvisi; signals: void aggiornaListaDirettrici(); }; #endif // SCHEDAAVVISITRENORD_H qviaggiatreno-2013.7.3/src/img/0000775000175000017500000000000012214335105016126 5ustar locutuslocutusqviaggiatreno-2013.7.3/src/img/esporta.png0000664000175000017500000000241312215773056020325 0ustar locutuslocutusPNG  IHDR DsBITO pHYsvv}ՂtEXtSoftwarewww.inkscape.org< PLTE~~~~~~~~~TYY\`^X]]Z^_[``\a`agfbggrrr~~~֦zDهPtRNS !"$%&')+,-13569<>BDFIJNRYj{{|^IDATxmMkQsMTD)BW]_.nT-P| TmkjI!M2s3w&Y$Cys,1`D` " PUH"\\D=3Eu[vp&+~s|B UbhҺQyRVyX)ZָVyUS"0(Un.sxrbM"R\x:w遧,\sͬ3#evڠc"@ʻi; \ Af^g|ြQfhC"dY{g`ND9ȯqY )ruyhAPC=&94r^8 M"?%mqȭ9tn2Y.y;^IDdeg_LE3hև$b9v٠|čt!FV:8 !ش]q(Rr/er;3tc649c/kR+,=S dd3|lIENDB`qviaggiatreno-2013.7.3/src/img/avvia.png0000664000175000017500000000223112215773056017754 0ustar locutuslocutusPNG  IHDR ssBITUF pHYsvv}ՂtEXtSoftwarewww.inkscape.org<IDATx}kU}3IMk L[ BF+fU4-~P\JHi6(KM[EjkBDDE63Nׇ0C$/$k׉?$"fÅф5kX)p@+E&pe|M_hBBdɱ Qq76R_c}0RgYetM<1n>>`pїTel"ogBJCv~[en_: la%3 &q;l,v76x':.2‰xBgJݾ~ l<9mw-6O*2í .E^e{K<+Ѵ,j,pZL=|A:,ԩ3HYlAd˫Kf!N[Yc~d_ @]qnק"?-6bujTcG#+O5ZC) $@)>bmY c1sT2(e|ɓcw·?I[xbkk,r #h%[v`1ʼn`dB%xK]<܇_.'e93k-O' :i;S_q}P\.g[zvǵc rJ傻|6a9ßъIENDB`qviaggiatreno-2013.7.3/src/img/trenord.png0000664000175000017500000000135212214335105020312 0ustar locutuslocutusPNG  IHDR sBITO pHYs+IDATHc?-MM`PXGϿo~|frrkn9??@'K>JŜ<~cD ^]LLQ_.=Wv&||;"-f^|,Aŝ\/A Y/)E$SfV;Ie)-,l300"Ne(w_( р:h:a|II))g\apJ?XMdfu$h ۷3=p,8##ׯ]釗`}:w;#!p\z<ል޳dʃG QӔtpKnO5ūWƆ.mmmLfBB j)++k,! ߧEfLN65t:eV$Ikjj@%O>HK$͙Zbc%&R'Ujf2QT\,7?v}jH$j|C[ y̑`c縊5Kc—/[1EQ[^ÍuVݲy500pӇZ{7n kO:3U""*ZPPPuτ)f;+_D~p1!C̙;W8jv6@Ⱥ?~{cs+'SqcEr|f4$GJΆq8a*Ćo_~ u }_w477EQx O^fPw岹T>dO++l6zIݖxnW^/]o04l@͏:@B!K.ֽ8`"/+con}{xnڴn9MuXbJx_Hz]?_@$>߰?Cgz!\ h>L|=|M5˵HO7sFr;~ޱeRWHS:>$z,u? PGžWX=fffYpxm7ȶ/,A,P'\ B#[\v%K̍قRoW @8̠FVիy`whE$tf/ڄ*pUCnwH.dH5 2l)xm1\ˋס = ۩0i@TY?ÏnCE/!EPy(P EVHhjZ[o]۾^? UE<&(giZMDXlLJSd;01xڢxhp$$[p}v,) DJJ /.NT \Ԉc'* "''ug |PB I \z;w}da76Wci^.*+/)Y?Z堰64@ĸ#H΀MQ[s ,A2"t\64Fld9|9J"b;[ƞ/C4 qC|I&^dI30`U'͌w"IUª SΚiQ!'@UufgHwsf2 lyg IS|rr ̷  12t n&<@^@[i@0h6k׮C4ߟŝ;Axxqf8S|tt###HMM H&),,7/΃p( -'3tO̷"ĸ{ v$aAN' d/8ѽww~XNYSӑ0eNԈVl6f:qz%a~y⊢X8^d;CL1+KGSgsNe'q 7ޝ-ZR)RrMpAcn5I_2SSSthiC& ϜJo̝TU \C0‘i6٢׸Dhi'a+C dfe  F ڵke 嶇Ɠ` 4wze\|IpeDK[{NNj@`li]UCUo_7OʈIENDB`qviaggiatreno-2013.7.3/src/img/salva-come.png0000664000175000017500000000415012215773056020677 0ustar locutuslocutusPNG  IHDR szzsBIT|d pHYsvv}ՂtEXtSoftwarewww.inkscape.org<IDATxWkpUonnCI v4EZ1L[V[0€JCˀm;@ mGej -Mt*㨥*L eZ0$%BH>rO=瞳w&65Ov߷;2c ɘn9< ͍GV knYE5H,j, Ѳ  HtGg6S(.."̛p rYCf:Z]>ϒ, ZJ#H&ڱX"fG?X(LRA^tu?jzŲ 9 +'P^.yYh&8ExnRq ;S$L1P5܃ γ@e@2-:w7{5va-5GBU6ᖕ+a1+3'f@OFa B.uC"FGqJd"6M0kz L˜ň7-<;:=SGPo l߸8䭕յ %a(MM z8`z4aW <{TR?R 4/O43m!]cPWЋӈk ~u>!L_)h/9X G{o@UU~huwJϐ);3wFYF3N4$4R<PXDYi]`^S))vih6Ψ:#P1۞x/> EH'I_#4l:oC$=u_}аP[|C/>9 ~iI eyZiSMCoN9¼.kxx$(@!z~v1Od6/AwW0% 'H>q&ҍIENDB`qviaggiatreno-2013.7.3/src/img/apri.png0000664000175000017500000000210012215773056017574 0ustar locutuslocutusPNG  IHDR szzsBIT|d pHYsvv}ՂtEXtSoftwarewww.inkscape.org<IDATxŖM\E9Uu?{1a•0;E'vKW#J! H .id:=龷NyN);h4ũy[g]( a L _{M0f(xC9>R}_LJdSO߯F4#& 0ns2NXK6mUsy3q!j<*H#[.N{7@[V2 c.]^3W0P 6/7>no}k `pFF{80oOn?U5X['o:pbNW=?.|FڢCĚ70>WԻ̼րjfO˩L׾{4%ʬX$} CR<\1Ɓ>j 4˚xgc<=fɬjKܰؤ}gu"2- JbW-|ŋy`]N]B"Pfd=d*3B˜i4Pd7 4EH͋,>yW.$* :ΚɌ)TYO&yq*"%$䀔[̘?OMtH@v)^Wv''E뻖3vgd]v{,*G#:јu   \d 9_ɪIENDB`qviaggiatreno-2013.7.3/src/img/aggiorna.png0000664000175000017500000000420612215773056020441 0ustar locutuslocutusPNG  IHDR szzsBIT|d pHYsvv}ՂtEXtSoftwarewww.inkscape.org<IDATxŗ{Wǿy}߽w(`Dj"?4!&H4 b J4!XRbe7sg̜s;eY|ɽ}{~wNH)񿈀;m5|*o\[X\R\nKBػ7"?_5n dIg;/^^ѻNX0%Jc8<^>r=d^d;ݷ9k箽{5uM}eU>UJpqGJ'ؼn qĖnq} U j 9+6c_[`0$7:Ѕs-g&nun^яTq((1048(d s,vb^aJ2u-8Hծs%\K(Gw(\fѕB,11 l23WT!0I(vd7/OE-&mKN xK'XNʬ8PoQcC: 6:[0M] 9q <|@J22 ?Ly[ S =3b@d?n;/&t A^cwFj^N+qeFz'369005EpT9(`sdΫo9f$ h$FPlP zbӑr9}ЬjƍGP QU@҃FXr/G}8jء"hG6j$-H,nCa):D*qƢC;C"₰'@4fm( i,d>)ja2:NA M ^$5 6}Dm]?-x賔V G(6` F.0O6q,EvLyUNiW9Lnpld;n9*3+~%s{"wEng*iR~[NbD@Hj Hb< V(` hӸV)G8ԻVP #efXFB!\!!ՀZj+Ca`x$Tl_M<6)0JSCP)wilrs_7^l6PIl_mVZPՅf\$()BD,YAUbp 'RZ^ VvTiQr 1MҤ!n })@6a\\T\aBD\2I }0!ߩY>)'9 RF)Pc 둥!Q].ndnIEh.ڟ 9m .-| yL\Y ^/tl~#ƋSS#0B]3DKk`R M󯗤#ɧ790r23-)oq-: B2tAyVO,R|NQ`3 @v)I0JbE#M; &4a٘- KCŋ͈r7>`*] #'  JaX5+KӐo#>,P ^7ñW%2gݝ">&]k! !܆u~60WBvC]+ߘ l '2*e9ҐoVP:gjPE?`[b̉u7p(V qL:y+x);Y4@/ᘟyOQŧYCGe,J`-=)(JY/浊M7E!?cT1f+T{7wƼd:BV"O*Glݞ 3ƅ-`)Ƙx2"<#gkJ اYO"UκJk0sv9?[܆D5ݥc$pl̪"?#C'^Őf8ZE ׫暡P%ǀu  x ! +3(hs\u,B?WA[/(Ӕtx}Vz)_09[O?fخzJ(=+ݔTt" SjA3V606#>; ^%WM} ?O_^*"ҙZ|L3ϧno*-dm-,ːlX%M0A3M d(ZPW\#TE{##jLHcS÷0X(n)j*5j`,5>DxpxBXv.â,ʐyO#U %^z^6Bgx]=!2ub'[8{~aQ }$*,+v—R&Ox\Uꇗ˨^8q=$),%q!C ?K` IENDB`qviaggiatreno-2013.7.3/src/img/chiudi.png0000664000175000017500000000145512215773056020122 0ustar locutuslocutusPNG  IHDRabKGD pHYs B(xtIME IDATxe[hήlGjc9-.EXJ22ɱ( ||H  XZLnvss m~}DC}1qj 7ZwMc12l.w~`K߷n߯ʊ+gθ6223Gx\lK&>X..TJKK%=믱%Oj zYanJG"8$8bMy椚mu:f.37#;;{-MNHK{4GtԷόZҾi[٧ic]Ⴋ5LO),WD\qO5AZ JAtW?̪j̊R*ZuUJK,Sz|@·;zUj&RC 1 9&BVsO30u.~uTm2Cfw))X8ZE&>K%W?v#jSvv@3yw)n)buYWH_d%@oЄe.|QQ`[~1|Ɋt]Q"Qd?8ɛ 6 @z#̔Y@%Z[QIENDB`qviaggiatreno-2013.7.3/src/img/rimuovi.png0000664000175000017500000000205112215773056020340 0ustar locutuslocutusPNG  IHDR szzbKGD pHYs7\7\ǤIDATxT=oG}w$AlJEB vۅP$_`r >F8K6@)-Ȗ"C"ivB.sѱH3xݙy3e,h0D~~st8H/CNֹg޺+ĵ` ăB͛'Ol. X_ǻׯCNMRB7braA47qPښ|v4ɽwt<ܹcW^|Ul4>?\yp =GN"!MT2S{Ur?GBժU[|)pAvv֓ahB2`p~ cX;;?Ϥ1eeBZWZZ>^YQ숧#'L S~cxR"`ǾV6/ ZK(‡׮ybYT9A*5r5~Z#%Oӧ<2Ge174 ;\fM?G V~ vozpnŽo/j͌<74X% $%Ѥb0Jk5 =زKȐZYI%mI"4`E~=BFEB&) `,cX'ߝ"zTXtSoftwarex+//.NN,H/J6XS\IENDB`qviaggiatreno-2013.7.3/src/img/stazione.png0000664000175000017500000000246412215773056020512 0ustar locutuslocutusPNG  IHDR szzsBIT|d pHYsvv}ՂtEXtSoftwarewww.inkscape.org<IDATxWoLu~?JEC )[0MLř kݾ`\4s4Hಈ/Sa2BޝR:⓼y}}5w` ׉u=!PSW#@Ai5VqΌ,Xo䑐68X󳳂*+Çױ,?xO QTS:aTC` {i+@? .rao.TTU;hs3-dQDkK Ҋt:JBf +*ąc9ijǢ/{|N~u\Ncq%r@#(ۿ_t/-挷 }qq1!x)駟z=j¯7oF`_y(BϣUD^rrp?s4~v"'`.)=$g{{"D dgf.ɳc}"Y(!1!c=lw8qW EҒ^w ; vbXf(y$!#5=]۵ [ݎh82 AP{Z4<;6::|-i5wGy<+j}Kh2@`kYƝ9l%W[r/H;GM/!. 54SP}WǐeY:~T sI8"U:YBLtw8],`G `@"P9b.M&Ed%NSV)[\n dt:)8 k&dkG@,!yZ~ ,e` -]S Ѩ 2(U1/k 7!B`)V{_qYAWđf^Z1ԎZz. H>A<ϭMS .m|u@dBB|X U'Bnt pK,5FV;끼۷y^V Sc$P}j)RSeffas{ n7K5. 2~arbj& @#h8<1+L (t4 -T8J"iP?)\IENDB`qviaggiatreno-2013.7.3/src/img/stampa.png0000664000175000017500000000234712215773056020143 0ustar locutuslocutusPNG  IHDR szzsBIT|d pHYsvv}ՂtEXtSoftwarewww.inkscape.org<dIDATxWOW]{B@D $J#9 P/9p)K#9RJ%˯Rb|OoeeDz#},}͛7lxGfƗԂl"ZkET &1u#Z}Rk]㔚Z &&46]fճU/Ϟ}m:qr9/R>v{{B#Jm77&eY0B& ڥrUSېD"lpkWs9mEEy%vt @4Vx/G$\XXb,V֦A+H[:mcK"w;Y]]E4;;;7pW]:??gQFŹ$")8mll$tw5"(a0خ8z[ '131QSSS4?? E7W^ر(˔Jz5}\ىؕdv* t1LPMW\N-H;6O1á/~pW_]]{AhP ϩnFUqYb (gQ5ϊxJP>=;w:վ@܈[Շ S{{+ڱd> m֓"nCO[s`_ ko'"$ (d!ӱ8Hf;~| ۵llnW.!QV J"Jos3&v0imar&ipMlnm!Mȝhs~ xb(eH] kbcc=}Ęzc GG%T(5Zqf](>nFIc'N2dZIS2DZ 11܋j\Q#&0LPo%|r{\V` $N9$4/mGNMDm El)4Hy 0BHC(Y`j)S:s.=e$D,*06>_a8Tc$(= |Rg{YGQML{rɱBV Ԋlp%׊=ezHq(gsD(ސHN} *snP hi-h.1i5-cXS)##ah`ZTHnmm61!"@{\=.^GeOk?Uƍu=OdpL+8rdқpgu4+?|d~CMg}}}wcvvvj|Esn7닭ix(Eߕ2DڀjR#:_}`|\ZS:eTL% tpKD;B"NaohnT*i7]WZ\ƭ[%v2111w~Į,œ^&B,)VmP*+>zC0$R:Z[C;۹r$١uǎO3پ/๊RC)m^z= ^/]B̠)l`(J]z(tc~ki?(v_ᆱ'7SP}M^m-@{{u购\id 秧_:y3e{+++7\'6qcM A\2:9l=b'.cgIENDB`qviaggiatreno-2013.7.3/src/img/salva.png0000664000175000017500000000235712215773056017765 0ustar locutuslocutusPNG  IHDR szzsBIT|d pHYsvv}ՂtEXtSoftwarewww.inkscape.org<lIDATxVoEmvbv " 7gԗ T*oE4""Lq[fFzwBM3w775 @_D]λΛ, KxgHlQ {?iֹo~4ý:8߹ۯ:ȍYN,~/S6Hf$IVc웠yOgy~`n3@s -n,zž&D9a4Kh74 a pm V`5ɨC1S o%\(.qRCQә1<:WJP>4$Ȃ PъOtSq1u+ ^]1.Bi5' "ڎZ]Y95}Qw<2-HZMU.BpL5WDd<`u!9 hQt%a 'C׃K/0S]['=jO~z ŠV+8[I}k@X^?):50Mjқο0\`ⱊ/+0.saST, ,_ CZŗtܸyV(>2o3 ON( KS((N)x QKD-(dg0!#jj:   l@G$ +L"({4tࢢ8>|q$ +¢K $9_BdEdM FX_/z`V ǁ1Z2a]4M/I |9ߞv>46˗.}P־RU-E&ωP( Y+2Mv,^lULƣ?766~gx0 9=BjDП>(h*]2ѐC4wh4<"+츮빎(]a'/8"06}۱gxX`:Лap 壻f;4GTOD#K@4յ^xψȝL&5pgߚғCIENDB`qviaggiatreno-2013.7.3/src/img/aggiungi.png0000664000175000017500000000271712215773056020451 0ustar locutuslocutusPNG  IHDR szzsBIT|d pHYsvv}ՂtEXtSoftwarewww.inkscape.org<LIDATxŗoTEǿ3sΞni @C1B "D0i|21ÓȋP#ojOK !BjD@)KK={ficbҘf93ngW03wok~lhֿ #h˭{z `Cbmz[k u=wK{S@N>)M{>ա~V)'I^a\kA퇘ęط-LaTiwIF3+/W153 E(<]2#5!$!uVG16@ !BGXcYd`,ji֞j bD:^MyN\69wAdCJHw81!2Ơv9b ul{<_uF56ڞNE_Ti=mA[$lʹ8wMXؘ%@D^ck(pW564֞hGoFwmׁ`.Au\ܓ5 r,?!$p{GQP҃'{g !܉nύw#zڻ0T-4 QJJ7(Y 'LJXLx"2XQ:4yLvrƦ02uEQNVpH̲Dm0xúz̕1} gGF0md|T[k8 $K+A8dTV0 10o J(2Vv@RYf ^ ?Ll>I2,]G D"hÓ!h"DS@W.N.-Aw .@9 A$H('܇5H-rkea;Q73L9)[cUe1edu~qBkx1P +)^ {zVT3 !%B.j!%=@YyK B&cY, 0@M`;SU\kC}%@{DxNڹDвNg|M2 G*Jr$ ;#RMH&bb|Lh@)p3 TJXF+E( 8P2JR1 (DF+F! , k<)D q*VPĮ,fdz^FAEQKڴU)@=1B.Rgނk3nRDVނI!_BOXHهCF)թ)[̲a1 !&& JbRXfk)m׷l_@y]qV4U#M" Ļ|is"eВ"Z 1IpQghBmhSXocsB!3?ʘ_8ںzrZfe[R~pK+WNϿח?1e7GjQjdjkґL: {^̔WZ~kij7'6lvZs([sy_SS+uu?#dt*3061lAk=x%VLe939 Ϟx'}{!}kz4Z1vY_ķ/tC_K0x|5kӺŴ Z&jRg`p{1eR)TR(령[IEu%%%OM2ΐ';ɝN*qbǢʣ"+W%KK4Ms74 w16rArA1A-p]%{&'{3{ 6rvqvٽ٤>[p_x\Z9>ܴѧTrPvMΘCKta%/zo^&g50,70XLI%4$* *+6d6fsrauqG$E܋HȝR=_җgo#o^~#qtt+\:\ *{ZFw34~k%Td---8:ژ: Ŗc"zYG$W^NqP͏7K -VV8&9/ 1_#E8_/8 Y18-5cLa;z.yy]ĝ ZBരDEފ™7Y6clGGO(.e9\ʩvZJW+0.D:f" Aڃ0bluBUyJ<cF*Cspg\ѷ+ޮcߛ1n;UR thnƸWQYtB XqRqɯ RQWWWLJ O+8;p?wE@ip]:uZِ*TVbc̸EOcK̋/Zz 㥚Ky{='|F}XphܣVK׿5/.o Werۏq}bmE,b{wAa*&8S1])} (\WxG'9qυAA_f2PPl4QŔ!14: N{G{+rGpvAwA7ƅ&22wXuXaY̧˩W^=1i&i@s<Ġ:XYH*/[ԆnJ?P:otwv7xc\]:xxȸwwB*sb8wS!P&-={H`aakppEAki)+džf <8xv,```>''1n>P[ߋCn? 4''!SX1=jw :W_\T5 Re);K/#Otqs)>MSR{zAEp%#7[ʯGX5Cχ`jx m {P\\xA_9Y 2"ll-4~e!!}د,,ONIt ^E]G]ϯZi!쇚}sfeʦ23&3u1^<-xC٢ڢEPdF+[WL$]ѻ=zzX\]_ ڍf_*CJ]U d폀Q`~6i7߉Fۅ  #P0:I=%wroFV? B12>AII.>*͘Jw'ĚBs3)a>N*+RC|8ձlԆ{]ª06 _Bx`aa7vz;__ D,S5})</~!E,x~2AE GT$++Y!,?^␧ꏷ?ނQh/t"08 x ~n?|ϩ<7mW g;6 \@${z_@0>l_[*3*3x#L{B"M ]ŀ`u|:|GbIQHHK0d&5/ H_͙pނkO5'BW-ݒjӁ?=u~ďSC?&y-52ࡏvߡ2Ԅʈ|L|ȉI'mԹs玟;!a({SUsA!xZ`"0\ Kq{,YR …y 7q(* G B39 qY\U aMs]p+* %IQ@@}w}`=k\R\L*Bؿw>.VVdVoV0ǧ"i&YIu>Ro$VX 7։65vrG|p`1 B&w|pG`1,h6R̅-[@P._ɼ|.<RoiCpC0+__FF DZtv΄׍ֈ[i}:"hV'8OE*B J[q.]wgq jjgwߧ~7$SaoO5",Q3m\QW~,9_;EGDfɹ#FCo|m>G:ccܮOKEp uYYM].<v}d}$<7 >_9y#gO+Zpc%biЗk-^ \0&}:uۺB L~rIwZtlǣoX@_`CDEa<d |*=nlM"ct0ܛu .!GwX*Ob`V%!a;ڠv)NOϋTf$뱄.V9 [m!mg|BF}Wؿqqa3sm @kzpp!)Eg޴ }//Erڶd( QPM8U8 Gz0_orpxgx ÄAhaؗ{NI 99X6%lNd DpS_x^bhp t_y/6{!]R RqޭV_v|O[z4- i9j%i]a(rPUtoir"y%8kst)^\ v(z^TWfqMҡC..TV+CTt捏q2WD s`ݖu;m!i;koChQ΢EgLv~{}Ws/Ok:5rڷxlnh2##W*a[\˽.(5*,/όO8S+S=sݷ-W4;%gV2P[-5?Zj H*m-&~CSk{TW6Mߴht M27eКk|\YZqՊ-سڂ= ^l#L(BEKb q\Ě!!wCˆ+X3E6Y%oOUy ![jP)a/=T w=zg>b$a0yd]qO[1MSbS|7nXg]r9ӑTzb3H u/uQ&&&vsjSRM DsS; g;9Fȥeĥ{z\0E%?ňDT$*!t4}ӗl>yDM>=MkDMk3?mSU{:MNn&>1 ~^Sɘ5k*S#%7#G8m}7Vjzj 臈/-˷(E(Ut]jcįR_Kli?dPz@ʿ@h-WzcF!n"&LD$D+'U&~MҙaxUUwO?w<+w׷w!^447ץ׬וZǵǽftipPBsD{bY,1> "RB9!1=Yz緘)E~'HMAR el4BR'P6A"d Bz&ə3tIM4)H|(n*'Ń8>Q:;7ƙ6>f7RsP,=7x'PAFR9RvJHqcx\C["zTXtSoftwarex+//.NN,H/J6XS\IENDB`qviaggiatreno-2013.7.3/src/schedatreno.cpp0000664000175000017500000002061212215773217020371 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2008-2010 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include #include "schedatreno.h" #include "qviaggiatreno.h" #include "download_viaggiatreno.h" #include "utils.h" SchedaTreno::SchedaTreno(QViaggiaTreno *parent, const QString &numero, const unsigned int intervalloStandard) : SchedaQViaggiaTreno(parent, tsTreno, intervalloStandard) { m_numero = numero; m_codiceStazioneOrigine = ""; m_idTabelle = m_idNumeroSbagliato = m_idNumeroAmbiguo = -1; m_riepilogoScaricato = false; //crea il widget con le tabelle m_widget = new WidgetDatiTreno(this); m_idTabelle = addWidget(m_widget); setCurrentIndex(m_idTabelle); //imposta il parser m_parser = new ParserTrenoViaggiaTreno(this); m_orarioTreno.inizializza(); m_widget->inizializza(); m_widget->impostaNumeroTreno(numero); //connessioni connect(this, SIGNAL(statoCambiato(quint32)), parent, SLOT(aggiornaStatoScheda(quint32))); connect(this, SIGNAL(nomeSchedaCambiato(quint32)), parent, SLOT(aggiornaNomeScheda(quint32))); connect(this, SIGNAL(apriSchedaStazione(const QString&, bool)), parent, SLOT(nuovaStazione(const QString&, bool))); connect(this, SIGNAL(messaggioStatus(const QString&)), parent, SLOT(mostraMessaggioStatusBar(const QString&))); connect(this, SIGNAL(downloadRiepilogoTreno(quint32, QString)), qViaggiaTreno()->downloadViaggiaTreno(), SLOT(downloadRiepilogoTreno(quint32, QString))); connect(this, SIGNAL(downloadRiepilogoTreno(quint32,QString,QString)), qViaggiaTreno()->downloadViaggiaTreno(), SLOT(downloadRiepilogoTreno(quint32, QString, QString))); connect(this, SIGNAL(downloadDettagliTreno(quint32,QString)), qViaggiaTreno()->downloadViaggiaTreno(), SLOT(downloadDettagliTreno(quint32, QString))); connect(this, SIGNAL(downloadDettagliTreno(quint32,QString,QString)), qViaggiaTreno()->downloadViaggiaTreno(), SLOT(downloadDettagliTreno(quint32, QString, QString))); } //restituisce una stringa contente il numero del treno monitorato QString SchedaTreno::numero() const { return m_numero; } //restituisce il titolo della scheda //nel caso di una scheda per il monitoraggio di un treno restituisce semplicemente il numero del treno QString SchedaTreno::titolo( bool /*titoloBreve*/) const { return m_numero; } //slot //questo slot viene richiamato quando scatta il timer void SchedaTreno::aggiorna() { cambiaStato(statoInAggiornamento); //cancella dallo StackedWidget i widget creati per gestire gli errori if (m_idNumeroAmbiguo != -1) { QWidget *widgetDaRimuovere = widget(m_idNumeroAmbiguo); widgetDaRimuovere->deleteLater(); m_idNumeroAmbiguo = -1; } //è impostato il codice di origine della stazione? if (m_codiceStazioneOrigine.isEmpty()) //no, allora effettua un download "normale emit (downloadRiepilogoTreno(idScheda(), numero())); else //si, allora passa al segnale di download anche il codice emit (downloadRiepilogoTreno(idScheda(), numero(), codiceOrigine())); } void SchedaTreno::downloadFinito(const QString &rispostaVT) { //inizializza solo se si sta scaricando il riepilogo; if (!m_riepilogoScaricato) { m_widget->inizializza(); m_parser->inizializza(); //TODO per il momento inizializza l'orario del treno ad ogni nuovo download della scheda di riepilogo //ma quando si memorizzeranno i transiti bisogna analizzare caso per caso la situazione... m_orarioTreno.inizializza(); } if (!m_riepilogoScaricato) { m_parser->impostaRispostaVTRiepilogo(rispostaVT); //cerca prima di tutto se il treno è previsto, in caso contrario esci subito if (m_parser->trenoNonPrevisto()) { m_widget->impostaStato(TrenoVT::TrenoNonPrevisto); m_ultimoAgg = QDateTime::currentDateTime(); m_widget->impostaAggiornamento(m_ultimoAgg.toString(Qt::DefaultLocaleShortDate)); return; } //ora cerca se per caso il treno è stato soppresso e se è così esci subito if (m_parser->trenoSoppressoTotalmente()) { m_widget->impostaStato(TrenoVT::TrenoCancellato); m_ultimoAgg = QDateTime::currentDateTime(); m_widget->impostaAggiornamento(m_ultimoAgg.toString(Qt::DefaultLocaleShortDate)); cambiaStato(statoMonitoraggioAttivo); return; } //controlla se ViaggiaTreno ha segnalato che il numero è ambiguo //in tale caso prepara un widget per la selezione if (m_parser->numeroTrenoAmbiguo()) { ferma(); m_idNumeroAmbiguo = addWidget(new WidgetDisambiguaNumeroTreno(this, numero(), m_parser->listaCodiciTreno(rispostaVT))); setCurrentIndex(m_idNumeroAmbiguo); cambiaStato(statoErrore); return; } //a questo punto si può analizzare il riepilogo if (!m_parser->analizzaRiepilogo(m_orarioTreno)) { //c'è stato un errore, visualizza un testo di avviso cambiaStato(statoErrore); m_widget->impostaAggiornamento(QString::fromUtf8("Aggiornamento scheda non riuscito: errore nell'analisi della risposta di ViaggiaTreno"), true); m_riepilogoScaricato = false; return; } // è andato tutto bene, scarica la scheda con i dettagli if (m_codiceStazioneOrigine.isEmpty()) emit (downloadDettagliTreno(idScheda(), numero())); else emit (downloadDettagliTreno(idScheda(), numero(), codiceOrigine())); m_riepilogoScaricato = true; //ed esci return; } //analizza la scheda con i dettagli del treno m_parser->impostaRispostaVTDettagli(rispostaVT); m_riepilogoScaricato = false; if (!m_parser->analizzaDettagli(m_orarioTreno)) { //c'è stato un errore, visualizza un testo di avviso cambiaStato(statoErrore); m_widget->impostaAggiornamento(QString::fromUtf8("Aggiornamento scheda non riuscito: errore nell'analisi della risposta di ViaggiaTreno"), true); return; } m_ultimoAgg = QDateTime::currentDateTime(); m_widget->aggiornaTreno(m_orarioTreno); cambiaStato(statoMonitoraggioAttivo); emit messaggioStatus(QString::fromUtf8("Aggiornati dati treno %1").arg(titolo(true))); m_widget->impostaAggiornamento(m_ultimoAgg.toString("dd/MM/yyyy hh:mm")); } //Salva i dati necessari per poter ripristinare la scheda alla prossima apertura void SchedaTreno::salvaScheda(QSettings& settings) { settings.setValue("tipo scheda", "treno"); settings.setValue("numero treno", numero()); settings.setValue("intervallo", intervallo()); settings.setValue("codice stazione origine", codiceOrigine()); } //cambia il codice della stazione di origine ed effettua una nuova richiesta a ViaggiaTreno void SchedaTreno::cambiaCodiceOrigine(const QString& nuovoCodice) { m_codiceStazioneOrigine = nuovoCodice; aggiorna(); avvia(); } qviaggiatreno-2013.7.3/src/wgtavvisitrenord.ui0000664000175000017500000000455212214355774021356 0ustar locutuslocutus wgtAvvisiTrenord 0 0 266 668 Form 75 true Avvisi Trenord Qt::AlignCenter Ultimo aggiornamento: Qt::AlignCenter Qt::Vertical <html><head/><body><p>Avvisi in corso</p></body></html> QAbstractItemView::NoEditTriggers true 0 1 true qviaggiatreno-2013.7.3/src/schedastazione.h0000664000175000017500000001200212215773217020535 0ustar locutuslocutus /*************************************************************************** * Copyright (C) 2008-2012 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef SCHEDASTAZIONE_H #define SCHEDASTAZIONE_H #include "schedaviaggiatreno.h" #include "parser_viaggiatreno_stazione.h" #include "ui_wgtstazione.h" enum tipoFiltro {NessunFiltro=0, FiltraCategoria=1, FiltraStazione=2}; class QViaggiaTreno; class WidgetStazione: public QWidget, private Ui::wgtStazione { Q_OBJECT public: WidgetStazione(QWidget *parent, QAbstractItemModel* modelloArrivi, QAbstractItemModel *modelloPartenze); void impostaTitolo(const QString& titolo); void impostaAggiornamento(const QString& aggiornamento, bool errore = false); tipoFiltro tipoFiltroArriviAttivo() const {return (tipoFiltro)comboBoxTipoFiltroArrivi->currentIndex();} tipoFiltro tipoFiltroPartenzeAttivo() const {return (tipoFiltro)comboBoxTipoFiltroPartenze->currentIndex();} QString filtroArriviAttivo() const {return comboBoxFiltroArrivi->currentText();} QString filtroPartenzeAttivo() const {return comboBoxFiltroPartenze->currentText();} void aggiornaComboFiltroArrivi(tipoFiltro filtro, QString filtroCategoria, QString filtroStazione, QStringList categorie, QStringList stazioni); void aggiornaComboFiltroPartenze(tipoFiltro filtro, QString filtroCategoria, QString filtroStazione, QStringList categorie, QStringList stazioni); void impostaComboFiltri(tipoFiltro arrivi, tipoFiltro partenze); public slots: void mouseEntered(const QModelIndex& index); }; class SchedaStazione : public SchedaQViaggiaTreno { Q_OBJECT public: SchedaStazione(QViaggiaTreno *parent, const QString& nome, bool nomeEsatto, const unsigned int intervalloStandard = 2); QString nomeStazione() const; QString codiceStazione() const { return m_codice; } virtual QString titolo( bool titoloBreve = false) const; virtual void salvaScheda(QSettings& settings); virtual void ripristinaFiltri(QSettings& settings); public slots: virtual void aggiorna(); void cambiaCodiceStazione(const QString& nuovoCodice); void modificaNomeStazione(); virtual void downloadFinito(const QString& rispostaVT); private: int m_idTabella, m_idNomeSbagliato, m_idNomeAmbiguo; bool m_nomeEsatto; QString m_stazione, m_codice; WidgetStazione* m_widgetStazione; QDomDocument *m_documentoDom; ParserStazioneViaggiaTreno *m_parser; ModelloStazione *m_arrivi, *m_partenze; QSortFilterProxyModel *m_filtroArrivi, *m_filtroPartenze; QString m_testoFiltroCategorieArrivi, m_testoFiltroCategoriePartenze, m_testoFiltroStazioniArrivi, m_testoFiltroStazioniPartenze; QWidget* creaWidgetErroreNome(); void aggiornaComboFiltroArrivi(tipoFiltro filtroAttivo); void aggiornaComboFiltroPartenze(tipoFiltro filtroAttivo); void riapplicaFiltroArrivi(); void riapplicaFiltroPartenze(); void eliminaFiltriNonApplicabili(); private slots: void itemAttivato(const QModelIndex& index); void tipoFiltroArriviSelezionato(int); void tipoFiltroPartenzeSelezionato(int); void filtroArriviSelezionato(QString); void filtroPartenzeSelezionato(QString); signals: void downloadStazione(quint32, const QString&); void downloadStazioneConCodice(quint32, const QString&); }; //widget che viene mostrato quando il nome della stazione introdotto risulta ambiguo //codice nel file schedastazione_widget.cpp class WidgetDisambiguaNome : public QWidget { Q_OBJECT public: WidgetDisambiguaNome(SchedaStazione *parent, QMaplistaCodiciStazioni); private: QListWidget* listaNomi; private slots: void sceltaNomeStazione(); signals: void nomeDisambiguato(const QString& nuovoCodice); }; //widget che visualizza il prospetto arrivi/partenze della stazione #endif qviaggiatreno-2013.7.3/src/config.h0000664000175000017500000000735612215773056017017 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2010-2011 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef CONFIG_H #define CONFIG_H #include class Configurazione { public: Configurazione(); //intervallo del controllo periodico del corretto funzionamento di ViaggiaTreno (in minuti) int intervalloControlloVT(); int intervalloControlloVTDefault() const {return m_def_intervalloControlloVT;} void impostaIntervalloControlloVT(int intervallo); //intervallo di timeout del controllo (in secondi) int timeoutControlloVT(); int timeoutControlloVTDefault() const {return m_def_timeoutControlloVT;} void impostaTimeoutControllVT(int timeout); //intervallo tra una query a viaggiatreno e la successiva (in decimi di secondo) double intervalloQueryVT(); double intervalloQueryVTDefault() const {return m_def_intervalloQueryVT;} void impostaIntervalloQueryVT(double intervallo); //impostazioni relative al proxy bool proxyUtilizzato(); bool proxyUtilizzatoDefault() const {return m_def_usareProxy;} void impostaUtilizzoProxy(bool usareProxy); bool proxyRichiedeAutenticazione(); bool proxyRichiedeAutenticazioneDefault() const {return m_def_autenticazioneProxyRichiesta;} void impostaRichiestaAutenticazioneProxy(bool autenticazioneProxy); bool proxyDiSistemaUtilizzato(); bool proxyDiSistemaUtilizzatoDefault() const {return m_def_usareProxySistema;} void impostaUtilizzoProxyDiSistema(bool usareProxyDiSistema); QString hostProxy(); QString hostProxyDefault() const {return m_def_hostProxy;} void impostaHostProxy(const QString& host); quint16 portaProxy(); quint16 portaProxyDefault() const {return m_def_portaProxy;} void impostaPortaProxy(quint16 porta); QString nomeUtenteProxy(); QString nomeUtenteProxyDefault() const {return m_def_nomeUtenteProxy;} void impostaNomeUtenteProxy(const QString& nome); QString passwordProxy(); QString passwordProxyDefault() const {return m_def_passwordProxy;} void impostaPasswordProxy(const QString& password); private: int m_def_intervalloControlloVT, m_def_timeoutControlloVT; double m_def_intervalloQueryVT; bool m_def_usareProxy, m_def_autenticazioneProxyRichiesta, m_def_usareProxySistema; QString m_def_hostProxy, m_def_nomeUtenteProxy, m_def_passwordProxy; quint16 m_def_portaProxy; QSettings m_settings; }; #endif // CONFIG_H qviaggiatreno-2013.7.3/src/schedaviaggiatreno.cpp0000664000175000017500000000730612215773056021727 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2008-2010 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "schedaviaggiatreno.h" #include "qviaggiatreno.h" unsigned long SchedaQViaggiaTreno::s_id = 0; QString SchedaQViaggiaTreno::statoNuovaScheda = QString::fromUtf8("Nuova scheda"); QString SchedaQViaggiaTreno::statoInAggiornamento = QString::fromUtf8("In aggiornamento"); QString SchedaQViaggiaTreno::statoMonitoraggioAttivo = QString::fromUtf8("Attivo"); QString SchedaQViaggiaTreno::statoMonitoraggioFermato = QString::fromUtf8("Fermo"); QString SchedaQViaggiaTreno::statoErrore = QString::fromUtf8("Errore"); // SchedaQViaggiaTreno::SchedaQViaggiaTreno(QViaggiaTreno* parent, TipoScheda ts, const unsigned int intervalloStandard) : QStackedWidget(parent), m_tipo(ts) { m_id = s_id++; m_qviaggiatreno = parent; m_timer = new QTimer(this); connect(m_timer, SIGNAL(timeout()), this, SLOT(aggiorna())); m_timer->setInterval(intervalloStandard*60000); //per default la scheda non è né stampabile né esportabile m_stampabile = m_esportabile = false; } void SchedaQViaggiaTreno::avvia() { if (m_timer) m_timer->start(); cambiaStato(statoMonitoraggioAttivo); } void SchedaQViaggiaTreno::ferma() { if (m_timer) m_timer->stop(); cambiaStato(statoMonitoraggioFermato); } int SchedaQViaggiaTreno::intervallo() const { if (!m_timer) return 0; else return m_timer->interval()/60000; } void SchedaQViaggiaTreno::impostaIntervallo(int nuovoInt) { if (m_timer) { //cambia intervallo solo se è differente dal precedente if (!(nuovoInt == m_timer->interval()/60000)) m_timer->setInterval(nuovoInt*60000); } } void SchedaQViaggiaTreno::aggiorna() { } void SchedaQViaggiaTreno::cambiaStato(QString nuovoStato) { m_stato = nuovoStato; emit statoCambiato(m_id); } //la funzione restituisce la larghezza in punti di un item int larghezzaItem(const QTableWidgetItem* item) { if (!item) return -1; QFontMetrics fm(item->font()); int larghezza = fm.width(item->text()); return larghezza; } //la funzione cambia il font di un item in modo che sia sottolineato // se sottolinato = true, altrimenti rimuove la sottolineatura void itemSottolineato(QTableWidgetItem* item, bool sottolineato) { QFont font = item->font(); font.setUnderline(sottolineato); item->setFont(font); item->setForeground(QApplication::palette().link()); } qviaggiatreno-2013.7.3/src/dialogo_nomestazione.cpp0000664000175000017500000000361612215773056022311 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2010 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "dialogo_nomestazione.h" DialogoNomeStazione::DialogoNomeStazione(QWidget *parent, const QStringList& listaStazioni) : QDialog(parent) { setupUi(this); //aggiunge la lista delle stazioni già selezionate comboBoxNomeStazione->addItems(listaStazioni); } bool DialogoNomeStazione::cercaTutteStazioni() { return checkBoxCercaTutte->isChecked(); } QString DialogoNomeStazione::nomeStazione() { return comboBoxNomeStazione->currentText(); } qviaggiatreno-2013.7.3/src/schedatreno_widget.cpp0000664000175000017500000004541212215773217021741 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2008-2010 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "schedatreno.h" #include "parser_viaggiatreno_treno.h" //questo widget si occupa di presentare all'utente una lista delle stazioni proposte da viaggiatreno per //risolvere l'ambiguità del nome inserito dall'utente WidgetDisambiguaNumeroTreno::WidgetDisambiguaNumeroTreno(SchedaQViaggiaTreno* parent, const QString& numero, QMap listaCodiciTreno) : QWidget(parent) { //imposta il layout del dialogo QVBoxLayout *vbox = new QVBoxLayout; setLayout(vbox); QLabel *messaggio = new QLabel(this); messaggio->setWordWrap(true); messaggio->setText(QString::fromUtf8("Il numero treno inserito ('%1') è ambiguo. Questo succede " " solitamente se su reti ferroviarie distinte (ad esempio RFI e FERROVIENORD) circolano due treni con" " lo stesso numero . Per risolvere questa ambiguità ViaggiaTreno propone una lista di treni con la " "relativa stazione di origine.
Scegliere dalla lista sottostante" " oppure fare clic sul pulsante di chiusura se desiderate semplicemente chiudere questa scheda").arg(numero)); vbox->addWidget(messaggio); QHBoxLayout *hbox = new QHBoxLayout; lista= new QListWidget(this); QPushButton *btnSceltaStazione = new QPushButton(QString::fromUtf8("Scelta treno"), this); hbox->addWidget(lista); hbox->addWidget(btnSceltaStazione, 0, Qt::AlignCenter); vbox->addLayout(hbox); //scorre la lista dei codici stazione //per ogni elemento crea una apposita voce nella listbox QMapIterator it(listaCodiciTreno); while (it.hasNext()) { it.next(); QListWidgetItem *item = new QListWidgetItem(it.key()); item->setData(Qt::UserRole, it.value()); lista->addItem(item); } lista->setSelectionMode(QAbstractItemView::SingleSelection); lista->setAlternatingRowColors(true); lista->setCurrentRow(0); //connessioni connect(btnSceltaStazione, SIGNAL(clicked()), this, SLOT(sceltaTreno())); connect(this, SIGNAL(numeroDisambiguato(const QString&)), parent, SLOT(cambiaCodiceOrigine(const QString&))); } //slot //è stato scelto il nome della stazione dalla lista proposta, viene comunicato alla scheda con un segnale void WidgetDisambiguaNumeroTreno::sceltaTreno() { QListWidgetItem *item = lista->currentItem(); emit numeroDisambiguato(item->data(Qt::UserRole).toString().section(";",1,1)); } WidgetDatiTreno::WidgetDatiTreno(SchedaTreno *parent) : QWidget(parent) { QVBoxLayout* layout = new QVBoxLayout; //costruisce l'etichetta per il titolo m_titolo = new QLabel(this); //l'etichetta sarà centrata m_titolo->setAlignment(Qt::AlignCenter); //imposta font con dimensioni del 50% maggiori di quella standard e in grassetto QFont font = m_titolo->font(); font.setBold(true); font.setPointSize(font.pointSize()*1.5); m_titolo->setFont(font); //aggiunge l'etichetta al layout layout->addWidget(m_titolo, 0); //costruisce l'etichetta con ora/data di aggiornamento m_aggiornamento = new QLabel(this); //l'etichetta sarà centrata m_aggiornamento->setAlignment(Qt::AlignCenter); layout->addWidget(m_aggiornamento, 0); //imposta il frame con i dati di partenza QFrame *framePartenza = new QFrame(this); framePartenza->setFrameStyle(QFrame::Panel|QFrame::Raised); layout->addWidget(framePartenza, 0); QGridLayout *layoutFramePartenza = new QGridLayout; framePartenza->setLayout(layoutFramePartenza); m_stazionePartenza = new QLabel(framePartenza); layoutFramePartenza->addWidget(m_stazionePartenza, 1,0); m_partenzaTeorica = new QLabel(framePartenza); layoutFramePartenza->addWidget(m_partenzaTeorica, 0, 2); m_binPartenzaProgrammato = new QLabel(framePartenza); layoutFramePartenza->addWidget(m_binPartenzaProgrammato, 0, 4); m_partenzaReale = new QLabel(framePartenza); layoutFramePartenza->addWidget(m_partenzaReale, 2, 2); m_binPartenzaReale = new QLabel(framePartenza); layoutFramePartenza->addWidget(m_binPartenzaReale, 2, 4); //imposta il frame con i dati di arrivo QFrame *frameArrivo = new QFrame(this); frameArrivo->setFrameStyle(QFrame::Panel|QFrame::Raised); layout->addWidget(frameArrivo, 0); QGridLayout *layoutFrameArrivo = new QGridLayout; frameArrivo->setLayout(layoutFrameArrivo); m_stazioneArrivo = new QLabel(frameArrivo); layoutFrameArrivo->addWidget(m_stazioneArrivo, 1,0); m_arrivoProgrammato = new QLabel(frameArrivo); layoutFrameArrivo->addWidget(m_arrivoProgrammato, 0, 2); m_binArrivoProgrammato = new QLabel(frameArrivo); layoutFrameArrivo->addWidget(m_binArrivoProgrammato, 0, 4); m_arrivo = new QLabel(frameArrivo); layoutFrameArrivo->addWidget(m_arrivo, 2, 2); m_binArrivoReale = new QLabel(frameArrivo); layoutFrameArrivo->addWidget(m_binArrivoReale, 2, 4); m_stato = new QLabel(this); m_stato->setWordWrap(true); m_stato->setFrameStyle(QFrame::Panel|QFrame::Raised); layout->addWidget(m_stato, 0); m_provvedimenti = new QLabel(this); m_provvedimenti->setWordWrap(true); m_provvedimenti->setFrameStyle(QFrame::Panel|QFrame::Raised); layout->addWidget(m_provvedimenti); //crea un nuovo tab widget che conterrà tutti i dettagli sulla marcia del treno m_dettagli = new QTabWidget(this); m_dettagli->setMovable(true); layout->addWidget(m_dettagli, 1); //aggiungi al tab widget una linguetta con l'elenco delle fermate intermedie m_tabella = new TabellaFermate(this); m_dettagli->addTab(m_tabella, QString::fromUtf8("Elenco fermate intermedie")); //aggiungi al tab widget una linguetta con i dettagli della marcia del treno, per il momento vuota //m_dettagli->addTab(new QWidget, QString::fromUtf8("Marcia treno")); setLayout(layout); //conessioni connect(m_stazionePartenza, SIGNAL(linkActivated(const QString& )), this, SLOT(linkAttivato(const QString&))); connect(m_stazioneArrivo, SIGNAL(linkActivated(const QString& )), this, SLOT(linkAttivato(const QString&))); connect(this, SIGNAL(apriSchedaStazione(const QString&, bool)), parent, SIGNAL(apriSchedaStazione(const QString&, bool))); //connect(m_tabella, SIGNAL(itemActivated(QTableWidgetItem *)), this, SLOT(itemAttivato(QTableWidgetItem*))); connect(m_tabella, SIGNAL(itemClicked(QTableWidgetItem *)), this, SLOT(itemAttivato(QTableWidgetItem*))); } void WidgetDatiTreno::impostaNumeroTreno(const QString& numero) { m_titolo->setText(QString::fromUtf8("Treno %1").arg(numero)); } void WidgetDatiTreno::impostaAggiornamento(const QString& messaggio, bool errore) { //se errore è true allora il parsing non è andato a buon fine, imposta il messaggio in rosso //e grassetto per evidenziarlo if (errore) m_aggiornamento->setText(QString("%1").arg(messaggio)); else m_aggiornamento->setText(messaggio); } void WidgetDatiTreno::aggiornaTreno(const TrenoVT::DatiTreno& treno) { //aggiorna numero e categoria treno m_titolo->setText(treno.numeroTreno()); //aggiorna i dati di partenza, estratti dal riepilogo m_stazionePartenza->setText(QString::fromUtf8("Stazione di partenza: %1").arg(treno.dato(TrenoVT::dtPartenza))); m_partenzaTeorica->setText(QString::fromUtf8("Orario di partenza programmato: %1").arg(treno.dato(TrenoVT::dtOrarioPartenzaProgrammato))); m_partenzaReale->setText(QString::fromUtf8("Orario di partenza reale: %1").arg(treno.dato(TrenoVT::dtOrarioPartenzaReale))); m_binPartenzaProgrammato->setText(QString::fromUtf8("Binario di partenza programmato: %1").arg(treno.dato(TrenoVT::dtBinarioPartenzaProgrammato))); m_binPartenzaReale->setText(QString::fromUtf8("Binario di partenza reale: %1").arg(treno.dato(TrenoVT::dtBinarioPartenzaReale))); //aggiorna i dati di arrivo m_stazioneArrivo->setText(QString::fromUtf8("Stazione di arrivo: %1").arg(treno.dato(TrenoVT::dtArrivo))); m_arrivoProgrammato->setText(QString::fromUtf8("Orario di arrivo programmato: %1").arg(treno.dato(TrenoVT::dtOrarioArrivoProgrammato))); if (treno.statoTreno() == TrenoVT::TrenoArrivato ) m_arrivo->setText(QString::fromUtf8("Orario di arrivo reale: %1").arg(treno.dato(TrenoVT::dtOrarioArrivo))); else m_arrivo->setText(QString::fromUtf8("Orario di arrivo stimato: %1").arg(treno.dato(TrenoVT::dtOrarioArrivo))); m_binArrivoProgrammato->setText(QString::fromUtf8("Binario di arrivo programmato %1").arg(treno.dato(TrenoVT::dtBinarioArrivoProgrammato))); m_binArrivoReale->setText(QString::fromUtf8("Binario di arrivo reale %1").arg(treno.dato(TrenoVT::dtBinarioArrivoReale))); //aggiorna i dati sull'ultimo rilevamento impostaStato(treno.statoTreno(), treno); impostaProvvedimenti(treno.dato(TrenoVT::dtProvvedimenti)); //riempie la tabella QList fermate = treno.fermate(); m_tabella->setRowCount(fermate.count()); for (int i = 0; inomeFermata().simplified()); itemSottolineato(item, true); m_tabella->setItem(i, TrenoVT::colFermata, item); if (fermata->effettuata()) item = new QTableWidgetItem(QString::fromUtf8("Sì")); else { if (fermata->soppressa()) { item = new QTableWidgetItem(QString::fromUtf8("Soppressa")); item->setTextColor(Qt::red); } else item = new QTableWidgetItem(QString::fromUtf8("No")); } item->setTextAlignment(Qt::AlignCenter); m_tabella->setItem(i, TrenoVT::colEffettuata, item); item = new QTableWidgetItem(fermata->binarioProgrammato().simplified()); item->setTextAlignment(Qt::AlignCenter); m_tabella->setItem(i, TrenoVT::colBinarioProgrammato, item); item = new QTableWidgetItem(fermata->binarioReale().simplified()); item->setTextAlignment(Qt::AlignCenter); m_tabella->setItem(i, TrenoVT::colBinarioReale, item); item = new QTableWidgetItem(fermata->oraArrivoProgrammata().simplified()); item->setTextAlignment(Qt::AlignCenter); m_tabella->setItem(i, TrenoVT::colArrivoProgrammato, item); item = new QTableWidgetItem(fermata->oraArrivoStimata().simplified()); item->setTextAlignment(Qt::AlignCenter); m_tabella->setItem(i, TrenoVT::colArrivoStimato, item); item = new QTableWidgetItem(fermata->oraArrivoReale().simplified()); item->setTextAlignment(Qt::AlignCenter); m_tabella->setItem(i, TrenoVT::colArrivoReale, item); } m_tabella->ridimensionaColonne(); } //imposta l'etichetta con lo stato del treno void WidgetDatiTreno::impostaStato(TrenoVT::StatoTreno stato) { switch(stato) { case TrenoVT::TrenoNonPrevisto: m_stato->setText(QString::fromUtf8("Il numero del treno non è stato trovato. Probabilmente il treno" " non è previsto oggi, o circola con" " un numero differente. Controllare se il numero è corretto.")); break; case TrenoVT::TrenoCancellato: m_stato->setText(QString::fromUtf8("Il treno oggi è stato soppresso")); break; default: ; } } void WidgetDatiTreno::impostaStato(TrenoVT::StatoTreno stato, TrenoVT::DatiTreno treno) { switch(stato) { case TrenoVT::TrenoNonPrevisto : impostaStato(TrenoVT::TrenoNonPrevisto); break; case TrenoVT::TrenoNonPartito : m_stato->setText(QString::fromUtf8("Il treno non risulta ancora partito dalla stazione di partenza")); break; case TrenoVT::TrenoInViaggio : { QString temp; temp = QString::fromUtf8("Il treno viaggia %1. ").arg(treno.dato(TrenoVT::dtRitardoTransito)); if (treno.dato(TrenoVT::dtUltimoRilevamento) != "") temp += QString::fromUtf8("Ultimo rilevamento a %1 alle ore %2").arg(treno.dato(TrenoVT::dtUltimoRilevamento)).arg(treno.dato(TrenoVT::dtOrarioTransito)); m_stato->setText(temp); } break; case TrenoVT::TrenoArrivato : { QString temp; temp = QString::fromUtf8("Il treno è arrivato %1. ").arg(treno.dato(TrenoVT::dtRitardoTransito)); m_stato->setText(temp); } break; default: break; } } //cancella tutte le scritte nel widget void WidgetDatiTreno::inizializza() { //inizializza le scritte nel frame per la partenza m_stazionePartenza->setText(QString::fromUtf8("Stazione di partenza:")); m_partenzaTeorica->setText(QString::fromUtf8("Orario di partenza programmato:")); m_partenzaReale->setText(QString::fromUtf8("Orario di partenza reale:")); m_binPartenzaProgrammato->setText(QString::fromUtf8("Binario di partenza programmato:")); m_binPartenzaReale->setText(QString::fromUtf8("Binario di partenza reale:")); //inizializza le scritte nel frame per l'arrivo m_stazioneArrivo->setText(QString::fromUtf8("Stazione di arrivo:")); m_arrivoProgrammato->setText(QString::fromUtf8("Orario di arrivo programmato:")); m_arrivo->setText(QString::fromUtf8("Orario di arrivo reale:")); m_binArrivoProgrammato->setText(QString::fromUtf8("Binario di arrivo programmato:")); m_binArrivoReale->setText(QString::fromUtf8("Binario di arrivo reale:")); m_stato->clear(); m_provvedimenti->clear(); m_tabella->clearContents(); } //slot //Questo slot viene attivato quando si fa click sul nome di una stazione. Viene emesso un segnale per attivare l'apertura della scheda della stazione corrispondente void WidgetDatiTreno::linkAttivato(const QString& testo) { emit apriSchedaStazione(ParserViaggiaTrenoBase::sostituisciNomeStazione(testo), true); } void WidgetDatiTreno::itemAttivato(QTableWidgetItem* item) { int col = item->column(); if (col == TrenoVT::colFermata) emit(apriSchedaStazione(ParserViaggiaTrenoBase::sostituisciNomeStazione(item->text()), true)); } TabellaFermate::TabellaFermate(QWidget *parent) : QTableWidget(parent) { setAlternatingRowColors(true); setSelectionMode(QAbstractItemView::NoSelection); setEditTriggers(QAbstractItemView::NoEditTriggers); verticalHeader()->setVisible(false); setMouseTracking(true); horizontalHeader()->setMouseTracking(true); QStringList etichette; etichette<setStretchLastSection(true); ridimensionaColonne(); } void TabellaFermate::mouseMoveEvent(QMouseEvent *event) { int col = columnAt(event->x()); if (col == TrenoVT::colFermata ) setCursor(Qt::PointingHandCursor); else setCursor(Qt::ArrowCursor); event->accept(); } //aggiusta la dimensione delle colonne della tabella in modo che il contenuto delle celle sia visibile //non usa resizeColumnsToContents perché funziona solo sulla parte visibile delle colonne void TabellaFermate::ridimensionaColonne() { int larghezza; //calcola la larghezza massima for (int col = 0; col <= columnCount(); col++) { larghezza = horizontalHeader()->sectionSizeHint(col); for (int riga = 0; riga < rowCount(); riga++) larghezza = qMax(larghezza, larghezzaItem(item(riga, col))); setColumnWidth(col, larghezza+10); } } //imposta il frame con la descrizione dei provvedimenti void WidgetDatiTreno::impostaProvvedimenti(const QString& provvedimenti) { m_provvedimenti->setText(provvedimenti); } qviaggiatreno-2013.7.3/src/download_trenord.h0000664000175000017500000000415412215771022021076 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2010-2012 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef DOWNLOAD_TRENORD_H #define DOWNLOAD_TRENORD_H #include class QViaggiaTreno; class ParserTrenord; //Questa classe è la classe in cui viene centralizzato il download dal sito Trenord class DownloadTrenord :public QObject { Q_OBJECT public: DownloadTrenord(QViaggiaTreno* qvt, QNetworkAccessManager* nam); public slots: void aggiornaListaDirettrici(); void scaricaAvvisi(ParserTrenord *parser); void downloadFinito(); void scaricaNuovaDirettrice(); private: QViaggiaTreno *m_qvt; QNetworkAccessManager* m_nam; ParserTrenord *m_parser; QQueue m_coda; QTimer* m_timerAvvisi; }; #endif // DOWNLOAD_TRENORD_H qviaggiatreno-2013.7.3/src/schedatreno.h0000664000175000017500000001072312215773217020040 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2008-2010 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef SCHEDATRENO_H #define SCHEDATRENO_H #include "schedaviaggiatreno.h" #include "parser_viaggiatreno_treno.h" class QViaggiaTreno; class WidgetDatiTreno; class SchedaTreno : public SchedaQViaggiaTreno { Q_OBJECT public: SchedaTreno(QViaggiaTreno *parent, const QString & numero, const unsigned int intervalloStandard = 2); QString numero() const; virtual QString titolo( bool titoloBreve = false) const; QString codiceOrigine() const {return m_codiceStazioneOrigine;} virtual void salvaScheda(QSettings& ); public slots: virtual void aggiorna(); virtual void downloadFinito(const QString& rispostaVT); void cambiaCodiceOrigine(const QString& nuovoCodice); private slots: private: QString m_numero, m_codiceStazioneOrigine; int m_idTabelle, m_idNumeroSbagliato, m_idNumeroAmbiguo; bool m_riepilogoScaricato; WidgetDatiTreno* m_widget; TrenoVT::DatiTreno m_orarioTreno; ParserTrenoViaggiaTreno * m_parser; signals: void downloadRiepilogoTreno(quint32, const QString&); void downloadRiepilogoTreno(quint32, const QString&, const QString&); void downloadDettagliTreno(quint32, const QString&); void downloadDettagliTreno(quint32, const QString&, const QString&); }; //widget che viene mostrato quando il numero treno introdotto risulta ambiguo //codice nel file schedatreno_widget.cpp class WidgetDisambiguaNumeroTreno : public QWidget { Q_OBJECT public: WidgetDisambiguaNumeroTreno(SchedaQViaggiaTreno *parent, const QString& numero, QMaplistaCodiciTreno); private: QListWidget* lista; private slots: void sceltaTreno(); signals: void numeroDisambiguato(const QString& nuovoCodice); }; class TabellaFermate; class WidgetDatiTreno : public QWidget { Q_OBJECT public: WidgetDatiTreno(SchedaTreno* parent); void impostaNumeroTreno(const QString& numero); void impostaAggiornamento(const QString& messaggio, bool errore = false); void aggiornaTreno(const TrenoVT::DatiTreno& treno); void impostaStato(TrenoVT::StatoTreno stato); void impostaStato(TrenoVT::StatoTreno stato, TrenoVT::DatiTreno treno); void impostaProvvedimenti(const QString& provvedimenti); void inizializza(); private: QLabel *m_titolo, *m_aggiornamento; QLabel *m_stazionePartenza, *m_partenzaTeorica, *m_binPartenzaProgrammato, *m_partenzaReale, *m_binPartenzaReale; QLabel *m_stazioneArrivo, *m_arrivoProgrammato, *m_binArrivoProgrammato, *m_arrivo, *m_binArrivoReale; QLabel *m_stato, *m_provvedimenti; QTabWidget *m_dettagli; TabellaFermate * m_tabella; private slots: void linkAttivato(const QString& testo); void itemAttivato(QTableWidgetItem* item); signals: void apriSchedaStazione(const QString&, bool); }; class TabellaFermate : public QTableWidget { Q_OBJECT public: TabellaFermate(QWidget* parent); void ridimensionaColonne(); protected: virtual void mouseMoveEvent(QMouseEvent *event); }; #endif // SCHEDATRENO_H qviaggiatreno-2013.7.3/src/src.pro0000664000175000017500000000312512215773217016677 0ustar locutuslocutusTEMPLATE = app CONFIG += warn_on QT += xml webkitwidgets TARGET = qviaggiatreno DESTDIR = ../bin RESOURCES = application.qrc MOC_DIR = ../build/moc RCC_DIR = ../build/rcc UI_DIR = ../build/ui unix:OBJECTS_DIR = ../build/o/unix win32:OBJECTS_DIR = ../build/o/win32 macx:OBJECTS_DIR = ../build/o/mac FORMS += dlgnomestazione.ui \ dlgconfigurazione.ui \ wgtstazione.ui \ wgtavvisitrenord.ui SOURCES += qviaggiatreno.cpp \ main.cpp \ schedaviaggiatreno.cpp \ schedastazione.cpp \ qviaggiatrenoslots.cpp \ schedatreno.cpp \ schedalistatreni.cpp \ qviaggiatrenoslots_schede.cpp \ schedastazione_widget.cpp \ schedalistatreni_widget.cpp \ items.cpp \ schedatreno_widget.cpp \ utils.cpp \ download_viaggiatreno.cpp \ config.cpp \ dialogo_nomestazione.cpp \ dialogo_configurazione.cpp \ qledindicator.cpp \ parser_viaggiatreno_stazione.cpp \ parser_viaggiatreno_treno.cpp \ schedaavvisitrenord.cpp \ schedaavvisitrenord_widget.cpp \ download_trenord.cpp \ parser_trenord.cpp \ parser_viaggiatreno_base.cpp HEADERS += qviaggiatreno.h \ schedaviaggiatreno.h \ schedastazione.h \ schedatreno.h \ schedalistatreni.h \ items.h \ utils.h \ download_viaggiatreno.h \ config.h \ dialogo_nomestazione.h \ dialogo_configurazione.h \ qledindicator.h \ parser_viaggiatreno_stazione.h \ parser_viaggiatreno_treno.h \ parser_viaggiatreno_lista.h \ parser_viaggiatreno_base.h \ schedaavvisitrenord.h \ download_trenord.h \ parser_trenord.h qviaggiatreno-2013.7.3/src/parser_viaggiatreno_stazione.h0000664000175000017500000001565412215773217023520 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2011 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef PARSER_VIAGGIATRENO_STAZIONE_H #define PARSER_VIAGGIATRENO_STAZIONE_H #include #include #include #include "parser_viaggiatreno_base.h" class SchedaQViaggiaTreno; namespace StazioneVT { enum {colCategoria = 0, colNumero = 1, colStazione = 2, colBinProgrammato = 3, colBinReale = 4, colOrario = 5, colRitardo = 6, colUltima = colRitardo}; //classe che memorizza i dati di ogni singolo treno in arrivo/partenza class DatiTreno { public: // restituisce la categoria del treno QString categoria() const {return m_categoria;} // imposta la categoria del treno void impostaCategoria(const QString& cat) { m_categoria = cat;} //restiuisce numero del treno QString numero() const { return m_numero; } //imposta il numero void impostaNumero(const QString& num) { m_numero = num; } //restituisce l'eventuale codice della stazione di origine del treno QString codiceOrigine() const {return m_codice;} void impostaCodiceOrigine(const QString& cod) {m_codice = cod;} //restituisce il nome della stazione di origine/destinazione QString stazione() const { return m_stazione; } //imposta il nome della stazione di origine destinazione void impostaStazione(const QString& staz) {m_stazione = staz;} //restituisce il binario di arrivo/partenza previsto QString binarioProgrammato() const {return m_binario_prog;} //imposta il binario di arrivo/partenza previsto void impostaBinarioProgrammato(const QString& bp) {m_binario_prog = bp; } //restituisce il binario di arrivo/partenza reale QString binarioReale() const { return m_binario_reale; } //imposta il binario di arrivo/partenza reale void impostaBinarioReale(const QString& br) { m_binario_reale = br; } //restituisce l'orario di arrivo/partenza previsto QString orario() const { return m_orario; } //imposta l'orario di arrivo/partenza previsto void impostaOrario(const QString& ora) { m_orario = ora; } //restituisce il ritardo QString ritardo() const { return m_ritardo; } //imposta il ritardo void impostaRitardo(const QString& rit) { m_ritardo = rit; } private: QString m_categoria, m_numero, m_stazione, m_binario_prog, m_binario_reale, m_orario, m_ritardo, m_codice; }; }; //Questa classe si occupa del parsing della pagina di ViaggiaTreno //con il quadro Arrivi/Partenze di una stazione class ParserStazioneViaggiaTreno : public ParserViaggiaTrenoBase { Q_OBJECT public: ParserStazioneViaggiaTreno(SchedaQViaggiaTreno * scheda); //imposta il testo della risposta di ViaggiaTreno che dovrà essere analizzato dal parser void impostaRispostaVT(const QString& rispostaVT); //true se ViaggiaTreno segnala che la stazione non esiste bool stazioneNonTrovata() const; //true se ViaggiaTreno segnala che il nome della stazione è ambiguo bool nomeStazioneAmbiguo() const; //restituisce una QMap con una corrispodenza Nome stazione<->Codice stazione di tutte le stazioni //che viaggiatreno segnala come stazioni possibili vista la stringa passata come nome //esempio se si cerca "Monza" passerà come nomi stazioni sia "Monza" che "Monza sobborghi" QMap listaCodiciStazioni(const QString& rispostaVT ); //restituisce il testo della risposta di viaggiatreno che viene attualmente analizzata QString rispostaVT() const {return m_rispostaVT;} //analizza il testo della risposta di viaggiatreno e restituisce true se non sono incontrati errori sintattici bool analizza(); //restituisce il nome della stazione QString stazione() const {return m_stazione;} //restituisce riga dove è stato incontrato errore int rigaErrore() const {return m_riga;} //restituisce colonna dove è stato incontrato errore int colErrore() const {return m_col;} //restituisce il messaggio di errore QString errore() const {return m_err;} //restituisce il prospetto degli arrivi, attenzione richiamare la funzione //solo dopo aver eseguito analizza() ed essersi assicurato che restituisca true QList arrivi() const { return m_arrivi; } //restituisce il prospetto delle partenze, valgono gli stessi avvertimenti di arrivi() QList partenze() const { return m_partenze; } private: SchedaQViaggiaTreno *m_scheda; QString m_rispostaVT; int m_riga, m_col; QString m_err; QDomDocument m_docDOM; QString m_stazione; QList m_arrivi, m_partenze; }; //Classe che implementa il modello di dati che viene visualizzato in una tabella //della scheda Stazione // se partenze è true allora il modello rappresenta il prospetto delle partenze //altrimenti rappresenta il prospetto degli arrivi class ModelloStazione: public QAbstractTableModel { Q_OBJECT public: ModelloStazione(QWidget *parent, bool partenze); virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; virtual QVariant data(const QModelIndex &index, int role) const; virtual int rowCount(const QModelIndex &parent) const; virtual int columnCount(const QModelIndex &parent) const; void aggiornaModello(const QList &treni); QStringList categorie() const {return m_categorie;} QStringList stazioni() const {return m_stazioni;} private: bool m_partenze; QStringList m_stazioni, m_categorie; QList m_treni; }; #endif // PARSER_VIAGGIATRENO_STAZIONE_H qviaggiatreno-2013.7.3/src/schedaviaggiatreno.h0000664000175000017500000001001412215773217021361 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2008-2012 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef SCHEDAVIAGGIATRENO_H #define SCHEDAVIAGGIATRENO_H // #include #include #include class QViaggiaTreno; //Questa è la classe base da cui derivano tutte le classi per le schede di monitoraggio class SchedaQViaggiaTreno : public QStackedWidget { Q_OBJECT public: enum TipoScheda {tsStazione, tsTreno, tsListaTreni, tsAvvisiTrenord}; SchedaQViaggiaTreno(QViaggiaTreno *parent, TipoScheda ts, const unsigned int intervalloStandard); //restituisce un puntatore all'istanza della classe QViaggiaTreno QViaggiaTreno* qViaggiaTreno() {return m_qviaggiatreno;} virtual void avvia(); virtual void ferma(); //restituisce true se la scheda può essere stampata, false in caso contrario bool stampabile() const {return m_stampabile;} //restituisce true se la scheda può essere esportata, false in caso contrario bool esportabile() const {return m_esportabile;} int intervallo() const; void impostaIntervallo(int nuovoInt); bool fermata() const {return !m_timer->isActive();} TipoScheda tipoScheda() const { return m_tipo; } quint32 idScheda() const { return m_id; } QString statoScheda() const { return m_stato; } virtual QString titolo(bool = false) const { return QString();} QDateTime ultimoAggiornamento() const { return m_ultimoAgg; } virtual void salvaScheda(QSettings & /*settings*/) {} public slots: virtual void aggiorna(); virtual void downloadFinito(const QString&) {} virtual void stampa() {} virtual void esporta() {} protected: QTimer *m_timer; QString m_stato; QDateTime m_ultimoAgg; // //alcune costanti che rappresentano lo stato della scheda static QString statoNuovaScheda; static QString statoInAggiornamento; static QString statoMonitoraggioAttivo; static QString statoMonitoraggioFermato; static QString statoErrore; void cambiaStato(QString nuovoStato); protected slots: private: QViaggiaTreno* m_qviaggiatreno; quint32 m_id; TipoScheda m_tipo; static unsigned long s_id; bool m_stampabile, m_esportabile; private: virtual QTextDocument* creaTextDocument() {return new QTextDocument(this);} signals: void GuiNonSincronizzata(quint32 id); void statoCambiato(quint32 id); void nomeSchedaCambiato(quint32 id); void apriSchedaStazione(const QString& stazione, bool nomeEsatto); void apriSchedaTreno(const QString& treno); void apriSchedaTreno(const QString& treno, const QString& codice); void messaggioStatus(const QString& msg); }; int larghezzaItem(const QTableWidgetItem* item); void itemSottolineato(QTableWidgetItem* item, bool sottolineato = true); #endif qviaggiatreno-2013.7.3/src/schedalistatreni.h0000664000175000017500000001140512215773217021065 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2009-2011 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef SCHEDALISTATRENI_H #define SCHEDALISTATRENI_H #include "schedaviaggiatreno.h" #include "parser_viaggiatreno_treno.h" class QViaggiaTreno; class WidgetListaTreni; class SchedaListaTreni: public SchedaQViaggiaTreno { Q_OBJECT public: SchedaListaTreni(QViaggiaTreno* parent, const unsigned int intervalloStandard = 3); virtual void avvia(); virtual void ferma(); virtual void aggiorna(); virtual QString titolo(bool = false) const; void impostaTitolo(); bool modificata() const {return m_modificata; } int numeroTreni() const {return m_listatreni.count();} void apriFile(const QString& filename); virtual void salvaScheda(QSettings& settings); public slots: void apri(); void salva(); void salvaConNome(); void aggiungiTreni(); void rimuoviTreni(); void rimuoviTuttiITreni(); virtual void downloadFinito(const QString& rispostaVT); private slots: void cambiaCodiceOrigine(const QString& nuovoCodice); private: static int s_count; WidgetListaTreni* m_widget; int m_idTabella, m_idNumeroAmbiguo; bool m_modificata; QString m_titoloLista; QString m_nomefile; QDomDocument m_dom; ParserTrenoViaggiaTreno *m_parser; QMap m_listatreni; QQueue m_codatreni; QString m_trenoAttuale, m_trenoAmbiguo; private: void aggiungiTreno(const QString& numero, const QString& codice = ""); void rimuoviTreno(const QString& numero); void prossimoTreno(); void analizzaRispostaVT(const QString& risposta, ListaVT::DatiTreno *treno); void salvaFile(const QString& filename); signals: void downloadRiepilogoTreno(quint32, const QString&); void downloadRiepilogoTreno(quint32, const QString&, const QString&); }; class TabellaLista; class WidgetListaTreni: public QWidget { Q_OBJECT public: WidgetListaTreni(SchedaListaTreni *parent); void aggiungiTreno(ListaVT::DatiTreno *treno); void rimuoviTreno(const QString& treno); void ridimensionaColonne(); void impostaTitolo(const QString& titolo); void aggiornaTreno(const ListaVT::DatiTreno* treno); void impostaAggiornamento(const QString& testo, bool errore = false); void rimuoviTuttiITreni(); private: TabellaLista* m_tabella; QLabel *m_labelTitolo, *m_labelAggiornamento; void impostaCella(int riga, int colonna, const QString& testo); int larghezzaItem(const QTableWidgetItem* item); private slots: void itemAttivato(QTableWidgetItem* item); signals: void apriSchedaStazione(const QString& stazione, bool nomeEsatto); void apriSchedaTreno(const QString& treno); }; class DialogoAggiuntaTreni : public QDialog { Q_OBJECT public: DialogoAggiuntaTreni(QWidget* parent); bool listaVuota() const; QStringList listaTreni() const; private: QListWidget *m_listwidget; QLineEdit * m_lineedit; private slots: void aggiungiTreno(); }; class DialogoRimozioneTreni: public QDialog { Q_OBJECT public: DialogoRimozioneTreni(const QStringList& lista, QWidget* parent); bool listaVuota() const; QStringList listaTreni() const; private: QListWidget *m_listwidget; QDialogButtonBox *m_buttonBox; private slots: void selezioneModificata(); }; class TabellaLista : public QTableWidget { Q_OBJECT public: TabellaLista(QWidget* parent); void mouseMoveEvent(QMouseEvent *event); }; #endif // SCHEDALISTATRENI_H qviaggiatreno-2013.7.3/src/main.cpp0000664000175000017500000000327112215773056017021 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2008-2010 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include #include "qviaggiatreno.h" int main(int argc, char *argv[]) { Q_INIT_RESOURCE(application); QApplication app(argc, argv); QTranslator qTranslator; qTranslator.load(":/traduzioni/qt_it.qm"); app.installTranslator(&qTranslator); QViaggiaTreno * mw = new QViaggiaTreno(); mw->show(); return app.exec(); } qviaggiatreno-2013.7.3/src/traduzioni/0000775000175000017500000000000012214333074017545 5ustar locutuslocutusqviaggiatreno-2013.7.3/src/traduzioni/qt_it.qm0000664000175000017500000042134412215773056021245 0ustar locutuslocutusW?X?Y@ ]`"i ;>;S;u;;FM`JOO[y}`rm`Y (5L+;(+;r+;y+O(+Or1YE@;F@H4{HYHIAEJãJJgJVK-[LDPLPSRJZr[`s[`]\_|_1zE|)s,+tz|$$,~"yyz?=~,=9`xEqEE[(I%.@%]֍-6֍Sc֍U֍Y50=0u0M030H05t Q Dx  D+k,yY,@*yͷ*y*T%*0Ly*0+F0+FO+L+f)+f3+zVh+>++.+zV+)p+r++^+ޥ++į>+įK+įb+V4r7x=@])C:F0iE Fn4qFn4Gs[Hw9=GHw9sHI'IToI`_J+? J+~J6?J6XJ6t J6xJ6J6J6LJ6jXJ6oJ6J63JcbTKQKLZyL&LXKLb.M5y&MbCMeM^N]O|WPFEBPFEwPFEQRuR|DRS8^1LTT[Tʴ$T9U|q#U}V1GdV1WVl1V/SVVkVVVEpWPWWTFWTPWTX9Xv)XX˙vXYNYNYTY'ZgZkRZ~Zo\[\]4\]4\(\j\\&gcN |^U|A+ vqvPGqf)CF4L4546C$IA:[ve8$gmEIy>ɵn[lɵnyɵn2ɵnɵn]ɵnHɵnaɵneM< B*bM/Ea_uq? (HSp95]#Q@3%UT(ŎA*4 -ctY-ct32:t3Y5vن?tA<'C5C;'Ce5D"5dD1QM9Ca;!DaR?eeRfP0lgl2l2foRQYorv̲dv̲ew^xf+|{y8cuGIWJ22 {'R.yAi\y<),TmUęur0TSIQ : Yd<  $b)P-/=N|1$5~T< (<3m?2 MNky<Ui,]8h`]W`#zjtܹlg*lyzŀl}.oi׹vtyYvtyw1..m)E6ra66^oYM>pR1T5=)X=r}ErEs!{=8A,τhA[y7]L`QtknHY]_#bgZmMݽMEE{n"wh{,-Nɘe5$2 4fR0@fRNcH3;SPqVuQV fR|R' 8 ׈ @ Dintbg-f"o$i%CEF&~)2+D],E5?"?>u/FuKNK-M|RyU5kV|]~]8g^ky^A{yAow?~5tK5tUF:G%]ni<nkصǥ}n++`ևt){y@;xAr>9\sHD%Tj5PUC^ƨ'hƨY˾ҝz/iNէ?_z}ߺ1 {fGt롥`k^!.5 i l$~bN~bo1M9^tlW!'+u+3c&/H/W4~26 <? 2ATQGuGbLAU4OrPѧt@QSn2|UU´URUT{Z1ZiZZ[i[']k*_P_pRe0iiRm?$x%y;{V{}u}wq}w}w#}NYClrt'{BvZ_t0tP'YdO.r.73}iUK5GYtMtmt_ a^q+ Fbʢ^ʢ%ƴ%4d_ddd&d,h059э[Cl[+NS& yrULdh$nwIɕ u  cq+,D2zl6?;25CU]8GaPJ01K3"KU|~P\Oarcn8p&{t2|(^B|x|O}wZ/}$qj}$}$~9nϗZZZ~'ߒDrۚqK<uf+·X·t·׳V 5/FzEu+%5bTL\i~*Dbji9%w#' =[={g=O?.?@TCtIEfNPQsACV%V%XU 3`vCbDbGwfdqgA:hInihi$x1 ~z*2||QR d <ZU}B}zzc.4/C5iZzrXӼm^en<b †5iCw1ʴ5eʴ5ʶXI^ ۔#QA8F5BDF5Y+paI.I}As+7 _. }$] qeU ڤD ڥU dt Ez Ed Ac4O AcX  35 f /> % v nӶ N u"'  Y+z| K@9 % 팤 %' '  q  D] ) }0 9 o|' )G */|I .>( ;u = BK> H % J"  K2 Ty .e T^| Uj4 ] ` `` `d b c(S cEM d e/ e eemJ e{z f1 f*T g5UN k,6 rD"< t /} ̺ -D . ۷Pg ksO kk U)  <C& Z w  0  - z+]  3  I %   ϶ xH   !pd( .U 2 > > > >' >T >i > >2 > > ?t|S DT% G  IT Mb P@k RV RV RVLp S. SG  SW^ Y Y [ hۮ! j7o m(g pU B T[ T֐ T T* 5L ^I $ D B , ,# SN )d T% ȿ .\Q . .j . .!M .b! .e    a yB x#O  ɾd ɾd Ӵn  > %m u A |w` ; 9 a :b  ʜS ffk fiz fpZ t $uS #=[ (I$m +>W 64xw ;ɾØ Fg K9 Pt. Pt ckf feo feD gE hQ$! iFC$ i i jӮJ m9` m93 uH uN v&0X v{ wp w w: w}q w}U w} \   J ^a }˻ Rd %7 P  xN Ue ɰeJ X1& b Yi x< D2> i +y t5} t5c  , )&A DBRw^TO4,gTO*L*/ENG/E=BDŽI_OOCS5IXRuZa.tgcGvɅ8y?.~%%4 4&SN^3Ǘ:-gD:BK,Ӯ`bӮ`oӮ`or&ݖB[y=r#F Z ,> lD^l"#fo$U6%4w%4,--vDz0i)'01c2wTDEF74H6NJdnKc5r<c5g3O8iClp+wyCF{`{~a76$pY5$S&<& bDO`9- >bՓN   E"~rNr<-1ky6U 'T"QRBUXP?F~t2RՅaddMcU̴i Chiudi scheda Close Tab CloseButtonErrore falso ! Fake error ! FakeReplyUrl non valido Invalid URL FakeReply$Informazioni su %1About %1MAC_APPLICATION_MENUNascondi %1Hide %1MAC_APPLICATION_MENUNascondi altri Hide OthersMAC_APPLICATION_MENUPreferenze...Preferences...MAC_APPLICATION_MENUEsci da %1Quit %1MAC_APPLICATION_MENUServiziServicesMAC_APPLICATION_MENUMostra tuttoShow AllMAC_APPLICATION_MENUAccessibilit AccessibilityPhonon::Comunicazioni CommunicationPhonon:: GiochiGamesPhonon:: MusicaMusicPhonon::Notifiche NotificationsPhonon:: VideoVideoPhonon::2<html>Cambio al dispositivo di riproduzione audio <b>%1</b><br/>che ha una preferenza maggiore o configurato specificatamente per questo stream.</html>Switching to the audio playback device %1
which has higher preference or is specifically configured for this stream.Phonon::AudioOutput<html>Cambio al dispositivo di riproduzione audio <b>%1</b><br/>che appena diventato disponibile e ha una preferenza pi alta.</html>xSwitching to the audio playback device %1
which just became available and has higher preference.Phonon::AudioOutput<html>Il dispositivo di riproduzione audio <b>%1</b> non funziona.<br/>Ripiego su <b>%2</b>.</html>^The audio playback device %1 does not work.
Falling back to %2.Phonon::AudioOutput6Ritorno al dispositivo '%1'Revert back to device '%1'Phonon::AudioOutputWarning: Non sono stati trovati i plugin di base GStreamer. Tutto il supporto audio e video stato disabilitato~Warning: You do not seem to have the base GStreamer plugins installed. All audio and video support has been disabledPhonon::Gstreamer::BackendWarning: Non stato trovato il pacchetto gstreamer0.10-plugins-good. Alcune opzioni video sono state disabilitate.Warning: You do not seem to have the package gstreamer0.10-plugins-good installed. Some video features have been disabled.Phonon::Gstreamer::BackendManca un codec richiesto. Installare il seguente codec per riprodurre questo contenuto: %0`A required codec is missing. You need to install the following codec(s) to play this content: %0Phonon::Gstreamer::MediaObject^Impossibile decodificare la sorgente del media.Could not decode media source.Phonon::Gstreamer::MediaObject\Impossibile localizzare la sorgente del media.Could not locate media source.Phonon::Gstreamer::MediaObjectImpossibile aprire il dispositivo audio. Il dispositivo gi in uso.:Could not open audio device. The device is already in use.Phonon::Gstreamer::MediaObjectRImpossibile aprire la sorgente del media.Could not open media source.Phonon::Gstreamer::MediaObject8Tipo di sorgente non valido.Invalid source type.Phonon::Gstreamer::MediaObjectvInstallazione del plugin per codec fallita per il codec: %0.Plugin codec installation failed for codec: %0Phonon::Gstreamer::MediaObjectAccesso negato Access denied Phonon::MMFEsiste giAlready exists Phonon::MMFUscita audio Audio Output Phonon::MMF^Impossibile riprodurre componenti audio o video-Audio or video components could not be played Phonon::MMF&Errore uscita audioAudio output error Phonon::MMF.Impossibile connettersiCould not connect Phonon::MMFErrore DRM DRM error Phonon::MMFErrore decoder Decoder error Phonon::MMFDisconnesso Disconnected Phonon::MMF In usoIn use Phonon::MMF&Banda insufficienteInsufficient bandwidth Phonon::MMFUrl non valido Invalid URL Phonon::MMF*Protocollo non validoInvalid protocol Phonon::MMF Errore multicastMulticast error Phonon::MMF>Errore di comunicazione di reteNetwork communication error Phonon::MMF(Rete non disponibileNetwork unavailable Phonon::MMFNessun erroreNo error Phonon::MMFNon trovato Not found Phonon::MMFNon pronto Not ready Phonon::MMFNon supportato Not supported Phonon::MMF*Memoria insufficiente Out of memory Phonon::MMFOverflowOverflow Phonon::MMF(Percorso non trovatoPath not found Phonon::MMFAccesso negatoPermission denied Phonon::MMF&Errore server proxyProxy server error Phonon::MMF6Server proxy non supportatoProxy server not supported Phonon::MMF"Avviso dal server Server alert Phonon::MMF0Streaming non supportatoStreaming not supported Phonon::MMF<Il dispositivo di uscita audioThe audio output device Phonon::MMFUnderflow Underflow Phonon::MMF.Errore sconosciuto (%1)Unknown error (%1) Phonon::MMF&Errore uscita videoVideo output error Phonon::MMFBImpossibile ottenere la posizioneGetting position failed Phonon::MMF::AbstractVideoPlayer@Impossibile aprire il clip videoOpening clip failed Phonon::MMF::AbstractVideoPlayer8Impossibile mettere in pausa Pause failed Phonon::MMF::AbstractVideoPlayerDImpossibile impostare la posizione Seek failed Phonon::MMF::AbstractVideoPlayer %1 Hz%1 HzPhonon::MMF::AudioEqualizerBImpossibile ottenere la posizioneGetting position failedPhonon::MMF::AudioPlayer8Errore visualizzazione videoVideo display errorPhonon::MMF::DsaVideoPlayerAbilitatoEnabledPhonon::MMF::EffectFactoryErrore apertura sorgente: impossibile determinare il tipo di media8Error opening source: media type could not be determinedPhonon::MMF::MediaObjectVErrore apertura sorgente: risorsa compressa,Error opening source: resource is compressedPhonon::MMF::MediaObjectXErrore apertura sorgente: risorsa non valida(Error opening source: resource not validPhonon::MMF::MediaObjectZErrore apertura sorgente: tipo non supportato(Error opening source: type not supportedPhonon::MMF::MediaObjectLivello (%) Level (%)Phonon::MMF::StereoWidening8Errore visualizzazione videoVideo display errorPhonon::MMF::SurfaceVideoPlayerMutoMutedPhonon::VolumeSliderUsa questa controllo per regolare il volume. La posizione pi a sinistra 0%, quella pi a destra %1%WUse this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1%Phonon::VolumeSliderVolume: %1% Volume: %1%Phonon::VolumeSlider&%1, %2 non definito%1, %2 not definedQ3Accel,%1 ambiguo non gestitoAmbiguous %1 not handledQ3AccelEliminaDelete Q3DataTable FalsoFalse Q3DataTableInserisciInsert Q3DataTableVeroTrue Q3DataTableAggiornaUpdate Q3DataTable%1 Impossibile trovare il file Controllare il nome del file e riprovare.+%1 File not found. Check path and filename. Q3FileDialog&Elimina&Delete Q3FileDialog&No&No Q3FileDialog&OK&OK Q3FileDialog &Apri&Open Q3FileDialog&Rinomina&Rename Q3FileDialog &Salva&Save Q3FileDialog&Non ordinare &Unsorted Q3FileDialog&S&Yes Q3FileDialog6<qt>Eliminare %1 "%2"?</qt>1Are you sure you wish to delete %1 "%2"? Q3FileDialogTutti i file(*) All Files (*) Q3FileDialog"Tutti i file(*.*)All Files (*.*) Q3FileDialogAttributi Attributes Q3FileDialogIndietroBack Q3FileDialogAnnullaCancel Q3FileDialog,Copia o sposta un fileCopy or Move a File Q3FileDialog.Crea una nuova cartellaCreate New Folder Q3FileDialogDataDate Q3FileDialogElimina %1 Delete %1 Q3FileDialog&Visualizza dettagli Detail View Q3FileDialogDirectoryDir Q3FileDialogDirectory Directories Q3FileDialogDirectory: Directory: Q3FileDialog ErroreError Q3FileDialogFileFile Q3FileDialog&Nome file: File &name: Q3FileDialog&Tipo file: File &type: Q3FileDialogTrova directoryFind Directory Q3FileDialogNon accessibile Inaccessible Q3FileDialog"Visualizza elenco List View Q3FileDialogCerca &in: Look &in: Q3FileDialogNomeName Q3FileDialogNuova cartella New Folder Q3FileDialog$Nuova cartella: %1 New Folder %1 Q3FileDialog Nuova cartella 1 New Folder 1 Q3FileDialog&Directory superioreOne directory up Q3FileDialogApriOpen Q3FileDialogApriOpen  Q3FileDialog0Anteprima contenuto filePreview File Contents Q3FileDialog6Anteprima informazioni filePreview File Info Q3FileDialogR&icaricaR&eload Q3FileDialogSola lettura Read-only Q3FileDialog"Lettura-scrittura Read-write Q3FileDialogLettura: %1Read: %1 Q3FileDialogSalva comeSave As Q3FileDialog2Selezionare una directorySelect a Directory Q3FileDialog*Mostra file &nascostiShow &hidden files Q3FileDialogDimensioniSize Q3FileDialog OrdinaSort Q3FileDialog Ordina per &data Sort by &Date Q3FileDialog Ordina per &nome Sort by &Name Q3FileDialog,Ordina per dimen&sioni Sort by &Size Q3FileDialogFile SpecialeSpecial Q3FileDialogDCollegamento simbolico a directorySymlink to Directory Q3FileDialog:Collegamento simbolico a fileSymlink to File Q3FileDialogLCollegamento simbolico a file specialeSymlink to Special Q3FileDialogTipoType Q3FileDialogSola scrittura Write-only Q3FileDialogScrittura: %1 Write: %1 Q3FileDialogla directory the directory Q3FileDialogil filethe file Q3FileDialog2il collegamento simbolico the symlink Q3FileDialogDImpossibile creare la directory %1Could not create directory %1 Q3LocalFs*Impossibile aprire %1Could not open %1 Q3LocalFsFImpossibile leggere la directory %1Could not read directory %1 Q3LocalFs^Impossibile rimuovere il file o la directory %1%Could not remove file or directory %1 Q3LocalFs>Impossibile rinominare %1 in %2Could not rename %1 to %2 Q3LocalFs.Impossibile scrivere %1Could not write %1 Q3LocalFsPersonalizza & Customize... Q3MainWindowAllineaLine up Q3MainWindow@Operazione terminata dall'utenteOperation stopped by the userQ3NetworkProtocolAnnullaCancelQ3ProgressDialogApplicaApply Q3TabDialogAnnullaCancel Q3TabDialogPredefinitiDefaults Q3TabDialog GuidaHelp Q3TabDialogOKOK Q3TabDialog &Copia&Copy Q3TextEdit&Incolla&Paste Q3TextEdit&Ripeti&Redo Q3TextEdit&Annulla&Undo Q3TextEditPulisciClear Q3TextEdit&TagliaCu&t Q3TextEditSeleziona tutto Select All Q3TextEdit ChiudiClose Q3TitleBar$Chiude la finestraCloses the window Q3TitleBarVContiene comandi per manipolare la finestra*Contains commands to manipulate the window Q3TitleBarMostra il nome della finestra e contiene controlli per manipolarlaFDisplays the name of the window and contains controls to manipulate it Q3TitleBarHImposta la finestra a schermo interoMakes the window full screen Q3TitleBarIngrandisciMaximize Q3TitleBarRiduci a iconaMinimize Q3TitleBar$Sposta la finestraMoves the window out of the way Q3TitleBarDRipristina una finestra ingrandita&Puts a maximized window back to normal Q3TitleBarNRipristina una finestra ridotta a icona&Puts a minimized window back to normal Q3TitleBar&Ripristina in basso Restore down Q3TitleBar$Ripristina in alto Restore up Q3TitleBarSistemaSystem Q3TitleBarAncora &More... Q3ToolBar(sconosciuto) (unknown) Q3UrlOperatorIl protocollo '%1' non supporta la la copia o lo spostamento di file o directoryIThe protocol `%1' does not support copying or moving files or directories Q3UrlOperator~Il protocollo '%1' non supporta la creazione di nuove directory;The protocol `%1' does not support creating new directories Q3UrlOperatorpIl protocollo '%1' non supporta lo scaricamento dei file0The protocol `%1' does not support getting files Q3UrlOperatorpIl protocollo '%1' non supporta l'elenco delle directory6The protocol `%1' does not support listing directories Q3UrlOperatornIl protocollo '%1' non supporta il caricamento dei file0The protocol `%1' does not support putting files Q3UrlOperatorIl protocollo '%1' non supporta la rimozione di file o directory@The protocol `%1' does not support removing files or directories Q3UrlOperatorIl protocollo '%1' non supporta la rinominazione di file o directory@The protocol `%1' does not support renaming files or directories Q3UrlOperatorFIl protocollo '%1' non supportato"The protocol `%1' is not supported Q3UrlOperator&Annulla&CancelQ3Wizard&Finisci&FinishQ3Wizard &Guida&HelpQ3Wizard&Successivo >&Next >Q3Wizard< &Indietro< &BackQ3Wizard*Connessione rifiutataConnection refusedQAbstractSocket>Connessione fuori tempo massimoConnection timed outQAbstractSocket Host non trovatoHost not foundQAbstractSocket(Rete irraggiungibileNetwork unreachableQAbstractSocketFOperazione su socket non supportata$Operation on socket is not supportedQAbstractSocket&Socket non connessoSocket is not connectedQAbstractSocketJOperazione socket fuori tempo massimoSocket operation timed outQAbstractSocket &Seleziona tutto &Select AllQAbstractSpinBox&Aumenta&Step upQAbstractSpinBox&Diminuisci Step &downQAbstractSpinBox PremiPressQAccessibleButton AttivaActivate QApplicationVAttiva la finestra principale del programma#Activates the program's main window QApplication`L'eseguibile '%1' richiede Qt %2, trovata Qt %3.,Executable '%1' requires Qt %2, found Qt %3. QApplicationJErrore di libreria Qt non compatibileIncompatible Qt Library Error QApplicationLTRQT_LAYOUT_DIRECTION QApplication&Annulla&Cancel QAxSelect&Oggetto COM: COM &Object: QAxSelectOKOK QAxSelect<Seleziona il controllo ActiveXSelect ActiveX Control QAxSelectSelezionaCheck QCheckBoxInvertiToggle QCheckBoxDeselezionaUncheck QCheckBoxD&Aggiungi ai colori personalizzati&Add to Custom Colors QColorDialogColori di &base &Basic colors QColorDialog,Colori &personalizzati&Custom colors QColorDialog&Verde:&Green: QColorDialog&Rosso:&Red: QColorDialog&Saturazione:&Sat: QColorDialog&Luminosit:&Val: QColorDialogCana&le Alfa:A&lpha channel: QColorDialog Bl&u:Bl&ue: QColorDialog&Tonalit:Hu&e: QColorDialog Seleziona colore Select Color QColorDialog ChiudiClose QComboBox FalsoFalse QComboBoxApriOpen QComboBoxVeroTrue QComboBox%1: esiste gi%1: already existsQCoreApplication%1: non esiste%1: does not existQCoreApplication %1: ftok fallito%1: ftok failedQCoreApplication %1: chiave vuota%1: key is emptyQCoreApplication2%1: risorse insufficienti%1: out of resourcesQCoreApplication@%1: impossibile creare la chiave%1: unable to make keyQCoreApplication2%1: errore sconosciuto %2%1: unknown error %2QCoreApplicationLImpossibile convalidare la transazioneUnable to commit transaction QDB2Driver.Impossibile connettersiUnable to connect QDB2DriverHImpossibile annullare la transazioneUnable to rollback transaction QDB2DriverJImpossibile impostare l'autoconvalidaUnable to set autocommit QDB2DriverDImpossibile associare la variabileUnable to bind variable QDB2Result>Impossibile eseguire il comandoUnable to execute statement QDB2Result:Impossibile ottenere il primoUnable to fetch first QDB2ResultDImpossibile ottenere il successivoUnable to fetch next QDB2ResultBImpossibile ottenere il record %1Unable to fetch record %1 QDB2Result@Impossibile preparare il comandoUnable to prepare statement QDB2ResultAMAM QDateTimeEditPMPM QDateTimeEditamam QDateTimeEditpmpm QDateTimeEdit>Animation una classe astrattaAnimation is an abstract classQDeclarativeAbstractAnimationfImpossibile animare la propriet non esistente "%1")Cannot animate non-existent property "%1"QDeclarativeAbstractAnimationjImpossibile animare la propriet di sola lettura "%1"&Cannot animate read-only property "%1"QDeclarativeAbstractAnimationRImpossibile impostare una durata negativaCannot set a duration of < 0QDeclarativeAnchorAnimationbQt stato compilato senza il supporto per QMovie'Qt was built without support for QMovieQDeclarativeAnimatedImagetImpossibile cambiare l'animazione assegnata a un Behavior.3Cannot change the animation assigned to a Behavior.QDeclarativeBehaviorfRilevato collegamento ciclico per la propriet "%1"'Binding loop detected for property "%1"QDeclarativeBindingfRilevato collegamento ciclico per la propriet "%1"'Binding loop detected for property "%1"QDeclarativeCompiledBindingsnImpossibile assegnare ad una propriet inesistente "%1"+Cannot assign to non-existent property "%1"QDeclarativeCompiler(URL vuoto non validoInvalid empty URLQDeclarativeComponent %1 %2%1 %2 QDeclarativeCompositeTypeManagerVImpossibile usare il namespace %1 come tipo%Namespace %1 cannot be used as a type QDeclarativeCompositeTypeManager4Risorsa %1 non disponibileResource %1 unavailable QDeclarativeCompositeTypeManager.Tipo %1 non disponibileType %1 unavailable QDeclarativeCompositeTypeManagernImpossibile assegnare ad una propriet inesistente "%1"+Cannot assign to non-existent property "%1"QDeclarativeConnectionsXConnessioni: oggetti nidificati non permessi'Connections: nested objects not allowedQDeclarativeConnections4Connessioni: atteso scriptConnections: script expectedQDeclarativeConnections>Connessioni: errore di sintassiConnections: syntax errorQDeclarativeConnections6Transazione in sola letturaRead-only TransactionQDeclarativeEngine.Transazione SQL fallitaSQL transaction failedQDeclarativeEngine:SQL: versione database errataSQL: database version mismatchQDeclarativeEngineLVersione errata: attesa %1, trovata %2'Version mismatch: expected %1, found %2QDeclarativeEnginepexecuteSql stato chiamato al di fuori di transaction()'executeSql called outside transaction()QDeclarativeEngine<transazione: callback mancantetransaction: missing callbackQDeclarativeEngineRImpossibile impostare una durata negativaCannot set a duration of < 0QDeclarativePauseAnimationRImpossibile impostare una durata negativaCannot set a duration of < 0QDeclarativePropertyAnimationnImpossibile assegnare ad una propriet inesistente "%1"+Cannot assign to non-existent property "%1"QDeclarativePropertyChanges QDialQDialQDialManopola SliderHandleQDialTachimetro SpeedoMeterQDial FattoDoneQDialogGuida rapida What's This?QDialog&Annulla&CancelQDialogButtonBox&Chiudi&CloseQDialogButtonBox&No&NoQDialogButtonBox&OK&OKQDialogButtonBox &Salva&SaveQDialogButtonBox&S&YesQDialogButtonBoxInterrompiAbortQDialogButtonBoxApplicaApplyQDialogButtonBoxAnnullaCancelQDialogButtonBox ChiudiCloseQDialogButtonBox(Chiudi senza salvareClose without SavingQDialogButtonBox ScartaDiscardQDialogButtonBoxNon salvare Don't SaveQDialogButtonBox GuidaHelpQDialogButtonBox IgnoraIgnoreQDialogButtonBoxN&o a tutti N&o to AllQDialogButtonBoxOKOKQDialogButtonBoxApriOpenQDialogButtonBoxReimpostaResetQDialogButtonBox,Ripristina predefinitiRestore DefaultsQDialogButtonBoxRiprovaRetryQDialogButtonBox SalvaSaveQDialogButtonBoxSalva tuttoSave AllQDialogButtonBoxS a &tutti Yes to &AllQDialogButtonBox(Data ultima modifica Date Modified QDirModelTipoKind QDirModelNomeName QDirModelDimensioniSize QDirModelTipoType QDirModel ChiudiClose QDockWidgetAggangiaDock QDockWidgetSganciaFloat QDockWidgetDiminuisciLessQDoubleSpinBoxAumentaMoreQDoubleSpinBox&OK&OK QErrorMessage>&Mostra ancora questo messaggio&Show this message again QErrorMessage Debug:Debug Message: QErrorMessageErrore fatale: Fatal Error: QErrorMessageWarning:Warning: QErrorMessageLImpossibile creare %1 per la scritturaCannot create %1 for outputQFileHImpossibile aprire %1 per la letturaCannot open %1 for inputQFileFImpossibile aprire per la scritturaCannot open for outputQFileLImpossibile rimuovere il file sorgenteCannot remove source fileQFile<Il file di destinazione esisteDestination file existsQFile<Impossibile scrivere il bloccoFailure to write blockQFile%1 Impossibile trovare la directory. Controllare il nome della directory e riprovare.K%1 Directory not found. Please verify the correct directory name was given. QFileDialog%1 Impossibile trovare il file Controllare il nome del file e riprovare.A%1 File not found. Please verify the correct file name was given. QFileDialog6%1 esiste gi. Sostituirlo?-%1 already exists. Do you want to replace it? QFileDialogS&cegli&Choose QFileDialog&Elimina&Delete QFileDialog&Nuova cartella &New Folder QFileDialog &Apri&Open QFileDialog&Rinomina&Rename QFileDialog &Salva&Save QFileDialogZ'%1' in sola lettura. Eliminarlo lo stesso?9'%1' is write protected. Do you want to delete it anyway? QFileDialogTutti i file(*) All Files (*) QFileDialog"Tutti i file(*.*)All Files (*.*) QFileDialogEliminare '%1'?!Are sure you want to delete '%1'? QFileDialogIndietroBack QFileDialog8Modalit visualizza dettagliChange to detail view mode QFileDialog2Modalit visualizza listaChange to list view mode QFileDialogFImpossibile eliminare la directory.Could not delete directory. QFileDialog.Crea una nuova cartellaCreate New Folder QFileDialog.Crea una nuova cartellaCreate a New Folder QFileDialog&Visualizza dettagli Detail View QFileDialogDirectory Directories QFileDialogDirectory: Directory: QFileDialog UnitDrive QFileDialogFileFile QFileDialog&Nome file: File &name: QFileDialogFile del tipo:Files of type: QFileDialogTrova directoryFind Directory QFileDialog AvantiForward QFileDialogIndietroGo back QFileDialog Avanti Go forward QFileDialog&Directory superioreGo to the parent directory QFileDialog"Visualizza elenco List View QFileDialogCerca in:Look in: QFileDialog(Risorse del computer My Computer QFileDialogNuova cartella New Folder QFileDialogApriOpen QFileDialog&Directory superioreParent Directory QFileDialog"Posizioni recenti Recent Places QFileDialogRimuoviRemove QFileDialogSalva comeSave As QFileDialog MostraShow  QFileDialog*Mostra file &nascostiShow &hidden files QFileDialogSconosciutoUnknown QFileDialog %1 GiB%1 GBQFileSystemModel %1 KiB%1 KBQFileSystemModel %1 MiB%1 MBQFileSystemModel %1 TiB%1 TBQFileSystemModel%1 byte %1 byte(s)QFileSystemModel%1 byte%1 bytesQFileSystemModel<b>Impossibile utilizzare il nome "%1".</b><p>Selezionare un altro nome, con meno caratteri o senza segni di punteggiatura.oThe name "%1" can not be used.

Try using another name, with fewer characters or no punctuations marks.QFileSystemModelComputerComputerQFileSystemModel(Data ultima modifica Date ModifiedQFileSystemModel(Nome file non validoInvalid filenameQFileSystemModelTipoKindQFileSystemModel(Risorse del computer My ComputerQFileSystemModelNomeNameQFileSystemModelDimensioniSizeQFileSystemModelTipoTypeQFileSystemModelQualunqueAny QFontDatabase AraboArabic QFontDatabase ArmenoArmenian QFontDatabaseBengaliBengali QFontDatabaseNeroBlack QFontDatabaseGrassettoBold QFontDatabaseCirillicoCyrillic QFontDatabasePesanteDemi QFontDatabase"Grassetto pesante Demi Bold QFontDatabaseDevanagari Devanagari QFontDatabaseGeorgianoGeorgian QFontDatabase GrecoGreek QFontDatabaseGujaratiGujarati QFontDatabaseGurmukhiGurmukhi QFontDatabaseEbraicoHebrew QFontDatabaseItalicoItalic QFontDatabaseGiapponeseJapanese QFontDatabaseKannadaKannada QFontDatabase KhmerKhmer QFontDatabaseKoreanoKorean QFontDatabaseLaoLao QFontDatabase LatinoLatin QFontDatabaseLeggeroLight QFontDatabaseMalayalam Malayalam QFontDatabaseMyanmarMyanmar QFontDatabaseN'KoN'Ko QFontDatabaseNormaleNormal QFontDatabaseObliquoOblique QFontDatabase OghamOgham QFontDatabase OriyaOriya QFontDatabase RunicoRunic QFontDatabase&Cinese semplificatoSimplified Chinese QFontDatabaseSinhalaSinhala QFontDatabaseSimboliSymbol QFontDatabaseSirianoSyriac QFontDatabase TamilTamil QFontDatabase TeluguTelugu QFontDatabase ThaanaThaana QFontDatabaseTailandeseThai QFontDatabaseTibetanoTibetan QFontDatabase&Cinese tradizionaleTraditional Chinese QFontDatabaseVietnamita Vietnamese QFontDatabase&Carattere&Font QFontDialogDimen&sioni&Size QFontDialogSo&ttolineato &Underline QFontDialogEffettiEffects QFontDialog St&ile carattere Font st&yle QFontDialogEsempioSample QFontDialog&Seleziona carattere Select Font QFontDialogBa&rrato Stri&keout QFontDialog*Sist&ema di scritturaWr&iting System QFontDialog8Cambio directory fallito: %1Changing directory failed: %1QFtp(Connessione all'hostConnected to hostQFtp.Connessione all'host %1Connected to host %1QFtp@Connessione all'host fallita: %1Connecting to host failed: %1QFtp$Connessione chiusaConnection closedQFtpZConnessione rifiutata per la connessione dati&Connection refused for data connectionQFtpBConnessione all'host %1 rifiutataConnection refused to host %1QFtpVConnessione all'host %1 fuori tempo massimoConnection timed out to host %1QFtp.Connessione a %1 chiusaConnection to %1 closedQFtp>Creazione directory fallita: %1Creating directory failed: %1QFtp:Scaricamento file fallito: %1Downloading file failed: %1QFtpHost %1 trovato Host %1 foundQFtp&Host %1 non trovatoHost %1 not foundQFtpHost trovato Host foundQFtp8Elenco directory fallito: %1Listing directory failed: %1QFtp"Login fallito: %1Login failed: %1QFtpNon connesso Not connectedQFtp>Rimozione directory fallita: %1Removing directory failed: %1QFtp4Rimozione file fallita: %1Removing file failed: %1QFtp$Errore sconosciuto Unknown errorQFtp8Caricamento file fallito: %1Uploading file failed: %1QFtp8Nessun nome host specificatoNo host name given QHostInfo$Errore sconosciuto Unknown error QHostInfo Host non trovatoHost not foundQHostInfoAgent(Nome host non validoInvalid hostnameQHostInfoAgent8Nessun nome host specificatoNo host name givenQHostInfoAgent:Tipo di indirizzo sconosciutoUnknown address typeQHostInfoAgent$Errore sconosciuto Unknown errorQHostInfoAgent0Autenticazione richiestaAuthentication requiredQHttp"Connesso all'hostConnected to hostQHttp(Connesso all'host %1Connected to host %1QHttp$Connessione chiusaConnection closedQHttp*Connessione rifiutataConnection refusedQHttpZConnessione rifiutata (o fuori tempo massimo)!Connection refused (or timed out)QHttp.Connessione a %1 chiusaConnection to %1 closedQHttpDati corrottiData corruptedQHttphErrore nella scrittura della risposta al dispositivo Error writing response to deviceQHttp,Richiesta HTTP fallitaHTTP request failedQHttptRichiesta connessione HTTPS, ma supporto SSL non compilato:HTTPS connection requested but SSL support not compiled inQHttpHost %1 trovato Host %1 foundQHttp&Host %1 non trovatoHost %1 not foundQHttpHost trovato Host foundQHttp@L'host richiede l'autenticazioneHost requires authenticationQHttpHParte della risposta HTTP non validaInvalid HTTP chunked bodyQHttpDHeader di risposta HTTP non validoInvalid HTTP response headerQHttpRNessun server impostato a cui connettersiNo server set to connect toQHttp<Richiesta autenticazione proxyProxy authentication requiredQHttpDIl proxy richiede l'autenticazioneProxy requires authenticationQHttp(Richiesta interrottaRequest abortedQHttp8Inizializzazione SSL fallitaSSL handshake failedQHttpDIl server ha chiuso la connessione%Server closed connection unexpectedlyQHttpHMetodo di autenticazione sconosciutoUnknown authentication methodQHttp$Errore sconosciuto Unknown errorQHttpDProtocollo specificato sconosciutoUnknown protocol specifiedQHttp>Dimensioni del contenuto errateWrong content lengthQHttp0Autenticazione richiestaAuthentication requiredQHttpSocketEnginePNessuna risposta HTTP ricevuta dal proxy(Did not receive HTTP response from proxyQHttpSocketEngineXErrore nella comunicazione con il proxy HTTP#Error communicating with HTTP proxyQHttpSocketEngine~Errore nell'analisi della richiesta di autenticazione dal proxy/Error parsing authentication request from proxyQHttpSocketEnginedIl proxy ha chiuso la connessione inaspettatamente#Proxy connection closed prematurelyQHttpSocketEngine<Connessione al proxy rifiutataProxy connection refusedQHttpSocketEngineBIl proxy ha negato la connessioneProxy denied connectionQHttpSocketEnginePConnessione al proxy fuori tempo massimo!Proxy server connection timed outQHttpSocketEngine0Server proxy non trovatoProxy server not foundQHttpSocketEngineFImpossibile iniziare la transazioneCould not start transaction QIBaseDriverBErrore nell'apertura del databaseError opening database QIBaseDriverLImpossibile convalidare la transazioneUnable to commit transaction QIBaseDriverHImpossibile annullare la transazioneUnable to rollback transaction QIBaseDriver>Impossibile allocare il comandoCould not allocate statement QIBaseResultTImpossibile descrivere il comando di input"Could not describe input statement QIBaseResultBImpossibile descrivere il comandoCould not describe statement QIBaseResultRImpossibile ottenere il prossimo elementoCould not fetch next item QIBaseResult6Impossibile trovare l'arrayCould not find array QIBaseResultHImpossibile ottenere dati dall'arrayCould not get array data QIBaseResultZImpossibile ottenere informazioni sulla queryCould not get query info QIBaseResultZImpossibile ottenere informazioni sul comandoCould not get statement info QIBaseResult@Impossibile preparare il comandoCould not prepare statement QIBaseResultFImpossibile iniziare la transazioneCould not start transaction QIBaseResult>Impossibile chiudere il comandoUnable to close statement QIBaseResultLImpossibile convalidare la transazioneUnable to commit transaction QIBaseResult4Impossibile creare il BLOBUnable to create BLOB QIBaseResult:Impossibile eseguire la queryUnable to execute query QIBaseResult4Impossibile aprire il BLOBUnable to open BLOB QIBaseResult6Impossibile leggere il BLOBUnable to read BLOB QIBaseResult8Impossibile scrivere il BLOBUnable to write BLOB QIBaseResult:Spazio su disco insufficienteNo space left on device QIODevice8File o directory non trovatoNo such file or directory QIODeviceAccesso negatoPermission denied QIODevice$Troppi file apertiToo many open files QIODevice$Errore sconosciuto Unknown error QIODeviceFEPFEP QInputContext0Metodo di input Mac OS XMac OS X input method QInputContext.Metodo di input S60 FEPS60 FEP input method QInputContext.Metodo di input WindowsWindows input method QInputContextXIMXIM QInputContext&Metodo di input XIMXIM input method QInputContext(Inserisci un valore:Enter a value: QInputDialogNImpossibile caricare la libreria %1: %2Cannot load library %1: %2QLibrary^Impossibile risolvere il simbolo "%1" in %2: %3$Cannot resolve symbol "%1" in %2: %3QLibraryPImpossibile scaricare la libreria %1: %2Cannot unload library %1: %2QLibraryDImpossibile eseguire mmap '%1': %2Could not mmap '%1': %2QLibraryFImpossibile eseguire unmap '%1': %2Could not unmap '%1': %2QLibraryFVerifica dati plugin errata in '%1')Plugin verification data mismatch in '%1'QLibraryNIl file '%1' non un plugin Qt valido.'The file '%1' is not a valid Qt plugin.QLibraryIl plugin '%1' usa una libreria Qt non compatibile. (%2.%3.%4) [%5]=The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5]QLibraryIl plugin '%1' usa una libreria Qt non compatibile. (Impossibile mescolare librerie di rilascio e debug.)WThe plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.)QLibraryIl plugin '%1' usa una libreria Qt non compatibile. Attesa build key "%2", presente "%3"OThe plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3"QLibraryTImpossibile trovare la libreria condivisa.!The shared library was not found.QLibrary$Errore sconosciuto Unknown errorQLibrary &Copia&Copy QLineEdit&Incolla&Paste QLineEdit&Ripeti&Redo QLineEdit&Annulla&Undo QLineEdit&TagliaCu&t QLineEditEliminaDelete QLineEditSeleziona tutto Select All QLineEdit(%1: Indirizzo in uso%1: Address in use QLocalServer$%1: Errore di nome%1: Name error QLocalServer$%1: Accesso negato%1: Permission denied QLocalServer2%1: Errore sconosciuto %2%1: Unknown error %2 QLocalServer2%1: Errore di connessione%1: Connection error QLocalSocket2%1: Connessione rifiutata%1: Connection refused QLocalSocketP%1: Datagramma troppo grande per l'invio%1: Datagram too large QLocalSocket&%1: Nome non valido%1: Invalid name QLocalSocket:%1: Connessione remota chiusa%1: Remote closed QLocalSocket>%1: Errore di accesso al socket%1: Socket access error QLocalSocketR%1: Operazione socket fuori tempo massimo%1: Socket operation timed out QLocalSocket8%1: Errore di risorsa socket%1: Socket resource error QLocalSocketN%1: Operazione su socket non supportata)%1: The socket operation is not supported QLocalSocket,%1: Errore sconosciuto%1: Unknown error QLocalSocket2%1: Errore sconosciuto %2%1: Unknown error %2 QLocalSocketFImpossibile iniziare la transazioneUnable to begin transaction QMYSQLDriverLImpossibile convalidare la transazioneUnable to commit transaction QMYSQLDriver.Impossibile connettersiUnable to connect QMYSQLDriver@Impossibile aprire il database 'Unable to open database ' QMYSQLDriverHImpossibile annullare la transazioneUnable to rollback transaction QMYSQLDriverPImpossibile associare i valori in uscitaUnable to bind outvalues QMYSQLResult>Impossibile associare il valoreUnable to bind value QMYSQLResultLImpossibile eseguire la prossima queryUnable to execute next query QMYSQLResult:Impossibile eseguire la queryUnable to execute query QMYSQLResult>Impossibile eseguire il comandoUnable to execute statement QMYSQLResult6Impossibile ottenere i datiUnable to fetch data QMYSQLResult@Impossibile preparare il comandoUnable to prepare statement QMYSQLResultDImpossibile reimpostare il comandoUnable to reset statement QMYSQLResultZImpossibile memorizzare il prossimo risultatoUnable to store next result QMYSQLResultFImpossibile memorizzare i risultatiUnable to store result QMYSQLResult^Impossibile memorizzare i risultati del comando!Unable to store statement results QMYSQLResult(Senza titolo) (Untitled)QMdiArea%1 - [%2] %1 - [%2] QMdiSubWindow&Chiudi&Close QMdiSubWindow&Sposta&Move QMdiSubWindow&Ripristina&Restore QMdiSubWindowRi&dimensiona&Size QMdiSubWindow - [%1]- [%1] QMdiSubWindow ChiudiClose QMdiSubWindow GuidaHelp QMdiSubWindowIngra&ndisci Ma&ximize QMdiSubWindowIngrandisceMaximize QMdiSubWindowMenuMenu QMdiSubWindowR&iduci a icona Mi&nimize QMdiSubWindowRiduce a iconaMinimize QMdiSubWindowRipristinaRestore QMdiSubWindow&Ripristina in basso Restore Down QMdiSubWindowArrotolaShade QMdiSubWindow,Sempre in &primo piano Stay on &Top QMdiSubWindowSrotolaUnshade QMdiSubWindow ChiudiCloseQMenu EseguiExecuteQMenuApriOpenQMenu AzioniActionsQMenuBar<h3>Informazioni su Qt</h3><p>Questo programma usa Qt versione %1.</p>8

About Qt

This program uses Qt version %1.

 QMessageBox <p>Qt un toolkit C++ per lo sviluppo di applicazioni multipiattaforma.</p> <p>Qt garantisce portabilit con un unico sorgente tra MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, e tutte le maggiori varianti commerciali di Unix. Qt anche disponibile per dispositivi embedded con Qt per Embedded Linux e Qt per Windows CE.</p> <p>Qt disponibile sotto tre diverse opzioni di licenza pensate per venire incontro alle esigenze di tutti i nostri utenti.</p> <p>Il nostro accordo di licenza commerciale adatto per lo sviluppo di software proprietario/commerciale, nel caso non si voglia condividere codice sorgente con terze parti senza rispettare i termini della licenza GNU LGPL versione 2.1 o GNU GPL versione 3.0.</p> <p>La licenza GNU LGPL version 2.1 adatta per lo sviluppo di applicazioni Qt (proprietarie od open source) nel caso si possano rispettare i termini della licenza GNU LGPL versione 2.1.</p> <p>La licenza GNU General Public License versione 3.0 adatta per lo sviluppo di applicazioni nel caso sia necessario rispettare i termini della licenza GNU GPL versione 3.0. <p>Vedere <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> per una panoramica sulle opzioni di licenza Qt.</p> <p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p> <p>Qt un prodotto Nokia. Vedere <a href="http://qt.nokia.com/">qt.nokia.com</a> per maggiori informazioni.</p>

Qt is a C++ toolkit for cross-platform application development.

Qt provides single-source portability across MS Windows, Mac OS X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.

Qt is available under three different licensing options designed to accommodate the needs of our various users.

Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.

Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.

Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.

Please see qt.nokia.com/products/licensing for an overview of Qt licensing.

Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).

Qt is a Nokia product. See qt.nokia.com for more information.

 QMessageBox$Informazioni su QtAbout Qt QMessageBox GuidaHelp QMessageBox$Nascondi dettagli &Hide Details... QMessageBoxOKOK QMessageBox Mostra dettagli &Show Details... QMessageBox Selezionare l'IM Select IMQMultiInputContextPCommutatore per metodi di input multipliMultiple input method switcherQMultiInputContextPluginCommutatore per metodi di input multipli che usa il menu contestuale dei controlli di testoMMultiple input method switcher that uses the context menu of the text widgetsQMultiInputContextPluginfUn altro socket gi in ascolto sulla stessa porta4Another socket is already listening on the same portQNativeSocketEngineTentativo di utilizzare IPv6 su una piattaforma che non lo supporta=Attempt to use IPv6 socket on a platform with no IPv6 supportQNativeSocketEngine*Connessione rifiutataConnection refusedQNativeSocketEngine>Connessione fuori tempo massimoConnection timed outQNativeSocketEngineHDatagramma troppo grande per l'invioDatagram was too large to sendQNativeSocketEngine(Host irraggiungibileHost unreachableQNativeSocketEngine:Descrittore socket non validoInvalid socket descriptorQNativeSocketEngineErrore di rete Network errorQNativeSocketEngineLOperazione di rete fuori tempo massimoNetwork operation timed outQNativeSocketEngine(Rete irraggiungibileNetwork unreachableQNativeSocketEngine6Operazione su un non socketOperation on non-socketQNativeSocketEngine*Risorse insufficientiOut of resourcesQNativeSocketEngineAccesso negatoPermission deniedQNativeSocketEngineBTipo di protocollo non supportatoProtocol type not supportedQNativeSocketEngine:L'indirizzo non disponibileThe address is not availableQNativeSocketEngine,L'indirizzo protettoThe address is protectedQNativeSocketEngineFL'indirizzo scelto gi utilizzato#The bound address is already in useQNativeSocketEngineZTipo di proxy non valido per quest'operazione,The proxy type is invalid for this operationQNativeSocketEngineLL'host remoto ha chiuso la connessione%The remote host closed the connectionQNativeSocketEngineZImpossibile inizializzare un socket broadcast%Unable to initialize broadcast socketQNativeSocketEnginebImpossibile inizializzare un socket non bloccante(Unable to initialize non-blocking socketQNativeSocketEngineBImpossibile ricevere un messaggioUnable to receive a messageQNativeSocketEngine@Impossibile inviare un messaggioUnable to send a messageQNativeSocketEngine(Impossibile scrivereUnable to writeQNativeSocketEngine$Errore sconosciuto Unknown errorQNativeSocketEngine@Operazione socket non supportataUnsupported socket operationQNativeSocketEngine4Errore nell'apertura di %1Error opening %1QNetworkAccessCacheBackend$URI non valido: %1Invalid URI: %1QNetworkAccessDataBackend>Operazione non supportata su %1Operation not supported on %1QNetworkAccessDataBackendzL'host remoto ha chiuso inaspettatamente la connessione su %13Remote host closed the connection prematurely on %1QNetworkAccessDebugPipeBackend.Errore socket su %1: %2Socket error on %1: %2QNetworkAccessDebugPipeBackendZErrore di scrittura nella scrittura di %1: %2Write error writing to %1: %2QNetworkAccessDebugPipeBackenddImpossibile aprire %1: Il percorso una directory#Cannot open %1: Path is a directoryQNetworkAccessFileBackend<Errore nell'apertura di %1: %2Error opening %1: %2QNetworkAccessFileBackendRErrore di lettura nella lettura di %1: %2Read error reading from %1: %2QNetworkAccessFileBackendXRichiesta di apertura del file non locale %1%Request for opening non-local file %1QNetworkAccessFileBackendZErrore di scrittura nella scrittura di %1: %2Write error writing to %1: %2QNetworkAccessFileBackendLImpossibile aprire %1: una directoryCannot open %1: is a directoryQNetworkAccessFtpBackendFErrore nello scaricamento di %1: %2Error while downloading %1: %2QNetworkAccessFtpBackend@Errore nel caricamento di %1: %2Error while uploading %1: %2QNetworkAccessFtpBackend\Accesso a %1 fallito: autenticazione richiesta0Logging in to %1 failed: authentication requiredQNetworkAccessFtpBackendFNon sono stati trovati proxy adattiNo suitable proxy foundQNetworkAccessFtpBackendFNon sono stati trovati proxy adattiNo suitable proxy foundQNetworkAccessHttpBackend>Accesso alla rete disabilitato.Network access is disabled.QNetworkAccessManagervErrore nello scaricamento di %1 - il server ha risposto: %2)Error downloading %1 - server replied: %2 QNetworkReply0Errore sessione di rete.Network session error. QNetworkReply6Protocollo "%1" sconosciutoProtocol "%1" is unknown QNetworkReply4Errore temporaneo di rete.Temporary network failure. QNetworkReply(Operazione annullataOperation canceledQNetworkReplyImpl4Configurazione non valida.Invalid configuration.QNetworkSessionErrore roaming Roaming errorQNetworkSessionPrivateImpl\Il roaming stato abortito o non possibile.'Roaming was aborted or is not possible.QNetworkSessionPrivateImplZSessione interrotta dall'utente o dal sistema!Session aborted by user or systemQNetworkSessionPrivateImplhL'operazione richiesta non supportata dal sistema.7The requested operation is not supported by the system.QNetworkSessionPrivateImplrLa sessione stata interrotta dall'utente o dal sistema..The session was aborted by the user or system.QNetworkSessionPrivateImpl`Impossibile usare la configurazione specificata.+The specified configuration cannot be used.QNetworkSessionPrivateImpl.Errore non identificatoUnidentified ErrorQNetworkSessionPrivateImpl>Errore di sessione sconosciuto.Unknown session error.QNetworkSessionPrivateImplFImpossibile iniziare la transazioneUnable to begin transaction QOCIDriverLImpossibile convalidare la transazioneUnable to commit transaction QOCIDriver2Impossibile inizializzareUnable to initialize QOCIDriver>Impossibile effettuare il logonUnable to logon QOCIDriverHImpossibile annullare la transazioneUnable to rollback transaction QOCIDriver>Impossibile allocare il comandoUnable to alloc statement QOCIResultnImpossibile associare la colonna per l'esecuzione batch'Unable to bind column for batch execute QOCIResult>Impossibile associare il valoreUnable to bind value QOCIResultJImpossibile eseguire il comando batch!Unable to execute batch statement QOCIResult>Impossibile eseguire il comandoUnable to execute statement QOCIResultNImpossibile ottenere il tipo di comandoUnable to get statement type QOCIResult<Impossibile andare al prossimoUnable to goto next QOCIResult@Impossibile preparare il comandoUnable to prepare statement QOCIResultLImpossibile convalidare la transazioneUnable to commit transaction QODBCDriver.Impossibile connettersiUnable to connect QODBCDriverImpossibile connettersi - Il driver non supporta tutte le caratteristiche necessarieEUnable to connect - Driver doesn't support all functionality required QODBCDriverPImpossibile disabilitare l'autoconvalidaUnable to disable autocommit QODBCDriverJImpossibile abilitare l'autoconvalidaUnable to enable autocommit QODBCDriverHImpossibile annullare la transazioneUnable to rollback transaction QODBCDriverQODBCResult::reset: Impossibile impostare 'SQL_CURSOR_STATIC' come attributo del comando. Controllare la configurazione del driver ODBCyQODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration QODBCResultDImpossibile associare la variabileUnable to bind variable QODBCResult>Impossibile eseguire il comandoUnable to execute statement QODBCResult(Impossibile ottenereUnable to fetch QODBCResult:Impossibile ottenere il primoUnable to fetch first QODBCResult:Impossibile ottenere l'ultimoUnable to fetch last QODBCResultDImpossibile ottenere il successivoUnable to fetch next QODBCResultDImpossibile ottenere il precedenteUnable to fetch previous QODBCResult@Impossibile preparare il comandoUnable to prepare statement QODBCResultz"%1" duplica un nome di ruolo precedente e sar disabilitato.:"%1" duplicates a previous role name and will be disabled.QObject0Server sonoro PulseAudioPulseAudio Sound ServerQObject,query non valida: "%1"invalid query: "%1"QObjectNomeNameQPPDOptionsModel ValoreValueQPPDOptionsModelFImpossibile iniziare la transazioneCould not begin transaction QPSQLDriverLImpossibile convalidare la transazioneCould not commit transaction QPSQLDriverHImpossibile annullare la transazioneCould not rollback transaction QPSQLDriver.Impossibile connettersiUnable to connect QPSQLDriverPImpossibile effettuare la sottoscrizioneUnable to subscribe QPSQLDriverPImpossibile cancellare la sottoscrizioneUnable to unsubscribe QPSQLDriver6Impossibile creare la queryUnable to create query QPSQLResult@Impossibile preparare il comandoUnable to prepare statement QPSQLResultCentimetri (cm)Centimeters (cm)QPageSetupWidgetFormFormQPageSetupWidgetAltezza:Height:QPageSetupWidgetPollici (in) Inches (in)QPageSetupWidgetPaesaggio LandscapeQPageSetupWidgetMarginiMarginsQPageSetupWidgetMillimetri (mm)Millimeters (mm)QPageSetupWidgetOrientamento OrientationQPageSetupWidget$Dimensioni pagina: Page size:QPageSetupWidget CartaPaperQPageSetupWidgetSorgente carta: Paper source:QPageSetupWidgetPunti (pt) Points (pt)QPageSetupWidgetRitrattoPortraitQPageSetupWidget&Paesaggio speculareReverse landscapeQPageSetupWidget$Ritratto speculareReverse portraitQPageSetupWidgetLarghezza:Width:QPageSetupWidgetmargine basso bottom marginQPageSetupWidget margine sinistro left marginQPageSetupWidgetmargine destro right marginQPageSetupWidgetmargine alto top marginQPageSetupWidget>Il plugin non stato caricato.The plugin was not loaded. QPluginLoader$Errore sconosciuto Unknown error QPluginLoader6%1 esiste gi. Sostituirlo?/%1 already exists. Do you want to overwrite it? QPrintDialoglIl file %1 una directory. Selezionare un altro file.7%1 is a directory. Please choose a different file name. QPrintDialog&Opzioni << &Options << QPrintDialog&Opzioni >> &Options >> QPrintDialog&Stampa&Print QPrintDialog0<qt>Sovrascriverlo?</qt>%Do you want to overwrite it? QPrintDialogA0A0 QPrintDialog$A0 (841 x 1189 mm)A0 (841 x 1189 mm) QPrintDialogA1A1 QPrintDialog"A1 (594 x 841 mm)A1 (594 x 841 mm) QPrintDialogA2A2 QPrintDialog"A2 (420 x 594 mm)A2 (420 x 594 mm) QPrintDialogA3A3 QPrintDialog"A3 (297 x 420 mm)A3 (297 x 420 mm) QPrintDialogA4A4 QPrintDialogLA4 (210 x 297 mm, 8.26 x 11.7 pollici)%A4 (210 x 297 mm, 8.26 x 11.7 inches) QPrintDialogA5A5 QPrintDialog"A5 (148 x 210 mm)A5 (148 x 210 mm) QPrintDialogA6A6 QPrintDialog"A6 (105 x 148 mm)A6 (105 x 148 mm) QPrintDialogA7A7 QPrintDialog A7 (74 x 105 mm)A7 (74 x 105 mm) QPrintDialogA8A8 QPrintDialogA8 (52 x 74 mm)A8 (52 x 74 mm) QPrintDialogA9A9 QPrintDialogA9 (37 x 52 mm)A9 (37 x 52 mm) QPrintDialogAlias: %1 Aliases: %1 QPrintDialogB0B0 QPrintDialog&B0 (1000 x 1414 mm)B0 (1000 x 1414 mm) QPrintDialogB1B1 QPrintDialog$B1 (707 x 1000 mm)B1 (707 x 1000 mm) QPrintDialogB10B10 QPrintDialog B10 (31 x 44 mm)B10 (31 x 44 mm) QPrintDialogB2B2 QPrintDialog"B2 (500 x 707 mm)B2 (500 x 707 mm) QPrintDialogB3B3 QPrintDialog"B3 (353 x 500 mm)B3 (353 x 500 mm) QPrintDialogB4B4 QPrintDialog"B4 (250 x 353 mm)B4 (250 x 353 mm) QPrintDialogB5B5 QPrintDialogLB5 (176 x 250 mm, 6.93 x 9.84 pollici)%B5 (176 x 250 mm, 6.93 x 9.84 inches) QPrintDialogB6B6 QPrintDialog"B6 (125 x 176 mm)B6 (125 x 176 mm) QPrintDialogB7B7 QPrintDialog B7 (88 x 125 mm)B7 (88 x 125 mm) QPrintDialogB8B8 QPrintDialogB8 (62 x 88 mm)B8 (62 x 88 mm) QPrintDialogB9B9 QPrintDialogB9 (44 x 62 mm)B9 (44 x 62 mm) QPrintDialogC5EC5E QPrintDialog$C5E (163 x 229 mm)C5E (163 x 229 mm) QPrintDialogPersonalizzatoCustom QPrintDialogDLEDLE QPrintDialog$DLE (110 x 220 mm)DLE (110 x 220 mm) QPrintDialogExecutive Executive QPrintDialogTExecutive (7.5 x 10 pollici, 191 x 254 mm))Executive (7.5 x 10 inches, 191 x 254 mm) QPrintDialogIl file %1 non accessibile in scrittura. Selezionare un altro file.=File %1 is not writable. Please choose a different file name. QPrintDialogIl file esiste File exists QPrintDialog FolioFolio QPrintDialog(Folio (210 x 330 mm)Folio (210 x 330 mm) QPrintDialog LedgerLedger QPrintDialog*Ledger (432 x 279 mm)Ledger (432 x 279 mm) QPrintDialog LegalLegal QPrintDialogLLegal (8.5 x 14 pollici, 216 x 356 mm)%Legal (8.5 x 14 inches, 216 x 356 mm) QPrintDialog LetterLetter QPrintDialogNLetter (8.5 x 11 pollici, 216 x 279 mm)&Letter (8.5 x 11 inches, 216 x 279 mm) QPrintDialogFile locale Local file QPrintDialogOKOK QPrintDialog StampaPrint QPrintDialogStampa su file &Print To File ... QPrintDialogStampa tutto Print all QPrintDialog,Stampa pagina correntePrint current page QPrintDialog(Intervallo di stampa Print range QPrintDialog Stampa selezionePrint selection QPrintDialog(Stampa su file (PDF)Print to File (PDF) QPrintDialog6Stampa su file (Postscript)Print to File (Postscript) QPrintDialogTabloidTabloid QPrintDialog,Tabloid (279 x 432 mm)Tabloid (279 x 432 mm) QPrintDialogtIl valore 'From' non pu essere pi grande di quello 'To'.7The 'From' value cannot be greater than the 'To' value. QPrintDialog,US Common #10 EnvelopeUS Common #10 Envelope QPrintDialogJUS Common #10 Envelope (105 x 241 mm)%US Common #10 Envelope (105 x 241 mm) QPrintDialogScrivi %1 file Write %1 file QPrintDialog&connesse localmentelocally connected QPrintDialogsconosciutounknown QPrintDialog%1%%1%QPrintPreviewDialog ChiudiCloseQPrintPreviewDialogEsporta PDF Export to PDFQPrintPreviewDialog$Esporta PostscriptExport to PostScriptQPrintPreviewDialogPrima pagina First pageQPrintPreviewDialogAdatta altezzaFit pageQPrintPreviewDialog Adatta larghezza Fit widthQPrintPreviewDialogPaesaggio LandscapeQPrintPreviewDialogUltima pagina Last pageQPrintPreviewDialog"Pagina successiva Next pageQPrintPreviewDialogImposta pagina Page SetupQPrintPreviewDialogImposta pagina Page setupQPrintPreviewDialogRitrattoPortraitQPrintPreviewDialog"Pagina precedente Previous pageQPrintPreviewDialog StampaPrintQPrintPreviewDialog&Anteprima di stampa Print PreviewQPrintPreviewDialog,Mostra pagine frontaliShow facing pagesQPrintPreviewDialogHMostra panoramica di tutte le pagineShow overview of all pagesQPrintPreviewDialog*Mostra pagina singolaShow single pageQPrintPreviewDialogZoom inZoom inQPrintPreviewDialogZoom outZoom outQPrintPreviewDialogAvanzateAdvancedQPrintPropertiesWidgetFormFormQPrintPropertiesWidget PaginaPageQPrintPropertiesWidgetFascicolaCollateQPrintSettingsOutput ColoriColorQPrintSettingsOutput Colore Color ModeQPrintSettingsOutput CopieCopiesQPrintSettingsOutput Copie:Copies:QPrintSettingsOutputPagina corrente Current PageQPrintSettingsOutput&Stampa fronte retroDuplex PrintingQPrintSettingsOutputFormFormQPrintSettingsOutputScala di grigio GrayscaleQPrintSettingsOutputLato lungo Long sideQPrintSettingsOutputNessunoNoneQPrintSettingsOutputOpzioniOptionsQPrintSettingsOutput,Impostazioni di uscitaOutput SettingsQPrintSettingsOutputPagine da Pages fromQPrintSettingsOutputStampa tutto Print allQPrintSettingsOutput(Intervallo di stampa Print rangeQPrintSettingsOutputInverti pagineReverseQPrintSettingsOutputSeleziona SelectionQPrintSettingsOutputLato corto Short sideQPrintSettingsOutputatoQPrintSettingsOutput &Nome:&Name: QPrintWidget &... QPrintWidgetFormForm QPrintWidgetPosizione: Location: QPrintWidget &File di uscita: Output &file: QPrintWidgetP&ropriet P&roperties QPrintWidgetAnteprimaPreview QPrintWidgetStampantePrinter QPrintWidget Tipo:Type: QPrintWidgetjImpossible aprire la redirezione input per la lettura,Could not open input redirection for readingQProcesspImpossible aprire la redirezione output per la scrittura-Could not open output redirection for writingQProcessBErrore nella lettura dal processoError reading from processQProcessFErrore nella scrittura sul processoError writing to processQProcess2Nessun programma definitoNo program definedQProcess@Processo chiuso inaspettatamenteProcess crashedQProcessFImpossibile avviare il processo: %1Process failed to start: %1QProcessNOperazione processo fuori tempo massimoProcess operation timed outQProcessHErrore di risorse (fork fallito): %1!Resource error (fork failure): %1QProcessAnnullaCancelQProgressDialogApriOpen QPushButtonSelezionaCheck QRadioButtonBErrore nell'apertura del databaseError opening databaseQSQLite2DriverFImpossibile iniziare la transazioneUnable to begin transactionQSQLite2DriverLImpossibile convalidare la transazioneUnable to commit transactionQSQLite2DriverHImpossibile annullare la transazioneUnable to rollback transactionQSQLite2Driver>Impossibile eseguire il comandoUnable to execute statementQSQLite2Result@Impossibile ottenere i risultatiUnable to fetch resultsQSQLite2ResultDErrore nella chiusura del databaseError closing database QSQLiteDriverBErrore nell'apertura del databaseError opening database QSQLiteDriverFImpossibile iniziare la transazioneUnable to begin transaction QSQLiteDriverLImpossibile convalidare la transazioneUnable to commit transaction QSQLiteDriverHImpossibile annullare la transazioneUnable to rollback transaction QSQLiteDriverNessuna queryNo query QSQLiteResult4Numero di parametri erratoParameter count mismatch QSQLiteResultBImpossibile associare i parametriUnable to bind parameters QSQLiteResult>Impossibile eseguire il comandoUnable to execute statement QSQLiteResult8Impossibile ottenere la rigaUnable to fetch row QSQLiteResultDImpossibile reimpostare il comandoUnable to reset statement QSQLiteResultCondizione ConditionQScriptBreakpointsModelIDIDQScriptBreakpointsModelPosizioneLocationQScriptBreakpointsModelEliminaDeleteQScriptBreakpointsWidgetContinuaContinueQScriptDebugger$Imposta breakpointToggle BreakpointQScriptDebugger ChiudiCloseQScriptDebuggerCodeFinderWidgetNomeNameQScriptDebuggerLocalsModel ValoreValueQScriptDebuggerLocalsModelPosizioneLocationQScriptDebuggerStackModelNomeNameQScriptDebuggerStackModel,Condizione breakpoint:Breakpoint Condition: QScriptEdit*Disabilita breakpointDisable Breakpoint QScriptEdit$Abilita breakpointEnable Breakpoint QScriptEdit$Imposta breakpointToggle Breakpoint QScriptEditBreakpoint BreakpointsQScriptEngineDebuggerConsoleConsoleQScriptEngineDebuggerOutput debug Debug OutputQScriptEngineDebuggerLog errori Error LogQScriptEngineDebuggerScript caricatiLoaded ScriptsQScriptEngineDebugger$Qt Script DebuggerQt Script DebuggerQScriptEngineDebugger CercaSearchQScriptEngineDebugger StackStackQScriptEngineDebuggerVisualizzaViewQScriptEngineDebugger ChiudiCloseQScriptNewBreakpointWidget FondoBottom QScrollBarBordo sinistro Left edge QScrollBar Linea successiva Line down QScrollBar Linea precedenteLine up QScrollBar&Una pagina in basso Page down QScrollBar*Una pagina a sinistra Page left QScrollBar&Una pagina a destra Page right QScrollBar$Una pagina in altoPage up QScrollBarPosizionePosition QScrollBarBordo destro Right edge QScrollBarScorri in basso Scroll down QScrollBarScorri qui Scroll here QScrollBar"Scorri a sinistra Scroll left QScrollBarScorri a destra Scroll right QScrollBarScorri in alto Scroll up QScrollBarCimaTop QScrollBarD%1: il file chiave UNIX non esiste%1: UNIX key file doesn't exist QSharedMemory%1: esiste gi%1: already exists QSharedMemory8%1: dimensioni inferiori a 0%1: create size is less then 0 QSharedMemory%1: non esiste%1: doesn't exist QSharedMemory%1: non esiste%1: doesn't exists QSharedMemory %1: ftok fallito%1: ftok failed QSharedMemory2%1: dimensioni non valide%1: invalid size QSharedMemory.%1: errore della chiave %1: key error QSharedMemory*%1: la chiave vuota%1: key is empty QSharedMemory"%1: non assegnato%1: not attached QSharedMemory2%1: risorse insufficienti%1: out of resources QSharedMemory$%1: accesso negato%1: permission denied QSharedMemoryD%1: query sulle dimensioni fallita%1: size query failed QSharedMemoryh%1: restrizioni sulle dimensioni imposte dal sistema$%1: system-imposed size restrictions QSharedMemory0%1: impossibile bloccare%1: unable to lock QSharedMemory@%1: impossibile creare la chiave%1: unable to make key QSharedMemoryD%1: impossibile bloccare la chiave%1: unable to set key on lock QSharedMemory2%1: impossibile sbloccare%1: unable to unlock QSharedMemory2%1: errore sconosciuto %2%1: unknown error %2 QSharedMemory++ QShortcutAltAlt QShortcutIndietroBack QShortcutBackspace Backspace QShortcutBacktabBacktab QShortcutAumente i bassi Bass Boost QShortcut Diminuisci bassi Bass Down QShortcutAumenta bassiBass Up QShortcutBatteriaBattery QShortcutBluetooth Bluetooth QShortcutBrowserBrowser QShortcut ChiamaCall QShortcut Blocco Maiuscole Caps Lock QShortcutBlocMaiuscCapsLock QShortcutPulisciClear QShortcut ChiudiClose QShortcutContesto1Context1 QShortcutContesto2Context2 QShortcutContesto3Context3 QShortcutContesto4Context4 QShortcut CopiaCopy QShortcutCtrlCtrl QShortcut TagliaCut QShortcutCancDel QShortcutEliminaDelete QShortcutDocumenti Documents QShortcutGiDown QShortcutFineEnd QShortcut InvioEnter QShortcutEscEsc QShortcut EscapeEscape QShortcutF%1F%1 QShortcutPreferiti Favorites QShortcutRibaltaFlip QShortcut AvantiForward QShortcut GiocoGame QShortcutVaiGo QShortcutRIagganciaHangup QShortcut GuidaHelp QShortcut InizioHome QShortcutPagina iniziale Home Page QShortcutInsIns QShortcutInserisciInsert QShortcutEsegui (0) Launch (0) QShortcutEsegui (1) Launch (1) QShortcutEsegui (2) Launch (2) QShortcutEsegui (3) Launch (3) QShortcutEsegui (4) Launch (4) QShortcutEsegui (5) Launch (5) QShortcutEsegui (6) Launch (6) QShortcutEsegui (7) Launch (7) QShortcutEsegui (8) Launch (8) QShortcutEsegui (9) Launch (9) QShortcutEsegui (A) Launch (A) QShortcutEsegui (B) Launch (B) QShortcutEsegui (C) Launch (C) QShortcutEsegui (D) Launch (D) QShortcutEsegui (E) Launch (E) QShortcutEsegui (F) Launch (F) QShortcut Posta Launch Mail QShortcut Media Launch Media QShortcutSinistraLeft QShortcutChiudi sessioneLogoff QShortcut Media Successivo Media Next QShortcutMedia Play Media Play QShortcut Media PrecedenteMedia Previous QShortcutMedia Registra Media Record QShortcutMedia Stop Media Stop QShortcutMenuMenu QShortcutMetaMeta QShortcut:Diminuisci luminosit monitorMonitor Brightness Down QShortcut4Aumenta luminosit monitorMonitor Brightness Up QShortcut MusicaMusic QShortcutMiei sitiMy Sites QShortcutNotizieNews QShortcutNoNo QShortcutBlocco NumNum Lock QShortcutBlocNumNumLock QShortcut4Blocco Tastierino Numerico Number Lock QShortcutApri URLOpen URL QShortcutOpzioneOption QShortcutPagina Gi Page Down QShortcutPagina SuPage Up QShortcutIncollaPaste QShortcut PausaPause QShortcut PgGiPgDown QShortcutPgSuPgUp QShortcutTelefonoPhone QShortcut StampPrint QShortcutStampa Schermo Print Screen QShortcutAggiornaRefresh QShortcutAggiornaReload QShortcutRispondiReply QShortcut InvioReturn QShortcutDestra Right QShortcut SalvaSave QShortcut$Blocco Scorrimento Scroll Lock QShortcutBlocScorr ScrollLock QShortcut CercaSearch QShortcutSelezionaSelect QShortcut InviaSend QShortcut ShiftShift QShortcut SpazioSpace QShortcut(Controllo ortografia Spellchecker QShortcutDividi schermo Split Screen QShortcutStandbyStandby QShortcutStopStop QShortcut SysReqSysReq QShortcutSystem RequestSystem Request QShortcutTabTab QShortcutTerminaleTerminal QShortcutDiminuisci alti Treble Down QShortcutAumenta alti Treble Up QShortcutSuUp QShortcut VideoVideo QShortcutVisualizzaView QShortcutAumenta volume Volume Down QShortcutMuto Volume Mute QShortcut Diminusci volume Volume Up QShortcutWirelessWireless QShortcutSYes QShortcutZoom InZoom In QShortcutZoom OutZoom Out QShortcut&Una pagina in basso Page downQSlider*Una pagina a sinistra Page leftQSlider&Una pagina a destra Page rightQSlider$Una pagina in altoPage upQSliderPosizionePositionQSlider@Tipo di indirizzo non supportatoAddress type not supportedQSocks5SocketEngineVConnessione non permessa dal server SOCKSv5(Connection not allowed by SOCKSv5 serverQSocks5SocketEnginedIl proxy ha chiuso la connessione inaspettatamente&Connection to proxy closed prematurelyQSocks5SocketEngine<Connessione al proxy rifiutataConnection to proxy refusedQSocks5SocketEnginePConnessione al proxy fuori tempo massimoConnection to proxy timed outQSocks5SocketEngineDErrore generale del server SOCKSv5General SOCKSv5 server failureQSocks5SocketEngineLOperazione di rete fuori tempo massimoNetwork operation timed outQSocks5SocketEngine8Autenticazione proxy fallitaProxy authentication failedQSocks5SocketEngine@Autenticazione proxy fallita: %1Proxy authentication failed: %1QSocks5SocketEngine0Server proxy non trovatoProxy host not foundQSocks5SocketEngineLErrore del protocollo SOCKS versione 5SOCKS version 5 protocol errorQSocks5SocketEngine<Comando SOCKSv5 non supportatoSOCKSv5 command not supportedQSocks5SocketEngineTTL esaurito TTL expiredQSocks5SocketEngineRCodice di errore SOCKSv5 sconosciuto 0x%1%Unknown SOCKSv5 proxy error code 0x%1QSocks5SocketEngineAnnullaCancelQSoftKeyManager FattoDoneQSoftKeyManagerEsciExitQSoftKeyManagerOkOkQSoftKeyManagerOpzioniOptionsQSoftKeyManagerSelezionaSelectQSoftKeyManagerDiminuisciLessQSpinBoxAumentaMoreQSpinBoxAnnullaCancelQSql.Annullare le modifiche?Cancel your edits?QSqlConfermaConfirmQSqlEliminaDeleteQSql0Eliminare questo record?Delete this record?QSqlInserisciInsertQSqlNoNoQSql*Salvare le modifiche? Save edits?QSqlAggiornaUpdateQSqlSYesQSqlnImpossibile fornire un certificato senza una chiave, %1,Cannot provide a certificate with no key, %1 QSslSocketXErrore nella creazione del contesto SSL (%1)Error creating SSL context (%1) QSslSocketZErrore nella creazione della sessione SSL, %1Error creating SSL session, %1 QSslSocketZErrore nella creazione della sessione SSL: %1Error creating SSL session: %1 QSslSocketHErrore nell'inizializzazione SSL: %1Error during SSL handshake: %1 QSslSocketbErrore nel caricamento del certificato locale, %1#Error loading local certificate, %1 QSslSocket^Errore nel caricamento della chiave privata, %1Error loading private key, %1 QSslSocket0Errore nella lettura: %1Error while reading: %1 QSslSocketPLista di cifrari vuota o non valida (%1)!Invalid or empty cipher list (%1) QSslSocketHImpossibile verificare i certificati!No certificates could be verified QSslSocketNessun erroreNo error QSslSocketNUno dei certificati della CA invalido%One of the CA certificates is invalid QSslSocketlLa chiave privata non certifica la chiave pubblica, %1+Private key does not certify public key, %1 QSslSocketIl parametro di lunghezza percorso basicConstraints stato superatoImpossibile scrivere i dati: %1Unable to write data: %1 QSslSocket$Errore sconosciuto Unknown error QSslSocket`Stato iniziale mancante nello stato history '%1'+Missing default state in history state '%1' QStateMachinebStato iniziale mancante nello stato composto '%1',Missing initial state in compound state '%1' QStateMachineNessun antenato comune per sorgente e obbiettivo della transizione dallo stato '%1'GNo common ancestor for targets and source of transition from state '%1' QStateMachine$Errore sconosciuto Unknown error QStateMachine%1: esiste gi%1: already existsQSystemSemaphore%1: non esiste%1: does not existQSystemSemaphore2%1: risorse insufficienti%1: out of resourcesQSystemSemaphore$%1: accesso negato%1: permission deniedQSystemSemaphore2%1: errore sconosciuto %2%1: unknown error %2QSystemSemaphoreBImpossibile aprire la connessioneUnable to open connection QTDSDriverDImpossibile utilizzare il databaseUnable to use database QTDSDriver"Scorri a sinistra Scroll LeftQTabBarScorri a destra Scroll RightQTabBarFOperazione su socket non supportata$Operation on socket is not supported QTcpServer &Copia&Copy QTextControl&Incolla&Paste QTextControl&Ripeti&Redo QTextControl&Annulla&Undo QTextControl&Copia Co&llegamentoCopy &Link Location QTextControl&TagliaCu&t QTextControlEliminaDelete QTextControlSeleziona tutto Select All QTextControlApriOpen QToolButton PremiPress QToolButton@La piattaforma non supporta IPv6#This platform does not support IPv6 QUdpSocket RipetiRedo QUndoGroupAnnullaUndo QUndoGroup<vuoto> QUndoModel RipetiRedo QUndoStackAnnullaUndo QUndoStackPInserisci carattere di controllo Unicode Insert Unicode control characterQUnicodeControlCharacterMenuHLRE Start of left-to-right embedding$LRE Start of left-to-right embeddingQUnicodeControlCharacterMenu,LRM Left-to-right markLRM Left-to-right markQUnicodeControlCharacterMenuFLRO Start of left-to-right override#LRO Start of left-to-right overrideQUnicodeControlCharacterMenu<PDF Pop directional formattingPDF Pop directional formattingQUnicodeControlCharacterMenuHRLE Start of right-to-left embedding$RLE Start of right-to-left embeddingQUnicodeControlCharacterMenu,RLM Right-to-left markRLM Right-to-left markQUnicodeControlCharacterMenuFRLO Start of right-to-left override#RLO Start of right-to-left overrideQUnicodeControlCharacterMenu*ZWJ Zero width joinerZWJ Zero width joinerQUnicodeControlCharacterMenu4ZWNJ Zero width non-joinerZWNJ Zero width non-joinerQUnicodeControlCharacterMenu*ZWSP Zero width spaceZWSP Zero width spaceQUnicodeControlCharacterMenu4Impossibile mostrare l'URLCannot show URL QWebFrame@Impossibile mostrare il mimetypeCannot show mimetype QWebFrame$Il file non esisteFile does not exist QWebFrame`Caricamento frame interrotto da cambio di policy'Frame load interrupted by policy change QWebFrame$Richiesta bloccataRequest blocked QWebFrame&Richiesta annullataRequest cancelled QWebFrame %1 (%2x%3 pixel)%1 (%2x%3 pixels)QWebPage%n file%n file %n file(s)QWebPage,Aggiungi al dizionarioAdd To DictionaryQWebPage2Richiesta HTTP non validaBad HTTP requestQWebPageGrassettoBoldQWebPage FondoBottomQWebPagePControlla la grammatica con l'ortografiaCheck Grammar With SpellingQWebPage*Controllo ortograficoCheck SpellingQWebPageXControllo ortografico durante la digitazioneCheck Spelling While TypingQWebPageSfoglia Choose FileQWebPage0Elimina ricerche recentiClear recent searchesQWebPage CopiaCopyQWebPage Copia l'immagine Copy ImageQWebPageDCopia l'indirizzo del collegamento Copy LinkQWebPage TagliaCutQWebPagePredefinitoDefaultQWebPageFElimina fino alla fine della parolaDelete to the end of the wordQWebPageHElimina fino all'inizio della parolaDelete to the start of the wordQWebPageDirezione DirectionQWebPageCaratteriFontsQWebPageIndietroGo BackQWebPage Avanti Go ForwardQWebPage@Nascondi ortografia e grammaticaHide Spelling and GrammarQWebPage IgnoraIgnoreQWebPage Ignora Ignore Grammar context menu itemIgnoreQWebPage2Inserisce una nuova lineaInsert a new lineQWebPage8Inserisce un nuovo paragrafoInsert a new paragraphQWebPageIspezionaInspectQWebPageItalicoItalicQWebPage,Avviso JavaScript - %1JavaScript Alert - %1QWebPage0Conferma JavaScript - %1JavaScript Confirm - %1QWebPage0Problema JavaScript - %1JavaScript Problem - %1QWebPage2Richiesta JavaScript - %1JavaScript Prompt - %1QWebPageBordo sinistro Left edgeQWebPage(Cerca nel dizionarioLook Up In DictionaryQWebPageLSposta il cursore alla fine del blocco'Move the cursor to the end of the blockQWebPageRSposta il cursore alla fine del documento*Move the cursor to the end of the documentQWebPageNSposta il cursore alla fine della linea&Move the cursor to the end of the lineQWebPageRSposta il cursore al carattere successivo%Move the cursor to the next characterQWebPageNSposta il cursore alla linea successiva Move the cursor to the next lineQWebPagePSposta il cursore alla parola successiva Move the cursor to the next wordQWebPageRSposta il cursore al carattere precedente)Move the cursor to the previous characterQWebPageNSposta il cursore alla linea precedente$Move the cursor to the previous lineQWebPagePSposta il cursore alla parola precedente$Move the cursor to the previous wordQWebPageNSposta il cursore all'inizio del blocco)Move the cursor to the start of the blockQWebPageTSposta il cursore all'inizio del documento,Move the cursor to the start of the documentQWebPagePSposta il cursore all'inizio della linea(Move the cursor to the start of the lineQWebPage,Nessun indizio trovatoNo Guesses FoundQWebPage.Nessun file selezionatoNo file selectedQWebPage.Nessuna ricerca recenteNo recent searchesQWebPageApri Frame Open FrameQWebPage&Visualizza immagine Open ImageQWebPage"Apri collegamento Open LinkQWebPage4Apri in una nuova finestraOpen in New WindowQWebPageAllineaOutlineQWebPage&Una pagina in basso Page downQWebPage*Una pagina a sinistra Page leftQWebPage&Una pagina a destra Page rightQWebPage$Una pagina in altoPage upQWebPageIncollaPasteQWebPage Ricerche recentiRecent searchesQWebPage8Raggiunto limite redirezioniRedirection limit reachedQWebPageAggiornaReloadQWebPageReimpostaResetQWebPageBordo destro Right edgeQWebPage Salva l'immagine Save ImageQWebPage4Salva l'oggetto collegato & Save Link...QWebPageScorri in basso Scroll downQWebPageScorri qui Scroll hereQWebPage"Scorri a sinistra Scroll leftQWebPageScorri a destra Scroll rightQWebPageScorri in alto Scroll upQWebPageCerca nel WebSearch The WebQWebPageSeleziona tutto Select allQWebPageFSeleziona fino alla fine del bloccoSelect to the end of the blockQWebPageLSeleziona fino alla fine del documento!Select to the end of the documentQWebPageHSeleziona fino alla fine della lineaSelect to the end of the lineQWebPageLSeleziona fino al carattere successivoSelect to the next characterQWebPageHSeleziona fino alla linea successivaSelect to the next lineQWebPageJSeleziona fino alla parola successivaSelect to the next wordQWebPageLSeleziona fino al carattere precedente Select to the previous characterQWebPageHSeleziona fino alla linea precedenteSelect to the previous lineQWebPageJSeleziona fino alla parola precedenteSelect to the previous wordQWebPageHSeleziona fino all'inizio del blocco Select to the start of the blockQWebPageNSeleziona fino all'inizio del documento#Select to the start of the documentQWebPageJSeleziona fino all'inizio della lineaSelect to the start of the lineQWebPage<Mostra ortografia e grammaticaShow Spelling and GrammarQWebPageOrtografiaSpellingQWebPageStopStopQWebPage InviaSubmitQWebPage InviaQSubmit (input element) alt text for elements with no alt, title, or valueSubmitQWebPage&Direzione del testoText DirectionQWebPageLo script in questa pagina sembra avere problemi. Interrompere lo script?RThe script on this page appears to have a problem. Do you want to stop the script?QWebPageQuesto un indice per le ricerche. Inserire le parole per la ricerca: 3This is a searchable index. Enter search keywords: QWebPageCimaTopQWebPageSottolineato UnderlineQWebPageSconosciutoUnknownQWebPage$Web Inspector - %2Web Inspector - %2QWebPageGuida rapida What's This?QWhatsThisAction**QWidget&Finisci&FinishQWizard &Guida&HelpQWizard&Successivo&NextQWizard&Successivo >&Next >QWizard< &Indietro< &BackQWizardAnnullaCancelQWizardConfermaCommitQWizardContinuaContinueQWizard FattoDoneQWizardIndietroGo BackQWizard GuidaHelpQWizard%1 - [%2] %1 - [%2] QWorkspace&Chiudi&Close QWorkspace&Sposta&Move QWorkspace&Ripristina&Restore QWorkspaceRi&dimensiona&Size QWorkspaceSro&tola&Unshade QWorkspace ChiudiClose QWorkspaceIngra&ndisci Ma&ximize QWorkspaceR&iduci a icona Mi&nimize QWorkspaceRiduce a iconaMinimize QWorkspace&Ripristina in basso Restore Down QWorkspace&ArrotolaSh&ade QWorkspace,Sempre in &primo piano Stay on &Top QWorkspaceqviaggiatreno-2013.7.3/src/traduzioni/qt_it.ts0000664000175000017500000156421112215773056021260 0ustar locutuslocutus CloseButton Close Tab Chiudi scheda FakeReply Fake error ! Errore falso ! Invalid URL Url non valido MAC_APPLICATION_MENU Services Servizi Hide %1 Nascondi %1 Hide Others Nascondi altri Show All Mostra tutto Preferences... Preferenze... Quit %1 Esci da %1 About %1 Informazioni su %1 Phonon:: Accessibility Accessibilità Communication Comunicazioni Games Giochi Music Musica Notifications Notifiche Video Video Phonon::AudioOutput <html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html> <html>Il dispositivo di riproduzione audio <b>%1</b> non funziona.<br/>Ripiego su <b>%2</b>.</html> <html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html> <html>Cambio al dispositivo di riproduzione audio <b>%1</b><br/>che è appena diventato disponibile e ha una preferenza più alta.</html> Revert back to device '%1' Ritorno al dispositivo '%1' <html>Switching to the audio playback device <b>%1</b><br/>which has higher preference or is specifically configured for this stream.</html> <html>Cambio al dispositivo di riproduzione audio <b>%1</b><br/>che ha una preferenza maggiore o è configurato specificatamente per questo stream.</html> Phonon::Gstreamer::Backend Warning: You do not seem to have the base GStreamer plugins installed. All audio and video support has been disabled Warning: Non sono stati trovati i plugin di base GStreamer. Tutto il supporto audio e video è stato disabilitato Warning: You do not seem to have the package gstreamer0.10-plugins-good installed. Some video features have been disabled. Warning: Non è stato trovato il pacchetto gstreamer0.10-plugins-good. Alcune opzioni video sono state disabilitate. Phonon::Gstreamer::MediaObject A required codec is missing. You need to install the following codec(s) to play this content: %0 Manca un codec richiesto. Installare il seguente codec per riprodurre questo contenuto: %0 Could not decode media source. Impossibile decodificare la sorgente del media. Could not locate media source. Impossibile localizzare la sorgente del media. Cannot start playback. Check your GStreamer installation and make sure you have libgstreamer-plugins-base installed. Missing codec helper script assistant. Plugin codec installation failed for codec: %0 Installazione del plugin per codec fallita per il codec: %0 Could not open audio device. The device is already in use. Impossibile aprire il dispositivo audio. Il dispositivo è già in uso. Could not open media source. Impossibile aprire la sorgente del media. Invalid source type. Tipo di sorgente non valido. Phonon::MMF Audio Output Uscita audio The audio output device Il dispositivo di uscita audio No error Nessun errore Not found Non trovato Out of memory Memoria insufficiente Not supported Non supportato Overflow Overflow Underflow Underflow Already exists Esiste già Path not found Percorso non trovato In use In uso Not ready Non pronto Access denied Accesso negato Could not connect Impossibile connettersi Disconnected Disconnesso Permission denied Accesso negato Insufficient bandwidth Banda insufficiente Network unavailable Rete non disponibile Network communication error Errore di comunicazione di rete Streaming not supported Streaming non supportato Server alert Avviso dal server Invalid protocol Protocollo non valido Invalid URL Url non valido Multicast error Errore multicast Proxy server error Errore server proxy Proxy server not supported Server proxy non supportato Audio output error Errore uscita audio Video output error Errore uscita video Decoder error Errore decoder Audio or video components could not be played Impossibile riprodurre componenti audio o video DRM error Errore DRM Unknown error (%1) Errore sconosciuto (%1) Phonon::MMF::AbstractMediaPlayer Not ready to play Error opening file Error opening URL Error opening resource Error opening source: resource not opened Setting volume failed Loading clip failed Playback complete Phonon::MMF::AbstractVideoPlayer Pause failed Impossibile mettere in pausa Seek failed Impossibile impostare la posizione Getting position failed Impossibile ottenere la posizione Opening clip failed Impossibile aprire il clip video Phonon::MMF::AudioEqualizer %1 Hz %1 Hz Phonon::MMF::AudioPlayer Getting position failed Impossibile ottenere la posizione Phonon::MMF::DsaVideoPlayer Video display error Errore visualizzazione video Phonon::MMF::EffectFactory Enabled Abilitato Phonon::MMF::EnvironmentalReverb Decay HF ratio (%) DecayHFRatio: Ratio of high-frequency decay time to the value specified by DecayTime. Decay time (ms) DecayTime: Time over which reverberation is diminished. Density (%) Density Delay between first and subsequent reflections. Note that the S60 platform documentation does not make clear the distinction between this value and the Diffusion value. Diffusion (%) Diffusion: Delay between first and subsequent reflections. Note that the S60 platform documentation does not make clear the distinction between this value and the Density value. Reflections delay (ms) ReflectionsDelay: Amount of delay between the arrival the direct path from the source and the arrival of the first reflection. Reflections level (mB) ReflectionsLevel: Amplitude of reflections. This value is corrected by the RoomLevel to give the final reflection amplitude. Reverb delay (ms) ReverbDelay: Amount of time between arrival of the first reflection and start of the late reverberation. Reverb level (mB) ReverbLevel Amplitude of reverberations. This value is corrected by the RoomLevel to give the final reverberation amplitude. Room HF level RoomHFLevel: Amplitude of low-pass filter used to attenuate the high frequency component of reflected sound. Room level (mB) RoomLevel: Master volume control for all reflected sound. Phonon::MMF::MediaObject Error opening source: type not supported Errore apertura sorgente: tipo non supportato Error opening source: resource is compressed Errore apertura sorgente: risorsa compressa Error opening source: resource not valid Errore apertura sorgente: risorsa non valida Error opening source: media type could not be determined Errore apertura sorgente: impossibile determinare il tipo di media Phonon::MMF::StereoWidening Level (%) Livello (%) Phonon::MMF::SurfaceVideoPlayer Video display error Errore visualizzazione video Phonon::VolumeSlider Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1% Usa questa controllo per regolare il volume. La posizione più a sinistra è 0%, quella più a destra è %1% Muted Muto Volume: %1% Volume: %1% Q3Accel %1, %2 not defined %1, %2 non definito Ambiguous %1 not handled %1 ambiguo non gestito Q3DataTable Delete Elimina False Falso Insert Inserisci True Vero Update Aggiorna Q3FileDialog %1 File not found. Check path and filename. %1 Impossibile trovare il file Controllare il nome del file e riprovare. &Delete &Elimina &No &No &OK &OK &Open &Apri &Rename &Rinomina &Save &Salva &Unsorted &Non ordinare &Yes &Sì <qt>Are you sure you wish to delete %1 "%2"?</qt> <qt>Eliminare %1 "%2"?</qt> All Files (*) Tutti i file(*) All Files (*.*) Tutti i file(*.*) Attributes Attributi Back Indietro Cancel Annulla Copy or Move a File Copia o sposta un file Create New Folder Crea una nuova cartella Date Data Delete %1 Elimina %1 Detail View Visualizza dettagli Dir Directory Directories Directory Directory: Directory: Error Errore File File File &name: &Nome file: File &type: &Tipo file: Find Directory Trova directory Inaccessible Non accessibile List View Visualizza elenco Look &in: Cerca &in: Name Nome New Folder Nuova cartella New Folder %1 Nuova cartella: %1 New Folder 1 Nuova cartella 1 One directory up Directory superiore Open Apri Open Apri Preview File Contents Anteprima contenuto file Preview File Info Anteprima informazioni file R&eload R&icarica Read-only Sola lettura Read-write Lettura-scrittura Read: %1 Lettura: %1 Save As Salva come Select a Directory Selezionare una directory Show &hidden files Mostra file &nascosti Size Dimensioni Sort Ordina Sort by &Date Ordina per &data Sort by &Name Ordina per &nome Sort by &Size Ordina per dimen&sioni Special File Speciale Symlink to Directory Collegamento simbolico a directory Symlink to File Collegamento simbolico a file Symlink to Special Collegamento simbolico a file speciale Type Tipo Write-only Sola scrittura Write: %1 Scrittura: %1 the directory la directory the file il file the symlink il collegamento simbolico Q3LocalFs Could not create directory %1 Impossibile creare la directory %1 Could not open %1 Impossibile aprire %1 Could not read directory %1 Impossibile leggere la directory %1 Could not remove file or directory %1 Impossibile rimuovere il file o la directory %1 Could not rename %1 to %2 Impossibile rinominare %1 in %2 Could not write %1 Impossibile scrivere %1 Q3MainWindow Customize... Personalizza… Line up Allinea Q3NetworkProtocol Operation stopped by the user Operazione terminata dall'utente Q3ProgressDialog Cancel Annulla Q3TabDialog Apply Applica Cancel Annulla Defaults Predefiniti Help Guida OK OK Q3TextEdit &Copy &Copia &Paste &Incolla &Redo &Ripeti &Undo &Annulla Clear Pulisci Cu&t &Taglia Select All Seleziona tutto Q3TitleBar Close Chiudi Closes the window Chiude la finestra Contains commands to manipulate the window Contiene comandi per manipolare la finestra Displays the name of the window and contains controls to manipulate it Mostra il nome della finestra e contiene controlli per manipolarla Makes the window full screen Imposta la finestra a schermo intero Maximize Ingrandisci Minimize Riduci a icona Puts a minimized window back to normal Ripristina una finestra ridotta a icona Moves the window out of the way Sposta la finestra Puts a maximized window back to normal Ripristina una finestra ingrandita Restore down Ripristina in basso Restore up Ripristina in alto System Sistema Q3ToolBar More... Ancora… Q3UrlOperator (unknown) (sconosciuto) The protocol `%1' does not support copying or moving files or directories Il protocollo '%1' non supporta la la copia o lo spostamento di file o directory The protocol `%1' does not support creating new directories Il protocollo '%1' non supporta la creazione di nuove directory The protocol `%1' does not support getting files Il protocollo '%1' non supporta lo scaricamento dei file The protocol `%1' does not support listing directories Il protocollo '%1' non supporta l'elenco delle directory The protocol `%1' does not support putting files Il protocollo '%1' non supporta il caricamento dei file The protocol `%1' does not support removing files or directories Il protocollo '%1' non supporta la rimozione di file o directory The protocol `%1' does not support renaming files or directories Il protocollo '%1' non supporta la rinominazione di file o directory The protocol `%1' is not supported Il protocollo '%1' non è supportato Q3Wizard &Cancel &Annulla &Finish &Finisci &Help &Guida &Next > &Successivo > < &Back < &Indietro QAbstractSocket Connection refused Connessione rifiutata Connection timed out Connessione fuori tempo massimo Host not found Host non trovato Network unreachable Rete irraggiungibile Operation on socket is not supported Operazione su socket non supportata Socket is not connected Socket non connesso Socket operation timed out Operazione socket fuori tempo massimo QAbstractSpinBox &Select All &Seleziona tutto &Step up &Aumenta Step &down &Diminuisci QAccessibleButton Press Premi QApplication Activate Attiva Activates the program's main window Attiva la finestra principale del programma Executable '%1' requires Qt %2, found Qt %3. L'eseguibile '%1' richiede Qt %2, trovata Qt %3. Incompatible Qt Library Error Errore di libreria Qt non compatibile QT_LAYOUT_DIRECTION Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout. LTR QAxSelect &Cancel &Annulla COM &Object: &Oggetto COM: OK OK Select ActiveX Control Seleziona il controllo ActiveX QCheckBox Check Seleziona Toggle Inverti Uncheck Deseleziona QColorDialog &Add to Custom Colors &Aggiungi ai colori personalizzati &Basic colors Colori di &base &Custom colors Colori &personalizzati &Green: &Verde: &Red: &Rosso: &Sat: &Saturazione: &Val: &Luminosità: A&lpha channel: Cana&le Alfa: Bl&ue: Bl&u: Hu&e: &Tonalità: Select Color Seleziona colore QComboBox Close Chiudi False Falso Open Apri True Vero QCoreApplication %1: already exists QSystemSemaphore %1: esiste già %1: does not exist QSystemSemaphore %1: non esiste %1: out of resources QSystemSemaphore %1: risorse insufficienti %1: unknown error %2 QSystemSemaphore %1: errore sconosciuto %2 %1: key is empty QSystemSemaphore %1: chiave vuota %1: unable to make key QSystemSemaphore %1: impossibile creare la chiave %1: ftok failed QSystemSemaphore %1: ftok fallito QDB2Driver Unable to commit transaction Impossibile convalidare la transazione Unable to connect Impossibile connettersi Unable to rollback transaction Impossibile annullare la transazione Unable to set autocommit Impossibile impostare l'autoconvalida QDB2Result Unable to bind variable Impossibile associare la variabile Unable to execute statement Impossibile eseguire il comando Unable to fetch first Impossibile ottenere il primo Unable to fetch next Impossibile ottenere il successivo Unable to fetch record %1 Impossibile ottenere il record %1 Unable to prepare statement Impossibile preparare il comando QDateTimeEdit AM AM PM PM am am pm pm QDeclarativeAbstractAnimation Cannot animate non-existent property "%1" Impossibile animare la proprietà non esistente "%1" Cannot animate read-only property "%1" Impossibile animare la proprietà di sola lettura "%1" Animation is an abstract class Animation è una classe astratta QDeclarativeAnchorAnimation Cannot set a duration of < 0 Impossibile impostare una durata negativa QDeclarativeAnchors Possible anchor loop detected on fill. Possible anchor loop detected on centerIn. Cannot anchor to an item that isn't a parent or sibling. Possible anchor loop detected on vertical anchor. Possible anchor loop detected on horizontal anchor. Cannot specify left, right, and hcenter anchors. Cannot anchor to a null item. Cannot anchor a horizontal edge to a vertical edge. Cannot anchor item to self. Cannot specify top, bottom, and vcenter anchors. Baseline anchor cannot be used in conjunction with top, bottom, or vcenter anchors. Cannot anchor a vertical edge to a horizontal edge. QDeclarativeAnimatedImage Qt was built without support for QMovie Qt è stato compilato senza il supporto per QMovie QDeclarativeBehavior Cannot change the animation assigned to a Behavior. Impossibile cambiare l'animazione assegnata a un Behavior. QDeclarativeBinding Binding loop detected for property "%1" Rilevato collegamento ciclico per la proprietà "%1" QDeclarativeCompiledBindings Binding loop detected for property "%1" Rilevato collegamento ciclico per la proprietà "%1" QDeclarativeCompiler Invalid property assignment: "%1" is a read-only property Invalid property assignment: unknown enumeration Invalid property assignment: string expected Invalid property assignment: url expected Invalid property assignment: unsigned int expected Invalid property assignment: int expected Invalid property assignment: number expected Invalid property assignment: color expected Invalid property assignment: date expected Invalid property assignment: time expected Invalid property assignment: datetime expected Invalid property assignment: point expected Invalid property assignment: size expected Invalid property assignment: rect expected Invalid property assignment: boolean expected Invalid property assignment: 3D vector expected Invalid property assignment: unsupported type "%1" Element is not creatable. Component elements may not contain properties other than id Invalid component id specification id is not unique Invalid component body specification Component objects cannot declare new properties. Component objects cannot declare new signals. Component objects cannot declare new functions. Cannot create empty component specification Incorrectly specified signal assignment Cannot assign a value to a signal (expecting a script to be run) Empty signal assignment Empty property assignment Attached properties cannot be used here Non-existent attached object Invalid attached object assignment Cannot assign to non-existent default property Cannot assign to non-existent property "%1" Impossibile assegnare ad una proprietà inesistente "%1" Invalid use of namespace Not an attached property name Invalid use of id property Property has already been assigned a value Invalid grouped property access Cannot assign a value directly to a grouped property Invalid property use Property assignment expected Single property assignment expected Unexpected object assignment Cannot assign object to list Can only assign one binding to lists Cannot assign primitives to lists Cannot assign multiple values to a script property Invalid property assignment: script expected Cannot assign object to property "%1" cannot operate on "%2" Duplicate default property Duplicate property name Property names cannot begin with an upper case letter Illegal property name Duplicate signal name Signal names cannot begin with an upper case letter Illegal signal name Duplicate method name Method names cannot begin with an upper case letter Illegal method name Property value set multiple times Invalid property nesting Cannot override FINAL property Invalid property type Invalid empty ID IDs cannot start with an uppercase letter IDs must start with a letter or underscore IDs must contain only letters, numbers, and underscores ID illegally masks global JavaScript property No property alias location Invalid alias location Invalid alias reference. An alias reference must be specified as <id> or <id>.<property> Invalid alias reference. Unable to find id "%1" QDeclarativeComponent Invalid empty URL URL vuoto non valido QDeclarativeCompositeTypeManager Resource %1 unavailable Risorsa %1 non disponibile Namespace %1 cannot be used as a type Impossibile usare il namespace %1 come tipo %1 %2 %1 %2 Type %1 unavailable Tipo %1 non disponibile QDeclarativeConnections Cannot assign to non-existent property "%1" Impossibile assegnare ad una proprietà inesistente "%1" Connections: nested objects not allowed Connessioni: oggetti nidificati non permessi Connections: syntax error Connessioni: errore di sintassi Connections: script expected Connessioni: atteso script QDeclarativeEngine executeSql called outside transaction() executeSql è stato chiamato al di fuori di transaction() Read-only Transaction Transazione in sola lettura Version mismatch: expected %1, found %2 Versione errata: attesa %1, trovata %2 SQL transaction failed Transazione SQL fallita transaction: missing callback transazione: callback mancante SQL: database version mismatch SQL: versione database errata QDeclarativeFlipable front is a write-once property back is a write-once property QDeclarativeImportDatabase module "%1" definition "%2" not readable plugin cannot be loaded for module "%1": %2 module "%1" plugin "%2" not found module "%1" version %2.%3 is not installed module "%1" is not installed "%1": no such directory import "%1" has no qmldir and no namespace - %1 is not a namespace - nested namespaces not allowed local directory is ambiguous. Found in %1 and in %2 is ambiguous. Found in %1 in version %2.%3 and %4.%5 is instantiated recursively is not a type QDeclarativeKeyNavigationAttached KeyNavigation is only available via attached properties QDeclarativeKeysAttached Keys is only available via attached properties QDeclarativeListModel remove: index %1 out of range insert: value is not an object insert: index %1 out of range move: out of range append: value is not an object set: value is not an object set: index %1 out of range ListElement: cannot contain nested elements ListElement: cannot use reserved "id" property ListElement: cannot use script for property value ListModel: undefined property '%1' QDeclarativeLoader Loader does not support loading non-visual elements. QDeclarativeParentAnimation Unable to preserve appearance under complex transform Unable to preserve appearance under non-uniform scale Unable to preserve appearance under scale of 0 QDeclarativeParentChange Unable to preserve appearance under complex transform Unable to preserve appearance under non-uniform scale Unable to preserve appearance under scale of 0 QDeclarativeParser Illegal unicode escape sequence Illegal character Unclosed string at end of line Illegal escape squence Unclosed comment at end of file Illegal syntax for exponential number Identifier cannot start with numeric literal Unterminated regular expression literal Invalid regular expression flag '%0' Unterminated regular expression backslash sequence Unterminated regular expression class Syntax error Unexpected token `%1' Expected token `%1' Property value set multiple times Expected type name Invalid import qualifier ID Reserved name "Qt" cannot be used as an qualifier Script import qualifiers must be unique. Script import requires a qualifier Library import requires a version Expected parameter type Invalid property type modifier Unexpected property type modifier Expected property type Readonly not yet supported JavaScript declaration outside Script element QDeclarativePauseAnimation Cannot set a duration of < 0 Impossibile impostare una durata negativa QDeclarativePixmap Error decoding: %1: %2 Failed to get image from provider: %1 Cannot open: %1 QDeclarativePropertyAnimation Cannot set a duration of < 0 Impossibile impostare una durata negativa QDeclarativePropertyChanges PropertyChanges does not support creating state-specific objects. Cannot assign to non-existent property "%1" Impossibile assegnare ad una proprietà inesistente "%1" Cannot assign to read-only property "%1" QDeclarativeTextInput Could not load cursor delegate Could not instantiate cursor delegate QDeclarativeVME Unable to create object of type %1 Cannot assign value %1 to property %2 Cannot assign object type %1 with no default method Cannot connect mismatched signal/slot %1 %vs. %2 Cannot assign an object to signal property %1 Cannot assign object to list Cannot assign object to interface property Unable to create attached object Cannot set properties on %1 as it is null QDeclarativeVisualDataModel Delegate component must be Item type. QDeclarativeXmlListModel Qt was built without support for xmlpatterns QDeclarativeXmlListModelRole An XmlRole query must not start with '/' QDeclarativeXmlRoleList An XmlListModel query must start with '/' or "//" QDial QDial QDial SliderHandle Manopola SpeedoMeter Tachimetro QDialog Done Fatto What's This? Guida rapida QDialogButtonBox &Cancel &Annulla &Close &Chiudi &No &No &OK &OK &Save &Salva &Yes &Sì Abort Interrompi Apply Applica Cancel Annulla Close Chiudi Close without Saving Chiudi senza salvare Discard Scarta Don't Save Non salvare Help Guida Ignore Ignora N&o to All N&o a tutti OK OK Open Apri Reset Reimposta Restore Defaults Ripristina predefiniti Retry Riprova Save Salva Save All Salva tutto Yes to &All Sì a &tutti QDirModel Date Modified Data ultima modifica Name Nome Size Dimensioni Kind Match OS X Finder Tipo Type All other platforms Tipo QDockWidget Close Chiudi Dock Aggangia Float Sgancia QDoubleSpinBox Less Diminuisci More Aumenta QErrorMessage &OK &OK &Show this message again &Mostra ancora questo messaggio Debug Message: Debug: Fatal Error: Errore fatale: Warning: Warning: QFile Cannot create %1 for output Impossibile creare %1 per la scrittura Cannot open %1 for input Impossibile aprire %1 per la lettura Cannot open for output Impossibile aprire per la scrittura Cannot remove source file Impossibile rimuovere il file sorgente Destination file exists Il file di destinazione esiste Will not rename sequential file using block copy Failure to write block Impossibile scrivere il blocco QFileDialog %1 Directory not found. Please verify the correct directory name was given. %1 Impossibile trovare la directory. Controllare il nome della directory e riprovare. %1 File not found. Please verify the correct file name was given. %1 Impossibile trovare il file Controllare il nome del file e riprovare. %1 already exists. Do you want to replace it? %1 esiste già. Sostituirlo? &Choose S&cegli &Delete &Elimina &New Folder &Nuova cartella &Open &Apri &Rename &Rinomina &Save &Salva '%1' is write protected. Do you want to delete it anyway? '%1' è in sola lettura. Eliminarlo lo stesso? All Files (*) Tutti i file(*) All Files (*.*) Tutti i file(*.*) Are sure you want to delete '%1'? Eliminare '%1'? Back Indietro Could not delete directory. Impossibile eliminare la directory. Create New Folder Crea una nuova cartella Detail View Visualizza dettagli Directories Directory Directory: Directory: Drive Unità File File File Folder Match Windows Explorer Folder All other platforms Alias Mac OS X Finder Shortcut All other platforms File &name: &Nome file: Files of type: File del tipo: Find Directory Trova directory Forward Avanti List View Visualizza elenco Look in: Cerca in: My Computer Risorse del computer New Folder Nuova cartella Open Apri Parent Directory Directory superiore Recent Places Posizioni recenti Remove Rimuovi Save As Salva come Show Mostra Show &hidden files Mostra file &nascosti Unknown Sconosciuto Go back Indietro Go forward Avanti Go to the parent directory Directory superiore Create a New Folder Crea una nuova cartella Change to list view mode Modalità visualizza lista Change to detail view mode Modalità visualizza dettagli QFileSystemModel %1 GB %1 GiB %1 KB %1 KiB %1 MB %1 MiB %1 TB %1 TiB %1 bytes %1 byte <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks. <b>Impossibile utilizzare il nome "%1".</b><p>Selezionare un altro nome, con meno caratteri o senza segni di punteggiatura. Kind Match OS X Finder Tipo Type All other platforms Tipo Computer Computer Date Modified Data ultima modifica Invalid filename Nome file non valido My Computer Risorse del computer Name Nome Size Dimensioni %1 byte(s) %1 byte %1 byte QFontDatabase Any Qualunque Arabic Arabo Armenian Armeno Bengali Bengali Black Nero Bold Grassetto Cyrillic Cirillico Demi Pesante Demi Bold Grassetto pesante Devanagari Devanagari Georgian Georgiano Greek Greco Gujarati Gujarati Gurmukhi Gurmukhi Hebrew Ebraico Italic Italico Japanese Giapponese Kannada Kannada Khmer Khmer Korean Koreano Lao Lao Latin Latino Light Leggero Malayalam Malayalam Myanmar Myanmar Normal Normale Oblique Obliquo Ogham Ogham Oriya Oriya Runic Runico Simplified Chinese Cinese semplificato Sinhala Sinhala Symbol Simboli Syriac Siriano Tamil Tamil Telugu Telugu Thaana Thaana Thai Tailandese Tibetan Tibetano Traditional Chinese Cinese tradizionale Vietnamese Vietnamita N'Ko N'Ko QFontDialog &Font &Carattere &Size Dimen&sioni &Underline So&ttolineato Effects Effetti Font st&yle St&ile carattere Sample Esempio Select Font Seleziona carattere Stri&keout Ba&rrato Wr&iting System Sist&ema di scrittura QFtp Changing directory failed: %1 Cambio directory fallito: %1 Connected to host Connessione all'host Connected to host %1 Connessione all'host %1 Connecting to host failed: %1 Connessione all'host fallita: %1 Connection closed Connessione chiusa Connection refused for data connection Connessione rifiutata per la connessione dati Connection refused to host %1 Connessione all'host %1 rifiutata Connection timed out to host %1 Connessione all'host %1 fuori tempo massimo Connection to %1 closed Connessione a %1 chiusa Creating directory failed: %1 Creazione directory fallita: %1 Downloading file failed: %1 Scaricamento file fallito: %1 Host %1 found Host %1 trovato Host %1 not found Host %1 non trovato Host found Host trovato Listing directory failed: %1 Elenco directory fallito: %1 Login failed: %1 Login fallito: %1 Not connected Non connesso Removing directory failed: %1 Rimozione directory fallita: %1 Removing file failed: %1 Rimozione file fallita: %1 Unknown error Errore sconosciuto Uploading file failed: %1 Caricamento file fallito: %1 QHostInfo Unknown error Errore sconosciuto No host name given Nessun nome host specificato QHostInfoAgent Host not found Host non trovato Unknown address type Tipo di indirizzo sconosciuto No host name given Nessun nome host specificato Invalid hostname Nome host non valido Unknown error Errore sconosciuto QHttp Authentication required Autenticazione richiesta Connected to host Connesso all'host Connected to host %1 Connesso all'host %1 Connection closed Connessione chiusa Connection refused Connessione rifiutata Connection refused (or timed out) Connessione rifiutata (o fuori tempo massimo) Connection to %1 closed Connessione a %1 chiusa Data corrupted Dati corrotti Error writing response to device Errore nella scrittura della risposta al dispositivo HTTP request failed Richiesta HTTP fallita HTTPS connection requested but SSL support not compiled in Richiesta connessione HTTPS, ma supporto SSL non compilato Host %1 found Host %1 trovato Host %1 not found Host %1 non trovato Host found Host trovato Host requires authentication L'host richiede l'autenticazione Invalid HTTP chunked body Parte della risposta HTTP non valida Invalid HTTP response header Header di risposta HTTP non valido No server set to connect to Nessun server impostato a cui connettersi Proxy authentication required Richiesta autenticazione proxy Proxy requires authentication Il proxy richiede l'autenticazione Request aborted Richiesta interrotta SSL handshake failed Inizializzazione SSL fallita Server closed connection unexpectedly Il server ha chiuso la connessione Unknown authentication method Metodo di autenticazione sconosciuto Unknown error Errore sconosciuto Unknown protocol specified Protocollo specificato sconosciuto Wrong content length Dimensioni del contenuto errate QHttpSocketEngine Authentication required Autenticazione richiesta Did not receive HTTP response from proxy Nessuna risposta HTTP ricevuta dal proxy Error communicating with HTTP proxy Errore nella comunicazione con il proxy HTTP Error parsing authentication request from proxy Errore nell'analisi della richiesta di autenticazione dal proxy Proxy connection closed prematurely Il proxy ha chiuso la connessione inaspettatamente Proxy connection refused Connessione al proxy rifiutata Proxy denied connection Il proxy ha negato la connessione Proxy server connection timed out Connessione al proxy fuori tempo massimo Proxy server not found Server proxy non trovato QIBaseDriver Could not start transaction Impossibile iniziare la transazione Error opening database Errore nell'apertura del database Unable to commit transaction Impossibile convalidare la transazione Unable to rollback transaction Impossibile annullare la transazione QIBaseResult Could not allocate statement Impossibile allocare il comando Could not describe input statement Impossibile descrivere il comando di input Could not describe statement Impossibile descrivere il comando Could not fetch next item Impossibile ottenere il prossimo elemento Could not find array Impossibile trovare l'array Could not get array data Impossibile ottenere dati dall'array Could not get query info Impossibile ottenere informazioni sulla query Could not get statement info Impossibile ottenere informazioni sul comando Could not prepare statement Impossibile preparare il comando Could not start transaction Impossibile iniziare la transazione Unable to close statement Impossibile chiudere il comando Unable to commit transaction Impossibile convalidare la transazione Unable to create BLOB Impossibile creare il BLOB Unable to execute query Impossibile eseguire la query Unable to open BLOB Impossibile aprire il BLOB Unable to read BLOB Impossibile leggere il BLOB Unable to write BLOB Impossibile scrivere il BLOB QIODevice No space left on device Spazio su disco insufficiente No such file or directory File o directory non trovato Permission denied Accesso negato Too many open files Troppi file aperti Unknown error Errore sconosciuto QInputContext Mac OS X input method Metodo di input Mac OS X Windows input method Metodo di input Windows XIM XIM FEP FEP XIM input method Metodo di input XIM S60 FEP input method Metodo di input S60 FEP QInputDialog Enter a value: Inserisci un valore: QLibrary Cannot load library %1: %2 Impossibile caricare la libreria %1: %2 Cannot resolve symbol "%1" in %2: %3 Impossibile risolvere il simbolo "%1" in %2: %3 Cannot unload library %1: %2 Impossibile scaricare la libreria %1: %2 Could not mmap '%1': %2 Impossibile eseguire mmap '%1': %2 Could not unmap '%1': %2 Impossibile eseguire unmap '%1': %2 Plugin verification data mismatch in '%1' Verifica dati plugin errata in '%1' The file '%1' is not a valid Qt plugin. Il file '%1' non è un plugin Qt valido. The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5] Il plugin '%1' usa una libreria Qt non compatibile. (%2.%3.%4) [%5] The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.) Il plugin '%1' usa una libreria Qt non compatibile. (Impossibile mescolare librerie di rilascio e debug.) The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3" Il plugin '%1' usa una libreria Qt non compatibile. Attesa build key "%2", presente "%3" The shared library was not found. Impossibile trovare la libreria condivisa. Unknown error Errore sconosciuto QLineEdit &Copy &Copia &Paste &Incolla &Redo &Ripeti &Undo &Annulla Cu&t &Taglia Delete Elimina Select All Seleziona tutto QLocalServer %1: Address in use %1: Indirizzo in uso %1: Name error %1: Errore di nome %1: Permission denied %1: Accesso negato %1: Unknown error %2 %1: Errore sconosciuto %2 QLocalSocket %1: Connection error %1: Errore di connessione %1: Connection refused %1: Connessione rifiutata %1: Datagram too large %1: Datagramma troppo grande per l'invio %1: Invalid name %1: Nome non valido %1: Remote closed %1: Connessione remota chiusa %1: Socket access error %1: Errore di accesso al socket %1: Socket operation timed out %1: Operazione socket fuori tempo massimo %1: Socket resource error %1: Errore di risorsa socket %1: The socket operation is not supported %1: Operazione su socket non supportata %1: Unknown error %1: Errore sconosciuto %1: Unknown error %2 %1: Errore sconosciuto %2 QMYSQLDriver Unable to begin transaction Impossibile iniziare la transazione Unable to commit transaction Impossibile convalidare la transazione Unable to connect Impossibile connettersi Unable to open database ' Impossibile aprire il database ' Unable to rollback transaction Impossibile annullare la transazione QMYSQLResult Unable to bind outvalues Impossibile associare i valori in uscita Unable to bind value Impossibile associare il valore Unable to execute next query Impossibile eseguire la prossima query Unable to execute query Impossibile eseguire la query Unable to execute statement Impossibile eseguire il comando Unable to fetch data Impossibile ottenere i dati Unable to prepare statement Impossibile preparare il comando Unable to reset statement Impossibile reimpostare il comando Unable to store next result Impossibile memorizzare il prossimo risultato Unable to store result Impossibile memorizzare i risultati Unable to store statement results Impossibile memorizzare i risultati del comando QMdiArea (Untitled) (Senza titolo) QMdiSubWindow %1 - [%2] %1 - [%2] &Close &Chiudi &Move &Sposta &Restore &Ripristina &Size Ri&dimensiona - [%1] - [%1] Close Chiudi Help Guida Ma&ximize Ingra&ndisci Maximize Ingrandisce Menu Menu Mi&nimize R&iduci a icona Minimize Riduce a icona Restore Ripristina Restore Down Ripristina in basso Shade Arrotola Stay on &Top Sempre in &primo piano Unshade Srotola QMenu Close Chiudi Execute Esegui Open Apri QMenuBar Actions Azioni QMessageBox About Qt Informazioni su Qt Help Guida Hide Details... Nascondi dettagli… OK OK <h3>About Qt</h3><p>This program uses Qt version %1.</p> <h3>Informazioni su Qt</h3><p>Questo programma usa Qt versione %1.</p> <p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p><p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p> Kept original English "Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)." <p>Qt è un toolkit C++ per lo sviluppo di applicazioni multipiattaforma.</p> <p>Qt garantisce portabilità con un unico sorgente tra MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, e tutte le maggiori varianti commerciali di Unix. Qt è anche disponibile per dispositivi embedded con Qt per Embedded Linux e Qt per Windows CE.</p> <p>Qt è disponibile sotto tre diverse opzioni di licenza pensate per venire incontro alle esigenze di tutti i nostri utenti.</p> <p>Il nostro accordo di licenza commerciale è adatto per lo sviluppo di software proprietario/commerciale, nel caso non si voglia condividere codice sorgente con terze parti senza rispettare i termini della licenza GNU LGPL versione 2.1 o GNU GPL versione 3.0.</p> <p>La licenza GNU LGPL version 2.1 è adatta per lo sviluppo di applicazioni Qt (proprietarie od open source) nel caso si possano rispettare i termini della licenza GNU LGPL versione 2.1.</p> <p>La licenza GNU General Public License versione 3.0 è adatta per lo sviluppo di applicazioni nel caso sia necessario rispettare i termini della licenza GNU GPL versione 3.0. <p>Vedere <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> per una panoramica sulle opzioni di licenza Qt.</p> <p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p> <p>Qt è un prodotto Nokia. Vedere <a href="http://qt.nokia.com/">qt.nokia.com</a> per maggiori informazioni.</p> Show Details... Mostra dettagli… QMultiInputContext Select IM Selezionare l'IM QMultiInputContextPlugin Multiple input method switcher Commutatore per metodi di input multipli Multiple input method switcher that uses the context menu of the text widgets Commutatore per metodi di input multipli che usa il menu contestuale dei controlli di testo QNativeSocketEngine Another socket is already listening on the same port Un altro socket è già in ascolto sulla stessa porta Attempt to use IPv6 socket on a platform with no IPv6 support Tentativo di utilizzare IPv6 su una piattaforma che non lo supporta Connection refused Connessione rifiutata Connection timed out Connessione fuori tempo massimo Datagram was too large to send Datagramma troppo grande per l'invio Host unreachable Host irraggiungibile Invalid socket descriptor Descrittore socket non valido Network error Errore di rete Network operation timed out Operazione di rete fuori tempo massimo Network unreachable Rete irraggiungibile Operation on non-socket Operazione su un non socket Out of resources Risorse insufficienti Permission denied Accesso negato Protocol type not supported Tipo di protocollo non supportato The address is not available L'indirizzo non è disponibile The address is protected L'indirizzo è protetto The bound address is already in use L'indirizzo scelto è già utilizzato The proxy type is invalid for this operation Tipo di proxy non valido per quest'operazione The remote host closed the connection L'host remoto ha chiuso la connessione Unable to initialize broadcast socket Impossibile inizializzare un socket broadcast Unable to initialize non-blocking socket Impossibile inizializzare un socket non bloccante Unable to receive a message Impossibile ricevere un messaggio Unable to send a message Impossibile inviare un messaggio Unable to write Impossibile scrivere Unknown error Errore sconosciuto Unsupported socket operation Operazione socket non supportata QNetworkAccessCacheBackend Error opening %1 Errore nell'apertura di %1 QNetworkAccessDataBackend Operation not supported on %1 Operazione non supportata su %1 Invalid URI: %1 URI non valido: %1 QNetworkAccessDebugPipeBackend Write error writing to %1: %2 Errore di scrittura nella scrittura di %1: %2 Socket error on %1: %2 Errore socket su %1: %2 Remote host closed the connection prematurely on %1 L'host remoto ha chiuso inaspettatamente la connessione su %1 QNetworkAccessFileBackend Cannot open %1: Path is a directory Impossibile aprire %1: Il percorso è una directory Error opening %1: %2 Errore nell'apertura di %1: %2 Read error reading from %1: %2 Errore di lettura nella lettura di %1: %2 Request for opening non-local file %1 Richiesta di apertura del file non locale %1 Write error writing to %1: %2 Errore di scrittura nella scrittura di %1: %2 QNetworkAccessFtpBackend Cannot open %1: is a directory Impossibile aprire %1: è una directory Error while downloading %1: %2 Errore nello scaricamento di %1: %2 Error while uploading %1: %2 Errore nel caricamento di %1: %2 Logging in to %1 failed: authentication required Accesso a %1 fallito: autenticazione richiesta No suitable proxy found Non sono stati trovati proxy adatti QNetworkAccessHttpBackend No suitable proxy found Non sono stati trovati proxy adatti QNetworkAccessManager Network access is disabled. Accesso alla rete disabilitato. QNetworkReply Error downloading %1 - server replied: %2 Errore nello scaricamento di %1 - il server ha risposto: %2 Protocol "%1" is unknown Protocollo "%1" sconosciuto Network session error. Errore sessione di rete. Temporary network failure. Errore temporaneo di rete. QNetworkReplyImpl Operation canceled Operazione annullata QNetworkSession Invalid configuration. Configurazione non valida. QNetworkSessionPrivateImpl Roaming error Errore roaming Session aborted by user or system Sessione interrotta dall'utente o dal sistema Unidentified Error Errore non identificato Unknown session error. Errore di sessione sconosciuto. The session was aborted by the user or system. La sessione è stata interrotta dall'utente o dal sistema. The requested operation is not supported by the system. L'operazione richiesta non è supportata dal sistema. The specified configuration cannot be used. Impossibile usare la configurazione specificata. Roaming was aborted or is not possible. Il roaming è stato abortito o non è possibile. QOCIDriver Unable to initialize QOCIDriver Impossibile inizializzare Unable to begin transaction Impossibile iniziare la transazione Unable to commit transaction Impossibile convalidare la transazione Unable to logon Impossibile effettuare il logon Unable to rollback transaction Impossibile annullare la transazione QOCIResult Unable to alloc statement Impossibile allocare il comando Unable to bind column for batch execute Impossibile associare la colonna per l'esecuzione batch Unable to get statement type Impossibile ottenere il tipo di comando Unable to bind value Impossibile associare il valore Unable to execute batch statement Impossibile eseguire il comando batch Unable to execute statement Impossibile eseguire il comando Unable to goto next Impossibile andare al prossimo Unable to prepare statement Impossibile preparare il comando QODBCDriver Unable to commit transaction Impossibile convalidare la transazione Unable to connect Impossibile connettersi Unable to connect - Driver doesn't support all functionality required Impossibile connettersi - Il driver non supporta tutte le caratteristiche necessarie Unable to disable autocommit Impossibile disabilitare l'autoconvalida Unable to enable autocommit Impossibile abilitare l'autoconvalida Unable to rollback transaction Impossibile annullare la transazione QODBCResult QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration QODBCResult::reset: Impossibile impostare 'SQL_CURSOR_STATIC' come attributo del comando. Controllare la configurazione del driver ODBC Unable to bind variable Impossibile associare la variabile Unable to execute statement Impossibile eseguire il comando Unable to fetch Impossibile ottenere Unable to fetch first Impossibile ottenere il primo Unable to fetch last Impossibile ottenere l'ultimo Unable to fetch next Impossibile ottenere il successivo Unable to fetch previous Impossibile ottenere il precedente Unable to prepare statement Impossibile preparare il comando QObject PulseAudio Sound Server Server sonoro PulseAudio "%1" duplicates a previous role name and will be disabled. "%1" duplica un nome di ruolo precedente e sarà disabilitato. invalid query: "%1" query non valida: "%1" QPPDOptionsModel Name Nome Value Valore QPSQLDriver Could not begin transaction Impossibile iniziare la transazione Could not commit transaction Impossibile convalidare la transazione Could not rollback transaction Impossibile annullare la transazione Unable to connect Impossibile connettersi Unable to subscribe Impossibile effettuare la sottoscrizione Unable to unsubscribe Impossibile cancellare la sottoscrizione QPSQLResult Unable to create query Impossibile creare la query Unable to prepare statement Impossibile preparare il comando QPageSetupWidget Centimeters (cm) Centimetri (cm) Form Form Height: Altezza: Inches (in) Pollici (in) Landscape Paesaggio Margins Margini Millimeters (mm) Millimetri (mm) Orientation Orientamento Page size: Dimensioni pagina: Paper Carta Paper source: Sorgente carta: Points (pt) Punti (pt) Portrait Ritratto Reverse landscape Paesaggio speculare Reverse portrait Ritratto speculare Width: Larghezza: bottom margin margine basso left margin margine sinistro right margin margine destro top margin margine alto QPluginLoader The plugin was not loaded. Il plugin non è stato caricato. Unknown error Errore sconosciuto QPrintDialog %1 already exists. Do you want to overwrite it? %1 esiste già. Sostituirlo? %1 is a directory. Please choose a different file name. Il file %1 è una directory. Selezionare un altro file. &Options << &Opzioni << &Options >> &Opzioni >> &Print &Stampa <qt>Do you want to overwrite it?</qt> <qt>Sovrascriverlo?</qt> A0 A0 A0 (841 x 1189 mm) A0 (841 x 1189 mm) A1 A1 A1 (594 x 841 mm) A1 (594 x 841 mm) A2 A2 A2 (420 x 594 mm) A2 (420 x 594 mm) A3 A3 A3 (297 x 420 mm) A3 (297 x 420 mm) A4 A4 A4 (210 x 297 mm, 8.26 x 11.7 inches) A4 (210 x 297 mm, 8.26 x 11.7 pollici) A5 A5 A5 (148 x 210 mm) A5 (148 x 210 mm) A6 A6 A6 (105 x 148 mm) A6 (105 x 148 mm) A7 A7 A7 (74 x 105 mm) A7 (74 x 105 mm) A8 A8 A8 (52 x 74 mm) A8 (52 x 74 mm) A9 A9 A9 (37 x 52 mm) A9 (37 x 52 mm) Aliases: %1 Alias: %1 B0 B0 B0 (1000 x 1414 mm) B0 (1000 x 1414 mm) B1 B1 B1 (707 x 1000 mm) B1 (707 x 1000 mm) B10 B10 B10 (31 x 44 mm) B10 (31 x 44 mm) B2 B2 B2 (500 x 707 mm) B2 (500 x 707 mm) B3 B3 B3 (353 x 500 mm) B3 (353 x 500 mm) B4 B4 B4 (250 x 353 mm) B4 (250 x 353 mm) B5 B5 B5 (176 x 250 mm, 6.93 x 9.84 inches) B5 (176 x 250 mm, 6.93 x 9.84 pollici) B6 B6 B6 (125 x 176 mm) B6 (125 x 176 mm) B7 B7 B7 (88 x 125 mm) B7 (88 x 125 mm) B8 B8 B8 (62 x 88 mm) B8 (62 x 88 mm) B9 B9 B9 (44 x 62 mm) B9 (44 x 62 mm) C5E C5E C5E (163 x 229 mm) C5E (163 x 229 mm) Custom Personalizzato DLE DLE DLE (110 x 220 mm) DLE (110 x 220 mm) Executive Executive Executive (7.5 x 10 inches, 191 x 254 mm) Executive (7.5 x 10 pollici, 191 x 254 mm) File %1 is not writable. Please choose a different file name. Il file %1 non è accessibile in scrittura. Selezionare un altro file. File exists Il file esiste Folio Folio Folio (210 x 330 mm) Folio (210 x 330 mm) Ledger Ledger Ledger (432 x 279 mm) Ledger (432 x 279 mm) Legal Legal Legal (8.5 x 14 inches, 216 x 356 mm) Legal (8.5 x 14 pollici, 216 x 356 mm) Letter Letter Letter (8.5 x 11 inches, 216 x 279 mm) Letter (8.5 x 11 pollici, 216 x 279 mm) Local file File locale OK OK Print Stampa Print To File ... Stampa su file… Print all Stampa tutto Print range Intervallo di stampa Print current page Stampa pagina corrente Print selection Stampa selezione Print to File (PDF) Stampa su file (PDF) Print to File (Postscript) Stampa su file (Postscript) Tabloid Tabloid Tabloid (279 x 432 mm) Tabloid (279 x 432 mm) The 'From' value cannot be greater than the 'To' value. Il valore 'From' non può essere più grande di quello 'To'. US Common #10 Envelope US Common #10 Envelope US Common #10 Envelope (105 x 241 mm) US Common #10 Envelope (105 x 241 mm) Write %1 file Scrivi %1 file locally connected connesse localmente unknown sconosciuto QPrintPreviewDialog %1% %1% Close Chiudi Export to PDF Esporta PDF Export to PostScript Esporta Postscript First page Prima pagina Fit page Adatta altezza Fit width Adatta larghezza Landscape Paesaggio Last page Ultima pagina Next page Pagina successiva Page Setup Imposta pagina Page setup Imposta pagina Portrait Ritratto Previous page Pagina precedente Print Stampa Print Preview Anteprima di stampa Show facing pages Mostra pagine frontali Show overview of all pages Mostra panoramica di tutte le pagine Show single page Mostra pagina singola Zoom in Zoom in Zoom out Zoom out QPrintPropertiesWidget Advanced Avanzate Form Form Page Pagina QPrintSettingsOutput Collate Fascicola Color Colori Color Mode Colore Copies Copie Copies: Copie: Duplex Printing Stampa fronte retro Form Form Grayscale Scala di grigio Long side Lato lungo None Nessuno Options Opzioni Output Settings Impostazioni di uscita Pages from Pagine da Print all Stampa tutto Print range Intervallo di stampa Reverse Inverti pagine Selection Seleziona Short side Lato corto to a Current Page Pagina corrente QPrintWidget &Name: &Nome: ... Form Form Location: Posizione: Output &file: &File di uscita: P&roperties P&roprietà Preview Anteprima Printer Stampante Type: Tipo: QProcess Could not open input redirection for reading Impossible aprire la redirezione input per la lettura Could not open output redirection for writing Impossible aprire la redirezione output per la scrittura Error reading from process Errore nella lettura dal processo Error writing to process Errore nella scrittura sul processo No program defined Nessun programma definito Process crashed Processo chiuso inaspettatamente Process operation timed out Operazione processo fuori tempo massimo Resource error (fork failure): %1 Errore di risorse (fork fallito): %1 Process failed to start: %1 Impossibile avviare il processo: %1 QProgressDialog Cancel Annulla QPushButton Open Apri QRadioButton Check Seleziona QRegExp bad char class syntax bad lookahead syntax bad repetition syntax invalid interval invalid category disabled feature used invalid octal value met internal limit missing left delim no error occurred unexpected end QSQLite2Driver Error opening database Errore nell'apertura del database Unable to begin transaction Impossibile iniziare la transazione Unable to commit transaction Impossibile convalidare la transazione Unable to rollback transaction Impossibile annullare la transazione QSQLite2Result Unable to execute statement Impossibile eseguire il comando Unable to fetch results Impossibile ottenere i risultati QSQLiteDriver Error closing database Errore nella chiusura del database Error opening database Errore nell'apertura del database Unable to begin transaction Impossibile iniziare la transazione Unable to commit transaction Impossibile convalidare la transazione Unable to rollback transaction Impossibile annullare la transazione QSQLiteResult No query Nessuna query Parameter count mismatch Numero di parametri errato Unable to bind parameters Impossibile associare i parametri Unable to execute statement Impossibile eseguire il comando Unable to fetch row Impossibile ottenere la riga Unable to reset statement Impossibile reimpostare il comando QScriptBreakpointsModel ID ID Location Posizione Condition Condizione Ignore-count Single-shot Hit-count QScriptBreakpointsWidget New Delete Elimina QScriptDebugger Go to Line Line: Interrupt Shift+F5 Continue Continua F5 Step Into F11 Step Over F10 Step Out Shift+F11 Run to Cursor Ctrl+F10 Run to New Script Toggle Breakpoint Imposta breakpoint F9 Clear Debug Output Clear Error Log Clear Console &Find in Script... Ctrl+F Find &Next F3 Find &Previous Shift+F3 Ctrl+G Debug QScriptDebuggerCodeFinderWidget Close Chiudi Previous Next Case Sensitive Whole words <img src=":/qt/scripttools/debugging/images/wrap.png">&nbsp;Search wrapped QScriptDebuggerLocalsModel Name Nome Value Valore QScriptDebuggerStackModel Level Name Nome Location Posizione QScriptEdit Toggle Breakpoint Imposta breakpoint Disable Breakpoint Disabilita breakpoint Enable Breakpoint Abilita breakpoint Breakpoint Condition: Condizione breakpoint: QScriptEngineDebugger Loaded Scripts Script caricati Breakpoints Breakpoint Stack Stack Locals Console Console Debug Output Output debug Error Log Log errori Search Cerca View Visualizza Qt Script Debugger Qt Script Debugger QScriptNewBreakpointWidget Close Chiudi QScrollBar Bottom Fondo Left edge Bordo sinistro Line down Linea successiva Line up Linea precedente Page down Una pagina in basso Page left Una pagina a sinistra Page right Una pagina a destra Page up Una pagina in alto Position Posizione Right edge Bordo destro Scroll down Scorri in basso Scroll here Scorri qui Scroll left Scorri a sinistra Scroll right Scorri a destra Scroll up Scorri in alto Top Cima QSharedMemory %1: already exists %1: esiste già %1: create size is less then 0 %1: dimensioni inferiori a 0 %1: doesn't exists %1: non esiste %1: ftok failed %1: ftok fallito %1: invalid size %1: dimensioni non valide %1: key error %1: errore della chiave %1: doesn't exist %1: non esiste %1: key is empty %1: la chiave è vuota %1: UNIX key file doesn't exist %1: il file chiave UNIX non esiste %1: not attached %1: non assegnato %1: out of resources %1: risorse insufficienti %1: permission denied %1: accesso negato %1: size query failed %1: query sulle dimensioni fallita %1: system-imposed size restrictions %1: restrizioni sulle dimensioni imposte dal sistema %1: unable to lock %1: impossibile bloccare %1: unable to make key %1: impossibile creare la chiave %1: unable to set key on lock %1: impossibile bloccare la chiave %1: unable to unlock %1: impossibile sbloccare %1: unknown error %2 %1: errore sconosciuto %2 QShortcut + + Alt Alt Back Indietro Backspace Backspace Backtab Backtab Bass Boost Aumente i bassi Bass Down Diminuisci bassi Bass Up Aumenta bassi Call Button to start a call (note: a separate button is used to end the call) Chiama Caps Lock Blocco Maiuscole CapsLock BlocMaiusc Monitor Brightness Up Aumenta luminosità monitor Monitor Brightness Down Diminuisci luminosità monitor Keyboard Light On/Off Keyboard Brightness Up Keyboard Brightness Down Power Off Wake Up Eject Screensaver WWW Sleep LightBulb Shop History Add Favorite Hot Links Adjust Brightness Finance Community Audio Rewind Back Forward Application Left Application Right Book CD Calculator Clear Pulisci Clear Grab Close Chiudi Copy Copia Cut Taglia Display DOS Documents Documenti Spreadsheet Browser Browser Game Gioco Go Vai iTouch Logoff Chiudi sessione Market Meeting Keyboard Menu Menu PB My Sites Miei siti News Notizie Home Office Option Opzione Paste Incolla Phone Telefono Reply Rispondi Reload Aggiorna Rotate Windows Rotation PB Rotation KB Save Salva Send Invia Spellchecker Controllo ortografia Split Screen Dividi schermo Support Task Panel Terminal Terminale Tools Travel Video Video Word Processor XFer Zoom In Zoom In Zoom Out Zoom Out Away Messenger WebCam Mail Forward Pictures Music Musica Battery Batteria Bluetooth Bluetooth Wireless Wireless Ultra Wide Band Audio Forward Audio Repeat Audio Random Play Subtitle Audio Cycle Track Time View Visualizza Top Menu Suspend Hibernate Context1 Contesto1 Context2 Contesto2 Context3 Contesto3 Context4 Contesto4 Toggle Call/Hangup Button that will hang up if we're in call, or make a call if we're not. Voice Dial Button to trigger voice dialling Last Number Redial Button to redial the last number called Camera Shutter Button to trigger the camera shutter (take a picture) Camera Focus Button to focus the camera Kanji Muhenkan Henkan Romaji Hiragana Katakana Hiragana Katakana Zenkaku Hankaku Zenkaku Hankaku Touroku Massyo Kana Lock Kana Shift Eisu Shift Eisu toggle Code input Multiple Candidate Previous Candidate Hangul Hangul Start Hangul End Hangul Hanja Hangul Jamo Hangul Romaja Hangul Jeonja Hangul Banja Hangul PreHanja Hangul PostHanja Hangul Special Ctrl Ctrl Del Canc Delete Elimina Down Giù End Fine Enter Invio Esc Esc Escape Escape F%1 F%1 Favorites Preferiti Flip Ribalta Forward Avanti Hangup Button to end a call (note: a separate button is used to start the call) RIaggancia Help Guida Home Inizio Home Page Pagina iniziale Ins Ins Insert Inserisci Launch (0) Esegui (0) Media Pause Media player pause button Toggle Media Play/Pause Media player button to toggle between playing and paused Launch (1) Esegui (1) Launch (2) Esegui (2) Launch (3) Esegui (3) Launch (4) Esegui (4) Launch (5) Esegui (5) Launch (6) Esegui (6) Launch (7) Esegui (7) Launch (8) Esegui (8) Launch (9) Esegui (9) Launch (A) Esegui (A) Launch (B) Esegui (B) Launch (C) Esegui (C) Launch (D) Esegui (D) Launch (E) Esegui (E) Launch (F) Esegui (F) Launch Mail Posta Launch Media Media Left Sinistra Media Next Media Successivo Media Play Media Play Media Previous Media Precedente Media Record Media Registra Media Stop Media Stop Menu Menu Meta Meta No No Num Lock Blocco Num NumLock BlocNum Number Lock Blocco Tastierino Numerico Open URL Apri URL Page Down Pagina Giù Page Up Pagina Su Pause Pausa PgDown PgGiù PgUp PgSu Print Stamp Print Screen Stampa Schermo Refresh Aggiorna Return Invio Right Destra Scroll Lock Blocco Scorrimento ScrollLock BlocScorr Search Cerca Select Seleziona Shift Shift Space This and all following "incomprehensible" strings in QShortcut context are key names. Please use the localized names appearing on actual keyboards or whatever is commonly used. Spazio Standby Standby Stop Stop SysReq SysReq System Request System Request Tab Tab Treble Down Diminuisci alti Treble Up Aumenta alti Up Su Volume Down Aumenta volume Volume Mute Muto Volume Up Diminusci volume Yes QSlider Page down Una pagina in basso Page left Una pagina a sinistra Page right Una pagina a destra Page up Una pagina in alto Position Posizione QSocks5SocketEngine Address type not supported Tipo di indirizzo non supportato Connection not allowed by SOCKSv5 server Connessione non permessa dal server SOCKSv5 Connection to proxy closed prematurely Il proxy ha chiuso la connessione inaspettatamente Connection to proxy refused Connessione al proxy rifiutata Connection to proxy timed out Connessione al proxy fuori tempo massimo General SOCKSv5 server failure Errore generale del server SOCKSv5 Network operation timed out Operazione di rete fuori tempo massimo Proxy authentication failed Autenticazione proxy fallita Proxy authentication failed: %1 Autenticazione proxy fallita: %1 Proxy host not found Server proxy non trovato SOCKS version 5 protocol error Errore del protocollo SOCKS versione 5 SOCKSv5 command not supported Comando SOCKSv5 non supportato TTL expired TTL esaurito Unknown SOCKSv5 proxy error code 0x%1 Codice di errore SOCKSv5 sconosciuto 0x%1 QSoftKeyManager Ok Ok Select Seleziona Done Fatto Options Opzioni Cancel Annulla Exit Esci QSpinBox Less Diminuisci More Aumenta QSql Cancel Annulla Cancel your edits? Annullare le modifiche? Confirm Conferma Delete Elimina Delete this record? Eliminare questo record? Insert Inserisci No No Save edits? Salvare le modifiche? Update Aggiorna Yes QSslSocket Cannot provide a certificate with no key, %1 Impossibile fornire un certificato senza una chiave, %1 Error creating SSL context (%1) Errore nella creazione del contesto SSL (%1) Private key does not certify public key, %1 La chiave privata non certifica la chiave pubblica, %1 Error creating SSL session, %1 Errore nella creazione della sessione SSL, %1 Error creating SSL session: %1 Errore nella creazione della sessione SSL: %1 Unable to decrypt data: %1 Impossibile decifrare i dati: %1 Error during SSL handshake: %1 Errore nell'inizializzazione SSL: %1 Error loading local certificate, %1 Errore nel caricamento del certificato locale, %1 Error loading private key, %1 Errore nel caricamento della chiave privata, %1 Error while reading: %1 Errore nella lettura: %1 Invalid or empty cipher list (%1) Lista di cifrari vuota o non valida (%1) Unable to write data: %1 Impossibile scrivere i dati: %1 No error Nessun errore The issuer certificate could not be found Impossibile trovare il certificato dell'emittente The certificate signature could not be decrypted Impossibile decifrare la firma del certificato The public key in the certificate could not be read Impossibile leggere la chiave pubblica del certificato The signature of the certificate is invalid La firma del certificato non è valida The certificate is not yet valid Il certificato non è ancora valido The certificate has expired Il certificato è scaduto The certificate's notBefore field contains an invalid time Should "notBefore" be translated? Il campo notBefore del certificato contiene una data non valida The certificate's notAfter field contains an invalid time Should "notAfter" be translated? Il campo notAfter del certificato contiene una data non valida The certificate is self-signed, and untrusted Il certificato è auto-firmato, e non fidato The root certificate of the certificate chain is self-signed, and untrusted Il certificato radice della catena di certificati è auto-firmato, e non fidato The issuer certificate of a locally looked up certificate could not be found Impossibile trovare il certificato dell'emittente di un certificato cercato localmente No certificates could be verified Impossibile verificare i certificati One of the CA certificates is invalid Uno dei certificati della CA è invalido The basicConstraints path length parameter has been exceeded Il parametro di lunghezza percorso basicConstraints è stato superato The supplied certificate is unsuitable for this purpose Il certificato fornito non è adatto per questo scopo The root CA certificate is not trusted for this purpose Il certificato della CA radice non è fidato per questo scopo The root CA certificate is marked to reject the specified purpose Il certificato della CA radice è impostato per rifiutare lo scopo specificato The current candidate issuer certificate was rejected because its subject name did not match the issuer name of the current certificate La candidata emittente del certificato è stata rifiutata poiché il suo nome non corrisponde a quello dell'emittente del certificato corrente The current candidate issuer certificate was rejected because its issuer name and serial number was present and did not match the authority key identifier of the current certificate La candidata emittente del certificato è stata rifiutata poiché i suoi nome e numero di serie sono presenti e non corrispondono alla chiave identificativa del certificato corrente The peer did not present any certificate Il peer non ha presentato nessun certificato The host name did not match any of the valid hosts for this certificate Il nome host non corrisponde a nessun host valido per questo certificato Unknown error Errore sconosciuto QStateMachine Missing initial state in compound state '%1' Stato iniziale mancante nello stato composto '%1' Missing default state in history state '%1' Stato iniziale mancante nello stato history '%1' No common ancestor for targets and source of transition from state '%1' Nessun antenato comune per sorgente e obbiettivo della transizione dallo stato '%1' Unknown error Errore sconosciuto QSystemSemaphore %1: already exists %1: esiste già %1: does not exist %1: non esiste %1: out of resources %1: risorse insufficienti %1: permission denied %1: accesso negato %1: unknown error %2 %1: errore sconosciuto %2 QTDSDriver Unable to open connection Impossibile aprire la connessione Unable to use database Impossibile utilizzare il database QTabBar Scroll Left Scorri a sinistra Scroll Right Scorri a destra QTcpServer Operation on socket is not supported Operazione su socket non supportata QTextControl &Copy &Copia &Paste &Incolla &Redo &Ripeti &Undo &Annulla Copy &Link Location Copia Co&llegamento Cu&t &Taglia Delete Elimina Select All Seleziona tutto QToolButton Open Apri Press Premi QUdpSocket This platform does not support IPv6 La piattaforma non supporta IPv6 QUndoGroup Redo Ripeti Undo Annulla QUndoModel <empty> <vuoto> QUndoStack Redo Ripeti Undo Annulla QUnicodeControlCharacterMenu Insert Unicode control character Inserisci carattere di controllo Unicode LRE Start of left-to-right embedding LRE Start of left-to-right embedding LRM Left-to-right mark LRM Left-to-right mark LRO Start of left-to-right override LRO Start of left-to-right override PDF Pop directional formatting PDF Pop directional formatting RLE Start of right-to-left embedding RLE Start of right-to-left embedding RLM Right-to-left mark RLM Right-to-left mark RLO Start of right-to-left override RLO Start of right-to-left override ZWJ Zero width joiner ZWJ Zero width joiner ZWNJ Zero width non-joiner ZWNJ Zero width non-joiner ZWSP Zero width space ZWSP Zero width space QWebFrame Cannot show URL Impossibile mostrare l'URL Frame load interrupted by policy change Caricamento frame interrotto da cambio di policy Cannot show mimetype Impossibile mostrare il mimetype File does not exist Il file non esiste Request blocked Richiesta bloccata Request cancelled Richiesta annullata QWebPage Redirection limit reached Raggiunto limite redirezioni Bad HTTP request Richiesta HTTP non valida Bottom Fondo Delete to the end of the word Elimina fino alla fine della parola Delete to the start of the word Elimina fino all'inizio della parola Insert a new line Inserisce una nuova linea Insert a new paragraph Inserisce un nuovo paragrafo JavaScript Alert - %1 Avviso JavaScript - %1 JavaScript Confirm - %1 Conferma JavaScript - %1 JavaScript Prompt - %1 Richiesta JavaScript - %1 Left edge Bordo sinistro Move the cursor to the end of the block Sposta il cursore alla fine del blocco Move the cursor to the end of the document Sposta il cursore alla fine del documento Move the cursor to the end of the line Sposta il cursore alla fine della linea JavaScript Problem - %1 Problema JavaScript - %1 The script on this page appears to have a problem. Do you want to stop the script? Lo script in questa pagina sembra avere problemi. Interrompere lo script? Move the cursor to the next character Sposta il cursore al carattere successivo Move the cursor to the next line Sposta il cursore alla linea successiva Paste and Match Style Remove formatting Strikethrough Subscript Superscript Insert Bulleted List Insert Numbered List Indent Outdent Center Justify Align Left Align Right Move the cursor to the next word Sposta il cursore alla parola successiva Move the cursor to the previous character Sposta il cursore al carattere precedente Move the cursor to the previous line Sposta il cursore alla linea precedente Move the cursor to the previous word Sposta il cursore alla parola precedente Move the cursor to the start of the block Sposta il cursore all'inizio del blocco Move the cursor to the start of the document Sposta il cursore all'inizio del documento Move the cursor to the start of the line Sposta il cursore all'inizio della linea Page down Una pagina in basso Page left Una pagina a sinistra Page right Una pagina a destra Page up Una pagina in alto Right edge Bordo destro Scroll down Scorri in basso Scroll here Scorri qui Scroll left Scorri a sinistra Scroll right Scorri a destra Scroll up Scorri in alto Select all Seleziona tutto Select to the end of the block Seleziona fino alla fine del blocco Select to the end of the document Seleziona fino alla fine del documento Select to the end of the line Seleziona fino alla fine della linea Select to the next character Seleziona fino al carattere successivo Select to the next line Seleziona fino alla linea successiva Select to the next word Seleziona fino alla parola successiva Select to the previous character Seleziona fino al carattere precedente Select to the previous line Seleziona fino alla linea precedente Select to the previous word Seleziona fino alla parola precedente Select to the start of the block Seleziona fino all'inizio del blocco Select to the start of the document Seleziona fino all'inizio del documento Select to the start of the line Seleziona fino all'inizio della linea Top Cima Web Inspector - %2 Web Inspector - %2 %n file(s) number of chosen file %n file %n file Submit default label for Submit buttons in forms on web pages Invia Submit Submit (input element) alt text for <input> elements with no alt, title, or value Invia Reset default label for Reset buttons in forms on web pages Reimposta This is a searchable index. Enter search keywords: text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index' Questo è un indice per le ricerche. Inserire le parole per la ricerca: Choose File title for file button used in HTML forms Sfoglia No file selected text to display in file button used in HTML forms when no file is selected Nessun file selezionato Open in New Window Open in New Window context menu item Apri in una nuova finestra Save Link... Download Linked File context menu item Salva l'oggetto collegato… Copy Link Copy Link context menu item Copia l'indirizzo del collegamento Open Image Open Image in New Window context menu item Visualizza immagine Save Image Download Image context menu item Salva l'immagine Copy Image Copy Link context menu item Copia l'immagine Open Frame Open Frame in New Window context menu item Apri Frame Copy Copy context menu item Copia Go Back Back context menu item Indietro Go Forward Forward context menu item Avanti Stop Stop context menu item Stop Reload Reload context menu item Aggiorna Cut Cut context menu item Taglia Paste Paste context menu item Incolla No Guesses Found No Guesses Found context menu item Nessun indizio trovato Ignore Ignore Spelling context menu item Ignora Add To Dictionary Learn Spelling context menu item Aggiungi al dizionario Search The Web Search The Web context menu item Cerca nel Web Look Up In Dictionary Look Up in Dictionary context menu item Cerca nel dizionario Open Link Open Link context menu item Apri collegamento Ignore Ignore Grammar context menu item Ignora Spelling Spelling and Grammar context sub-menu item Ortografia Show Spelling and Grammar menu item title Mostra ortografia e grammatica Hide Spelling and Grammar menu item title Nascondi ortografia e grammatica Check Spelling Check spelling context menu item Controllo ortografico Check Spelling While Typing Check spelling while typing context menu item Controllo ortografico durante la digitazione Check Grammar With Spelling Check grammar with spelling context menu item Controlla la grammatica con l'ortografia Fonts Font context sub-menu item Caratteri Bold Bold context menu item Grassetto Italic Italic context menu item Italico Underline Underline context menu item Sottolineato Outline Outline context menu item Allinea Direction Writing direction context sub-menu item Direzione Text Direction Text direction context sub-menu item Direzione del testo Default Default writing direction context menu item Predefinito Left to Right Left to Right context menu item Right to Left Right to Left context menu item Inspect Inspect Element context menu item Ispeziona No recent searches Label for only item in menu that appears when clicking on the search field image, when no searches have been performed Nessuna ricerca recente Recent searches label for first item in the menu that appears when clicking on the search field image, used as embedded menu title Ricerche recenti Clear recent searches menu item in Recent Searches menu that empties menu's contents Elimina ricerche recenti Missing Plug-in Label text to be used when a plug-in is missing Unknown Unknown filesize FTP directory listing item Sconosciuto %1 (%2x%3 pixels) Title string for images %1 (%2x%3 pixel) Loading... Media controller status message when the media is loading Live Broadcast Media controller status message when watching a live broadcast Audio Element Media controller element Video Element Media controller element Mute Button Media controller element Unmute Button Media controller element Play Button Media controller element Pause Button Media controller element Slider Media controller element Slider Thumb Media controller element Rewind Button Media controller element Return to Real-time Button Media controller element Elapsed Time Media controller element Remaining Time Media controller element Status Display Media controller element Fullscreen Button Media controller element Seek Forward Button Media controller element Seek Back Button Media controller element Audio element playback controls and status display Media controller element Video element playback controls and status display Media controller element Mute audio tracks Media controller element Unmute audio tracks Media controller element Begin playback Media controller element Pause playback Media controller element Movie time scrubber Media controller element Movie time scrubber thumb Media controller element Rewind movie Media controller element Return streaming movie to real-time Media controller element Current movie time Media controller element Remaining movie time Media controller element Current movie status Media controller element Play movie in full-screen mode Media controller element Seek quickly back Media controller element Seek quickly forward Media controller element Indefinite time Media time description %1 days %2 hours %3 minutes %4 seconds Media time description %1 hours %2 minutes %3 seconds Media time description %1 minutes %2 seconds Media time description %1 seconds Media time description QWhatsThisAction What's This? Guida rapida QWidget * * QWizard &Finish &Finisci &Help &Guida &Next &Successivo &Next > &Successivo > < &Back < &Indietro Cancel Annulla Commit Conferma Continue Continua Done Fatto Go Back Indietro Help Guida QWorkspace %1 - [%2] %1 - [%2] &Close &Chiudi &Move &Sposta &Restore &Ripristina &Size Ri&dimensiona &Unshade Sro&tola Close Chiudi Ma&ximize Ingra&ndisci Mi&nimize R&iduci a icona Minimize Riduce a icona Restore Down Ripristina in basso Sh&ade &Arrotola Stay on &Top Sempre in &primo piano QXml encoding declaration or standalone declaration expected while reading the XML declaration error in the text declaration of an external entity error occurred while parsing comment error occurred while parsing content error occurred while parsing document type definition error occurred while parsing element error occurred while parsing reference error triggered by consumer external parsed general entity reference not allowed in DTD external parsed general entity reference not allowed in attribute value internal general entity reference not allowed in DTD invalid name for processing instruction letter is expected more than one document type definition no error occurred recursive entities standalone declaration expected while reading the XML declaration tag mismatch unexpected character unexpected end of file unparsed entity reference in wrong context version expected while reading the XML declaration wrong value for standalone declaration QXmlPatternistCLI Warning in %1, at line %2, column %3: %4 Warning in %1: %2 Unknown location Error %1 in %2, at line %3, column %4: %5 Error %1 in %2: %3 QXmlStream %1 is an invalid PUBLIC identifier. %1 is an invalid encoding name. %1 is an invalid processing instruction name. , but got ' Attribute redefined. Encoding %1 is unsupported Encountered incorrectly encoded content. Entity '%1' not declared. Expected Expected character data. Extra content at end of document. Illegal namespace declaration. Invalid XML character. Invalid XML name. Invalid XML version string. Invalid attribute in XML declaration. Invalid character reference. Invalid document. Invalid entity value. Invalid processing instruction name. NDATA in parameter entity declaration. Namespace prefix '%1' not declared Opening and ending tag mismatch. Premature end of document. Recursive entity detected. Reference to external entity '%1' in attribute value. Reference to unparsed entity '%1'. Sequence ']]>' not allowed in content. Standalone accepts only yes or no. Start tag expected. The standalone pseudo attribute must appear after the encoding. Unexpected ' Unexpected character '%1' in public id literal. Unsupported XML version. XML declaration not at start of document. QtXmlPatterns %1 and %2 match the start and end of a line. %1 cannot be retrieved %1 contains octets which are disallowed in the requested encoding %2. %1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works. %1 is an invalid %2 %1 is an invalid flag for regular expressions. Valid flags are: %1 is an invalid namespace URI. %1 is an invalid regular expression pattern: %2 %1 is an invalid template mode name. %1 is an unknown schema type. %1 is an unsupported encoding. %1 is not a valid XML 1.0 character. %1 is not a valid name for a processing-instruction. %1 is not a valid numeric literal. The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, %2 is invalid. %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3. %1 is not a valid value of type %2. %1 is not a whole number of minutes. %1 is not an atomic type. Casting is only possible to atomic types. %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported. %1 is not valid as a value of type %2. %1 matches newline characters %1 must be followed by %2 or %3, not at the end of the replacement string. %1 requires at least %n argument(s). %2 is therefore invalid. %1 takes at most %n argument(s). %2 is therefore invalid. %1 was called. A comment cannot contain %1 A comment cannot end with a %1. A default namespace declaration must occur before function, variable, and option declarations. An attribute with name %1 has already appeared on this element. A direct element constructor is not well-formed. %1 is ended with %2. A function already exists with the signature %1. A library module cannot be evaluated directly. It must be imported from a main module. A parameter in a function cannot be declared to be a tunnel. A positional predicate must evaluate to a single numeric value. A stylesheet function must have a prefixed name. A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type. A value of type %1 cannot have an Effective Boolean Value. A value of type %1 must contain an even number of digits. The value %2 does not. A zone offset must be in the range %1..%2 inclusive. %3 is out of range. Ambiguous rule match. An attribute by name %1 has already been created. An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place. At least one %1 element must appear as child of %2. At least one %1-element must occur before %2. At least one %1-element must occur inside %2. At least one component must be present. At least one mode must be specified in the %1-attribute on element %2. At least one time component must appear after the %1-delimiter. Attribute %1 and %2 are mutually exclusive. Attribute %1 can't be serialized because it appears at the top level. Attribute %1 cannot have the value %2. Day %1 is invalid for month %2. Day %1 is outside the range %2..%3. Dividing a value of type %1 by %2 (not-a-number) is not allowed. Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed. Division (%1) by zero (%2) is undefined. Each name of a template parameter must be unique; %1 is duplicated. Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values. Element %1 can't be serialized because it appears outside the document element. Element %1 cannot have a sequence constructor. Element %1 cannot have children. Element %1 is not allowed at this location. Element %1 must come last. Element %1 must have at least one of the attributes %2 or %3. Element %1 must have either a %2-attribute or a sequence constructor. If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same. If element %1 has no attribute %2, it cannot have attribute %3 or %4. If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified. In a namespace constructor, the value for a namespace cannot be an empty string. In a simplified stylesheet module, attribute %1 must be present. In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can. In an XSL-T pattern, function %1 cannot have a third argument. In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching. In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching. In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching. In the replacement string, %1 can only be used to escape itself or %2, not %3 In the replacement string, %1 must be followed by at least one digit when not escaped. Integer division (%1) by zero (%2) is undefined. It is not possible to bind to the prefix %1 It is not possible to redeclare prefix %1. It will not be possible to retrieve %1. It's not possible to add attributes after any other kind of node. Matches are case insensitive Module imports must occur before function, variable, and option declarations. Modulus division (%1) by zero (%2) is undefined. Month %1 is outside the range %2..%3. Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed. Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared). Namespace declarations must occur before function, variable, and option declarations. Network timeout. No external functions are supported. All supported functions can be used directly, without first declaring them as external No function with signature %1 is available No namespace binding exists for the prefix %1 No namespace binding exists for the prefix %1 in %2 No template by name %1 exists. None of the pragma expressions are supported. Therefore, a fallback expression must be present Only one %1 declaration can occur in the query prolog. Only one %1-element can appear. Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported. Only the prefix %1 can be bound to %2 and vice versa. Operator %1 cannot be used on atomic values of type %2 and %3. Operator %1 cannot be used on type %2. Overflow: Can't represent date %1. Overflow: Date can't be represented. Parse error: %1 Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared). Prefix %1 is already declared in the prolog. Promoting %1 to %2 may cause loss of precision. Required cardinality is %1; got cardinality %2. Required type is %1, but %2 was found. Running an XSL-T 1.0 stylesheet with a 2.0 processor. Text nodes are not allowed at this location. The %1-axis is unsupported in XQuery The Schema Import feature is not supported, and therefore %1 declarations cannot occur. The Schema Validation Feature is not supported. Hence, %1-expressions may not be used. The URI cannot have a fragment The attribute %1 can only appear on the first %2 element. The attribute %1 cannot appear on %2, when it is a child of %3. The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character. The data of a processing instruction cannot contain the string %1 The default collection is undefined The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2. The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration. The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. The focus is undefined. The initialization of variable %1 depends on itself The item %1 did not match the required type %2. The keyword %1 cannot occur with any other mode name. The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two. The module import feature is not supported The name %1 does not refer to any schema type. The name for a computed attribute cannot have the namespace URI %1 with the local name %2. The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide. The name of an extension expression must be in a namespace. The name of an option must have a prefix. There is no default namespace for options. W3C XML Schema identity constraint selector W3C XML Schema identity constraint field A construct was encountered which is disallowed in the current language(%1). A template with name %1 has already been declared. No variable with name %1 exists The value of attribute %1 must be of type %2, which %3 isn't. The prefix %1 cannot be bound. By default, it is already bound to the namespace %2. A variable with name %1 has already been declared. No value is available for the external variable with name %1. The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases. An argument with name %1 has already been declared. Every argument name must be unique. No function with name %1 is available. The namespace URI cannot be the empty string when binding to a prefix, %1. The namespace URI in the name for a computed attribute cannot be %1. The namespace URI must be a constant and cannot use enclosed expressions. The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this) The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2 The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization). The parameter %1 is passed, but no corresponding %2 exists. The parameter %1 is required, but no corresponding %2 is supplied. The prefix %1 cannot be bound. The prefix must be a valid %1, which %2 is not. The root node of the second argument to function %1 must be a document node. %2 is not a document node. The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. The target namespace of a %1 cannot be empty. The value for attribute %1 on element %2 must either be %3 or %4, not %5. The value of the XSL-T version attribute must be a value of type %1, which %2 isn't. The variable %1 is unused This processor is not Schema-aware and therefore %1 cannot be used. Time %1:%2:%3.%4 is invalid. Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; Top level stylesheet elements must be in a non-null namespace, which %1 isn't. Two namespace declaration attributes have the same name: %1. Type error in cast, expected %1, received %2. Unknown XSL-T attribute %1. Value %1 of type %2 exceeds maximum (%3). Value %1 of type %2 is below minimum (%3). Version %1 is not supported. The supported XQuery version is 1.0. When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor. When attribute %1 is present on %2, a sequence constructor cannot be used. When casting to %1 from %2, the source value cannot be %3. When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed. When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal. Whitespace characters are removed, except when they appear in character classes Year %1 is invalid because it begins with %2. empty exactly one one or more zero or more zero or one Empty particle cannot be derived from non-empty particle. Derived particle is missing element %1. Derived element %1 is missing value constraint as defined in base particle. Derived element %1 has weaker value constraint than base particle. Fixed value constraint of element %1 differs from value constraint in base particle. Derived element %1 cannot be nillable as base element is not nillable. Block constraints of derived element %1 must not be more weaker than in the base element. Simple type of derived element %1 cannot be validly derived from base element. Complex type of derived element %1 cannot be validly derived from base element. Element %1 is missing in derived particle. Element %1 does not match namespace constraint of wildcard in base particle. Wildcard in derived particle is not a valid subset of wildcard in base particle. processContent of wildcard in derived particle is weaker than wildcard in base particle. Derived particle allows content that is not allowed in the base particle. %1 has inheritance loop in its base type %2. Circular inheritance of base type %1. Circular inheritance of union %1. %1 is not allowed to derive from %2 by restriction as the latter defines it as final. %1 is not allowed to derive from %2 by extension as the latter defines it as final. Base type of simple type %1 cannot be complex type %2. Simple type %1 cannot have direct base type %2. Simple type %1 is not allowed to have base type %2. Simple type %1 can only have simple atomic type as base type. Simple type %1 cannot derive from %2 as the latter defines restriction as final. Variety of item type of %1 must be either atomic or union. Variety of member types of %1 must be atomic. %1 is not allowed to derive from %2 by list as the latter defines it as final. Simple type %1 is only allowed to have %2 facet. Base type of simple type %1 must have variety of type list. Base type of simple type %1 has defined derivation by restriction as final. Item type of base type does not match item type of %1. Simple type %1 contains not allowed facet type %2. %1 is not allowed to derive from %2 by union as the latter defines it as final. %1 is not allowed to have any facets. Base type %1 of simple type %2 must have variety of union. Base type %1 of simple type %2 is not allowed to have restriction in %3 attribute. Member type %1 cannot be derived from member type %2 of %3's base type %4. Derivation method of %1 must be extension because the base type %2 is a simple type. Complex type %1 has duplicated element %2 in its content model. Complex type %1 has non-deterministic content. Attributes of complex type %1 are not a valid extension of the attributes of base type %2: %3. Content model of complex type %1 is not a valid extension of content model of %2. Complex type %1 must have simple content. Complex type %1 must have the same simple type as its base class %2. Complex type %1 cannot be derived from base type %2%3. Attributes of complex type %1 are not a valid restriction from the attributes of base type %2: %3. Complex type %1 with simple content cannot be derived from complex base type %2. Item type of simple type %1 cannot be a complex type. Member type of simple type %1 cannot be a complex type. %1 is not allowed to have a member type with the same name as itself. %1 facet collides with %2 facet. %1 facet must have the same value as %2 facet of base type. %1 facet must be equal or greater than %2 facet of base type. %1 facet must be less than or equal to %2 facet of base type. %1 facet contains invalid regular expression Unknown notation %1 used in %2 facet. %1 facet contains invalid value %2: %3. %1 facet cannot be %2 or %3 if %4 facet of base type is %5. %1 facet cannot be %2 if %3 facet of base type is %4. %1 facet must be less than or equal to %2 facet. %1 facet must be less than %2 facet of base type. %1 facet and %2 facet cannot appear together. %1 facet must be greater than %2 facet of base type. %1 facet must be less than %2 facet. %1 facet must be greater than or equal to %2 facet of base type. Simple type contains not allowed facet %1. %1, %2, %3, %4, %5 and %6 facets are not allowed when derived by list. Only %1 and %2 facets are allowed when derived by union. %1 contains %2 facet with invalid data: %3. Attribute group %1 contains attribute %2 twice. Attribute group %1 contains two different attributes that both have types derived from %2. Attribute group %1 contains attribute %2 that has value constraint but type that inherits from %3. Complex type %1 contains attribute %2 twice. Complex type %1 contains two different attributes that both have types derived from %2. Complex type %1 contains attribute %2 that has value constraint but type that inherits from %3. Element %1 is not allowed to have a value constraint if its base type is complex. Element %1 is not allowed to have a value constraint if its type is derived from %2. Value constraint of element %1 is not of elements type: %2. Element %1 is not allowed to have substitution group affiliation as it is no global element. Type of element %1 cannot be derived from type of substitution group affiliation. Value constraint of attribute %1 is not of attributes type: %2. Attribute %1 has value constraint but has type derived from %2. %1 attribute in derived complex type must be %2 like in base type. Attribute %1 in derived complex type must have %2 value constraint like in base type. Attribute %1 in derived complex type must have the same %2 value constraint like in base type. Attribute %1 in derived complex type must have %2 value constraint. processContent of base wildcard must be weaker than derived wildcard. Element %1 exists twice with different types. Particle contains non-deterministic wildcards. Base attribute %1 is required but derived attribute is not. Type of derived attribute %1 cannot be validly derived from type of base attribute. Value constraint of derived attribute %1 does not match value constraint of base attribute. Derived attribute %1 does not exist in the base definition. Derived attribute %1 does not match the wildcard in the base definition. Base attribute %1 is required but missing in derived definition. Derived definition contains an %1 element that does not exists in the base definition Derived wildcard is not a subset of the base wildcard. %1 of derived wildcard is not a valid restriction of %2 of base wildcard Attribute %1 from base type is missing in derived type. Type of derived attribute %1 differs from type of base attribute. Base definition contains an %1 element that is missing in the derived definition Can not process unknown element %1, expected elements are: %2. Element %1 is not allowed in this scope, possible elements are: %2. Child element is missing in that scope, possible child elements are: %1. Document is not a XML schema. %1 attribute of %2 element contains invalid content: {%3} is not a value of type %4. %1 attribute of %2 element contains invalid content: {%3}. Target namespace %1 of included schema is different from the target namespace %2 as defined by the including schema. Target namespace %1 of imported schema is different from the target namespace %2 as defined by the importing schema. %1 element is not allowed to have the same %2 attribute value as the target namespace %3. %1 element without %2 attribute is not allowed inside schema without target namespace. %1 element is not allowed inside %2 element if %3 attribute is present. %1 element has neither %2 attribute nor %3 child element. %1 element with %2 child element must not have a %3 attribute. %1 attribute of %2 element must be %3 or %4. %1 attribute of %2 element must have a value of %3. %1 attribute of %2 element must have a value of %3 or %4. %1 element must not have %2 and %3 attribute together. Content of %1 attribute of %2 element must not be from namespace %3. %1 attribute of %2 element must not be %3. %1 attribute of %2 element must have the value %3 because the %4 attribute is set. Specifying use='prohibited' inside an attribute group has no effect. %1 element must have either %2 or %3 attribute. %1 element must have either %2 attribute or %3 or %4 as child element. %1 element requires either %2 or %3 attribute. Text or entity references not allowed inside %1 element %1 attribute of %2 element must contain %3, %4 or a list of URIs. %1 element is not allowed in this context. %1 attribute of %2 element has larger value than %3 attribute. Prefix of qualified name %1 is not defined. %1 attribute of %2 element must either contain %3 or the other values. Component with ID %1 has been defined previously. Element %1 already defined. Attribute %1 already defined. Type %1 already defined. Attribute group %1 already defined. Element group %1 already defined. Notation %1 already defined. Identity constraint %1 already defined. Duplicated facets in simple type %1. %1 references unknown %2 or %3 element %4. %1 references identity constraint %2 that is no %3 or %4 element. %1 has a different number of fields from the identity constraint %2 that it references. Base type %1 of %2 element cannot be resolved. Item type %1 of %2 element cannot be resolved. Member type %1 of %2 element cannot be resolved. Type %1 of %2 element cannot be resolved. Base type %1 of complex type cannot be resolved. %1 cannot have complex base type that has a %2. Content model of complex type %1 contains %2 element so it cannot be derived by extension from a non-empty type. Complex type %1 cannot be derived by extension from %2 as the latter contains %3 element in its content model. Type of %1 element must be a simple type, %2 is not. Substitution group %1 of %2 element cannot be resolved. Substitution group %1 has circular definition. Duplicated element names %1 in %2 element. Reference %1 of %2 element cannot be resolved. Circular group reference for %1. %1 element is not allowed in this scope %1 element cannot have %2 attribute with value other than %3. %1 element cannot have %2 attribute with value other than %3 or %4. %1 or %2 attribute of reference %3 does not match with the attribute declaration %4. Attribute group %1 has circular reference. %1 attribute in %2 must have %3 use like in base type %4. Attribute wildcard of %1 is not a valid restriction of attribute wildcard of base type %2. %1 has attribute wildcard but its base type %2 has not. Union of attribute wildcard of type %1 and attribute wildcard of its base type %2 is not expressible. Enumeration facet contains invalid content: {%1} is not a value of type %2. Namespace prefix of qualified name %1 is not defined. %1 element %2 is not a valid restriction of the %3 element it redefines: %4. %1 is not valid according to %2. String content does not match the length facet. String content does not match the minLength facet. String content does not match the maxLength facet. String content does not match pattern facet. String content is not listed in the enumeration facet. Signed integer content does not match the maxInclusive facet. Signed integer content does not match the maxExclusive facet. Signed integer content does not match the minInclusive facet. Signed integer content does not match the minExclusive facet. Signed integer content is not listed in the enumeration facet. Signed integer content does not match pattern facet. Signed integer content does not match in the totalDigits facet. Unsigned integer content does not match the maxInclusive facet. Unsigned integer content does not match the maxExclusive facet. Unsigned integer content does not match the minInclusive facet. Unsigned integer content does not match the minExclusive facet. Unsigned integer content is not listed in the enumeration facet. Unsigned integer content does not match pattern facet. Unsigned integer content does not match in the totalDigits facet. Double content does not match the maxInclusive facet. Double content does not match the maxExclusive facet. Double content does not match the minInclusive facet. Double content does not match the minExclusive facet. Double content is not listed in the enumeration facet. Double content does not match pattern facet. Decimal content does not match in the fractionDigits facet. Decimal content does not match in the totalDigits facet. Date time content does not match the maxInclusive facet. Date time content does not match the maxExclusive facet. Date time content does not match the minInclusive facet. Date time content does not match the minExclusive facet. Date time content is not listed in the enumeration facet. Date time content does not match pattern facet. Duration content does not match the maxInclusive facet. Duration content does not match the maxExclusive facet. Duration content does not match the minInclusive facet. Duration content does not match the minExclusive facet. Duration content is not listed in the enumeration facet. Duration content does not match pattern facet. Boolean content does not match pattern facet. Binary content does not match the length facet. Binary content does not match the minLength facet. Binary content does not match the maxLength facet. Binary content is not listed in the enumeration facet. Invalid QName content: %1. QName content is not listed in the enumeration facet. QName content does not match pattern facet. Notation content is not listed in the enumeration facet. List content does not match length facet. List content does not match minLength facet. List content does not match maxLength facet. List content is not listed in the enumeration facet. List content does not match pattern facet. Union content is not listed in the enumeration facet. Union content does not match pattern facet. Data of type %1 are not allowed to be empty. Element %1 is missing child element. There is one IDREF value with no corresponding ID: %1. Loaded schema file is invalid. %1 contains invalid data. xsi:schemaLocation namespace %1 has already appeared earlier in the instance document. xsi:noNamespaceSchemaLocation cannot appear after the first no-namespace element or attribute. No schema defined for validation. No definition for element %1 available. Specified type %1 is not known to the schema. Element %1 is not defined in this scope. Declaration for element %1 does not exist. Element %1 contains invalid content. Element %1 is declared as abstract. Element %1 is not nillable. Attribute %1 contains invalid data: %2 Element contains content although it is nillable. Fixed value constraint not allowed if element is nillable. Specified type %1 is not validly substitutable with element type %2. Complex type %1 is not allowed to be abstract. Element %1 contains not allowed attributes. Element %1 contains not allowed child element. Content of element %1 does not match its type definition: %2. Content of element %1 does not match defined value constraint. Element %1 contains not allowed child content. Element %1 contains not allowed text content. Element %1 cannot contain other elements, as it has a fixed content. Element %1 is missing required attribute %2. Attribute %1 does not match the attribute wildcard. Declaration for attribute %1 does not exist. Element %1 contains two attributes of type %2. Attribute %1 contains invalid content. Element %1 contains unknown attribute %2. Content of attribute %1 does not match its type definition: %2. Content of attribute %1 does not match defined value constraint. Non-unique value found for constraint %1. Key constraint %1 contains absent fields. Key constraint %1 contains references nillable element %2. No referenced value found for key reference %1. More than one value found for field %1. Field %1 has no simple type. ID value '%1' is not unique. '%1' attribute contains invalid QName content: %2. qviaggiatreno-2013.7.3/src/config.cpp0000664000175000017500000001716112215773056017345 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2010-2012 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "config.h" Configurazione::Configurazione() : m_settings(QSettings::IniFormat, QSettings::UserScope, "fra74", "QViaggiaTreno") { //inizializzazione i valori di default m_def_intervalloControlloVT = 5; // minuti m_def_intervalloQueryVT = 0.1; // secondi; m_def_timeoutControlloVT = 30; //secondi //impostazioni del proxy m_def_usareProxy = false; m_def_autenticazioneProxyRichiesta = false; m_def_usareProxySistema = false; m_def_hostProxy = QString::null; m_def_portaProxy = 65535; m_def_nomeUtenteProxy = QString::null; m_def_passwordProxy = QString::null; } int Configurazione::intervalloControlloVT() { int valore; m_settings.beginGroup("ViaggiaTreno"); valore = m_settings.value("Frequenza controllo ViaggiaTreno", m_def_intervalloControlloVT).toInt(); m_settings.endGroup(); return valore; } void Configurazione::impostaIntervalloControlloVT(int intervallo) { m_settings.beginGroup("ViaggiaTreno"); //salva le impostazioni solo se sono diverse dal valore di default if (intervallo != m_def_intervalloControlloVT) m_settings.setValue("Frequenza controllo ViaggiaTreno", intervallo); else m_settings.remove("Frequenza controllo ViaggiaTreno"); m_settings.endGroup(); } int Configurazione::timeoutControlloVT() { int valore; m_settings.beginGroup("ViaggiaTreno"); valore = m_settings.value("Timeout controllo ViaggiaTreno", m_def_timeoutControlloVT).toInt(); m_settings.endGroup(); return valore; } void Configurazione::impostaTimeoutControllVT(int timeout) { m_settings.beginGroup("ViaggiaTreno"); //salva le impostazioni solo se sono diverse dal valore di default if (timeout != m_def_timeoutControlloVT) m_settings.setValue("Timeout controllo ViaggiaTreno", timeout); else m_settings.remove("Timeout controllo ViaggiaTreno"); m_settings.endGroup(); } double Configurazione::intervalloQueryVT() { double valore; m_settings.beginGroup("ViaggiaTreno"); valore = m_settings.value("Frequenza query ViaggiaTreno", m_def_intervalloQueryVT).toDouble(); m_settings.endGroup(); return valore; } void Configurazione::impostaIntervalloQueryVT(double intervallo) { m_settings.beginGroup("ViaggiaTreno"); //salva le impostazioni solo se sono diverse dal valore di default if (intervallo != m_def_intervalloQueryVT) m_settings.setValue("Frequenza query ViaggiaTreno", intervallo); else m_settings.remove("Frequenza query ViaggiaTreno"); m_settings.endGroup(); } bool Configurazione::proxyUtilizzato() { bool valore; m_settings.beginGroup("Proxy"); valore = m_settings.value("Utilizzare proxy", m_def_usareProxy).toBool(); m_settings.endGroup(); return valore; } void Configurazione::impostaUtilizzoProxy(bool usareProxy) { m_settings.beginGroup("Proxy"); if (usareProxy != m_def_usareProxy) m_settings.setValue("Utilizzare proxy", usareProxy); else m_settings.remove("Utilizzare proxy"); m_settings.endGroup(); } bool Configurazione::proxyRichiedeAutenticazione() { bool valore; m_settings.beginGroup("Proxy"); valore = m_settings.value("Proxy richiede autenticazione", m_def_autenticazioneProxyRichiesta).toBool(); m_settings.endGroup(); return valore; } bool Configurazione::proxyDiSistemaUtilizzato() { bool valore; m_settings.beginGroup("Proxy"); valore = m_settings.value("Utilizzare proxy di sistema", m_def_usareProxySistema).toBool(); m_settings.endGroup(); return valore; } void Configurazione::impostaUtilizzoProxyDiSistema(bool usareProxySistema) { m_settings.beginGroup("Proxy"); if (usareProxySistema != m_def_usareProxySistema) m_settings.setValue("Utilizzare proxy di sistema", usareProxySistema); else m_settings.remove("Utilizzare proxy di sistema"); m_settings.endGroup(); } void Configurazione::impostaRichiestaAutenticazioneProxy(bool autenticazioneProxy) { m_settings.beginGroup("Proxy"); if (autenticazioneProxy != m_def_autenticazioneProxyRichiesta) m_settings.setValue("Proxy richiede autenticazione", autenticazioneProxy); else m_settings.remove("Proxy richiede autenticazione"); m_settings.endGroup(); } QString Configurazione::hostProxy() { QString valore; m_settings.beginGroup("Proxy"); valore = m_settings.value("Host proxy", m_def_hostProxy).toString(); m_settings.endGroup(); return valore; } void Configurazione::impostaHostProxy(const QString &host) { m_settings.beginGroup("Proxy"); if (host != m_def_hostProxy) m_settings.setValue("Host proxy", host); else m_settings.remove("Host proxy"); m_settings.endGroup(); } quint16 Configurazione::portaProxy() { quint16 valore; m_settings.beginGroup("Proxy"); valore = m_settings.value("Porta proxy", m_def_portaProxy).toUInt(); m_settings.endGroup(); return valore; } void Configurazione::impostaPortaProxy(quint16 porta) { m_settings.beginGroup("Proxy"); if (porta != m_def_portaProxy) m_settings.setValue("Porta proxy", porta); else m_settings.remove("Porta proxy"); m_settings.endGroup(); } QString Configurazione::nomeUtenteProxy() { QString valore; m_settings.beginGroup("Proxy"); valore = m_settings.value("Nome utente proxy", m_def_nomeUtenteProxy).toString(); m_settings.endGroup(); return valore; } void Configurazione::impostaNomeUtenteProxy(const QString &nome) { m_settings.beginGroup("Proxy"); if (nome != m_def_nomeUtenteProxy) m_settings.setValue("Nome utente proxy", nome); else m_settings.remove("Nome utente proxy"); m_settings.endGroup(); } QString Configurazione::passwordProxy() { QString valore; m_settings.beginGroup("Proxy"); valore = m_settings.value("Password proxy", m_def_passwordProxy).toString(); m_settings.endGroup(); return valore; } void Configurazione::impostaPasswordProxy(const QString &password) { m_settings.beginGroup("Proxy"); if (password != m_def_passwordProxy) m_settings.setValue("Password proxy", password); else m_settings.remove("Password proxy"); m_settings.endGroup(); } qviaggiatreno-2013.7.3/src/utils.h0000664000175000017500000000323412215773217016700 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2008-2011 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef UTILS_H #define UTILS_H #include #include //funzioni utili per il debug QString dumpNodo(QDomNode nodo); void debugNodo(QDomNode nodo); void debugStringa(QString stringa); #endif // UTILS_H qviaggiatreno-2013.7.3/src/schedastazione_widget.cpp0000664000175000017500000002417012215773217022444 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2008-2010 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "schedastazione.h" //questo widget si occupa di presentare all'utente una lista delle stazioni proposte da viaggiatreno per //risolvere l'ambiguità del nome inserito dall'utente WidgetDisambiguaNome::WidgetDisambiguaNome(SchedaStazione* parent, QMap listaCodiciStazioni) : QWidget(parent) { //imposta il layout del dialogo QVBoxLayout *vbox = new QVBoxLayout; setLayout(vbox); QLabel *messaggio = new QLabel(this); messaggio->setWordWrap(true); messaggio->setText(QString::fromUtf8("Il nome della stazione ('%1') è ambiguo. Per risolvere" " questa ambiguità ViaggiaTreno ha proposto una lista di possibili stazioni.
Scegliere dalla lista sottostante" " la stazione desiderata oppure fare clic sul pulsante di chiusura se desiderate semplicemente chiudere questa scheda").arg(parent->nomeStazione())); vbox->addWidget(messaggio); QHBoxLayout *hbox = new QHBoxLayout; listaNomi = new QListWidget(this); QPushButton *btnSceltaStazione = new QPushButton(QString::fromUtf8("Scelta stazione"), this); hbox->addWidget(listaNomi); hbox->addWidget(btnSceltaStazione, 0, Qt::AlignCenter); vbox->addLayout(hbox); //scorre la lista dei codici stazione //per ogni elemento crea una apposita voce nella listbox QMapIterator it(listaCodiciStazioni); while (it.hasNext()) { it.next(); QListWidgetItem *item = new QListWidgetItem(it.key()); item->setData(Qt::UserRole, it.value()); listaNomi->addItem(item); } listaNomi->setSelectionMode(QAbstractItemView::SingleSelection); listaNomi->setAlternatingRowColors(true); listaNomi->setCurrentRow(0); //connessioni connect(btnSceltaStazione, SIGNAL(clicked()), this, SLOT(sceltaNomeStazione())); connect(this, SIGNAL(nomeDisambiguato(const QString&)), parent, SLOT(cambiaCodiceStazione(const QString&))); } //slot //è stato scelto il nome della stazione dalla lista proposta, viene comunicato alla scheda con un segnale void WidgetDisambiguaNome::sceltaNomeStazione() { QListWidgetItem *item = listaNomi->currentItem(); emit nomeDisambiguato(item->data(Qt::UserRole).toString()); } WidgetStazione::WidgetStazione(QWidget *parent, QAbstractItemModel *modelloArrivi, QAbstractItemModel* modelloPartenze) : QWidget(parent) { setupUi(this); //imposta font con dimensioni del 50% maggiori di quella standard e in grassetto //non è possibile farlo direttamente in designer QFont font = labelTitolo->font(); font.setBold(true); font.setPointSize(font.pointSize()*1.5); labelTitolo->setFont(font); tabellaArrivi->setModel(modelloArrivi); tabellaPartenze->setModel(modelloPartenze); tabellaArrivi->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); tabellaPartenze->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); //attiva il tracking dei movimenti del mouse tabellaArrivi->setMouseTracking(true); tabellaPartenze->setMouseTracking(true); tabellaArrivi->horizontalHeader()->setMouseTracking(true); tabellaPartenze->horizontalHeader()->setMouseTracking(true); connect (tabellaArrivi, SIGNAL(entered(QModelIndex)), this, SLOT(mouseEntered(const QModelIndex&))); connect (tabellaPartenze, SIGNAL(entered(QModelIndex)), this, SLOT(mouseEntered(const QModelIndex&))); connect (tabellaArrivi, SIGNAL(activated(QModelIndex)), parent, SLOT(itemAttivato(const QModelIndex&))); connect(tabellaPartenze, SIGNAL(activated(QModelIndex)), parent, SLOT(itemAttivato(const QModelIndex&))); connect(comboBoxTipoFiltroArrivi, SIGNAL(currentIndexChanged(int)), parent, SLOT(tipoFiltroArriviSelezionato(int))); connect(comboBoxTipoFiltroPartenze, SIGNAL(currentIndexChanged(int)), parent, SLOT(tipoFiltroPartenzeSelezionato(int))); connect(comboBoxFiltroArrivi, SIGNAL(activated(QString)), parent, SLOT(filtroArriviSelezionato(QString))); connect(comboBoxFiltroPartenze, SIGNAL(activated(QString)), parent, SLOT(filtroPartenzeSelezionato(QString))); } void WidgetStazione::impostaTitolo(const QString &titolo) { labelTitolo->setText(titolo); } void WidgetStazione::impostaAggiornamento(const QString &aggiornamento, bool errore) { //se errore è true allora il parsing non è andato a buon fine, imposta il messaggio in rosso //e grassetto per evidenziarlo if (errore) labelAggiornamento->setText(QString("%1").arg(aggiornamento)); else labelAggiornamento->setText(aggiornamento); } QWidget* SchedaStazione::creaWidgetErroreNome() { QWidget* widget = new QWidget(this); QVBoxLayout * vbox = new QVBoxLayout; widget->setLayout(vbox); QLabel *labelErrore = new QLabel(this); labelErrore->setWordWrap(true); labelErrore->setText(QString::fromUtf8("Il nome della stazione ('%1') non è stato riconosciuto" " da ViaggiaTreno. Premete il pulsante sottostante per modificare il nome della stazione, " "oppure il pulsante di chiusura se desiderate semplicemente chiudere questa scheda").arg(nomeStazione())); QPushButton *btnCambiaNome = new QPushButton(QString::fromUtf8("Cambia nome"), this); connect(btnCambiaNome, SIGNAL(clicked()), this, SLOT(modificaNomeStazione())); vbox->addWidget(labelErrore); vbox->addWidget(btnCambiaNome, 0, Qt::AlignCenter); vbox->addStretch(); return widget; } //imposta il cursore opportuno a seconda della colonna in cui ci si trova void WidgetStazione::mouseEntered(const QModelIndex &index) { int col = index.column(); QTableView * view = qobject_cast(sender()); if ((col == StazioneVT::colNumero)||(col == StazioneVT::colStazione)) view->setCursor(Qt::PointingHandCursor); else view->setCursor(Qt::ArrowCursor); } //aggiorna l'elenco delle stazioni o delle categorie nelle combo del filtro e riapplica il filtro void WidgetStazione::aggiornaComboFiltroArrivi(tipoFiltro filtro, QString filtroCategoria, QString filtroStazione,QStringList categorie, QStringList stazioni) { int idx = -1; switch (filtro) { case NessunFiltro: comboBoxFiltroArrivi->clear(); break; case FiltraCategoria: { comboBoxFiltroArrivi->clear(); comboBoxFiltroArrivi->addItem("Tutte"); comboBoxFiltroArrivi->addItems(categorie); //cerca se il filtro attuale è presente, in caso positiva lo seleziona, altrimenti seleziona "Tutte" idx = comboBoxFiltroArrivi->findText(filtroCategoria); if (idx == -1) comboBoxFiltroArrivi->setCurrentIndex(0); else comboBoxFiltroArrivi->setCurrentIndex(idx); } break; case FiltraStazione: { comboBoxFiltroArrivi->clear(); comboBoxFiltroArrivi->addItem("Tutte"); comboBoxFiltroArrivi->addItems(stazioni); idx = comboBoxFiltroArrivi->findText(filtroStazione); if (idx == -1) comboBoxFiltroArrivi->setCurrentIndex(0); else comboBoxFiltroArrivi->setCurrentIndex(idx); } break; } } void WidgetStazione::aggiornaComboFiltroPartenze(tipoFiltro filtro, QString filtroCategoria, QString filtroStazione,QStringList categorie, QStringList stazioni) { int idx = -1; switch (filtro) { case NessunFiltro: comboBoxFiltroPartenze->clear(); break; case FiltraCategoria: { comboBoxFiltroPartenze->clear(); comboBoxFiltroPartenze->addItem("Tutte"); comboBoxFiltroPartenze->addItems(categorie); //cerca se il filtro attuale è presente, in caso positiva lo seleziona, altrimenti seleziona "Tutte" idx = comboBoxFiltroPartenze->findText(filtroCategoria); if (idx == -1) comboBoxFiltroPartenze->setCurrentIndex(0); else comboBoxFiltroPartenze->setCurrentIndex(idx); } break; case FiltraStazione: { comboBoxFiltroPartenze->clear(); comboBoxFiltroPartenze->addItem("Tutte"); comboBoxFiltroPartenze->addItems(stazioni); idx = comboBoxFiltroPartenze->findText(filtroStazione); if (idx == -1) comboBoxFiltroPartenze->setCurrentIndex(0); else comboBoxFiltroPartenze->setCurrentIndex(idx); } break; } } void WidgetStazione::impostaComboFiltri(tipoFiltro arrivi, tipoFiltro partenze) { comboBoxTipoFiltroArrivi->setCurrentIndex(arrivi); comboBoxTipoFiltroPartenze->setCurrentIndex(partenze); } qviaggiatreno-2013.7.3/src/schedastazione.cpp0000664000175000017500000004263212215773217021104 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2008-2012 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "schedastazione.h" #include "qviaggiatreno.h" #include "download_viaggiatreno.h" #include "utils.h" SchedaStazione::SchedaStazione(QViaggiaTreno* parent, const QString& nome, bool nomeEsatto, const unsigned int intervalloStandard) : SchedaQViaggiaTreno(parent, tsStazione, intervalloStandard) { m_stazione = nome; m_codice = ""; m_stato = statoNuovaScheda; m_documentoDom = 0L; m_idTabella = m_idNomeSbagliato = m_idNomeAmbiguo = -1; m_nomeEsatto = nomeEsatto; //imposta il parser m_parser = new ParserStazioneViaggiaTreno(this); //imposta i modelli m_arrivi = new ModelloStazione(this, false); m_partenze = new ModelloStazione(this, true); m_filtroArrivi = new QSortFilterProxyModel(); m_filtroPartenze = new QSortFilterProxyModel(); m_filtroArrivi->setDynamicSortFilter(true); m_filtroPartenze->setDynamicSortFilter(true); m_filtroArrivi->setSourceModel(m_arrivi); m_filtroPartenze->setSourceModel(m_partenze); //crea il widget della scheda m_widgetStazione = new WidgetStazione(this, m_filtroArrivi, m_filtroPartenze); m_idTabella = addWidget(m_widgetStazione); setCurrentIndex(m_idTabella); //imposta i valori iniziali dei filtri a "Tutte" m_testoFiltroCategorieArrivi = m_testoFiltroCategoriePartenze = m_testoFiltroStazioniArrivi = m_testoFiltroStazioniPartenze = "Tutte"; //connessioni connect(this, SIGNAL(statoCambiato(quint32)), parent, SLOT(aggiornaStatoScheda(quint32))); connect(this, SIGNAL(nomeSchedaCambiato(quint32)), parent, SLOT(aggiornaNomeScheda(quint32))); connect(this, SIGNAL(apriSchedaStazione(const QString&, bool)), parent, SLOT(nuovaStazione(const QString&, bool))); connect(this, SIGNAL(apriSchedaTreno(const QString&, const QString&)), parent, SLOT(nuovoTreno(const QString&, const QString&))); connect(this, SIGNAL(messaggioStatus(const QString&)), parent, SLOT(mostraMessaggioStatusBar(const QString&))); connect(this, SIGNAL(downloadStazione(quint32,QString)), qViaggiaTreno()->downloadViaggiaTreno(), SLOT(downloadStazione(quint32,QString))); connect(this, SIGNAL(downloadStazioneConCodice(quint32,QString)), qViaggiaTreno()->downloadViaggiaTreno(), SLOT(downloadStazioneCodice(quint32,QString))); } //restituisce il nome della stazione //seguendo la convenzione di ViaggiaTreno il nome della stazione viene restituito in maiuscolo QString SchedaStazione::nomeStazione() const { return m_stazione.toUpper(); } //restituisce una stringa con il "titolo" di questa scheda, che viene ad esempio usato come etichetta della TabBar // se titoloItem == true restituisce un titolo per l'item dell'albero //seguendo la convenzione di Viaggiatreno il nome della stazione verrà scritto tutto in maiuscolo QString SchedaStazione::titolo( bool titoloBreve ) const { if (titoloBreve) return nomeStazione(); return QString::fromUtf8("Stazione di %1").arg(nomeStazione()); } //questo slot viene richiamato quando scatta il timer void SchedaStazione::aggiorna() { cambiaStato(statoInAggiornamento); //cancella dallo StackedWidget i widget creati per gestire gli errori if (m_idNomeSbagliato != -1) { QWidget *widgetDaRimuovere = widget(m_idNomeSbagliato); widgetDaRimuovere->deleteLater(); m_idNomeSbagliato = -1; } if (m_idNomeAmbiguo != -1) { QWidget *widgetDaRimuovere = widget(m_idNomeAmbiguo); widgetDaRimuovere->deleteLater(); m_idNomeAmbiguo = -1; } if (m_codice.isEmpty()) emit (downloadStazione(idScheda(), nomeStazione())); else emit (downloadStazioneConCodice(idScheda(), codiceStazione())); } //questo slot viene richiamato quando è finito il download della risposta dal sito di viaggiatreno void SchedaStazione::downloadFinito(const QString& rispostaVT) { //imposta nel parser la risposta di ViaggiaTreno m_parser->impostaRispostaVT(rispostaVT); //controlla se è stata trovata la stazione e in caso contrario mostra finestra di errore if (m_parser->stazioneNonTrovata()) { ferma(); m_idNomeSbagliato = addWidget(creaWidgetErroreNome()); setCurrentIndex(m_idNomeSbagliato); cambiaStato(statoErrore); return; } //controlla se ViaggiaTreno ha segnalato che il nome è ambiguo //in tale caso prepara un widget per la selezione if (m_parser->nomeStazioneAmbiguo()) { //si è chiesto di aprire una scheda usando esattamente il nome passato? if (m_nomeEsatto) { //ottiene dal parser la lista dei codici stazioni QMap listaCodici = m_parser->listaCodiciStazioni(rispostaVT); //scorre la lista e cerca se esiste una stazione con ESATTAMENTE lo stesso nome QMapIterator it(listaCodici); while (it.hasNext()) { it.next(); if (!QString::compare(m_stazione, it.key(), Qt::CaseInsensitive)) { //trovato nome stazione identico, cambia il codice stazione ed esci cambiaCodiceStazione(it.value()); return; } } } ferma(); m_idNomeAmbiguo = addWidget(new WidgetDisambiguaNome(this, m_parser->listaCodiciStazioni(rispostaVT))); setCurrentIndex(m_idNomeAmbiguo); cambiaStato(statoErrore); return; } if (!m_parser->analizza()) { //errore nel parsing cambiaStato(statoErrore); m_widgetStazione->impostaAggiornamento(QString::fromUtf8("Aggiornamento scheda non riuscito: errore nell'analisi della risposta di ViaggiaTreno"), true); return; } m_stazione = m_parser->stazione(); emit(nomeSchedaCambiato(idScheda())); m_widgetStazione->impostaTitolo(titolo()); m_arrivi->aggiornaModello(m_parser->arrivi()); m_partenze->aggiornaModello(m_parser->partenze()); eliminaFiltriNonApplicabili(); m_widgetStazione->aggiornaComboFiltroArrivi(m_widgetStazione->tipoFiltroArriviAttivo(), m_testoFiltroCategorieArrivi, m_testoFiltroStazioniArrivi, m_arrivi->categorie(), m_arrivi->stazioni()); m_widgetStazione->aggiornaComboFiltroPartenze(m_widgetStazione->tipoFiltroPartenzeAttivo(), m_testoFiltroCategoriePartenze, m_testoFiltroStazioniPartenze, m_partenze->categorie(), m_partenze->stazioni()); riapplicaFiltroArrivi(); riapplicaFiltroPartenze(); m_ultimoAgg = QDateTime::currentDateTime(); m_widgetStazione->impostaAggiornamento(QString::fromUtf8("Ultimo aggiornamento: %1"). arg(m_ultimoAgg.toString("dd/MM/yyyy hh:mm"))); cambiaStato(statoMonitoraggioAttivo); emit messaggioStatus(QString::fromUtf8("Aggiornati dati stazione di %1").arg(titolo(true))); } void SchedaStazione::modificaNomeStazione() { bool ok; QString nuovoNome = QInputDialog::getText(this, QString::fromUtf8("Modifica nome stazione"), QString::fromUtf8("Inserire il nuovo nome della stazione:"), QLineEdit::Normal, nomeStazione(), &ok); if (ok & !nuovoNome.isEmpty()) { m_stazione = nuovoNome; m_codice = ""; m_widgetStazione->impostaTitolo(titolo()); //assicurarsi che venga visualizzato il widget della stazione e non il widget di errore setCurrentIndex(m_idTabella); emit(nomeSchedaCambiato(idScheda())); aggiorna(); avvia(); } } //questo slot risponde ad un attivazione (click, doppio click o quello che //prevede il sistema operativo) di una cella nelle viste con il prospetto degli arrivi o partenze //e se il click è avvvenuto in una delle due colonne con link simulati emette un segnale //che fa aprire la scheda corrispondente void SchedaStazione::itemAttivato(const QModelIndex& index) { //Utilizzando un modello proxy per il filtraggio sorge una complicazione //L'indice ad un elemento del modello proxy non necessariamente //corrisponde allo stesso indice del modello originale ed in ogni caso la funzione model() //restituisce il modello proxy //Di conseguenza si deve per prima cosa recuperare un puntatore al modello filtrato (il proxy) const QSortFilterProxyModel *modelloFiltrato = qobject_cast(index.model()); //Una volta ottenuto utilizzando mapToSource si può convertire l'indice al corrispondente //indice nel modello originale QModelIndex indice_originale = modelloFiltrato->mapToSource(index); int col = indice_originale.column(); //recupera il puntatore al modello dall'indice const ModelloStazione *modello = qobject_cast(indice_originale.model()); if (col == StazioneVT::colStazione) emit(apriSchedaStazione(ParserViaggiaTrenoBase::sostituisciNomeStazione(modello->data(indice_originale, Qt::DisplayRole).toString()), true)); if (col == StazioneVT::colNumero) emit(apriSchedaTreno(modello->data(indice_originale, Qt::DisplayRole).toString(), modello->data(indice_originale, Qt::UserRole).toString())); } //slot //cambia il codice della stazione e riaggiorna la scheda void SchedaStazione::cambiaCodiceStazione(const QString& nuovoCodice) { m_codice = nuovoCodice; setCurrentIndex(m_idTabella); aggiorna(); avvia(); } //Salva i dati necessari per poter ripristinare la scheda alla prossima apertura void SchedaStazione::salvaScheda(QSettings& settings) { settings.setValue("tipo scheda", "stazione"); settings.setValue("intervallo", intervallo()); settings.setValue("nome stazione", nomeStazione()); settings.setValue("codice stazione", codiceStazione()); //salva le impostazioni dei filtri settings.setValue("filtro arrivi attivo", m_widgetStazione->tipoFiltroArriviAttivo()); settings.setValue("filtro categorie arrivi selezionato", m_testoFiltroCategorieArrivi); settings.setValue("filtro stazioni arrivi selezionato", m_testoFiltroStazioniArrivi); settings.setValue("filtro partenze attivo",m_widgetStazione->tipoFiltroPartenzeAttivo()); settings.setValue("filtro categorie partenze selezionato", m_testoFiltroCategoriePartenze); settings.setValue("filtro stazioni partenze selezionato", m_testoFiltroStazioniPartenze); } //riapplica il filtro alla tabella degli arrivi void SchedaStazione::riapplicaFiltroArrivi() { //per prima cosa invalida il filtro attuale m_filtroArrivi->invalidate(); m_filtroArrivi->setFilterFixedString(""); m_filtroArrivi->setFilterKeyColumn(-1); switch(m_widgetStazione->tipoFiltroArriviAttivo()) { case NessunFiltro: break; case FiltraCategoria: { //si è scelto di filtrare sulla categorie, è inutile procedere però se si è scelto di mostrare tutte le categorie if (!m_testoFiltroCategorieArrivi.contains("Tutte")) { //seleziona la colonna per il filtro m_filtroArrivi->setFilterKeyColumn(StazioneVT::colCategoria); m_filtroArrivi->setFilterFixedString(m_widgetStazione->filtroArriviAttivo()); } } break; case FiltraStazione: { if (!m_testoFiltroStazioniArrivi.contains("Tutte")) { m_filtroArrivi->setFilterKeyColumn(StazioneVT::colStazione); m_filtroArrivi->setFilterFixedString(m_widgetStazione->filtroArriviAttivo()); } } break; } } //riapplica il filtro alla tabella delle partenze void SchedaStazione::riapplicaFiltroPartenze() { //per prima cosa invalida il filtro attuale m_filtroPartenze->invalidate(); m_filtroPartenze->setFilterFixedString(""); m_filtroPartenze->setFilterKeyColumn(-1); switch(m_widgetStazione->tipoFiltroPartenzeAttivo()) { case NessunFiltro: break; case FiltraCategoria: { //si è scelto di filtrare sulla categorie, è inutile procedere però se si è scelto di mostrare tutte le categorie if (!m_testoFiltroCategoriePartenze.contains("Tutte")) { //seleziona la colonna per il filtro m_filtroPartenze->setFilterKeyColumn(StazioneVT::colCategoria); m_filtroPartenze->setFilterFixedString(m_widgetStazione->filtroPartenzeAttivo()); } } break; case FiltraStazione: { if (!m_testoFiltroStazioniPartenze.contains("Tutte")) { m_filtroPartenze->setFilterKeyColumn(StazioneVT::colStazione); m_filtroPartenze->setFilterFixedString(m_widgetStazione->filtroPartenzeAttivo()); } } break; } } //questo slot viene attivato quando si cambia il tipo di filtro. void SchedaStazione::tipoFiltroArriviSelezionato(int tipo) { m_widgetStazione->aggiornaComboFiltroArrivi((tipoFiltro)tipo, m_testoFiltroCategorieArrivi, m_testoFiltroStazioniArrivi, m_arrivi->categorie(), m_arrivi->stazioni()); riapplicaFiltroArrivi(); } void SchedaStazione::tipoFiltroPartenzeSelezionato(int tipo) { m_widgetStazione->aggiornaComboFiltroPartenze((tipoFiltro)tipo, m_testoFiltroCategoriePartenze, m_testoFiltroStazioniPartenze, m_partenze->categorie(), m_partenze->stazioni()); riapplicaFiltroPartenze(); } void SchedaStazione::filtroArriviSelezionato(QString filtro) { if (m_widgetStazione->tipoFiltroArriviAttivo() == FiltraCategoria) m_testoFiltroCategorieArrivi = filtro; else if (m_widgetStazione->tipoFiltroArriviAttivo() == FiltraStazione) m_testoFiltroStazioniArrivi = filtro; riapplicaFiltroArrivi(); } void SchedaStazione::filtroPartenzeSelezionato(QString filtro) { if (m_widgetStazione->tipoFiltroPartenzeAttivo() == FiltraCategoria) m_testoFiltroCategoriePartenze = filtro; else if (m_widgetStazione->tipoFiltroPartenzeAttivo() == FiltraStazione) m_testoFiltroStazioniPartenze = filtro; riapplicaFiltroPartenze(); } //ripristina i filtri che erano selezionati al momento della chiusura di viaggiatreno void SchedaStazione::ripristinaFiltri(QSettings &settings) { m_testoFiltroCategorieArrivi = settings.value("filtro categorie arrivi selezionato", "Tutte").toString(); m_testoFiltroStazioniArrivi = settings.value("filtro stazioni arrivi selezionato", "Tutte").toString(); m_testoFiltroCategoriePartenze = settings.value("filtro categorie partenze selezionato", "Tutte").toString(); m_testoFiltroStazioniPartenze = settings.value("filtro stazioni partenze selezionato", "Tutte").toString(); tipoFiltro arrivi = (tipoFiltro)settings.value("filtro arrivi attivo", NessunFiltro).toInt(); tipoFiltro partenze = (tipoFiltro)settings.value("filtro partenze attivo", NessunFiltro).toInt(); m_widgetStazione->aggiornaComboFiltroArrivi(arrivi, m_testoFiltroCategorieArrivi, m_testoFiltroStazioniArrivi, m_arrivi->categorie(), m_arrivi->stazioni()); m_widgetStazione->aggiornaComboFiltroPartenze(partenze, m_testoFiltroCategoriePartenze, m_testoFiltroStazioniPartenze, m_partenze->categorie(), m_partenze->stazioni()); m_widgetStazione->impostaComboFiltri(arrivi, partenze); riapplicaFiltroArrivi(); riapplicaFiltroPartenze(); } //questo metodo controlla se il testo di ciascuno dei 4 filtri attivo è ancora presente nella corrispondente lista //in caso contrario lo reimposta al valore di default perché non è più applicabile void SchedaStazione::eliminaFiltriNonApplicabili() { if (!m_arrivi->categorie().contains(m_testoFiltroCategorieArrivi)) m_testoFiltroCategorieArrivi = "Tutte"; if (!m_arrivi->stazioni().contains(m_testoFiltroStazioniArrivi)) m_testoFiltroStazioniArrivi = "Tutte"; if (!m_partenze->categorie().contains(m_testoFiltroCategoriePartenze)) m_testoFiltroCategoriePartenze = "Tutte"; if (!m_partenze->stazioni().contains(m_testoFiltroStazioniPartenze)) m_testoFiltroStazioniPartenze = "Tutte"; } qviaggiatreno-2013.7.3/src/parser_viaggiatreno_base.h0000664000175000017500000000331312215773217022563 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2010-2013 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef PARSER_VIAGGIATRENO_BASE_H #define PARSER_VIAGGIATRENO_BASE_H #include class ParserViaggiaTrenoBase : public QObject { Q_OBJECT public: static QString sostituisciNomeStazione(const QString &nome); }; #endif //PARSER_VIAGGIATRENO_BASE_H qviaggiatreno-2013.7.3/src/dlgnomestazione.ui0000664000175000017500000000613312215773056021132 0ustar locutuslocutus dlgNomeStazione 0 0 449 155 Monitoraggio stazione true Inserire il &nome della stazione che si vuole controllare con ViaggiaTreno comboBoxNomeStazione true true Qt::Horizontal 40 20 Cerca tutte le stazioni il cui nome inizia con il testo inserito Qt::Vertical 20 40 Qt::Horizontal QDialogButtonBox::Cancel|QDialogButtonBox::Ok comboBoxNomeStazione checkBoxCercaTutte buttonBox buttonBox accepted() dlgNomeStazione accept() 222 107 157 111 buttonBox rejected() dlgNomeStazione reject() 290 107 286 111 qviaggiatreno-2013.7.3/src/parser_viaggiatreno_stazione.cpp0000664000175000017500000005274012215773217024050 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2011 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "parser_viaggiatreno_stazione.h" #include "utils.h" #include #include ParserStazioneViaggiaTreno::ParserStazioneViaggiaTreno(SchedaQViaggiaTreno* scheda) { m_scheda = scheda; m_err = ""; m_riga = m_col = -1; } //imposta il testo della risposta di viaggiatreno che dovrà essere analizzata dal parser //reimposta anche tutte le variabili utilizzate void ParserStazioneViaggiaTreno::impostaRispostaVT(const QString& rispostaVT) { m_rispostaVT = rispostaVT; m_err = ""; m_riga = m_col = -1; m_docDOM.clear(); } //cerca nel testo la stringa "non trovata", visto che quando VT non trova una stazione visualizza //una casella di testo con di fianco la scritta "località non trovata" //oppure cerca la stringa "inserire almeno" visualizzata quando si inserisce un nome troppo breve bool ParserStazioneViaggiaTreno::stazioneNonTrovata() const { return (m_rispostaVT.contains("non trovata", Qt::CaseInsensitive) || (m_rispostaVT.contains("Inserire almeno", Qt::CaseInsensitive))); } //cerca nel testo la stringa "option", se è presente vuol dire che viaggiatreno ha preparato un form //per la selezione del nome della stazione da una lista, in quanto il nome introdotto è ambiguo bool ParserStazioneViaggiaTreno::nomeStazioneAmbiguo() const { return (m_rispostaVT.contains("option", Qt::CaseInsensitive)); } QMap ParserStazioneViaggiaTreno::listaCodiciStazioni(const QString& rispostaVT) { QDomDocument docDom; QString msg; int riga, col; QMap lista; //ottiene la lista di tutti gli elementi figli del tag "select" //ogni nodo è un elemento "option" che contiene il nome della stazione e nell'attributo "value" il codice della stazione docDom.setContent(rispostaVT, &msg, &riga, &col); QDomElement body = docDom.documentElement().firstChildElement("body"); QDomElement corpocentrale = body.firstChildElement("div").nextSiblingElement("div"); QDomElement form = corpocentrale.firstChildElement("form"); QDomElement select = form.firstChildElement("p").firstChildElement("select"); QDomNodeList nodi = select.childNodes(); //scorre la lista dei nodi //per ogni elemento "option" crea un elemento della lista, la cui chiave è il nome della stazioone //mentre il codice è memorizzato nella voce corrispondente alla chiame for (int j = 0; j < nodi.count(); j++) lista[nodi.at(j).toElement().text()] = nodi.at(j).toElement().attribute("value"); return lista; } bool ParserStazioneViaggiaTreno::analizza() { if (!m_docDOM.setContent(m_rispostaVT, &m_err, &m_riga, &m_col)) return false; //recupera l'elemento body QDomElement body = m_docDOM.documentElement().firstChildElement("body"); //visto che il parser non ha rilevato problemi si fa l'assunzione che la pagina inviata da viaggiatreno sia corretta //quindi si suppone che l'elemento body esista //in future versioni si implementerà probabilmente un algoritmo più robusto //ottiene la lista di tutti i nodi figli QDomNodeList nodi = body.childNodes(); //recupera nome della stazione dal documento DOM QDomElement h1 = body.firstChildElement("h1"); m_stazione = h1.text().section(' ', 2); int inizioArrivi, fineArrivi, inizioPartenze, finePartenze; inizioArrivi = fineArrivi = inizioPartenze = finePartenze = -1; //scorre la lista alla ricerca di tutti i commenti for (int idx = 0; idx < nodi.length(); idx++) { if (nodi.at(idx).isComment()) { if (nodi.at(idx).toComment().data().contains("partenze", Qt::CaseInsensitive)) { inizioPartenze = idx+1; //individua il commento successivo che identifica la fine del blocco di arrivi o partenze for (int j = idx +1; j < nodi.length(); j++) { if (nodi.at(j).isComment()) { finePartenze = j-1; idx = j; break; } } } if (nodi.at(idx).toComment().data().contains("arrivi", Qt::CaseInsensitive)) { inizioArrivi = idx+1; //individua il commento successivo che identifica la fine del blocco di arrivi o partenze for (int j = idx +1; j < nodi.length(); j++) { if (nodi.at(j).isComment()) { fineArrivi = j-1; idx = j; break; } } } } } //pulisci le liste m_arrivi.clear(); m_partenze.clear(); //itera lungo la lista dei nodi, partendo dal primo elemento che rappresenta un treno in partenza //e finendo con l'ultimo elemento. I rispettivi indici sono memorizzati in idxInizioPartenze, idxFinePartenze for (int j=inizioPartenze, i=0 ; j <= finePartenze; j++,i++) { StazioneVT::DatiTreno treno; //recupera l'elemento dom corrente QDomElement elemento = nodi.at(j).toElement(); //categoria e numero treno sono memorizzati in un elemento "h2", recuperiamolo QDomElement elementoh2 = elemento.firstChildElement("h2").toElement(); //recupera dall'elemento h2 il testo, e lo separa in due stringhe... la prima conterrà la categoria //...la seconda il numero QStringList catNumeroTreno = elementoh2.text().split(" "); //copia le rispettive stringhe nella variabile che memorizza i dati del treno treno.impostaCategoria(catNumeroTreno[0]); treno.impostaNumero(catNumeroTreno[1]); //ricava dai due elementi "" nome della stazione di origine/destinazione //e l'orario teorico di arrivo/partenza QDomElement bloccotreno = elemento.firstChildElement("div"); QDomElement stazione = bloccotreno.firstChildElement("strong"); QDomElement orario = stazione.nextSiblingElement("strong"); //TODO: test //treno.impostaStazione(sostituisciNomeStazione(stazione.text())); treno.impostaStazione(stazione.text()); treno.impostaOrario(orario.text()); QString datitreno = bloccotreno.text(); QStringList lista = datitreno.split(" ", QString::SkipEmptyParts); QStringListIterator it(lista); //cerca la stringa "Previsto:" it.findNext("Previsto:"); QString binario = it.next(); if (binario == "--") binario = QString::fromUtf8("Sconosciuto"); else { //la string successiva o è "Binario Reale:" o fa ancora parte del numero binario while (true) { QString next = it.next(); if (next != "Binario") binario += QString(" %1").arg(next); else break; } } treno.impostaBinarioProgrammato(binario); //riporta l'iteratore in cima alla lista it.toFront(); //cerca la stringa "Reale:" it.findNext("Reale:"); binario = it.next(); if (binario == "--") binario = QString::fromUtf8("Sconosciuto"); else { //la stringa successiva o è "in" ("in orario") o è "ritardo" (ritardo x minuti) //oppure fa ancora parte del nome del binario while (true) { QString next = it.next(); if ((next != "in") && (next != "ritardo")) binario += QString(" %1").arg(next); else break; } } treno.impostaBinarioReale(binario); //individua se il treno è in orario o in ritardo it.toFront(); if (it.findNext("orario")) treno.impostaRitardo("0"); else { //il treno non è indicato in orario (l'indicazione vale anche per treni in anticipo //quindi è in ritardo //il numero di minuti di ritardo è nel penultimo elemento della lista it.toBack(); it.previous(); treno.impostaRitardo(QString::fromUtf8("+%1").arg(it.previous())); } //rintraccia dal link per i dettagli del treno il codice della stazione di origine QString href = elemento.firstChildElement("a").attribute("href", ""); QString cod = href.section("&",1,1).section("=",1,1); if (!cod.isEmpty()) { treno.impostaCodiceOrigine(cod); //aggiunge il treno solo se ha un codice stazione di origine, questo per evitare duplicati che capitano con le S LeNord m_partenze.append(treno); } } //ripete la procedura anche per gli arrivi for (int j=inizioArrivi, i=0 ; j <= fineArrivi; j++,i++) { StazioneVT::DatiTreno treno; //recupera l'elemento dom corrente QDomElement elemento = nodi.at(j).toElement(); //categoria e numero treno sono memorizzati in un elemento "h2", recuperiamolo QDomElement elementoh2 = elemento.firstChildElement("h2").toElement(); //recupera dall'elemento h2 il testo, e lo separa in due stringhe... la prima conterrà la categoria //...la seconda il numero QStringList catNumeroTreno = elementoh2.text().split(" "); //copia le rispettive stringhe nella variabile che memorizza i dati del treno treno.impostaCategoria(catNumeroTreno[0]); treno.impostaNumero(catNumeroTreno[1]); //ricava dai due elementi "" nome della stazione di origine/destinazione //e l'orario teorico di arrivo/partenza QDomElement bloccotreno = elemento.firstChildElement("div"); QDomElement stazione = bloccotreno.firstChildElement("strong"); QDomElement orario = stazione.nextSiblingElement("strong"); //TODO: test //treno.impostaStazione(sostituisciNomeStazione(stazione.text())); treno.impostaStazione(stazione.text()); treno.impostaOrario(orario.text()); QString datitreno = bloccotreno.text(); QStringList lista = datitreno.split(" ", QString::SkipEmptyParts); QStringListIterator it(lista); //cerca la stringa "Previsto:" it.findNext("Previsto:"); QString binario = it.next(); if (binario == "--") binario = QString::fromUtf8("Sconosciuto"); else { //la string successiva o è "Binario Reale:" o fa ancora parte del numero binario while (true) { QString next = it.next(); if (next != "Binario") binario += QString(" %1").arg(next); else break; } } treno.impostaBinarioProgrammato(binario); //riporta l'iteratore in cima alla lista it.toFront(); //cerca la stringa "Reale:" it.findNext("Reale:"); binario = it.next(); if (binario == "--") binario = QString::fromUtf8("Sconosciuto"); else { //la stringa successiva o è "in" ("in orario") o è "ritardo" (ritardo x minuti) //oppure fa ancora parte del nome del binario while (true) { QString next = it.next(); if ((next != "in") && (next != "ritardo")) binario += QString(" %1").arg(next); else break; } } treno.impostaBinarioReale(binario); //individua se il treno è in orario o in ritardo it.toFront(); if (it.findNext("orario")) treno.impostaRitardo("0"); else { //il treno non è indicato in orario (l'indicazione vale anche per treni in anticipo //quindi è in ritardo //il numero di minuti di ritardo è nell'ultimo elemento della lista it.toBack(); treno.impostaRitardo(QString::fromUtf8("+%1").arg(it.previous())); } //rintraccia dal link per i dettagli del treno il codice della stazione di origine QString href = elemento.firstChildElement("a").attribute("href", ""); QString cod = href.section("&",1,1).section("=",1,1); if (!cod.isEmpty()) { treno.impostaCodiceOrigine(cod); //aggiunge il treno solo se ha un codice stazione di origine, questo per evitare duplicati che capitano con le S LeNord m_arrivi.append(treno); } } return true; } //costruisce un'istanza della classe che implementa il modello di dati per le //tabelle della scheda stazione //partenze == true --> il modello riguarda la scheda delle partenze, //altrimenti quella degli arrivi ModelloStazione::ModelloStazione(QWidget *parent, bool partenze) : QAbstractTableModel(parent), m_partenze(partenze) { } //restituisce il numero di righe nel modello //cioè il numero di treni elencati nel prospetto int ModelloStazione::rowCount(const QModelIndex &parent) const { Q_UNUSED(parent) return m_treni.count(); } //restituisce il numero di colonne nel modello int ModelloStazione::columnCount(const QModelIndex &parent) const { Q_UNUSED(parent) //il numero di colonne è pari all'indice dell'ultima colonna +1 return (StazioneVT::colUltima+1); } //restituisce i titoli delle colonne del modello QVariant ModelloStazione::headerData(int section, Qt::Orientation orientation, int role) const { // usa l'implementazione di default per restituire i dati dell'header verticale if (orientation == Qt::Vertical) return QAbstractTableModel::headerData(section, orientation, role); if (role == Qt::DisplayRole) { switch(section) { case StazioneVT::colCategoria: return QString::fromUtf8("Categoria"); break; case StazioneVT::colNumero: return QString::fromUtf8("Numero"); break; //è necessario distinguere se il modello riguarda il prospetto degli arrivi //o quello delle partenze perché il nome della colonna è differente nei due casi case StazioneVT::colStazione: { if (m_partenze) return QString::fromUtf8("Destinazione"); else return QString::fromUtf8("Origine"); }; break; case StazioneVT::colBinProgrammato: return QString::fromUtf8("Bin. previsto"); break; case StazioneVT::colBinReale: return QString::fromUtf8("Bin. effettivo"); break; case StazioneVT::colOrario: return QString::fromUtf8("Orario"); break; case StazioneVT::colRitardo: return QString::fromUtf8("Ritardo"); break; default: return QVariant(); } } return QAbstractTableModel::headerData(section, orientation, role); } //passa al modello la lista dei treni void ModelloStazione::aggiornaModello(const QList &treni) { beginResetModel(); m_treni = treni; //pulisce le liste di stazioni e categorie m_stazioni.clear(); m_categorie.clear(); //scorre la tabella e memorizza categoria e stazione di origine e o destinazione QListIterator it(treni); while (it.hasNext()) { StazioneVT::DatiTreno treno = it.next(); m_categorie.append(treno.categoria()); m_stazioni.append(treno.stazione()); } //rimuove duplicati m_categorie.removeDuplicates(); m_stazioni.removeDuplicates(); //ed ordina le liste m_categorie.sort(); m_stazioni.sort(); endResetModel(); } QVariant ModelloStazione::data(const QModelIndex &index, int role) const { if (!index.isValid()) return QVariant(); int riga = index.row(); int col = index.column(); //Imposta l'allineamento delle colonne if (role == Qt::TextAlignmentRole) { switch(col) { case StazioneVT::colCategoria: case StazioneVT::colNumero: case StazioneVT::colStazione: return int(Qt::AlignLeft|Qt::AlignVCenter); break; case StazioneVT::colBinProgrammato: case StazioneVT::colBinReale: case StazioneVT::colOrario: case StazioneVT::colRitardo: return Qt::AlignCenter; break; } } //imposta la sottolineatura delle voci (per simulare un link) if (role == Qt::FontRole) { QFont font; if ((col == StazioneVT::colNumero) || (col == StazioneVT::colStazione)) font.setUnderline(true); else font.setUnderline(false); return font; } //imposta il colore del testo // per le colonne con il numero del treno e il nome della stazione viene impostato come // colore il colore di default per i link, in modo insieme alla sottolineatura da simulare un link // per le altre colonne invece il colore viene calcolato in funzione del ritardo if (role == Qt::ForegroundRole) { //restituisce un colore che codifica l'entità del ritardo per rendere meglio visibili nella tabella i treni in ritardo // se il ritardo è > 10 minuti restituisce un colore rosso // se è tra 3 e 10 minuti restituisce un colore giallo scuro //se è meno di 3 minuti restituisce il colore di default bool ok; QColor colore; int rit = m_treni.at(riga).ritardo().toInt(&ok); //selezione un colore opportuno per la riga di testo if (rit > 2 && rit<= 10) colore = Qt::darkYellow; else if (rit > 10) colore = Qt::red; //nessun colore speciale usa il colore di default else colore = QApplication::palette().text().color(); // le colonne sono quelle di numero treno e stazione? if ((col == StazioneVT::colNumero) || (col == StazioneVT::colStazione)) //se si resituisce il colore del link return (QApplication::palette().link()); else //altrimenti restituisce il colore che codifica il ritardo return colore; } //restituisce il codice della stazione di origine treno if (role == Qt::UserRole) { if (col == StazioneVT::colNumero) return m_treni.at(riga).codiceOrigine(); else return QVariant(); } //restituisce i dati veri e propri if (role == Qt::DisplayRole) switch(col) { case StazioneVT::colCategoria: return m_treni.at(riga).categoria(); break; case StazioneVT::colNumero: return m_treni.at(riga).numero(); break; case StazioneVT::colStazione: return m_treni.at(riga).stazione(); break; case StazioneVT::colBinProgrammato: return m_treni.at(riga).binarioProgrammato(); break; case StazioneVT::colBinReale: return m_treni.at(riga).binarioReale(); break; case StazioneVT::colOrario: return m_treni.at(riga).orario(); break; case StazioneVT::colRitardo: { QString rit = m_treni.at(riga).ritardo(); if (rit == "0") return QString::fromUtf8("In orario"); else { bool ok; int ritardo = rit.toInt(&ok); if (ritardo==1) return QString::fromUtf8("1 minuto"); else return QString::fromUtf8("%1 minuti").arg(ritardo); } } break; default: return QVariant(); } //non previsto, ritorna un valore vuoto return QVariant(); } qviaggiatreno-2013.7.3/src/parser_trenord.cpp0000664000175000017500000001131012215771022021106 0ustar locutuslocutus/*************************************************************************** * Copyright (C) 2010-2012 by fra74 * * francesco.b74@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "parser_trenord.h" #include "schedaviaggiatreno.h" #include "utils.h" #include #include ParserTrenord::ParserTrenord(SchedaQViaggiaTreno *scheda) { m_scheda = scheda; } //analizza il testo della pagina all'URL http://www.trenord.it/mobile/it/breaking-news.aspx // che contiene la lista delle direttrici trenord con alla destra del nome della direttrice // una icona che può essere rossa o verde nel caso siano o no presenti avvisi aggiornati //restituisce true se l'analisi è andata a buon fine e nel caso crea anche una coda di QString //ciascuna contente l'indirizzo con la pagina dei dettagli di una direttrice per cui //sono presenti avvisi bool ParserTrenord::analizzaListaDirettrici(const QString &rispostaTN) { QWebPage page; page.mainFrame()->setHtml(rispostaTN); //ottiene la lista di tutti i tag
  • , ciascuno contiene il dato di una linea... QWebElementCollection lista = page.mainFrame()->findAllElements("li.direttrici-item"); if(lista.count() == 0) //qualcosa è andato storto, restituisci false return false; m_direttrici.clear(); //per ogni direttrice controlla l'elemonto
  • ed in particolare il tag //se l'immagine linkata dal tag contiene nel nome "indicator-on" allora la direttrice ha //avvisi aggiornati, altrimenti non fare nulla for (int i = 0; i l'indirizzo della pagina con gli avvisi e l'aggiungo alla coda //di pagine da scaricare QWebElement a = lista.at(i).findFirst("a"); m_direttrici.enqueue(a.attribute("href")); } } } return true; } ModelloAvvisiTrenord::ModelloAvvisiTrenord(QWidget *parent) : QAbstractTableModel(parent) { } //restituisce il numero di righe nel modello, cioè il numero complessivo di avvisi int ModelloAvvisiTrenord::rowCount(const QModelIndex &parent) const { Q_UNUSED(parent) return m_avvisi.count(); } //restituisce il numero di colonne nel modello, attualmente 3: data/ora avviso - direttrice - avviso int ModelloAvvisiTrenord::columnCount(const QModelIndex &parent) const { Q_UNUSED(parent) return 3; } QVariant ModelloAvvisiTrenord::headerData(int section, Qt::Orientation orientation, int role) const { // usa l'implementazione di default per restituire i dati dell'header verticale if (orientation == Qt::Vertical) return QAbstractTableModel::headerData(section, orientation, role); if (role == Qt::DisplayRole) { switch(section) { case 0: return QString::fromUtf8("Data/ora"); break; case 1: return QString::fromUtf8("Direttrice"); break; case 2: return QString::fromUtf8("Testo avviso"); break; default: return QVariant(); } } return QAbstractTableModel::headerData(section, orientation, role); } QVariant ModelloAvvisiTrenord::data(const QModelIndex &index, int role) const { Q_UNUSED(index) Q_UNUSED(role) //TODO: da implementare return QVariant(); } qviaggiatreno-2013.7.3/COPYING0000664000175000017500000004313112215773056015634 0ustar locutuslocutus GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. qviaggiatreno-2013.7.3/README0000664000175000017500000000200212215773056015451 0ustar locutuslocutusQViaggiaTreno 20011.2.2 QViaggiaTreno è un front-end grafico a ViaggiaTreno, il servizio web di Trenitalia con informazioni in tempo reale sulla circolazione dei treni passeggeri. È scritto utilizzando le librerie Qt 4.5 e seguenti e può essere eseguito sotto Linux, Windows e Mac Ringraziamenti: Voglio ringraziare tutte le persone che hanno provato le varie versioni beta che ho messo a disposizione segnalandomi bug o facendo suggerimenti. In particolare enza togliere niente a nessuno ringrazio: - Eurocity, per aver verificato che qviaggiatreno si compila perfettamente anche sotto Mac OS X e per la compilazione di pacchetti per Mac - Jack_A, per aver verificato che qviaggiatreno si compila sotto debian lenny - msr.cooper per aver suggerito di usare due tonalità di giallo nella tabella delle partenze - danny1984, trambvs, xyz per aver segnalato bug o difetti - Il Max per segnalarmi immediatamente l'esistenza di treni soppressi o parzialmente soppressi permettendomi di individuare alcuni bug insidiosi