コード例 #1
0
ファイル: moc_qtbook_cd.cpp プロジェクト: beneisner/sherlock
int qtbook_cd::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMainWindow::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: slotGo(); break;
        case 1: slotPrint(); break;
        case 2: slotQuery(); break;
        case 3: slotReset(); break;
        case 4: slotCancel(); break;
        case 5: slotShowUsers(); break;
        case 6: slotSaveTracks(); break;
        case 7: slotDeleteTrack(); break;
        case 8: slotInsertTrack(); break;
        case 9: slotSelectImage(); break;
        case 10: slotComputeRuntime(); break;
        case 11: slotCloseTracksBrowser(); break;
        case 12: slotPopulateCopiesEditor(); break;
        case 13: slotPopulateTracksBrowser(); break;
        default: ;
        }
        _id -= 14;
    }
    return _id;
}
コード例 #2
0
Win::Win( QWidget* parent )
    : QWidget(parent)
{
    m_querythread = new QueryThread();

    setupUi( this );

    // Buttons
    connect( goButton, SIGNAL( clicked() ),
             this, SLOT( slotGo() ) );
    connect( closeButton, SIGNAL( clicked() ),
             this, SLOT( close() ) );

    // Worker thread
    connect( m_querythread, SIGNAL(progress(QString)),
             textBrowser, SLOT(append(QString)) );
    connect( m_querythread, SIGNAL( ready(bool) ),
             goButton, SLOT( setEnabled(bool) ) );
    connect( m_querythread, SIGNAL(results(QString,QList<QSqlRecord>,QString)),
             this, SLOT(slotResults(QString,QList<QSqlRecord>,QString)) );

    // Launch worker thread
    m_querythread->start();
    
    m_model = new SqlRecModel(this);
    tableView->setModel(m_model);
}
コード例 #3
0
int WebBrowser::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QWidget::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: slotGo(); break;
        case 1: slotFinished((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 2: slotForward(); break;
        case 3: slotBack(); break;
        case 4: slotReload(); break;
        case 5: clickFindAnswer(); break;
        case 6: clickHyperlink((*reinterpret_cast< const QUrl(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 7;
    }
    return _id;
}
コード例 #4
0
int qtbook_videogame::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMainWindow::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: slotGo(); break;
        case 1: slotPrint(); break;
        case 2: slotQuery(); break;
        case 3: slotReset(); break;
        case 4: slotCancel(); break;
        case 5: slotShowUsers(); break;
        case 6: slotSelectImage(); break;
        case 7: slotPopulateCopiesEditor(); break;
        default: ;
        }
        _id -= 8;
    }
    return _id;
}
コード例 #5
0
ファイル: main.cpp プロジェクト: spqr33/QtWeatherJSONCheck
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    a.setWindowIcon(QIcon(QPixmap(":/icons/mainIcon.png")));

    Logger log(Logger::mode::clear);

    QWidget central;
#ifdef QT_DEBUG
    LO_TreeWidget tree(":/allcities/city.list1.json");
#elif QT_NO_DEBUG
    LO_TreeWidget tree(":/allcities/city.list.json");
