• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ setLabelText函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中setLabelText函数的典型用法代码示例。如果您正苦于以下问题:C++ setLabelText函数的具体用法?C++ setLabelText怎么用?C++ setLabelText使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了setLabelText函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: Pin2DialogProc

INT_PTR CALLBACK Pin2DialogProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {	
	static char *pin2;
	switch(message) {
		case WM_INITDIALOG:
			setLabelText(hwnd, IDC_NAME, ((DialogData *)lParam)->name);
			if(((DialogData *)lParam)->message != NULL) {
				setLabelText(hwnd, IDC_ERROR, ((DialogData *)lParam)->message);
			}
			pin2 = ((DialogData *)lParam)->pin2;
			return true;
		case WM_COMMAND:
			switch(LOWORD(wParam)) {
				case IDOK:
					GetDlgItemText(hwnd, IDC_PIN2, pin2, PIN2_MAX_LEN);
				case IDCANCEL:
					EndDialog(hwnd, LOWORD(wParam));
					break;
			}
			if(HIWORD(wParam) == EN_CHANGE && LOWORD(wParam) == IDC_PIN2) {
				Button_Enable(GetDlgItem(hwnd, IDOK), isAcceptableLengthPIN2(hwnd, IDC_PIN2));
			}
			return true;
		case WM_CTLCOLORSTATIC:
			if(GetDlgItem(hwnd, IDC_ERROR) == ((HWND)lParam)){
				SetTextColor((HDC)wParam, RGB(255, 0, 0));
				SetBkColor((HDC)wParam, GetSysColor(COLOR_BTNFACE));
				return (INT_PTR)GetStockObject(NULL_BRUSH);
			}			
		default:
			return false;
	}
	return DefWindowProc(hwnd, message, wParam, lParam);	
}
开发者ID:Krabi,项目名称:idkaart_public,代码行数:33,代码来源:dialogs-win.c


示例2: setLabelText

void ofxUIDropDownList::checkAndSetTitleLabel()
{
    if(bShowCurrentSelected && selected.size() > 0)
    {
        string title = "";
        int index = 0;
        for(vector<ofxUIWidget *>::iterator it = selected.begin(); it != selected.end(); it++)
        {
            if(index == 0)
            {
                title+=(*it)->getName();
            }
            else
            {
                title+=","+(*it)->getName();
            }
            index++;
        }
        if(title.length())
        {
            setLabelText(title);
        }
    }
    else
    {
        setLabelText(name);
    }
}
开发者ID:MartinHN,项目名称:ofxUI,代码行数:28,代码来源:ofxUIDropDownList.cpp


示例3: setLabelText

void ScanProgressDialog::setDeviceName(const QString& d)
{
	if (d.isEmpty())
		setLabelText(i18nc("@label", "Scanning..."));
	else
		setLabelText(xi18nc("@label", "Scanning device: <filename>%1</filename>", d));
}
开发者ID:Acidburn0zzz,项目名称:partitionmanager,代码行数:7,代码来源:scanprogressdialog.cpp


示例4: helper

void RecursiveDirJob::run()
{
    RecursiveDirJobHelper helper(m_pd != NULL); //report progress info if pd != NULL

    connect(&helper, SIGNAL(setValue(quint64)),
            this, SLOT(setValue(quint64)), Qt::QueuedConnection);
    connect(&helper, SIGNAL(setMaximum(quint64)),
            this, SLOT(setMaximum(quint64)), Qt::QueuedConnection);
    connect(&helper, SIGNAL(setLabelText(QString)),
            this, SLOT(setLabelText(QString)), Qt::QueuedConnection);

    qRegisterMetaType<RecursiveDirJob::Error>();
    connect(&helper, SIGNAL(errorOccured(RecursiveDirJob::Error)),
            this, SLOT(slotErrorOccured(RecursiveDirJob::Error)), Qt::QueuedConnection);

    switch( d->m_jobType ) {
        case CalculateDirSize:
            d->m_result = helper.calculateDirSize(d->m_args[0].toString());
            break;
        case CpDir:
            helper.recursiveCpDir(d->m_args[0].toString(), d->m_args[1].toString(),
                                    d->m_args[2].value<CopyOptions>());
            break;
        case RmDir:
            helper.recursiveRmDir(d->m_args[0].toString());
            break;
        default:
            Q_ASSERT(false);
    }
}
开发者ID:netrunner-debian-attic,项目名称:kaboom,代码行数:30,代码来源:recursivedirjob.cpp


示例5: setLabelText

void UpdaterDialog::updateDone(bool result)
{
  if (result)
    setLabelText(tr("There's a new version available,<br> please see <a href=\"http://lightscreen.sourceforge.net/new-version\">the Lighscreen website</a>."));
  else
    setLabelText(tr("No new versions available"));

  setMaximum(1);

  setCancelButtonText(tr("Close"));
}
开发者ID:manjeetdahiya,项目名称:lightscreen-clone,代码行数:11,代码来源:updaterdialog.cpp


示例6: setLabelText

void UpdaterDialog::updateDone(bool result)
{
    if (result) {
        setLabelText(tr("There's a new version available,<br> please see <a href=\"https://lightscreen.com.ar/whatsnew/%1\">the Lighscreen website</a>.").arg(qApp->applicationVersion()));
    } else {
        setLabelText(tr("No new versions available."));
    }

    setMaximum(1);

    setCancelButtonText(tr("Close"));
}
开发者ID:Neyoui,项目名称:Lightscreen,代码行数:12,代码来源:updaterdialog.cpp


示例7: setLabelText

void Ui::setDetailedMode(bool mode)
{
    detailedMode = mode;

    if(detailedMode)
    {
        setLabelText(controls["Status"], statusStr);
        setLabelText(controls["TotalProgressLabel"], msg("Total progress"));
    }
    else
        setLabelText(controls["TotalProgressLabel"], statusStr);
}
开发者ID:SCORE42,项目名称:inno-download-plugin,代码行数:12,代码来源:ui.cpp


示例8: kdDebug

void Kleo::ProgressDialog::slotProgress(const QString &what, int current, int total)
{
    kdDebug(5150) << "Kleo::ProgressDialog::slotProgress( \"" << what << "\", "
                  << current << ", " << total << " )" << endl;
    if(mBaseText.isEmpty())
        setLabelText(what);
    else if(what.isEmpty())
        setLabelText(mBaseText);
    else
        setLabelText(i18n("%1: %2").arg(mBaseText, what));
    setProgress(current, total);
}
开发者ID:serghei,项目名称:kde3-kdepim,代码行数:12,代码来源:progressdialog.cpp


示例9: maWidgetSetProperty

/**
 * Show the screen.
 */
void HomeScreen::showScreen()
{
	// Make the home screen listen for key events.
	MAUtil::Environment::getEnvironment().addKeyListener(this);

	// Reset the progress bar value to 0, and dismiss it.
	maWidgetSetProperty(mProgressLabel,MAW_WIDGET_VISIBLE, "false");
	setWidgetProperty(mProgressBar,MAW_PROGRESS_BAR_PROGRESS, 0);
	maWidgetSetProperty(mProgressBar,MAW_WIDGET_VISIBLE, "false");
	maWidgetSetProperty(mSearchButton, MAW_WIDGET_ENABLED, "true");

	// Reset the slider value.
	setWidgetProperty(mSlider, MAW_SLIDER_VALUE, 10);

	// Clear the edit box.
	maWidgetSetProperty(mEditBox, MAW_EDIT_BOX_TEXT, "");

	// Check all categories.
	for (int i=0; i<mCategoryBoxes.size(); i++)
	{
		maWidgetSetProperty(mCategoryBoxes[i], MAW_CHECK_BOX_CHECKED, "true");
	}

	// Initialize the top text label.
	setLabelText(mLabel, " ");

	// Display this screen.
	BasicScreen::showScreen();
}
开发者ID:Vallenain,项目名称:MoSync,代码行数:32,代码来源:HomeScreen.cpp


示例10: QDialog

ProgressSlideshowDialog::ProgressSlideshowDialog(const QStringList &slidesDirectories, const QString &statusMsg, int changeInterval, QWidget *parent) :
    QDialog(parent),
    _pos(0),
    _changeInterval(changeInterval),
    _maxSectors(0),
    _pausedAt(0),
    ui(new Ui::ProgressSlideshowDialog)
{
    ui->setupUi(this);
    setLabelText(statusMsg);

    QRect s = QApplication::desktop()->screenGeometry();
    if (s.height() < 400)
        setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
    else
        setWindowFlags(Qt::Window | Qt::CustomizeWindowHint | Qt::WindowTitleHint);

    foreach (QString slidesDirectory, slidesDirectories)
    {
        QDir dir(slidesDirectory, "*.jpg *.jpeg *.png");
        if (dir.exists())
        {
            QStringList s = dir.entryList();
            s.sort();

            foreach (QString slide, s)
            {
                _slides.append(slidesDirectory+"/"+slide);
            }
开发者ID:Akkiesoft,项目名称:noobs,代码行数:29,代码来源:progressslideshowdialog.cpp


示例11: QMainWindow

AppWindow::AppWindow(QWidget *parent) : QMainWindow(parent),
    ui(new Ui::AppWindow)
{
    main_all_groups_window = new AllGroups();
    group_info_window = new GroupInfo(this);
    main_login_window = new LoginWindow(this);
    myAppWindow = new AppWindowData();

    this->setFixedSize(900, 600);

    connect(this, SIGNAL(sendGroupID(QString)), group_info_window, SLOT(setLabelText(QString)));

    ui->setupUi(this);

    addItemsToCourseNameComboBox();
    resetRowCount();
    setColumnsOfTable();

    main_login_window->show();

    QHeaderView* header = ui->listOfAllGroups->horizontalHeader();
    header->setSectionResizeMode(QHeaderView::Stretch);
    web_interface = HTTPInterface::getInstance();

    ui->deleteButton->hide();
    ui->userdeleteButton_2->hide();
    ui->adminprivButton->hide();
    ui->userlistbox->hide();


}
开发者ID:JMeyer0101,项目名称:StudyGroupApp,代码行数:31,代码来源:AppWindow.cpp


示例12: setLabelText

void Strip::resizeEvent(QResizeEvent* ev)
{
  //printf("Strip::resizeEvent\n");  
  QFrame::resizeEvent(ev);
  setLabelText();  
  setLabelFont();
}  
开发者ID:songo,项目名称:muse,代码行数:7,代码来源:strip.cpp


示例13: QWidget

LabeledLineEdit::LabeledLineEdit(String objectName, String label,
                                 String text, bool key) :
    QWidget(0),
    m_text(text),
    m_ui(new Ui::LabeledLineEdit)
{
    Logger::getInstance()->debug("LabeledLineEdit::LabeledLineEdit(String objectName, String label, String text, bool key)");
    m_ui->setupUi(this);
    setLabelText(label);
    setText(text);
    if (key) {
        m_ui->lineEdit->setReadOnly(true);
        m_ui->lineEdit->setStyleSheet("QLineEdit{background: pink;}");
    }


    setObjectName(objectName.c_str());

    connect(
        m_ui->lineEdit,
        SIGNAL(textChanged(QString)),
        this,
        SLOT(textChanged()));
    connect(
        m_ui->lineEdit,
        SIGNAL(editingFinished()),
        this,
        SLOT(itemChanged()));
}
开发者ID:mhatina,项目名称:openlmi_gui,代码行数:29,代码来源:labeledlineedit.cpp


示例14: QProgressDialog

DownloadDialog::DownloadDialog(QUrl source, QString destination, QWidget *parent)
    : QProgressDialog("Downloading", "Cancel", 0, 100, parent)
    , _download(nullptr)
    , _completed(false)
{
    setMinimumDuration(0);
    setWindowTitle("File Download");

    _destination.setFileName(destination);
    _destination.remove();

    if (_destination.open(QIODevice::WriteOnly))
    {
        QNetworkRequest request(source);
        request.setRawHeader("User-Agent", "Mozilla Firefox");
        _download = _manager.get(request);

        //qDebug() << _download->error();

        connect(_download, SIGNAL(downloadProgress(qint64,qint64)),
                SLOT(downloadProgress(qint64,qint64)));
        connect(_download, SIGNAL(finished()), SLOT(dispose()));
        connect(_download, SIGNAL(readyRead()), SLOT(downloadReadyRead()));
        connect(this, SIGNAL(canceled()), SLOT(dispose()));

        setLabelText("Downloading " + destination);
        setValue(0);
    }
}
开发者ID:StarWarsCCG,项目名称:HumanCyborgRelations,代码行数:29,代码来源:DownloadDialog.cpp


示例15: QDialog

QModernProgressDialog::QModernProgressDialog(const QString & labelText, const QString & cancelButtonText, QWidget* parent, Qt::WindowFlags f):
    QDialog(parent, f)
{
    createWidgets();
    setLabelText(labelText);
    setCancelButtonText(cancelButtonText);
}
开发者ID:jkriege2,项目名称:LitSoz3,代码行数:7,代码来源:qmodernprogresswidget.cpp


示例16: QProgressDialog

KRPleaseWait::KRPleaseWait(QString msg, QWidget *parent, int count, bool cancel):
        QProgressDialog(cancel ? 0 : parent) , inc(true)
{
    setModal(!cancel);

    timer = new QTimer(this);
    setWindowTitle(i18n("Krusader::Wait"));

    setMinimumDuration(500);
    setAutoClose(false);
    setAutoReset(false);

    connect(timer, SIGNAL(timeout()), this, SLOT(cycleProgress()));

    QProgressBar* progress = new QProgressBar(this);
    progress->setMaximum(count);
    progress->setMinimum(0);
    setBar(progress);

    QLabel* label = new QLabel(this);
    setLabel(label);

    QPushButton* btn = new QPushButton(i18n("&Cancel"), this);
    setCancelButton(btn);

    btn->setEnabled(canClose = cancel);
    setLabelText(msg);

    show();
}
开发者ID:aremai,项目名称:krusader,代码行数:30,代码来源:krpleasewait.cpp


示例17: onCancel

	void onCancel()
	{
		m_isCanceled = true;
		setLabelText("Aborting render...");
		reset();
		hide();
	}
开发者ID:ArseniyShestakov,项目名称:opentoonz,代码行数:7,代码来源:rendercommand.cpp


示例18: progress

bool Port::saveStreams(QString fileName, QString fileType, QString &error)
{
    bool ret = false;
    QProgressDialog progress("Saving Streams", "Cancel", 0, 0, mainWindow);
    AbstractFileFormat *fmt = AbstractFileFormat::fileFormatFromType(fileType);
    OstProto::StreamConfigList streams;

    if (fmt == NULL)
        goto _fail;

    progress.setAutoReset(false);
    progress.setAutoClose(false);
    progress.setMinimumDuration(0);
    progress.show();

    mainWindow->setDisabled(true);
    progress.setEnabled(true); // to override the mainWindow disable

    connect(fmt, SIGNAL(status(QString)),&progress,SLOT(setLabelText(QString)));
    connect(fmt, SIGNAL(target(int)), &progress, SLOT(setMaximum(int)));
    connect(fmt, SIGNAL(progress(int)), &progress, SLOT(setValue(int)));
    connect(&progress, SIGNAL(canceled()), fmt, SLOT(cancel()));

    progress.setLabelText("Preparing Streams...");
    progress.setRange(0, mStreams.size());
    streams.mutable_port_id()->set_id(0);
    for (int i = 0; i < mStreams.size(); i++)
    {
        OstProto::Stream *s = streams.add_stream();
        mStreams[i]->protoDataCopyInto(*s);

        if (progress.wasCanceled())
            goto _user_cancel;
        progress.setValue(i);
        if (i % 32 == 0)
            qApp->processEvents();
    }

    fmt->saveStreamsOffline(streams, fileName, error);
    qDebug("after save offline");

    while (!fmt->isFinished())
        qApp->processEvents();
    qDebug("wait over for offline operation");

    ret = fmt->result();
    goto _exit;

_user_cancel:
   goto _exit; 

_fail:
    error = QString("Unsupported File Type - %1").arg(fileType);
    goto _exit;

_exit:
    progress.close();
    mainWindow->setEnabled(true);
    return ret;
}
开发者ID:dancollins,项目名称:ostinato,代码行数:60,代码来源:port.cpp


示例19: qDebug

void FileSendProgressDialog::accept()
{
    qDebug() << "Accept called";
    
    setLabelText(tr("Waiting for %1 to accept").arg(m_to->name()));
    setRange(0, 0);
    QProgressDialog::accept();
}
开发者ID:Hardikkk,项目名称:qommunicate,代码行数:8,代码来源:sendfileprogressdialog.cpp


示例20: setLabelText

void InfoWidget::LabeledWidget::setLabeledText(
		const QString &label,
		const TextWithEntities &textWithEntities,
		const TextWithEntities &shortTextWithEntities,
		const QString &copyText,
		int availableWidth) {
	_label.destroy();
	_text.destroy();
	_shortText.destroy();
	if (textWithEntities.text.isEmpty()) return;

	_label.create(this, label, Ui::FlatLabel::InitType::Simple, st::settingsBlockLabel);
	_label->show();
	setLabelText(_text, textWithEntities, copyText);
	setLabelText(_shortText, shortTextWithEntities, copyText);
	resizeToNaturalWidth(availableWidth);
}
开发者ID:Federated-Blockchains-Initiative,项目名称:tdesktop,代码行数:17,代码来源:settings_info_widget.cpp



注:本文中的setLabelText函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ setLanguage函数代码示例发布时间:2022-05-30
下一篇:
C++ setLabel函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap