本文整理汇总了C++中QPushButton::disconnect方法的典型用法代码示例。如果您正苦于以下问题:C++ QPushButton::disconnect方法的具体用法?C++ QPushButton::disconnect怎么用?C++ QPushButton::disconnect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QPushButton
的用法示例。
在下文中一共展示了QPushButton::disconnect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: removeUser
void RosterScreen::removeUser(QString userID) {
bool contains = this->pointerMap.contains(userID);
if (contains) {
QPushButton* p = (QPushButton*) this->pointerMap.value(userID);
this->signalMap->removeMappings(p);
p->disconnect();
this->layout->removeWidget(p);
delete p;
this->pointerMap.remove(userID);
this->jabberMap.remove(userID);
for (int i = 0; i < this->layout->count(); i++) {
QWidget* w = this->layout->itemAt(i)->widget();
w->setMinimumWidth(this->parentWidget()->width());
}
}
}
示例2: if
AboutDialog::AboutDialog(SettingsModel *settings, QWidget *parent, bool firstStart)
:
QMessageBox(parent),
m_settings(settings),
m_disque(NULL),
m_disqueTimer(NULL),
m_rotateNext(false),
m_disqueDelay(_I64_MAX)
{
const QString versionStr = QString().sprintf
(
"Version %d.%02d %s, Build %d [%s], %s %s, Qt v%s",
lamexp_version_major(),
lamexp_version_minor(),
lamexp_version_release(),
lamexp_version_build(),
lamexp_version_date().toString(Qt::ISODate).toLatin1().constData(),
lamexp_version_compiler(),
lamexp_version_arch(),
qVersion()
);
const QString copyrightStr = QString().sprintf
(
"Copyright (C) 2004-%04d LoRd_MuldeR <[email protected]>. Some rights reserved.",
qMax(lamexp_version_date().year(), QDate::currentDate().year())
);
for(int i = 0; i < 4; i++)
{
m_cartoon[i] = NULL;
}
QString aboutText;
aboutText += QString("<h2>%1</h2>").arg(NOBR(tr("LameXP - Audio Encoder Front-end")));
aboutText += QString("<b>%1</b><br>").arg(NOBR(copyrightStr));
aboutText += QString("<b>%1</b><br><br>").arg(NOBR(versionStr));
aboutText += QString("%1<br>").arg(NOBR(tr("Please visit %1 for news and updates!").arg(LINK(lamexp_website_url()))));
if(LAMEXP_DEBUG)
{
int daysLeft = qMax(QDate::currentDate().daysTo(lamexp_version_expires()), 0);
aboutText += QString("<hr><font color=\"crimson\">%1</font>").arg(NOBR(QString("!!! --- DEBUG BUILD --- Expires at: %1 · Days left: %2 --- DEBUG BUILD --- !!!").arg(lamexp_version_expires().toString(Qt::ISODate), QString::number(daysLeft))));
}
else if(lamexp_version_demo())
{
int daysLeft = qMax(QDate::currentDate().daysTo(lamexp_version_expires()), 0);
aboutText += QString("<hr><font color=\"crimson\">%1</font>").arg(NOBR(tr("Note: This demo (pre-release) version of LameXP will expire at %1. Still %2 days left.").arg(lamexp_version_expires().toString(Qt::ISODate), QString::number(daysLeft))));
}
aboutText += "<hr><br>";
aboutText += "<nobr><tt>This program is free software; you can redistribute it and/or<br>";
aboutText += "modify it under the terms of the GNU General Public License<br>";
aboutText += "as published by the Free Software Foundation; either version 2<br>";
aboutText += "of the License, or (at your option) any later version.<br><br>";
aboutText += "This program is distributed in the hope that it will be useful,<br>";
aboutText += "but WITHOUT ANY WARRANTY; without even the implied warranty of<br>";
aboutText += "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>";
aboutText += "GNU General Public License for more details.<br><br>";
aboutText += "You should have received a copy of the GNU General Public License<br>";
aboutText += "along with this program; if not, write to the Free Software<br>";
aboutText += "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110−1301, USA.</tt></nobr><br>";
aboutText += "<hr><table><tr>";
aboutText += "<td valign=\"middle\"><img src=\":/icons/error_big.png\"</td><td> </td>";
aboutText += QString("<td><font color=\"darkred\">%1</font></td>").arg(tr("Note: LameXP is free software. Do <b>not</b> pay money to obtain or use LameXP! If some third-party website tries to make you pay for downloading LameXP, you should <b>not</b> respond to the offer !!!"));
aboutText += "</tr></table><hr><br>";
aboutText += QString("%1<br>").arg(NOBR(tr("Special thanks go out to \"John33\" from %1 for his continuous support.")).arg(LINK("http://www.rarewares.org/")));
setText(aboutText);
setIconPixmap(dynamic_cast<QApplication*>(QApplication::instance())->windowIcon().pixmap(QSize(64,64)));
setWindowTitle(tr("About LameXP"));
if(firstStart)
{
QPushButton *firstButton = addButton(tr("Show License Text"), QMessageBox::AcceptRole);
firstButton->setIcon(QIcon(":/icons/script.png"));
firstButton->setIconSize(QSize(16, 16));
firstButton->setMinimumWidth(135);
firstButton->disconnect();
connect(firstButton, SIGNAL(clicked()), this, SLOT(openLicenseText()));
QPushButton *secondButton = addButton(tr("Accept License"), QMessageBox::AcceptRole);
secondButton->setIcon(QIcon(":/icons/accept.png"));
secondButton->setIconSize(QSize(16, 16));
secondButton->setMinimumWidth(120);
QPushButton *thirdButton = addButton(tr("Decline License"), QMessageBox::AcceptRole);
thirdButton->setIcon(QIcon(":/icons/delete.png"));
thirdButton->setIconSize(QSize(16, 16));
thirdButton->setMinimumWidth(120);
thirdButton->setEnabled(false);
}
else
{
QPushButton *firstButton = addButton(tr("3rd Party S/W"), QMessageBox::AcceptRole);
firstButton->setIcon(QIcon(":/icons/page_white_cplusplus.png"));
firstButton->setIconSize(QSize(16, 16));
firstButton->setMinimumWidth(120);
firstButton->disconnect();
connect(firstButton, SIGNAL(clicked()), this, SLOT(showMoreAbout()));
//.........这里部分代码省略.........