forked from GLDsuh-a/qt-1
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
litz-a
committed
Oct 18, 2017
1 parent
6f551ee
commit 74d9c2b
Showing
531 changed files
with
34,004 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,60 @@ | ||
# ==================================================================== | ||
# Quartica Framework - Mac NavBar | ||
# ==================================================================== | ||
|
||
QT = core gui | ||
|
||
greaterThan(QT_MAJOR_VERSION, 4): QT = widgets | ||
|
||
|
||
TEMPLATE = lib | ||
TARGET = navbar | ||
|
||
DESTDIR = bin | ||
UI_DIR = tmp-ui | ||
MOC_DIR = tmp | ||
OBJECTS_DIR = tmp | ||
|
||
CONFIG = qt | ||
|
||
DEPENDPATH = . include src | ||
INCLUDEPATH = . include | ||
|
||
# Input | ||
QFMACNAVBAR.CLASSES = include/QfClickableLabel \ | ||
include/QfNavBarGroup \ | ||
include/QfNavBarItem \ | ||
include/QfSelectableWidget \ | ||
include/QfUiExport | ||
|
||
QFMACNAVBAR.HEADERS = include/qf_clickablelabel.h \ | ||
include/qf_navbar.h \ | ||
include/qf_navbargroup.h \ | ||
include/qf_navbaritem.h \ | ||
include/qf_selectablewidget.h \ | ||
include/qf_uiexport.h \ | ||
|
||
QFMACNAVBAR.SOURCES = src/clickablelabel.cpp \ | ||
src/navbar.cpp \ | ||
src/navbargroup.cpp \ | ||
src/navbaritem.cpp \ | ||
src/selectablewidget.cpp | ||
|
||
HEADERS = $$QFMACNAVBAR.HEADERS $$QFMACNAVBAR.CLASSES | ||
SOURCES = $$QFMACNAVBAR.SOURCES | ||
|
||
macx { | ||
CONFIG = lib_bundle | ||
|
||
FRAMEWORK_HEADERS.version = Versions | ||
FRAMEWORK_HEADERS.files = $$QFMACNAVBAR.HEADERS $$QFMACNAVBAR.CLASSES | ||
FRAMEWORK_HEADERS.path = Headers | ||
|
||
QMAKE_BUNDLE_DATA = FRAMEWORK_HEADERS | ||
} | ||
|
||
win32 { | ||
CONFIG = shared dll release | ||
DEFINES = QFUI_MAKEDLL | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,28 @@ | ||
###################################################################### | ||
# Automatically generated by qmake (2.01a) Sat Apr 12 08:48:14 2008 | ||
###################################################################### | ||
|
||
TEMPLATE = app | ||
TARGET = example | ||
|
||
QT = core gui widgets | ||
|
||
UI_DIR = tmp-ui | ||
MOC_DIR = tmp | ||
OBJECTS_DIR = tmp | ||
|
||
CONFIG = qt | ||
|
||
DEPENDPATH = . ../include/ | ||
INCLUDEPATH = . ../include/ | ||
|
||
# Input | ||
SOURCES = main.cpp | ||
|
||
|
||
|
||
win32:CONFIG(release, debug|release): LIBS = -L$$PWD/../bin/ -lnavbar | ||
else:win32:CONFIG(debug, debug|release): LIBS = -L$$PWD/../bin/ -lnavbar | ||
|
||
INCLUDEPATH = $$PWD/../bin | ||
DEPENDPATH = $$PWD/../bin |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,52 @@ | ||
/* | ||
* This file is part of Quartica. | ||
* | ||
* Copyright (c) 2008 Matteo Bertozzi <[email protected]> | ||
* | ||
* Quartica 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 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Quartica 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 Quartica. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
// Qt4 Headers | ||
#include <QApplication> | ||
|
||
// Quartica Headers | ||
#include <QfNavBar> | ||
|
||
int main (int argc, char **argv) | ||
{ | ||
QApplication app(argc, argv); | ||
|
||
QfNavBar *navbar = new QfNavBar; | ||
|
||
QfNavBarGroup *group = navbar->addGroup("APPLICATIONS"); | ||
navbar->addItem(group, QPixmap("icons/z_allApps.png"), "All Applications"); | ||
navbar->addItem(group, QPixmap("icons/z_updates.png"), "Updates"); | ||
navbar->addItem(group, QPixmap("icons/z_upToDate.png"), "Up To Date"); | ||
navbar->addItem(group, QPixmap("icons/z_unknown.png"), "Unknown"); | ||
|
||
group = navbar->addGroup("BY KIND"); | ||
navbar->addItem(group, QPixmap("icons/z_apps.png"), "Applications"); | ||
navbar->addItem(group, QPixmap("icons/z_plugins.png"), "Plugins"); | ||
navbar->addItem(group, QPixmap("icons/z_widgets.png"), "Widgets"); | ||
navbar->addItem(group, QPixmap("icons/z_prefApp.png"), "Preference Panes"); | ||
navbar->addItem(group, QPixmap("icons/z_systemUpdates.png"), "System Updates"); | ||
|
||
group = navbar->addGroup("VENDORS"); | ||
navbar->addItem(group, QPixmap("icons/z_apple.png"), "Apple"); | ||
|
||
navbar->show(); | ||
|
||
return(app.exec()); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1 @@ | ||
#include "qf_clickablelabel.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1 @@ | ||
#include "qf_navbar.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1 @@ | ||
#include "qf_navbargroup.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1 @@ | ||
#include "qf_navbaritem.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1 @@ | ||
#include "qf_selectablewidget.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1 @@ | ||
#include "qf_uiexport.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,47 @@ | ||
/* | ||
* This file is part of Quartica. | ||
* | ||
* Copyright (c) 2008 Matteo Bertozzi <[email protected]> | ||
* | ||
* Quartica 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 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Quartica 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 Quartica. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#ifndef _QF_CLICKABLELABEL_H_ | ||
#define _QF_CLICKABLELABEL_H_ | ||
|
||
// Qt4 Headers | ||
#include <QLabel> | ||
|
||
// Quartica Headers | ||
#include <QfUiExport> | ||
|
||
class QFUI_EXPORT QfClickableLabel : public QLabel | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
QfClickableLabel (QWidget *parent = 0, Qt::WindowFlags f = 0); | ||
QfClickableLabel (const QString& text, QWidget *parent = 0, Qt::WindowFlags f = 0); | ||
~QfClickableLabel(); | ||
|
||
signals: | ||
void clicked (void); | ||
void clicked (QfClickableLabel *label); | ||
|
||
protected: | ||
void mouseReleaseEvent (QMouseEvent *event); | ||
}; | ||
|
||
#endif // !_QF_CLICKABLELABEL_H_ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,73 @@ | ||
/* | ||
* This file is part of Quartica. | ||
* | ||
* Copyright (c) 2008 Matteo Bertozzi <[email protected]> | ||
* | ||
* Quartica 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 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Quartica 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 Quartica. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#ifndef _QF_NAVBAR_H_ | ||
#define _QF_NAVBAR_H_ | ||
|
||
// Qt4 Headers | ||
#include <QWidget> | ||
|
||
// Quartica Headers | ||
#include <QfNavBarGroup> | ||
#include <QfUiExport> | ||
|
||
class QFUI_EXPORT QfNavBar : public QWidget | ||
{ | ||
Q_OBJECT | ||
|
||
Q_PROPERTY(QColor selectionColor READ selectionColor WRITE setSelectionColor) | ||
Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor) | ||
|
||
public: | ||
QfNavBar (QWidget *parent = 0); | ||
~QfNavBar(); | ||
|
||
// Methods - Groups Related | ||
void addGroup (QfNavBarGroup *group); | ||
QfNavBarGroup *addGroup (const QString& title); | ||
|
||
bool containsGroup (QfNavBarGroup *group); | ||
|
||
// Methods - Items Related | ||
void addItem (QfNavBarGroup *group, QfNavBarItem *item); | ||
QfNavBarItem *addItem (QfNavBarGroup *group, const QString& text); | ||
QfNavBarItem *addItem (QfNavBarGroup *group, const QPixmap& icon, const QString& text); | ||
|
||
// GET Properties | ||
QColor selectionColor (void) const; | ||
QColor backgroundColor (void) const; | ||
|
||
// SET Properties | ||
void setBackgroundColor (const QColor& bgColor); | ||
void setSelectionColor (const QColor& selectionColor); | ||
|
||
protected: | ||
void paintEvent (QPaintEvent *event); | ||
|
||
private slots: | ||
void onGroupExpanded (QfNavBarGroup *group); | ||
void onItemSelected (QfNavBarGroup *group, QfNavBarItem *item); | ||
|
||
private: | ||
class Private; | ||
Private *d; | ||
}; | ||
|
||
#endif // !_QF_NAVBAR_H_ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,79 @@ | ||
/* | ||
* This file is part of Quartica. | ||
* | ||
* Copyright (c) 2008 Matteo Bertozzi <[email protected]> | ||
* | ||
* Quartica 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 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Quartica 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 Quartica. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#ifndef _QF_NAVBARGROUP_H_ | ||
#define _QF_NAVBARGROUP_H_ | ||
|
||
// Qt4 Headers | ||
#include <QWidget> | ||
|
||
// Quartica Headers | ||
#include <QfNavBarItem> | ||
#include <QfUiExport> | ||
|
||
class QFUI_EXPORT QfNavBarGroup : public QWidget | ||
{ | ||
Q_OBJECT | ||
|
||
Q_PROPERTY(QString title READ title WRITE setTitle) | ||
Q_PROPERTY(bool isExpanded READ isExpanded WRITE expand) | ||
|
||
public: | ||
QfNavBarGroup (QWidget *parent = 0); | ||
QfNavBarGroup (const QString& title, QWidget *parent = 0); | ||
~QfNavBarGroup(); | ||
|
||
// Methods - Add Item | ||
void addItem (QfNavBarItem *item); | ||
void addItem (QfNavBarItem *item, int index); | ||
|
||
// Methods - Create and Add Item | ||
QfNavBarItem *addItem (const QString& text); | ||
QfNavBarItem *addItem (const QPixmap& icon, const QString& text); | ||
QfNavBarItem *addItem (const QPixmap& icon, const QString& text, int index); | ||
|
||
// Methods | ||
bool containsItem (QfNavBarItem *item); | ||
|
||
// GET Properties | ||
QString title (void) const; | ||
bool isExpanded (void) const; | ||
|
||
// SET Properties | ||
void setTitle (const QString& title); | ||
void setTitleColor (const QColor& color); | ||
|
||
signals: | ||
void selected (QfNavBarGroup *group, QfNavBarItem *item); | ||
void expanded (QfNavBarGroup *group); | ||
|
||
public slots: | ||
void expand (bool expand); | ||
|
||
private slots: | ||
void onItemSelected (QfSelectableWidget *item); | ||
void onTitleClicked (void); | ||
|
||
private: | ||
class Private; | ||
Private *d; | ||
}; | ||
|
||
#endif // !_QF_NAVBARGROUP_H_ | ||
|
Oops, something went wrong.