Exemple #1
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    //QDesktopServices::openUrl(QUrl("file:///C:/Documents and Settings/All Users/Desktop", QUrl::TolerantMode));
    ui->setupUi( this);
    //ui->listWidget->setCurrentRow(0);
    //ui->listWidget_2->setCurrentRow(0);

    wordList << "title:"<<"author:"<<"keyword:"<<"tag:"<<"note:";
    initToolbar();

    initMainArea();
    initIcons();

    initTabWidget();

    initTheDownLeftCorner();
    initTheUpLeftCorner();
    initSignalsAndSlots();
    initContextMenu();
    ui->listWidget->setCurrentRow(0);
    ui->listWidget_2->setCurrentRow(0);
}
Exemple #2
0
SystemTrayPlugin::SystemTrayPlugin( QObject *parent, const char *name, const QStringList & /*args*/ )
 : SkimPlugin(KGenericFactory<SystemTrayPlugin>::instance(), parent, name)
{
     m_tray = new KDETrayStatus(static_cast<SkimPluginManager *>(parent), 0, "KdeTrayStatus");
     connect( this, SIGNAL(settingsChanged()), m_tray, SLOT(initContextMenu()));
}
Exemple #3
0
MainWindow::MainWindow( QWidget* parent, const char* name, WFlags fl )
    : ScimDragableFrame( parent, parent, name, fl ),
    ScimXMLGUIClient(SkimPluginManager::self()->getActionCollection()), DCOPObject("Skim_MainWindow"),
    m_autoHideTimeoutTimer(0), m_showHandleTimer(0), m_showExtHandleTimer(0),m_mode(PanelEmbedded),
    m_embedInitialized(false), m_contentIsVisible( false ), m_panelTurnedOn( false ),
    m_updatePropertiesNeeded(false), m_applet_direction(Qt::Horizontal), 
    m_shouldChangeDirection(false), m_logo(0) {

    QXEmbed::initialize ();

//     setWFlags(Qt::WStyle_Customize | Qt::WX11BypassWM | Qt::WStyle_StaysOnTop);
    setKeepVisible( true );
    setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
    m_allModules = SkimPluginManager::self();

    m_allModules->registerSpecialProperyObject(this);

    m_inputServer = m_allModules->getInputServer();
    ScimXMLGUIBuilder* guiBuilder = new ScimXMLGUIBuilder(this);
    m_guiFactory = new KXMLGUIFactory(guiBuilder, this);

    setCaption(i18n("Main Toolbar"));

    m_serverAction =
      dynamic_cast<ScimAction *>(m_allModules->getActionCollection()->action( "change_server" ));

    m_mainWindowLayout = new QBoxLayout( this, QBoxLayout::LeftToRight, -1, 0, "m_mainWindowLayout" );
    m_mainWindowLayout->setAlignment(Qt::AlignCenter);
    m_mainWindowLayout->setResizeMode(QLayout::FreeResize);
    m_moveHandle = new ScimMoveHandle( this, this );
    m_moveHandle->setKeepVisible( false );
    m_mainWindowLayout->addWidget( m_moveHandle );

    //FIXME:qpopupmenu will steal focus from current editing widget, however 
    //kpopupmenu won't. this should be a bug in Qt
    m_contextMenu = new KPopupMenu(this, "MainToolBar_RightClickMenu");

    createToolbar();

    m_defaultActionCollection = m_allModules->getActionCollection();

    m_toggleDockingAction =
            static_cast<KToggleAction*>(m_defaultActionCollection->action( "toggledocking_mainwindow" ));
    connect( m_moveHandle, SIGNAL( doubleClicked() ), m_toggleDockingAction, SLOT( activate() ) );

    clearWState( WState_Polished );

    if(m_mode == StandAlone)
        move( ScimKdeSettings::mainWindow_Position());

    changeSetting();

    #if 0 && ENABLE_DEBUG
    KAction * reloadaction;
    //we should remove the old one first if exist
    if(reloadaction = m_defaultActionCollection->action( "reload_wm" ))
        delete reloadaction;

    reloadaction = new KAction( KGuiItem( i18n( "Reload" ), "reload" ),
                "", this, SLOT(requestReloadSelf()), m_defaultActionCollection, "reload_wm");

    reloadaction->plug(m_toolbar);
    #endif

    connect(m_defaultActionCollection, SIGNAL(propertiesRegistered(bool)), SLOT(updateProperties (bool)));
    connect(m_defaultActionCollection, SIGNAL(propertiesRemoved(bool)), SLOT(updateProperties (bool)));
    connect(m_defaultActionCollection, SIGNAL(propertyChanged(bool)), SLOT(updateProperties (bool)));
    connect(m_inputServer, SIGNAL( turnOnPanelReq() ), SLOT( slotTurnOn() ));
    connect(m_inputServer, SIGNAL( turnOffPanelReq() ), SLOT( slotTurnOff() ));

    #if ENABLE_DEBUG
    show();
    #endif

    connect(m_allModules->getActionCollection(), SIGNAL(standaloneHelperActionsChanged()),
        this, SLOT(initContextMenu()));

    //fix bug: https://bugzilla.novell.com/show_bug.cgi?id=149541
    //KXMLGUIClient keeps a list of pluged actions, if actions are deleted, this list
    //won't be changed, so we have to unplug all actions before remove any actions 
    connect( m_defaultActionCollection, SIGNAL( preparePropertiesRemove(bool) ), SLOT( emptyToolbar(bool) ) );

    initContextMenu();
}
Exemple #4
0
ErrorListWidget::ErrorListWidget(QWidget *parent)
{
	Q_UNUSED(parent);
	connect(this, &ErrorListWidget::itemDoubleClicked, this, &ErrorListWidget::highlightElement);
	initContextMenu();
}
Exemple #5
0
MemChartPrivate::MemChartPrivate(QWidget *parent):QWidget(parent)
{
    initVars();
    initSettings();
    initContextMenu();
}