本文整理汇总了C++中slotChanged函数的典型用法代码示例。如果您正苦于以下问题:C++ slotChanged函数的具体用法?C++ slotChanged怎么用?C++ slotChanged使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了slotChanged函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
}
开发者ID:KDE,项目名称:kio,代码行数:55,代码来源:searchproviderdlg.cpp
示例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()));
}
开发者ID:crayonink,项目名称:calligra-2,代码行数:12,代码来源:kpttaskcostpanel.cpp
示例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()));
}
开发者ID:halsten,项目名称:beaverdbg,代码行数:12,代码来源:basecheckoutwizardpage.cpp
示例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);
}
开发者ID:TheTypoMaster,项目名称:calligra,代码行数:52,代码来源:kptwbsdefinitionpanel.cpp
示例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();
}
开发者ID:serghei,项目名称:kde3-kdemultimedia,代码行数:52,代码来源:userinterface.cpp
示例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()));
}
开发者ID:01iv3r,项目名称:OpenPilot,代码行数:13,代码来源:projectintropage.cpp
示例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();
}
开发者ID:Jorsorokin,项目名称:julia-studio,代码行数:7,代码来源:basecheckoutwizardpage.cpp
示例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);
}
}
开发者ID:KDE,项目名称:kde-runtime,代码行数:47,代码来源:searchproviderdlg.cpp
示例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)));
}
开发者ID:Daylie,项目名称:Totem,代码行数:8,代码来源:basevalidatinglineedit.cpp
示例10: slotChanged
void rotate_dialog::rotate_right()
{
using_coordinates* param = (using_coordinates*) tool->get_param();
param->set_angle(current_angle+=90.0);
emit slotChanged();
}
开发者ID:CervecerosCodigo,项目名称:CCIMP,代码行数:8,代码来源:rotate_dialog.cpp
示例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() ) );
}
开发者ID:delight,项目名称:Pana,代码行数:8,代码来源:columnlist.cpp
示例12: QWidget
//-----------------------------
TaskDescriptionPanelImpl::TaskDescriptionPanelImpl( Node &node, QWidget *p )
: QWidget(p),
m_node(node)
{
setupUi(this);
connect( descriptionfield, SIGNAL(textChanged()), SLOT(slotChanged()) );
}
开发者ID:crayonink,项目名称:calligra-2,代码行数:10,代码来源:kpttaskdescriptiondialog.cpp
示例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()));
}
开发者ID:UIKit0,项目名称:kate,代码行数:56,代码来源:timedate_config.cpp
示例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();
}
开发者ID:KDE,项目名称:calligra-history,代码行数:10,代码来源:kptwbsdefinitionpanel.cpp
示例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();
}
}
}
开发者ID:Fat-Zer,项目名称:kdeartwork,代码行数:55,代码来源:kxsconfig.cpp
示例16: connect
vkAuth::vkAuth(QString appId, QWidget *parent):QWebView(parent)
{
connect(this, SIGNAL(urlChanged(QUrl)), this, SLOT(slotChanged(QUrl)));
QUrl url("http://api.vkontakte.ru/oauth/authorize");
url.addQueryItem("client_id", appId);
url.addQueryItem("display", "popup");
url.addQueryItem("scope", "friends,video,offline");
url.addQueryItem("redirect_uri","http://api.vkontakte.ru/blank.html");
url.addQueryItem("response_type", "token");
this->load(url);
}
开发者ID:4ukuta,项目名称:core,代码行数:13,代码来源:vkAuth.cpp
示例17: KDialog
LocaleConfigMoneyDialog::LocaleConfigMoneyDialog( KLocale *locale, QWidget *p)
: KDialog( p)
{
setCaption( i18n("Currency Settings") );
setButtons( Ok|Cancel );
showButtonSeparator( true );
m_panel = new LocaleConfigMoney( locale, this);
setMainWidget(m_panel);
enableButtonOk(false);
connect(m_panel, SIGNAL(localeChanged()), SLOT(slotChanged()));
}
开发者ID:TheTypoMaster,项目名称:calligra,代码行数:14,代码来源:kptlocaleconfigmoneydialog.cpp
示例18: slotChanged
// show color dialog for the entry
void OptionsDialog::slotColItemSelected(QListBoxItem *it)
{
if (it) {
ColorListItem *colorItem = static_cast<ColorListItem*>(it);
QColor col = colorItem->color();
int result = KColorDialog::getColor(col,this);
if (result == KColorDialog::Accepted) {
colorItem->setColor(col);
c_List->triggerUpdate(false);
slotChanged();
}
}
}
开发者ID:serghei,项目名称:kde3-kdenetwork,代码行数:15,代码来源:options.cpp
示例19: branches
void BaseCheckoutWizardPage::slotRefreshBranches()
{
if (!isBranchSelectorVisible())
return;
// Refresh branch list on demand. This is hard to make
// automagically since there can be network slowness/timeouts, etc.
int current;
const QStringList branchList = branches(repository(), ¤t);
d->ui.branchComboBox->clear();
d->ui.branchComboBox->setEnabled(branchList.size() > 1);
if (!branchList.isEmpty()) {
d->ui.branchComboBox->addItems(branchList);
if (current >= 0 && current < branchList.size())
d->ui.branchComboBox->setCurrentIndex(current);
}
slotChanged();
}
开发者ID:Jorsorokin,项目名称:julia-studio,代码行数:17,代码来源:basecheckoutwizardpage.cpp
示例20: m_cmdline
//***************************************************************************
Kwave::App::App(int &argc, char **argv)
:QApplication(argc, argv),
m_cmdline(0),
m_recent_files(),
m_top_widgets(),
m_gui_type(Kwave::App::GUI_TAB)
{
qRegisterMetaType<Kwave::SampleArray>("Kwave::SampleArray");
qRegisterMetaType<Kwave::LabelList>("Kwave::LabelList");
qRegisterMetaType<sample_index_t>("sample_index_t");
qRegisterMetaType<Kwave::MetaDataList>("Kwave::MetaDataList");
// connect the clipboard
connect(QApplication::clipboard(),
SIGNAL(changed(QClipboard::Mode)),
&(Kwave::ClipBoard::instance()),
SLOT(slotChanged(QClipboard::Mode)));
}
开发者ID:KDE,项目名称:kwave,代码行数:19,代码来源:App.cpp
注:本文中的slotChanged函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论