Commit 37b089a8 authored by SZPYRKA Jean-Luc's avatar SZPYRKA Jean-Luc

modif exp/CMakeLists

parent 17cb320a
......@@ -15,10 +15,11 @@
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/examples)
add_subdirectory(dtkWidgetsOverlayPaneItems)
#add_subdirectory(dtkWidgetsOverlayPaneItemsManager)
add_subdirectory(dtkWidgetsOverlayPaneItemsManager)
add_subdirectory(dtkWidgetsStylesheetParser)
add_subdirectory(dtkWidgetsScroller)
add_subdirectory(dtkWidgetsLayout)
add_subdirectory(dtkWidgetsMenu)
######################################################################
### CMakeLists.txt ends here
## Version: $Id$
##
######################################################################
##
### Commentary:
##
######################################################################
##
### Change Log:
##
######################################################################
##
### Code:
project(dtkWidgetsMenu)
## #################################################################
## Sources
## #################################################################
set(${PROJECT_NAME}_SOURCES main.cpp)
set(${PROJECT_NAME}_SOURCES_QRC main.qrc)
## #################################################################
## Build rules
## #################################################################
qt5_add_resources(${PROJECT_NAME}_SOURCES_RCC ${${PROJECT_NAME}_SOURCES_QRC})
add_executable(${PROJECT_NAME}
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_SOURCES_RCC})
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
target_link_libraries(${PROJECT_NAME} dtkWidgets)
######################################################################
### CMakeLists.txt ends here
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#include <QtCore>
#include <QtWidgets>
#include <dtkFonts>
#include <dtkWidgets>
// ///////////////////////////////////////////////////////////////////
//
// ///////////////////////////////////////////////////////////////////
QString dtkReadFile(const QString& path)
{
QFile file(path);
if(!file.open(QIODevice::ReadOnly))
return QString();
QString contents = file.readAll();
file.close();
return contents;
}
// ///////////////////////////////////////////////////////////////////
//
// ///////////////////////////////////////////////////////////////////
class dummy : public QFrame
{
Q_OBJECT
public:
dummy(void);
~dummy(void) {}
//protected:
//void resizeEvent(QResizeEvent *event);
private:
dtkWidgetsMenuBar *menubar;
dtkWidgetsMenu *menu1;
dtkWidgetsMenu *menu2;
dtkWidgetsMenu *menu3;
};
dummy::dummy(void) : QFrame()
{
QFrame *bigframe = new QFrame(this);
bigframe->setStyleSheet("background: #ff0000;");
bigframe->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
this->menubar = new dtkWidgetsMenuBar(this);
//
this->menu1 = new dtkWidgetsMenu( fa::circlethin, "Menu_ONE");
this->menubar->addMenu(this->menu1);
//
this->menu2 = new dtkWidgetsMenu( fa::bank, "Menu_TWO");
this->menubar->addMenu(this->menu2);
//
this->menu3 = new dtkWidgetsMenu( fa::binoculars, "MENU_TRI");
this->menubar->addMenu(this->menu3);
}
// ///////////////////////////////////////////////////////////////////
//
// ///////////////////////////////////////////////////////////////////
int main(int argc, char **argv)
{
QApplication application(argc, argv);
//dtkFontAwesome::instance()->initFontAwesome();
//dtkFontAwesome::instance()->setDefaultOption("scale-factor", 1.0);
//dtkFontAwesome::instance()->setDefaultOption("color", QColor("#dddddd"));
dummy *window = new dummy;
window->resize(1024, 600);
window->show();
window->raise();
//window->setStyleSheet(dtkReadFile(":main.qss"));
return application.exec();
}
// ///////////////////////////////////////////////////////////////////
#include "main.moc"
//
// main.cpp ends here
<!DOCTYPE RCC>
<RCC version="1.0">
<qresource>
<file>main.qss</file>
</qresource>
</RCC>
/*
;; Version: $Id$
;;
*/
/* Commentary:
;;
*/
/* Change Log:
;;
*/
/* Code: */
QScrollArea {
background: transparent;
}
QScrollArea > QWidget > QWidget {
background: transparent;
}
QScrollArea > QWidget > QScrollBar {
background: palette(base);
}
QScrollBar:horizontal {
background: transparent;
height: 6px;
margin: 0px 0px 0px 0px;
}
QScrollBar::handle:horizontal {
background: #cccccc;
border: 1px solid #cccccc;
border-radius: 2px;
min-height: 20px;
}
QScrollBar::add-line:horizontal {
height: 0px;
}
QScrollBar::sub-line:horizontal {
height: 0px;
}
QScrollBar::up-arrow:horizontal, QScrollBar::down-arrow:horizontal {
width: 0px;
height: 0px;
background: none;
}
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
background: none;
}
QScrollBar:vertical {
background: transparent;
width: 6px;
margin: 0px 0px 0px 0px;
}
QScrollBar::handle:vertical {
background: #cccccc;
border: 1px solid #cccccc;
border-radius: 2px;
min-height: 20px;
}
QScrollBar::add-line:vertical {
height: 0px;
}
QScrollBar::sub-line:vertical {
height: 0px;
}
QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {
width: 0px;
height: 0px;
background: none;
}
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
background: none;
}
QToolButton {
border: none;
}
/* *****************************************************************
;;
;; ******************************************************************/
dtkWidgetsOverlayPaneItemHeader
{
background: "#88181818";
}
/* *****************************************************************
;;
;; ******************************************************************/
dummy
{
background: "#aaaaff";
}
/* main.qss ends here */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment