Commit 9c2d2d70 authored by Christoph Cullmann's avatar Christoph Cullmann

we include a tabbar soon per default, if people want the other variants, they...

we include a tabbar soon per default, if people want the other variants, they might port them from master, no need to waste our time
parent 1fa1ba07
......@@ -28,14 +28,14 @@ ecm_optional_add_subdirectory (filebrowser)
# xml completion
ecm_optional_add_subdirectory (xmltools)
ecm_optional_add_subdirectory( openheader )
# open header matching to current file
ecm_optional_add_subdirectory (openheader)
ecm_optional_add_subdirectory( close-except-like )
# close document except this one (or similar)
ecm_optional_add_subdirectory (close-except-like)
if(NOT WIN32)
ecm_optional_add_subdirectory (gdbplugin) # should be tested on windows...
endif(NOT WIN32)
# debugger plugin, needs windows love
ecm_optional_add_subdirectory (gdbplugin)
# build plugin
ecm_optional_add_subdirectory (katebuild-plugin)
......@@ -44,22 +44,12 @@ ecm_optional_add_subdirectory (katebuild-plugin)
#add_subdirectory( mailfiles )
#add_subdirectory( tabbarextension )
#add_subdirectory( symbolviewer )
#add_subdirectory( filetemplates )
#add_subdirectory( kttsd )
#add_subdirectory( xmlcheck )
#add_subdirectory( tabify )
#macro_optional_add_subdirectory(pate)
#
########### next target ###############
set(katetabbarextensionplugin_PART_SRCS
plugin_katetabbarextension.cpp
ktinytabbutton.cpp
ktinytabbar.cpp
ktinytabbarconfigdialog.cpp
ktinytabbarconfigpage.cpp )
set(katetabbarextensionplugin_PART_UI
tabbarconfigwidget.ui
)
kde4_add_ui_files(katetabbarextensionplugin_PART_SRCS ${katetabbarextensionplugin_PART_UI} )
kde4_add_plugin(katetabbarextensionplugin ${katetabbarextensionplugin_PART_SRCS})
target_link_libraries(katetabbarextensionplugin ${KDE4_KDEUI_LIBS} ${KDE4_KPARTS_LIBS} kateinterfaces )
install(TARGETS katetabbarextensionplugin DESTINATION ${PLUGIN_INSTALL_DIR} )
########### install files ###############
install( FILES ui.rc DESTINATION ${DATA_INSTALL_DIR}/kate/plugins/katetabbarextension )
install( FILES katetabbarextension.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
#! /bin/sh
$EXTRACTRC *.rc *.ui >> rc.cpp
$XGETTEXT *.cpp *.h -o $podir/katetabbarextension.pot
[Desktop Entry]
Type=Service
ServiceTypes=Kate/Plugin
X-KDE-Library=katetabbarextensionplugin
X-Kate-Version=2.8
Name=Multiline Tab Bar
Name[bg]=Лента с подпрозорци на няколко реда
Name[bs]=Višelinijska traka kartica
Name[ca]=Barra de pestanyes multilínia
Name[ca@valencia]=Barra de pestanyes multilínia
Name[cs]=Víceřádkový pruh s kartami
Name[da]=Fanebladslinje med flere linjer
Name[de]=Mehrzeilige Unterfensterleiste
Name[el]=Καρτέλες πολλαπλών γραμμών
Name[es]=Barra de pestañas multilínea
Name[et]=Mitmerealine kaardiriba
Name[eu]=Lerro anitzeko fitxa-barra
Name[fi]=Monirivinen välilehtipalkki
Name[fr]=Barre d'onglets multi-ligne
Name[ga]=Barra Cluaisíní Il-Líne
Name[gl]=Barra de lapelas multiliña
Name[hu]=Többsoros lapozósáv
Name[ia]=Barra de scheda multi-rango
Name[it]=Barra di schede multilinea
Name[kk]=Көпжолды қойынды
Name[km]=របារ​ផ្ទាំង​​​ពហុ​បន្ទាត់
Name[ko]=여러 줄 탭 표시줄
Name[lt]=Kelių eilučių kortelių juosta
Name[lv]=Vairāku rindu ciļņu josla
Name[mr]=बहुलरेषा टॅब पट्टी
Name[nb]=Fanelinje med flere rader
Name[nds]=Mehrregen-Paneelbalken
Name[nl]=Meerregelige tabbladbalk
Name[pa]=ਬਹੁ-ਲਾਈਨ ਟੈਬ ਪੱਟੀ
Name[pl]=Wieloliniowy pasek kart
Name[pt]=Barra de Páginas Multi-Linha
Name[pt_BR]=Barra de abas multilinha
Name[ro]=Bară de file multilinie
Name[ru]=Многострочная панель вкладок
Name[si]=බහුපේලි තීරුව
Name[sk]=Viacriadkový panel kariet
Name[sl]=Vrstica z zavihki v več vrsticah
Name[sr]=Вишередна трака језичака
Name[sr@ijekavian]=Вишередна трака језичака
Name[sr@ijekavianlatin]=Višeredna traka jezičaka
Name[sr@latin]=Višeredna traka jezičaka
Name[sv]=Flerraders flikrad
Name[tg]=Панели бисёрсатра
Name[tr]=Çoksatırlı Sekme Çubuğu
Name[ug]=كۆپ قۇرلۇق بەتكۈچ بالداق
Name[uk]=Багаторядкова панель вкладок
Name[x-test]=xxMultiline Tab Barxx
Name[zh_CN]=多行标签栏
Name[zh_TW]=多行分頁列
Comment=Adds a tab bar with multiple rows to Kate's main window
Comment[bg]=Добавяне на лента с подпрозорци на няколко реда към основния прозорец на Kate
Comment[bs]=Dodaje traku sa karticama u glavni prozor Kate
Comment[ca]=Afegeix una barra de pestanyes amb diverses files a la finestra principal del Kate
Comment[ca@valencia]=Afig una barra de pestanyes amb diverses files a la finestra principal del Kate
Comment[cs]=Přidá do hlavního okna Kate pruh karet s více řádky
Comment[da]=Føjer en fanebladslinje med flere rækker til Kates hovedvindue
Comment[de]=Fügt dem Hauptfenster von Kate eine mehrzeilige Unterfensterleiste hinzu
Comment[el]=Προσθέτει καρτέλες πολλαπλών γραμμών στο κύριο παράθυρο του Kate
Comment[es]=Añade una barra de pestañas con varias filas a la ventana principal de Kate
Comment[et]=Lisab Kate peaaknasse mitmerealise kaardiriba
Comment[eu]=Hainbat errenkada dituen fitxa-barra gehitzen dio Kate-ren leiho nagusiari
Comment[fi]=Lisää monirivisen välilehtipalkin Katen pääikkunaan
Comment[fr]=Ajoute une barre d'onglets comportant plusieurs lignes à la fenêtre principale de Kate
Comment[ga]=Cuir barra cluaisíní ina bhfuil níos mó ná ró amháin le príomhfhuinneog Kate
Comment[gl]=Engade unha barra de lapelas en varias liñas á xanela principal de Kate
Comment[hu]=Többsoros lapozósáv hozzáadása a Kate főablakához
Comment[ia]=Adde un barra con multiple rangos a fenestra principal de Kate
Comment[it]=Aggiunge una barra di schede su più righe alla finestra principale di Kate
Comment[kk]=Kate-тің негізгі терезесіне көп бағанды қойындысын қосу
Comment[km]=បន្ថែម​របារ​​ផ្ទាំង​ដែល​មាន​​ពហុ​បន្ទាត់​​​ទៅ​បង្អួច​មេ​របស់ Kate​
Comment[ko]=Kate의 주 창에 여러 줄로 된 탭 표시줄 추가
Comment[lt]=Įdeda kelių juostų kortelių juostą į Kate langą
Comment[lv]=Pievieno ciļņu joslu ar vairākām rindām Kate galvenajam logam
Comment[mr]=केटच्या मुख्य चौकटीत बहुलरेषेची टॅब पट्टी जोडतो
Comment[nb]=Legger til en fanelinje med flere rader i Kates hovedvindu
Comment[nds]=Föögt Kate sien Hööftfinster en Paneelbalken mit mehr Regen to
Comment[nl]=Voegt een tabbladbalk met meerder regels toe aan Kate's hoofdvenster
Comment[nn]=Legg ei fanelinje med fleire rader til hovudvindauget i Kate
Comment[pa]=ਕੇਟ ਦੀ ਮੇਨ ਵਿੰਡੋ ਵਿੱਚ ਕਈ ਕਤਾਰਾਂ ਵਾਲੀ ਇੱਕ ਟੈਬ ਬਾਰ ਸ਼ਾਮਲ ਕਰੋ
Comment[pl]=Dodaje pasek kart o wielu wierszach do głównego okna Kate
Comment[pt]=Adiciona uma barra de páginas com várias linhas à janela principal do Kate
Comment[pt_BR]=Adiciona uma barra de abas com várias linhas à janela principal do Kate
Comment[ro]=Adaugă o bară de file cu mai multe rînduri la fereastra principală Kate
Comment[ru]=Добавляет панель вкладок с несколькими строками в окно Kate
Comment[si]=Kate හි ප්‍රධාන කවුළුවට පේළි කිහිපයක් සහිත ටැබ් තීරුවක් එක් කරයි
Comment[sk]=Pridá panel kariet s viacerými riadkami na hlavné okno Kate
Comment[sl]=Doda vrstico z zavihki v več vrsticah v glavno okno urejevalnika Kate
Comment[sr]=Додаје траку језичака са више редова у главни прозор Кејт
Comment[sr@ijekavian]=Додаје траку језичака са више редова у главни прозор Кејт
Comment[sr@ijekavianlatin]=Dodaje traku jezičaka sa više redova u glavni prozor Kate
Comment[sr@latin]=Dodaje traku jezičaka sa više redova u glavni prozor Kate
Comment[sv]=Lägger till en flikrad med flera rader i Kates huvudfönster
Comment[tg]=Панели бисёрқаторро ба тирезаи асосии барномаи Kate илова мекунад
Comment[tr]=Kate uygulamasının ana penceresine çok satırlı bir sekme çubuğu ekler
Comment[ug]=كۆپ قۇرلۇق بەتكۈچ بالداقتىن بىرنى Kate نىڭ ئاساسىي كۆزنىكىگە قوشىدۇ
Comment[uk]=Додає панель вкладок з декількома рядками до головного вікна Kate
Comment[x-test]=xxAdds a tab bar with multiple rows to Kate's main windowxx
Comment[zh_CN]=在 Kate 主窗口上添加一个多行标签栏
Comment[zh_TW]=在 Kate 主視窗中加入多行分頁列
author=Dominik Haumann, dhdev@gmx.de
This diff is collapsed.
/***************************************************************************
ktinytabbar.h
-------------------
begin : 2005-06-15
copyright : (C) 2005 by Dominik Haumann
email : dhdev@gmx.de
Copyright (C) 2007 Flavio Castelli <flavio.castelli@gmail.com>
***************************************************************************/
/***************************************************************************
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
***************************************************************************/
#ifndef KTINYTABBAR_H
#define KTINYTABBAR_H
#include <QWidget>
#include <QList>
#include <QMap>
#include <QIcon>
#include <QResizeEvent>
class KTinyTabButton;
class KConfigBase;
/**
* The \p KTinyTabBar class provides a tab bar, e.g. for tabbed documents and
* supports multiple rows. The tab bar hides itself if there are no tabs.
*
* It implements the API from TrollTech's \p QTabBar with some minor changes
* and additions.
*
* @author Dominik Haumann
*/
class KTinyTabBar : public QWidget
{
Q_OBJECT
public:
/**
* Defines the tab button's style.
*/
enum ButtonStyle
{
Push=0, ///< default push button
Flat ///< flat push button
};
/**
* Sort types.
*/
enum SortType
{
OpeningOrder=0, ///< opening order
Name, ///< alphabetically
URL, ///< alphabetically URL based
Extension ///< by file extension (suffix)
};
Q_DECLARE_FLAGS( SortTypes, SortType )
public:
// NOTE: as the API here is very self-explaining the docs are in the cpp
// file, more clean imho.
KTinyTabBar( QWidget *parent = 0 );
virtual ~KTinyTabBar();
void load( KConfigBase* config, const QString& group );
void save( KConfigBase* config, const QString& group ) const;
void setLocationTop( bool top );
bool locationTop() const;
void setNumRows( int rows );
int numRows() const;
void setMinimumTabWidth( int min_pixel );
void setMaximumTabWidth( int max_pixel );
int minimumTabWidth() const;
int maximumTabWidth() const;
void setTabHeight( int height_pixel );
int tabHeight() const;
int addTab( const QString& docurl, const QString& text );
int addTab( const QString& docurl, const QIcon& pixmap, const QString& text );
void removeTab( int button_id );
int currentTab() const;
// corresponding SLOT: void setCurrentTab( int button_id );
bool containsTab( int button_id ) const;
void setTabURL( int button_id, const QString& docurl );
QString tabURL( int button_id ) const;
void setTabText( int button_id, const QString& text );
QString tabText( int button_id ) const;
void setTabIcon( int button_id, const QIcon& pixmap );
QIcon tabIcon( int button_id ) const;
void setTabModified( int button_id, bool modified );
bool isTabModified( int button_id ) const;
void setHighlightModifiedTabs( bool modified );
bool highlightModifiedTabs() const;
void setModifiedTabsColor( const QColor& color );
QColor modifiedTabsColor() const;
int count() const;
void setTabButtonStyle( ButtonStyle tabStyle );
ButtonStyle tabButtonStyle() const;
void setTabSortType( SortType sort );
SortType tabSortType() const;
void setFollowCurrentTab( bool follow );
bool followCurrentTab() const;
void setHighlightPreviousTab( bool highlight );
bool highlightPreviousTab() const;
void setHighlightActiveTab( bool highlight );
bool highlightActiveTab() const;
void setHighlightOpacity( int value );
int highlightOpacity() const;
void setPreviousTabColor( const QColor& color );
QColor previousTabColor() const;
void setActiveTabColor( const QColor& color );
QColor activeTabColor() const;
void setHighlightMarks( const QMap<QString, QString>& marks );
QMap<QString, QString> highlightMarks() const;
public Q_SLOTS:
void setCurrentTab( int button_id ); // does not emit signal
void removeHighlightMarks();
Q_SIGNALS:
/**
* This signal is emitted whenever the current activated tab changes.
*/
void currentChanged( int button_id );
/**
* This signal is emitted whenever a tab should be closed.
*/
void closeRequest( int button_id );
/**
* This signal is emitted whenever a setting entry changes.
* A special property is the location. As the tabbar is embedded it cannot
* change its location itself. So if you find a changed location, then go
* and change it yourself!
*/
void settingsChanged( KTinyTabBar* tabbar );
/**
* This signal is emitted whenever a highlight mark changes.
* Usually this is used to synchronice several tabbars.
*/
void highlightMarksChanged( KTinyTabBar* tabbar );
protected Q_SLOTS:
void tabButtonActivated( KTinyTabButton* tabButton );
void tabButtonHighlightChanged( KTinyTabButton* tabButton );
void tabButtonCloseAllRequest();
void tabButtonCloseRequest( KTinyTabButton* tabButton );
void tabButtonCloseOtherRequest( KTinyTabButton* tabButton );
void upClicked();
void downClicked();
void configureClicked();
void makeCurrentTabVisible();
protected:
virtual void resizeEvent( QResizeEvent* event );
virtual void wheelEvent( QWheelEvent* event );
protected:
void updateFixedHeight();
void triggerResizeEvent();
void updateSort();
int currentRow() const;
void setCurrentRow( int row );
void updateHelperButtons( QSize new_size, int needed_rows );
void scrollDown();
void scrollUp();
private:
bool m_locationTop;
int m_numRows;
int m_currentRow;
int m_minimumTabWidth;
int m_maximumTabWidth;
int m_tabHeight;
QList< KTinyTabButton* > m_tabButtons;
QMap< int, KTinyTabButton* > m_IDToTabButton;
KTinyTabButton* m_activeButton;
KTinyTabButton* m_previousButton;
// buttons on the right to navigate and configure
KTinyTabButton* m_upButton;
KTinyTabButton* m_downButton;
KTinyTabButton* m_configureButton;
int m_navigateSize;
int m_nextID;
// map of highlighted tabs and colors
QMap< QString, QString > m_highlightedTabs;
// tab button style
ButtonStyle m_tabButtonStyle;
SortType m_sortType;
bool m_highlightModifiedTabs;
bool m_followCurrentTab;
bool m_highlightPreviousTab;
bool m_highlightActiveTab;
int m_highlightOpacity;
// configurable and saved by KTinyTabBar
QColor m_colorModifiedTab;
QColor m_colorActiveTab;
QColor m_colorPreviousTab;
};
#endif // KTINYTABBAR_H
// kate: space-indent on; indent-width 4; tab-width 4; replace-tabs on; eol unix;
/***************************************************************************
ktinytabbarconfigdialog.cpp
-------------------
begin : 2005-06-19
copyright : (C) 2005 by Dominik Haumann
email : dhdev@gmx.de
***************************************************************************/
/***************************************************************************
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
***************************************************************************/
#include "ktinytabbarconfigdialog.h"
#include "ktinytabbarconfigpage.h"
#include "ktinytabbar.h"
#include "ktinytabbutton.h"
#include <klocalizedstring.h>
KTinyTabBarConfigDialog::KTinyTabBarConfigDialog( const KTinyTabBar* tabbar,
QWidget *parent )
: KDialog( parent )
{
setCaption( i18n( "Configure Tab Bar" ) );
setButtons( KDialog::Cancel | KDialog::Ok );
m_configPage = new KTinyTabBarConfigPage( this );
m_configPage->setLocationTop( tabbar->locationTop() );
m_configPage->setNumberOfRows( tabbar->numRows() );
m_configPage->setMinimumTabWidth( tabbar->minimumTabWidth() );
m_configPage->setMaximumTabWidth( tabbar->maximumTabWidth() );
m_configPage->setFixedTabHeight( tabbar->tabHeight() );
m_configPage->setFollowCurrentTab( tabbar->followCurrentTab() );
m_configPage->setTabSortType( tabbar->tabSortType() );
m_configPage->setTabButtonStyle( tabbar->tabButtonStyle() );
m_configPage->setHighlightModifiedTabs( tabbar->highlightModifiedTabs() );
m_configPage->setHighlightActiveTab( tabbar->highlightActiveTab() );
m_configPage->setHighlightPreviousTab( tabbar->highlightPreviousTab() );
m_configPage->setModifiedTabsColor( tabbar->modifiedTabsColor() );
m_configPage->setActiveTabColor( tabbar->activeTabColor() );
m_configPage->setPreviousTabColor( tabbar->previousTabColor() );
m_configPage->setHighlightOpacity( tabbar->highlightOpacity() );
setMainWidget( m_configPage );
resize( 400, 300 );
enableButton( KDialog::Ok, false );
connect( m_configPage, SIGNAL(changed()), this, SLOT(configChanged()) );
connect( m_configPage, SIGNAL(removeHighlightMarks()),
tabbar, SLOT(removeHighlightMarks()) );
}
KTinyTabBarConfigDialog::~KTinyTabBarConfigDialog()
{
}
void KTinyTabBarConfigDialog::configChanged()
{
enableButton( KDialog::Ok, true );
}
KTinyTabBarConfigPage* KTinyTabBarConfigDialog::configPage()
{
return m_configPage;
}
#include "ktinytabbarconfigdialog.moc"
// kate: space-indent on; tab-width 4; replace-tabs off; eol unix;
/***************************************************************************
ktinytabbarconfigdialog.h
-------------------
begin : 2005-06-19
copyright : (C) 2005 by Dominik Haumann
email : dhdev@gmx.de
***************************************************************************/
/***************************************************************************
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
***************************************************************************/
#ifndef KTINYTABBARCONFIGDIALOG_H
#define KTINYTABBARCONFIGDIALOG_H
#include <kdialog.h>
class KTinyTabBar;
class KTinyTabBarConfigPage;
/**
* The class @p KTinyTabBarConfigDialog provides a configuration dialog
* for the @p KTinyTabBar widget. It is only a wrapper dialog for
* @p KTinyTabBarConfigPage. It's mainly for private usage. If the return code
* is @p KDialog::Accepted an option changed for sure.
*
* @author Dominik Haumann
*/
class KTinyTabBarConfigDialog
: public KDialog
{
Q_OBJECT
public:
explicit KTinyTabBarConfigDialog( const KTinyTabBar* tabbar, QWidget *parent = 0 );
~KTinyTabBarConfigDialog();
KTinyTabBarConfigPage* configPage();
protected Q_SLOTS:
void configChanged();
private:
KTinyTabBarConfigPage* m_configPage;
};
#endif
// kate: space-indent on; tab-width 4; replace-tabs off; eol unix;
This diff is collapsed.
/***************************************************************************
ktinytabbarconfigpage.h
-------------------
begin : 2005-06-19
copyright : (C) 2005 by Dominik Haumann
email : dhdev@gmx.de
***************************************************************************/
/***************************************************************************
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
***************************************************************************/
#ifndef KTINYTABBARCONFIGPAGE_H
#define KTINYTABBARCONFIGPAGE_H
#include <QWidget>
#include <QColor>
#include "ktinytabbar.h"
#include "ui_tabbarconfigwidget.h"
class KColorButton;
class KTinyTabButton;
class QCheckBox;
class QLabel;
class QRadioButton;
class QSlider;
class QSpinBox;
/**
* The class @p KTinyTabBarConfigPage provides a config page for
* @p KTinyTabBar. It provides an interface to set the number of rows,
* minimum and maximum tab width, and the tab height.
*
* @author Dominik Haumann
*/
class KTinyTabBarConfigPage
: public QWidget
, private Ui::TabBarConfigWidget
{
Q_OBJECT
public: