Page MenuHomePhorge

No OneTemporary

diff --git a/kdeui/CMakeLists.txt b/kdeui/CMakeLists.txt
index cb30283706..562c7caa79 100644
--- a/kdeui/CMakeLists.txt
+++ b/kdeui/CMakeLists.txt
@@ -1,437 +1,435 @@
project(kdeui)
# QUrl
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0)
#set(KDEUI_NO_ATTICA FALSE)
#if(KDE_PLATFORM_FEATURE_BINARY_COMPATIBLE_FEATURE_REDUCTION)
# set(KDEUI_NO_ATTICA TRUE)
#endif(KDE_PLATFORM_FEATURE_BINARY_COMPATIBLE_FEATURE_REDUCTION)
# TODO QT5 Make the above work and port it to whatever parts of QtGui actually need attica.
set(KDEUI_NO_ATTICA TRUE)
include_directories(
${CMAKE_SOURCE_DIR}/interfaces/kregexpeditor
${DBUSMENUQT_INCLUDE_DIR}
)
if(NOT KDEUI_NO_ATTICA)
include_directories( ${LIBATTICA_INCLUDE_DIR} )
set(KDEUI_EXTRA_LIBS ${KDEUI_EXTRA_LIBS} ${LIBATTICA_LIBRARIES} )
set(HAVE_ATTICA TRUE)
endif(NOT KDEUI_NO_ATTICA)
macro_bool_to_01(HAVE_ATTICA)
find_package(X11)
if(X11_FOUND)
macro_bool_to_01(X11_FOUND HAVE_X11)
macro_log_feature(X11_Xrender_FOUND "X Rendering Extension (libXrender)" "Support for compositing, rendering operations, and alpha-blending" "http://www.x.org" FALSE "" "STRONGLY RECOMMENDED")
macro_bool_to_01(X11_Xrender_FOUND HAVE_XRENDER)
macro_bool_to_01(X11_XTest_FOUND HAVE_XTEST)
endif(X11_FOUND)
find_package(DBusMenuQt)
macro_log_feature(DBUSMENUQT_FOUND "DBusMenuQt" "Support for notification area menus via the DBusMenu protocol" "https://launchpad.net/libdbusmenu-qt" TRUE "" "")
macro_bool_to_01(DBUSMENUQT_FOUND HAVE_DBUSMENUQT)
check_include_files(sys/stat.h HAVE_SYS_STAT_H)
check_include_files(paths.h HAVE_PATHS_H)
check_include_files(limits.h HAVE_LIMITS_H)
check_include_files(sys/types.h HAVE_SYS_TYPES_H)
check_include_files(sys/time.h HAVE_SYS_TIME_H)
check_include_files(unistd.h HAVE_UNISTD_H)
check_symbol_exists(posix_madvise "sys/mman.h" HAVE_MADVISE)
check_function_exists(strlcpy HAVE_STRLCPY)
check_prototype_exists(strlcpy string.h HAVE_STRLCPY_PROTO)
check_include_files(string.h HAVE_STRING_H)
configure_file(config-kdeui.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kdeui.h )
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/dialogs/kaboutapplicationconfigattica_p.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/dialogs/kaboutapplicationconfigattica_p.h
)
set(HAVE_KSECRETSSERVICE 0)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/util/config-kwallet.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/util/config-kwallet.h
)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/util/config-strlcpy.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/util/config-strlcpy.h
)
add_subdirectory( about )
add_subdirectory( tests )
add_subdirectory( sonnet/tests )
########### next target ###############
set(kdeui_LIB_SRCS
actions/kactioncollection.cpp
actions/kactionconflictdetector.cpp
actions/kactioncategory.cpp
actions/kactionmenu.cpp
actions/ktoggletoolbaraction.cpp
actions/ktoolbarlabelaction.cpp
actions/ktoolbarpopupaction.cpp
colors/kcolorbutton.cpp
dialogs/kaboutkdedialog_p.cpp
dialogs/kassistantdialog.cpp
dialogs/kconfigdialog.cpp
dialogs/kconfigdialogmanager.cpp
dialogs/kbugreport.cpp
dialogs/kedittoolbar.cpp
dialogs/kinputdialog.cpp
dialogs/klinkdialog.cpp
dialogs/kaboutapplicationdialog.cpp
dialogs/kaboutapplicationpersonmodel_p.cpp
dialogs/kaboutapplicationpersonlistdelegate_p.cpp
dialogs/kaboutapplicationpersonlistview_p.cpp
dialogs/knewpassworddialog.cpp
dialogs/kshortcuteditwidget.cpp
dialogs/kshortcutseditordelegate.cpp
dialogs/kshortcutseditoritem.cpp
dialogs/kshortcutseditor.cpp
dialogs/kshortcutschemeseditor.cpp
dialogs/kshortcutsdialog.cpp
dialogs/kswitchlanguagedialog_p.cpp
dialogs/ktip.cpp
findreplace/kfind.cpp
findreplace/kreplace.cpp
findreplace/kfinddialog.cpp
findreplace/kreplacedialog.cpp
fonts/fonthelpers.cpp
fonts/kfontcombobox.cpp
icons/kiconbutton.cpp
icons/kicondialog.cpp
itemviews/kviewstatemaintainer.cpp
# This requires patches which are not yet in Qt. Disabled for now.
# itemviews/kreparentingproxymodel.cpp
jobs/kdialogjobuidelegate.cpp
jobs/kabstractwidgetjobtracker.cpp
jobs/kwidgetjobtracker.cpp
jobs/kstatusbarjobtracker.cpp
jobs/kjobtrackerformatters.cpp
kernel/kstyle.cpp
paged/kpagedialog.cpp
paged/kpagemodel.cpp
paged/kpageview.cpp
paged/kpageview_p.cpp
paged/kpagewidget.cpp
paged/kpagewidgetmodel.cpp
shortcuts/kshortcutschemeshelper.cpp
shortcuts/kacceleratormanager.cpp
shortcuts/kcheckaccelerators.cpp
shortcuts/kgesture.cpp
shortcuts/kgesturemap.cpp
util/strlcpy-fake.c
util/kcrash.cpp
util/khelpclient.cpp
util/kimagecache.cpp
util/kkeyserver.cpp
util/kmodifierkeyinfo.cpp
util/kmodifierkeyinfoprovider.cpp
util/kpassivepopup.cpp
util/kpassivepopupmessagehandler.cpp
util/kundoactions.cpp
widgets/kbuttongroup.cpp
widgets/kcharselect.cpp
widgets/kcharselectdata.cpp
widgets/kcmodule.cpp
widgets/kcombobox.cpp
widgets/kcompletionbox.cpp
widgets/kdatepicker.cpp
widgets/kdatetable.cpp
widgets/khelpmenu.cpp
widgets/khistorycombobox.cpp
widgets/kkeysequencewidget.cpp
widgets/klanguagebutton.cpp
widgets/klineedit.cpp
widgets/kmessagewidget.cpp
- widgets/kmultitabbar.cpp
widgets/krichtextedit.cpp
widgets/krichtextwidget.cpp
widgets/kshortcutwidget.cpp
widgets/kstringvalidator.cpp
widgets/ktextedit.cpp
widgets/kdeuiwidgetsproxystyle.cpp
widgets/nestedlisthelper.cpp
xmlgui/kxmlguibuilder.cpp
xmlgui/kxmlguiwindow.cpp
xmlgui/kmainwindowiface.cpp
xmlgui/kmenumenuhandler_p.cpp
xmlgui/ktoolbarhandler.cpp
xmlgui/kxmlguiclient.cpp
xmlgui/kxmlguifactory.cpp
xmlgui/kxmlguifactory_p.cpp
xmlgui/kxmlguiversionhandler.cpp
xmlgui/kmainwindow.cpp
xmlgui/ktoolbar.cpp
)
option(MAC_USE_OSXKEYCHAIN "On OS X, use the keychain as backend for kwallet, instead of kwalletd.")
if (APPLE AND MAC_USE_OSXKEYCHAIN)
FIND_LIBRARY(SECURITY_LIBRARY Security)
set(kdeui_LIB_SRCS ${kdeui_LIB_SRCS} util/kwallet_mac.cpp)
else(APPLE AND MAC_USE_OSXKEYCHAIN)
set(kdeui_LIB_SRCS ${kdeui_LIB_SRCS} util/kwallet.cpp)
else(APPLE AND MAC_USE_OSXKEYCHAIN)
set(kdeui_LIB_SRCS ${kdeui_LIB_SRCS} util/kwallet.cpp)
endif(APPLE AND MAC_USE_OSXKEYCHAIN)
if(NOT WINCE)
set(kdeui_LIB_SRCS
${kdeui_LIB_SRCS}
dialogs/kdeprintdialog.cpp
)
endif(NOT WINCE)
if (X11_FOUND)
set(kdeui_LIB_SRCS ${kdeui_LIB_SRCS} util/kkeyserver_x11.cpp
util/kxerrorhandler.cpp
dialogs/kcupsoptionswidget_p.cpp
dialogs/kcupsoptionsjobwidget_p.cpp
dialogs/kcupsoptionspageswidget_p.cpp
dialogs/kcupsoptionssettingswidget_p.cpp )
endif (X11_FOUND)
if (APPLE)
set(kdeui_LIB_SRCS ${kdeui_LIB_SRCS} util/kkeyserver_mac.cpp )
endif (APPLE)
if (WIN32)
set(kdeui_LIB_SRCS ${kdeui_LIB_SRCS} util/kkeyserver_win.cpp )
endif (WIN32)
message("Port to Qt5 native filter")
#if (X11_FOUND AND X11_Xkb_FOUND)
# include_directories (
# ${X11_Xkb_INCLUDE_PATH}
# ${X11_Xlib_INCLUDE_PATH}
# )
# set(kdeui_LIB_SRCS ${kdeui_LIB_SRCS} util/kmodifierkeyinfoprovider_x11.cpp)
#else (X11_FOUND AND X11_Xkb_FOUND)
set (kdeui_LIB_SRCS ${kdeui_LIB_SRCS} util/kmodifierkeyinfoprovider_dummy.cpp)
#endif (X11_FOUND AND X11_Xkb_FOUND)
set( kdeui_UI
dialogs/knewpassworddialog.ui
dialogs/kshortcutsdialog.ui
widgets/kshortcutwidget.ui
)
if (X11_FOUND)
set( kdeui_UI ${kdeui_UI} dialogs/kcupsoptionspageswidget.ui
dialogs/kcupsoptionsjobwidget.ui
)
endif (X11_FOUND)
kde4_add_ui_files(kdeui_LIB_SRCS ${kdeui_UI} )
set(kwallet_xml util/org.kde.KWallet.xml)
install(FILES ${kwallet_xml} DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
qt5_add_dbus_interface( kdeui_LIB_SRCS ${kwallet_xml} kwallet_interface )
kde4_add_library(kdeui ${LIBRARY_TYPE} ${kdeui_LIB_SRCS})
generate_export_header(kdeui)
target_include_directories(kdeui PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/..)
set(kdeui_INCLUDES
${CMAKE_CURRENT_SOURCE_DIR}/actions
${CMAKE_CURRENT_SOURCE_DIR}/colors
${CMAKE_CURRENT_SOURCE_DIR}/dialogs
${CMAKE_CURRENT_SOURCE_DIR}/findreplace
${CMAKE_CURRENT_SOURCE_DIR}/fonts
${CMAKE_CURRENT_SOURCE_DIR}/icons
${CMAKE_CURRENT_SOURCE_DIR}/itemviews
${CMAKE_CURRENT_SOURCE_DIR}/jobs
${CMAKE_CURRENT_SOURCE_DIR}/kernel
${CMAKE_CURRENT_SOURCE_DIR}/notifications
${CMAKE_CURRENT_SOURCE_DIR}/paged
${CMAKE_CURRENT_SOURCE_DIR}/shortcuts
${CMAKE_CURRENT_SOURCE_DIR}/util
${CMAKE_CURRENT_SOURCE_DIR}/widgets
${CMAKE_CURRENT_SOURCE_DIR}/xmlgui
${CMAKE_CURRENT_BINARY_DIR}/util
)
target_include_directories(kdeui PUBLIC "$<BUILD_INTERFACE:${kdeui_INCLUDES}>")
find_package(Qt5PrintSupport 5.2.0 REQUIRED NO_MODULE)
target_link_libraries(kdeui LINK_PUBLIC ${ItemModels_LIBRARIES} sonnetcore sonnetui ${KAuth_LIBRARIES} kguiaddons kwidgets ${KWidgetsAddons_LIBRARIES} ki18n XmlGui ItemViews KCompletion KNotifications KJobWidgets KConfigWidgets KIconThemes ${KDE4_KDECORE_LIBS} ${X11_LIBRARIES} Qt5::Widgets Qt5::Svg Qt5::PrintSupport
Qt5::Xml ${KDEUI_EXTRA_LIBS} Qt5::Network ${KCoreAddons_LIBRARIES} ${KWindowSystem_LIBRARIES} ${kdeqt5staging_LIBRARIES} ${KConfig_GUI_LIBRARY} Qt5::Concurrent)
if(X11_FOUND)
find_package(Qt5X11Extras 5.2.0 REQUIRED NO_MODULE)
target_link_libraries(kdeui LINK_PUBLIC Qt5::X11Extras)
endif()
if(NOT WINCE)
target_link_libraries(kdeui Qt5::Svg)
endif(NOT WINCE)
if(HAVE_DBUSMENUQT)
target_link_libraries(kdeui ${DBUSMENUQT_LIBRARIES})
endif()
if(MINGW)
target_link_libraries(kdeui gdi32 oleaut32)
endif(MINGW)
if(APPLE)
target_link_libraries(kdeui ${CARBON_LIBRARY})
if (MAC_USE_OSXKEYCHAIN)
target_link_libraries(kdeui ${SECURITY_LIBRARY})
endif (MAC_USE_OSXKEYCHAIN)
endif(APPLE)
if(X11_XTest_FOUND)
target_link_libraries(kdeui ${X11_XTest_LIB})
endif(X11_XTest_FOUND)
if(X11_Xcursor_FOUND)
target_link_libraries(kdeui ${X11_Xcursor_LIB})
endif(X11_Xcursor_FOUND)
if (X11_Xfixes_FOUND)
target_link_libraries(kdeui ${X11_Xfixes_LIB})
endif(X11_Xfixes_FOUND)
if (X11_Xrender_FOUND)
target_link_libraries(kdeui ${X11_Xrender_LIB})
endif(X11_Xrender_FOUND)
target_link_libraries(kdeui LINK_INTERFACE_LIBRARIES ${KConfig_GUI_LIBRARY} Qt5::Widgets)
if(NOT WINCE)
target_link_libraries(kdeui LINK_INTERFACE_LIBRARIES Qt5::Svg)
endif(NOT WINCE)
set_target_properties(kdeui PROPERTIES VERSION ${KDE_NON_GENERIC_LIB_VERSION}
SOVERSION ${KDE_NON_GENERIC_LIB_SOVERSION}
)
install(TARGETS kdeui EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
########### install files ###############
if (APPLE)
install( FILES util/kkeyserver_mac.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel)
elseif (WIN32)
install( FILES util/kkeyserver_win.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel )
else(WIN32)
install( FILES util/kkeyserver_x11.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel)
endif (APPLE)
install( FILES
dialogs/aboutkde.png
dialogs/kdeprint_nup1.png
dialogs/kdeprint_nup2.png
dialogs/kdeprint_nup4.png
dialogs/kdeprint_nupother.png
dialogs/ktip-bulb.png
dialogs/thumb_frame.png
DESTINATION ${DATA_INSTALL_DIR}/kdeui/pics )
install( FILES widgets/kcharselect-data DESTINATION ${DATA_INSTALL_DIR}/kcharselect )
install( FILES xmlgui/ui_standards.rc DESTINATION ${CONFIG_INSTALL_DIR}/ui )
install( FILES
${CMAKE_CURRENT_BINARY_DIR}/kdeui_export.h
actions/kactioncollection.h
actions/kactioncategory.h
actions/kactionmenu.h
actions/ktoggletoolbaraction.h
actions/ktoolbarlabelaction.h
actions/ktoolbarpopupaction.h
colors/kcolorbutton.h
dialogs/kaboutapplicationdialog.h
dialogs/kassistantdialog.h
dialogs/kbugreport.h
dialogs/kconfigdialog.h
dialogs/kconfigdialogmanager.h
dialogs/kdeprintdialog.h
dialogs/kedittoolbar.h
dialogs/kinputdialog.h
dialogs/knewpassworddialog.h
dialogs/kshortcutsdialog.h
dialogs/kshortcutseditor.h
dialogs/ktip.h
findreplace/kfind.h
findreplace/kreplace.h
findreplace/kfinddialog.h
findreplace/kreplacedialog.h
fonts/kfontcombobox.h
icons/kiconbutton.h
icons/kicondialog.h
itemviews/kviewstatesaver.h
itemviews/kviewstatemaintainer.h
# itemviews/kreparentingproxymodel.h
jobs/kdialogjobuidelegate.h
jobs/kabstractwidgetjobtracker.h
jobs/kwidgetjobtracker.h
jobs/kstatusbarjobtracker.h
kernel/kstyle.h
paged/kpagedialog.h
paged/kpagemodel.h
paged/kpageview.h
paged/kpagewidget.h
paged/kpagewidgetmodel.h
shortcuts/kacceleratormanager.h
shortcuts/kgesture.h
util/kcrash.h
util/khelpclient.h
util/kkeyserver.h
util/kmodifierkeyinfo.h
util/kpassivepopup.h
util/kpassivepopupmessagehandler.h
util/kimagecache.h
util/kwallet.h
util/kxerrorhandler.h
util/kundoactions.h
widgets/kdatepicker.h
widgets/kcmodule.h
widgets/kcombobox.h
widgets/kcompletionbox.h
widgets/kbuttongroup.h
widgets/kcharselect.h
widgets/kdatetable.h
widgets/khelpmenu.h
widgets/khistorycombobox.h
widgets/kkeysequencewidget.h
widgets/klanguagebutton.h
widgets/klineedit.h
widgets/kmessagewidget.h
- widgets/kmultitabbar.h
widgets/krichtextedit.h
widgets/krichtextwidget.h
widgets/kstringvalidator.h
widgets/ktextedit.h
widgets/kshortcutwidget.h
xmlgui/kxmlguiwindow.h
xmlgui/kxmlguiclient.h
xmlgui/kxmlguibuilder.h
xmlgui/kxmlguifactory.h
xmlgui/kmainwindow.h
xmlgui/ktoolbar.h
DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel )
install(PROGRAMS preparetips DESTINATION ${BIN_INSTALL_DIR} )
if (APPLE)
install(PROGRAMS kernel/start-session-bus.sh DESTINATION ${BIN_INSTALL_DIR} )
endif (APPLE)
install( FILES
KDEUIMacros.cmake
kde4uic.cmake
DESTINATION ${CMAKECONFIG_INSTALL_DIR} COMPONENT Devel )
diff --git a/staging/kde4attic/src/CMakeLists.txt b/staging/kde4attic/src/CMakeLists.txt
index f57c634640..7f3a2c0d41 100644
--- a/staging/kde4attic/src/CMakeLists.txt
+++ b/staging/kde4attic/src/CMakeLists.txt
@@ -1,40 +1,42 @@
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0)
set(kde4attic_SRCS
kanimatedbutton.cpp
kdatecombobox.cpp
kdatetimeedit.cpp
kdatetimewidget.cpp
kdatewidget.cpp
+ kmultitabbar.cpp
ktimecombobox.cpp
ktimezonewidget.cpp
)
set(kde4attic_UI
kdatetimeedit.ui
)
kde4_add_ui_files(kde4attic_SRCS ${kde4attic_UI} )
add_library(KDE4Attic ${kde4attic_SRCS})
generate_export_header(KDE4Attic)
target_link_libraries(KDE4Attic LINK_PUBLIC Qt5::Widgets kde4support kdeui kdecore)
set_target_properties(KDE4Attic PROPERTIES VERSION ${KDE4ATTIC_VERSION_STRING}
SOVERSION ${KDE4ATTIC_SOVERSION}
)
install(TARGETS KDE4Attic EXPORT KDE4AtticTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES
kanimatedbutton.h
kdatecombobox.h
kdatetimeedit.h
kdatetimewidget.h
kdatewidget.h
+ kmultitabbar.h
ktimecombobox.h
ktimezonewidget.h
${CMAKE_CURRENT_BINARY_DIR}/kde4attic_export.h
DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel
)
diff --git a/kdeui/widgets/kmultitabbar.cpp b/staging/kde4attic/src/kmultitabbar.cpp
similarity index 100%
rename from kdeui/widgets/kmultitabbar.cpp
rename to staging/kde4attic/src/kmultitabbar.cpp
diff --git a/kdeui/widgets/kmultitabbar.h b/staging/kde4attic/src/kmultitabbar.h
similarity index 97%
rename from kdeui/widgets/kmultitabbar.h
rename to staging/kde4attic/src/kmultitabbar.h
index 5ba5899ba5..a5bf50bf5b 100644
--- a/kdeui/widgets/kmultitabbar.h
+++ b/staging/kde4attic/src/kmultitabbar.h
@@ -1,245 +1,245 @@
/***************************************************************************
kmultitabbar.h - description
-------------------
begin : 2001
copyright : (C) 2001,2002,2003 by Joseph Wenninger <jowenn@kde.org>
***************************************************************************/
/***************************************************************************
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
***************************************************************************/
#ifndef _KMultitabbar_h_
#define _KMultitabbar_h_
#include <QLayout>
#include <QtCore/QString>
#include <QtCore/QList>
#include <QPushButton>
-#include <kdeui_export.h>
+#include <kde4attic_export.h>
class QPixmap;
class QPainter;
class QMenu;
class QStyleOptionToolButton;
class KMultiTabBarPrivate;
class KMultiTabBarTabPrivate;
class KMultiTabBarButtonPrivate;
class KMultiTabBarInternal;
/**
* A Widget for horizontal and vertical tabs.
* (Note that in Qt4, QTabBar can be vertical as well)
*
* It is possible to add normal buttons to the top/left
* The handling if only one tab at a time or multiple tabs
* should be raisable is left to the "user".
*
* \image html kmultitabbar.png "KDE Multi Tab Bar Widget"
*
* @author Joseph Wenninger
*/
-class KDEUI_EXPORT KMultiTabBar: public QWidget
+class KDE4ATTIC_EXPORT KMultiTabBar: public QWidget
{
Q_OBJECT
Q_ENUMS(KMultiTabBarPosition KMultiTabBarStyle)
Q_PROPERTY(KMultiTabBarPosition position READ position WRITE setPosition)
Q_PROPERTY(KMultiTabBarStyle tabStyle READ tabStyle WRITE setStyle)
public:
enum KMultiTabBarPosition { Left, Right, Top, Bottom };
/**
* The list of available styles for KMultiTabBar
* - VSNET - Visual Studio .Net like, always shows icon, only show the text of active tabs
* - KDEV3ICON - Kdevelop 3 like, always shows the text and icons
*/
enum KMultiTabBarStyle{VSNET=0, KDEV3ICON=2,STYLELAST=0xffff};
explicit KMultiTabBar(KMultiTabBarPosition pos, QWidget *parent=0 );
virtual ~KMultiTabBar();
/**
* append a new button to the button area. The button can later on be accessed with button(ID)
* eg for connecting signals to it
* @param pic a pixmap for the button
* @param id an arbitraty ID value. It will be emitted in the clicked signal for identifying the button
* if more than one button is connected to a signals.
* @param popup A popup menu which should be displayed if the button is clicked
* @param not_used_yet will be used for a popup text in the future
*/
int appendButton(const QPixmap &pic,int id=-1,QMenu* popup=0,const QString& not_used_yet=QString());
/**
* remove a button with the given ID
*/
void removeButton(int id);
/**
* append a new tab to the tab area. It can be accessed lateron with tabb(id);
* @param pic a bitmap for the tab
* @param id an arbitrary ID which can be used later on to identify the tab
* @param text if a mode with text is used it will be the tab text, otherwise a mouse over hint
*/
int appendTab(const QPixmap &pic,int id=-1,const QString& text=QString());
/**
* remove a tab with a given ID
*/
void removeTab(int id);
/**
* set a tab to "raised"
* @param id The ID of the tab to manipulate
* @param state true == activated/raised, false == not active
*/
void setTab(int id ,bool state);
/**
* return the state of a tab, identified by its ID
*/
bool isTabRaised(int id) const;
/**
* get a pointer to a button within the button area identified by its ID
*/
class KMultiTabBarButton *button(int id) const;
/**
* get a pointer to a tab within the tab area, identiifed by its ID
*/
class KMultiTabBarTab *tab(int id) const;
/**
* set the real position of the widget.
* @param pos if the mode is horizontal, only use top, bottom, if it is vertical use left or right
*/
void setPosition(KMultiTabBarPosition pos);
/**
* get the tabbar position.
* @return position
*/
KMultiTabBarPosition position() const;
/**
* set the display style of the tabs
*/
void setStyle(KMultiTabBarStyle style);
/**
* get the display style of the tabs
* @return display style
*/
KMultiTabBarStyle tabStyle() const;
protected:
friend class KMultiTabBarButton;
virtual void fontChange( const QFont& );
void updateSeparator();
private:
KMultiTabBarPrivate * const d;
};
/**
* Use KMultiTabBar::appendButton to append a button, which creates a KMultiTabBarButton instance
*/
-class KDEUI_EXPORT KMultiTabBarButton: public QPushButton
+class KDE4ATTIC_EXPORT KMultiTabBarButton: public QPushButton
{
Q_OBJECT
public:
int id() const;
virtual ~KMultiTabBarButton();
public Q_SLOTS:
void setText(const QString &text);
Q_SIGNALS:
/**
* this is emitted if the button is clicked
* @param id the ID identifying the button
*/
void clicked(int id);
protected Q_SLOTS:
virtual void slotClicked();
protected:
virtual void hideEvent( class QHideEvent*);
virtual void showEvent( class QShowEvent*);
virtual void paintEvent( class QPaintEvent*);
/** Should not be created directly. Use KMultiTabBar::appendButton
*/
KMultiTabBarButton(const QPixmap& pic, const QString&, int id, QWidget *parent);
private:
friend class KMultiTabBar;
int m_id;
KMultiTabBarButtonPrivate * const d;
};
/**
* Use KMultiTabBar::appendTab to append a tab, which creates a KMultiTabBarTab instance
*/
-class KDEUI_EXPORT KMultiTabBarTab: public KMultiTabBarButton
+class KDE4ATTIC_EXPORT KMultiTabBarTab: public KMultiTabBarButton
{
Q_OBJECT
public:
virtual ~KMultiTabBarTab();
virtual QSize sizeHint() const;
virtual QSize minimumSizeHint() const;
public Q_SLOTS:
/**
* this is used internaly, but can be used by the user, if (s)he wants to
* It the according call of KMultiTabBar is invoked though this modifications will be overwritten
*/
void setPosition(KMultiTabBar::KMultiTabBarPosition);
/**
* this is used internaly, but can be used by the user, if (s)he wants to
* It the according call of KMultiTabBar is invoked though this modifications will be overwritten
*/
void setStyle(KMultiTabBar::KMultiTabBarStyle);
/**
* set the active state of the tab
* @param state true==active false==not active
*/
void setState(bool state);
void setIcon(const QString&);
void setIcon(const QPixmap&);
protected:
virtual void paintEvent(QPaintEvent *);
private:
KMultiTabBar::KMultiTabBarPosition m_position;
KMultiTabBar::KMultiTabBarStyle m_style;
void computeMargins (int* hMargin, int* vMargin) const;
QSize computeSizeHint(bool withText) const;
bool shouldDrawText() const;
bool isVertical() const;
QPixmap iconPixmap() const;
void initStyleOption(QStyleOptionToolButton* opt) const;
friend class KMultiTabBarInternal;
/**
* This class should never be created except with the appendTab call of KMultiTabBar
*/
KMultiTabBarTab(const QPixmap& pic, const QString&, int id, QWidget *parent,
KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
KMultiTabBarTabPrivate * const d;
};
#endif
// kate: indent-width 4; replace-tabs on; tab-width 4; space-indent on;
diff --git a/kdeui/widgets/kmultitabbar_p.h b/staging/kde4attic/src/kmultitabbar_p.h
similarity index 100%
rename from kdeui/widgets/kmultitabbar_p.h
rename to staging/kde4attic/src/kmultitabbar_p.h

File Metadata

Mime Type
text/x-diff
Expires
Fri, Nov 1, 8:12 AM (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
10074804
Default Alt Text
(24 KB)

Event Timeline