#else
#error("Please define QT_DEBUG or QT_DEBUG macro")
#endif
    if ( !tree.loadData()) {
        return -1;
    }
    tree.show();

    //
    WeatherWidget weather;
    weather.show();
    weather.connectLogger(log);
    QObject::connect(&tree, SIGNAL(activated(QString)),
                     &weather, SLOT(slotGo(QString))
                     );

    //Layouts
    QHBoxLayout* phbl = new QHBoxLayout();
    phbl->addWidget(&tree);
    phbl->addWidget(&weather);

    central.setLayout(phbl);
    central.show();

    return a.exec();
}
コード例 #6
0
ファイル: NavFichiers.cpp プロジェクト: qrichert/Multiuso
void NavFichiers::creerActions()
{
	toolBar = addToolBar("Raccourcis");
		toolBar->setObjectName("Raccourcis");
		toolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);

	actionPrecedent = new QAction("Précédent", this);
		actionPrecedent->setIcon(QIcon(":/icones/nav_fichiers/actionPrecedent.png"));
		connect(actionPrecedent, SIGNAL(triggered()), this, SLOT(slotPrecedent()));
			toolBar->addAction(actionPrecedent);

	actionSuivant = new QAction("Suivant", this);
		actionSuivant->setIcon(QIcon(":/icones/nav_fichiers/actionSuivant.png"));
		connect(actionSuivant, SIGNAL(triggered()), this, SLOT(slotSuivant()));
			toolBar->addAction(actionSuivant);

	actionHaut = new QAction("Haut", this);
		actionHaut->setIcon(QIcon(":/icones/nav_fichiers/actionHaut.png"));
		connect(actionHaut, SIGNAL(triggered()), this, SLOT(slotHaut()));
			toolBar->addAction(actionHaut);

	actionActualiser = new QAction("Actualiser", this);
		actionActualiser->setIcon(QIcon(":/icones/nav_fichiers/actionActualiser.png"));
		connect(actionActualiser, SIGNAL(triggered()), this, SLOT(slotActualiser()));
			toolBar->addAction(actionActualiser);


		toolBar->addSeparator();


	actionDossierPersonnel = new QAction("Dossier personnel", this);
		actionDossierPersonnel->setIcon(QIcon(":/icones/nav_fichiers/actionDossierPersonnel.png"));
		connect(actionDossierPersonnel, SIGNAL(triggered()), this, SLOT(slotDossierPersonnel()));
			toolBar->addAction(actionDossierPersonnel);

	actionDossierTelechargements = new QAction("Téléchargements", this);
		actionDossierTelechargements->setIcon(QIcon(":/icones/nav_fichiers/actionDossierTelechargements.png"));
		connect(actionDossierTelechargements, SIGNAL(triggered()), this, SLOT(slotDossierTelechargements()));
			toolBar->addAction(actionDossierTelechargements);

	actionDossiersCaches = new QAction("Éléments cachés", this);
		actionDossiersCaches->setIcon(QIcon(":/icones/nav_fichiers/actionDossiersCaches.png"));
		connect(actionDossiersCaches, SIGNAL(triggered()), this, SLOT(slotDossiersCaches()));
			toolBar->addAction(actionDossiersCaches);

	actionDossierRacine = new QAction("Racine", this);
		actionDossierRacine->setIcon(QIcon(":/icones/nav_fichiers/actionDossierRacine.png"));
		connect(actionDossierRacine, SIGNAL(triggered()), this, SLOT(slotDossierRacine()));
			toolBar->addAction(actionDossierRacine);

	actionDossierTmp = new QAction("Dossier temporaire", this);
		actionDossierTmp->setIcon(QIcon(":/icones/nav_fichiers/actionDossierTmp.png"));
		connect(actionDossierTmp, SIGNAL(triggered()), this, SLOT(slotDossierTmp()));
			toolBar->addAction(actionDossierTmp);


	addToolBarBreak();


	toolBar2 = addToolBar("Adresse");
		toolBar2->setObjectName("Adresse");

	afficherCheminActuel = new LineEdit;
		connect(afficherCheminActuel, SIGNAL(returnPressed()), this, SLOT(slotGo()));
		toolBar2->addWidget(afficherCheminActuel);

	actionGo = new QAction("Go", this);
		actionGo->setIcon(QIcon(":/icones/nav_fichiers/actionGo.png"));
		connect(actionGo, SIGNAL(triggered()), this, SLOT(slotGo()));
			toolBar2->addAction(actionGo);

	actionNouvelOnglet = new QAction("Nouvel onglet", this);
		actionNouvelOnglet->setIcon(QIcon(":/icones/nav_fichiers/actionNouvelOnglet.png"));
		actionNouvelOnglet->setShortcut(QKeySequence("Ctrl+T"));
		connect(actionNouvelOnglet, SIGNAL(triggered()), this, SLOT(ajouterOnglet()));

	actionFermerOnglet = new QAction("Fermer l'onglet", this);
		actionFermerOnglet->setIcon(QIcon(":/icones/nav_fichiers/actionFermerOnglet.png"));
		actionFermerOnglet->setShortcut(QKeySequence("Ctrl+W"));
		actionFermerOnglet->setEnabled(false);
		connect(actionFermerOnglet, SIGNAL(triggered()), this, SLOT(slotFermerOnglet()));
}