当前位置: 首页>>代码示例>>C++>>正文


C++ setLabelText函数代码示例

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


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


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