void k2send::newToolbarConfig()
{
    createGUI();

#if defined(KDE_MAKE_VERSION)
# if KDE_VERSION >= KDE_MAKE_VERSION(3,1,0)
    applyMainWindowSettings(KGlobal::config(), autoSaveGroup());
# else
    applyMainWindowSettings(KGlobal::config());
# endif
#else
    applyMainWindowSettings(KGlobal::config());
#endif
}
Exemple #2
0
void kerp::newToolbarConfig()
{
    // this slot is called when user clicks "Ok" or "Apply" in the toolbar editor.
    // recreate our GUI, and re-apply the settings (e.g. "text under icons", etc.)
    createGUI();

#if defined(KDE_MAKE_VERSION)
# if KDE_VERSION >= KDE_MAKE_VERSION(3,1,0)
    applyMainWindowSettings(KGlobal::config(), autoSaveGroup());
# else
    applyMainWindowSettings(KGlobal::config());
# endif
#else
    applyMainWindowSettings(KGlobal::config());
#endif
}
Exemple #3
0
CViewer::CViewer()
{
    KPluginFactory *factory=KPluginLoader("kfontviewpart").factory();

    if(factory)
    {
        itsPreview=factory->create<KParts::ReadOnlyPart>(this);

        actionCollection()->addAction(KStandardAction::Open, this, SLOT(fileOpen()));
        actionCollection()->addAction(KStandardAction::Quit, this, SLOT(close()));
        actionCollection()->addAction(KStandardAction::KeyBindings, this, SLOT(configureKeys()));
        itsPrintAct=actionCollection()->addAction(KStandardAction::Print, itsPreview, SLOT(print()));

        itsPrintAct->setEnabled(false);

        if(itsPreview->browserExtension())
            connect(itsPreview->browserExtension(), SIGNAL(enableAction(const char*,bool)),
                    this, SLOT(enableAction(const char*,bool)));

        setCentralWidget(itsPreview->widget());
        createGUI(itsPreview);

        setAutoSaveSettings();
        applyMainWindowSettings(KSharedConfig::openConfig()->group("MainWindow"));
    }
    else
Exemple #4
0
void PMShell::slotNewToolbarConfig( )
{
   createGUI( 0 );
   createShellGUI( false );
   createGUI( m_pPart );
   applyMainWindowSettings( KGlobal::config( ), "Appearance" );
}
void Korrent::newToolbarConfig()
{
    // this slot is called when user clicks "Ok" or "Apply" in the toolbar editor.
    // recreate our GUI, and re-apply the settings (e.g. "text under icons", etc.)
    createGUI();
    applyMainWindowSettings( KGlobal::config(), autoSaveGroup() );
}
Exemple #6
0
void PMShell::updateGUI( )
{
   saveMainWindowSettings( KGlobal::config( ), "Appearance" );
   createGUI( 0 );
   createShellGUI( false );
   createGUI( m_pPart );
   applyMainWindowSettings( KGlobal::config( ), "Appearance" );
}
void MainWindow::slotEditToolbars()
{
  KEditToolbar dlg(guiFactory());
  if (dlg.exec())
  {
    //setupGUI();
    applyMainWindowSettings( KGlobal::config(), autoSaveGroup() );
  }
}
void Knmap::slotNewToolbarConfig( )
{
#ifdef _DEBUG
	createGUI( QDir::homeDirPath( ) + "/.kde/share/apps/knmap/knmapui.rc" );
#else
	createGUI( );
#endif

	applyMainWindowSettings( KGlobal::config( ), autoSaveGroup( ));
}
Exemple #9
0
void MainWindow::slotNewToolbarConfig() // This is called when OK or Apply is clicked
{
    // ...if you use any action list, use plugActionList on each here...
    createGUI("basketui.rc"); // TODO: Reconnect tags menu aboutToShow() ??
    if (!Global::bnpView->isPart())
        Global::bnpView->connectTagsMenu(); // The Tags menu was created again!
    // TODO: Does this do anything?
    plugActionList(QString::fromLatin1("go_baskets_list"), actBasketsList);
    KConfigGroup group = KGlobal::config()->group(autoSaveGroup());
    applyMainWindowSettings(group);
}
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();
}
Exemple #11
0
PMShell::PMShell( const KURL& url )
      : PMDockMainWindow( 0, "mainwindow" )
{
   setPluginLoadingMode( DoNotLoadPlugins );
   setInstance( PMFactory::instance( ), false );

   m_pPart = new PMPart( this, "part", this, "part", true, this );
   m_pPart->setReadWrite( ); // read-write mode
   m_viewNumber = 0;
   m_objectsToDelete.setAutoDelete( true );

   if (!initialGeometrySet())
      resize(800,600);

   setupActions( );

   restoreOptions( );

   setupView( );
   setXMLFile( "kpovmodelershell.rc" );
   createGUI( m_pPart );

   //guiFactory( )->addClient( m_pPart );
   m_pStatusBar = statusBar( );
   m_pStatusBar->insertItem( " ", c_statusBarInfo, 1 );
   m_pStatusBar->insertItem( "" , c_statusBarControlPoints );

   KConfig* config = instance( )->config( );
   config->setGroup( "Appearance" );
   applyMainWindowSettings( config );

   if( !url.isEmpty( ) )
      openURL( url );

   setCaption( url.prettyURL( ) );
   connect( m_pPart, SIGNAL( modified( ) ), SLOT( slotModified( ) ) );
   connect( m_pPart, SIGNAL( controlPointMessage( const QString& ) ),
            SLOT( slotControlPointMsg( const QString& ) ) );
}
Exemple #12
0
void TopLevel::readSettings()
{
  config = kapp->config();

  applyMainWindowSettings( config, "MainWindowSettings" );

  actRecent->loadEntries( config );

  config->setGroup("General Options");

  config->setGroup("Fax Options");

  fop.width = config->readNumEntry("width", 1728);
  fop.resauto = config->readNumEntry("resauto", 1);
  fop.geomauto = config->readNumEntry("geomauto", 1);
  fop.height = config->readNumEntry("height", 2339);
  fop.fine = config->readNumEntry("resolution", 1);
  fop.flip = config->readNumEntry("flip", 0);
  fop.invert = config->readNumEntry("invert", 0);
  fop.lsbfirst = config->readNumEntry("lsb", 0);
  fop.raw = config->readNumEntry("raw", 3);

  setFaxDefaults();
}
Exemple #13
0
MainWindow::MainWindow(QWidget *parent)
        : KXmlGuiWindow(parent), m_settings(0), m_quit(false)
{
    BasketStatusBar* bar = new BasketStatusBar(statusBar());
    m_baskets = new BNPView(this, "BNPViewApp", this, actionCollection(), bar);
    setCentralWidget(m_baskets);

    setupActions();
    statusBar()->show();
    statusBar()->setSizeGripEnabled(true);

    setAutoSaveSettings(/*groupName=*/QString::fromLatin1("MainWindow"), /*saveWindowSize=*//*FIXME:false:Why was it false??*/true);

//  m_actShowToolbar->setChecked(   toolBar()->isVisible()   );
    m_actShowStatusbar->setChecked(statusBar()->isVisible());
    connect(m_baskets,      SIGNAL(setWindowCaption(const QString &)), this, SLOT(setCaption(const QString &)));

//  InlineEditors::instance()->richTextToolBar();
    setStandardToolBarMenuEnabled(true);

    createGUI("basketui.rc");
    KConfigGroup group = KGlobal::config()->group(autoSaveGroup());
    applyMainWindowSettings(group);
}
Exemple #14
0
 void GUI::newToolBarConfig() // This is called when OK, Apply or Defaults is clicked
 {
     applyMainWindowSettings(KGlobal::config()->group("MainWindow"));
 }
