示例#1
0
void CDialogAlarm::setConnexion()
{
	connect(m_btBack, SIGNAL(clicked()), this, SLOT(close()));
	connect(m_btApply, SIGNAL(clicked()), this, SLOT(acquiter()));
	//connect(m_btApply, SIGNAL(clicked()), m_listView, SLOT(clear()));
	connect(m_btNext, SIGNAL(clicked()), m_listView, SLOT(slotNextPage()));
	connect(m_btPrev, SIGNAL(clicked()), m_listView, SLOT(slotPrevPage()));
	
}
示例#2
0
SearchWidget::SearchWidget(QWidget *parent) :
    QWidget(parent)//,
    //ui(new Ui::SearchWidget)
{
    //ui->setupUi(this);
    initUi();
    player = new QMediaPlayer(this);
    // owned by PlaylistModel
    playlist = new QMediaPlaylist();
    player->setPlaylist(playlist);

    urlLineEdit = new QLineEdit("http://sw.bos.baidu.com/sw-search-sp/software/f4570d2d3175b/ue_chinese_23.20.0.28.exe");
    manager = new QNetworkAccessManager;
    songUrlManager = new QNetworkAccessManager;
    manager_lyric2 = new QNetworkAccessManager;

    QObject::connect(manager, SIGNAL(finished(QNetworkReply*)),
                     this, SLOT(changeList(QNetworkReply *)));
    QObject::connect(searchBtn, SIGNAL(clicked()),
                     this, SLOT(slotSearchBtn()));
    //QObject::connect(local, SIGNAL(clicked()),this, SLOT(slotLocal()));
    QObject::connect(nextPage, SIGNAL(clicked()), this, SLOT(slotNextPage()));
    QObject::connect(previousPage, SIGNAL(clicked()), this, SLOT(slotPreviousPage()));
    QObject::connect(this, SIGNAL(searchSignal()), this, SLOT(slotSearch()));
    QObject::connect(listTable, SIGNAL(cellClicked(int,int)),
                     this, SLOT(tableClicked(int,int)));
    QObject::connect(songUrlManager, SIGNAL(finished(QNetworkReply*)),this,
                     SLOT(finishGetSongUrl(QNetworkReply *)));
    QObject::connect(manager_lyric2, SIGNAL(finished(QNetworkReply*)),
                     this, SLOT(getUrl(QNetworkReply *)));

    urlLabel = new QLabel(tr("&URL:"));
    urlLabel->setBuddy(urlLineEdit);
    statusLabel = new QLabel(tr("Please enter the URL of a file you want to "
                                "download."));
    statusLabel->setWordWrap(true);

    downloadButton = new QPushButton(tr("Download"));
    downloadButton->setDefault(true);
    quitButton = new QPushButton(tr("Quit"));
    quitButton->setAutoDefault(false);

    buttonBox = new QDialogButtonBox;
    buttonBox->addButton(downloadButton, QDialogButtonBox::ActionRole);
    buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole);

    progressDialog = new QProgressDialog(this);

    QHBoxLayout *topLayout = new QHBoxLayout;
    topLayout->addWidget(lyricLabel);
    topLayout->addWidget(urlLabel);
    topLayout->addWidget(urlLineEdit);

    QVBoxLayout *mainLayout = new QVBoxLayout;
    mainLayout->addLayout(topLayout);
    mainLayout->addWidget(statusLabel);
    mainLayout->addWidget(lyricLabel);
    mainLayout->addWidget(buttonBox);
    setLayout(mainLayout);

    setWindowTitle(tr("Funky"));/**/
    urlLineEdit->setFocus();
}
示例#3
0
int qtbook::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: slotResizeColumns(); break;
        case 1: slotDisplaySummary(); break;
        case 2: slotExit(); break;
        case 3: slotAbout(); break;
        case 4: slotAllGo(); break;
        case 5: slotQuery(); break;
        case 6: slotReset(); break;
        case 7: slotDelete(); break;
        case 8: slotModify(); break;
        case 9: slotSearch(); break;
        case 10: slotRefresh(); break;
        case 11: slotRequest(); break;
        case 12: slotAddAdmin(); break;
        case 13: slotCheckout(); break;
        case 14: slotCDSearch(); break;
        case 15: slotInsertCD(); break;
        case 16: slotNextPage(); break;
        case 17: slotSaveUser(); break;
        case 18: slotSetFonts(); break;
        case 19: slotShowGrid(); break;
        case 20: slotShowMenu(); break;
        case 21: slotShowNext(); break;
        case 22: slotShowPrev(); break;
        case 23: slotConnectDB(); break;
        case 24: slotCopyError(); break;
        case 25: slotDVDSearch(); break;
        case 26: slotDuplicate(); break;
        case 27: slotInsertMag(); break;
        case 28: slotInsertDVD(); break;
        case 29: slotMagSearch(); break;
        case 30: slotPrintView(); break;
        case 31: slotBookSearch(); break;
        case 32: slotChangeView((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 33: slotDisconnect(); break;
        case 34: slotInsertBook(); break;
        case 35: slotSaveConfig(); break;
        case 36: slotSetColumns(); break;
        case 37: slotAddBorrower(); break;
        case 38: slotDeleteAdmin(); break;
        case 39: slotExportAsCSV(); break;
        case 40: slotJournSearch(); break;
        case 41: slotPageClicked((*reinterpret_cast< const QString(*)>(_a[1]))); break;
        case 42: slotViewDetails(); break;
        case 43: slotReserveCopy(); break;
        case 44: slotShowColumns(); break;
        case 45: slotShowHistory(); break;
        case 46: slotInsertJourn(); break;
        case 47: slotPreviousPage(); break;
        case 48: slotRemoveMember(); break;
        case 49: slotSavePassword(); break;
        case 50: slotCancelAddUser(); break;
        case 51: slotBranchChanged(); break;
        case 52: slotPrintReserved(); break;
        case 53: slotResetErrorLog(); break;
        case 54: slotModifyBorrower(); break;
        case 55: slotSectionResized((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3]))); break;
        case 56: slotAutoPopOnFilter(); break;
        case 57: slotClearSqliteMenu((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 58: slotGrantPrivileges(); break;
        case 59: slotInsertVideoGame(); break;
        case 60: slotShowAdminDialog(); break;
        case 61: slotShowCustomQuery(); break;
        case 62: slotShowErrorDialog(); break;
        case 63: slotVideoGameSearch(); break;
        case 64: slotListOverdueItems(); break;
        case 65: slotRefreshAdminList(); break;
        case 66: slotResetLoginDialog(); break;
        case 67: slotShowConnectionDB(); break;
        case 68: slotListReservedItems(); break;
        case 69: slotExecuteCustomQuery(); break;
        case 70: slotSaveAdministrators(); break;
        case 71: slotSelectDatabaseFile(); break;
        case 72: slotShowChangePassword(); break;
        case 73: slotShowDbEnumerations(); break;
        case 74: slotShowMembersBrowser(); break;
        case 75: slotSqliteFileSelected((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 76: slotCloseMembersBrowser(); break;
        case 77: slotAdminCheckBoxClicked((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 78: slotSceneSelectionChanged(); break;
        case 79: slotCloseCustomQueryDialog(); break;
        case 80: slotDisplayNewSqliteDialog(); break;
        case 81: slotPopulateMembersBrowser(); break;
        case 82: slotResizeColumnsAfterSort(); break;
        case 83: slotUpdateIndicesAfterSort((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 84: slotPrintReservationHistory(); break;
        default: ;
        }
        _id -= 85;
    }
    return _id;
}
示例#4
0
void PrintingWizard::setupWidgets()
{
    #ifdef Q_OS_OSX
        setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
    #endif
    m_WizardStack = new QStackedWidget(this);

    setWindowTitle(i18n("Printing Wizard"));

    QVBoxLayout *mainLayout= new QVBoxLayout;
    mainLayout->addWidget(m_WizardStack);
    setLayout(mainLayout);

    QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
    mainLayout->addWidget(buttonBox);
    connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));

    nextB = new QPushButton(i18n("&Next >"));
    nextB->setToolTip(i18n("Go to next Wizard page"));
    nextB->setDefault(true);
    backB = new QPushButton(i18n("< &Back"));
    backB->setToolTip(i18n("Go to previous Wizard page"));
    backB->setEnabled(false);

    buttonBox->addButton(backB, QDialogButtonBox::ActionRole);
    buttonBox->addButton(nextB, QDialogButtonBox::ActionRole);

    connect(nextB, SIGNAL(clicked()), this, SLOT(slotNextPage()));
    connect(backB, SIGNAL(clicked()), this, SLOT(slotPrevPage()));

    // Create step widgets
    m_WizWelcomeUI = new PWizWelcomeUI(m_WizardStack);
    m_WizObjectSelectionUI = new PWizObjectSelectionUI(this, m_WizardStack);
    m_WizChartConfigUI = new PWizChartConfigUI(this);
    m_WizFovTypeSelectionUI = new PWizFovTypeSelectionUI(this, m_WizardStack);
    m_WizFovConfigUI = new PWizFovConfigUI(m_WizardStack);
    m_WizFovManualUI = new PWizFovManualUI(this, m_WizardStack);
    m_WizFovShUI = new PWizFovShUI(this, m_WizardStack);
    m_WizFovBrowseUI = new PWizFovBrowseUI(this, m_WizardStack);
    m_WizChartContentsUI = new PWizChartContentsUI(this, m_WizardStack);
    m_WizPrintUI = new PWizPrintUI(this, m_WizardStack);

    // Add step widgets to m_WizardStack
    m_WizardStack->addWidget(m_WizWelcomeUI);
    m_WizardStack->addWidget(m_WizObjectSelectionUI);
    m_WizardStack->addWidget(m_WizChartConfigUI);
    m_WizardStack->addWidget(m_WizFovTypeSelectionUI);
    m_WizardStack->addWidget(m_WizFovConfigUI);
    m_WizardStack->addWidget(m_WizFovManualUI);
    m_WizardStack->addWidget(m_WizFovShUI);
    m_WizardStack->addWidget(m_WizFovBrowseUI);
    m_WizardStack->addWidget(m_WizChartContentsUI);
    m_WizardStack->addWidget(m_WizPrintUI);

    // Set banner images for steps
    QPixmap bannerImg;
    if(bannerImg.load(KSPaths::locate(QStandardPaths::GenericDataLocation, "wzstars.png")))
    {
        m_WizWelcomeUI->banner->setPixmap(bannerImg);
        m_WizObjectSelectionUI->banner->setPixmap(bannerImg);
        m_WizChartConfigUI->banner->setPixmap(bannerImg);
        m_WizFovTypeSelectionUI->banner->setPixmap(bannerImg);
        m_WizFovConfigUI->banner->setPixmap(bannerImg);
        m_WizFovManualUI->banner->setPixmap(bannerImg);
        m_WizFovShUI->banner->setPixmap(bannerImg);
        m_WizFovBrowseUI->banner->setPixmap(bannerImg);
        m_WizChartContentsUI->banner->setPixmap(bannerImg);
        m_WizPrintUI->banner->setPixmap(bannerImg);
    }


    backB->setEnabled(false);
}