Changeset View
Changeset View
Standalone View
Standalone View
src/view/katestatusbar.cpp
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Line(s) | 63 | { | |||
---|---|---|---|---|---|
72 | topLayout->setSpacing(4); | 72 | topLayout->setSpacing(4); | ||
73 | 73 | | |||
74 | /** | 74 | /** | ||
75 | * add a bit space | 75 | * add a bit space | ||
76 | */ | 76 | */ | ||
77 | topLayout->addSpacing(4); | 77 | topLayout->addSpacing(4); | ||
78 | 78 | | |||
79 | /** | 79 | /** | ||
80 | * show modification state of the document | ||||
81 | */ | ||||
82 | m_modifiedLabel = new QToolButton(this); | ||||
83 | m_modifiedLabel->setAutoRaise(true); | ||||
84 | m_modifiedLabel->setEnabled(false); | ||||
85 | topLayout->addWidget(m_modifiedLabel, 0); | ||||
86 | m_modifiedLabel->setFocusProxy(m_view); | ||||
87 | | ||||
88 | /** | ||||
80 | * show Line XXX, Column XXX | 89 | * show Line XXX, Column XXX | ||
81 | */ | 90 | */ | ||
82 | m_lineColLabel = new QLabel(this); | 91 | m_lineColLabel = new QLabel(this); | ||
83 | m_lineColLabel->installEventFilter(this); // register for mouse click | 92 | m_lineColLabel->installEventFilter(this); // register for mouse click | ||
84 | topLayout->addWidget(m_lineColLabel, 0); | 93 | topLayout->addWidget(m_lineColLabel, 0); | ||
85 | m_lineColLabel->setAlignment(Qt::AlignVCenter | Qt::AlignLeft); | 94 | m_lineColLabel->setAlignment(Qt::AlignVCenter | Qt::AlignLeft); | ||
86 | m_lineColLabel->setFocusProxy(m_view); | 95 | m_lineColLabel->setFocusProxy(m_view); | ||
87 | m_lineColLabel->setWhatsThis(i18n("Current cursor position. Click to go to a specific line.")); | 96 | m_lineColLabel->setWhatsThis(i18n("Current cursor position. Click to go to a specific line.")); | ||
▲ Show 20 Lines • Show All 85 Lines • ▼ Show 20 Line(s) | |||||
173 | m_mode = new QPushButton(QString(), this); | 182 | m_mode = new QPushButton(QString(), this); | ||
174 | m_mode->setFlat(true); | 183 | m_mode->setFlat(true); | ||
175 | topLayout->addWidget(m_mode, 0); | 184 | topLayout->addWidget(m_mode, 0); | ||
176 | m_mode->setMenu(m_view->modeAction()->menu()); | 185 | m_mode->setMenu(m_view->modeAction()->menu()); | ||
177 | m_mode->setFocusProxy(m_view); | 186 | m_mode->setFocusProxy(m_view); | ||
178 | m_mode->setWhatsThis(i18n("Syntax highlighting")); | 187 | m_mode->setWhatsThis(i18n("Syntax highlighting")); | ||
179 | 188 | | |||
180 | /** | 189 | /** | ||
181 | * show modification state of the document | | |||
182 | */ | | |||
183 | m_modifiedLabel = new QToolButton(this); | | |||
184 | m_modifiedLabel->setAutoRaise(true); | | |||
185 | m_modifiedLabel->setEnabled(false); | | |||
186 | topLayout->addWidget(m_modifiedLabel, 0); | | |||
187 | m_modifiedLabel->setFocusProxy(m_view); | | |||
188 | | ||||
189 | /** | | |||
190 | * add a bit space | 190 | * add a bit space | ||
191 | */ | 191 | */ | ||
192 | topLayout->addSpacing(4); | 192 | topLayout->addSpacing(4); | ||
193 | 193 | | |||
194 | // signals for the statusbar | 194 | // signals for the statusbar | ||
195 | connect(m_view, SIGNAL(cursorPositionChanged(KTextEditor::View*, KTextEditor::Cursor)), this, SLOT(cursorPositionChanged())); | 195 | connect(m_view, SIGNAL(cursorPositionChanged(KTextEditor::View*, KTextEditor::Cursor)), this, SLOT(cursorPositionChanged())); | ||
196 | connect(m_view, SIGNAL(viewModeChanged(KTextEditor::View*, KTextEditor::View::ViewMode)), this, SLOT(viewModeChanged())); | 196 | connect(m_view, SIGNAL(viewModeChanged(KTextEditor::View*, KTextEditor::View::ViewMode)), this, SLOT(viewModeChanged())); | ||
197 | connect(m_view, SIGNAL(selectionChanged(KTextEditor::View*)), this, SLOT(selectionChanged())); | 197 | connect(m_view, SIGNAL(selectionChanged(KTextEditor::View*)), this, SLOT(selectionChanged())); | ||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |