File: dockeditor.cpp

package info (click to toggle)
vym 2.6.11-3
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 12,628 kB
  • sloc: cpp: 34,052; ruby: 846; xml: 278; sh: 187; makefile: 28
file content (25 lines) | stat: -rw-r--r-- 541 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "dockeditor.h"

#include "vymmodel.h"

DockEditor::DockEditor () { init (); }
DockEditor::DockEditor ( QString title, QWidget *p, VymModel *m):QDockWidget (title,p) 
{
    editorTitle=title;
    model=m;
    init();
}

void DockEditor::init()
{
    connect ( this, SIGNAL ( topLevelChanged ( bool ) ),
	      this, SLOT (changeTopLevel ( bool ) ) );
}

void DockEditor::changeTopLevel (bool topLevel) 
{
    if (topLevel && model)
	setWindowTitle (editorTitle+": "+model->getFileName() );
    else	
	setWindowTitle (editorTitle);
}