コード例 #1
0
ファイル: searchproviderdlg.cpp プロジェクト: KDE/kio
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
0
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
0
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
0
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
0
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
0
ファイル: projectintropage.cpp プロジェクト: 01iv3r/OpenPilot
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
0
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
0
ファイル: searchproviderdlg.cpp プロジェクト: KDE/kde-runtime
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
0
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
0
void rotate_dialog::rotate_right()
{
    using_coordinates* param = (using_coordinates*) tool->get_param();
    param->set_angle(current_angle+=90.0);

    emit slotChanged();

}
コード例 #11
0
ファイル: columnlist.cpp プロジェクト: delight/Pana
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
0
void rotate_dialog::on_dial_valueChanged(int value)
{
    if(!protecting_value_changed){
        using_coordinates* param = (using_coordinates*) tool->get_param();
        param->set_angle(ui->dial->value()*1.0);
        emit slotChanged();
    }
}
コード例 #13
0
//-----------------------------
TaskDescriptionPanelImpl::TaskDescriptionPanelImpl( Node &node, QWidget *p )
    : QWidget(p),
      m_node(node)
{

    setupUi(this);

    connect( descriptionfield, SIGNAL(textChanged()), SLOT(slotChanged()) );
}
コード例 #14
0
void KEditListBoxManager::init()
{
	connect( this, SIGNAL( changed() ), this, SLOT( slotChanged() ) );
	connect( this, SIGNAL( added( const QString& ) ), this, SLOT( slotAdded( const QString& ) ) );
	connect( this, SIGNAL( removed( const QString& ) ), this, SLOT( slotRemoved( const QString& ) ) );
	
	connect( this->listBox(), SIGNAL( doubleClicked( QListBoxItem * ) ), this, SLOT( slotActivated( QListBoxItem * ) ) );
	connect( this->listBox(), SIGNAL( returnPressed( QListBoxItem * ) ), this, SLOT( slotActivated( QListBoxItem * ) ) );
}
コード例 #15
0
ファイル: timedate_config.cpp プロジェクト: UIKit0/kate
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()));
}
コード例 #16
0
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();
}
コード例 #17
0
ファイル: kxsconfig.cpp プロジェクト: Fat-Zer/kdeartwork
//---------------------------------------------------------------------------
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();
	}
    }
}
コード例 #18
0
ファイル: vkAuth.cpp プロジェクト: 4ukuta/core
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);

}
コード例 #19
0
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()));
}
コード例 #20
0
ファイル: options.cpp プロジェクト: serghei/kde3-kdenetwork
// 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();
    }
  }
}
コード例 #21
0
ファイル: options.cpp プロジェクト: serghei/kde3-kdenetwork
// show font dialog for the entry
void OptionsDialog::slotFontItemSelected(QListBoxItem *it)
{
  if (it) {
    FontListItem *fontItem = static_cast<FontListItem*>(it);
    QFont font = fontItem->font();
    int result = KFontDialog::getFont(font,false,this);

    if (result == KFontDialog::Accepted) {
      fontItem->setFont(font);
      f_List->triggerUpdate(false);
      slotChanged();
    }
  }
}
コード例 #22
0
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(), &current);
    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();
}
コード例 #23
0
ファイル: App.cpp プロジェクト: KDE/kwave
//***************************************************************************
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)));
}
コード例 #24
0
AddDialog::AddDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::AddDialog),
    mRoot{nullptr},
    mNewItem{nullptr},
    mParent{nullptr}
{
    ui->setupUi(this);
    setWindowTitle("Add...");

    ui->typeComboBox->addItem("Menu Item", MenuItemType);
    ui->typeComboBox->addItem("Menu", MenuType);

    connect(ui->backPushButton, SIGNAL(clicked(bool)), this, SLOT(slotBackClicked()), Qt::UniqueConnection);
    connect(ui->cancelPushButton_2, SIGNAL(clicked(bool)), this, SLOT(slotCancelClicked()), Qt::UniqueConnection);
    connect(ui->nextPushButton, SIGNAL(clicked(bool)), this, SLOT(slotNextClicked()), Qt::UniqueConnection);
    connect(ui->okPushButton, SIGNAL(clicked(bool)), this, SLOT(slotOkClicked()), Qt::UniqueConnection);
    connect(ui->widget, SIGNAL(itemChanged()), this, SLOT(slotChanged()), Qt::UniqueConnection);
}
コード例 #25
0
ファイル: kateconfigdialog.cpp プロジェクト: Fat-Zer/tdebase
void KateConfigDialog::addPluginPage (Kate::Plugin *plugin)
{
  if (!Kate::pluginConfigInterfaceExtension(plugin))
    return;

  for (uint i=0; i<Kate::pluginConfigInterfaceExtension(plugin)->configPages(); i++)
  {
    TQStringList path;
    path.clear();
    path << i18n("Application")<<i18n("Plugins") << Kate::pluginConfigInterfaceExtension(plugin)->configPageName(i);
    TQVBox *page=addVBoxPage(path, Kate::pluginConfigInterfaceExtension(plugin)->configPageFullName(i), Kate::pluginConfigInterfaceExtension(plugin)->configPagePixmap(i, TDEIcon::SizeSmall));

    PluginPageListItem *info=new PluginPageListItem;
    info->plugin = plugin;
    info->page = Kate::pluginConfigInterfaceExtension(plugin)->configPage (i, page);
    connect( info->page, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) );
    pluginPages.append(info);
  }
}
コード例 #26
0
void KCMHotkeysPrivate::load()
    {
    // Start khotkeys
    KHotKeys::Daemon::start();

    // disconnect the signals
    if (tree_view->selectionModel())
        {
        QObject::disconnect(
            tree_view->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)),
            q, SLOT(currentChanged(QModelIndex,QModelIndex)) );
        }

    // Create a new model;
    tree_view->setModel(new KHotkeysModel);
    // Delete the old
    delete model;
    // Now use the old
    model = tree_view->model();

    model->load();
    global_settings->setModel(model);

    QObject::connect(
        model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
        q,  SLOT(slotChanged()));
    QObject::connect(
        model, SIGNAL(rowsInserted(QModelIndex,int,int)),
        q,  SLOT(slotChanged()));
    QObject::connect(
        model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
        q,  SLOT(slotChanged()));

    QObject::connect(
            model, SIGNAL(modelAboutToBeReset()),
            q,  SLOT(slotReset()));

    // reconnect the signals
    QObject::connect(
        tree_view->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)),
        q, SLOT(currentChanged(QModelIndex,QModelIndex)) );
    }
