KateViewManager::KateViewManager (QWidget *parentW, KateMainWindow *parent) : QSplitter (parentW) , m_mainWindow(parent) , m_blockViewCreationAndActivation (false) , m_activeViewRunning (false) { // while init m_init = true; // important, set them up, as we use them in other methodes setupActions (); guiMergedView = 0; // resize mode setOpaqueResize( KGlobalSettings::opaqueResize() ); KateViewSpace* vs = new KateViewSpace( this, 0 ); addWidget (vs); vs->setActive( true ); m_viewSpaceList.append(vs); connect( this, SIGNAL(viewChanged()), this, SLOT(slotViewChanged()) ); connect(KateDocManager::self(), SIGNAL(initialDocumentReplaced()), this, SIGNAL(viewChanged())); connect(KateDocManager::self(), SIGNAL(documentCreated(KTextEditor::Document *)), this, SLOT(documentCreated(KTextEditor::Document *))); connect(KateDocManager::self(), SIGNAL(documentDeleted(KTextEditor::Document *)), this, SLOT(documentDeleted(KTextEditor::Document *))); // init done m_init = false; }
//BEGIN KateFileList KateFileList::KateFileList (KateMainWindow *main, KateViewManager *_viewManager, QWidget * parent, const char * name ) : KListView (parent, name) , m_sort( KateFileList::sortByID ) { m_main = main; m_tooltip = new ToolTip( viewport(), this ); // default colors m_viewShade = QColor( 51, 204, 255 ); m_editShade = QColor( 255, 102, 153 ); m_enableBgShading = false; setFocusPolicy ( QWidget::NoFocus ); viewManager = _viewManager; header()->hide(); addColumn("Document Name"); setSelectionMode( QListView::Single ); setSorting( 0, true ); setShowToolTips( false ); setupActions (); for (uint i = 0; i < KateDocManager::self()->documents(); i++) { slotDocumentCreated (KateDocManager::self()->document(i)); slotModChanged (KateDocManager::self()->document(i)); } connect(KateDocManager::self(),SIGNAL(documentCreated(Kate::Document *)), this,SLOT(slotDocumentCreated(Kate::Document *))); connect(KateDocManager::self(),SIGNAL(documentDeleted(uint)), this,SLOT(slotDocumentDeleted(uint))); // don't Honour KDE single/double click setting, this files are already open, // no need for hassle of considering double-click connect(this,SIGNAL(selectionChanged(QListViewItem *)), this,SLOT(slotActivateView(QListViewItem *))); connect(viewManager,SIGNAL(viewChanged()), this,SLOT(slotViewChanged())); connect(this,SIGNAL(contextMenuRequested( QListViewItem *, const QPoint &, int )), this,SLOT(slotMenu ( QListViewItem *, const QPoint &, int ))); }