Ejemplo n.º 1
0
KclockModule::KclockModule(QWidget *parent, const char *name, const QStringList &) : KCModule(KlockModuleFactory::instance(), parent, name)
{
    KAboutData *about = new KAboutData(I18N_NOOP("kcmclock"), I18N_NOOP("KDE Clock Control Module"), 0, 0, KAboutData::License_GPL,
                                       "(c) 1996 - 2001 Luca Montecchiani");

    about->addAuthor("Luca Montecchiani", I18N_NOOP("Original author"), "*****@*****.**");
    about->addAuthor("Paul Campbell", I18N_NOOP("Current Maintainer"), "*****@*****.**");
    about->addAuthor("Benjamin Meyer", I18N_NOOP("Added NTP support"), "*****@*****.**");
    setAboutData(about);
    setQuickHelp(
        i18n("<h1>Date & Time</h1> This control module can be used to set the system date and"
             " time. As these settings do not only affect you as a user, but rather the whole system, you"
             " can only change these settings when you start the Control Center as root. If you do not have"
             " the root password, but feel the system time should be corrected, please contact your system"
             " administrator."));

    KGlobal::locale()->insertCatalogue("timezones"); // For time zone translations

    QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint());

    dtime = new Dtime(this);
    layout->addWidget(dtime);
    connect(dtime, SIGNAL(timeChanged(bool)), this, SIGNAL(changed(bool)));

    tzone = new Tzone(this);
    layout->addWidget(tzone);
    connect(tzone, SIGNAL(zoneChanged(bool)), this, SIGNAL(changed(bool)));

    layout->addStretch();

    if(getuid() == 0)
        setButtons(Help | Apply);
    else
        setButtons(Help);
}
Ejemplo n.º 2
0
KCMCgi::KCMCgi(QWidget *parent, const char *name)
  : KCModule(parent, name)
{
  setButtons(Default|Apply);

  QVBoxLayout *topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());

  QGroupBox *topBox = new QGroupBox( 1, Horizontal, i18n("Paths to Local CGI Programs"), this );
  topLayout->addWidget( topBox );

  mListBox = new QListBox( topBox );

  QHBox *buttonBox = new QHBox( topBox );
  buttonBox->setSpacing( KDialog::spacingHint() );

  mAddButton = new QPushButton( i18n("Add..."), buttonBox );
  connect( mAddButton, SIGNAL( clicked() ), SLOT( addPath() ) );

  mRemoveButton = new QPushButton( i18n("Remove"), buttonBox );
  connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removePath() ) );
  connect( mListBox, SIGNAL( clicked ( QListBoxItem * )),this, SLOT( slotItemSelected( QListBoxItem *)));

  mConfig = new KConfig("kcmcgirc");

  load();
  updateButton();
  KAboutData *about =
    new KAboutData( I18N_NOOP("kcmcgi"),
                    I18N_NOOP("CGI KIO Slave Control Module"),
                    0, 0, KAboutData::License_GPL,
                    I18N_NOOP("(c) 2002 Cornelius Schumacher") );

  about->addAuthor( "Cornelius Schumacher", 0, "*****@*****.**" );
  setAboutData(about);
}
Ejemplo n.º 3
0
KCMKOrgSummary::KCMKOrgSummary(QWidget *parent, const char *name)
    : KCModule(parent, name)
{
    initGUI();

    customDaysChanged(1);

    connect(mCalendarGroup, SIGNAL(clicked(int)), SLOT(modified()));
    connect(mCalendarGroup, SIGNAL(clicked(int)), SLOT(buttonClicked(int)));
    connect(mTodoGroup, SIGNAL(clicked(int)), SLOT(modified()));
    connect(mCustomDays, SIGNAL(valueChanged(int)), SLOT(modified()));
    connect(mCustomDays, SIGNAL(valueChanged(int)), SLOT(customDaysChanged(int)));

    KAcceleratorManager::manage(this);

    load();

    KAboutData *about = new KAboutData(I18N_NOOP("kcmkorgsummary"),
                                       I18N_NOOP("Schedule Configuration Dialog"),
                                       0, 0, KAboutData::License_GPL,
                                       I18N_NOOP("(c) 2003 - 2004 Tobias Koenig"));

    about->addAuthor("Tobias Koenig", 0, "*****@*****.**");
    setAboutData(about);
}
Ejemplo n.º 4
0
KcmKRfb::KcmKRfb(QWidget *p, const char *name, const QStringList &) :
    KCModule(KcmKRfbFactory::instance(), p, name),
    m_configuration(KRFB_CONFIGURATION_MODE) {

    m_confWidget = new ConfigurationWidget(this);

    QVBoxLayout *l = new QVBoxLayout(this, 0, KDialog::spacingHint());
    l->add(m_confWidget);

    setButtons(Default|Apply|Reset);

    KAboutData* about = new KAboutData( "kcm_krfb", I18N_NOOP("Desktop Sharing Control Module"),
                                        VERSION,
                                        I18N_NOOP("Configure desktop sharing"), KAboutData::License_GPL,
                                        "(c) 2002, Tim Jansen\n",
                                        0, "http://www.tjansen.de/krfb", "*****@*****.**");
    about->addAuthor("Tim Jansen", 0, "*****@*****.**");
    setAboutData( about );

    load();

    connect(m_confWidget->passwordInput, SIGNAL(textChanged(const QString&)), SLOT(configChanged()) );
    connect(m_confWidget->allowUninvitedCB, SIGNAL(clicked()), SLOT(configChanged()) );
    connect(m_confWidget->enableSLPCB, SIGNAL(clicked()), SLOT(configChanged()) );
    connect(m_confWidget->confirmConnectionsCB, SIGNAL(clicked()), SLOT(configChanged()) );
    connect(m_confWidget->allowDesktopControlCB, SIGNAL(clicked()), SLOT(configChanged()) );
    connect(m_confWidget->autoPortCB, SIGNAL(clicked()), SLOT(configChanged()) );
    connect(m_confWidget->portInput, SIGNAL(valueChanged(int)), SLOT(configChanged()) );
    connect((QObject*)m_confWidget->manageInvitations, SIGNAL(clicked()),
            &m_configuration, SLOT(showManageInvitationsDialog()) );
    connect(&m_configuration, SIGNAL(invitationNumChanged(int)),
            this, SLOT(setInvitationNum(int)));
    setInvitationNum(m_configuration.invitations().size());
    connect(m_confWidget->disableBackgroundCB, SIGNAL(clicked()), SLOT(configChanged()) );
}
Ejemplo n.º 5
0
TaskbarConfig::TaskbarConfig(QWidget *parent, const char *name, const QStringList &) : KCModule(TaskBarFactory::instance(), parent, name)
{
    QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint());
    m_widget = new TaskbarConfigUI(this);
    layout->addWidget(m_widget);

    // TODO: Load these from .desktop files?
    m_appearances.append(TaskbarAppearance(i18n("Elegant"), false, false, true));
    m_appearances.append(TaskbarAppearance(i18n("Classic"), true, false, true));
    m_appearances.append(TaskbarAppearance(i18n("For Transparency"), false, true, true));

    for(TaskbarAppearance::List::const_iterator it = m_appearances.constBegin(); it != m_appearances.constEnd(); ++it)
    {
        m_widget->appearance->insertItem((*it).name());
    }

    connect(m_widget->appearance, SIGNAL(activated(int)), this, SLOT(appearanceChanged(int)));
    addConfig(TaskBarSettings::self(), m_widget);

    setQuickHelp(
        i18n("<h1>Taskbar</h1> You can configure the taskbar here."
             " This includes options such as whether or not the taskbar should show all"
             " windows at once or only those on the current desktop."
             " You can also configure whether or not the Window List button will be displayed."));

    QStringList list = i18nActionList();
    m_widget->kcfg_LeftButtonAction->insertStringList(list);
    m_widget->kcfg_MiddleButtonAction->insertStringList(list);
    m_widget->kcfg_RightButtonAction->insertStringList(list);
    m_widget->kcfg_GroupTasks->insertStringList(i18nGroupModeList());

    connect(m_widget->kcfg_GroupTasks, SIGNAL(activated(int)), this, SLOT(slotUpdateComboBox()));
    connect(m_widget->kcfg_UseCustomColors, SIGNAL(stateChanged(int)), this, SLOT(slotUpdateCustomColors()));

    slotUpdateCustomColors();
    updateAppearanceCombo();

    if(KWin::numberOfDesktops() < 2)
    {
        m_widget->kcfg_ShowAllWindows->hide();
        m_widget->kcfg_SortByDesktop->hide();
        m_widget->spacer2->changeSize(0, 0);
    }

    if(!QApplication::desktop()->isVirtualDesktop() || QApplication::desktop()->numScreens() == 1) // No Ximerama
    {
        m_widget->showAllScreens->hide();
    }
    connect(m_widget->showAllScreens, SIGNAL(stateChanged(int)), SLOT(changed()));

    KAboutData *about = new KAboutData(I18N_NOOP("kcmtaskbar"), I18N_NOOP("KDE Taskbar Control Module"), 0, 0, KAboutData::License_GPL,
                                       I18N_NOOP("(c) 2000 - 2001 Matthias Elter"));

    about->addAuthor("Matthias Elter", 0, "*****@*****.**");
    about->addCredit("Stefan Nikolaus", I18N_NOOP("KConfigXT conversion"), "*****@*****.**");
    setAboutData(about);

    load();
    QTimer::singleShot(0, this, SLOT(notChanged()));
}
Ejemplo n.º 6
0
joystick::joystick(QWidget *parent, const char *name, const QStringList &) : KCModule(JoystickFactory::instance(), parent, name)
{
    setAboutData(new KAboutData("kcmjoystick", I18N_NOOP("KDE Joystick Control Module"), "1.0",
                                I18N_NOOP("KDE Control Center Module to test Joysticks"), KAboutData::License_GPL, "(c) 2004, Martin Koller", 0,
                                "*****@*****.**"));

    setQuickHelp(
        i18n("<h1>Joystick</h1>"
             "This module helps to check if your joystick is working correctly.<br>"
             "If it delivers wrong values for the axes, you can try to solve this with "
             "the calibration.<br>"
             "This module tries to find all available joystick devices "
             "by checking /dev/js[0-4] and /dev/input/js[0-4]<br>"
             "If you have another device file, enter it in the combobox.<br>"
             "The Buttons list shows the state of the buttons on your joystick, the Axes list "
             "shows the current value for all axes.<br>"
             "NOTE: the current Linux device driver (Kernel 2.4, 2.6) can only autodetect"
             "<ul>"
             "<li>2-axis, 4-button joystick</li>"
             "<li>3-axis, 4-button joystick</li>"
             "<li>4-axis, 4-button joystick</li>"
             "<li>Saitek Cyborg 'digital' joysticks</li>"
             "</ul>"
             "(For details you can check your Linux source/Documentation/input/joystick.txt)"));

    joyWidget = new JoyWidget(this);

    setMinimumSize(joyWidget->minimumSize());

    setButtons(KCModule::Default);
}
KCMKontactSummary::KCMKontactSummary( const KComponentData &inst, QWidget *parent )
  : KCModule( inst, parent )
{
  setButtons( NoAdditionalButton );
  QVBoxLayout *layout = new QVBoxLayout( this );
  layout->setSpacing( KDialog::spacingHint() );
  layout->setMargin( 0 );

  QLabel *label =
    new QLabel( i18n( "Select the plugin summaries to show on the summary page." ), this );
  layout->addWidget( label );

  mPluginView = new PluginView( this );
  layout->addWidget( mPluginView );

  layout->setStretchFactor( mPluginView, 1 );

  load();
  connect( mPluginView, SIGNAL(itemChanged(QTreeWidgetItem*,int)),
           this, SLOT(changed()) );

  KAboutData *about = new KAboutData( I18N_NOOP( "kontactsummary" ), 0,
                                      ki18n( "KDE Kontact Summary" ),
                                      0, KLocalizedString(), KAboutData::License_GPL,
                                      ki18n( "(c), 2004 Tobias Koenig" ) );

  about->addAuthor( ki18n( "Tobias Koenig" ), KLocalizedString(), "*****@*****.**" );
  setAboutData( about );
}
Ejemplo n.º 8
0
KCMNic::KCMNic(QWidget *parent, const char *name, const QStringList &) : KCModule(KCMNicFactory::instance(), parent, name)
{
    QVBoxLayout *box = new QVBoxLayout(this, 0, KDialog::spacingHint());
    m_list = new QListView(this);
    box->addWidget(m_list);
    m_list->addColumn(i18n("Name"));
    m_list->addColumn(i18n("IP Address"));
    m_list->addColumn(i18n("Network Mask"));
    m_list->addColumn(i18n("Type"));
    m_list->addColumn(i18n("State"));
    m_list->addColumn(i18n("HWaddr"));
    m_list->setAllColumnsShowFocus(true);
    QHBoxLayout *hbox = new QHBoxLayout(box);
    m_updateButton = new QPushButton(i18n("&Update"), this);
    hbox->addWidget(m_updateButton);
    hbox->addStretch(1);
    QTimer *timer = new QTimer(this);
    timer->start(60000);
    connect(m_updateButton, SIGNAL(clicked()), this, SLOT(update()));
    connect(timer, SIGNAL(timeout()), this, SLOT(update()));
    update();
    KAboutData *about = new KAboutData(I18N_NOOP("kcminfo"), I18N_NOOP("KDE Panel System Information Control Module"), 0, 0, KAboutData::License_GPL,
                                       I18N_NOOP("(c) 2001 - 2002 Alexander Neundorf"));

    about->addAuthor("Alexander Neundorf", 0, "*****@*****.**");
    setAboutData(about);
}
Ejemplo n.º 9
0
kthememanager::kthememanager( QWidget *parent, const char *name )
    : KCModule( parent, name ), m_theme( 0 ), m_origTheme( 0 )
{

    KAboutData *about = new KAboutData("kthememanager", I18N_NOOP("KDE Theme Manager"),
                                       "0.4", I18N_NOOP("This control module handles installing, removing and "
                                                        "creating visual KDE themes."),
                                       KAboutData::License_GPL, "(c) 2003, 2004, 2006 Lukáš Tinkl", 0,
                                       "http://developer.kde.org/~lukas/kthememanager");
    setAboutData( about );

    setQuickHelp( i18n("This control module handles installing, removing and "
                "creating visual KDE themes."));

    setButtons( KCModule::Default|KCModule::Apply|KCModule::Help );

    setAcceptDrops( true );
    init();

    QBoxLayout *top = new QVBoxLayout(this, 0, KDialog::spacingHint());

    dlg = new KThemeDlg(this);
    top->addWidget( dlg );

    dlg->lvThemes->setColumnWidthMode( 0, QListView::Maximum );

    connect( ( QObject * )dlg->btnInstall, SIGNAL( clicked() ),
             this, SLOT( slotInstallTheme() ) );

    connect( ( QObject * )dlg->btnRemove, SIGNAL( clicked() ),
             this, SLOT( slotRemoveTheme() ) );

    connect( ( QObject * )dlg->btnCreate, SIGNAL( clicked() ),
             this, SLOT( slotCreateTheme() ) );

    connect( ( QObject * )dlg->lvThemes, SIGNAL( clicked( QListViewItem * ) ),
             this, SLOT( slotThemeChanged( QListViewItem * ) ) );

    connect( ( QObject * )dlg->lvThemes, SIGNAL( currentChanged( QListViewItem * ) ),
             this, SLOT( slotThemeChanged( QListViewItem * ) ) );

    connect( this, SIGNAL( filesDropped( const KURL::List& ) ),
             this, SLOT( updateButton() ) );

    connect( ( QObject * )dlg->lvThemes, SIGNAL( clicked( QListViewItem * ) ),
             this, SLOT( updateButton() ) );

    m_origTheme = new KTheme( this, true ); // stores the defaults to get back to
    m_origTheme->setName( ORIGINAL_THEME );
    m_origTheme->createYourself();

    load();
    queryLNFModules();
    updateButton();
}
Ejemplo n.º 10
0
PcmciaConfig::PcmciaConfig (QWidget * parent, const char *name)
  : KCModule(parent, name)
{
       KAboutData *about =
       new KAboutData(I18N_NOOP("kcmlaptop"),
		   I18N_NOOP("KDE Panel System Information Control Module"),
		   0, 0, KAboutData::License_GPL,
		   I18N_NOOP("(c) 1999 - 2002 Paul Campbell"));
       about->addAuthor("Paul Campbell", 0, "*****@*****.**");
       setAboutData( about );

       KGlobal::locale()->insertCatalogue("klaptopdaemon"); // For translation of klaptopdaemon messages

       label0 = laptop_portable::pcmcia_info(0, this);
       label0_text = laptop_portable::pcmcia_info(1, this);
       label1 = laptop_portable::pcmcia_info(2, this);
       label1_text = laptop_portable::pcmcia_info(3, this);
	

       QVBoxLayout *top_layout = new QVBoxLayout(this, 15, 5);
        QGridLayout *top_grid = new QGridLayout(2, 2);
        top_layout->addLayout(top_grid);

        top_grid->setColStretch(0, 0);
        top_grid->setColStretch(1, 1);
        top_grid->addRowSpacing(0, 40);
        top_grid->addRowSpacing(1, 40);

        label0->setFixedSize(80, 24);
        top_grid->addWidget(label0, 0, 0);
        label0_text->adjustSize();
        top_grid->addWidget(label0_text, 0, 1);

        label1->setFixedSize(80, 24);
        top_grid->addWidget(label1, 1, 0);
        label1_text->adjustSize();
        top_grid->addWidget(label1_text, 1, 1);


        top_layout->addStretch(1);

        QHBoxLayout *v1 = new QHBoxLayout;
        top_layout->addLayout(v1, 0);
        v1->addStretch(1);
        QString s1 = LAPTOP_VERSION;
        QString s2 = i18n("Version: ")+s1;
        QLabel* vers = new QLabel(s2, this);
        vers->setMinimumSize(vers->sizeHint());
        v1->addWidget(vers, 0);

        top_layout->activate();          

	load();
	setButtons(Help);
}
Ejemplo n.º 11
0
Module::Module(QWidget *parent, const QVariantList &args)
    : KCModule(parent, args)
    , ui(new Ui::Module)
    , m_manager(new DriverManager(this))
{
    KAboutData *aboutData = new KAboutData("kcm-driver-manager",
                                    i18n("Driver Manager"),
                                    global_s_versionStringFull,
                                    QStringLiteral(""),
                                    KAboutLicense::LicenseKey::GPL_V3,
                                    i18n("Copyright 2013 Rohan Garg"));

    aboutData->addAuthor(i18n("Rohan Garg"), i18n("Author"), QStringLiteral("*****@*****.**"));
    aboutData->addAuthor(i18n("Harald Sitter"), i18n("Qt 5 port"), QStringLiteral("*****@*****.**"));

    setAboutData(aboutData);

    // We have no help so remove the button from the buttons.
    setButtons(buttons() ^ KCModule::Help);

    ui->setupUi(this);
    ui->progressBar->setVisible(false);
    connect(ui->reloadButton, SIGNAL(clicked(bool)), SLOT(load()));

    m_overlay = new KPixmapSequenceOverlayPainter(this);
    m_overlay->setWidget(this);

#warning variable name
    QString label = xi18nc("@title/rich", "<title>Your computer requires no proprietary drivers</title>");
    m_label = new QLabel(label, this);
    m_label->hide();
    ui->driverOptionsVLayout->addWidget(m_label);

    //Debconf handling
    QString uuid = QUuid::createUuid().toString();
    uuid.remove('{').remove('}').remove('-');
    m_pipe = QDir::tempPath() % QLatin1String("/qapt-sock-") % uuid;
    m_debconfGui = new DebconfKde::DebconfGui(m_pipe, this);
    m_debconfGui->connect(m_debconfGui, SIGNAL(activated()), this, SLOT(showDebconf()));
    m_debconfGui->connect(m_debconfGui, SIGNAL(deactivated()), this, SLOT(hideDebconf()));
    m_debconfGui->hide();

    connect(m_manager, SIGNAL(refreshFailed()),
            this, SLOT(onRefreshFailed()));
    connect(m_manager, SIGNAL(devicesReady(DeviceList)),
            this, SLOT(onDevicesReady(DeviceList)));

    connect(m_manager, SIGNAL(changeProgressChanged(int)),
            this, SLOT(progressChanged(int)));
    connect(m_manager, SIGNAL(changeFinished()),
            this, SLOT(finished()));
    connect(m_manager, SIGNAL(changeFailed(QString)),
            this, SLOT(failed(QString)));
}
Ejemplo n.º 12
0
KCMRules::KCMRules(QWidget *parent, const char *name) : KCModule(parent, name), config("kwinrulesrc")
{
    QVBoxLayout *layout = new QVBoxLayout(this);
    widget = new KCMRulesList(this);
    layout->addWidget(widget);
    connect(widget, SIGNAL(changed(bool)), SLOT(moduleChanged(bool)));
    KAboutData *about = new KAboutData(I18N_NOOP("kcmkwinrules"), I18N_NOOP("Window-Specific Settings Configuration Module"), 0, 0,
                                       KAboutData::License_GPL, I18N_NOOP("(c) 2004 KWin and KControl Authors"));
    about->addAuthor("Lubos Lunak", 0, "*****@*****.**");
    setAboutData(about);
}
Ejemplo n.º 13
0
KWinOptions::KWinOptions(QWidget *parent, const char *name) : KCModule(parent, name)
{
    mConfig = new KConfig("kwinrc", false, true);

    QVBoxLayout *layout = new QVBoxLayout(this);
    tab = new QTabWidget(this);
    layout->addWidget(tab);

    mFocus = new KFocusConfig(false, mConfig, this, "KWin Focus Config");
    mFocus->layout()->setMargin(KDialog::marginHint());
    tab->addTab(mFocus, i18n("&Focus"));
    connect(mFocus, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));

    mTitleBarActions = new KTitleBarActionsConfig(false, mConfig, this, "KWin TitleBar Actions");
    mTitleBarActions->layout()->setMargin(KDialog::marginHint());
    tab->addTab(mTitleBarActions, i18n("&Titlebar Actions"));
    connect(mTitleBarActions, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));

    mWindowActions = new KWindowActionsConfig(false, mConfig, this, "KWin Window Actions");
    mWindowActions->layout()->setMargin(KDialog::marginHint());
    tab->addTab(mWindowActions, i18n("Window Actio&ns"));
    connect(mWindowActions, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));

    mMoving = new KMovingConfig(false, mConfig, this, "KWin Moving");
    mMoving->layout()->setMargin(KDialog::marginHint());
    tab->addTab(mMoving, i18n("&Moving"));
    connect(mMoving, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));

    mAdvanced = new KAdvancedConfig(false, mConfig, this, "KWin Advanced");
    mAdvanced->layout()->setMargin(KDialog::marginHint());
    tab->addTab(mAdvanced, i18n("Ad&vanced"));
    connect(mAdvanced, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));

    mTranslucency = new KTranslucencyConfig(false, mConfig, this, "KWin Translucency");
    mTranslucency->layout()->setMargin(KDialog::marginHint());
    tab->addTab(mTranslucency, i18n("&Translucency"));
    connect(mTranslucency, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));

    KAboutData *about = new KAboutData(I18N_NOOP("kcmkwinoptions"), I18N_NOOP("Window Behavior Configuration Module"), 0, 0, KAboutData::License_GPL,
                                       I18N_NOOP("(c) 1997 - 2002 KWin and KControl Authors"));

    about->addAuthor("Matthias Ettrich", 0, "*****@*****.**");
    about->addAuthor("Waldo Bastian", 0, "*****@*****.**");
    about->addAuthor("Cristian Tibirna", 0, "*****@*****.**");
    about->addAuthor("Matthias Kalle Dalheimer", 0, "*****@*****.**");
    about->addAuthor("Daniel Molkentin", 0, "*****@*****.**");
    about->addAuthor("Wynn Wilkes", 0, "*****@*****.**");
    about->addAuthor("Pat Dowler", 0, "*****@*****.**");
    about->addAuthor("Bernd Wuebben", 0, "*****@*****.**");
    about->addAuthor("Matthias Hoelzer-Kluepfel", 0, "*****@*****.**");
    setAboutData(about);
}
Ejemplo n.º 14
0
ImagePreview::ImagePreview(const QString& fileOrig, 
                           const QString& fileDest,
                           bool cropActionOrig, 
                           const QString& EffectName,
                           const QString& FileName, 
                           QWidget* const parent)
        : KPToolDialog(parent)
{
    setCaption(i18n("Batch Process Preview (%1 - %2)", EffectName, FileName));
    setModal(true);
    setButtons(Ok | Help);
    setDefaultButton(Ok);

    KPAboutData* about = new KPAboutData(ki18n("Batch Process Images"),
                                         QByteArray(),
                                         KAboutData::License_GPL,
                                         ki18n("A Kipi plugin for batch process images using \"ImageMagick\""),
                                         ki18n("(c) 2003-2012, Gilles Caulier\n"
                                               "(c) 2007-2009, Aurélien Gateau"));

    about->addAuthor(ki18n("Gilles Caulier"), ki18n("Author"),
                       "caulier dot gilles at gmail dot com");

    about->addAuthor(ki18n("Aurelien Gateau"), ki18n("Maintainer"),
                       "aurelien dot gateau at free dot fr");

    setAboutData(about);

    //---------------------------------------------

    QWidget* box = new QWidget(this);
    setupUi(box);
    setMainWidget(box);
    resize(700, 400);

    QImage original(fileOrig);
    const QImage cropped = original.copy(0, 0, 300, 300);

    if (cropActionOrig)
    {
        m_origView->setImage(cropped, true);
    }

    else
    {
        m_origView->load(fileOrig, true);
    }

    m_destView->load(fileDest, true);
}
Ejemplo n.º 15
0
USBViewer::USBViewer(QWidget *parent, const char *name, const QStringList &) : KCModule(USBFactory::instance(), parent, name)
{
    setButtons(Help);

    setQuickHelp(
        i18n("<h1>USB Devices</h1> This module allows you to see"
             " the devices attached to your USB bus(es)."));

    QVBoxLayout *vbox = new QVBoxLayout(this, 0, KDialog::spacingHint());
    QGroupBox *gbox = new QGroupBox(i18n("USB Devices"), this);
    gbox->setColumnLayout(0, Qt::Horizontal);
    vbox->addWidget(gbox);

    QVBoxLayout *vvbox = new QVBoxLayout(gbox->layout(), KDialog::spacingHint());

    QSplitter *splitter = new QSplitter(gbox);
    vvbox->addWidget(splitter);

    _devices = new QListView(splitter);
    _devices->addColumn(i18n("Device"));
    _devices->setRootIsDecorated(true);
    _devices->header()->hide();
    _devices->setMinimumWidth(200);
    _devices->setColumnWidthMode(0, QListView::Maximum);

    QValueList< int > sizes;
    sizes.append(200);
    splitter->setSizes(sizes);

    _details = new QTextView(splitter);

    splitter->setResizeMode(_devices, QSplitter::KeepSize);

    QTimer *refreshTimer = new QTimer(this);
    // 1 sec seems to be a good compromise between latency and polling load.
    refreshTimer->start(1000);

    connect(refreshTimer, SIGNAL(timeout()), SLOT(refresh()));
    connect(_devices, SIGNAL(selectionChanged(QListViewItem *)), this, SLOT(selectionChanged(QListViewItem *)));

    KAboutData *about = new KAboutData(I18N_NOOP("kcmusb"), I18N_NOOP("KDE USB Viewer"), 0, 0, KAboutData::License_GPL,
                                       I18N_NOOP("(c) 2001 Matthias Hoelzer-Kluepfel"));

    about->addAuthor("Matthias Hoelzer-Kluepfel", 0, "*****@*****.**");
    about->addCredit("Leo Savernik", "Live Monitoring of USB Bus", "*****@*****.**");
    setAboutData(about);

    load();
}
Ejemplo n.º 16
0
KCMHotkeys::KCMHotkeys( QWidget *parent, const QVariantList & /* args */ )
    : KCModule( KCMModuleFactory::componentData(), parent )
     ,d( new KCMHotkeysPrivate(this) )
    {
    // Inform KCModule of the buttons we support
    KCModule::setButtons(KCModule::Buttons(KCModule::Default | KCModule::Apply | KCModule::Help));

    // Add the about data
    KAboutData *about = new KAboutData(
        "khotkeys",
        0,
        ki18n("KDE Hotkeys Configuration Module"),
        KDE_VERSION_STRING,
        KLocalizedString(),
        KAboutData::License_GPL,
        ki18n("Copyright 2008 (c) Michael Jansen")
        );
    about->addAuthor(
        ki18n("Michael Jansen"),
        ki18n("Maintainer"),
        "*****@*****.**" );
    setAboutData(about);

    // Tell KCModule we were changed.
    connect(
        d->action_group, SIGNAL(changed(bool)),
        this, SIGNAL(changed(bool)) );
    connect(
        d->simple_action, SIGNAL(changed(bool)),
        this, SIGNAL(changed(bool)) );
    connect(
        d->global_settings, SIGNAL(changed(bool)),
        this, SIGNAL(changed(bool)) );
    // Update TreeView if hotkeys was changed
    connect(
        d->simple_action, SIGNAL(changed(KHotKeys::ActionDataBase*)),
        this, SLOT(_k_hotkeyChanged(KHotKeys::ActionDataBase*)));
    connect(
        d->action_group, SIGNAL(changed(KHotKeys::ActionDataBase*)),
        this, SLOT(_k_hotkeyChanged(KHotKeys::ActionDataBase*)));

    // Show the context menu
    d->menu_button->setMenu(new HotkeysTreeViewContextMenu(d->tree_view));

    // Switch to the global settings dialog
    connect(d->settings_button, SIGNAL(clicked(bool)),
            SLOT(showGlobalSettings()));
    }