コード例 #27
0
ファイル: basictab.cpp プロジェクト: aarontc/kde-workspace
void BasicTab::initConnections()
{
    // general tab's components
    connect(_nameEdit, SIGNAL(textChanged(QString)), SLOT(slotChanged()));
    connect(_descriptionEdit, SIGNAL(textChanged(QString)), SLOT(slotChanged()));
    connect(_commentEdit, SIGNAL(textChanged(QString)), SLOT(slotChanged()));
    connect(_execEdit, SIGNAL(textChanged(QString)), SLOT(slotChanged()));
    connect(_execEdit, SIGNAL(urlSelected(KUrl)), SLOT(slotExecSelected()));
    connect(_launchCB, SIGNAL(clicked()), SLOT(launchcb_clicked()));
    connect(_systrayCB, SIGNAL(clicked()), SLOT(systraycb_clicked()));
    connect(_onlyShowInKdeCB, SIGNAL(clicked()), SLOT(onlyshowcb_clicked()));
    connect(_hiddenEntryCB, SIGNAL(clicked()), SLOT(hiddenentrycb_clicked()));
    connect(_iconButton, SIGNAL(iconChanged(QString)), SLOT(slotChanged()));

    // advanced tab's components
    connect(_pathEdit, SIGNAL(textChanged(QString)), SLOT(slotChanged()));
    connect(_terminalCB, SIGNAL(clicked()), SLOT(termcb_clicked()));
    connect(_terminalOptionsEdit, SIGNAL(textChanged(QString)), SLOT(slotChanged()));
    connect(_userCB, SIGNAL(clicked()), SLOT(uidcb_clicked()));
    connect(_userNameEdit, SIGNAL(textChanged(QString)), SLOT(slotChanged()));
    connect(_keyBindingEdit, SIGNAL(keySequenceChanged(QKeySequence)), this, SLOT(slotCapturedKeySequence(QKeySequence)));
}
コード例 #28
0
MilestoneProgressDialog::MilestoneProgressDialog(Task &task, QWidget *p)
    : KoDialog(p),
    m_node( &task )
{
    setCaption( i18n("Milestone Progress") );
    setButtons( Ok|Cancel );
    setDefaultButton( Ok );
    showButtonSeparator( true );
    m_panel = new MilestoneProgressPanel(task, this);

    setMainWidget(m_panel);

    enableButtonOk(false);

    connect(m_panel, SIGNAL(changed()), SLOT(slotChanged()));
    Project *proj = static_cast<Project*>( task.projectNode() );
    if ( proj ) {
        connect(proj, SIGNAL(nodeRemoved(Node*)), SLOT(slotNodeRemoved(Node*)));
    }
}
コード例 #29
0
TaskProgressDialog::TaskProgressDialog(Task &task, ScheduleManager *sm, StandardWorktime *workTime, QWidget *p)
    : KDialog( p),
    m_node( &task )
{
    setCaption( i18n("Task Progress") );
    setButtons( Ok|Cancel );
    setDefaultButton( Ok );
    showButtonSeparator( true );
    m_panel = new TaskProgressPanel(task, sm, workTime, this);

    setMainWidget(m_panel);

    enableButtonOk(false);

    connect(m_panel, SIGNAL(changed()), SLOT(slotChanged()));
    Project *proj = static_cast<Project*>( task.projectNode() );
    if ( proj ) {
        connect(proj, SIGNAL(nodeRemoved(Node*)), SLOT(slotNodeRemoved(Node*)));
    }
}
コード例 #30
0
void WBSDefinitionPanel::slotAddBtnClicked() {
    kDebug();
    int i=levelsTable->rowCount()-1;
    for (; i >= 0; --i) {
        kDebug()<<"Checking row["<<i<<"]="<<levelsTable->verticalHeaderItem(i)->text()<<" with"<<level->value();
        if (level->value() > levelsTable->verticalHeaderItem(i)->text().toInt()) {
            break;
        }
    }
    i++;
    levelsTable->insertRow(i);
    levelsTable->setVerticalHeaderItem(i, new QTableWidgetItem(QString("%1").arg(level->value())));
    QTableWidgetItem *item = new QTableWidgetItem();
    item->setData(Qt::DisplayRole, (m_def.codeList())[m_def.defaultCodeIndex()]);
    levelsTable->setItem(i, 0, item);
    item = new QTableWidgetItem();
    item->setText(m_def.defaultSeparator());
    levelsTable->setItem(i, 1, item);
    
    addBtn->setEnabled(false);
    slotChanged();
    
    kDebug()<<"Added row="<<i<<" level="<<level->value();
}