本文整理汇总了C++中slotChanged函数的典型用法代码示例。如果您正苦于以下问题:C++ slotChanged函数的具体用法?C++ slotChanged怎么用?C++ slotChanged使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了slotChanged函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QDialog
SearchProviderDialog::SearchProviderDialog(SearchProvider *provider, QList<SearchProvider*> &providers, QWidget *parent)
: QDialog( parent )
, m_provider(provider)
{
setModal(true);
m_buttons = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel, this);
connect(m_buttons, SIGNAL(accepted()), SLOT(accept()));
connect(m_buttons, SIGNAL(rejected()), SLOT(reject()));
QWidget* mainWidget = new QWidget(this);
m_dlg.setupUi(mainWidget);
QVBoxLayout* layout = new QVBoxLayout(this);
layout->addWidget(mainWidget);
layout->addWidget(m_buttons);
m_dlg.leQuery->setMinimumWidth(m_dlg.leQuery->fontMetrics().averageCharWidth() * 50);
connect(m_dlg.leName, SIGNAL(textChanged(QString)), SLOT(slotChanged()));
connect(m_dlg.leQuery, SIGNAL(textChanged(QString)), SLOT(slotChanged()));
connect(m_dlg.leShortcut, SIGNAL(textChanged(QString)), SLOT(slotChanged()));
connect(m_dlg.leShortcut, SIGNAL(textChanged(QString)), SLOT(shortcutsChanged(QString)));
connect(m_dlg.pbPaste, SIGNAL(clicked()), SLOT(pastePlaceholder()));
// Data init
m_providers = providers;
QStringList charsets = KCharsets::charsets()->availableEncodingNames();
charsets.prepend(i18nc("@item:inlistbox The default character set", "Default"));
m_dlg.cbCharset->addItems(charsets);
if (m_provider)
{
setWindowTitle(i18n("Modify Web Shortcut"));
m_dlg.leName->setText(m_provider->name());
m_dlg.leQuery->setText(m_provider->query());
m_dlg.leShortcut->setText(m_provider->keys().join(QStringLiteral(",")));
m_dlg.cbCharset->setCurrentIndex(m_provider->charset().isEmpty() ? 0 : charsets.indexOf(m_provider->charset()));
m_dlg.leName->setEnabled(false);
m_dlg.leQuery->setFocus();
}
else
{
setWindowTitle(i18n("New Web Shortcut"));
m_dlg.leName->setFocus();
//If the clipboard contains a url copy it to the query lineedit
const QClipboard *clipboard = QApplication::clipboard();
const QString url = clipboard->text();
if (!QUrl(url).host().isEmpty())
m_dlg.leQuery->setText(url);
m_buttons->button(QDialogButtonBox::Ok)->setEnabled(false);
}
}
示例2: QWidget
TaskCostPanelImpl::TaskCostPanelImpl(QWidget *p, const char *n)
: QWidget(p)
{
setObjectName(n);
setupUi(this);
connect(runningAccount, SIGNAL(activated(int)), SLOT(slotChanged()));
connect(startupAccount, SIGNAL(activated(int)), SLOT(slotChanged()));
connect(shutdownAccount, SIGNAL(activated(int)), SLOT(slotChanged()));
connect(startupCost, SIGNAL(textChanged(QString)), SLOT(slotChanged()));
connect(shutdownCost, SIGNAL(textChanged(QString)), SLOT(slotChanged()));
}
示例3: QWizardPage
BaseCheckoutWizardPage::BaseCheckoutWizardPage(QWidget *parent) :
QWizardPage(parent),
d(new BaseCheckoutWizardPagePrivate)
{
d->ui.setupUi(this);
d->ui.pathChooser->setExpectedKind(Utils::PathChooser::Directory);
connect(d->ui.pathChooser, SIGNAL(validChanged()), this, SLOT(slotChanged()));
connect(d->ui.checkoutDirectoryLineEdit, SIGNAL(validChanged()),
this, SLOT(slotChanged()));
connect(d->ui.repositoryLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotRepositoryChanged(QString)));
connect(d->ui.checkoutDirectoryLineEdit, SIGNAL(textEdited(QString)), this, SLOT(slotDirectoryEdited()));
}
示例4: QWidget
WBSDefinitionPanel::WBSDefinitionPanel( Project &project, WBSDefinition &def, QWidget *p, const char *n)
: QWidget(p),
m_project( project ),
m_def(def),
selectedRow(-1)
{
setObjectName(n);
setupUi(this);
projectCode->setText( m_def.projectCode() );
projectSeparator->setText( m_def.projectSeparator() );
QStringList codeList = m_def.codeList();
kDebug(planDbg())<<codeList;
defaultSeparator->setText(m_def.defaultSeparator());
defaultCode->addItems(codeList);
defaultCode->setCurrentIndex(m_def.defaultCodeIndex());
defaultCode->setFocus();
levelsTable->setItemDelegateForColumn(0, new ComboBoxDelegate(codeList, this));
levelsGroup->setChecked(m_def.isLevelsDefEnabled());
int i = 0;
const QMap<int, WBSDefinition::CodeDef> &lev = m_def.levelsDef();
levelsTable->setRowCount(lev.count());
QStringList sl;
kDebug(planDbg())<<"Map size="<<lev.count();
QMap<int, WBSDefinition::CodeDef>::const_iterator it;
for (it = lev.begin(); it != lev.end(); ++it) {
sl << QString("%1").arg(it.key());
QTableWidgetItem *item = new QTableWidgetItem();
item->setData(Qt::DisplayRole, it.value().code);
levelsTable->setItem(i, 0, item);
item = new QTableWidgetItem();
item->setText(it.value().separator);
levelsTable->setItem(i, 1, item);
i++;
}
levelsTable->setVerticalHeaderLabels(sl);
//levelsTable->setColumnStretchable(0, true);
slotLevelChanged(level->value());
connect(projectCode, SIGNAL(textChanged(QString)), SLOT(slotChanged()));
connect(projectSeparator, SIGNAL(textChanged(QString)), SLOT(slotChanged()));
connect(defaultCode, SIGNAL(activated(int)), SLOT(slotChanged()));
connect(defaultSeparator, SIGNAL(textChanged(QString)), SLOT(slotChanged()));
connect(levelsGroup, SIGNAL(toggled(bool)), SLOT(slotLevelsGroupToggled(bool)));
connect(levelsTable, SIGNAL(cellChanged(int,int)), SLOT(slotChanged()));
connect(levelsTable, SIGNAL(itemSelectionChanged()), SLOT(slotSelectionChanged()));
connect(level, SIGNAL(valueChanged(int)), SLOT(slotLevelChanged(int)));
connect(removeBtn, SIGNAL(clicked(bool)), SLOT(slotRemoveBtnClicked()));
connect(addBtn, SIGNAL(clicked(bool)), SLOT(slotAddBtnClicked()));
removeBtn->setEnabled(false);
}
示例5: KMainWindow
SimpleUI::SimpleUI()
: KMainWindow(0, "NoatunSimpleUI"), UserInterface()
{
setAcceptDrops( true );
setCaption( i18n("Noatun") );
setIcon( SmallIcon( "noatun" ) );
setupCentralWidget();
setupActions();
contextMenu = video->popupMenu( this );
setupGUI( StatusBar|Create, "simpleui.rc" );
connect( napp->player(), SIGNAL(playing()), SLOT(slotPlaying()) );
connect( napp->player(), SIGNAL(stopped()), SLOT(slotStopped()) );
connect( napp->player(), SIGNAL(paused()), SLOT(slotPaused()) );
connect( napp->player(), SIGNAL(timeout()), SLOT(slotTimeout()) );
connect( napp->player(), SIGNAL(newSong()), SLOT(slotChanged()) );
connect( napp->player(), SIGNAL(volumeChanged(int)), SLOT(slotVolumeChanged(int)) );
connect( napp, SIGNAL(hideYourself()), SLOT(hide()) );
connect( napp, SIGNAL(showYourself()), SLOT(show()) );
napp->player()->handleButtons();
resize( minimumSize() );
// Show UI and calculate video widget frame
show();
extra_width = (width() - video->width());
extra_height = (height() - video->height());
// Load configuration
KConfig &config = *KGlobal::config();
config.setGroup( "Simple" );
QString str = config.readEntry( "View", "NormalSize" );
if (str == "HalfSize")
video->setHalfSize();
else if (str == "NormalSize")
video->setNormalSize();
else if (str == "DoubleSize")
video->setDoubleSize();
else
applyMainWindowSettings( &config, "Simple" );
// PlayObject could be running, update video widget
slotChanged();
video->give();
}
示例6: QWizardPage
ProjectIntroPage::ProjectIntroPage(QWidget *parent) :
QWizardPage(parent),
m_d(new ProjectIntroPagePrivate)
{
m_d->m_ui.setupUi(this);
hideStatusLabel();
m_d->m_ui.nameLineEdit->setInitialText(tr("<Enter_Name>"));
m_d->m_ui.nameLineEdit->setFocus(Qt::TabFocusReason);
connect(m_d->m_ui.pathChooser, SIGNAL(changed(QString)), this, SLOT(slotChanged()));
connect(m_d->m_ui.nameLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotChanged()));
connect(m_d->m_ui.pathChooser, SIGNAL(returnPressed()), this, SLOT(slotActivated()));
connect(m_d->m_ui.nameLineEdit, SIGNAL(validReturnPressed()), this, SLOT(slotActivated()));
}
示例7: slotChanged
void BaseCheckoutWizardPage::slotRepositoryChanged(const QString &repo)
{
// Derive directory name from repository unless user manually edited it.
if (!d->m_directoryEdited)
d->ui.checkoutDirectoryLineEdit->setText(directoryFromRepository(repo));
slotChanged();
}
示例8: KDialog
SearchProviderDialog::SearchProviderDialog(SearchProvider *provider, QList<SearchProvider*> &providers, QWidget *parent)
: KDialog( parent )
, m_provider(provider)
{
setModal(true);
setButtons( Ok | Cancel );
m_dlg.setupUi(mainWidget());
m_dlg.leQuery->setMinimumWidth(kapp->fontMetrics().averageCharWidth() * 50);
connect(m_dlg.leName, SIGNAL(textChanged(QString)), SLOT(slotChanged()));
connect(m_dlg.leQuery, SIGNAL(textChanged(QString)), SLOT(slotChanged()));
connect(m_dlg.leShortcut, SIGNAL(textChanged(QString)), SLOT(slotChanged()));
connect(m_dlg.leShortcut, SIGNAL(textChanged(QString)), SLOT(shortcutsChanged(QString)));
connect(m_dlg.pbPaste, SIGNAL(clicked()), SLOT(pastePlaceholder()));
// Data init
m_providers = providers;
QStringList charsets = KGlobal::charsets()->availableEncodingNames();
charsets.prepend(i18nc("@item:inlistbox The default character set", "Default"));
m_dlg.cbCharset->addItems(charsets);
if (m_provider)
{
setPlainCaption(i18n("Modify Web Shortcut"));
m_dlg.leName->setText(m_provider->name());
m_dlg.leQuery->setText(m_provider->query());
m_dlg.leShortcut->setText(m_provider->keys().join(","));
m_dlg.cbCharset->setCurrentIndex(m_provider->charset().isEmpty() ? 0 : charsets.indexOf(m_provider->charset()));
m_dlg.leName->setEnabled(false);
m_dlg.leQuery->setFocus();
}
else
{
setPlainCaption(i18n("New Web Shortcut"));
m_dlg.leName->setFocus();
//If the clipboard contains a url copy it to the query lineedit
const QClipboard *clipboard = QApplication::clipboard();
const QString url = clipboard->text();
if (!KUrl(url).host().isEmpty())
m_dlg.leQuery->setText(url);
enableButton(Ok, false);
}
}
示例9: FancyLineEdit
BaseValidatingLineEdit::BaseValidatingLineEdit(QWidget *parent) :
FancyLineEdit(parent),
m_bd(new BaseValidatingLineEditPrivate(this))
{
// Note that textChanged() is also triggered automagically by
// QLineEdit::setText(), no need to trigger manually.
connect(this, SIGNAL(textChanged(QString)), this, SLOT(slotChanged(QString)));
}
示例10: slotChanged
void rotate_dialog::rotate_right()
{
using_coordinates* param = (using_coordinates*) tool->get_param();
param->set_angle(current_angle+=90.0);
emit slotChanged();
}
示例11: KDialogBase
ColumnsDialog::ColumnsDialog()
: KDialogBase( PlaylistWindow::self(), 0, false, i18n( "Playlist Columns" ) ),
m_list( new ColumnList( this ) )
{
setMainWidget( m_list );
enableButtonApply( false );
connect( m_list, SIGNAL( changed() ), this, SLOT( slotChanged() ) );
}
示例12: QWidget
//-----------------------------
TaskDescriptionPanelImpl::TaskDescriptionPanelImpl( Node &node, QWidget *p )
: QWidget(p),
m_node(node)
{
setupUi(this);
connect( descriptionfield, SIGNAL(textChanged()), SLOT(slotChanged()) );
}
示例13: KCModule
TimeDateConfig::TimeDateConfig(QWidget *parent, const QVariantList &args)
: KCModule(TimeDatePluginFactory::componentData(), parent, args)
{
QVBoxLayout *layout = new QVBoxLayout(this);
QLabel *info = new QLabel(i18n(
"%y\t2-digit year excluding century (00 - 99)\n"
"%Y\tfull year number\n"
"%:m\tmonth number, without leading zero (1 - 12)\n"
"%m\tmonth number, 2 digits (01 - 12)\n"
"%b\tabbreviated month name\n"
"%B\tfull month name\n"
"%e\tday of the month (1 - 31)\n"
"%d\tday of the month, 2 digits (01 - 31)\n"
"%a\tabbreviated weekday name\n"
"%A\tfull weekday name\n"
"\n"
"%H\thour in the 24 hour clock, 2 digits (00 - 23)\n"
"%k\thour in the 24 hour clock, without leading zero (0 - 23)\n"
"%I\thour in the 12 hour clock, 2 digits (01 - 12)\n"
"%l\thour in the 12 hour clock, without leading zero (1 - 12)\n"
"%M\tminute, 2 digits (00 - 59)\n"
"%S\tseconds (00 - 59)\n"
"%P\t\"am\" or \"pm\"\n"
"%p\t\"AM\" or \"PM\"\n"));
// It is possible that the plugin has not been loaded yet, and the
// configuration dialog has been asked to be shown. In that case, it is our
// turn to set the static string to the correct value.
if (localizedTimeDate.isNull())
{
localizedTimeDate = i18nc("This is a localized string for default time & date printing on kate document."
"%d means day in XX format."
"%m means month in XX format."
"%Y means year in XXXX format."
"%H means hours in XX format."
"%M means minutes in XX format."
"Please, if in your language time or date is written in a different order, change it here",
"%d-%m-%Y %H:%M");
}
QHBoxLayout *hlayout = new QHBoxLayout(this);
QLabel *lformat = new QLabel(i18n("Format"));
format = new KLineEdit(this);
hlayout->addWidget(lformat);
hlayout->addWidget(format);
layout->addWidget(info);
layout->addLayout(hlayout);
setLayout(layout);
load();
QObject::connect(format, SIGNAL(textChanged(QString)), this, SLOT(slotChanged()));
}
示例14: slotChanged
void WBSDefinitionPanel::slotLevelChanged(int value) {
for (int i=0; i < levelsTable->rowCount(); ++i) {
if (value == levelsTable->verticalHeaderItem(i)->text().toInt()) {
addBtn->setEnabled(false);
return;
}
}
addBtn->setEnabled(levelsGroup->isChecked());
slotChanged();
}
示例15: long
//---------------------------------------------------------------------------
void KXSConfigDialog::slotPreviewExited(KProcess *)
{
if ( mKilled ) {
mKilled = false;
mPreviewProc->clearArguments();
TQString saver;
saver.sprintf( "%s -window-id 0x%lX", mFilename.latin1(), long(mPreview->winId()) );
saver += command();
kdDebug() << "Command: " << saver << endl;
unsigned int i = 0;
TQString word;
saver = saver.stripWhiteSpace();
while ( !saver[i].isSpace() ) word += saver[i++];
//work around a KStandarDirs::findExe() "feature" where it looks in $KDEDIR/bin first no matter what and sometimes finds the wrong executable
TQFileInfo checkExe;
TQString saverdir = TQString("%1/%2").tqarg(XSCREENSAVER_HACKS_DIR).tqarg(word);
TQString path;
checkExe.setFile(saverdir);
if (checkExe.exists() && checkExe.isExecutable() && checkExe.isFile())
{
path = saverdir;
}
if (!path.isEmpty()) {
(*mPreviewProc) << path;
bool inQuotes = false;
while ( i < saver.length() ) {
word = "";
while ( saver[i].isSpace() && i < saver.length() ) i++;
while ( (!saver[i].isSpace() || inQuotes) && i < saver.length() ) {
if ( saver[i] == '\"' ) {
inQuotes = !inQuotes;
} else {
word += saver[i];
}
i++;
}
if (!word.isEmpty()) {
(*mPreviewProc) << word;
}
}
mPreviewProc->start();
}
} else {
// stops us from spawning the hack really fast, but still not the best
TQString path = KStandardDirs::findExe(mFilename, XSCREENSAVER_HACKS_DIR);
if ( TQFile::exists(path) ) {
mKilled = true;
slotChanged();
}
}
}