Ejemplo n.º 17
0
KCMKResources::KCMKResources( QWidget *parent, const char *name, const QStringList& )
  : KCModule( ResourcesFactory::instance(), parent, name )
{
  QVBoxLayout *layout = new QVBoxLayout( this );
  mConfigPage = new KRES::ConfigPage( this );
  layout->addWidget( mConfigPage );
  connect( mConfigPage, SIGNAL( changed( bool ) ), SIGNAL( changed( bool ) ) );
  setButtons( Help | Apply );
  KAboutData *about =
   new KAboutData( I18N_NOOP( "kcmkresources" ),
                   I18N_NOOP( "KDE Resources configuration module" ),
                   0, 0, KAboutData::License_GPL,
                   I18N_NOOP( "(c) 2003 Tobias Koenig" ) );

  about->addAuthor( "Tobias Koenig", 0, "*****@*****.**" );
  setAboutData(about);
}
Ejemplo n.º 18
0
KCMDesktopTheme::KCMDesktopTheme( QWidget* parent, const QVariantList& )
    : KCModule( parent )
    , m_dialog(0)
    , m_installProcess(0)
    , m_defaultTheme(new Plasma::Theme(this))
{
    setQuickHelp( i18n("<h1>Desktop Theme</h1>"
            "This module allows you to modify the visual appearance "
            "of the desktop."));

    setupUi(this);

    m_bDesktopThemeDirty = false;
    m_bDetailsDirty = false;

    KAutostart plasmaNetbookAutoStart("plasma-netbook");
    m_isNetbook = plasmaNetbookAutoStart.autostarts();

    KGlobal::dirs()->addResourceType("themes", "data", "kstyle/themes");

    KAboutData *about =
        new KAboutData( I18N_NOOP("KCMDesktopTheme"), 0,
                        i18n("KDE Desktop Theme Module"),
                        0, QString(), KAboutData::License_GPL,
                        i18n("(c) 2002 Karol Szwed, Daniel Molkentin"));

    about->addAuthor(i18n("Karol Szwed"), QString(), QStringLiteral("*****@*****.**"));
    about->addAuthor(i18n("Daniel Molkentin"), QString(), QStringLiteral("*****@*****.**"));
    about->addAuthor(i18n("Ralf Nolden"), QString(), QStringLiteral("*****@*****.**"));
    setAboutData( about );

    m_newThemeButton->setIcon(QIcon::fromTheme("get-hot-new-stuff"));

    m_themeModel = new ThemeModel(this);
    m_theme->setModel(m_themeModel);
    m_theme->setItemDelegate(new ThemeDelegate(m_theme));
    m_theme->setVerticalScrollMode(QAbstractItemView::ScrollPerItem);

    connect(m_detailsWidget, SIGNAL(changed()), this, SLOT(detailChanged()));

    connect(m_theme->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)),
            this, SLOT(setDesktopThemeDirty()));
    connect(m_newThemeButton, SIGNAL(clicked()), this, SLOT(getNewThemes()));
    connect(m_fileInstallButton, &QPushButton::clicked, this, &KCMDesktopTheme::showFileDialog);
}
Ejemplo n.º 19
0
KCMLiblicense::KCMLiblicense(QWidget *parent, const QStringList &) :
	  KCModule(LibLicenseFactory::componentData(), parent/*, name*/)
{
	KAboutData * about = new KAboutData("kcmliblicense", "liblicense",
	                                    ki18n("Default Content License"),
	                                    "0.4",
	                                    ki18n("Default Content License Control Panel Module"),
	                                    KAboutData::License_LGPL_V2,
	                                    ki18n("(c) 2007 Jason Kivlighn"));
	about->addAuthor(ki18n("Jason Kivlighn"), KLocalizedString(), "*****@*****.**");

	setAboutData( about );

	licenseChooser = new LicenseChooser(this);
	connect( licenseChooser, SIGNAL(licenseChanged()), this, SLOT(changed()) );

	load();
}
Ejemplo n.º 20
0
KCMWeatherService::KCMWeatherService( TQWidget *parent, const char *name )
  : TDECModule( parent, name )
{
  TQVBoxLayout *layout = new TQVBoxLayout( this );
  mWidget = new ServiceConfigWidget( this );

  // not needed, as a change immediately changes the service
  //connect(mWidget, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool)));

  layout->addWidget( mWidget );
  TDEAboutData *about = new TDEAboutData( "kcmweatherservice",
                                      I18N_NOOP( "KWeather Configure Dialog" ),
                                      0, 0, TDEAboutData::License_GPL,
                                      I18N_NOOP( "(c), 2003 Tobias Koenig" ) );

  about->addAuthor( "Tobias Koenig", 0, "*****@*****.**" );
  setAboutData(about);
}
Ejemplo n.º 21
0
HidingConfig::HidingConfig(QWidget *parent, const char *name) : KCModule(parent, name)
{
    QVBoxLayout *layout = new QVBoxLayout(this);
    m_widget = new HidingTab(this);
    layout->addWidget(m_widget);
    layout->addStretch();

    setQuickHelp(KickerConfig::the()->quickHelp());
    setAboutData(KickerConfig::the()->aboutData());

    // addConfig(KickerSettings::self(), m_widget);

    connect(m_widget, SIGNAL(changed()), this, SLOT(changed()));
    connect(KickerConfig::the(), SIGNAL(aboutToNotifyKicker()), this, SLOT(aboutToNotifyKicker()));

    load();
    QTimer::singleShot(0, this, SLOT(notChanged()));
}
Ejemplo n.º 22
0
KSocksConfig::KSocksConfig(QWidget *parent)
  : KCModule(parent, "kcmkio")
{

  KAboutData *about =
  new KAboutData(I18N_NOOP("kcmsocks"), I18N_NOOP("KDE SOCKS Control Module"),
                0, 0, KAboutData::License_GPL,
                I18N_NOOP("(c) 2001 George Staikos"));

  about->addAuthor("George Staikos", 0, "*****@*****.**");

  setAboutData( about );


  QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
  base = new SocksBase(this);
  layout->add(base);

  connect(base->_c_enableSocks, SIGNAL(clicked()), this, SLOT(enableChanged()));
  connect(base->bg, SIGNAL(clicked(int)), this, SLOT(methodChanged(int)));

  // The custom library
  connect(base->_c_customPath, SIGNAL(openFileDialog(KURLRequester *)), this, SLOT(chooseCustomLib(KURLRequester *)));
  connect(base->_c_customPath, SIGNAL(textChanged(const QString&)),
                     this, SLOT(customPathChanged(const QString&)));

  // Additional libpaths
  connect(base->_c_newPath, SIGNAL(openFileDialog(KURLRequester *)), this, SLOT(chooseCustomLib(KURLRequester *)));
  connect(base->_c_newPath, SIGNAL(returnPressed(const QString&)),
          this, SLOT(addThisLibrary(const QString&)));
  connect(base->_c_newPath, SIGNAL(textChanged(const QString&)),
          this, SLOT(libTextChanged(const QString&)));
  connect(base->_c_add, SIGNAL(clicked()), this, SLOT(addLibrary()));
  connect(base->_c_remove, SIGNAL(clicked()), this, SLOT(removeLibrary()));
  connect(base->_c_libs, SIGNAL(selectionChanged()), this, SLOT(libSelection()));

  // The "Test" button
  connect(base->_c_test, SIGNAL(clicked()), this, SLOT(testClicked()));

  // The config backend
  load();
}
Ejemplo n.º 23
0
GTKConfigKCModule::GTKConfigKCModule(QWidget* parent, const QVariantList& args )
    : KCModule(parent)
    , ui(new Ui::GUI)
    , installer(0)
    , uninstaller(0)
    , m_saveEnabled(true)
{
    Q_UNUSED(args);
    KAboutData *acercade = new KAboutData("cgc", i18n("KDE GTK Config"), PROJECT_VERSION,
                                          i18n("Configure your GTK Applications"),
                                          KAboutLicense::LGPL_V3,
                                          i18n("Copyright 2011 José Antonio Sánchez Reynaga"));
    acercade->addAuthor(i18n("José Antonio Sánchez Reynaga (antonioJASR)"),i18n("Main Developer"), "*****@*****.**");
    acercade->addAuthor(i18n("Aleix Pol i Gonzalez"), i18n("Feature development. Previews, code refactoring."), "*****@*****.**");
    acercade->addCredit(i18n("Manuel Tortosa (manutortosa)"), i18n("Ideas, tester, internationalization"));
    acercade->addCredit(i18n("Adrián Chaves Fernández (Gallaecio)"), i18n("Internationalization"));
    setAboutData(acercade);
    setButtons(KCModule::Default | KCModule::Apply);
    ui->setupUi(this);
    appareance = new AppearenceGTK;
    m_cursorsModel = new CursorThemesModel(this);
    ui->cb_cursor->setModel(m_cursorsModel);
    m_iconsModel = new IconThemesModel(false, this);
    ui->cb_icon->setModel(m_iconsModel);
    ui->cb_icon_fallback->setModel(m_iconsModel);

    m_tempGtk2Preview = QStandardPaths::writableLocation(QStandardPaths::TempLocation)+ "/gtkrc-2.0";
    m_tempGtk3Preview = QStandardPaths::writableLocation(QStandardPaths::TempLocation)+ ".config/gtk-3.0/settings.ini";

    const QIcon previewIcon = QIcon::fromTheme("document-preview");
    ui->gtk2Preview->setIcon(previewIcon);
    ui->gtk3Preview->setIcon(previewIcon);

    QString gtk2Preview = QStandardPaths::findExecutable("gtk_preview");
    QString gtk3Preview = QStandardPaths::findExecutable("gtk3_preview");

    m_p2 = new KProcess(this);
    m_p2->setEnv("GTK2_RC_FILES", m_tempGtk2Preview, true);
    if(!gtk2Preview.isEmpty()) {
        *m_p2 << gtk2Preview;
        connect(m_p2, SIGNAL(finished(int)), this, SLOT(untogglePreview()));
    }
Ejemplo n.º 24
0
KCMKonsole::KCMKonsole(QWidget *parent, const char *name, const QStringList &) : KCModule(ModuleFactory::instance(), parent, name)
{

    setQuickHelp(
        i18n("<h1>Konsole</h1> With this module you can configure Konsole, the KDE terminal"
             " application. You can configure the generic Konsole options (which can also be "
             "configured using the RMB) and you can edit the schemas and sessions "
             "available to Konsole."));

    QVBoxLayout *topLayout = new QVBoxLayout(this);
    dialog = new KCMKonsoleDialog(this);
    dialog->line_spacingSB->setRange(0, 8, 1, false);
    dialog->line_spacingSB->setSpecialValueText(i18n("normal line spacing", "Normal"));
    dialog->show();
    topLayout->add(dialog);
    load();

    KAboutData *ab = new KAboutData("kcmkonsole", I18N_NOOP("KCM Konsole"), "0.2", I18N_NOOP("KControl module for Konsole configuration"),
                                    KAboutData::License_GPL, "(c) 2001, Andrea Rizzi", 0, 0, "*****@*****.**");

    ab->addAuthor("Andrea Rizzi", 0, "*****@*****.**");
    setAboutData(ab);

    connect(dialog->terminalSizeHintCB, SIGNAL(toggled(bool)), SLOT(changed()));
    connect(dialog->warnCB, SIGNAL(toggled(bool)), SLOT(changed()));
    connect(dialog->ctrldragCB, SIGNAL(toggled(bool)), SLOT(changed()));
    connect(dialog->cutToBeginningOfLineCB, SIGNAL(toggled(bool)), SLOT(changed()));
    connect(dialog->allowResizeCB, SIGNAL(toggled(bool)), SLOT(changed()));
    connect(dialog->bidiCB, SIGNAL(toggled(bool)), SLOT(changed()));
    connect(dialog->xonXoffCB, SIGNAL(toggled(bool)), SLOT(changed()));
    connect(dialog->blinkingCB, SIGNAL(toggled(bool)), SLOT(changed()));
    connect(dialog->frameCB, SIGNAL(toggled(bool)), SLOT(changed()));
    connect(dialog->line_spacingSB, SIGNAL(valueChanged(int)), SLOT(changed()));
    connect(dialog->matchTabWinTitleCB, SIGNAL(toggled(bool)), SLOT(changed()));
    connect(dialog->silence_secondsSB, SIGNAL(valueChanged(int)), SLOT(changed()));
    connect(dialog->word_connectorLE, SIGNAL(textChanged(const QString &)), SLOT(changed()));
    connect(dialog->SchemaEditor1, SIGNAL(changed()), SLOT(changed()));
    connect(dialog->SessionEditor1, SIGNAL(changed()), SLOT(changed()));
    connect(dialog->SchemaEditor1, SIGNAL(schemaListChanged(const QStringList &, const QStringList &)), dialog->SessionEditor1,
            SLOT(schemaListChanged(const QStringList &, const QStringList &)));
    connect(dialog->SessionEditor1, SIGNAL(getList()), dialog->SchemaEditor1, SLOT(getList()));
}
Ejemplo n.º 25
0
KCMKMailSummary::KCMKMailSummary(QWidget *parent, const char *name)
    : KCModule(parent, name)
{
    initGUI();

    connect(mFolderView, SIGNAL(clicked(QListViewItem *)), SLOT(modified()));
    connect(mFullPath, SIGNAL(toggled(bool)), SLOT(modified()));

    KAcceleratorManager::manage(this);

    load();

    KAboutData *about = new KAboutData(I18N_NOOP("kcmkmailsummary"),
                                       I18N_NOOP("Mail Summary Configuration Dialog"),
                                       0, 0, KAboutData::License_GPL,
                                       I18N_NOOP("(c) 2004 Tobias Koenig"));

    about->addAuthor("Tobias Koenig", 0, "*****@*****.**");
    setAboutData(about);
}
Ejemplo n.º 26
0
KCMLookandFeel::KCMLookandFeel(QObject* parent, const QVariantList& args)
    : KQuickAddons::ConfigModule(parent, args)
    , m_config(QStringLiteral("kdeglobals"))
    , m_configGroup(m_config.group("KDE"))
    , m_applyColors(true)
    , m_applyWidgetStyle(true)
    , m_applyIcons(true)
    , m_applyPlasmaTheme(true)
    , m_applyCursors(true)
    , m_applyWindowSwitcher(true)
    , m_applyDesktopSwitcher(true)
{
    //This flag seems to be needed in order for QQuickWidget to work
    //see https://bugreports.qt-project.org/browse/QTBUG-40765
    //also, it seems to work only if set in the kcm, not in the systemsettings' main
    qApp->setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
    qmlRegisterType<QStandardItemModel>();
    KAboutData* about = new KAboutData(QStringLiteral("kcm_lookandfeel"), i18n("Configure Look and Feel details"),
                                       QStringLiteral("0.1"), QString(), KAboutLicense::LGPL);
    about->addAuthor(i18n("Marco Martin"), QString(), QStringLiteral("*****@*****.**"));
    setAboutData(about);
    setButtons(Apply | Default);

    m_model = new QStandardItemModel(this);
    QHash<int, QByteArray> roles = m_model->roleNames();
    roles[PluginNameRole] = "pluginName";
    roles[ScreenhotRole] = "screenshot";
    roles[HasSplashRole] = "hasSplash";
    roles[HasLockScreenRole] = "hasLockScreen";
    roles[HasRunCommandRole] = "hasRunCommand";
    roles[HasLogoutRole] = "hasLogout";

    roles[HasColorsRole] = "hasColors";
    roles[HasWidgetStyleRole] = "hasWidgetStyle";
    roles[HasIconsRole] = "hasIcons";
    roles[HasPlasmaThemeRole] = "hasPlasmaTheme";
    roles[HasCursorsRole] = "hasCursors";
    roles[HasWindowSwitcherRole] = "hasWindowSwitcher";
    roles[HasDesktopSwitcherRole] = "hasDesktopSwitcher";
    m_model->setItemRoleNames(roles);
}
Ejemplo n.º 27
0
KCMPrintMgr::KCMPrintMgr(QWidget *parent, const char *name, const QStringList &) : KCModule(KPrintMgrFactory::instance(), parent, name)
{
    setButtons(KCModule::Ok);
    setRootOnlyMsg(
        i18n("Print management as normal user\n"
             "Some print management operations may need administrator privileges. Use the\n"
             "\"Administrator Mode\" button below to start this print management tool with\n"
             "administrator privileges."));
    setUseRootOnlyMsg(false);

    m_mainview = new KMMainView(this, "MainView");

    QVBoxLayout *main_ = new QVBoxLayout(this, 0, 0);
    main_->addWidget(m_mainview);
    main_->activate();

    KAboutData *about = new KAboutData(I18N_NOOP("kcmprintmgr"), I18N_NOOP("KDE Printing Management"), 0, 0, KAboutData::License_GPL,
                                       I18N_NOOP("(c) 2000 - 2002 Michael Goffioul"));
    about->addAuthor("Michael Goffioul", 0, "*****@*****.**");
    setAboutData(about);
}
Ejemplo n.º 28
0
LookAndFeelConfig::LookAndFeelConfig(QWidget *parent, const char *name) : KCModule(parent, name)
{

    KAboutData *about = new KAboutData(I18N_NOOP("kcmkicker"), I18N_NOOP("KDE Panel Control Module"), 0, 0, KAboutData::License_GPL,
                                       I18N_NOOP("(c) 1999 - 2001 Matthias Elter\n(c) 2002 Aaron J. Seigo"));

    about->addAuthor("Matthias Elter", 0, "*****@*****.**");
    about->addAuthor("Aaron J. Seigo", 0, "*****@*****.**");
    setAboutData(about);

    KickerConfig::initScreenNumber();
    QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint());

    lookandfeeltab = new LookAndFeelTab(this);
    layout->addWidget(lookandfeeltab);
    layout->addStretch();

    connect(lookandfeeltab, SIGNAL(changed()), SLOT(configChanged()));

    load();
}
Ejemplo n.º 29
0
KCMKuick::KCMKuick(QWidget *parent, const char *name, const QStringList &)
:KCModule(parent, name)
{
    KAboutData *ab=new KAboutData( "kcmkuick", I18N_NOOP("KCM Kuick"),
       "0.2",I18N_NOOP("KControl module for Kuick's configuration"), KAboutData::License_GPL,
       "(c) 2001, Holger Freyther", 0, 0, "*****@*****.**");
    ab->addAuthor("Holger Freyther",0, "*****@*****.**");
    setAboutData( ab );

    QVBoxLayout *topLayout = new QVBoxLayout(this, 0, 0);
    dialog = new KCMKuickDialog(this);
    topLayout->add(dialog);
    topLayout->addStretch();

    connect( dialog->m_sbCopy, SIGNAL(valueChanged(int) ), SLOT(configChanged() ) );
    connect( dialog->m_sbMove, SIGNAL(valueChanged(int) ), SLOT(configChanged() ) );
    connect( dialog->pbCopyClear, SIGNAL(pressed() ), SLOT(slotClearCopyCache() ) );
    connect( dialog->pbMoveClear, SIGNAL(pressed() ), SLOT(slotClearMoveCache() ) );
    connect( dialog->m_chkShow, SIGNAL(clicked() ), SLOT(slotShowToggled() ) );
    
    load();
}
Ejemplo n.º 30
0
KInfoListWidget::KInfoListWidget(const QString &_title, QWidget *parent, bool _getlistbox(QTreeWidget *tree) ) :
	KCModule(parent), title(_title) {
	KAboutData *about = new KAboutData(QStringLiteral("kcminfo"),
			i18n("System Information Control Module"),
			QString(), QString(), KAboutLicense::GPL,
			i18n(	"(c) 2008 Nicolas Ternisien\n"
					"(c) 1998 - 2002 Helge Deller"));

	about->addAuthor(i18n("Nicolas Ternisien"), QString(), QStringLiteral("*****@*****.**"));
	about->addAuthor(i18n("Helge Deller"), QString(), QStringLiteral("*****@*****.**"));
	setAboutData(about);

	
	//qDebug() << "Constructing a KInfoListWidget..." << endl;

	//setButtons(KCModule::Help);
	getlistbox = _getlistbox;
	QHBoxLayout *layout = new QHBoxLayout(this);
	//PORT QT5 layout->setSpacing(KDialog::spacingHint());
	layout->setMargin(0);
	widgetStack = new QStackedWidget(this);
	layout->addWidget(widgetStack);

	tree = new QTreeWidget(widgetStack);
	widgetStack->addWidget(tree);
	tree->setMinimumSize(200, 120);
	tree->setFont(QFontDatabase::systemFont(QFontDatabase::GeneralFont)); /* default font */
	tree->setSortingEnabled(true);
	tree->setRootIsDecorated(false);
	tree->header()->setSortIndicatorShown(true);
	tree->setWhatsThis(i18n("This list displays system information on the selected category.") );
	
	noInfoText = new QLabel(widgetStack);
	widgetStack->addWidget(noInfoText);
	noInfoText->setAlignment(Qt::AlignCenter);
	noInfoText->setWordWrap( true);
	widgetStack->setCurrentWidget(noInfoText);
	
}