Exemple #15
0
void KXsldbg::applyNewToolbarConfig()
{
    applyMainWindowSettings(KGlobal::config(), "MainWindow");
}
Exemple #16
0
void CervisiaShell::slotNewToolbarConfig()
{
    KConfigGroup cg(KSharedConfig::openConfig(), autoSaveGroup());
    applyMainWindowSettings(cg);
}
Exemple #17
0
void Kiten::newToolBarConfig()
{
  createGUI( "kitenui.rc" );
  KConfigGroup configGroup = KSharedConfig::openConfig()->group( "kitenWindow" );
  applyMainWindowSettings( configGroup );
}
Exemple #18
0
Kiten::Kiten( QWidget *parent, const char *name )
: KXmlGuiWindow( parent )
, _lastQuery( DictQuery() )
, _radselect_proc( new KProcess( this ) )
, _kanjibrowser_proc( new KProcess( this ) )
{
  _radselect_proc->setProgram( QStandardPaths::findExecutable( "kitenradselect" ) );
  _kanjibrowser_proc->setProgram( QStandardPaths::findExecutable( "kitenkanjibrowser" ) );
  setStandardToolBarMenuEnabled( true );
  setObjectName( QLatin1String( name ) );

  /* Set up the config */
  _config = KitenConfigSkeleton::self();
  _config->load();

  /* Set up hot keys */
  //KDE4 TODO
/*	Accel = new KGlobalAccel( this );
  (void) Accel->insert(   "Lookup English/Japanese word"
                        , i18n("Lookup English/Japanese Word")
                        , i18n( "Looks up current text on clipboard in the same way as if you used Kiten's regular search." )
                        , Qt::CTRL + Qt::ALT + Qt::Key_S
                        , Qt::CTRL + Qt::ALT + Qt::Key_S
                        , this
                        , SLOT(searchClipboardContents()) );
  Accel->readSettings( KSharedConfig::openConfig() );
  Accel->updateConnections();
*/
  /* ResultsView is our main widget, displaying the results of a search */
  _mainView = new ResultsView( this, "mainView" );

  /* Create the export list */
//	setupExportListDock();

  /* TODO: have a look at this idea
  detachedView = new ResultsView( NULL, "detachedView" );
  */

  setCentralWidget( _mainView->widget() );

  setupActions();
  // Be sure to create this manager before creating the GUI
  // as it needs to add a KAction to it.
  _dictionaryUpdateManager = new DictionaryUpdateManager( this );

  createGUI();

  _statusBar = statusBar();
  _optionDialog = 0;

  /* Start the system tray icon. */
  _sysTrayIcon = new QSystemTrayIcon( windowIcon(), this );
  _sysTrayIcon->show();

  /* Set things as they were (as told in the config) */
  _autoSearchToggle->setChecked( _config->autosearch() );
  _inputManager->setDefaultsFromConfig();
  updateConfiguration();
  applyMainWindowSettings( KSharedConfig::openConfig()->group( "kitenWindow" ) );

  /* What happens when links are clicked or things are selected in the clipboard */
  connect(_mainView, &ResultsView::urlClicked, this, &Kiten::searchText);
  connect( QApplication::clipboard(), SIGNAL(selectionChanged()),
                                this,   SLOT(searchClipboard()) );
  connect(_inputManager, &SearchStringInput::search, this, &Kiten::searchFromEdit);

  connect( _mainView->view()->verticalScrollBar(), SIGNAL(valueChanged(int)),
                                            this,   SLOT(setCurrentScrollValue(int)) );
  /* We need to know when to reload our dictionaries if the user updated them. */
  connect(_dictionaryUpdateManager, &DictionaryUpdateManager::updateFinished, this, &Kiten::loadDictionaries);

  /* See below for what else needs to be done */
  QTimer::singleShot( 10, this, SLOT(finishInit()) );
}
void KTNEFMain::slotNewToolbarConfig()
{
  createGUI( "ktnefui.rc" );
  applyMainWindowSettings( KGlobal::config()->group( "MainWindow" ) );
}
void KFileReplace::applyNewToolbarConfig()
{
    applyMainWindowSettings(KGlobal::config(), autoSaveGroup());
}
void CervisiaShell::slotNewToolbarConfig()
{
    applyMainWindowSettings( KGlobal::config()->group( autoSaveGroup() ) );
}
Exemple #22
0
void DXmlGuiWindow::slotNewToolbarConfig()
{
    KConfigGroup group = KSharedConfig::openConfig()->group(configGroupName());
    applyMainWindowSettings(group);
}
void KAddressBookMain::newToolbarConfig()
{
    createGUI( "kaddressbookui.rc" );
    applyMainWindowSettings( KGlobal::config()->group( "MainWindow" ) );
}
Exemple #24
0
void Kooka::newToolbarConfig()
{
    // OK/Apply pressed in the toolbar editor
    applyMainWindowSettings(KGlobal::config(), autoSaveGroup());
}
Exemple #25
0
void KompareShell::newToolbarConfig()
{
	KConfigGroup group(KSharedConfig::openConfig(), autoSaveGroup());
	applyMainWindowSettings(group);
}
Exemple #26
0
void KEBApp::slotNewToolbarConfig()
{
    // called when OK or Apply is clicked
    createGUI();
    applyMainWindowSettings(KGlobal::config(), "MainWindow");
}