diff --git a/MacNavBar/MacNavBar.pro b/MacNavBar/MacNavBar.pro new file mode 100644 index 00000000..791f87fe --- /dev/null +++ b/MacNavBar/MacNavBar.pro @@ -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 +} + diff --git a/MacNavBar/example/example.pro b/MacNavBar/example/example.pro new file mode 100644 index 00000000..bfd74f0f --- /dev/null +++ b/MacNavBar/example/example.pro @@ -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 diff --git a/MacNavBar/example/icons/z_allApps.png b/MacNavBar/example/icons/z_allApps.png new file mode 100644 index 00000000..d4102790 Binary files /dev/null and b/MacNavBar/example/icons/z_allApps.png differ diff --git a/MacNavBar/example/icons/z_apple.png b/MacNavBar/example/icons/z_apple.png new file mode 100644 index 00000000..dd1fde01 Binary files /dev/null and b/MacNavBar/example/icons/z_apple.png differ diff --git a/MacNavBar/example/icons/z_apps.png b/MacNavBar/example/icons/z_apps.png new file mode 100644 index 00000000..d148e233 Binary files /dev/null and b/MacNavBar/example/icons/z_apps.png differ diff --git a/MacNavBar/example/icons/z_plugins.png b/MacNavBar/example/icons/z_plugins.png new file mode 100644 index 00000000..c577f9e8 Binary files /dev/null and b/MacNavBar/example/icons/z_plugins.png differ diff --git a/MacNavBar/example/icons/z_prefApp.png b/MacNavBar/example/icons/z_prefApp.png new file mode 100644 index 00000000..96ddedcd Binary files /dev/null and b/MacNavBar/example/icons/z_prefApp.png differ diff --git a/MacNavBar/example/icons/z_systemUpdates.png b/MacNavBar/example/icons/z_systemUpdates.png new file mode 100644 index 00000000..6be67f26 Binary files /dev/null and b/MacNavBar/example/icons/z_systemUpdates.png differ diff --git a/MacNavBar/example/icons/z_unknown.png b/MacNavBar/example/icons/z_unknown.png new file mode 100644 index 00000000..a64f69f4 Binary files /dev/null and b/MacNavBar/example/icons/z_unknown.png differ diff --git a/MacNavBar/example/icons/z_upToDate.png b/MacNavBar/example/icons/z_upToDate.png new file mode 100644 index 00000000..b63469c7 Binary files /dev/null and b/MacNavBar/example/icons/z_upToDate.png differ diff --git a/MacNavBar/example/icons/z_updates.png b/MacNavBar/example/icons/z_updates.png new file mode 100644 index 00000000..02d29b05 Binary files /dev/null and b/MacNavBar/example/icons/z_updates.png differ diff --git a/MacNavBar/example/icons/z_widgets.png b/MacNavBar/example/icons/z_widgets.png new file mode 100644 index 00000000..10d0ba74 Binary files /dev/null and b/MacNavBar/example/icons/z_widgets.png differ diff --git a/MacNavBar/example/main.cpp b/MacNavBar/example/main.cpp new file mode 100644 index 00000000..d23c7d7c --- /dev/null +++ b/MacNavBar/example/main.cpp @@ -0,0 +1,52 @@ +/* + * This file is part of Quartica. + * + * Copyright (c) 2008 Matteo Bertozzi + * + * 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 . + */ + +// Qt4 Headers +#include + +// Quartica Headers +#include + +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()); +} + diff --git a/MacNavBar/include/QfClickableLabel b/MacNavBar/include/QfClickableLabel new file mode 100644 index 00000000..f7953000 --- /dev/null +++ b/MacNavBar/include/QfClickableLabel @@ -0,0 +1 @@ +#include "qf_clickablelabel.h" diff --git a/MacNavBar/include/QfNavBar b/MacNavBar/include/QfNavBar new file mode 100644 index 00000000..4f627c1c --- /dev/null +++ b/MacNavBar/include/QfNavBar @@ -0,0 +1 @@ +#include "qf_navbar.h" diff --git a/MacNavBar/include/QfNavBarGroup b/MacNavBar/include/QfNavBarGroup new file mode 100644 index 00000000..86db9771 --- /dev/null +++ b/MacNavBar/include/QfNavBarGroup @@ -0,0 +1 @@ +#include "qf_navbargroup.h" diff --git a/MacNavBar/include/QfNavBarItem b/MacNavBar/include/QfNavBarItem new file mode 100644 index 00000000..b387962b --- /dev/null +++ b/MacNavBar/include/QfNavBarItem @@ -0,0 +1 @@ +#include "qf_navbaritem.h" diff --git a/MacNavBar/include/QfSelectableWidget b/MacNavBar/include/QfSelectableWidget new file mode 100644 index 00000000..17193583 --- /dev/null +++ b/MacNavBar/include/QfSelectableWidget @@ -0,0 +1 @@ +#include "qf_selectablewidget.h" diff --git a/MacNavBar/include/QfUiExport b/MacNavBar/include/QfUiExport new file mode 100644 index 00000000..fe60900e --- /dev/null +++ b/MacNavBar/include/QfUiExport @@ -0,0 +1 @@ +#include "qf_uiexport.h" diff --git a/MacNavBar/include/qf_clickablelabel.h b/MacNavBar/include/qf_clickablelabel.h new file mode 100644 index 00000000..fe6a8fc7 --- /dev/null +++ b/MacNavBar/include/qf_clickablelabel.h @@ -0,0 +1,47 @@ +/* + * This file is part of Quartica. + * + * Copyright (c) 2008 Matteo Bertozzi + * + * 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 . + */ + +#ifndef _QF_CLICKABLELABEL_H_ +#define _QF_CLICKABLELABEL_H_ + +// Qt4 Headers +#include + +// Quartica Headers +#include + +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_ + diff --git a/MacNavBar/include/qf_navbar.h b/MacNavBar/include/qf_navbar.h new file mode 100644 index 00000000..50f59645 --- /dev/null +++ b/MacNavBar/include/qf_navbar.h @@ -0,0 +1,73 @@ +/* + * This file is part of Quartica. + * + * Copyright (c) 2008 Matteo Bertozzi + * + * 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 . + */ + +#ifndef _QF_NAVBAR_H_ +#define _QF_NAVBAR_H_ + +// Qt4 Headers +#include + +// Quartica Headers +#include +#include + +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_ + diff --git a/MacNavBar/include/qf_navbargroup.h b/MacNavBar/include/qf_navbargroup.h new file mode 100644 index 00000000..61725b19 --- /dev/null +++ b/MacNavBar/include/qf_navbargroup.h @@ -0,0 +1,79 @@ +/* + * This file is part of Quartica. + * + * Copyright (c) 2008 Matteo Bertozzi + * + * 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 . + */ + +#ifndef _QF_NAVBARGROUP_H_ +#define _QF_NAVBARGROUP_H_ + +// Qt4 Headers +#include + +// Quartica Headers +#include +#include + +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_ + diff --git a/MacNavBar/include/qf_navbaritem.h b/MacNavBar/include/qf_navbaritem.h new file mode 100644 index 00000000..618444dd --- /dev/null +++ b/MacNavBar/include/qf_navbaritem.h @@ -0,0 +1,65 @@ +/* + * This file is part of Quartica. + * + * Copyright (c) 2008 Matteo Bertozzi + * + * 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 . + */ + +#ifndef _QF_NAVBARITEM_H_ +#define _QF_NAVBARITEM_H_ + +// Qt4 Headers +#include + +// Quartica Headers +#include +#include + +class QFUI_EXPORT QfNavBarItem : public QfSelectableWidget +{ + Q_OBJECT + + Q_PROPERTY(QString text READ text WRITE setText) + Q_PROPERTY(QPixmap icon READ icon WRITE setIcon) + +public: + QfNavBarItem (QWidget *parent = 0); + QfNavBarItem (const QString& text, QWidget *parent = 0); + QfNavBarItem (const QPixmap& icon, const QString& text, QWidget *parent = 0); + ~QfNavBarItem(); + + // Methods + void addSpacing (int size); + void addWidget (QWidget *widget, int stretch = 0); + + void insertSpacing (int index, int size); + void insertWidget (int index, QWidget *widget, int stretch = 0); + + // GET Properties + QString text (void) const; + const QPixmap *icon (void) const; + + // SET Properties + void setIcon (const QPixmap& icon); + void setText (const QString& text); + void setTextColor (const QColor& color); + +private: + class Private; + Private *d; +}; + +#endif // !_QF_NAVBARITEM_H_ + diff --git a/MacNavBar/include/qf_selectablewidget.h b/MacNavBar/include/qf_selectablewidget.h new file mode 100644 index 00000000..bb8d09f6 --- /dev/null +++ b/MacNavBar/include/qf_selectablewidget.h @@ -0,0 +1,59 @@ +/* + * This file is part of Quartica. + * + * Copyright (c) 2008 Matteo Bertozzi + * + * 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 . + */ + +#ifndef _QF_SELECTABLE_WIDGET_H_ +#define _QF_SELECTABLE_WIDGET_H_ + +// Qt4 Headers +#include + +// Quartica Headers +#include + +class QFUI_EXPORT QfSelectableWidget : public QWidget +{ + Q_OBJECT + + Q_PROPERTY(bool isSelected READ isSelected WRITE select) + +public: + QfSelectableWidget (QWidget *parent = 0); + ~QfSelectableWidget(); + + bool isSelected (void) const; + +signals: + void selected (void); + void selected (QfSelectableWidget *widget); + +public slots: + void select (void); + void select (bool isSelected); + void unselect (void); + +protected: + void mouseReleaseEvent (QMouseEvent *event); + +private: + class Private; + Private *d; +}; + +#endif // !_QF_SELECTABLE_WIDGET_H_ + diff --git a/MacNavBar/include/qf_uiexport.h b/MacNavBar/include/qf_uiexport.h new file mode 100644 index 00000000..63f7aa35 --- /dev/null +++ b/MacNavBar/include/qf_uiexport.h @@ -0,0 +1,45 @@ +/* + * This file is part of Quartica. + * + * Copyright (c) 2008 Matteo Bertozzi + * + * 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 . + */ + +#ifndef _QFUI_EXPORT_H_ +#define _QFUI_EXPORT_H_ + +#ifdef Q_OS_WIN + #ifdef QFUI_MAKEDLL + #define QFUI_EXPORT Q_DECL_EXPORT + #else + #define QFUI_EXPORT Q_DECL_IMPORT + #endif +#else + #define QFUI_EXPORT +#endif + + +#ifdef QT_NO_DEBUG + #ifdef QFUI_DEBUG + #undef QFUI_DEBUG + #endif +#elif defined(QFUI_DEBUG) + #include + + #define QFUI_DEBUG_STRING "QfUserInterface Debug:" +#endif + +#endif // !_QFUI_EXPORT_H_ + diff --git a/MacNavBar/src/clickablelabel.cpp b/MacNavBar/src/clickablelabel.cpp new file mode 100644 index 00000000..7574401d --- /dev/null +++ b/MacNavBar/src/clickablelabel.cpp @@ -0,0 +1,88 @@ +/* + * This file is part of Quartica. + * + * Copyright (c) 2008 Matteo Bertozzi + * + * 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 . + */ + +// Qt4 Headers +#include + +// Quartica Headers +#include "qf_clickablelabel.h" + +// ============================================================================= +// ClickableLabel: PRIVATE Class +// ============================================================================= + +// ============================================================================= +// ClickableLabel: PUBLIC Constructors/Destructors +// ============================================================================= +QfClickableLabel::QfClickableLabel (QWidget *parent, Qt::WindowFlags f) + : QLabel(parent, f) +{ + +} + +QfClickableLabel::QfClickableLabel (const QString& text, QWidget *parent, Qt::WindowFlags f) + : QLabel(text, parent, f) +{ + +} + +QfClickableLabel::~QfClickableLabel() +{ + +} + +// ============================================================================= +// ClickableLabel: PUBLIC Methods +// ============================================================================= + +// ============================================================================= +// ClickableLabel: PUBLIC Get Properties +// ============================================================================= + +// ============================================================================= +// ClickableLabel: PUBLIC Set Properties +// ============================================================================= + +// ============================================================================= +// ClickableLabel: PUBLIC Slots +// ============================================================================= + +// ============================================================================= +// ClickableLabel: PROTECTED Methods +// ============================================================================= +void QfClickableLabel::mouseReleaseEvent (QMouseEvent *event) +{ + QLabel::mouseReleaseEvent(event); + + // Accept Event + event->setAccepted(true); + + // Raise Clicked Event + emit clicked(); + emit clicked(this); +} + +// ============================================================================= +// ClickableLabel: PRIVATE Slots +// ============================================================================= + +// ============================================================================= +// ClickableLabel: PRIVATE Methods +// ============================================================================= + diff --git a/MacNavBar/src/navbar.cpp b/MacNavBar/src/navbar.cpp new file mode 100644 index 00000000..db9eea5c --- /dev/null +++ b/MacNavBar/src/navbar.cpp @@ -0,0 +1,230 @@ +/* + * This file is part of Quartica. + * + * Copyright (c) 2008 Matteo Bertozzi + * + * 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 . + */ + +// Qt4 Headers +#include +#include +#include + +// Quartica Headers +#include "qf_navbar.h" + +// ============================================================================= +// NavBar: PRIVATE Class +// ============================================================================= +class QfNavBar::Private +{ +public: + QVBoxLayout *layout; + + // Colors + QColor colorBackground; + QColor colorSelection; + + // Current Selection + QfNavBarGroup *groupSelected; + QfNavBarItem *itemSelected; +}; + +// ============================================================================= +// NavBar: PUBLIC Constructors/Destructors +// ============================================================================= +QfNavBar::QfNavBar (QWidget *parent) + : QWidget(parent) + , d(new QfNavBar::Private) +{ + // Initialize Members + d->layout = new QVBoxLayout; + d->itemSelected = NULL; + d->groupSelected = NULL; + + // Setup Colors + d->colorBackground = QColor(0xdf, 0xe4, 0xea); + d->colorSelection = QColor(0xa6, 0xa6, 0xa6); + + // Setup Layout + d->layout->addStretch(2); + setLayout(d->layout); +} + +QfNavBar::~QfNavBar() +{ + delete d; + d = NULL; +} + +// ============================================================================= +// NavBar: PUBLIC Methods - Groups Related +// ============================================================================= +void QfNavBar::addGroup (QfNavBarGroup *group) +{ + // Set Font + group->setTitleColor(QColor(0x65, 0x71, 0x80)); + + // Add Events + connect(group, SIGNAL(selected(QfNavBarGroup *, QfNavBarItem *)), + this, SLOT(onItemSelected(QfNavBarGroup *, QfNavBarItem *))); + + // Add to Layout + d->layout->insertWidget(d->layout->count() - 1, group); +} + +QfNavBarGroup *QfNavBar::addGroup (const QString& title) +{ + QfNavBarGroup *group = new QfNavBarGroup(title); + addGroup(group); + return(group); +} + +bool QfNavBar::containsGroup (QfNavBarGroup *group) +{ + int itemCount = d->layout->count(); + + for (int i = 0; i < itemCount; ++i) + { + QWidget *widget = d->layout->itemAt(i)->widget(); + if (widget == group) return(true); + } + + return(false); +} + +// ============================================================================= +// NavBar: PUBLIC Methods - Items Related +// ============================================================================= +void QfNavBar::addItem (QfNavBarGroup *group, QfNavBarItem *item) +{ + group->addItem(item); +} + +QfNavBarItem *QfNavBar::addItem (QfNavBarGroup *group, const QString& text) +{ + return(group->addItem(text)); +} + +QfNavBarItem *QfNavBar::addItem (QfNavBarGroup *group, const QPixmap& icon, const QString& text) +{ + return(group->addItem(icon, text)); +} + + +// ============================================================================= +// NavBar: PUBLIC Get Properties +// ============================================================================= +QColor QfNavBar::backgroundColor (void) const +{ + return(d->colorBackground); +} + +QColor QfNavBar::selectionColor (void) const +{ + return(d->colorSelection); +} + +// ============================================================================= +// NavBar: PUBLIC Set Properties +// ============================================================================= +void QfNavBar::setBackgroundColor (const QColor& bgColor) +{ + d->colorBackground = bgColor; +} + +void QfNavBar::setSelectionColor (const QColor& selectionColor) +{ + d->colorSelection = selectionColor; +} + +// ============================================================================= +// NavBar: PUBLIC Slots +// ============================================================================= + +// ============================================================================= +// NavBar: PROTECTED Methods +// ============================================================================= +void QfNavBar::paintEvent (QPaintEvent *event) +{ + QWidget::paintEvent(event); + + // Recall Update() if painter area is not complete! + if (event->rect().x() > 0 || event->rect().y() > 0) + { + update(); + } + + QPainter p(this); + p.setRenderHint(QPainter::Antialiasing); + p.fillRect(event->rect(), d->colorBackground); + + // Draw Selection + if (d->groupSelected != NULL && d->groupSelected->isExpanded() && d->itemSelected != NULL) + { + QPoint pos = d->groupSelected->pos() + d->itemSelected->pos(); + int width = geometry().width(); + + int r = d->colorSelection.red(); + int g = d->colorSelection.green(); + int b = d->colorSelection.blue(); + + p.fillRect(0, pos.y() - 1, width, 1, QColor(r - 0x26, g - 0x26, b - 0x26)); + + QLinearGradient linearGrad(QPointF(0, pos.y()), QPointF(0, pos.y() + d->itemSelected->height())); + linearGrad.setColorAt(0, d->colorSelection); + linearGrad.setColorAt(1, QColor(r - 0x3b, g - 0x3b, b - 0x3b)); + p.fillRect(0, pos.y(), width, d->itemSelected->height(), linearGrad); + } + + p.end(); +} + +// ============================================================================= +// NavBar: PRIVATE Slots +// ============================================================================= +void QfNavBar::onItemSelected (QfNavBarGroup *group, QfNavBarItem *item) +{ + if (d->itemSelected != NULL && d->itemSelected != item) + { + d->itemSelected->setFont(item->font()); + d->itemSelected->setTextColor(Qt::black); + d->itemSelected->unselect(); + } + + d->groupSelected = group; + d->itemSelected = item; + + QFont font = d->itemSelected->font(); + font.setPixelSize(9); + font.setBold(true); + d->itemSelected->setFont(font); + d->itemSelected->setTextColor(Qt::white); + + update(); +} + +void QfNavBar::onGroupExpanded (QfNavBarGroup *group) +{ + Q_UNUSED(group) + + update(); +} + +// ============================================================================= +// NavBar: PRIVATE Methods +// ============================================================================= + + diff --git a/MacNavBar/src/navbargroup.cpp b/MacNavBar/src/navbargroup.cpp new file mode 100644 index 00000000..9069b234 --- /dev/null +++ b/MacNavBar/src/navbargroup.cpp @@ -0,0 +1,243 @@ +/* + * This file is part of Quartica. + * + * Copyright (c) 2008 Matteo Bertozzi + * + * 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 . + */ + +// Qt4 Headers +#include +#include + +// Quartica Headers +#include "qf_clickablelabel.h" +#include "qf_navbargroup.h" + +// ============================================================================= +// NavBarGroup: PRIVATE Class +// ============================================================================= +class QfNavBarGroup::Private +{ +public: + QList listItems; + QfClickableLabel *labelTitle; + QVBoxLayout *layout; + bool isExpanded; + +public: + void initialize (QfNavBarGroup *group); +}; + +void QfNavBarGroup::Private::initialize (QfNavBarGroup *group) +{ + // Initialize Members + layout = new QVBoxLayout; + labelTitle = new QfClickableLabel; + + // Setup Expanded Flag + isExpanded = true; + + // Add Layout Items + layout->addWidget(labelTitle); + + // Setup Label Title + QFont font = labelTitle->font(); + font.setBold(true); + font.setPixelSize(10); + labelTitle->setFont(font); + labelTitle->setAlignment(Qt::AlignVCenter | Qt::AlignLeft); + + // Setup Layout + layout->setSpacing(1); + layout->setContentsMargins(0, 0, 0, 0); + group->setLayout(layout); +} + +// ============================================================================= +// NavBarGroup: PUBLIC Constructors/Destructors +// ============================================================================= +QfNavBarGroup::QfNavBarGroup (QWidget *parent) + : QWidget(parent) + , d(new QfNavBarGroup::Private) +{ + d->initialize(this); + + // Add Events + connect(d->labelTitle, SIGNAL(clicked()), this, SLOT(onTitleClicked())); +} + +QfNavBarGroup::QfNavBarGroup (const QString& title, QWidget *parent) + : QWidget(parent) + , d(new QfNavBarGroup::Private) +{ + d->initialize(this); + d->labelTitle->setText(title); + + // Add Events + connect(d->labelTitle, SIGNAL(clicked()), this, SLOT(onTitleClicked())); +} + +QfNavBarGroup::~QfNavBarGroup() +{ + delete d; + d = NULL; +} + +// ============================================================================= +// NavBarGroup: PUBLIC Methods - Add Item +// ============================================================================= +void QfNavBarGroup::addItem (QfNavBarItem *item) +{ + // Insert Item Space + item->insertSpacing(0, 10); + + // Insert Item into Item List + d->listItems.append(item); + + // Add Item to Layout + d->layout->addWidget(item); + + // Add Event + connect(item, SIGNAL(selected(QfSelectableWidget *)), + this, SLOT(onItemSelected(QfSelectableWidget *))); +} + +void QfNavBarGroup::addItem (QfNavBarItem *item, int index) +{ + // Insert Item Space + item->insertSpacing(0, 20); + + // Insert Item into Item List + d->listItems.insert(index, item); + + // Add Item to Layout + d->layout->insertWidget(index, item); + + // Add Event + connect(item, SIGNAL(selected(QfSelectableWidget *)), + this, SLOT(onItemSelected(QfSelectableWidget *))); +} + +// ============================================================================= +// NavBarGroup: PUBLIC Methods - Create and Add Item +// ============================================================================= +QfNavBarItem *QfNavBarGroup::addItem (const QString& text) +{ + QfNavBarItem *item = new QfNavBarItem(text); + addItem(item); + return(item); +} + +QfNavBarItem *QfNavBarGroup::addItem (const QPixmap& icon, const QString& text) +{ + QfNavBarItem *item = new QfNavBarItem(icon, text); + addItem(item); + return(item); +} + +QfNavBarItem *QfNavBarGroup::addItem (const QPixmap& icon, const QString& text, int index) +{ + QfNavBarItem *item = new QfNavBarItem(icon, text); + addItem(item, index); + return(item); +} + +// ============================================================================= +// NavBarGroup: PUBLIC Methods +// ============================================================================= +bool QfNavBarGroup::containsItem (QfNavBarItem *item) +{ + return(d->listItems.contains(item)); +} + +// ============================================================================= +// NavBarGroup: PUBLIC Get Properties +// ============================================================================= +QString QfNavBarGroup::title (void) const +{ + return(d->labelTitle->text()); +} + +bool QfNavBarGroup::isExpanded (void) const +{ + return(d->isExpanded); +} + +// ============================================================================= +// NavBarGroup: PUBLIC Set Properties +// ============================================================================= +void QfNavBarGroup::setTitle (const QString& title) +{ + d->labelTitle->setText(title); +} + +void QfNavBarGroup::setTitleColor (const QColor& color) +{ + QPalette palette = d->labelTitle->palette(); + palette.setColor(QPalette::WindowText, color); + d->labelTitle->setPalette(palette); +} + +// ============================================================================= +// NavBarGroup: PUBLIC Slots +// ============================================================================= +void QfNavBarGroup::expand (bool expand) +{ + if (d->isExpanded == expand) return; + + if (expand) + { + foreach (QfNavBarItem *item, d->listItems) + { + d->layout->addWidget(item); + item->show(); + } + } + else + { + foreach (QfNavBarItem *item, d->listItems) + { + d->layout->removeWidget(item); + item->hide(); + } + } + + d->isExpanded = expand; + + // Raise Expanded Event + emit expanded(this); +} + +// ============================================================================= +// NavBarGroup: PROTECTED Methods +// ============================================================================= + +// ============================================================================= +// NavBarGroup: PRIVATE Slots +// ============================================================================= +void QfNavBarGroup::onItemSelected (QfSelectableWidget *item) +{ + emit selected(this, (QfNavBarItem *) item); +} + +void QfNavBarGroup::onTitleClicked (void) +{ + expand(!d->isExpanded); +} + +// ============================================================================= +// NavBarGroup: PRIVATE Methods +// ============================================================================= + diff --git a/MacNavBar/src/navbaritem.cpp b/MacNavBar/src/navbaritem.cpp new file mode 100644 index 00000000..af6224fc --- /dev/null +++ b/MacNavBar/src/navbaritem.cpp @@ -0,0 +1,179 @@ +/* + * This file is part of Quartica. + * + * Copyright (c) 2008 Matteo Bertozzi + * + * 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 . + */ + +// Qt4 Headers +#include +#include + +// Quartica Headers +#include "qf_navbaritem.h" + +// ============================================================================= +// NavBarItem: PRIVATE Class +// ============================================================================= +class QfNavBarItem::Private +{ + public: + QHBoxLayout *layout; + QLabel *labelIcon; + QLabel *labelText; + + public: + void initialize (QfNavBarItem *item); +}; + +void QfNavBarItem::Private::initialize (QfNavBarItem *item) +{ + // Initialize Members + layout = new QHBoxLayout; + labelIcon = new QLabel; + labelText = new QLabel; + + // Setup Text Label + labelText->setAlignment(Qt::AlignVCenter | Qt::AlignLeft); + labelIcon->setFixedWidth(18); + + // Setup Font + QFont font = labelText->font(); + font.setPixelSize(10); + labelText->setFont(font); + + // Add Items to Layout + layout->addWidget(labelIcon); + layout->addWidget(labelText); + + // Setup Layout + layout->setContentsMargins(1, 1, 1, 1); + item->setLayout(layout); +} + +// ============================================================================= +// NavBarItem: PUBLIC Constructors/Destructors +// ============================================================================= +QfNavBarItem::QfNavBarItem (QWidget *parent) + : QfSelectableWidget(parent) + , d(new QfNavBarItem::Private) +{ + d->initialize(this); +} + +QfNavBarItem::QfNavBarItem (const QString& text, QWidget *parent) + : QfSelectableWidget(parent) + , d(new QfNavBarItem::Private) +{ + d->initialize(this); + d->labelText->setText(text); +} + +QfNavBarItem::QfNavBarItem (const QPixmap& icon, const QString& text, QWidget *parent) + : QfSelectableWidget(parent) + , d(new QfNavBarItem::Private) +{ + d->initialize(this); + + setIcon(icon); + d->labelText->setText(text); +} + +QfNavBarItem::~QfNavBarItem() +{ + delete d; + d = NULL; +} + +// ============================================================================= +// NavBarItem: PUBLIC Methods +// ============================================================================= +void QfNavBarItem::addSpacing (int size) +{ + d->layout->addSpacing(size); +} + +void QfNavBarItem::addWidget (QWidget *widget, int stretch) +{ + d->layout->addWidget(widget, stretch); +} + + +void QfNavBarItem::insertSpacing (int index, int size) +{ + d->layout->insertSpacing(index, size); +} + +void QfNavBarItem::insertWidget (int index, QWidget *widget, int stretch) +{ + d->layout->insertWidget(index, widget, stretch); +} + +// ============================================================================= +// NavBarItem: PUBLIC Get Properties +// ============================================================================= +QString QfNavBarItem::text (void) const +{ + return(d->labelText->text()); +} + +const QPixmap *QfNavBarItem::icon (void) const +{ + return(d->labelIcon->pixmap()); +} + +// ============================================================================= +// NavBarItem: PUBLIC Set Properties +// ============================================================================= +void QfNavBarItem::setIcon (const QPixmap& icon) +{ + if (icon.height() > 20) + { + d->labelIcon->setPixmap(icon.scaledToHeight(20, Qt::SmoothTransformation)); + } + else + { + d->labelIcon->setPixmap(icon); + } +} + +void QfNavBarItem::setText (const QString& text) +{ + d->labelText->setText(text); +} + +void QfNavBarItem::setTextColor (const QColor& color) +{ + QPalette palette = d->labelText->palette(); + palette.setColor(QPalette::WindowText, color); + d->labelText->setPalette(palette); +} + +// ============================================================================= +// NavBarItem: PUBLIC Slots +// ============================================================================= + +// ============================================================================= +// NavBarItem: PROTECTED Methods +// ============================================================================= + +// ============================================================================= +// NavBarItem: PRIVATE Slots +// ============================================================================= + +// ============================================================================= +// NavBarItem: PRIVATE Methods +// ============================================================================= + diff --git a/MacNavBar/src/selectablewidget.cpp b/MacNavBar/src/selectablewidget.cpp new file mode 100644 index 00000000..cf70a54d --- /dev/null +++ b/MacNavBar/src/selectablewidget.cpp @@ -0,0 +1,117 @@ +/* + * This file is part of Quartica. + * + * Copyright (c) 2008 Matteo Bertozzi + * + * 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 . + */ + +// Qt4 Headers +#include + +// Quartica UI Headers +#include "qf_selectablewidget.h" + +// ============================================================================= +// SelectableWidget: PRIVATE Class +// ============================================================================= +class QfSelectableWidget::Private +{ +public: + bool isSelected; +}; + +// ============================================================================= +// SelectableWidget: PUBLIC Constructors/Destructors +// ============================================================================= +QfSelectableWidget::QfSelectableWidget (QWidget *parent) + : QWidget(parent) + , d(new QfSelectableWidget::Private) +{ + d->isSelected = false; +} + +QfSelectableWidget::~QfSelectableWidget() +{ + delete d; + d = NULL; +} + +// ============================================================================= +// SelectableWidget: PUBLIC Methods +// ============================================================================= + +// ============================================================================= +// SelectableWidget: PUBLIC Get Properties +// ============================================================================= +bool QfSelectableWidget::isSelected (void) const +{ + return(d->isSelected); +} + +// ============================================================================= +// SelectableWidget: PUBLIC Set Properties +// ============================================================================= + +// ============================================================================= +// SelectableWidget: PUBLIC Slots +// ============================================================================= +void QfSelectableWidget::select (void) +{ + select(true); +} + +void QfSelectableWidget::select (bool isSelected) +{ + if (d->isSelected == isSelected) return; + + d->isSelected = isSelected; + + // if is selected raise event + if (isSelected) + { + emit selected(); + emit selected(this); + } + + update(); +} + +void QfSelectableWidget::unselect (void) +{ + select(false); +} + +// ============================================================================= +// SelectableWidget: PROTECTED Methods +// ============================================================================= +void QfSelectableWidget::mouseReleaseEvent (QMouseEvent *event) +{ + QWidget::mouseReleaseEvent(event); + + // Left Click, Select/Unselect Item + if (event->button() == Qt::LeftButton) + { + select(!d->isSelected); + } +} + +// ============================================================================= +// SelectableWidget: PRIVATE Slots +// ============================================================================= + +// ============================================================================= +// SelectableWidget: PRIVATE Methods +// ============================================================================= + diff --git a/chat/chat.pro b/chat/chat.pro new file mode 100644 index 00000000..0b9e76f7 --- /dev/null +++ b/chat/chat.pro @@ -0,0 +1,32 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2010-06-02T08:59:18 +# +#------------------------------------------------- + +QT += core widgets gui + +TARGET = chat +TEMPLATE = app + + +SOURCES += main.cpp\ + widget.cpp \ + tcpclient.cpp \ + tcpserver.cpp + +HEADERS += widget.h \ + tcpclient.h \ + tcpserver.h + +FORMS += widget.ui \ + tcpclient.ui \ + tcpserver.ui +QT += network + +RESOURCES += \ + resource.qrc + +OTHER_FILES += \ + ico/myicon.ico +RC_FILE += diff --git a/chat/ico/myicon.ico b/chat/ico/myicon.ico new file mode 100644 index 00000000..fea5b47a Binary files /dev/null and b/chat/ico/myicon.ico differ diff --git a/chat/icon.txt b/chat/icon.txt new file mode 100644 index 00000000..e69de29b diff --git a/chat/image/20091201_0c5e3cb96bf053f6f8f43xlWxvBTLEnr.png b/chat/image/20091201_0c5e3cb96bf053f6f8f43xlWxvBTLEnr.png new file mode 100644 index 00000000..6c6dc75e Binary files /dev/null and b/chat/image/20091201_0c5e3cb96bf053f6f8f43xlWxvBTLEnr.png differ diff --git a/chat/image/20091201_2a0f6976569659175fd3PEFlPFnrDS1R.png b/chat/image/20091201_2a0f6976569659175fd3PEFlPFnrDS1R.png new file mode 100644 index 00000000..6c1ff526 Binary files /dev/null and b/chat/image/20091201_2a0f6976569659175fd3PEFlPFnrDS1R.png differ diff --git a/chat/image/20091201_b321df1d9e60373380a0IQzepnVIU3HS.png b/chat/image/20091201_b321df1d9e60373380a0IQzepnVIU3HS.png new file mode 100644 index 00000000..bd36f319 Binary files /dev/null and b/chat/image/20091201_b321df1d9e60373380a0IQzepnVIU3HS.png differ diff --git a/chat/image/20091201_e59eb6d747cef0b2bc89nKJwRb2QIxXh.png b/chat/image/20091201_e59eb6d747cef0b2bc89nKJwRb2QIxXh.png new file mode 100644 index 00000000..d4b7bc54 Binary files /dev/null and b/chat/image/20091201_e59eb6d747cef0b2bc89nKJwRb2QIxXh.png differ diff --git a/chat/image/Bin (empty).png b/chat/image/Bin (empty).png new file mode 100644 index 00000000..ab025349 Binary files /dev/null and b/chat/image/Bin (empty).png differ diff --git a/chat/image/E-Mail.png b/chat/image/E-Mail.png new file mode 100644 index 00000000..233ee710 Binary files /dev/null and b/chat/image/E-Mail.png differ diff --git a/chat/image/Files.png b/chat/image/Files.png new file mode 100644 index 00000000..ce99bb76 Binary files /dev/null and b/chat/image/Files.png differ diff --git a/chat/image/Floppy.png b/chat/image/Floppy.png new file mode 100644 index 00000000..2c815ab4 Binary files /dev/null and b/chat/image/Floppy.png differ diff --git a/chat/image/MSN-Messenger.png b/chat/image/MSN-Messenger.png new file mode 100644 index 00000000..18f6f934 Binary files /dev/null and b/chat/image/MSN-Messenger.png differ diff --git a/chat/image/User.png b/chat/image/User.png new file mode 100644 index 00000000..f5354eee Binary files /dev/null and b/chat/image/User.png differ diff --git a/chat/image/fileopen.png b/chat/image/fileopen.png new file mode 100644 index 00000000..fc06c5ec Binary files /dev/null and b/chat/image/fileopen.png differ diff --git a/chat/image/textbold.png b/chat/image/textbold.png new file mode 100644 index 00000000..5fff9bea Binary files /dev/null and b/chat/image/textbold.png differ diff --git a/chat/image/textcolor.png b/chat/image/textcolor.png new file mode 100644 index 00000000..4be4e350 Binary files /dev/null and b/chat/image/textcolor.png differ diff --git a/chat/image/textitalic.png b/chat/image/textitalic.png new file mode 100644 index 00000000..0170ee26 Binary files /dev/null and b/chat/image/textitalic.png differ diff --git a/chat/image/textunder.png b/chat/image/textunder.png new file mode 100644 index 00000000..288eac3f Binary files /dev/null and b/chat/image/textunder.png differ diff --git a/chat/main.cpp b/chat/main.cpp new file mode 100644 index 00000000..8d3cf484 --- /dev/null +++ b/chat/main.cpp @@ -0,0 +1,15 @@ +#include +#include "widget.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + Widget w; + +#if defined(Q_WS_S60) + w.showMaximized(); +#else + w.show(); +#endif + return a.exec(); +} diff --git a/chat/resource.qrc b/chat/resource.qrc new file mode 100644 index 00000000..93524337 --- /dev/null +++ b/chat/resource.qrc @@ -0,0 +1,12 @@ + + + image/Bin (empty).png + image/fileopen.png + image/Floppy.png + image/textbold.png + image/textcolor.png + image/textitalic.png + image/textunder.png + image/User.png + + diff --git a/chat/tcpclient.cpp b/chat/tcpclient.cpp new file mode 100644 index 00000000..a6ceaae3 --- /dev/null +++ b/chat/tcpclient.cpp @@ -0,0 +1,146 @@ +#include "tcpclient.h" +#include "ui_tcpclient.h" + +#include +#include + +TcpClient::TcpClient(QWidget *parent) + : QDialog(parent) + , ui(new Ui::TcpClient) +{ + ui->setupUi(this); + this->setFixedSize(350,180); + + TotalBytes = 0; + bytesReceived = 0; + fileNameSize = 0; + + tcpClient = new QTcpSocket(this); + tcpPort = 6666; + + connect(tcpClient,SIGNAL(readyRead()),this,SLOT(readMessage())); + connect(tcpClient,SIGNAL(error(QAbstractSocket::SocketError)),this, + SLOT(displayError(QAbstractSocket::SocketError))); + +} + +TcpClient::~TcpClient() +{ + delete ui; +} + +void TcpClient::changeEvent(QEvent *e) +{ + QDialog::changeEvent(e); + + switch (e->type()) + { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + + default: + break; + } +} + +//设置服务器地址并连接服务器 +void TcpClient::setHostAddress(QHostAddress address) +{ + hostAddress = address; + newConnect(); +} + +void TcpClient::newConnect() +{ + blockSize = 0; + tcpClient->abort(); + tcpClient->connectToHost(hostAddress,tcpPort); + time.start(); +} + +void TcpClient::readMessage() +{ + QDataStream in(tcpClient); + in.setVersion(QDataStream::Qt_5_5); + + float useTime = time.elapsed(); + + if(bytesReceived <= sizeof(qint64)*2) + { + if((tcpClient->bytesAvailable() >= sizeof(qint64)*2) && (fileNameSize == 0)) + { + in>>TotalBytes>>fileNameSize; + bytesReceived += sizeof(qint64)*2; + } + + if((tcpClient->bytesAvailable() >= fileNameSize) && (fileNameSize != 0)) + { + in>>fileName; + bytesReceived +=fileNameSize; + + if(!localFile->open(QFile::WriteOnly)) + { + QMessageBox::warning(this, + QStringLiteral("应用程序"), + QStringLiteral("无法读取文件 %1:\n%2.").arg(fileName).arg(localFile->errorString())); + return; + } + } + else + { + return; + } + } + + if(bytesReceived < TotalBytes) + { + bytesReceived += tcpClient->bytesAvailable(); + inBlock = tcpClient->readAll(); + localFile->write(inBlock); + inBlock.resize(0); + } + + ui->progressBar->setMaximum(TotalBytes); + ui->progressBar->setValue(bytesReceived); + qDebug()<tcpClientStatusLabel->setText(QStringLiteral("已接收 %1MB (%2MB/s) \n共%3MB 已用时:%4秒\n估计剩余时间:%5秒") + .arg(bytesReceived / (1024*1024))//已接收 + .arg(speed*1000/(1024*1024),0,'f',2)//速度 + .arg(TotalBytes / (1024 * 1024))//总大小 + .arg(useTime/1000,0,'f',0)//用时 + .arg(TotalBytes/speed/1000 - useTime/1000,0,'f',0));//剩余时间 + + if(bytesReceived == TotalBytes) + { + tcpClient->close(); + ui->tcpClientStatusLabel->setText(QStringLiteral("接收文件 %1 完毕").arg(fileName)); + //接收完文件后,一定要关闭,不然可能出问题 + localFile->close(); + } +} + +//错误处理 +void TcpClient::displayError(QAbstractSocket::SocketError socketError) +{ + switch(socketError) + { + case QAbstractSocket::RemoteHostClosedError : break; + default : qDebug() << tcpClient->errorString(); + } +} + +//关闭 +void TcpClient::on_tcpClientCloseBtn_clicked() +{ + tcpClient->abort(); + this->close(); +} + +//取消 +void TcpClient::on_tcpClientCancleBtn_clicked() +{ + tcpClient->abort(); +} diff --git a/chat/tcpclient.h b/chat/tcpclient.h new file mode 100644 index 00000000..9bd1bdf8 --- /dev/null +++ b/chat/tcpclient.h @@ -0,0 +1,54 @@ +#ifndef TCPCLIENT_H +#define TCPCLIENT_H + +#include +#include +#include +#include +#include + +namespace Ui { + class TcpClient; +} + +class TcpClient : public QDialog +{ + Q_OBJECT + +public: + explicit TcpClient(QWidget *parent = 0); + ~TcpClient(); + + + void setHostAddress(QHostAddress address); + void setFileName(QString fileName){localFile = new QFile(fileName);} + +protected: + void changeEvent(QEvent *e); + +private: + Ui::TcpClient *ui; + QTcpSocket *tcpClient; + quint16 blockSize; + QHostAddress hostAddress; + qint16 tcpPort; + + qint64 TotalBytes; + qint64 bytesReceived; + qint64 bytesToReceive; + qint64 fileNameSize; + QString fileName; + QFile *localFile; + QByteArray inBlock; + + QTime time; + +private slots: + void on_tcpClientCancleBtn_clicked(); + void on_tcpClientCloseBtn_clicked(); + void newConnect(); + void readMessage(); + void displayError(QAbstractSocket::SocketError); +}; + +#endif // TCPCLIENT_H diff --git a/chat/tcpclient.ui b/chat/tcpclient.ui new file mode 100644 index 00000000..0e8a0ea3 --- /dev/null +++ b/chat/tcpclient.ui @@ -0,0 +1,82 @@ + + + TcpClient + + + + 0 + 0 + 350 + 180 + + + + 鏂囦欢浼犻 + + + + + 20 + 90 + 311 + 23 + + + + 0 + + + + + + 140 + 140 + 75 + 23 + + + + 鍙栨秷 + + + + + + 240 + 140 + 75 + 23 + + + + 鍏抽棴 + + + + + + 20 + 10 + 321 + 71 + + + + + Agency FB + 12 + 75 + true + + + + 绛夊緟鎺ユ敹鏂囦欢... ... + + + Qt::AlignCenter + + + + + + diff --git a/chat/tcpserver.cpp b/chat/tcpserver.cpp new file mode 100644 index 00000000..edd73960 --- /dev/null +++ b/chat/tcpserver.cpp @@ -0,0 +1,171 @@ +#include "tcpserver.h" +#include "ui_tcpserver.h" +#include +#include +#include + +TcpServer::TcpServer(QWidget *parent) + : QDialog(parent) + , ui(new Ui::TcpServer) +{ + ui->setupUi(this); + this->setFixedSize(350,180); + + tcpPort = 6666; + tcpServer = new QTcpServer(this); + connect(tcpServer,SIGNAL(newConnection()),this,SLOT(sendMessage())); + + initServer(); +} + +TcpServer::~TcpServer() +{ + delete ui; +} + +void TcpServer::changeEvent(QEvent *e) +{ + QDialog::changeEvent(e); + + switch (e->type()) + { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +//开始发送数据 +void TcpServer::sendMessage() +{ + ui->serverSendBtn->setEnabled(false); + clientConnection = tcpServer->nextPendingConnection(); + connect(clientConnection,SIGNAL(bytesWritten(qint64)),SLOT(updateClientProgress(qint64))); + + ui->serverStatusLabel->setText(QStringLiteral("开始传送文件 %1 !").arg(theFileName)); + + localFile = new QFile(fileName); + + if(!localFile->open((QFile::ReadOnly))) + { + //以只读方式打开 + QMessageBox::warning(this, + QStringLiteral("应用程序"), + QStringLiteral("无法读取文件 %1:\n%2").arg(fileName).arg(localFile->errorString())); + return; + } + + TotalBytes = localFile->size(); + QDataStream sendOut(&outBlock,QIODevice::WriteOnly); + sendOut.setVersion(QDataStream::Qt_4_6); + time.start(); //开始计时 + QString currentFile = fileName.right(fileName.size() - fileName.lastIndexOf('/')-1); + sendOut << qint64(0) << qint64(0) << currentFile; + TotalBytes += outBlock.size(); + sendOut.device()->seek(0); + sendOut << TotalBytes << qint64((outBlock.size()-sizeof(qint64)*2)); + bytesToWrite = TotalBytes - clientConnection->write(outBlock); + qDebug() << currentFile << TotalBytes; + outBlock.resize(0); +} + +void TcpServer::updateClientProgress(qint64 numBytes)//更新进度条 +{ + bytesWritten += (int)numBytes; + + if(bytesToWrite > 0) + { + outBlock = localFile->read(qMin(bytesToWrite,loadSize)); + bytesToWrite -= (int)clientConnection->write(outBlock); + outBlock.resize(0); + } + else + { + localFile->close(); + } + + ui->progressBar->setMaximum(TotalBytes); + ui->progressBar->setValue(bytesWritten); + + float useTime = time.elapsed(); + double speed = bytesWritten / useTime; + ui->serverStatusLabel->setText(QStringLiteral("已发送 %1MB (%2MB/s) \n共%3MB 已用时:%4秒\n估计剩余时间:%5秒") + .arg(bytesWritten / (1024*1024))//已发送 + .arg(speed*1000/(1024*1024),0,'f',2)//速度 + .arg(TotalBytes / (1024 * 1024))//总大小 + .arg(useTime/1000,0,'f',0)//用时 + .arg(TotalBytes/speed/1000 - useTime/1000,0,'f',0));//剩余时间 + + //num.sprintf("%.1f KB/s", (bytesWritten*1000) / (1024.0*time.elapsed())); + if(bytesWritten == TotalBytes) + { + ui->serverStatusLabel->setText(QStringLiteral("传送文件 %1 成功").arg(theFileName)); + } +} + +//打开 +void TcpServer::on_serverOpenBtn_clicked() +{ + fileName = QFileDialog::getOpenFileName(this); + + if(!fileName.isEmpty()) + { + theFileName = fileName.right(fileName.size() - fileName.lastIndexOf('/')-1); + ui->serverStatusLabel->setText(QStringLiteral("要传送的文件为:%1 ").arg(theFileName)); + ui->serverSendBtn->setEnabled(true); + ui->serverOpenBtn->setEnabled(false); + } +} + +//被对方拒绝 +void TcpServer::refused() +{ + tcpServer->close(); + ui->serverStatusLabel->setText(QStringLiteral("对方拒绝接收!!!")); +} + +//发送 +void TcpServer::on_serverSendBtn_clicked() +{ + //开始监听 + if(!tcpServer->listen(QHostAddress::Any,tcpPort)) + { + qDebug() << tcpServer->errorString(); + close(); + return; + } + + ui->serverStatusLabel->setText(QStringLiteral("等待对方接收... ...")); + emit sendFileName(theFileName); +} + +//退出 +void TcpServer::on_serverCloseBtn_clicked() +{ + if(tcpServer->isListening()) + { + tcpServer->close(); + clientConnection->abort(); + } + + this->close(); +} + +//初始化 +void TcpServer::initServer() +{ + loadSize = 4*1024; + TotalBytes = 0; + bytesWritten = 0; + bytesToWrite = 0; + + ui->serverStatusLabel->setText(QStringLiteral("请选择要传送的文件")); + ui->progressBar->reset(); + ui->serverOpenBtn->setEnabled(true); + ui->serverSendBtn->setEnabled(false); + + tcpServer->close(); + +} diff --git a/chat/tcpserver.h b/chat/tcpserver.h new file mode 100644 index 00000000..60178186 --- /dev/null +++ b/chat/tcpserver.h @@ -0,0 +1,58 @@ +#ifndef TCPSERVER_H +#define TCPSERVER_H + +#include +#include +#include +#include + +namespace Ui { + class TcpServer; +} + +class TcpServer : public QDialog +{ + Q_OBJECT + +public: + explicit TcpServer(QWidget *parent = 0); + ~TcpServer(); + void refused(); + + void initServer(); + + +protected: + void changeEvent(QEvent *e); + +private: + Ui::TcpServer *ui; + qint16 tcpPort; + QTcpServer *tcpServer; + QString fileName; + QString theFileName; + QFile *localFile; + + qint64 TotalBytes; + qint64 bytesWritten; + qint64 bytesToWrite; + qint64 loadSize; + QByteArray outBlock;//缓存一次发送的数据 + + QTcpSocket *clientConnection; + + QTime time;//计时器 + +private slots: + void on_serverCloseBtn_clicked(); + void on_serverSendBtn_clicked(); + void on_serverOpenBtn_clicked(); + void sendMessage(); + + void updateClientProgress(qint64 numBytes); +signals: + void sendFileName(QString fileName); + +}; + +#endif // TCPSERVER_H diff --git a/chat/tcpserver.ui b/chat/tcpserver.ui new file mode 100644 index 00000000..644cccda --- /dev/null +++ b/chat/tcpserver.ui @@ -0,0 +1,95 @@ + + + TcpServer + + + + 0 + 0 + 350 + 180 + + + + 鏂囦欢浼犻 + + + + + 30 + 90 + 291 + 23 + + + + 0 + + + + + + 10 + 10 + 331 + 71 + + + + + Agency FB + 12 + 75 + true + + + + 璇烽夋嫨瑕佸彂閫佺殑鏂囦欢锛 + + + Qt::AlignCenter + + + + + + 60 + 140 + 75 + 23 + + + + 鎵撳紑 + + + + + + 240 + 140 + 75 + 23 + + + + 閫鍑 + + + + + + 150 + 140 + 75 + 23 + + + + 鍙戦 + + + + + + diff --git a/chat/ui_tcpclient.h b/chat/ui_tcpclient.h new file mode 100644 index 00000000..88bd9bce --- /dev/null +++ b/chat/ui_tcpclient.h @@ -0,0 +1,80 @@ +/******************************************************************************** +** Form generated from reading UI file 'tcpclient.ui' +** +** Created: Wed Dec 12 17:03:40 2012 +** by: Qt User Interface Compiler version 4.7.0 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_TCPCLIENT_H +#define UI_TCPCLIENT_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_TcpClient +{ +public: + QProgressBar *progressBar; + QPushButton *tcpClientCancleBtn; + QPushButton *tcpClientCloseBtn; + QLabel *tcpClientStatusLabel; + + void setupUi(QDialog *TcpClient) + { + if (TcpClient->objectName().isEmpty()) + TcpClient->setObjectName(QString::fromUtf8("TcpClient")); + TcpClient->resize(350, 180); + progressBar = new QProgressBar(TcpClient); + progressBar->setObjectName(QString::fromUtf8("progressBar")); + progressBar->setGeometry(QRect(20, 90, 311, 23)); + progressBar->setValue(0); + tcpClientCancleBtn = new QPushButton(TcpClient); + tcpClientCancleBtn->setObjectName(QString::fromUtf8("tcpClientCancleBtn")); + tcpClientCancleBtn->setGeometry(QRect(140, 140, 75, 23)); + tcpClientCloseBtn = new QPushButton(TcpClient); + tcpClientCloseBtn->setObjectName(QString::fromUtf8("tcpClientCloseBtn")); + tcpClientCloseBtn->setGeometry(QRect(240, 140, 75, 23)); + tcpClientStatusLabel = new QLabel(TcpClient); + tcpClientStatusLabel->setObjectName(QString::fromUtf8("tcpClientStatusLabel")); + tcpClientStatusLabel->setGeometry(QRect(20, 10, 321, 71)); + QFont font; + font.setFamily(QString::fromUtf8("Agency FB")); + font.setPointSize(12); + font.setBold(true); + font.setWeight(75); + tcpClientStatusLabel->setFont(font); + tcpClientStatusLabel->setAlignment(Qt::AlignCenter); + + retranslateUi(TcpClient); + + QMetaObject::connectSlotsByName(TcpClient); + } // setupUi + + void retranslateUi(QDialog *TcpClient) + { + TcpClient->setWindowTitle(QApplication::translate("TcpClient", "\346\226\207\344\273\266\344\274\240\351\200\201", 0)); + tcpClientCancleBtn->setText(QApplication::translate("TcpClient", "\345\217\226\346\266\210", 0)); + tcpClientCloseBtn->setText(QApplication::translate("TcpClient", "\345\205\263\351\227\255", 0)); + tcpClientStatusLabel->setText(QApplication::translate("TcpClient", "\347\255\211\345\276\205\346\216\245\346\224\266\346\226\207\344\273\266... ...", 0)); + } // retranslateUi + +}; + +namespace Ui { + class TcpClient: public Ui_TcpClient {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_TCPCLIENT_H diff --git a/chat/ui_tcpserver.h b/chat/ui_tcpserver.h new file mode 100644 index 00000000..25409cfe --- /dev/null +++ b/chat/ui_tcpserver.h @@ -0,0 +1,85 @@ +/******************************************************************************** +** Form generated from reading UI file 'tcpserver.ui' +** +** Created: Wed Dec 12 17:03:40 2012 +** by: Qt User Interface Compiler version 4.7.0 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_TCPSERVER_H +#define UI_TCPSERVER_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_TcpServer +{ +public: + QProgressBar *progressBar; + QLabel *serverStatusLabel; + QPushButton *serverOpenBtn; + QPushButton *serverCloseBtn; + QPushButton *serverSendBtn; + + void setupUi(QDialog *TcpServer) + { + if (TcpServer->objectName().isEmpty()) + TcpServer->setObjectName(QString::fromUtf8("TcpServer")); + TcpServer->resize(350, 180); + progressBar = new QProgressBar(TcpServer); + progressBar->setObjectName(QString::fromUtf8("progressBar")); + progressBar->setGeometry(QRect(30, 90, 291, 23)); + progressBar->setValue(0); + serverStatusLabel = new QLabel(TcpServer); + serverStatusLabel->setObjectName(QString::fromUtf8("serverStatusLabel")); + serverStatusLabel->setGeometry(QRect(10, 10, 331, 71)); + QFont font; + font.setFamily(QString::fromUtf8("Agency FB")); + font.setPointSize(12); + font.setBold(true); + font.setWeight(75); + serverStatusLabel->setFont(font); + serverStatusLabel->setAlignment(Qt::AlignCenter); + serverOpenBtn = new QPushButton(TcpServer); + serverOpenBtn->setObjectName(QString::fromUtf8("serverOpenBtn")); + serverOpenBtn->setGeometry(QRect(60, 140, 75, 23)); + serverCloseBtn = new QPushButton(TcpServer); + serverCloseBtn->setObjectName(QString::fromUtf8("serverCloseBtn")); + serverCloseBtn->setGeometry(QRect(240, 140, 75, 23)); + serverSendBtn = new QPushButton(TcpServer); + serverSendBtn->setObjectName(QString::fromUtf8("serverSendBtn")); + serverSendBtn->setGeometry(QRect(150, 140, 75, 23)); + + retranslateUi(TcpServer); + + QMetaObject::connectSlotsByName(TcpServer); + } // setupUi + + void retranslateUi(QDialog *TcpServer) + { + TcpServer->setWindowTitle(QApplication::translate("TcpServer", "\346\226\207\344\273\266\344\274\240\351\200\201", 0)); + serverStatusLabel->setText(QApplication::translate("TcpServer", "\350\257\267\351\200\211\346\213\251\350\246\201\345\217\221\351\200\201\347\232\204\346\226\207\344\273\266\357\274\201", 0)); + serverOpenBtn->setText(QApplication::translate("TcpServer", "\346\211\223\345\274\200", 0)); + serverCloseBtn->setText(QApplication::translate("TcpServer", "\351\200\200\345\207\272", 0)); + serverSendBtn->setText(QApplication::translate("TcpServer", "\345\217\221\351\200\201", 0)); + } // retranslateUi + +}; + +namespace Ui { + class TcpServer: public Ui_TcpServer {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_TCPSERVER_H diff --git a/chat/ui_widget.h b/chat/ui_widget.h new file mode 100644 index 00000000..2f75effd --- /dev/null +++ b/chat/ui_widget.h @@ -0,0 +1,387 @@ +/******************************************************************************** +** Form generated from reading UI file 'widget.ui' +** +** Created: Fri Jan 25 10:34:25 2013 +** by: Qt User Interface Compiler version 4.7.0 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_WIDGET_H +#define UI_WIDGET_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_Widget +{ +public: + QHBoxLayout *horizontalLayout_4; + QVBoxLayout *verticalLayout; + QTextBrowser *textBrowser; + QHBoxLayout *horizontalLayout; + QFontComboBox *fontComboBox; + QComboBox *fontsizecomboBox; + QToolButton *textbold; + QToolButton *textitalic; + QToolButton *textUnderline; + QToolButton *textcolor; + QToolButton *sendfile; + QToolButton *save; + QToolButton *clear; + QTextEdit *textEdit; + QHBoxLayout *horizontalLayout_2; + QLabel *label; + QSpacerItem *horizontalSpacer; + QPushButton *close; + QPushButton *send; + QGridLayout *gridLayout; + QTableWidget *tableWidget; + QHBoxLayout *horizontalLayout_3; + QLabel *onlineUser; + QSpacerItem *horizontalSpacer_2; + QLabel *label_2; + + void setupUi(QWidget *Widget) + { + if (Widget->objectName().isEmpty()) + Widget->setObjectName(QString::fromUtf8("Widget")); + Widget->resize(788, 468); + horizontalLayout_4 = new QHBoxLayout(Widget); + horizontalLayout_4->setSpacing(6); + horizontalLayout_4->setContentsMargins(1, 1, 1, 1); + horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4")); + verticalLayout = new QVBoxLayout(); + verticalLayout->setSpacing(6); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setSizeConstraint(QLayout::SetDefaultConstraint); + textBrowser = new QTextBrowser(Widget); + textBrowser->setObjectName(QString::fromUtf8("textBrowser")); + QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(2); + sizePolicy.setHeightForWidth(textBrowser->sizePolicy().hasHeightForWidth()); + textBrowser->setSizePolicy(sizePolicy); + textBrowser->setFrameShadow(QFrame::Sunken); + textBrowser->setOpenExternalLinks(false); + + verticalLayout->addWidget(textBrowser); + + horizontalLayout = new QHBoxLayout(); + horizontalLayout->setSpacing(6); + horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + fontComboBox = new QFontComboBox(Widget); + fontComboBox->setObjectName(QString::fromUtf8("fontComboBox")); + QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Fixed); + sizePolicy1.setHorizontalStretch(0); + sizePolicy1.setVerticalStretch(0); + sizePolicy1.setHeightForWidth(fontComboBox->sizePolicy().hasHeightForWidth()); + fontComboBox->setSizePolicy(sizePolicy1); + fontComboBox->setMinimumSize(QSize(1, 25)); + + horizontalLayout->addWidget(fontComboBox); + + fontsizecomboBox = new QComboBox(Widget); + fontsizecomboBox->setObjectName(QString::fromUtf8("fontsizecomboBox")); + QSizePolicy sizePolicy2(QSizePolicy::Fixed, QSizePolicy::Maximum); + sizePolicy2.setHorizontalStretch(0); + sizePolicy2.setVerticalStretch(0); + sizePolicy2.setHeightForWidth(fontsizecomboBox->sizePolicy().hasHeightForWidth()); + fontsizecomboBox->setSizePolicy(sizePolicy2); + fontsizecomboBox->setMinimumSize(QSize(0, 25)); + fontsizecomboBox->setEditable(true); + + horizontalLayout->addWidget(fontsizecomboBox); + + textbold = new QToolButton(Widget); + textbold->setObjectName(QString::fromUtf8("textbold")); + textbold->setAutoFillBackground(false); + QIcon icon; + icon.addFile(QString::fromUtf8(":/image/textbold.png"), QSize(), QIcon::Normal, QIcon::Off); + textbold->setIcon(icon); + textbold->setIconSize(QSize(24, 24)); + textbold->setCheckable(true); + textbold->setAutoRaise(true); + + horizontalLayout->addWidget(textbold); + + textitalic = new QToolButton(Widget); + textitalic->setObjectName(QString::fromUtf8("textitalic")); + textitalic->setAutoFillBackground(false); + QIcon icon1; + icon1.addFile(QString::fromUtf8(":/image/textitalic.png"), QSize(), QIcon::Normal, QIcon::Off); + textitalic->setIcon(icon1); + textitalic->setIconSize(QSize(24, 24)); + textitalic->setCheckable(true); + textitalic->setAutoRaise(true); + + horizontalLayout->addWidget(textitalic); + + textUnderline = new QToolButton(Widget); + textUnderline->setObjectName(QString::fromUtf8("textUnderline")); + textUnderline->setAutoFillBackground(false); + QIcon icon2; + icon2.addFile(QString::fromUtf8(":/image/textunder.png"), QSize(), QIcon::Normal, QIcon::Off); + textUnderline->setIcon(icon2); + textUnderline->setIconSize(QSize(24, 24)); + textUnderline->setCheckable(true); + textUnderline->setAutoRaise(true); + + horizontalLayout->addWidget(textUnderline); + + textcolor = new QToolButton(Widget); + textcolor->setObjectName(QString::fromUtf8("textcolor")); + textcolor->setAutoFillBackground(false); + QIcon icon3; + icon3.addFile(QString::fromUtf8(":/image/textcolor.png"), QSize(), QIcon::Normal, QIcon::Off); + textcolor->setIcon(icon3); + textcolor->setIconSize(QSize(24, 24)); + textcolor->setCheckable(false); + textcolor->setAutoRaise(true); + + horizontalLayout->addWidget(textcolor); + + sendfile = new QToolButton(Widget); + sendfile->setObjectName(QString::fromUtf8("sendfile")); + sendfile->setAutoFillBackground(false); + QIcon icon4; + icon4.addFile(QString::fromUtf8(":/image/fileopen.png"), QSize(), QIcon::Normal, QIcon::Off); + sendfile->setIcon(icon4); + sendfile->setIconSize(QSize(24, 24)); + sendfile->setCheckable(false); + sendfile->setAutoRaise(true); + + horizontalLayout->addWidget(sendfile); + + save = new QToolButton(Widget); + save->setObjectName(QString::fromUtf8("save")); + save->setAutoFillBackground(false); + QIcon icon5; + icon5.addFile(QString::fromUtf8(":/image/Floppy.png"), QSize(), QIcon::Normal, QIcon::Off); + save->setIcon(icon5); + save->setIconSize(QSize(24, 24)); + save->setCheckable(false); + save->setAutoRaise(true); + + horizontalLayout->addWidget(save); + + clear = new QToolButton(Widget); + clear->setObjectName(QString::fromUtf8("clear")); + clear->setAutoFillBackground(false); + QIcon icon6; + icon6.addFile(QString::fromUtf8(":/image/Bin (empty).png"), QSize(), QIcon::Normal, QIcon::Off); + clear->setIcon(icon6); + clear->setIconSize(QSize(24, 24)); + clear->setCheckable(false); + clear->setAutoRaise(true); + + horizontalLayout->addWidget(clear); + + + verticalLayout->addLayout(horizontalLayout); + + textEdit = new QTextEdit(Widget); + textEdit->setObjectName(QString::fromUtf8("textEdit")); + QSizePolicy sizePolicy3(QSizePolicy::Expanding, QSizePolicy::Maximum); + sizePolicy3.setHorizontalStretch(0); + sizePolicy3.setVerticalStretch(1); + sizePolicy3.setHeightForWidth(textEdit->sizePolicy().hasHeightForWidth()); + textEdit->setSizePolicy(sizePolicy3); + QFont font; + font.setFamily(QString::fromUtf8("\345\256\213\344\275\223")); + font.setPointSize(12); + textEdit->setFont(font); + + verticalLayout->addWidget(textEdit); + + horizontalLayout_2 = new QHBoxLayout(); + horizontalLayout_2->setSpacing(6); + horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + label = new QLabel(Widget); + label->setObjectName(QString::fromUtf8("label")); + label->setMinimumSize(QSize(121, 0)); + label->setTextFormat(Qt::RichText); + label->setAlignment(Qt::AlignCenter); + label->setOpenExternalLinks(true); + + horizontalLayout_2->addWidget(label); + + horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_2->addItem(horizontalSpacer); + + close = new QPushButton(Widget); + close->setObjectName(QString::fromUtf8("close")); + close->setMinimumSize(QSize(100, 25)); + + horizontalLayout_2->addWidget(close); + + send = new QPushButton(Widget); + send->setObjectName(QString::fromUtf8("send")); + send->setMinimumSize(QSize(100, 25)); + + horizontalLayout_2->addWidget(send); + + + verticalLayout->addLayout(horizontalLayout_2); + + + horizontalLayout_4->addLayout(verticalLayout); + + gridLayout = new QGridLayout(); + gridLayout->setSpacing(6); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + tableWidget = new QTableWidget(Widget); + if (tableWidget->columnCount() < 3) + tableWidget->setColumnCount(3); + QIcon icon7; + icon7.addFile(QString::fromUtf8(":/image/User.png"), QSize(), QIcon::Normal, QIcon::On); + QTableWidgetItem *__qtablewidgetitem = new QTableWidgetItem(); + __qtablewidgetitem->setIcon(icon7); + tableWidget->setHorizontalHeaderItem(0, __qtablewidgetitem); + QTableWidgetItem *__qtablewidgetitem1 = new QTableWidgetItem(); + tableWidget->setHorizontalHeaderItem(1, __qtablewidgetitem1); + QTableWidgetItem *__qtablewidgetitem2 = new QTableWidgetItem(); + tableWidget->setHorizontalHeaderItem(2, __qtablewidgetitem2); + tableWidget->setObjectName(QString::fromUtf8("tableWidget")); + tableWidget->setFrameShape(QFrame::StyledPanel); + tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers); + tableWidget->setSelectionMode(QAbstractItemView::SingleSelection); + tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows); + tableWidget->setShowGrid(false); + + gridLayout->addWidget(tableWidget, 0, 0, 1, 1); + + horizontalLayout_3 = new QHBoxLayout(); + horizontalLayout_3->setSpacing(6); + horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); + onlineUser = new QLabel(Widget); + onlineUser->setObjectName(QString::fromUtf8("onlineUser")); + QSizePolicy sizePolicy4(QSizePolicy::Fixed, QSizePolicy::Preferred); + sizePolicy4.setHorizontalStretch(0); + sizePolicy4.setVerticalStretch(0); + sizePolicy4.setHeightForWidth(onlineUser->sizePolicy().hasHeightForWidth()); + onlineUser->setSizePolicy(sizePolicy4); + + horizontalLayout_3->addWidget(onlineUser); + + horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_3->addItem(horizontalSpacer_2); + + label_2 = new QLabel(Widget); + label_2->setObjectName(QString::fromUtf8("label_2")); + + horizontalLayout_3->addWidget(label_2); + + + gridLayout->addLayout(horizontalLayout_3, 1, 0, 1, 1); + + + horizontalLayout_4->addLayout(gridLayout); + + + retranslateUi(Widget); + + fontsizecomboBox->setCurrentIndex(3); + + + QMetaObject::connectSlotsByName(Widget); + } // setupUi + + void retranslateUi(QWidget *Widget) + { + Widget->setWindowTitle(QApplication::translate("Widget", "\345\261\200\345\237\237\347\275\221\350\201\212\345\244\251\345\256\244", 0)); + fontsizecomboBox->clear(); + fontsizecomboBox->insertItems(0, QStringList() + << QApplication::translate("Widget", "9", 0) + << QApplication::translate("Widget", "10", 0) + << QApplication::translate("Widget", "11", 0) + << QApplication::translate("Widget", "12", 0) + << QApplication::translate("Widget", "13", 0) + << QApplication::translate("Widget", "14", 0) + << QApplication::translate("Widget", "15", 0) + << QApplication::translate("Widget", "16", 0) + << QApplication::translate("Widget", "17", 0) + << QApplication::translate("Widget", "18", 0) + << QApplication::translate("Widget", "19", 0) + << QApplication::translate("Widget", "20", 0) + << QApplication::translate("Widget", "21", 0) + << QApplication::translate("Widget", "22", 0) + ); +#ifndef QT_NO_TOOLTIP + textbold->setToolTip(QApplication::translate("Widget", "\345\212\240\347\262\227", 0)); +#endif // QT_NO_TOOLTIP + textbold->setText(QApplication::translate("Widget", "...", 0)); +#ifndef QT_NO_TOOLTIP + textitalic->setToolTip(QApplication::translate("Widget", "\345\200\276\346\226\234", 0)); +#endif // QT_NO_TOOLTIP + textitalic->setText(QApplication::translate("Widget", "...", 0)); +#ifndef QT_NO_TOOLTIP + textUnderline->setToolTip(QApplication::translate("Widget", "\344\270\213\345\210\222\347\272\277", 0)); +#endif // QT_NO_TOOLTIP + textUnderline->setText(QApplication::translate("Widget", "...", 0)); +#ifndef QT_NO_TOOLTIP + textcolor->setToolTip(QApplication::translate("Widget", "\345\255\227\344\275\223\351\242\234\350\211\262", 0)); +#endif // QT_NO_TOOLTIP + textcolor->setText(QApplication::translate("Widget", "...", 0)); +#ifndef QT_NO_TOOLTIP + sendfile->setToolTip(QApplication::translate("Widget", "\344\274\240\351\200\201\346\226\207\344\273\266", 0)); +#endif // QT_NO_TOOLTIP + sendfile->setText(QApplication::translate("Widget", "...", 0)); +#ifndef QT_NO_TOOLTIP + save->setToolTip(QApplication::translate("Widget", "\344\277\235\345\255\230\350\201\212\345\244\251\350\256\260\345\275\225", 0)); +#endif // QT_NO_TOOLTIP + save->setText(QApplication::translate("Widget", "...", 0)); +#ifndef QT_NO_TOOLTIP + clear->setToolTip(QApplication::translate("Widget", "\346\270\205\347\251\272\350\201\212\345\244\251\350\256\260\345\275\225", 0)); +#endif // QT_NO_TOOLTIP + clear->setText(QApplication::translate("Widget", "...", 0)); + textEdit->setHtml(QApplication::translate("Widget", "\n" +"\n" +"

", 0)); + label->setText(QApplication::translate("Widget", "www.bcwhy.com", 0)); + close->setText(QApplication::translate("Widget", "\345\205\263\351\227\255(&C)", 0)); + send->setText(QApplication::translate("Widget", "\345\217\221\351\200\201(&S)", 0)); + QTableWidgetItem *___qtablewidgetitem = tableWidget->horizontalHeaderItem(0); + ___qtablewidgetitem->setText(QApplication::translate("Widget", "\347\224\250\346\210\267\345\220\215", 0)); + QTableWidgetItem *___qtablewidgetitem1 = tableWidget->horizontalHeaderItem(1); + ___qtablewidgetitem1->setText(QApplication::translate("Widget", "\344\270\273\346\234\272\345\220\215", 0)); + QTableWidgetItem *___qtablewidgetitem2 = tableWidget->horizontalHeaderItem(2); + ___qtablewidgetitem2->setText(QApplication::translate("Widget", "IP\345\234\260\345\235\200", 0)); +#ifndef QT_NO_TOOLTIP + tableWidget->setToolTip(QApplication::translate("Widget", "\345\234\250\347\272\277\347\224\250\346\210\267\344\277\241\346\201\257\345\210\227\350\241\250", 0)); +#endif // QT_NO_TOOLTIP + onlineUser->setText(QApplication::translate("Widget", "\345\234\250\347\272\277\347\224\250\346\210\267\357\274\2320\344\272\272", 0)); + label_2->setText(QApplication::translate("Widget", "bcwhy\345\210\266\344\275\234", 0)); + } // retranslateUi + +}; + +namespace Ui { + class Widget: public Ui_Widget {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_WIDGET_H diff --git a/chat/widget.cpp b/chat/widget.cpp new file mode 100644 index 00000000..c5d904c5 --- /dev/null +++ b/chat/widget.cpp @@ -0,0 +1,447 @@ +#include "widget.h" +#include "ui_widget.h" + +#include +#include +#include +#include + +Widget::Widget(QWidget *parent) : + QWidget(parent), + ui(new Ui::Widget) +{ + ui->setupUi(this); + ui->label->setText(" www.bcwhy.com "); + this->resize(850,550); + ui->textEdit->setFocusPolicy(Qt::StrongFocus); + ui->textBrowser->setFocusPolicy(Qt::NoFocus); + + ui->textEdit->setFocus(); + ui->textEdit->installEventFilter(this); + + udpSocket = new QUdpSocket(this); + port = 45454; + udpSocket->bind(port,QUdpSocket::ShareAddress + | QUdpSocket::ReuseAddressHint); + connect(udpSocket,SIGNAL(readyRead()),this,SLOT(processPendingDatagrams())); + sendMessage(NewParticipant); + + server = new TcpServer(this); + connect(server,SIGNAL(sendFileName(QString)),this,SLOT(sentFileName(QString))); + connect(ui->textEdit,SIGNAL(currentCharFormatChanged(QTextCharFormat)),this,SLOT(currentFormatChanged(const QTextCharFormat))); +} + +void Widget::currentFormatChanged(const QTextCharFormat &format) +{ + //当编辑器的字体格式改变时,我们让部件状态也随之改变 + ui->fontComboBox->setCurrentFont(format.font()); + + //如果字体大小出错,因为我们最小的字体为9 + if(format.fontPointSize()<9) + { + ui->fontsizecomboBox->setCurrentIndex(3); + } + else + { + //即显示12 + ui->fontsizecomboBox->setCurrentIndex( + ui->fontsizecomboBox->findText(QString::number(format.fontPointSize()))); + } + + ui->textbold->setChecked(format.font().bold()); + ui->textitalic->setChecked(format.font().italic()); + ui->textUnderline->setChecked(format.font().underline()); + color = format.foreground().color(); +} + +//接收数据UDP +void Widget::processPendingDatagrams() +{ + while(udpSocket->hasPendingDatagrams()) + { + QByteArray datagram; + datagram.resize(udpSocket->pendingDatagramSize()); + udpSocket->readDatagram(datagram.data(),datagram.size()); + QDataStream in(&datagram,QIODevice::ReadOnly); + int messageType; + in >> messageType; + QString userName,localHostName,ipAddress,message; + QString time = QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"); + switch(messageType) + { + case Message: + { + in >>userName >>localHostName >>ipAddress >>message; + ui->textBrowser->setTextColor(Qt::blue); + ui->textBrowser->setCurrentFont(QFont("Times New Roman",12)); + ui->textBrowser->append("[ " +userName+" ] "+ time); + ui->textBrowser->append(message); + break; + } + case NewParticipant: + { + in >>userName >>localHostName >>ipAddress; + newParticipant(userName,localHostName,ipAddress); + + break; + } + case ParticipantLeft: + { + in >>userName >>localHostName; + participantLeft(userName,localHostName,time); + break; + } + case FileName: + { + in >>userName >>localHostName >> ipAddress; + QString clientAddress,fileName; + in >> clientAddress >> fileName; + hasPendingFile(userName,ipAddress,clientAddress,fileName); + break; + } + case Refuse: + { + in >> userName >> localHostName; + QString serverAddress; + in >> serverAddress; + QString ipAddress = getIP(); + + if(ipAddress == serverAddress) + { + server->refused(); + } + break; + } + } + } +} + +//处理新用户加入 +void Widget::newParticipant(QString userName,QString localHostName,QString ipAddress) +{ + bool bb = ui->tableWidget->findItems(localHostName,Qt::MatchExactly).isEmpty(); + if(bb) + { + QTableWidgetItem *user = new QTableWidgetItem(userName); + QTableWidgetItem *host = new QTableWidgetItem(localHostName); + QTableWidgetItem *ip = new QTableWidgetItem(ipAddress); + ui->tableWidget->insertRow(0); + ui->tableWidget->setItem(0,0,user); + ui->tableWidget->setItem(0,1,host); + ui->tableWidget->setItem(0,2,ip); + ui->textBrowser->setTextColor(Qt::gray); + ui->textBrowser->setCurrentFont(QFont("Times New Roman",10)); + ui->textBrowser->append(QStringLiteral("%1 在线!").arg(userName)); + ui->onlineUser->setText(QStringLiteral("在线人数:%1").arg(ui->tableWidget->rowCount())); + sendMessage(NewParticipant); + } +} + +//处理用户离开 +void Widget::participantLeft(QString userName,QString localHostName,QString time) +{ + int rowNum = ui->tableWidget->findItems(localHostName,Qt::MatchExactly).first()->row(); + ui->tableWidget->removeRow(rowNum); + ui->textBrowser->setTextColor(Qt::gray); + ui->textBrowser->setCurrentFont(QFont("Times New Roman",10)); + ui->textBrowser->append(QStringLiteral("%1 于 %2 离开!").arg(userName).arg(time)); + ui->onlineUser->setText(QStringLiteral("在线人数:%1").arg(ui->tableWidget->rowCount())); +} + +Widget::~Widget() +{ + delete ui; +} + +void Widget::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +//获取ip地址 +QString Widget::getIP() +{ + QList list = QNetworkInterface::allAddresses(); + + foreach (QHostAddress address, list) + { + //我们使用IPv4地址 + if(address.protocol() == QAbstractSocket::IPv4Protocol) + { + return address.toString(); + } + } + + return 0; +} + +//发送信息 +void Widget::sendMessage(MessageType type, QString serverAddress) +{ + QByteArray data; + QDataStream out(&data,QIODevice::WriteOnly); + QString localHostName = QHostInfo::localHostName(); + QString address = getIP(); + out << type << getUserName() << localHostName; + + + switch(type) + { + case ParticipantLeft: + { + break; + } + case NewParticipant: + { + out << address; + break; + } + + case Message : + { + if(ui->textEdit->toPlainText() == "") + { + QMessageBox::warning(0,QStringLiteral("警告"),QStringLiteral("发送内容不能为空"),QMessageBox::Ok); + return; + } + out << address << getMessage(); + ui->textBrowser->verticalScrollBar()->setValue(ui->textBrowser->verticalScrollBar()->maximum()); + break; + + } + case FileName: + { + int row = ui->tableWidget->currentRow(); + QString clientAddress = ui->tableWidget->item(row,2)->text(); + out << address << clientAddress << fileName; + break; + } + case Refuse: + { + out << serverAddress; + break; + } + } + udpSocket->writeDatagram(data,data.length(),QHostAddress::Broadcast, port); + +} + +//获取用户名 +QString Widget::getUserName() +{ + QStringList envVariables; + envVariables << "USERNAME.*" << "USER.*" << "USERDOMAIN.*" + << "HOSTNAME.*" << "DOMAINNAME.*"; + QStringList environment = QProcess::systemEnvironment(); + + foreach (QString string, envVariables) + { + int index = environment.indexOf(QRegExp(string)); + + if (index != -1) + { + QStringList stringList = environment.at(index).split('='); + + if (stringList.size() == 2) + { + return stringList.at(1); + break; + } + } + } + return false; +} + +//获得要发送的信息 +QString Widget::getMessage() +{ + QString msg = ui->textEdit->toHtml(); + + ui->textEdit->clear(); + ui->textEdit->setFocus(); + return msg; +} + +void Widget::closeEvent(QCloseEvent *) +{ + sendMessage(ParticipantLeft); +} + +void Widget::sentFileName(QString fileName) +{ + this->fileName = fileName; + sendMessage(FileName); +} + +//接收文件 +void Widget::hasPendingFile(QString userName,QString serverAddress, + QString clientAddress,QString fileName) +{ + QString ipAddress = getIP(); + + if(ipAddress == clientAddress) + { + int btn = QMessageBox::information(this,QStringLiteral("接受文件"), + QStringLiteral("来自%1(%2)的文件:%3,是否接收?") + .arg(userName).arg(serverAddress).arg(fileName), + QMessageBox::Yes,QMessageBox::No); + if(btn == QMessageBox::Yes) + { + QString name = QFileDialog::getSaveFileName(0,QStringLiteral("保存文件"),fileName); + + if(!name.isEmpty()) + { + TcpClient *client = new TcpClient(this); + client->setFileName(name); + client->setHostAddress(QHostAddress(serverAddress)); + client->show(); + } + } + else + { + sendMessage(Refuse,serverAddress); + } + } +} + +//发送 +void Widget::on_send_clicked() +{ + sendMessage(Message); +} + +void Widget::on_sendfile_clicked() +{ + if(ui->tableWidget->selectedItems().isEmpty()) + { + QMessageBox::warning(0,QStringLiteral("选择用户"),QStringLiteral("请先从用户列表选择要传送的用户!"),QMessageBox::Ok); + return; + } + + server->show(); + server->initServer(); +} + +//关闭 +void Widget::on_close_clicked() +{ + this->close(); +} + +bool Widget::eventFilter(QObject *target, QEvent *event) +{ + if(target == ui->textEdit) + { + if(event->type() == QEvent::KeyPress) + { + QKeyEvent *k = static_cast(event); + + if(k->key() == Qt::Key_Return) + { + on_send_clicked(); + return true; + } + } + } + + return QWidget::eventFilter(target,event); +} + +//字体设置 +void Widget::on_fontComboBox_currentFontChanged(QFont f) +{ + ui->textEdit->setCurrentFont(f); + ui->textEdit->setFocus(); +} + +void Widget::on_fontsizecomboBox_currentIndexChanged(QString size) +{ + ui->textEdit->setFontPointSize(size.toDouble()); + ui->textEdit->setFocus(); +} + +void Widget::on_textbold_clicked(bool checked) +{ + if(checked) + ui->textEdit->setFontWeight(QFont::Bold); + else + ui->textEdit->setFontWeight(QFont::Normal); + ui->textEdit->setFocus(); +} + +void Widget::on_textitalic_clicked(bool checked) +{ + ui->textEdit->setFontItalic(checked); + ui->textEdit->setFocus(); +} + +void Widget::on_textUnderline_clicked(bool checked) +{ + ui->textEdit->setFontUnderline(checked); + ui->textEdit->setFocus(); +} + +void Widget::on_textcolor_clicked() +{ + color = QColorDialog::getColor(color,this); + if(color.isValid()) + { + ui->textEdit->setTextColor(color); + ui->textEdit->setFocus(); + } +} + +//保存聊天记录 +void Widget::on_save_clicked() +{ + if(ui->textBrowser->document()->isEmpty()) + { + QMessageBox::warning(0, + QStringLiteral("警告"), + QStringLiteral("聊天记录为空,无法保存!"), + QMessageBox::Ok); + } + else + { + //获得文件名 + QString fileName = QFileDialog::getSaveFileName(this, + QStringLiteral("保存聊天记录"), + QStringLiteral("聊天记录"), + QStringLiteral("文本(*.txt);;All File(*.*)")); + if(!fileName.isEmpty()) + { + saveFile(fileName); + } + } +} + +bool Widget::saveFile(const QString &fileName)//保存文件 +{ + QFile file(fileName); + + if(!file.open(QFile::WriteOnly | QFile::Text)) + { + QMessageBox::warning(this,QStringLiteral("保存文件"), + QStringLiteral("无法保存文件 %1:\n %2").arg(fileName) + .arg(file.errorString())); + return false; + } + + QTextStream out(&file); + + out << ui->textBrowser->toPlainText(); + + return true; +} + +void Widget::on_clear_clicked()//清空聊天记录 +{ + ui->textBrowser->clear(); +} diff --git a/chat/widget.h b/chat/widget.h new file mode 100644 index 00000000..99d71370 --- /dev/null +++ b/chat/widget.h @@ -0,0 +1,67 @@ +#ifndef WIDGET_H +#define WIDGET_H + +#include +#include +#include +#include "tcpclient.h" +#include "tcpserver.h" +namespace Ui { + class Widget; +} + +enum MessageType{Message,NewParticipant,ParticipantLeft,FileName,Refuse}; +//枚举变量标志信息的类型,分别为消息,新用户加入,和用户退出 +class Widget : public QWidget +{ + Q_OBJECT + +public: + explicit Widget(QWidget *parent = 0); + ~Widget(); + QString getUserName(); + QString getMessage(); + +protected: + void changeEvent(QEvent *e); + void sendMessage(MessageType type,QString serverAddress=""); + void newParticipant(QString userName,QString localHostName,QString ipAddress); + void participantLeft(QString userName,QString localHostName,QString time); + void closeEvent(QCloseEvent *); + void hasPendingFile(QString userName,QString serverAddress, + QString clientAddress,QString fileName); + + bool eventFilter(QObject *target, QEvent *event);//事件过滤器 +private: + Ui::Widget *ui; + QUdpSocket *udpSocket; + qint16 port; + QString fileName; + TcpServer *server; + + QString getIP(); + + QColor color;//颜色 + + bool saveFile(const QString& fileName);//保存聊天记录 +private slots: + + void on_textUnderline_clicked(bool checked); + void on_clear_clicked(); + void on_save_clicked(); + + void on_textcolor_clicked(); + void on_textitalic_clicked(bool checked); + void on_textbold_clicked(bool checked); + void on_fontComboBox_currentFontChanged(QFont f); + void on_fontsizecomboBox_currentIndexChanged(QString ); + void on_close_clicked(); + void on_sendfile_clicked(); + void on_send_clicked(); + void processPendingDatagrams(); + void sentFileName(QString); + void currentFormatChanged(const QTextCharFormat &format); + +}; + +#endif // WIDGET_H diff --git a/chat/widget.ui b/chat/widget.ui new file mode 100644 index 00000000..974d6c9c --- /dev/null +++ b/chat/widget.ui @@ -0,0 +1,539 @@ + + + Widget + + + + 0 + 0 + 788 + 468 + + + + 灞鍩熺綉鑱婂ぉ瀹 + + + + 1 + + + + + 6 + + + QLayout::SetDefaultConstraint + + + + + + 0 + 2 + + + + QFrame::Sunken + + + false + + + + + + + + + + 0 + 0 + + + + + 1 + 25 + + + + + + + + + 0 + 0 + + + + + 0 + 25 + + + + true + + + 3 + + + + 9 + + + + + 10 + + + + + 11 + + + + + 12 + + + + + 13 + + + + + 14 + + + + + 15 + + + + + 16 + + + + + 17 + + + + + 18 + + + + + 19 + + + + + 20 + + + + + 21 + + + + + 22 + + + + + + + + 鍔犵矖 + + + false + + + ... + + + + :/image/textbold.png:/image/textbold.png + + + + 24 + 24 + + + + true + + + true + + + + + + + 鍊炬枩 + + + false + + + ... + + + + :/image/textitalic.png:/image/textitalic.png + + + + 24 + 24 + + + + true + + + true + + + + + + + 涓嬪垝绾 + + + false + + + ... + + + + :/image/textunder.png:/image/textunder.png + + + + 24 + 24 + + + + true + + + true + + + + + + + 瀛椾綋棰滆壊 + + + false + + + ... + + + + :/image/textcolor.png:/image/textcolor.png + + + + 24 + 24 + + + + false + + + true + + + + + + + 浼犻佹枃浠 + + + false + + + ... + + + + :/image/fileopen.png:/image/fileopen.png + + + + 24 + 24 + + + + false + + + true + + + + + + + 淇濆瓨鑱婂ぉ璁板綍 + + + false + + + ... + + + + :/image/Floppy.png:/image/Floppy.png + + + + 24 + 24 + + + + false + + + true + + + + + + + 娓呯┖鑱婂ぉ璁板綍 + + + false + + + ... + + + + :/image/Bin (empty).png:/image/Bin (empty).png + + + + 24 + 24 + + + + false + + + true + + + + + + + + + + 0 + 1 + + + + + 瀹嬩綋 + 12 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'瀹嬩綋'; font-size:12pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html> + + + + + + + + + + 121 + 0 + + + + www.bcwhy.com + + + Qt::RichText + + + Qt::AlignCenter + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 100 + 25 + + + + 鍏抽棴(&C) + + + + + + + + 100 + 25 + + + + 鍙戦(&S) + + + + + + + + + + + + + 鍦ㄧ嚎鐢ㄦ埛淇℃伅鍒楄〃 + + + QFrame::StyledPanel + + + QAbstractItemView::NoEditTriggers + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + false + + + + 鐢ㄦ埛鍚 + + + + :/image/User.png + + + + + + 涓绘満鍚 + + + + + IP鍦板潃 + + + + + + + + + + + 0 + 0 + + + + 鍦ㄧ嚎鐢ㄦ埛锛0浜 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + bcwhy鍒朵綔 + + + + + + + + + + + + + + + diff --git a/imsclient/imsclient.sln b/imsclient/imsclient.sln new file mode 100644 index 00000000..07e530fa --- /dev/null +++ b/imsclient/imsclient.sln @@ -0,0 +1,22 @@ +锘 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.24720.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imsclient", "imsclient\imsclient.vcxproj", "{217E926B-8681-47A8-99CC-5320B4749B2A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {217E926B-8681-47A8-99CC-5320B4749B2A}.Debug|Win32.ActiveCfg = Debug|Win32 + {217E926B-8681-47A8-99CC-5320B4749B2A}.Debug|Win32.Build.0 = Debug|Win32 + {217E926B-8681-47A8-99CC-5320B4749B2A}.Release|Win32.ActiveCfg = Release|Win32 + {217E926B-8681-47A8-99CC-5320B4749B2A}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/imsclient/imsclient/Resources/cityid.xml b/imsclient/imsclient/Resources/cityid.xml new file mode 100644 index 00000000..76b17336 --- /dev/null +++ b/imsclient/imsclient/Resources/cityid.xml @@ -0,0 +1,3535 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/imsclient/imsclient/Resources/theme.css b/imsclient/imsclient/Resources/theme.css new file mode 100644 index 00000000..2bdaa90b --- /dev/null +++ b/imsclient/imsclient/Resources/theme.css @@ -0,0 +1,315 @@ +QWidget#UiWeatherInfo +{ + border-image:url(:/WorkStation/Resources/theme/interface/weather-back.png) 0 0 0 0 stretch stretch; +} + +QLabel#labelRegister +{ + background-image:url(:/WorkStation/Resources/theme/login/zhuce.png) 0 0 0 0 stretch stretch; +} + +QLabel#labelRegister:hover +{ + background-image:url(:/WorkStation/Resources/theme/login/zhuce_hover.png) 0 0 0 0 stretch stretch; +} + +QLabel#labelRegister:pressed +{ + background-image:url(:/WorkStation/Resources/theme/login/zhuce_press.png) 0 0 0 0 stretch stretch; +} + +QLabel#labelForget +{ + background-image:url(:/WorkStation/Resources/theme/login/mima.png) 0 0 0 0 stretch stretch; +} + +QLabel#labelForget:hover +{ + background-image:url(:/WorkStation/Resources/theme/login/mima_hover.png) 0 0 0 0 stretch stretch; +} + +QLabel#labelForget:pressed +{ + background-image:url(:/WorkStation/Resources/theme/login/mima_press.png) 0 0 0 0 stretch stretch; +} + +QLabel#labelTwo +{ + border-image:url(:/WorkStation/Resources/theme/login/corner_right_normal_down.png) 0 0 0 0 stretch stretch; +} + +QLabel#labelTwo:hover +{ + border-image:url(:/WorkStation/Resources/theme/login/corner_right_hover.png) 0 0 0 0 stretch stretch; +} + +QLabel#labelTwo:pressed +{ + border-image:url(:/WorkStation/Resources/theme/login/corner_right_normal_down.png) 0 0 0 0 stretch stretch; +} + +QLabel#labelMoreAccount +{ + border-image:url(:/WorkStation/Resources/theme/login/corner_back.png) 0 0 0 0 stretch stretch; +} + +QLabel#labelMoreAccount:hover +{ + border-image:url(:/WorkStation/Resources/theme/login/corner_back_hover.png) 0 0 0 0 stretch stretch; +} + +QLabel#labelMoreAccount:pressed +{ + border-image:url(:/WorkStation/Resources/theme/login/corner_back_press.png) 0 0 0 0 stretch stretch; +} + +QLabel#imageLabel +{ + border-color: rgb(0,88,152); + background-color: rgba(97%,80%,9%,50%); +} + +QLineEdit +{ + border-image:url(:/WorkStation/Resources/theme/login/inputbox.png) 0 0 0 0 stretch stretch; +} + +QLineEdit:hover +{ + border-image:url(:/WorkStation/Resources/theme/login/inputbox_hover.png) 0 0 0 0 stretch stretch; +} + +QWidget#widgetColumn>QPushButton +{ + height:35px; +} + +QWidget#widgetColumn>QPushButton:checked,QPushButton#pushButtonInter:checked,QPushButton#pushButtonSkin:checked +{ + border-image:url(:/WorkStation/Resources/theme/maintabbar/main_tab_check.png) 0 0 0 0 stretch stretch; +} + +QWidget#widgetColumn>QPushButton:hover,QPushButton#pushButtonInter:hover,QPushButton#pushButtonSkin:hover +{ + border-image:url(:/WorkStation/Resources/theme/maintabbar/main_tab_highlight.png) 0 0 0 0 stretch stretch; +} + +QWidget#widgetColumn>QPushButton::menu-indicator +{ + border-image: none; +} + +QWidget#widgetColumn>QPushButton::menu-indicator:checked:hover +{ + width:20px; + height:30; + border-image:url(:/WorkStation/Resources/theme/maintabbar/main_tabbtn_highlight.png) 0 0 0 0 stretch stretch; +} + +QWidget#widgetColumn>QPushButton::menu-indicator:pressed, QWidget#widgetColumn>QPushButton::menu-indicator:open +{ + border-image:url(:/WorkStation/Resources/theme/maintabbar/main_tabbtn_down.png) 0 0 0 0 stretch stretch; +} + +QPushButton#pushButtonLogin:hover +{ + border-image:url(:/WorkStation/Resources/theme/login/button_login_hover.png) 0 0 0 0 stretch stretch; +} + +QPushButton#pushButtonLogin +{ + border:0px; + padding:-1px; + width:185px; + height:49px; + border-image:url(:/WorkStation/Resources/theme/login/button_login_normal.png) 0 0 0 0 stretch stretch; +} + +QPushButton#pushButtonLogin:pressed +{ + border-image:url(:/WorkStation/Resources/theme/login/button_login_down.png) 0 0 0 0 stretch stretch; +} + +QPushButton#pushButtonSignature:hover +{ + border-image:url(:/WorkStation/Resources/theme/maintool/allbtn_highlight.png) 0 0 0 0 stretch stretch; +} + +QPushButton#pushButtonClassic,QPushButton#pushButtonCover +{ + border:2px groove gray; + border-radius:10px; + padding:2px 4px; +} + +QLabel#labelSignature:hover,QToolButton:hover +{ + margin:0px; + border-image:url(:/WorkStation/Resources/theme/maintool/allbtn_highlight.png) 0 0 0 0 stretch stretch; +} + +QToolButton:pressed +{ + border-image:url(:/WorkStation/Resources/theme/maintool/allbtn_down.png.png) 0 0 0 0 stretch stretch; +} +/* +QToolButton::menu-indicator +{ + width:9px; + height:4px; + border-image:url(:/WorkStation/Resources/theme/maintool/arrow_down.png) 0 0 0 0 stretch stretch; +} +*/ +QToolButton::menu-button:hover +{ + border-image:url(:/WorkStation/Resources/theme/maintool/allbtn_right_highlight.png) 0 0 0 0 stretch stretch; +} + +QToolButton::menu-button:pressed +{ + border-image:url(:/WorkStation/Resources/theme/maintool/allbtn_right_down.png) 0 0 0 0 stretch stretch; +} + + +QToolButton#toolButtonClose +{ + width: 39px; + height: 20px; + border-image:url(:/WorkStation/Resources/theme/systembutton/btn_close_normal.png) 0 0 0 0 stretch stretch; +} + +QToolButton#toolButtonClose:hover +{ + border-image:url(:/WorkStation/Resources/theme/systembutton/btn_close_highlight.png) 0 0 0 0 stretch stretch; +} + +QToolButton#toolButtonClose:pressed +{ + border-image:url(:/WorkStation/Resources/theme/systembutton/btn_close_down.png) 0 0 0 0 stretch stretch; +} + +QToolButton#toolButtonMax +{ + width: 28px; + height: 20px; + border-image:url(:/WorkStation/Resources/theme/systembutton/btn_max_normal.png) 0 0 0 0 stretch stretch; +} + +QToolButton#toolButtonMax:hover +{ + border-image:url(:/WorkStation/Resources/theme/systembutton/btn_max_highlight.png) 0 0 0 0 stretch stretch; +} + +QToolButton#toolButtonMax:pressed +{ + border-image:url(:/WorkStation/Resources/theme/systembutton/btn_max_down.png) 0 0 0 0 stretch stretch; +} + +QToolButton#toolButtonNor +{ + width: 28px; + height: 20px; + border-image:url(:/WorkStation/Resources/theme/systembutton/btn_restore_normal.png) 0 0 0 0 stretch stretch; +} + +QToolButton#toolButtonNor:hover +{ + border-image:url(:/WorkStation/Resources/theme/systembutton/btn_restore_highlight.png) 0 0 0 0 stretch stretch; +} + +QToolButton#toolButtonNor:pressed +{ + border-image:url(:/WorkStation/Resources/theme/systembutton/btn_restore_down.png) 0 0 0 0 stretch stretch; +} + +QToolButton#toolButtonMin +{ + width: 28px; + height: 20px; + border-image:url(:/WorkStation/Resources/theme/systembutton/btn_mini_normal.png) 0 0 0 0 stretch stretch; +} + +QToolButton#toolButtonMin:hover +{ + border-image:url(:/WorkStation/Resources/theme/systembutton/btn_mini_highlight.png) 0 0 0 0 stretch stretch; +} + +QToolButton#toolButtonMin:pressed +{ + border-image:url(:/WorkStation/Resources/theme/systembutton/btn_mini_down.png) 0 0 0 0 stretch stretch; +} + +QToolButton#toolButtonSet +{ + width: 28px; + height: 20px; + border-image:url(:/WorkStation/Resources/theme/systembutton/btn_set_normal.png) 0 0 0 0 stretch stretch; +} + +QToolButton#toolButtonSet:hover +{ + border-image:url(:/WorkStation/Resources/theme/systembutton/btn_set_hover.png) 0 0 0 0 stretch stretch; +} + +QToolButton#toolButtonSet:pressed +{ + border-image:url(:/WorkStation/Resources/theme/systembutton/btn_set_press.png) 0 0 0 0 stretch stretch; +} + +QToolButton#toolButtonSkin +{ + width: 28px; + height: 20px; + border-image:url(:/WorkStation/Resources/theme/systembutton/btn_Skin_normal.png) 0 0 0 0 stretch stretch; +} + +QToolButton#toolButtonSkin:hover +{ + border-image:url(:/WorkStation/Resources/theme/systembutton/btn_Skin_highlight.png) 0 0 0 0 stretch stretch; +} + +QToolButton#toolButtonSkin:pressed +{ + border-image:url(:/WorkStation/Resources/theme/systembutton/btn_Skin_down.png) 0 0 0 0 stretch stretch; +} + +QToolButton#toolButtonQQGroup:hover,QToolButton#toolButtonDiscussion:hover +{ + border-image:url(:/WorkStation/Resources/theme/maintabbar/tabbtn_bgk_pushed_hover.png) 0 0 0 0 stretch stretch; +} + +QToolButton#toolButtonQQGroup:checked,QToolButton#toolButtonDiscussion:checked +{ + border-image:url(:/WorkStation/Resources/theme/maintabbar/tabbtn_bgk_pushed.png) 0 0 0 0 stretch stretch; +} + +QCheckBox::indicator,QListView::indicator +{ + width: 17px; + height:17px; +} + +QCheckBox::indicator:!checked,QListView::indicator:!checked +{ + border-image:url(:/WorkStation/Resources/theme/login/checkbox_normal.png) 0 0 0 0 stretch stretch; +} + +QCheckBox::indicator:hover:!checked,QListView::indicator:hover:!checked +{ + border-image:url(:/WorkStation/Resources/theme/login/checkbox_hover.png) 0 0 0 0 stretch stretch; +} + +QCheckBox::indicator:checked,QListView::indicator:checked +{ + border-image:url(:/WorkStation/Resources/theme/login/checkbox_selected_normal.png) 0 0 0 0 stretch stretch; +} + +QCheckBox::indicator:checked:hover,QListView::indicator:checked:hover +{ + border-image:url(:/WorkStation/Resources/theme/login/checkbox_selected_hover.png) 0 0 0 0 stretch stretch; +} + +QTableWidget::item:selected +{ + border-image:url(:/WorkStation/Resources/theme/menu/menu_highlight.png) 0 0 0 0 stretch stretch; +} \ No newline at end of file diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/AM_MenuICON.png b/imsclient/imsclient/Resources/theme/ChatFrame/AM_MenuICON.png new file mode 100644 index 00000000..9368b519 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/AM_MenuICON.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/AppMenuExt_DeleteFriend.png b/imsclient/imsclient/Resources/theme/ChatFrame/AppMenuExt_DeleteFriend.png new file mode 100644 index 00000000..d15e9aaf Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/AppMenuExt_DeleteFriend.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/AppMenuExt_ImPeachUin.png b/imsclient/imsclient/Resources/theme/ChatFrame/AppMenuExt_ImPeachUin.png new file mode 100644 index 00000000..5808907f Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/AppMenuExt_ImPeachUin.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/AppMenuExt_MoveToBlackList.png b/imsclient/imsclient/Resources/theme/ChatFrame/AppMenuExt_MoveToBlackList.png new file mode 100644 index 00000000..11e24648 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/AppMenuExt_MoveToBlackList.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/Bold.png b/imsclient/imsclient/Resources/theme/ChatFrame/Bold.png new file mode 100644 index 00000000..3e23174a Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/Bold.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/ContactMgr.png b/imsclient/imsclient/Resources/theme/ChatFrame/ContactMgr.png new file mode 100644 index 00000000..f372c8dc Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/ContactMgr.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/GroupDyncIcon.png b/imsclient/imsclient/Resources/theme/ChatFrame/GroupDyncIcon.png new file mode 100644 index 00000000..4e3991a9 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/GroupDyncIcon.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/Import.png b/imsclient/imsclient/Resources/theme/ChatFrame/Import.png new file mode 100644 index 00000000..61b31e2c Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/Import.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/Italic.png b/imsclient/imsclient/Resources/theme/ChatFrame/Italic.png new file mode 100644 index 00000000..abaf0dc5 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/Italic.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/MainPanelVasIcon.png b/imsclient/imsclient/Resources/theme/ChatFrame/MainPanelVasIcon.png new file mode 100644 index 00000000..83494d98 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/MainPanelVasIcon.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/MiniService.png b/imsclient/imsclient/Resources/theme/ChatFrame/MiniService.png new file mode 100644 index 00000000..53a235d6 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/MiniService.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/OnlineUpdate.png b/imsclient/imsclient/Resources/theme/ChatFrame/OnlineUpdate.png new file mode 100644 index 00000000..80cf741e Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/OnlineUpdate.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/QA.png b/imsclient/imsclient/Resources/theme/ChatFrame/QA.png new file mode 100644 index 00000000..b97e48b7 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/QA.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/QQZone.png b/imsclient/imsclient/Resources/theme/ChatFrame/QQZone.png new file mode 100644 index 00000000..1de1c95e Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/QQZone.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/QQ_TempSession.png b/imsclient/imsclient/Resources/theme/ChatFrame/QQ_TempSession.png new file mode 100644 index 00000000..55c8fdca Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/QQ_TempSession.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/SoSo.png b/imsclient/imsclient/Resources/theme/ChatFrame/SoSo.png new file mode 100644 index 00000000..9a8fc3b4 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/SoSo.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/TencentNet.png b/imsclient/imsclient/Resources/theme/ChatFrame/TencentNet.png new file mode 100644 index 00000000..82c2237e Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/TencentNet.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/Tools.png b/imsclient/imsclient/Resources/theme/ChatFrame/Tools.png new file mode 100644 index 00000000..8a771ab1 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/Tools.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/WhatsNew.png b/imsclient/imsclient/Resources/theme/ChatFrame/WhatsNew.png new file mode 100644 index 00000000..d082ef28 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/WhatsNew.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/Wireless.png b/imsclient/imsclient/Resources/theme/ChatFrame/Wireless.png new file mode 100644 index 00000000..a2bc4163 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/Wireless.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_cut.png b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_cut.png new file mode 100644 index 00000000..8b934e0e Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_cut.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_face.png b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_face.png new file mode 100644 index 00000000..6c087b36 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_face.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_flirtationface.png b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_flirtationface.png new file mode 100644 index 00000000..048fee0d Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_flirtationface.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_font.png b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_font.png new file mode 100644 index 00000000..4acefad7 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_font.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_inputassist.png b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_inputassist.png new file mode 100644 index 00000000..5af22ba7 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_inputassist.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_inputassist_dropdown.png b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_inputassist_dropdown.png new file mode 100644 index 00000000..5a23e00a Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_inputassist_dropdown.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_more.png b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_more.png new file mode 100644 index 00000000..a75d5ee0 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_more.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_register.png b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_register.png new file mode 100644 index 00000000..4dd5ab0b Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_register.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_richface.png b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_richface.png new file mode 100644 index 00000000..350d5092 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_richface.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_screen1.png b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_screen1.png new file mode 100644 index 00000000..4a316dbf Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_screen1.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_screen2.png b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_screen2.png new file mode 100644 index 00000000..cb62ee28 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_screen2.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_sendpic.png b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_sendpic.png new file mode 100644 index 00000000..cb74854a Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_sendpic.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_sysfont_tab_button.png b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_sysfont_tab_button.png new file mode 100644 index 00000000..764a743a Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_sysfont_tab_button.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_twitter.png b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_twitter.png new file mode 100644 index 00000000..e575a4ae Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/aio_quickbar_twitter.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/aio_toobar_add.png b/imsclient/imsclient/Resources/theme/ChatFrame/aio_toobar_add.png new file mode 100644 index 00000000..8928c764 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/aio_toobar_add.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/aio_toobar_addhuman.png b/imsclient/imsclient/Resources/theme/ChatFrame/aio_toobar_addhuman.png new file mode 100644 index 00000000..582bb8ba Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/aio_toobar_addhuman.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/aio_toobar_app.png b/imsclient/imsclient/Resources/theme/ChatFrame/aio_toobar_app.png new file mode 100644 index 00000000..aebe46cf Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/aio_toobar_app.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/aio_toobar_block.png b/imsclient/imsclient/Resources/theme/ChatFrame/aio_toobar_block.png new file mode 100644 index 00000000..6b6f3830 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/aio_toobar_block.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/aio_toobar_game.png b/imsclient/imsclient/Resources/theme/ChatFrame/aio_toobar_game.png new file mode 100644 index 00000000..f6d9a82d Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/aio_toobar_game.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/btnleft_down.png b/imsclient/imsclient/Resources/theme/ChatFrame/btnleft_down.png new file mode 100644 index 00000000..8d269e6b Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/btnleft_down.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/btnleft_focus_down.png b/imsclient/imsclient/Resources/theme/ChatFrame/btnleft_focus_down.png new file mode 100644 index 00000000..f9387f9c Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/btnleft_focus_down.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/btnleft_focus_highlight.png b/imsclient/imsclient/Resources/theme/ChatFrame/btnleft_focus_highlight.png new file mode 100644 index 00000000..be0e9280 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/btnleft_focus_highlight.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/btnleft_focus_normal.png b/imsclient/imsclient/Resources/theme/ChatFrame/btnleft_focus_normal.png new file mode 100644 index 00000000..6b347d38 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/btnleft_focus_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/btnleft_highlight.png b/imsclient/imsclient/Resources/theme/ChatFrame/btnleft_highlight.png new file mode 100644 index 00000000..f5e4ba81 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/btnleft_highlight.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/btnleft_normal.png b/imsclient/imsclient/Resources/theme/ChatFrame/btnleft_normal.png new file mode 100644 index 00000000..cdfa0a87 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/btnleft_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/btnright_down.png b/imsclient/imsclient/Resources/theme/ChatFrame/btnright_down.png new file mode 100644 index 00000000..d596bdaa Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/btnright_down.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/btnright_focus_down.png b/imsclient/imsclient/Resources/theme/ChatFrame/btnright_focus_down.png new file mode 100644 index 00000000..d3e7b14c Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/btnright_focus_down.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/btnright_focus_highlight.png b/imsclient/imsclient/Resources/theme/ChatFrame/btnright_focus_highlight.png new file mode 100644 index 00000000..effb5ce7 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/btnright_focus_highlight.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/btnright_focus_normal.png b/imsclient/imsclient/Resources/theme/ChatFrame/btnright_focus_normal.png new file mode 100644 index 00000000..291055be Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/btnright_focus_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/btnright_highlight.png b/imsclient/imsclient/Resources/theme/ChatFrame/btnright_highlight.png new file mode 100644 index 00000000..7c4b63a2 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/btnright_highlight.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/btnright_normal.png b/imsclient/imsclient/Resources/theme/ChatFrame/btnright_normal.png new file mode 100644 index 00000000..e8ee3d9f Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/btnright_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/color.png b/imsclient/imsclient/Resources/theme/ChatFrame/color.png new file mode 100644 index 00000000..536e4d60 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/color.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/deta.png b/imsclient/imsclient/Resources/theme/ChatFrame/deta.png new file mode 100644 index 00000000..86ece5d8 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/deta.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/mainmenu_NewsOrder.png b/imsclient/imsclient/Resources/theme/ChatFrame/mainmenu_NewsOrder.png new file mode 100644 index 00000000..51cdbcd5 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/mainmenu_NewsOrder.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/mainmenu_allservices.png b/imsclient/imsclient/Resources/theme/ChatFrame/mainmenu_allservices.png new file mode 100644 index 00000000..b191987b Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/mainmenu_allservices.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/mainmenu_imqqcom.png b/imsclient/imsclient/Resources/theme/ChatFrame/mainmenu_imqqcom.png new file mode 100644 index 00000000..da64ace7 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/mainmenu_imqqcom.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/menu_changepswd.png b/imsclient/imsclient/Resources/theme/ChatFrame/menu_changepswd.png new file mode 100644 index 00000000..cdc6f9f4 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/menu_changepswd.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/menu_exit.png b/imsclient/imsclient/Resources/theme/ChatFrame/menu_exit.png new file mode 100644 index 00000000..662c55e1 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/menu_exit.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/menu_filemanager.png b/imsclient/imsclient/Resources/theme/ChatFrame/menu_filemanager.png new file mode 100644 index 00000000..39883506 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/menu_filemanager.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/menu_switch.png b/imsclient/imsclient/Resources/theme/ChatFrame/menu_switch.png new file mode 100644 index 00000000..71a1d2fb Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/menu_switch.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/msg_upload.png b/imsclient/imsclient/Resources/theme/ChatFrame/msg_upload.png new file mode 100644 index 00000000..fc95c231 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/msg_upload.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/msgmgr.png b/imsclient/imsclient/Resources/theme/ChatFrame/msgmgr.png new file mode 100644 index 00000000..4fd185a4 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/msgmgr.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/note0.png b/imsclient/imsclient/Resources/theme/ChatFrame/note0.png new file mode 100644 index 00000000..8b23ba6a Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/note0.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/note1.png b/imsclient/imsclient/Resources/theme/ChatFrame/note1.png new file mode 100644 index 00000000..86e17ea5 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/note1.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/recover.png b/imsclient/imsclient/Resources/theme/ChatFrame/recover.png new file mode 100644 index 00000000..f993282e Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/recover.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/safe.png b/imsclient/imsclient/Resources/theme/ChatFrame/safe.png new file mode 100644 index 00000000..10adef9d Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/safe.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/save_16.png b/imsclient/imsclient/Resources/theme/ChatFrame/save_16.png new file mode 100644 index 00000000..76881d57 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/save_16.png differ diff --git a/imsclient/imsclient/Resources/theme/ChatFrame/underline.png b/imsclient/imsclient/Resources/theme/ChatFrame/underline.png new file mode 100644 index 00000000..e9f9d59c Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ChatFrame/underline.png differ diff --git a/imsclient/imsclient/Resources/theme/CustomerCenter.PNG b/imsclient/imsclient/Resources/theme/CustomerCenter.PNG new file mode 100644 index 00000000..a3053c63 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/CustomerCenter.PNG differ diff --git a/imsclient/imsclient/Resources/theme/Folder.png b/imsclient/imsclient/Resources/theme/Folder.png new file mode 100644 index 00000000..545538b9 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/Folder.png differ diff --git a/imsclient/imsclient/Resources/theme/LV.png b/imsclient/imsclient/Resources/theme/LV.png new file mode 100644 index 00000000..0e5569ca Binary files /dev/null and b/imsclient/imsclient/Resources/theme/LV.png differ diff --git a/imsclient/imsclient/Resources/theme/LevelValue.png b/imsclient/imsclient/Resources/theme/LevelValue.png new file mode 100644 index 00000000..e8885d3a Binary files /dev/null and b/imsclient/imsclient/Resources/theme/LevelValue.png differ diff --git a/imsclient/imsclient/Resources/theme/ProductBlog.PNG b/imsclient/imsclient/Resources/theme/ProductBlog.PNG new file mode 100644 index 00000000..1de1c95e Binary files /dev/null and b/imsclient/imsclient/Resources/theme/ProductBlog.PNG differ diff --git a/imsclient/imsclient/Resources/theme/QQVIP_GRAY.png b/imsclient/imsclient/Resources/theme/QQVIP_GRAY.png new file mode 100644 index 00000000..f5b6b41b Binary files /dev/null and b/imsclient/imsclient/Resources/theme/QQVIP_GRAY.png differ diff --git a/imsclient/imsclient/Resources/theme/QQVIP_LIGHT.png b/imsclient/imsclient/Resources/theme/QQVIP_LIGHT.png new file mode 100644 index 00000000..d90400c3 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/QQVIP_LIGHT.png differ diff --git a/imsclient/imsclient/Resources/theme/QuestionAndAdvance.PNG b/imsclient/imsclient/Resources/theme/QuestionAndAdvance.PNG new file mode 100644 index 00000000..b97e48b7 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/QuestionAndAdvance.PNG differ diff --git a/imsclient/imsclient/Resources/theme/SmallVideoDefault.png b/imsclient/imsclient/Resources/theme/SmallVideoDefault.png new file mode 100644 index 00000000..d80bf9e8 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/SmallVideoDefault.png differ diff --git a/imsclient/imsclient/Resources/theme/appmanager/app_bkg_hover.png b/imsclient/imsclient/Resources/theme/appmanager/app_bkg_hover.png new file mode 100644 index 00000000..a5fbfc83 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/appmanager/app_bkg_hover.png differ diff --git a/imsclient/imsclient/Resources/theme/appmanager/app_bkg_normal.png b/imsclient/imsclient/Resources/theme/appmanager/app_bkg_normal.png new file mode 100644 index 00000000..df41630d Binary files /dev/null and b/imsclient/imsclient/Resources/theme/appmanager/app_bkg_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/appmanager/app_bkg_push.png b/imsclient/imsclient/Resources/theme/appmanager/app_bkg_push.png new file mode 100644 index 00000000..ff9b2823 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/appmanager/app_bkg_push.png differ diff --git a/imsclient/imsclient/Resources/theme/appmanager/app_manager_icon.png b/imsclient/imsclient/Resources/theme/appmanager/app_manager_icon.png new file mode 100644 index 00000000..9cff9124 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/appmanager/app_manager_icon.png differ diff --git a/imsclient/imsclient/Resources/theme/appmanager/appbox_mgr_btn.png b/imsclient/imsclient/Resources/theme/appmanager/appbox_mgr_btn.png new file mode 100644 index 00000000..284105bb Binary files /dev/null and b/imsclient/imsclient/Resources/theme/appmanager/appbox_mgr_btn.png differ diff --git a/imsclient/imsclient/Resources/theme/appmanager/fav_app_empty.png b/imsclient/imsclient/Resources/theme/appmanager/fav_app_empty.png new file mode 100644 index 00000000..2c7bc999 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/appmanager/fav_app_empty.png differ diff --git a/imsclient/imsclient/Resources/theme/appmanager/more_app_btn_down.png b/imsclient/imsclient/Resources/theme/appmanager/more_app_btn_down.png new file mode 100644 index 00000000..d8e42d9e Binary files /dev/null and b/imsclient/imsclient/Resources/theme/appmanager/more_app_btn_down.png differ diff --git a/imsclient/imsclient/Resources/theme/appmanager/more_app_btn_hover.png b/imsclient/imsclient/Resources/theme/appmanager/more_app_btn_hover.png new file mode 100644 index 00000000..02dd2d35 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/appmanager/more_app_btn_hover.png differ diff --git a/imsclient/imsclient/Resources/theme/appmanager/more_app_btn_normal.png b/imsclient/imsclient/Resources/theme/appmanager/more_app_btn_normal.png new file mode 100644 index 00000000..50fdf5a9 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/appmanager/more_app_btn_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/blog.png b/imsclient/imsclient/Resources/theme/blog.png new file mode 100644 index 00000000..86316274 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/blog.png differ diff --git a/imsclient/imsclient/Resources/theme/find_old.png b/imsclient/imsclient/Resources/theme/find_old.png new file mode 100644 index 00000000..df037775 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/find_old.png differ diff --git a/imsclient/imsclient/Resources/theme/group.png b/imsclient/imsclient/Resources/theme/group.png new file mode 100644 index 00000000..71ed24f6 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/group.png differ diff --git a/imsclient/imsclient/Resources/theme/head.png b/imsclient/imsclient/Resources/theme/head.png new file mode 100644 index 00000000..92479112 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/head.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/AreaIcon.png b/imsclient/imsclient/Resources/theme/interface/AreaIcon.png new file mode 100644 index 00000000..cae74fb1 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/AreaIcon.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/AreaMainIcon.png b/imsclient/imsclient/Resources/theme/interface/AreaMainIcon.png new file mode 100644 index 00000000..35e93376 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/AreaMainIcon.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/AreaMainIcon_2.png b/imsclient/imsclient/Resources/theme/interface/AreaMainIcon_2.png new file mode 100644 index 00000000..8b54a65f Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/AreaMainIcon_2.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/AreaPresentMgr_RBMenu.png b/imsclient/imsclient/Resources/theme/interface/AreaPresentMgr_RBMenu.png new file mode 100644 index 00000000..571db2bf Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/AreaPresentMgr_RBMenu.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/ClassicThemeBkg.jpg b/imsclient/imsclient/Resources/theme/interface/ClassicThemeBkg.jpg new file mode 100644 index 00000000..ea5912f5 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/ClassicThemeBkg.jpg differ diff --git a/imsclient/imsclient/Resources/theme/interface/CoverThemeBkg.jpg b/imsclient/imsclient/Resources/theme/interface/CoverThemeBkg.jpg new file mode 100644 index 00000000..062897f5 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/CoverThemeBkg.jpg differ diff --git a/imsclient/imsclient/Resources/theme/interface/MaterialAlphaSet.png b/imsclient/imsclient/Resources/theme/interface/MaterialAlphaSet.png new file mode 100644 index 00000000..cd94f5b2 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/MaterialAlphaSet.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/Messagebox18_highlight.png b/imsclient/imsclient/Resources/theme/interface/Messagebox18_highlight.png new file mode 100644 index 00000000..74196994 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/Messagebox18_highlight.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/WeatherThemeBkg.jpg b/imsclient/imsclient/Resources/theme/interface/WeatherThemeBkg.jpg new file mode 100644 index 00000000..3c580f97 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/WeatherThemeBkg.jpg differ diff --git a/imsclient/imsclient/Resources/theme/interface/White.jpg b/imsclient/imsclient/Resources/theme/interface/White.jpg new file mode 100644 index 00000000..ceeacd05 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/White.jpg differ diff --git a/imsclient/imsclient/Resources/theme/interface/autograph.png b/imsclient/imsclient/Resources/theme/interface/autograph.png new file mode 100644 index 00000000..a09ce306 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/autograph.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/blog.png b/imsclient/imsclient/Resources/theme/interface/blog.png new file mode 100644 index 00000000..3868f844 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/blog.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/default.jpg b/imsclient/imsclient/Resources/theme/interface/default.jpg new file mode 100644 index 00000000..d5c1e624 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/default.jpg differ diff --git a/imsclient/imsclient/Resources/theme/interface/downbtn.png b/imsclient/imsclient/Resources/theme/interface/downbtn.png new file mode 100644 index 00000000..b3499b73 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/downbtn.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/fengmian_1.png b/imsclient/imsclient/Resources/theme/interface/fengmian_1.png new file mode 100644 index 00000000..6b31b95c Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/fengmian_1.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/friendicon.png b/imsclient/imsclient/Resources/theme/interface/friendicon.png new file mode 100644 index 00000000..d9a26b32 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/friendicon.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/head_bkg__normal.png b/imsclient/imsclient/Resources/theme/interface/head_bkg__normal.png new file mode 100644 index 00000000..c83b5444 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/head_bkg__normal.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/head_bkg_highlight.png b/imsclient/imsclient/Resources/theme/interface/head_bkg_highlight.png new file mode 100644 index 00000000..20f89216 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/head_bkg_highlight.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/icon_blog_selected_Blue.png b/imsclient/imsclient/Resources/theme/interface/icon_blog_selected_Blue.png new file mode 100644 index 00000000..40d7a136 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/icon_blog_selected_Blue.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/icon_contacts_selected_Blue.png b/imsclient/imsclient/Resources/theme/interface/icon_contacts_selected_Blue.png new file mode 100644 index 00000000..54f6ae96 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/icon_contacts_selected_Blue.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/icon_group_selected_Blue.png b/imsclient/imsclient/Resources/theme/interface/icon_group_selected_Blue.png new file mode 100644 index 00000000..784060d2 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/icon_group_selected_Blue.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/icon_last_selected_Blue.png b/imsclient/imsclient/Resources/theme/interface/icon_last_selected_Blue.png new file mode 100644 index 00000000..a29cfa64 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/icon_last_selected_Blue.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/icon_weather_selected_Blue.png b/imsclient/imsclient/Resources/theme/interface/icon_weather_selected_Blue.png new file mode 100644 index 00000000..36b2c034 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/icon_weather_selected_Blue.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/icon_zone_selected_Blue.png b/imsclient/imsclient/Resources/theme/interface/icon_zone_selected_Blue.png new file mode 100644 index 00000000..c83c9543 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/icon_zone_selected_Blue.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/jingdian_2.png b/imsclient/imsclient/Resources/theme/interface/jingdian_2.png new file mode 100644 index 00000000..bf7d990e Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/jingdian_2.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/leftdown.png b/imsclient/imsclient/Resources/theme/interface/leftdown.png new file mode 100644 index 00000000..d73e1c51 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/leftdown.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/leftmouseover.png b/imsclient/imsclient/Resources/theme/interface/leftmouseover.png new file mode 100644 index 00000000..8206c4ea Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/leftmouseover.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/leftnormal.png b/imsclient/imsclient/Resources/theme/interface/leftnormal.png new file mode 100644 index 00000000..5e6fb14e Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/leftnormal.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/mail.png b/imsclient/imsclient/Resources/theme/interface/mail.png new file mode 100644 index 00000000..c090ba0b Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/mail.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/middledown.png b/imsclient/imsclient/Resources/theme/interface/middledown.png new file mode 100644 index 00000000..d08d86ff Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/middledown.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/middlemouseover.png b/imsclient/imsclient/Resources/theme/interface/middlemouseover.png new file mode 100644 index 00000000..87605e07 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/middlemouseover.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/middlenormal.png b/imsclient/imsclient/Resources/theme/interface/middlenormal.png new file mode 100644 index 00000000..2df897ea Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/middlenormal.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/more.PNG b/imsclient/imsclient/Resources/theme/interface/more.PNG new file mode 100644 index 00000000..170b8607 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/more.PNG differ diff --git a/imsclient/imsclient/Resources/theme/interface/news.png b/imsclient/imsclient/Resources/theme/interface/news.png new file mode 100644 index 00000000..083488d6 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/news.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/plus.png b/imsclient/imsclient/Resources/theme/interface/plus.png new file mode 100644 index 00000000..f00f98f5 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/plus.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/qqshowicon.png b/imsclient/imsclient/Resources/theme/interface/qqshowicon.png new file mode 100644 index 00000000..3c884d13 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/qqshowicon.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/qzoneicon.png b/imsclient/imsclient/Resources/theme/interface/qzoneicon.png new file mode 100644 index 00000000..7902e2e7 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/qzoneicon.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/rightdown.png b/imsclient/imsclient/Resources/theme/interface/rightdown.png new file mode 100644 index 00000000..341fadcb Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/rightdown.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/rightmouseover.png b/imsclient/imsclient/Resources/theme/interface/rightmouseover.png new file mode 100644 index 00000000..89d46a4f Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/rightmouseover.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/rightnormal.png b/imsclient/imsclient/Resources/theme/interface/rightnormal.png new file mode 100644 index 00000000..60fb943e Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/rightnormal.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/shopping.png b/imsclient/imsclient/Resources/theme/interface/shopping.png new file mode 100644 index 00000000..9acd95c2 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/shopping.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/soso.png b/imsclient/imsclient/Resources/theme/interface/soso.png new file mode 100644 index 00000000..845b7545 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/soso.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/upbtn.png b/imsclient/imsclient/Resources/theme/interface/upbtn.png new file mode 100644 index 00000000..e890c6cb Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/upbtn.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/vip_16.png b/imsclient/imsclient/Resources/theme/interface/vip_16.png new file mode 100644 index 00000000..0561f9be Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/vip_16.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/wallet.png b/imsclient/imsclient/Resources/theme/interface/wallet.png new file mode 100644 index 00000000..0c412096 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/wallet.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/wblogicon.png b/imsclient/imsclient/Resources/theme/interface/wblogicon.png new file mode 100644 index 00000000..ced49705 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/wblogicon.png differ diff --git a/imsclient/imsclient/Resources/theme/interface/weather-back.png b/imsclient/imsclient/Resources/theme/interface/weather-back.png new file mode 100644 index 00000000..56c1307a Binary files /dev/null and b/imsclient/imsclient/Resources/theme/interface/weather-back.png differ diff --git a/imsclient/imsclient/Resources/theme/lockPanel/16.ico b/imsclient/imsclient/Resources/theme/lockPanel/16.ico new file mode 100644 index 00000000..88b3d714 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/lockPanel/16.ico differ diff --git a/imsclient/imsclient/Resources/theme/lockPanel/16_gray.ico b/imsclient/imsclient/Resources/theme/lockPanel/16_gray.ico new file mode 100644 index 00000000..5d71f2ee Binary files /dev/null and b/imsclient/imsclient/Resources/theme/lockPanel/16_gray.ico differ diff --git a/imsclient/imsclient/Resources/theme/lockPanel/20.png b/imsclient/imsclient/Resources/theme/lockPanel/20.png new file mode 100644 index 00000000..acb5b995 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/lockPanel/20.png differ diff --git a/imsclient/imsclient/Resources/theme/lockPanel/lock.png b/imsclient/imsclient/Resources/theme/lockPanel/lock.png new file mode 100644 index 00000000..ebc00638 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/lockPanel/lock.png differ diff --git a/imsclient/imsclient/Resources/theme/lockPanel/lock20.png b/imsclient/imsclient/Resources/theme/lockPanel/lock20.png new file mode 100644 index 00000000..1bf2d75d Binary files /dev/null and b/imsclient/imsclient/Resources/theme/lockPanel/lock20.png differ diff --git a/imsclient/imsclient/Resources/theme/lockPanel/lockBg_Highlight.png b/imsclient/imsclient/Resources/theme/lockPanel/lockBg_Highlight.png new file mode 100644 index 00000000..4c0fd9a3 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/lockPanel/lockBg_Highlight.png differ diff --git a/imsclient/imsclient/Resources/theme/lockPanel/lockBg_Pushed.png b/imsclient/imsclient/Resources/theme/lockPanel/lockBg_Pushed.png new file mode 100644 index 00000000..1a51fdec Binary files /dev/null and b/imsclient/imsclient/Resources/theme/lockPanel/lockBg_Pushed.png differ diff --git a/imsclient/imsclient/Resources/theme/lockPanel/unlock20.png b/imsclient/imsclient/Resources/theme/lockPanel/unlock20.png new file mode 100644 index 00000000..02144027 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/lockPanel/unlock20.png differ diff --git a/imsclient/imsclient/Resources/theme/login/afternoon.jpg b/imsclient/imsclient/Resources/theme/login/afternoon.jpg new file mode 100644 index 00000000..cb2ca8fb Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/afternoon.jpg differ diff --git a/imsclient/imsclient/Resources/theme/login/button_login_down.png b/imsclient/imsclient/Resources/theme/login/button_login_down.png new file mode 100644 index 00000000..0299335b Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/button_login_down.png differ diff --git a/imsclient/imsclient/Resources/theme/login/button_login_hover.png b/imsclient/imsclient/Resources/theme/login/button_login_hover.png new file mode 100644 index 00000000..b2671541 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/button_login_hover.png differ diff --git a/imsclient/imsclient/Resources/theme/login/button_login_normal.png b/imsclient/imsclient/Resources/theme/login/button_login_normal.png new file mode 100644 index 00000000..ddc67a2e Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/button_login_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/login/checkbox_hover.png b/imsclient/imsclient/Resources/theme/login/checkbox_hover.png new file mode 100644 index 00000000..454517c3 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/checkbox_hover.png differ diff --git a/imsclient/imsclient/Resources/theme/login/checkbox_normal.png b/imsclient/imsclient/Resources/theme/login/checkbox_normal.png new file mode 100644 index 00000000..a4ea6974 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/checkbox_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/login/checkbox_press.png b/imsclient/imsclient/Resources/theme/login/checkbox_press.png new file mode 100644 index 00000000..bc686c02 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/checkbox_press.png differ diff --git a/imsclient/imsclient/Resources/theme/login/checkbox_selected_hover.png b/imsclient/imsclient/Resources/theme/login/checkbox_selected_hover.png new file mode 100644 index 00000000..4e61b4e2 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/checkbox_selected_hover.png differ diff --git a/imsclient/imsclient/Resources/theme/login/checkbox_selected_normal.png b/imsclient/imsclient/Resources/theme/login/checkbox_selected_normal.png new file mode 100644 index 00000000..58d84359 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/checkbox_selected_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/login/checkbox_selected_press.png b/imsclient/imsclient/Resources/theme/login/checkbox_selected_press.png new file mode 100644 index 00000000..331dc10e Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/checkbox_selected_press.png differ diff --git a/imsclient/imsclient/Resources/theme/login/corner_back.png b/imsclient/imsclient/Resources/theme/login/corner_back.png new file mode 100644 index 00000000..b242a2d0 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/corner_back.png differ diff --git a/imsclient/imsclient/Resources/theme/login/corner_back_hover.png b/imsclient/imsclient/Resources/theme/login/corner_back_hover.png new file mode 100644 index 00000000..6310ab03 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/corner_back_hover.png differ diff --git a/imsclient/imsclient/Resources/theme/login/corner_back_press.png b/imsclient/imsclient/Resources/theme/login/corner_back_press.png new file mode 100644 index 00000000..5fe6d4d5 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/corner_back_press.png differ diff --git a/imsclient/imsclient/Resources/theme/login/corner_left.png b/imsclient/imsclient/Resources/theme/login/corner_left.png new file mode 100644 index 00000000..615af0ca Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/corner_left.png differ diff --git a/imsclient/imsclient/Resources/theme/login/corner_left_hover.png b/imsclient/imsclient/Resources/theme/login/corner_left_hover.png new file mode 100644 index 00000000..d87f0fe0 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/corner_left_hover.png differ diff --git a/imsclient/imsclient/Resources/theme/login/corner_left_press.png b/imsclient/imsclient/Resources/theme/login/corner_left_press.png new file mode 100644 index 00000000..177d0680 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/corner_left_press.png differ diff --git a/imsclient/imsclient/Resources/theme/login/corner_right_hover.png b/imsclient/imsclient/Resources/theme/login/corner_right_hover.png new file mode 100644 index 00000000..b493ce59 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/corner_right_hover.png differ diff --git a/imsclient/imsclient/Resources/theme/login/corner_right_normal_down.png b/imsclient/imsclient/Resources/theme/login/corner_right_normal_down.png new file mode 100644 index 00000000..bcad3bc8 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/corner_right_normal_down.png differ diff --git a/imsclient/imsclient/Resources/theme/login/inputbox.png b/imsclient/imsclient/Resources/theme/login/inputbox.png new file mode 100644 index 00000000..7fea86e4 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/inputbox.png differ diff --git a/imsclient/imsclient/Resources/theme/login/inputbox_hover.png b/imsclient/imsclient/Resources/theme/login/inputbox_hover.png new file mode 100644 index 00000000..766214e3 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/inputbox_hover.png differ diff --git a/imsclient/imsclient/Resources/theme/login/keyboard.png b/imsclient/imsclient/Resources/theme/login/keyboard.png new file mode 100644 index 00000000..c7a803fb Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/keyboard.png differ diff --git a/imsclient/imsclient/Resources/theme/login/loading.gif b/imsclient/imsclient/Resources/theme/login/loading.gif new file mode 100644 index 00000000..ad708dca Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/loading.gif differ diff --git a/imsclient/imsclient/Resources/theme/login/login_head_bkg.png b/imsclient/imsclient/Resources/theme/login/login_head_bkg.png new file mode 100644 index 00000000..c83b5444 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/login_head_bkg.png differ diff --git a/imsclient/imsclient/Resources/theme/login/mima.png b/imsclient/imsclient/Resources/theme/login/mima.png new file mode 100644 index 00000000..d577d45d Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/mima.png differ diff --git a/imsclient/imsclient/Resources/theme/login/mima_hover.png b/imsclient/imsclient/Resources/theme/login/mima_hover.png new file mode 100644 index 00000000..04bbcdb9 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/mima_hover.png differ diff --git a/imsclient/imsclient/Resources/theme/login/mima_press.png b/imsclient/imsclient/Resources/theme/login/mima_press.png new file mode 100644 index 00000000..d577d45d Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/mima_press.png differ diff --git a/imsclient/imsclient/Resources/theme/login/morning.jpg b/imsclient/imsclient/Resources/theme/login/morning.jpg new file mode 100644 index 00000000..f67a867f Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/morning.jpg differ diff --git a/imsclient/imsclient/Resources/theme/login/night.jpg b/imsclient/imsclient/Resources/theme/login/night.jpg new file mode 100644 index 00000000..0c9e392b Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/night.jpg differ diff --git a/imsclient/imsclient/Resources/theme/login/noon.jpg b/imsclient/imsclient/Resources/theme/login/noon.jpg new file mode 100644 index 00000000..a5e05406 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/noon.jpg differ diff --git a/imsclient/imsclient/Resources/theme/login/zhuce.png b/imsclient/imsclient/Resources/theme/login/zhuce.png new file mode 100644 index 00000000..cff61d1b Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/zhuce.png differ diff --git a/imsclient/imsclient/Resources/theme/login/zhuce_hover.png b/imsclient/imsclient/Resources/theme/login/zhuce_hover.png new file mode 100644 index 00000000..8e2c0dce Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/zhuce_hover.png differ diff --git a/imsclient/imsclient/Resources/theme/login/zhuce_press.png b/imsclient/imsclient/Resources/theme/login/zhuce_press.png new file mode 100644 index 00000000..cff61d1b Binary files /dev/null and b/imsclient/imsclient/Resources/theme/login/zhuce_press.png differ diff --git "a/imsclient/imsclient/Resources/theme/login/\345\244\215\344\273\266 inputbox.png" "b/imsclient/imsclient/Resources/theme/login/\345\244\215\344\273\266 inputbox.png" new file mode 100644 index 00000000..7fea86e4 Binary files /dev/null and "b/imsclient/imsclient/Resources/theme/login/\345\244\215\344\273\266 inputbox.png" differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/0.png b/imsclient/imsclient/Resources/theme/maintabbar/0.png new file mode 100644 index 00000000..9374e8c9 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/0.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/15.png b/imsclient/imsclient/Resources/theme/maintabbar/15.png new file mode 100644 index 00000000..1839ff52 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/15.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/30.png b/imsclient/imsclient/Resources/theme/maintabbar/30.png new file mode 100644 index 00000000..07b1fc55 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/30.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/45.png b/imsclient/imsclient/Resources/theme/maintabbar/45.png new file mode 100644 index 00000000..e98b84d6 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/45.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/60.png b/imsclient/imsclient/Resources/theme/maintabbar/60.png new file mode 100644 index 00000000..16dc5487 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/60.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/75.png b/imsclient/imsclient/Resources/theme/maintabbar/75.png new file mode 100644 index 00000000..85fdf818 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/75.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/90.png b/imsclient/imsclient/Resources/theme/maintabbar/90.png new file mode 100644 index 00000000..604da844 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/90.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/add.png b/imsclient/imsclient/Resources/theme/maintabbar/add.png new file mode 100644 index 00000000..0181f718 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/add.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/home.png b/imsclient/imsclient/Resources/theme/maintabbar/home.png new file mode 100644 index 00000000..a5c540bf Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/home.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/icon_blog_normal.png b/imsclient/imsclient/Resources/theme/maintabbar/icon_blog_normal.png new file mode 100644 index 00000000..6bd89781 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/icon_blog_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/icon_blog_selected.png b/imsclient/imsclient/Resources/theme/maintabbar/icon_blog_selected.png new file mode 100644 index 00000000..e2a856c6 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/icon_blog_selected.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/icon_contacts_normal.png b/imsclient/imsclient/Resources/theme/maintabbar/icon_contacts_normal.png new file mode 100644 index 00000000..02ac2e23 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/icon_contacts_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/icon_contacts_selected.png b/imsclient/imsclient/Resources/theme/maintabbar/icon_contacts_selected.png new file mode 100644 index 00000000..ccfbf477 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/icon_contacts_selected.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/icon_group_normal.png b/imsclient/imsclient/Resources/theme/maintabbar/icon_group_normal.png new file mode 100644 index 00000000..6a479c6b Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/icon_group_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/icon_group_selected.png b/imsclient/imsclient/Resources/theme/maintabbar/icon_group_selected.png new file mode 100644 index 00000000..d771317f Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/icon_group_selected.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/icon_last_normal.png b/imsclient/imsclient/Resources/theme/maintabbar/icon_last_normal.png new file mode 100644 index 00000000..f2bada77 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/icon_last_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/icon_last_selected.png b/imsclient/imsclient/Resources/theme/maintabbar/icon_last_selected.png new file mode 100644 index 00000000..35baa49e Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/icon_last_selected.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/icon_search_normal.png b/imsclient/imsclient/Resources/theme/maintabbar/icon_search_normal.png new file mode 100644 index 00000000..d1fac83b Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/icon_search_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/icon_zone_normal.png b/imsclient/imsclient/Resources/theme/maintabbar/icon_zone_normal.png new file mode 100644 index 00000000..60e83c6d Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/icon_zone_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/icon_zone_selected.png b/imsclient/imsclient/Resources/theme/maintabbar/icon_zone_selected.png new file mode 100644 index 00000000..b0261c6b Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/icon_zone_selected.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/main_tab_check.png b/imsclient/imsclient/Resources/theme/maintabbar/main_tab_check.png new file mode 100644 index 00000000..ba104344 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/main_tab_check.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/main_tab_highlight.png b/imsclient/imsclient/Resources/theme/maintabbar/main_tab_highlight.png new file mode 100644 index 00000000..b38c587a Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/main_tab_highlight.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/main_tabbtn_down.png b/imsclient/imsclient/Resources/theme/maintabbar/main_tabbtn_down.png new file mode 100644 index 00000000..bdec144a Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/main_tabbtn_down.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/main_tabbtn_highlight.png b/imsclient/imsclient/Resources/theme/maintabbar/main_tabbtn_highlight.png new file mode 100644 index 00000000..3eaac814 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/main_tabbtn_highlight.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/tabbtn_bgk_pushed.png b/imsclient/imsclient/Resources/theme/maintabbar/tabbtn_bgk_pushed.png new file mode 100644 index 00000000..56c10bed Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/tabbtn_bgk_pushed.png differ diff --git a/imsclient/imsclient/Resources/theme/maintabbar/tabbtn_bgk_pushed_hover.png b/imsclient/imsclient/Resources/theme/maintabbar/tabbtn_bgk_pushed_hover.png new file mode 100644 index 00000000..671d5e9c Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintabbar/tabbtn_bgk_pushed_hover.png differ diff --git a/imsclient/imsclient/Resources/theme/maintool/FriendCircleMainToolAreaEntry.png b/imsclient/imsclient/Resources/theme/maintool/FriendCircleMainToolAreaEntry.png new file mode 100644 index 00000000..00910fc8 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintool/FriendCircleMainToolAreaEntry.png differ diff --git a/imsclient/imsclient/Resources/theme/maintool/QPlusEntranceBtn.png b/imsclient/imsclient/Resources/theme/maintool/QPlusEntranceBtn.png new file mode 100644 index 00000000..ff959510 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintool/QPlusEntranceBtn.png differ diff --git a/imsclient/imsclient/Resources/theme/maintool/TitleIcon.png b/imsclient/imsclient/Resources/theme/maintool/TitleIcon.png new file mode 100644 index 00000000..5f2ed71b Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintool/TitleIcon.png differ diff --git a/imsclient/imsclient/Resources/theme/maintool/Tools.png b/imsclient/imsclient/Resources/theme/maintool/Tools.png new file mode 100644 index 00000000..72646740 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintool/Tools.png differ diff --git a/imsclient/imsclient/Resources/theme/maintool/allbtn_down.png.png b/imsclient/imsclient/Resources/theme/maintool/allbtn_down.png.png new file mode 100644 index 00000000..5248f017 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintool/allbtn_down.png.png differ diff --git a/imsclient/imsclient/Resources/theme/maintool/allbtn_highlight.png b/imsclient/imsclient/Resources/theme/maintool/allbtn_highlight.png new file mode 100644 index 00000000..58d997dc Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintool/allbtn_highlight.png differ diff --git a/imsclient/imsclient/Resources/theme/maintool/allbtn_left_down.png b/imsclient/imsclient/Resources/theme/maintool/allbtn_left_down.png new file mode 100644 index 00000000..f52ffb0a Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintool/allbtn_left_down.png differ diff --git a/imsclient/imsclient/Resources/theme/maintool/allbtn_left_highlight.png b/imsclient/imsclient/Resources/theme/maintool/allbtn_left_highlight.png new file mode 100644 index 00000000..61cf73a6 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintool/allbtn_left_highlight.png differ diff --git a/imsclient/imsclient/Resources/theme/maintool/allbtn_right_down.png b/imsclient/imsclient/Resources/theme/maintool/allbtn_right_down.png new file mode 100644 index 00000000..62024c1c Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintool/allbtn_right_down.png differ diff --git a/imsclient/imsclient/Resources/theme/maintool/allbtn_right_highlight.png b/imsclient/imsclient/Resources/theme/maintool/allbtn_right_highlight.png new file mode 100644 index 00000000..6dbd1d4c Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintool/allbtn_right_highlight.png differ diff --git a/imsclient/imsclient/Resources/theme/maintool/arrow_down.png b/imsclient/imsclient/Resources/theme/maintool/arrow_down.png new file mode 100644 index 00000000..22716cc4 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintool/arrow_down.png differ diff --git a/imsclient/imsclient/Resources/theme/maintool/filemanager.png b/imsclient/imsclient/Resources/theme/maintool/filemanager.png new file mode 100644 index 00000000..be112f72 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintool/filemanager.png differ diff --git a/imsclient/imsclient/Resources/theme/maintool/find.png b/imsclient/imsclient/Resources/theme/maintool/find.png new file mode 100644 index 00000000..c8e5b91f Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintool/find.png differ diff --git a/imsclient/imsclient/Resources/theme/maintool/menu_btn_highlight.png b/imsclient/imsclient/Resources/theme/maintool/menu_btn_highlight.png new file mode 100644 index 00000000..7a143195 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintool/menu_btn_highlight.png differ diff --git a/imsclient/imsclient/Resources/theme/maintool/menu_btn_normal.png b/imsclient/imsclient/Resources/theme/maintool/menu_btn_normal.png new file mode 100644 index 00000000..9b7a30f9 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintool/menu_btn_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/maintool/message.png b/imsclient/imsclient/Resources/theme/maintool/message.png new file mode 100644 index 00000000..f7b7a026 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/maintool/message.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/BCF_Title16.ico b/imsclient/imsclient/Resources/theme/menu/BCF_Title16.ico new file mode 100644 index 00000000..60410185 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/BCF_Title16.ico differ diff --git a/imsclient/imsclient/Resources/theme/menu/ContactInfoTabNetGame.png b/imsclient/imsclient/Resources/theme/menu/ContactInfoTabNetGame.png new file mode 100644 index 00000000..f959d506 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/ContactInfoTabNetGame.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/ContactInfoTabNetGame2.png b/imsclient/imsclient/Resources/theme/menu/ContactInfoTabNetGame2.png new file mode 100644 index 00000000..68167061 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/ContactInfoTabNetGame2.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/ContactTipsVASFlagExt_Mail.png b/imsclient/imsclient/Resources/theme/menu/ContactTipsVASFlagExt_Mail.png new file mode 100644 index 00000000..e1026f4c Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/ContactTipsVASFlagExt_Mail.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/ContactTipsVASFlagExt_QQFO.png b/imsclient/imsclient/Resources/theme/menu/ContactTipsVASFlagExt_QQFO.png new file mode 100644 index 00000000..95c8246f Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/ContactTipsVASFlagExt_QQFO.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/ContactTipsVASFlagExt_QQFlyIsland.png b/imsclient/imsclient/Resources/theme/menu/ContactTipsVASFlagExt_QQFlyIsland.png new file mode 100644 index 00000000..0848ba09 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/ContactTipsVASFlagExt_QQFlyIsland.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/ContactTipsVASFlagExt_QQSG.png b/imsclient/imsclient/Resources/theme/menu/ContactTipsVASFlagExt_QQSG.png new file mode 100644 index 00000000..f896d340 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/ContactTipsVASFlagExt_QQSG.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/ContactTipsVASFlagExt_QQTang.png b/imsclient/imsclient/Resources/theme/menu/ContactTipsVASFlagExt_QQTang.png new file mode 100644 index 00000000..7677994a Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/ContactTipsVASFlagExt_QQTang.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/ContactTipsVASFlagExt_QQTangVip.png b/imsclient/imsclient/Resources/theme/menu/ContactTipsVASFlagExt_QQTangVip.png new file mode 100644 index 00000000..5046c1be Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/ContactTipsVASFlagExt_QQTangVip.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/MainPanelServiceBarExt_XiaoYou.png b/imsclient/imsclient/Resources/theme/menu/MainPanelServiceBarExt_XiaoYou.png new file mode 100644 index 00000000..6e87b96d Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/MainPanelServiceBarExt_XiaoYou.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/MainPanelServiceBarExt_XiaoYou_2.png b/imsclient/imsclient/Resources/theme/menu/MainPanelServiceBarExt_XiaoYou_2.png new file mode 100644 index 00000000..efe968bc Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/MainPanelServiceBarExt_XiaoYou_2.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/QQCenter.png b/imsclient/imsclient/Resources/theme/menu/QQCenter.png new file mode 100644 index 00000000..108f2b26 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/QQCenter.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/QQMusicVip.png b/imsclient/imsclient/Resources/theme/menu/QQMusicVip.png new file mode 100644 index 00000000..95f2e4dd Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/QQMusicVip.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/VASFlagExt_HuaXia2_0.png b/imsclient/imsclient/Resources/theme/menu/VASFlagExt_HuaXia2_0.png new file mode 100644 index 00000000..a03e71c8 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/VASFlagExt_HuaXia2_0.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/adduser.png b/imsclient/imsclient/Resources/theme/menu/adduser.png new file mode 100644 index 00000000..47078d66 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/adduser.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/aio_toobar_Report.png b/imsclient/imsclient/Resources/theme/menu/aio_toobar_Report.png new file mode 100644 index 00000000..35b9105b Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/aio_toobar_Report.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/bell_16.png b/imsclient/imsclient/Resources/theme/menu/bell_16.png new file mode 100644 index 00000000..7aecdbdc Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/bell_16.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/bellwithscore_16.png b/imsclient/imsclient/Resources/theme/menu/bellwithscore_16.png new file mode 100644 index 00000000..dbec1a7b Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/bellwithscore_16.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/contactmgr.png b/imsclient/imsclient/Resources/theme/menu/contactmgr.png new file mode 100644 index 00000000..f372c8dc Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/contactmgr.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/crm.png b/imsclient/imsclient/Resources/theme/menu/crm.png new file mode 100644 index 00000000..7febfcd5 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/crm.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/cutline.png b/imsclient/imsclient/Resources/theme/menu/cutline.png new file mode 100644 index 00000000..b4138058 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/cutline.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/delfolder.png b/imsclient/imsclient/Resources/theme/menu/delfolder.png new file mode 100644 index 00000000..2c5c00c1 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/delfolder.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/deluser.png b/imsclient/imsclient/Resources/theme/menu/deluser.png new file mode 100644 index 00000000..d15e9aaf Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/deluser.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/groupmainpage.png b/imsclient/imsclient/Resources/theme/menu/groupmainpage.png new file mode 100644 index 00000000..476f8b19 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/groupmainpage.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/level0.bmp b/imsclient/imsclient/Resources/theme/menu/level0.bmp new file mode 100644 index 00000000..e95662e8 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/level0.bmp differ diff --git a/imsclient/imsclient/Resources/theme/menu/level1.bmp b/imsclient/imsclient/Resources/theme/menu/level1.bmp new file mode 100644 index 00000000..d6d257b0 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/level1.bmp differ diff --git a/imsclient/imsclient/Resources/theme/menu/level2.bmp b/imsclient/imsclient/Resources/theme/menu/level2.bmp new file mode 100644 index 00000000..0df5afa6 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/level2.bmp differ diff --git a/imsclient/imsclient/Resources/theme/menu/level3.bmp b/imsclient/imsclient/Resources/theme/menu/level3.bmp new file mode 100644 index 00000000..ca85eec8 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/level3.bmp differ diff --git a/imsclient/imsclient/Resources/theme/menu/level4.bmp b/imsclient/imsclient/Resources/theme/menu/level4.bmp new file mode 100644 index 00000000..dab512f8 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/level4.bmp differ diff --git a/imsclient/imsclient/Resources/theme/menu/level5.bmp b/imsclient/imsclient/Resources/theme/menu/level5.bmp new file mode 100644 index 00000000..565f9b25 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/level5.bmp differ diff --git a/imsclient/imsclient/Resources/theme/menu/main_gamebtn20_game.png b/imsclient/imsclient/Resources/theme/menu/main_gamebtn20_game.png new file mode 100644 index 00000000..90f0f1d2 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/main_gamebtn20_game.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/main_musicbtn20_music.png b/imsclient/imsclient/Resources/theme/menu/main_musicbtn20_music.png new file mode 100644 index 00000000..a5953134 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/main_musicbtn20_music.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/menu_arrow.png b/imsclient/imsclient/Resources/theme/menu/menu_arrow.png new file mode 100644 index 00000000..ac77711f Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/menu_arrow.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/menu_bkg.png b/imsclient/imsclient/Resources/theme/menu/menu_bkg.png new file mode 100644 index 00000000..0af2f658 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/menu_bkg.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/menu_bkg_board.png b/imsclient/imsclient/Resources/theme/menu/menu_bkg_board.png new file mode 100644 index 00000000..945796ea Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/menu_bkg_board.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/menu_cutling.png b/imsclient/imsclient/Resources/theme/menu/menu_cutling.png new file mode 100644 index 00000000..f8e51ef4 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/menu_cutling.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/menu_highlight.png b/imsclient/imsclient/Resources/theme/menu/menu_highlight.png new file mode 100644 index 00000000..c9738bdb Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/menu_highlight.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/modehead.png b/imsclient/imsclient/Resources/theme/menu/modehead.png new file mode 100644 index 00000000..b7e4fd08 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/modehead.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/moveuser.png b/imsclient/imsclient/Resources/theme/menu/moveuser.png new file mode 100644 index 00000000..11e24648 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/moveuser.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/msgmgr.png b/imsclient/imsclient/Resources/theme/menu/msgmgr.png new file mode 100644 index 00000000..652e8202 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/msgmgr.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/name.png b/imsclient/imsclient/Resources/theme/menu/name.png new file mode 100644 index 00000000..d30927d7 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/name.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/nopic.png b/imsclient/imsclient/Resources/theme/menu/nopic.png new file mode 100644 index 00000000..debb7925 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/nopic.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/rf.png b/imsclient/imsclient/Resources/theme/menu/rf.png new file mode 100644 index 00000000..d9651300 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/rf.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/search_16_with_shadow.png b/imsclient/imsclient/Resources/theme/menu/search_16_with_shadow.png new file mode 100644 index 00000000..66cff7dc Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/search_16_with_shadow.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/search_20.png b/imsclient/imsclient/Resources/theme/menu/search_20.png new file mode 100644 index 00000000..51426124 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/search_20.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/sendmsg.png b/imsclient/imsclient/Resources/theme/menu/sendmsg.png new file mode 100644 index 00000000..16bf1653 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/sendmsg.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/tenpay20.png b/imsclient/imsclient/Resources/theme/menu/tenpay20.png new file mode 100644 index 00000000..ac5adab2 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/tenpay20.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/tipicon_paddingDraw.png b/imsclient/imsclient/Resources/theme/menu/tipicon_paddingDraw.png new file mode 100644 index 00000000..967cb83b Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/tipicon_paddingDraw.png differ diff --git a/imsclient/imsclient/Resources/theme/menu/video.png b/imsclient/imsclient/Resources/theme/menu/video.png new file mode 100644 index 00000000..78de6124 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu/video.png differ diff --git "a/imsclient/imsclient/Resources/theme/menu/\345\244\215\344\273\266 menu_bkg.png" "b/imsclient/imsclient/Resources/theme/menu/\345\244\215\344\273\266 menu_bkg.png" new file mode 100644 index 00000000..0af2f658 Binary files /dev/null and "b/imsclient/imsclient/Resources/theme/menu/\345\244\215\344\273\266 menu_bkg.png" differ diff --git a/imsclient/imsclient/Resources/theme/menu_help.png b/imsclient/imsclient/Resources/theme/menu_help.png new file mode 100644 index 00000000..560337a5 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/menu_help.png differ diff --git a/imsclient/imsclient/Resources/theme/qq.ico b/imsclient/imsclient/Resources/theme/qq.ico new file mode 100644 index 00000000..9da0f6e5 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/qq.ico differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/Arrow.png b/imsclient/imsclient/Resources/theme/screenshot/Arrow.png new file mode 100644 index 00000000..372fb1fe Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/Arrow.png differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/Brush.PNG b/imsclient/imsclient/Resources/theme/screenshot/Brush.PNG new file mode 100644 index 00000000..cc0fd779 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/Brush.PNG differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/CameraToolbar_BtnDown.png b/imsclient/imsclient/Resources/theme/screenshot/CameraToolbar_BtnDown.png new file mode 100644 index 00000000..2bff7558 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/CameraToolbar_BtnDown.png differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/CameraToolbar_BtnHover.png b/imsclient/imsclient/Resources/theme/screenshot/CameraToolbar_BtnHover.png new file mode 100644 index 00000000..e54bce5e Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/CameraToolbar_BtnHover.png differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/CameraToolbar_BtnNormal.png b/imsclient/imsclient/Resources/theme/screenshot/CameraToolbar_BtnNormal.png new file mode 100644 index 00000000..73b0c6bf Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/CameraToolbar_BtnNormal.png differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/Circle.png b/imsclient/imsclient/Resources/theme/screenshot/Circle.png new file mode 100644 index 00000000..436b2251 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/Circle.png differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/Exit.png b/imsclient/imsclient/Resources/theme/screenshot/Exit.png new file mode 100644 index 00000000..8088b3af Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/Exit.png differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/Filter.png b/imsclient/imsclient/Resources/theme/screenshot/Filter.png new file mode 100644 index 00000000..6da1f356 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/Filter.png differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/ageing.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/ageing.jpg new file mode 100644 index 00000000..c6cccd22 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/ageing.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/ageing_hightlight.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/ageing_hightlight.jpg new file mode 100644 index 00000000..e91cfff9 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/ageing_hightlight.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/classiclomo.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/classiclomo.jpg new file mode 100644 index 00000000..f1dfe49b Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/classiclomo.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/classiclomo_hightlight.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/classiclomo_hightlight.jpg new file mode 100644 index 00000000..ae532b96 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/classiclomo_hightlight.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/copperplate.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/copperplate.jpg new file mode 100644 index 00000000..205502b1 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/copperplate.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/copperplate_hightlight.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/copperplate_hightlight.jpg new file mode 100644 index 00000000..404765df Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/copperplate_hightlight.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/graying.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/graying.jpg new file mode 100644 index 00000000..dbfde74d Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/graying.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/graying_hightlight.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/graying_hightlight.jpg new file mode 100644 index 00000000..14d72912 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/graying_hightlight.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/lomo.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/lomo.jpg new file mode 100644 index 00000000..73fb89f9 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/lomo.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/lomo_hightlight.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/lomo_hightlight.jpg new file mode 100644 index 00000000..c6519af3 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/lomo_hightlight.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/nightfall.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/nightfall.jpg new file mode 100644 index 00000000..24690dcb Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/nightfall.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/nightfall_hightlight.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/nightfall_hightlight.jpg new file mode 100644 index 00000000..02682b0e Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/nightfall_hightlight.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/original.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/original.jpg new file mode 100644 index 00000000..cc12870d Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/original.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/original_hightlight.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/original_hightlight.jpg new file mode 100644 index 00000000..29625d91 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/original_hightlight.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/polaroid.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/polaroid.jpg new file mode 100644 index 00000000..f3566ff9 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/polaroid.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/polaroid_hightlight.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/polaroid_hightlight.jpg new file mode 100644 index 00000000..77d9aabb Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/polaroid_hightlight.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/rainbow.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/rainbow.jpg new file mode 100644 index 00000000..651ac865 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/rainbow.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/rainbow_hightlight.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/rainbow_hightlight.jpg new file mode 100644 index 00000000..1bf9fe2e Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/rainbow_hightlight.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/sketch.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/sketch.jpg new file mode 100644 index 00000000..d9406eb5 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/sketch.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/sketch_hightlight.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/sketch_hightlight.jpg new file mode 100644 index 00000000..814f6826 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/sketch_hightlight.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/sunshine.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/sunshine.jpg new file mode 100644 index 00000000..55039fa1 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/sunshine.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/sunshine_hightlight.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/sunshine_hightlight.jpg new file mode 100644 index 00000000..4e8fd050 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/sunshine_hightlight.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/sweet.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/sweet.jpg new file mode 100644 index 00000000..f860f536 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/sweet.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/FilterBar/sweet_hightlight.jpg b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/sweet_hightlight.jpg new file mode 100644 index 00000000..4655c84c Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/FilterBar/sweet_hightlight.jpg differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/Finish.png b/imsclient/imsclient/Resources/theme/screenshot/Finish.png new file mode 100644 index 00000000..cdb6864d Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/Finish.png differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/LargeMagnifier.png b/imsclient/imsclient/Resources/theme/screenshot/LargeMagnifier.png new file mode 100644 index 00000000..c32e0b6a Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/LargeMagnifier.png differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/Magnifier.png b/imsclient/imsclient/Resources/theme/screenshot/Magnifier.png new file mode 100644 index 00000000..e12d5ebb Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/Magnifier.png differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/Rectangle.png b/imsclient/imsclient/Resources/theme/screenshot/Rectangle.png new file mode 100644 index 00000000..21674247 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/Rectangle.png differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/Save.png b/imsclient/imsclient/Resources/theme/screenshot/Save.png new file mode 100644 index 00000000..76881d57 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/Save.png differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/SinglePoint.PNG b/imsclient/imsclient/Resources/theme/screenshot/SinglePoint.PNG new file mode 100644 index 00000000..32d3597f Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/SinglePoint.PNG differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/Text.png b/imsclient/imsclient/Resources/theme/screenshot/Text.png new file mode 100644 index 00000000..3c1b4b6a Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/Text.png differ diff --git a/imsclient/imsclient/Resources/theme/screenshot/Undo.png b/imsclient/imsclient/Resources/theme/screenshot/Undo.png new file mode 100644 index 00000000..6f62ce6c Binary files /dev/null and b/imsclient/imsclient/Resources/theme/screenshot/Undo.png differ diff --git a/imsclient/imsclient/Resources/theme/state/IPhoneQQ_Head_Big.png b/imsclient/imsclient/Resources/theme/state/IPhoneQQ_Head_Big.png new file mode 100644 index 00000000..27b358bf Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/IPhoneQQ_Head_Big.png differ diff --git a/imsclient/imsclient/Resources/theme/state/ImQQAway.png b/imsclient/imsclient/Resources/theme/state/ImQQAway.png new file mode 100644 index 00000000..f3241e50 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/ImQQAway.png differ diff --git a/imsclient/imsclient/Resources/theme/state/ImQQBusy.png b/imsclient/imsclient/Resources/theme/state/ImQQBusy.png new file mode 100644 index 00000000..1ecbe2a1 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/ImQQBusy.png differ diff --git a/imsclient/imsclient/Resources/theme/state/ImQQMute.png b/imsclient/imsclient/Resources/theme/state/ImQQMute.png new file mode 100644 index 00000000..a2f86396 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/ImQQMute.png differ diff --git a/imsclient/imsclient/Resources/theme/state/ImQQOnline.png b/imsclient/imsclient/Resources/theme/state/ImQQOnline.png new file mode 100644 index 00000000..1e0797be Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/ImQQOnline.png differ diff --git a/imsclient/imsclient/Resources/theme/state/ImQQQme.png b/imsclient/imsclient/Resources/theme/state/ImQQQme.png new file mode 100644 index 00000000..fd8ba813 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/ImQQQme.png differ diff --git a/imsclient/imsclient/Resources/theme/state/MobilePhoneQQAway.png b/imsclient/imsclient/Resources/theme/state/MobilePhoneQQAway.png new file mode 100644 index 00000000..da9b104b Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/MobilePhoneQQAway.png differ diff --git a/imsclient/imsclient/Resources/theme/state/MobilePhoneQQBusy.png b/imsclient/imsclient/Resources/theme/state/MobilePhoneQQBusy.png new file mode 100644 index 00000000..e02c0fb9 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/MobilePhoneQQBusy.png differ diff --git a/imsclient/imsclient/Resources/theme/state/MobilePhoneQQOn.png b/imsclient/imsclient/Resources/theme/state/MobilePhoneQQOn.png new file mode 100644 index 00000000..6a3ab141 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/MobilePhoneQQOn.png differ diff --git a/imsclient/imsclient/Resources/theme/state/MobileWapQQAway.png b/imsclient/imsclient/Resources/theme/state/MobileWapQQAway.png new file mode 100644 index 00000000..f28331d0 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/MobileWapQQAway.png differ diff --git a/imsclient/imsclient/Resources/theme/state/MobileWapQQOn.png b/imsclient/imsclient/Resources/theme/state/MobileWapQQOn.png new file mode 100644 index 00000000..09e9ff25 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/MobileWapQQOn.png differ diff --git a/imsclient/imsclient/Resources/theme/state/QQForPad_Head_Big.png b/imsclient/imsclient/Resources/theme/state/QQForPad_Head_Big.png new file mode 100644 index 00000000..68a0f08a Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/QQForPad_Head_Big.png differ diff --git a/imsclient/imsclient/Resources/theme/state/Qme.png b/imsclient/imsclient/Resources/theme/state/Qme.png new file mode 100644 index 00000000..cd26deed Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/Qme.png differ diff --git a/imsclient/imsclient/Resources/theme/state/WebQQAway.png b/imsclient/imsclient/Resources/theme/state/WebQQAway.png new file mode 100644 index 00000000..4fb9c9da Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/WebQQAway.png differ diff --git a/imsclient/imsclient/Resources/theme/state/WebQQBusy.png b/imsclient/imsclient/Resources/theme/state/WebQQBusy.png new file mode 100644 index 00000000..db390f4f Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/WebQQBusy.png differ diff --git a/imsclient/imsclient/Resources/theme/state/WebQQMute.png b/imsclient/imsclient/Resources/theme/state/WebQQMute.png new file mode 100644 index 00000000..89585261 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/WebQQMute.png differ diff --git a/imsclient/imsclient/Resources/theme/state/WebQQOnline.png b/imsclient/imsclient/Resources/theme/state/WebQQOnline.png new file mode 100644 index 00000000..bdec10ca Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/WebQQOnline.png differ diff --git a/imsclient/imsclient/Resources/theme/state/WebQQQme.png b/imsclient/imsclient/Resources/theme/state/WebQQQme.png new file mode 100644 index 00000000..01593333 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/WebQQQme.png differ diff --git a/imsclient/imsclient/Resources/theme/state/away.png b/imsclient/imsclient/Resources/theme/state/away.png new file mode 100644 index 00000000..f18522c0 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/away.png differ diff --git a/imsclient/imsclient/Resources/theme/state/busy.png b/imsclient/imsclient/Resources/theme/state/busy.png new file mode 100644 index 00000000..ded37178 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/busy.png differ diff --git a/imsclient/imsclient/Resources/theme/state/imoffline.png b/imsclient/imsclient/Resources/theme/state/imoffline.png new file mode 100644 index 00000000..6547348d Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/imoffline.png differ diff --git a/imsclient/imsclient/Resources/theme/state/imonline.png b/imsclient/imsclient/Resources/theme/state/imonline.png new file mode 100644 index 00000000..7c228374 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/imonline.png differ diff --git a/imsclient/imsclient/Resources/theme/state/invisible.png b/imsclient/imsclient/Resources/theme/state/invisible.png new file mode 100644 index 00000000..7bda8ac9 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/invisible.png differ diff --git a/imsclient/imsclient/Resources/theme/state/mute.png b/imsclient/imsclient/Resources/theme/state/mute.png new file mode 100644 index 00000000..889d2e3c Binary files /dev/null and b/imsclient/imsclient/Resources/theme/state/mute.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/AIO_SetBtn_down.png b/imsclient/imsclient/Resources/theme/systembutton/AIO_SetBtn_down.png new file mode 100644 index 00000000..7442d50a Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/AIO_SetBtn_down.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/AIO_SetBtn_highlight.png b/imsclient/imsclient/Resources/theme/systembutton/AIO_SetBtn_highlight.png new file mode 100644 index 00000000..65a9aca4 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/AIO_SetBtn_highlight.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/AIO_SetBtn_highlight_normal.png b/imsclient/imsclient/Resources/theme/systembutton/AIO_SetBtn_highlight_normal.png new file mode 100644 index 00000000..f297fbc7 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/AIO_SetBtn_highlight_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/AIO_SetBtn_normal.png b/imsclient/imsclient/Resources/theme/systembutton/AIO_SetBtn_normal.png new file mode 100644 index 00000000..55894240 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/AIO_SetBtn_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/btn_Skin_down.png b/imsclient/imsclient/Resources/theme/systembutton/btn_Skin_down.png new file mode 100644 index 00000000..52ccdc4b Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/btn_Skin_down.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/btn_Skin_highlight.png b/imsclient/imsclient/Resources/theme/systembutton/btn_Skin_highlight.png new file mode 100644 index 00000000..d500f40a Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/btn_Skin_highlight.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/btn_Skin_normal.png b/imsclient/imsclient/Resources/theme/systembutton/btn_Skin_normal.png new file mode 100644 index 00000000..07930e6e Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/btn_Skin_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/btn_close_down.png b/imsclient/imsclient/Resources/theme/systembutton/btn_close_down.png new file mode 100644 index 00000000..ba2a7ea0 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/btn_close_down.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/btn_close_highlight.png b/imsclient/imsclient/Resources/theme/systembutton/btn_close_highlight.png new file mode 100644 index 00000000..21df4c35 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/btn_close_highlight.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/btn_close_normal.png b/imsclient/imsclient/Resources/theme/systembutton/btn_close_normal.png new file mode 100644 index 00000000..e81c2f86 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/btn_close_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/btn_max_down.png b/imsclient/imsclient/Resources/theme/systembutton/btn_max_down.png new file mode 100644 index 00000000..e8a4de4d Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/btn_max_down.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/btn_max_highlight.png b/imsclient/imsclient/Resources/theme/systembutton/btn_max_highlight.png new file mode 100644 index 00000000..a41dc441 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/btn_max_highlight.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/btn_max_normal.png b/imsclient/imsclient/Resources/theme/systembutton/btn_max_normal.png new file mode 100644 index 00000000..b7298b9e Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/btn_max_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/btn_mini_down.png b/imsclient/imsclient/Resources/theme/systembutton/btn_mini_down.png new file mode 100644 index 00000000..546cedf9 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/btn_mini_down.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/btn_mini_highlight.png b/imsclient/imsclient/Resources/theme/systembutton/btn_mini_highlight.png new file mode 100644 index 00000000..c3a6a66b Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/btn_mini_highlight.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/btn_mini_normal.png b/imsclient/imsclient/Resources/theme/systembutton/btn_mini_normal.png new file mode 100644 index 00000000..dc7f38ef Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/btn_mini_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/btn_restore_down.png b/imsclient/imsclient/Resources/theme/systembutton/btn_restore_down.png new file mode 100644 index 00000000..d55d7074 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/btn_restore_down.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/btn_restore_highlight.png b/imsclient/imsclient/Resources/theme/systembutton/btn_restore_highlight.png new file mode 100644 index 00000000..577a4908 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/btn_restore_highlight.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/btn_restore_normal.png b/imsclient/imsclient/Resources/theme/systembutton/btn_restore_normal.png new file mode 100644 index 00000000..ced23215 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/btn_restore_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/btn_set_hover.png b/imsclient/imsclient/Resources/theme/systembutton/btn_set_hover.png new file mode 100644 index 00000000..149b8d45 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/btn_set_hover.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/btn_set_normal.png b/imsclient/imsclient/Resources/theme/systembutton/btn_set_normal.png new file mode 100644 index 00000000..488b427c Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/btn_set_normal.png differ diff --git a/imsclient/imsclient/Resources/theme/systembutton/btn_set_press.png b/imsclient/imsclient/Resources/theme/systembutton/btn_set_press.png new file mode 100644 index 00000000..5f5558a5 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/systembutton/btn_set_press.png differ diff --git a/imsclient/imsclient/Resources/theme/tray/Qme.ico b/imsclient/imsclient/Resources/theme/tray/Qme.ico new file mode 100644 index 00000000..b71d72de Binary files /dev/null and b/imsclient/imsclient/Resources/theme/tray/Qme.ico differ diff --git a/imsclient/imsclient/Resources/theme/tray/away.ico b/imsclient/imsclient/Resources/theme/tray/away.ico new file mode 100644 index 00000000..6010dc79 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/tray/away.ico differ diff --git a/imsclient/imsclient/Resources/theme/tray/busy.ico b/imsclient/imsclient/Resources/theme/tray/busy.ico new file mode 100644 index 00000000..aae97392 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/tray/busy.ico differ diff --git a/imsclient/imsclient/Resources/theme/tray/imonline.ico b/imsclient/imsclient/Resources/theme/tray/imonline.ico new file mode 100644 index 00000000..cbcc935f Binary files /dev/null and b/imsclient/imsclient/Resources/theme/tray/imonline.ico differ diff --git a/imsclient/imsclient/Resources/theme/tray/invisible.ico b/imsclient/imsclient/Resources/theme/tray/invisible.ico new file mode 100644 index 00000000..86050257 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/tray/invisible.ico differ diff --git a/imsclient/imsclient/Resources/theme/tray/mute.ico b/imsclient/imsclient/Resources/theme/tray/mute.ico new file mode 100644 index 00000000..fdad62df Binary files /dev/null and b/imsclient/imsclient/Resources/theme/tray/mute.ico differ diff --git a/imsclient/imsclient/Resources/theme/tray/offline.ico b/imsclient/imsclient/Resources/theme/tray/offline.ico new file mode 100644 index 00000000..f4046422 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/tray/offline.ico differ diff --git a/imsclient/imsclient/Resources/theme/vip_setup.png b/imsclient/imsclient/Resources/theme/vip_setup.png new file mode 100644 index 00000000..c330e7c2 Binary files /dev/null and b/imsclient/imsclient/Resources/theme/vip_setup.png differ diff --git a/imsclient/imsclient/Resources/weather/adver.png b/imsclient/imsclient/Resources/weather/adver.png new file mode 100644 index 00000000..5710783c Binary files /dev/null and b/imsclient/imsclient/Resources/weather/adver.png differ diff --git a/imsclient/imsclient/Resources/weather/big_chance_of_rain.png b/imsclient/imsclient/Resources/weather/big_chance_of_rain.png new file mode 100644 index 00000000..10988e3b Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_chance_of_rain.png differ diff --git a/imsclient/imsclient/Resources/weather/big_chance_of_snow.png b/imsclient/imsclient/Resources/weather/big_chance_of_snow.png new file mode 100644 index 00000000..f00ef39f Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_chance_of_snow.png differ diff --git a/imsclient/imsclient/Resources/weather/big_chance_of_storm.png b/imsclient/imsclient/Resources/weather/big_chance_of_storm.png new file mode 100644 index 00000000..339085e5 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_chance_of_storm.png differ diff --git a/imsclient/imsclient/Resources/weather/big_chance_of_tstorm.png b/imsclient/imsclient/Resources/weather/big_chance_of_tstorm.png new file mode 100644 index 00000000..364dbbbf Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_chance_of_tstorm.png differ diff --git a/imsclient/imsclient/Resources/weather/big_cloudy.png b/imsclient/imsclient/Resources/weather/big_cloudy.png new file mode 100644 index 00000000..2539480d Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_cloudy.png differ diff --git a/imsclient/imsclient/Resources/weather/big_cn_cloudy.png b/imsclient/imsclient/Resources/weather/big_cn_cloudy.png new file mode 100644 index 00000000..2539480d Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_cn_cloudy.png differ diff --git a/imsclient/imsclient/Resources/weather/big_cn_fog.png b/imsclient/imsclient/Resources/weather/big_cn_fog.png new file mode 100644 index 00000000..3ea4ddbd Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_cn_fog.png differ diff --git a/imsclient/imsclient/Resources/weather/big_cn_heavyrain.png b/imsclient/imsclient/Resources/weather/big_cn_heavyrain.png new file mode 100644 index 00000000..509df1fe Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_cn_heavyrain.png differ diff --git a/imsclient/imsclient/Resources/weather/big_cn_heavysnow.png b/imsclient/imsclient/Resources/weather/big_cn_heavysnow.png new file mode 100644 index 00000000..3b9561d9 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_cn_heavysnow.png differ diff --git a/imsclient/imsclient/Resources/weather/big_cn_lightrain.png b/imsclient/imsclient/Resources/weather/big_cn_lightrain.png new file mode 100644 index 00000000..a646a0e2 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_cn_lightrain.png differ diff --git a/imsclient/imsclient/Resources/weather/big_cn_overcast.png b/imsclient/imsclient/Resources/weather/big_cn_overcast.png new file mode 100644 index 00000000..2539480d Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_cn_overcast.png differ diff --git a/imsclient/imsclient/Resources/weather/big_cn_showers.png b/imsclient/imsclient/Resources/weather/big_cn_showers.png new file mode 100644 index 00000000..10988e3b Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_cn_showers.png differ diff --git a/imsclient/imsclient/Resources/weather/big_dust.png b/imsclient/imsclient/Resources/weather/big_dust.png new file mode 100644 index 00000000..432ad67a Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_dust.png differ diff --git a/imsclient/imsclient/Resources/weather/big_flurries.png b/imsclient/imsclient/Resources/weather/big_flurries.png new file mode 100644 index 00000000..ebaf8a01 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_flurries.png differ diff --git a/imsclient/imsclient/Resources/weather/big_fog.png b/imsclient/imsclient/Resources/weather/big_fog.png new file mode 100644 index 00000000..3ea4ddbd Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_fog.png differ diff --git a/imsclient/imsclient/Resources/weather/big_haze.png b/imsclient/imsclient/Resources/weather/big_haze.png new file mode 100644 index 00000000..fea803f9 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_haze.png differ diff --git a/imsclient/imsclient/Resources/weather/big_icy.png b/imsclient/imsclient/Resources/weather/big_icy.png new file mode 100644 index 00000000..6d14456a Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_icy.png differ diff --git a/imsclient/imsclient/Resources/weather/big_mist.png b/imsclient/imsclient/Resources/weather/big_mist.png new file mode 100644 index 00000000..ea5b56c6 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_mist.png differ diff --git a/imsclient/imsclient/Resources/weather/big_mostly_cloudy.png b/imsclient/imsclient/Resources/weather/big_mostly_cloudy.png new file mode 100644 index 00000000..d4fe3ea3 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_mostly_cloudy.png differ diff --git a/imsclient/imsclient/Resources/weather/big_mostly_sunny.png b/imsclient/imsclient/Resources/weather/big_mostly_sunny.png new file mode 100644 index 00000000..8d3f1fec Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_mostly_sunny.png differ diff --git a/imsclient/imsclient/Resources/weather/big_partly_cloudy.png b/imsclient/imsclient/Resources/weather/big_partly_cloudy.png new file mode 100644 index 00000000..1ae24ca7 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_partly_cloudy.png differ diff --git a/imsclient/imsclient/Resources/weather/big_rain.png b/imsclient/imsclient/Resources/weather/big_rain.png new file mode 100644 index 00000000..a646a0e2 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_rain.png differ diff --git a/imsclient/imsclient/Resources/weather/big_sleet.png b/imsclient/imsclient/Resources/weather/big_sleet.png new file mode 100644 index 00000000..3b9561d9 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_sleet.png differ diff --git a/imsclient/imsclient/Resources/weather/big_smoke.png b/imsclient/imsclient/Resources/weather/big_smoke.png new file mode 100644 index 00000000..3ea4ddbd Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_smoke.png differ diff --git a/imsclient/imsclient/Resources/weather/big_snow.png b/imsclient/imsclient/Resources/weather/big_snow.png new file mode 100644 index 00000000..3b9561d9 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_snow.png differ diff --git a/imsclient/imsclient/Resources/weather/big_storm.png b/imsclient/imsclient/Resources/weather/big_storm.png new file mode 100644 index 00000000..509df1fe Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_storm.png differ diff --git a/imsclient/imsclient/Resources/weather/big_sunny.png b/imsclient/imsclient/Resources/weather/big_sunny.png new file mode 100644 index 00000000..3c45150f Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_sunny.png differ diff --git a/imsclient/imsclient/Resources/weather/big_thunderstorm.png b/imsclient/imsclient/Resources/weather/big_thunderstorm.png new file mode 100644 index 00000000..c50c794e Binary files /dev/null and b/imsclient/imsclient/Resources/weather/big_thunderstorm.png differ diff --git a/imsclient/imsclient/Resources/weather/chance_of_rain.png b/imsclient/imsclient/Resources/weather/chance_of_rain.png new file mode 100644 index 00000000..03585747 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/chance_of_rain.png differ diff --git a/imsclient/imsclient/Resources/weather/chance_of_snow.png b/imsclient/imsclient/Resources/weather/chance_of_snow.png new file mode 100644 index 00000000..e192ee39 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/chance_of_snow.png differ diff --git a/imsclient/imsclient/Resources/weather/chance_of_storm.png b/imsclient/imsclient/Resources/weather/chance_of_storm.png new file mode 100644 index 00000000..a45f69fc Binary files /dev/null and b/imsclient/imsclient/Resources/weather/chance_of_storm.png differ diff --git a/imsclient/imsclient/Resources/weather/chance_of_tstorm.png b/imsclient/imsclient/Resources/weather/chance_of_tstorm.png new file mode 100644 index 00000000..6252babb Binary files /dev/null and b/imsclient/imsclient/Resources/weather/chance_of_tstorm.png differ diff --git a/imsclient/imsclient/Resources/weather/cloudy.png b/imsclient/imsclient/Resources/weather/cloudy.png new file mode 100644 index 00000000..4795b8bd Binary files /dev/null and b/imsclient/imsclient/Resources/weather/cloudy.png differ diff --git a/imsclient/imsclient/Resources/weather/cn_cloudy.png b/imsclient/imsclient/Resources/weather/cn_cloudy.png new file mode 100644 index 00000000..4795b8bd Binary files /dev/null and b/imsclient/imsclient/Resources/weather/cn_cloudy.png differ diff --git a/imsclient/imsclient/Resources/weather/cn_fog.png b/imsclient/imsclient/Resources/weather/cn_fog.png new file mode 100644 index 00000000..55a015c6 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/cn_fog.png differ diff --git a/imsclient/imsclient/Resources/weather/cn_heavyrain.png b/imsclient/imsclient/Resources/weather/cn_heavyrain.png new file mode 100644 index 00000000..aee98365 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/cn_heavyrain.png differ diff --git a/imsclient/imsclient/Resources/weather/cn_heavysnow.png b/imsclient/imsclient/Resources/weather/cn_heavysnow.png new file mode 100644 index 00000000..9726e6fd Binary files /dev/null and b/imsclient/imsclient/Resources/weather/cn_heavysnow.png differ diff --git a/imsclient/imsclient/Resources/weather/cn_lightrain.png b/imsclient/imsclient/Resources/weather/cn_lightrain.png new file mode 100644 index 00000000..895651a0 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/cn_lightrain.png differ diff --git a/imsclient/imsclient/Resources/weather/cn_overcast.png b/imsclient/imsclient/Resources/weather/cn_overcast.png new file mode 100644 index 00000000..4795b8bd Binary files /dev/null and b/imsclient/imsclient/Resources/weather/cn_overcast.png differ diff --git a/imsclient/imsclient/Resources/weather/cn_showers.png b/imsclient/imsclient/Resources/weather/cn_showers.png new file mode 100644 index 00000000..03585747 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/cn_showers.png differ diff --git a/imsclient/imsclient/Resources/weather/dust.png b/imsclient/imsclient/Resources/weather/dust.png new file mode 100644 index 00000000..8a41f47e Binary files /dev/null and b/imsclient/imsclient/Resources/weather/dust.png differ diff --git a/imsclient/imsclient/Resources/weather/flurries.png b/imsclient/imsclient/Resources/weather/flurries.png new file mode 100644 index 00000000..69ab64b2 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/flurries.png differ diff --git a/imsclient/imsclient/Resources/weather/fog.png b/imsclient/imsclient/Resources/weather/fog.png new file mode 100644 index 00000000..55a015c6 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/fog.png differ diff --git a/imsclient/imsclient/Resources/weather/haze.png b/imsclient/imsclient/Resources/weather/haze.png new file mode 100644 index 00000000..bf5ac578 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/haze.png differ diff --git a/imsclient/imsclient/Resources/weather/icy.png b/imsclient/imsclient/Resources/weather/icy.png new file mode 100644 index 00000000..dfb75075 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/icy.png differ diff --git a/imsclient/imsclient/Resources/weather/mist.png b/imsclient/imsclient/Resources/weather/mist.png new file mode 100644 index 00000000..df7eb2bf Binary files /dev/null and b/imsclient/imsclient/Resources/weather/mist.png differ diff --git a/imsclient/imsclient/Resources/weather/mostly_cloudy.png b/imsclient/imsclient/Resources/weather/mostly_cloudy.png new file mode 100644 index 00000000..f2149d51 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/mostly_cloudy.png differ diff --git a/imsclient/imsclient/Resources/weather/mostly_sunny.png b/imsclient/imsclient/Resources/weather/mostly_sunny.png new file mode 100644 index 00000000..42cbeee8 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/mostly_sunny.png differ diff --git a/imsclient/imsclient/Resources/weather/partly_cloudy.png b/imsclient/imsclient/Resources/weather/partly_cloudy.png new file mode 100644 index 00000000..31d43b62 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/partly_cloudy.png differ diff --git a/imsclient/imsclient/Resources/weather/rain.png b/imsclient/imsclient/Resources/weather/rain.png new file mode 100644 index 00000000..895651a0 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/rain.png differ diff --git a/imsclient/imsclient/Resources/weather/sleet.png b/imsclient/imsclient/Resources/weather/sleet.png new file mode 100644 index 00000000..9726e6fd Binary files /dev/null and b/imsclient/imsclient/Resources/weather/sleet.png differ diff --git a/imsclient/imsclient/Resources/weather/smoke.png b/imsclient/imsclient/Resources/weather/smoke.png new file mode 100644 index 00000000..55a015c6 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/smoke.png differ diff --git a/imsclient/imsclient/Resources/weather/snow.png b/imsclient/imsclient/Resources/weather/snow.png new file mode 100644 index 00000000..9726e6fd Binary files /dev/null and b/imsclient/imsclient/Resources/weather/snow.png differ diff --git a/imsclient/imsclient/Resources/weather/storm.png b/imsclient/imsclient/Resources/weather/storm.png new file mode 100644 index 00000000..aee98365 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/storm.png differ diff --git a/imsclient/imsclient/Resources/weather/sunny.png b/imsclient/imsclient/Resources/weather/sunny.png new file mode 100644 index 00000000..5ce47788 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/sunny.png differ diff --git a/imsclient/imsclient/Resources/weather/thunderstorm.png b/imsclient/imsclient/Resources/weather/thunderstorm.png new file mode 100644 index 00000000..190f6962 Binary files /dev/null and b/imsclient/imsclient/Resources/weather/thunderstorm.png differ diff --git a/imsclient/imsclient/imsclient.rc b/imsclient/imsclient/imsclient.rc new file mode 100644 index 00000000..34b49b30 --- /dev/null +++ b/imsclient/imsclient/imsclient.rc @@ -0,0 +1,72 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// 中文(中华人民共和国) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) +#ifdef _WIN32 +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED +#pragma code_page(936) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "Resources\\theme\\QQ.ico" +#endif // 中文(中华人民共和国) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/imsclient/imsclient/imsclient.vcproj b/imsclient/imsclient/imsclient.vcproj new file mode 100644 index 00000000..692caab9 --- /dev/null +++ b/imsclient/imsclient/imsclient.vcproj @@ -0,0 +1,10654 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/imsclient/imsclient/imsclient.vcxproj b/imsclient/imsclient/imsclient.vcxproj new file mode 100644 index 00000000..503ade3f --- /dev/null +++ b/imsclient/imsclient/imsclient.vcxproj @@ -0,0 +1,2310 @@ +锘 + + + + Debug + Win32 + + + Release + Win32 + + + + {217E926B-8681-47A8-99CC-5320B4749B2A} + Qt4VSv1.0 + 10.0.10240.0 + + + + Application + v100 + + + Application + v140 + + + + + + + + + + + + + <_ProjectFileVersion>14.0.24720.0 + + + $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Configuration)\ + + + $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Configuration)\ + + + + .\GeneratedFiles;$(QTDIR)\include;.\GeneratedFiles\$(Configuration);$(QTDIR)\include\qtmain;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;.\;$(QTDIR)\include\QtNetwork;%(AdditionalIncludeDirectories) + UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_NETWORK_LIB;%(PreprocessorDefinitions) + MultiThreadedDLL + false + + + + qtmain.lib;QtCore4.lib;QtGui4.lib;QtNetwork4.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + $(QTDIR)\lib;%(AdditionalLibraryDirectories) + false + Windows + + + + + Disabled + .\GeneratedFiles;$(QTDIR)\include;.\GeneratedFiles\$(Configuration);$(QTDIR)\include\qtmain;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;.\;$(QTDIR)\include\QtNetwork;%(AdditionalIncludeDirectories) + UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_CORE_LIB;QT_GUI_LIB;QT_NETWORK_LIB;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + false + ProgramDatabase + + + qtmaind.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Networkd.lib;Qt5Widgetsd.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + $(QTDIR)\lib;%(AdditionalLibraryDirectories) + true + Windows + + + + + + + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + + + + + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + + + + + + + + + + + + + + + + + + + + + + + Moc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(Configuration)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I$(QTDIR)\include\QtNetwork" ".\imsimageaccount.h" -o ".\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp" + + $(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs) + .\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp;%(Outputs) + Moc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(Configuration)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I$(QTDIR)\include\QtNetwork" ".\imsimageaccount.h" -o ".\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp" + + $(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs) + .\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp;%(Outputs) + + + Moc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(Configuration)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I$(QTDIR)\include\QtNetwork" ".\imsimagelabel.h" -o ".\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp" + + $(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs) + .\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp;%(Outputs) + Moc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(Configuration)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I$(QTDIR)\include\QtNetwork" ".\imsimagelabel.h" -o ".\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp" + + $(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs) + .\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp;%(Outputs) + + + Moc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(Configuration)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I$(QTDIR)\include\QtNetwork" ".\imsimagelineedit.h" -o ".\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp" + + $(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs) + .\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp;%(Outputs) + Moc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(Configuration)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I$(QTDIR)\include\QtNetwork" ".\imsimagelineedit.h" -o ".\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp" + + $(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs) + .\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp;%(Outputs) + + + + + Moc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(Configuration)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I$(QTDIR)\include\QtNetwork" ".\uiapplicationmanager.h" -o ".\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp" + + $(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs) + .\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp;%(Outputs) + Moc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(Configuration)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I$(QTDIR)\include\QtNetwork" ".\uiapplicationmanager.h" -o ".\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp" + + $(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs) + .\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp;%(Outputs) + + + Moc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(Configuration)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I$(QTDIR)\include\QtNetwork" ".\uiimsbasedialog.h" -o ".\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp" + + $(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs) + .\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp;%(Outputs) + Moc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(Configuration)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I$(QTDIR)\include\QtNetwork" ".\uiimsbasedialog.h" -o ".\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp" + + $(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs) + .\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp;%(Outputs) + + + Moc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(Configuration)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I$(QTDIR)\include\QtNetwork" ".\uiinterfacemanager.h" -o ".\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp" + + $(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs) + .\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp;%(Outputs) + Moc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(Configuration)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I$(QTDIR)\include\QtNetwork" ".\uiinterfacemanager.h" -o ".\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp" + + $(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs) + .\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp;%(Outputs) + + + Moc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(Configuration)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I$(QTDIR)\include\QtNetwork" ".\uiloginscreen.h" -o ".\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp" + + $(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs) + .\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp;%(Outputs) + Moc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(Configuration)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I$(QTDIR)\include\QtNetwork" ".\uiloginscreen.h" -o ".\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp" + + $(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs) + .\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp;%(Outputs) + + + Moc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(Configuration)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I$(QTDIR)\include\QtNetwork" ".\uitabwidget.h" -o ".\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp" + + $(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs) + .\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp;%(Outputs) + Moc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(Configuration)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I$(QTDIR)\include\QtNetwork" ".\uitabwidget.h" -o ".\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp" + + $(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs) + .\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp;%(Outputs) + + + Moc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(Configuration)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I$(QTDIR)\include\QtNetwork" ".\uiweatherinfo.h" -o ".\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp" + + $(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs) + .\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp;%(Outputs) + Moc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(Configuration)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I$(QTDIR)\include\QtNetwork" ".\uiweatherinfo.h" -o ".\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp" + + $(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs) + .\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp;%(Outputs) + + + Moc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(Configuration)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I$(QTDIR)\include\QtNetwork" ".\workstation.h" -o ".\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp" + + $(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs) + .\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp;%(Outputs) + Moc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(Configuration)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I$(QTDIR)\include\QtNetwork" ".\workstation.h" -o ".\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp" + + $(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs) + .\GeneratedFiles\$(Configuration)\moc_%(Filename).cpp;%(Outputs) + + + + + true + true + + + Uic%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + + $(QTDIR)\bin\uic.exe;%(AdditionalInputs) + .\GeneratedFiles\ui_%(Filename).h;%(Outputs) + Uic%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + + $(QTDIR)\bin\uic.exe;%(AdditionalInputs) + .\GeneratedFiles\ui_%(Filename).h;%(Outputs) + + + Uic%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + + $(QTDIR)\bin\uic.exe;%(AdditionalInputs) + .\GeneratedFiles\ui_%(Filename).h;%(Outputs) + Uic%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + + $(QTDIR)\bin\uic.exe;%(AdditionalInputs) + .\GeneratedFiles\ui_%(Filename).h;%(Outputs) + + + Uic%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + + $(QTDIR)\bin\uic.exe;%(AdditionalInputs) + .\GeneratedFiles\ui_%(Filename).h;%(Outputs) + Uic%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + + $(QTDIR)\bin\uic.exe;%(AdditionalInputs) + .\GeneratedFiles\ui_%(Filename).h;%(Outputs) + + + Uic%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + + $(QTDIR)\bin\uic.exe;%(AdditionalInputs) + .\GeneratedFiles\ui_%(Filename).h;%(Outputs) + Uic%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + + $(QTDIR)\bin\uic.exe;%(AdditionalInputs) + .\GeneratedFiles\ui_%(Filename).h;%(Outputs) + + + Rcc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp + + %(FullPath);.\Resources\theme\appmanager\more_app_btn_normal.png;.\Resources\theme\appmanager\app_bkg_hover.png;.\Resources\theme\appmanager\app_bkg_normal.png;.\Resources\theme\appmanager\app_bkg_push.png;.\Resources\theme\appmanager\app_manager_icon.png;.\Resources\theme\appmanager\appbox_mgr_btn.png;.\Resources\theme\appmanager\fav_app_empty.png;.\Resources\theme\appmanager\more_app_btn_down.png;.\Resources\theme\appmanager\more_app_btn_hover.png;.\Resources\theme\ChatFrame\Wireless.png;.\Resources\theme\ChatFrame\aio_quickbar_cut.png;.\Resources\theme\ChatFrame\aio_quickbar_face.png;.\Resources\theme\ChatFrame\aio_quickbar_flirtationface.png;.\Resources\theme\ChatFrame\aio_quickbar_font.png;.\Resources\theme\ChatFrame\aio_quickbar_inputassist.png;.\Resources\theme\ChatFrame\aio_quickbar_inputassist_dropdown.png;.\Resources\theme\ChatFrame\aio_quickbar_more.png;.\Resources\theme\ChatFrame\aio_quickbar_register.png;.\Resources\theme\ChatFrame\aio_quickbar_richface.png;.\Resources\theme\ChatFrame\aio_quickbar_screen1.png;.\Resources\theme\ChatFrame\aio_quickbar_screen2.png;.\Resources\theme\ChatFrame\aio_quickbar_sendpic.png;.\Resources\theme\ChatFrame\aio_quickbar_sysfont_tab_button.png;.\Resources\theme\ChatFrame\aio_quickbar_twitter.png;.\Resources\theme\ChatFrame\aio_toobar_add.png;.\Resources\theme\ChatFrame\aio_toobar_addhuman.png;.\Resources\theme\ChatFrame\aio_toobar_app.png;.\Resources\theme\ChatFrame\aio_toobar_block.png;.\Resources\theme\ChatFrame\aio_toobar_game.png;.\Resources\theme\ChatFrame\AM_MenuICON.png;.\Resources\theme\ChatFrame\AppMenuExt_DeleteFriend.png;.\Resources\theme\ChatFrame\AppMenuExt_ImPeachUin.png;.\Resources\theme\ChatFrame\AppMenuExt_MoveToBlackList.png;.\Resources\theme\ChatFrame\Bold.png;.\Resources\theme\ChatFrame\btnleft_down.png;.\Resources\theme\ChatFrame\btnleft_focus_down.png;.\Resources\theme\ChatFrame\btnleft_focus_highlight.png;.\Resources\theme\ChatFrame\btnleft_focus_normal.png;.\Resources\theme\ChatFrame\btnleft_highlight.png;.\Resources\theme\ChatFrame\btnleft_normal.png;.\Resources\theme\ChatFrame\btnright_down.png;.\Resources\theme\ChatFrame\btnright_focus_down.png;.\Resources\theme\ChatFrame\btnright_focus_highlight.png;.\Resources\theme\ChatFrame\btnright_focus_normal.png;.\Resources\theme\ChatFrame\btnright_highlight.png;.\Resources\theme\ChatFrame\btnright_normal.png;.\Resources\theme\ChatFrame\color.png;.\Resources\theme\ChatFrame\ContactMgr.png;.\Resources\theme\ChatFrame\deta.png;.\Resources\theme\ChatFrame\GroupDyncIcon.png;.\Resources\theme\ChatFrame\Import.png;.\Resources\theme\ChatFrame\Italic.png;.\Resources\theme\ChatFrame\mainmenu_allservices.png;.\Resources\theme\ChatFrame\mainmenu_imqqcom.png;.\Resources\theme\ChatFrame\mainmenu_NewsOrder.png;.\Resources\theme\ChatFrame\MainPanelVasIcon.png;.\Resources\theme\ChatFrame\menu_changepswd.png;.\Resources\theme\ChatFrame\menu_exit.png;.\Resources\theme\ChatFrame\menu_filemanager.png;.\Resources\theme\ChatFrame\menu_switch.png;.\Resources\theme\ChatFrame\MiniService.png;.\Resources\theme\ChatFrame\msg_upload.png;.\Resources\theme\ChatFrame\msgmgr.png;.\Resources\theme\ChatFrame\note0.png;.\Resources\theme\ChatFrame\note1.png;.\Resources\theme\ChatFrame\OnlineUpdate.png;.\Resources\theme\ChatFrame\QA.png;.\Resources\theme\ChatFrame\QQ_TempSession.png;.\Resources\theme\ChatFrame\QQZone.png;.\Resources\theme\ChatFrame\recover.png;.\Resources\theme\ChatFrame\safe.png;.\Resources\theme\ChatFrame\save_16.png;.\Resources\theme\ChatFrame\SoSo.png;.\Resources\theme\ChatFrame\TencentNet.png;.\Resources\theme\ChatFrame\Tools.png;.\Resources\theme\ChatFrame\underline.png;.\Resources\theme\ChatFrame\WhatsNew.png;.\Resources\theme\interface\AreaIcon.png;.\Resources\theme\interface\AreaMainIcon.png;.\Resources\theme\interface\AreaMainIcon_2.png;.\Resources\theme\interface\AreaPresentMgr_RBMenu.png;.\Resources\theme\interface\autograph.png;.\Resources\theme\interface\downbtn.png;.\Resources\theme\interface\fengmian_1.png;.\Resources\theme\interface\friendicon.png;.\Resources\theme\interface\head_bkg__normal.png;.\Resources\theme\interface\head_bkg_highlight.png;.\Resources\theme\interface\icon_contacts_selected_Blue.png;.\Resources\theme\interface\icon_group_selected_Blue.png;.\Resources\theme\interface\icon_last_selected_Blue.png;.\Resources\theme\interface\jingdian_2.png;.\Resources\theme\interface\leftdown.png;.\Resources\theme\interface\leftmouseover.png;.\Resources\theme\interface\leftnormal.png;.\Resources\theme\interface\MaterialAlphaSet.png;.\Resources\theme\interface\Messagebox18_highlight.png;.\Resources\theme\interface\middledown.png;.\Resources\theme\interface\middlemouseover.png;.\Resources\theme\interface\middlenormal.png;.\Resources\theme\interface\more.PNG;.\Resources\theme\interface\plus.png;.\Resources\theme\interface\qqshowicon.png;.\Resources\theme\interface\qzoneicon.png;.\Resources\theme\interface\rightdown.png;.\Resources\theme\interface\rightmouseover.png;.\Resources\theme\interface\rightnormal.png;.\Resources\theme\interface\upbtn.png;.\Resources\theme\interface\vip_16.png;.\Resources\theme\interface\wblogicon.png;.\Resources\theme\interface\icon_blog_selected_Blue.png;.\Resources\theme\interface\icon_weather_selected_Blue.png;.\Resources\theme\interface\icon_zone_selected_Blue.png;.\Resources\theme\interface\news.png;.\Resources\theme\interface\shopping.png;.\Resources\theme\interface\soso.png;.\Resources\theme\interface\wallet.png;.\Resources\theme\interface\mail.png;.\Resources\theme\interface\blog.png;.\Resources\theme\interface\ClassicThemeBkg.jpg;.\Resources\theme\interface\CoverThemeBkg.jpg;.\Resources\theme\interface\default.jpg;.\Resources\theme\interface\WeatherThemeBkg.jpg;.\Resources\theme\interface\White.jpg;.\Resources\theme\interface\weather-back.png;.\Resources\theme\login\zhuce_press.png;.\Resources\theme\login\button_login_down.png;.\Resources\theme\login\button_login_hover.png;.\Resources\theme\login\button_login_normal.png;.\Resources\theme\login\checkbox_hover.png;.\Resources\theme\login\checkbox_normal.png;.\Resources\theme\login\checkbox_press.png;.\Resources\theme\login\checkbox_selected_hover.png;.\Resources\theme\login\checkbox_selected_normal.png;.\Resources\theme\login\checkbox_selected_press.png;.\Resources\theme\login\corner_back.png;.\Resources\theme\login\corner_back_hover.png;.\Resources\theme\login\corner_back_press.png;.\Resources\theme\login\corner_left.png;.\Resources\theme\login\corner_left_hover.png;.\Resources\theme\login\corner_left_press.png;.\Resources\theme\login\corner_right_hover.png;.\Resources\theme\login\corner_right_normal_down.png;.\Resources\theme\login\inputbox.png;.\Resources\theme\login\inputbox_hover.png;.\Resources\theme\login\keyboard.png;.\Resources\theme\login\loading.gif;.\Resources\theme\login\login_head_bkg.png;.\Resources\theme\login\mima.png;.\Resources\theme\login\mima_hover.png;.\Resources\theme\login\mima_press.png;.\Resources\theme\login\noon.jpg;.\Resources\theme\login\zhuce.png;.\Resources\theme\login\zhuce_hover.png;.\Resources\theme\login\afternoon.jpg;.\Resources\theme\login\morning.jpg;.\Resources\theme\login\night.jpg;.\Resources\theme\lockPanel\unlock20.png;.\Resources\theme\lockPanel\16.ico;.\Resources\theme\lockPanel\16_gray.ico;.\Resources\theme\lockPanel\20.png;.\Resources\theme\lockPanel\lock20.png;.\Resources\theme\lockPanel\lock.png;.\Resources\theme\lockPanel\lockBg_Highlight.png;.\Resources\theme\lockPanel\lockBg_Pushed.png;.\Resources\theme\maintabbar\0.png;.\Resources\theme\maintabbar\15.png;.\Resources\theme\maintabbar\30.png;.\Resources\theme\maintabbar\45.png;.\Resources\theme\maintabbar\60.png;.\Resources\theme\maintabbar\75.png;.\Resources\theme\maintabbar\90.png;.\Resources\theme\maintabbar\main_tabbtn_highlight.png;.\Resources\theme\maintabbar\icon_blog_normal.png;.\Resources\theme\maintabbar\icon_blog_selected.png;.\Resources\theme\maintabbar\icon_contacts_normal.png;.\Resources\theme\maintabbar\icon_contacts_selected.png;.\Resources\theme\maintabbar\icon_group_normal.png;.\Resources\theme\maintabbar\icon_group_selected.png;.\Resources\theme\maintabbar\icon_last_normal.png;.\Resources\theme\maintabbar\icon_last_selected.png;.\Resources\theme\maintabbar\icon_zone_normal.png;.\Resources\theme\maintabbar\icon_zone_selected.png;.\Resources\theme\maintabbar\main_tabbtn_down.png;.\Resources\theme\maintool\allbtn_highlight.png;.\Resources\theme\maintabbar\main_tab_check.png;.\Resources\theme\maintabbar\icon_search_normal.png;.\Resources\theme\maintabbar\main_tab_highlight.png;.\Resources\theme\maintool\allbtn_down.png.png;.\Resources\theme\maintool\filemanager.png;.\Resources\theme\maintool\find.png;.\Resources\theme\maintool\FriendCircleMainToolAreaEntry.png;.\Resources\theme\maintool\menu_btn_highlight.png;.\Resources\theme\maintool\menu_btn_normal.png;.\Resources\theme\maintool\message.png;.\Resources\theme\maintool\QPlusEntranceBtn.png;.\Resources\theme\maintool\TitleIcon.png;.\Resources\theme\maintool\Tools.png;.\Resources\theme\menu\adduser.png;.\Resources\theme\menu\aio_toobar_Report.png;.\Resources\theme\menu\bell_16.png;.\Resources\theme\menu\bellwithscore_16.png;.\Resources\theme\menu\ContactInfoTabNetGame2.png;.\Resources\theme\menu\ContactInfoTabNetGame.png;.\Resources\theme\menu\contactmgr.png;.\Resources\theme\menu\ContactTipsVASFlagExt_Mail.png;.\Resources\theme\menu\ContactTipsVASFlagExt_QQFlyIsland.png;.\Resources\theme\menu\ContactTipsVASFlagExt_QQFO.png;.\Resources\theme\menu\ContactTipsVASFlagExt_QQSG.png;.\Resources\theme\menu\ContactTipsVASFlagExt_QQTang.png;.\Resources\theme\menu\ContactTipsVASFlagExt_QQTangVip.png;.\Resources\theme\menu\crm.png;.\Resources\theme\menu\cutline.png;.\Resources\theme\menu\delfolder.png;.\Resources\theme\menu\deluser.png;.\Resources\theme\menu\groupmainpage.png;.\Resources\theme\menu\level0.bmp;.\Resources\theme\menu\level1.bmp;.\Resources\theme\menu\level2.bmp;.\Resources\theme\menu\level3.bmp;.\Resources\theme\menu\level4.bmp;.\Resources\theme\menu\level5.bmp;.\Resources\theme\menu\main_gamebtn20_game.png;.\Resources\theme\menu\main_musicbtn20_music.png;.\Resources\theme\menu\MainPanelServiceBarExt_XiaoYou.png;.\Resources\theme\menu\MainPanelServiceBarExt_XiaoYou_2.png;.\Resources\theme\menu\menu_arrow.png;.\Resources\theme\menu\menu_bkg.png;.\Resources\theme\menu\menu_bkg_board.png;.\Resources\theme\menu\menu_cutling.png;.\Resources\theme\menu\menu_highlight.png;.\Resources\theme\menu\modehead.png;.\Resources\theme\menu\moveuser.png;.\Resources\theme\menu\msgmgr.png;.\Resources\theme\menu\name.png;.\Resources\theme\menu\nopic.png;.\Resources\theme\menu\QQCenter.png;.\Resources\theme\menu\QQMusicVip.png;.\Resources\theme\menu\rf.png;.\Resources\theme\menu\search_16_with_shadow.png;.\Resources\theme\menu\search_20.png;.\Resources\theme\menu\sendmsg.png;.\Resources\theme\menu\tenpay20.png;.\Resources\theme\menu\tipicon_paddingDraw.png;.\Resources\theme\menu\VASFlagExt_HuaXia2_0.png;.\Resources\theme\menu\video.png;.\Resources\theme\screenshot\FilterBar\sweet_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\ageing.jpg;.\Resources\theme\screenshot\FilterBar\ageing_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\classiclomo.jpg;.\Resources\theme\screenshot\FilterBar\classiclomo_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\copperplate.jpg;.\Resources\theme\screenshot\FilterBar\copperplate_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\graying.jpg;.\Resources\theme\screenshot\FilterBar\graying_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\lomo.jpg;.\Resources\theme\screenshot\FilterBar\lomo_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\nightfall.jpg;.\Resources\theme\screenshot\FilterBar\nightfall_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\original.jpg;.\Resources\theme\screenshot\FilterBar\original_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\polaroid.jpg;.\Resources\theme\screenshot\FilterBar\polaroid_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\rainbow.jpg;.\Resources\theme\screenshot\FilterBar\rainbow_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\sketch.jpg;.\Resources\theme\screenshot\FilterBar\sketch_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\sunshine.jpg;.\Resources\theme\screenshot\FilterBar\sunshine_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\sweet.jpg;.\Resources\theme\screenshot\Undo.png;.\Resources\theme\screenshot\Arrow.png;.\Resources\theme\screenshot\Brush.PNG;.\Resources\theme\screenshot\CameraToolbar_BtnDown.png;.\Resources\theme\screenshot\CameraToolbar_BtnHover.png;.\Resources\theme\screenshot\CameraToolbar_BtnNormal.png;.\Resources\theme\screenshot\Circle.png;.\Resources\theme\screenshot\Exit.png;.\Resources\theme\screenshot\Filter.png;.\Resources\theme\screenshot\Finish.png;.\Resources\theme\screenshot\LargeMagnifier.png;.\Resources\theme\screenshot\Magnifier.png;.\Resources\theme\screenshot\Rectangle.png;.\Resources\theme\screenshot\Save.png;.\Resources\theme\screenshot\SinglePoint.PNG;.\Resources\theme\screenshot\Text.png;.\Resources\theme\state\WebQQQme.png;.\Resources\theme\state\away.png;.\Resources\theme\state\busy.png;.\Resources\theme\state\imoffline.png;.\Resources\theme\state\imonline.png;.\Resources\theme\state\ImQQAway.png;.\Resources\theme\state\ImQQBusy.png;.\Resources\theme\state\ImQQMute.png;.\Resources\theme\state\ImQQOnline.png;.\Resources\theme\state\ImQQQme.png;.\Resources\theme\state\invisible.png;.\Resources\theme\state\IPhoneQQ_Head_Big.png;.\Resources\theme\state\MobilePhoneQQAway.png;.\Resources\theme\state\MobilePhoneQQBusy.png;.\Resources\theme\state\MobilePhoneQQOn.png;.\Resources\theme\state\MobileWapQQAway.png;.\Resources\theme\state\MobileWapQQOn.png;.\Resources\theme\state\mute.png;.\Resources\theme\state\Qme.png;.\Resources\theme\state\QQForPad_Head_Big.png;.\Resources\theme\state\WebQQAway.png;.\Resources\theme\state\WebQQBusy.png;.\Resources\theme\state\WebQQMute.png;.\Resources\theme\state\WebQQOnline.png;.\Resources\theme\systembutton\btn_restore_normal.png;.\Resources\theme\systembutton\AIO_SetBtn_down.png;.\Resources\theme\systembutton\AIO_SetBtn_highlight.png;.\Resources\theme\systembutton\AIO_SetBtn_highlight_normal.png;.\Resources\theme\systembutton\AIO_SetBtn_normal.png;.\Resources\theme\systembutton\btn_close_down.png;.\Resources\theme\systembutton\btn_close_highlight.png;.\Resources\theme\systembutton\btn_close_normal.png;.\Resources\theme\systembutton\btn_max_down.png;.\Resources\theme\systembutton\btn_max_highlight.png;.\Resources\theme\systembutton\btn_max_normal.png;.\Resources\theme\systembutton\btn_mini_down.png;.\Resources\theme\systembutton\btn_mini_highlight.png;.\Resources\theme\systembutton\btn_mini_normal.png;.\Resources\theme\systembutton\btn_restore_down.png;.\Resources\theme\systembutton\btn_restore_highlight.png;.\Resources\theme\systembutton\btn_Skin_down.png;.\Resources\theme\systembutton\btn_Skin_highlight.png;.\Resources\theme\systembutton\btn_Skin_normal.png;.\Resources\theme\systembutton\btn_set_hover.png;.\Resources\theme\systembutton\btn_set_normal.png;.\Resources\theme\systembutton\btn_set_press.png;.\Resources\theme\vip_setup.png;.\Resources\theme\CustomerCenter.PNG;.\Resources\theme\find_old.png;.\Resources\theme\Folder.png;.\Resources\theme\LevelValue.png;.\Resources\theme\LV.png;.\Resources\theme\menu_help.png;.\Resources\theme\ProductBlog.PNG;.\Resources\theme\qq.ico;.\Resources\theme\QQVIP_GRAY.png;.\Resources\theme\QQVIP_LIGHT.png;.\Resources\theme\QuestionAndAdvance.PNG;.\Resources\theme\SmallVideoDefault.png;.\Resources\theme\tray\Qme.ico;.\Resources\theme\tray\away.ico;.\Resources\theme\tray\busy.ico;.\Resources\theme\tray\imonline.ico;.\Resources\theme\tray\invisible.ico;.\Resources\theme\tray\mute.ico;.\Resources\theme\tray\offline.ico;.\Resources\theme\head.png;.\Resources\theme\group.png;.\Resources\theme\maintool\arrow_down.png;.\Resources\theme\maintool\allbtn_left_down.png;.\Resources\theme\maintool\allbtn_left_highlight.png;.\Resources\theme\maintool\allbtn_right_highlight.png;.\Resources\theme\maintool\allbtn_right_down.png;.\Resources\theme\maintabbar\add.png;.\Resources\theme\maintabbar\home.png;.\Resources\theme\maintabbar\tabbtn_bgk_pushed_hover.png;.\Resources\theme\maintabbar\tabbtn_bgk_pushed.png;.\Resources\theme.css;.\Resources\cityid.xml;.\Resources\weather\adver.png;.\Resources\weather\big_chance_of_rain.png;.\Resources\weather\big_chance_of_snow.png;.\Resources\weather\big_chance_of_storm.png;.\Resources\weather\big_chance_of_tstorm.png;.\Resources\weather\big_cloudy.png;.\Resources\weather\big_cn_cloudy.png;.\Resources\weather\big_cn_fog.png;.\Resources\weather\big_cn_heavyrain.png;.\Resources\weather\big_cn_heavysnow.png;.\Resources\weather\big_cn_lightrain.png;.\Resources\weather\big_cn_overcast.png;.\Resources\weather\big_cn_showers.png;.\Resources\weather\big_dust.png;.\Resources\weather\big_flurries.png;.\Resources\weather\big_fog.png;.\Resources\weather\big_haze.png;.\Resources\weather\big_icy.png;.\Resources\weather\big_mist.png;.\Resources\weather\big_mostly_cloudy.png;.\Resources\weather\big_mostly_sunny.png;.\Resources\weather\big_partly_cloudy.png;.\Resources\weather\big_rain.png;.\Resources\weather\big_sleet.png;.\Resources\weather\big_smoke.png;.\Resources\weather\big_snow.png;.\Resources\weather\big_storm.png;.\Resources\weather\big_sunny.png;.\Resources\weather\big_thunderstorm.png;.\Resources\weather\chance_of_rain.png;.\Resources\weather\chance_of_snow.png;.\Resources\weather\chance_of_storm.png;.\Resources\weather\chance_of_tstorm.png;.\Resources\weather\cloudy.png;.\Resources\weather\cn_cloudy.png;.\Resources\weather\cn_fog.png;.\Resources\weather\cn_heavyrain.png;.\Resources\weather\cn_heavysnow.png;.\Resources\weather\cn_lightrain.png;.\Resources\weather\cn_overcast.png;.\Resources\weather\cn_showers.png;.\Resources\weather\dust.png;.\Resources\weather\flurries.png;.\Resources\weather\fog.png;.\Resources\weather\haze.png;.\Resources\weather\icy.png;.\Resources\weather\mist.png;.\Resources\weather\mostly_cloudy.png;.\Resources\weather\mostly_sunny.png;.\Resources\weather\partly_cloudy.png;.\Resources\weather\rain.png;.\Resources\weather\sleet.png;.\Resources\weather\smoke.png;.\Resources\weather\snow.png;.\Resources\weather\storm.png;.\Resources\weather\sunny.png;.\Resources\weather\thunderstorm.png;%(AdditionalInputs) + .\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs) + Rcc%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp + + %(FullPath);.\Resources\theme\appmanager\more_app_btn_normal.png;.\Resources\theme\appmanager\app_bkg_hover.png;.\Resources\theme\appmanager\app_bkg_normal.png;.\Resources\theme\appmanager\app_bkg_push.png;.\Resources\theme\appmanager\app_manager_icon.png;.\Resources\theme\appmanager\appbox_mgr_btn.png;.\Resources\theme\appmanager\fav_app_empty.png;.\Resources\theme\appmanager\more_app_btn_down.png;.\Resources\theme\appmanager\more_app_btn_hover.png;.\Resources\theme\ChatFrame\Wireless.png;.\Resources\theme\ChatFrame\aio_quickbar_cut.png;.\Resources\theme\ChatFrame\aio_quickbar_face.png;.\Resources\theme\ChatFrame\aio_quickbar_flirtationface.png;.\Resources\theme\ChatFrame\aio_quickbar_font.png;.\Resources\theme\ChatFrame\aio_quickbar_inputassist.png;.\Resources\theme\ChatFrame\aio_quickbar_inputassist_dropdown.png;.\Resources\theme\ChatFrame\aio_quickbar_more.png;.\Resources\theme\ChatFrame\aio_quickbar_register.png;.\Resources\theme\ChatFrame\aio_quickbar_richface.png;.\Resources\theme\ChatFrame\aio_quickbar_screen1.png;.\Resources\theme\ChatFrame\aio_quickbar_screen2.png;.\Resources\theme\ChatFrame\aio_quickbar_sendpic.png;.\Resources\theme\ChatFrame\aio_quickbar_sysfont_tab_button.png;.\Resources\theme\ChatFrame\aio_quickbar_twitter.png;.\Resources\theme\ChatFrame\aio_toobar_add.png;.\Resources\theme\ChatFrame\aio_toobar_addhuman.png;.\Resources\theme\ChatFrame\aio_toobar_app.png;.\Resources\theme\ChatFrame\aio_toobar_block.png;.\Resources\theme\ChatFrame\aio_toobar_game.png;.\Resources\theme\ChatFrame\AM_MenuICON.png;.\Resources\theme\ChatFrame\AppMenuExt_DeleteFriend.png;.\Resources\theme\ChatFrame\AppMenuExt_ImPeachUin.png;.\Resources\theme\ChatFrame\AppMenuExt_MoveToBlackList.png;.\Resources\theme\ChatFrame\Bold.png;.\Resources\theme\ChatFrame\btnleft_down.png;.\Resources\theme\ChatFrame\btnleft_focus_down.png;.\Resources\theme\ChatFrame\btnleft_focus_highlight.png;.\Resources\theme\ChatFrame\btnleft_focus_normal.png;.\Resources\theme\ChatFrame\btnleft_highlight.png;.\Resources\theme\ChatFrame\btnleft_normal.png;.\Resources\theme\ChatFrame\btnright_down.png;.\Resources\theme\ChatFrame\btnright_focus_down.png;.\Resources\theme\ChatFrame\btnright_focus_highlight.png;.\Resources\theme\ChatFrame\btnright_focus_normal.png;.\Resources\theme\ChatFrame\btnright_highlight.png;.\Resources\theme\ChatFrame\btnright_normal.png;.\Resources\theme\ChatFrame\color.png;.\Resources\theme\ChatFrame\ContactMgr.png;.\Resources\theme\ChatFrame\deta.png;.\Resources\theme\ChatFrame\GroupDyncIcon.png;.\Resources\theme\ChatFrame\Import.png;.\Resources\theme\ChatFrame\Italic.png;.\Resources\theme\ChatFrame\mainmenu_allservices.png;.\Resources\theme\ChatFrame\mainmenu_imqqcom.png;.\Resources\theme\ChatFrame\mainmenu_NewsOrder.png;.\Resources\theme\ChatFrame\MainPanelVasIcon.png;.\Resources\theme\ChatFrame\menu_changepswd.png;.\Resources\theme\ChatFrame\menu_exit.png;.\Resources\theme\ChatFrame\menu_filemanager.png;.\Resources\theme\ChatFrame\menu_switch.png;.\Resources\theme\ChatFrame\MiniService.png;.\Resources\theme\ChatFrame\msg_upload.png;.\Resources\theme\ChatFrame\msgmgr.png;.\Resources\theme\ChatFrame\note0.png;.\Resources\theme\ChatFrame\note1.png;.\Resources\theme\ChatFrame\OnlineUpdate.png;.\Resources\theme\ChatFrame\QA.png;.\Resources\theme\ChatFrame\QQ_TempSession.png;.\Resources\theme\ChatFrame\QQZone.png;.\Resources\theme\ChatFrame\recover.png;.\Resources\theme\ChatFrame\safe.png;.\Resources\theme\ChatFrame\save_16.png;.\Resources\theme\ChatFrame\SoSo.png;.\Resources\theme\ChatFrame\TencentNet.png;.\Resources\theme\ChatFrame\Tools.png;.\Resources\theme\ChatFrame\underline.png;.\Resources\theme\ChatFrame\WhatsNew.png;.\Resources\theme\interface\AreaIcon.png;.\Resources\theme\interface\AreaMainIcon.png;.\Resources\theme\interface\AreaMainIcon_2.png;.\Resources\theme\interface\AreaPresentMgr_RBMenu.png;.\Resources\theme\interface\autograph.png;.\Resources\theme\interface\downbtn.png;.\Resources\theme\interface\fengmian_1.png;.\Resources\theme\interface\friendicon.png;.\Resources\theme\interface\head_bkg__normal.png;.\Resources\theme\interface\head_bkg_highlight.png;.\Resources\theme\interface\icon_contacts_selected_Blue.png;.\Resources\theme\interface\icon_group_selected_Blue.png;.\Resources\theme\interface\icon_last_selected_Blue.png;.\Resources\theme\interface\jingdian_2.png;.\Resources\theme\interface\leftdown.png;.\Resources\theme\interface\leftmouseover.png;.\Resources\theme\interface\leftnormal.png;.\Resources\theme\interface\MaterialAlphaSet.png;.\Resources\theme\interface\Messagebox18_highlight.png;.\Resources\theme\interface\middledown.png;.\Resources\theme\interface\middlemouseover.png;.\Resources\theme\interface\middlenormal.png;.\Resources\theme\interface\more.PNG;.\Resources\theme\interface\plus.png;.\Resources\theme\interface\qqshowicon.png;.\Resources\theme\interface\qzoneicon.png;.\Resources\theme\interface\rightdown.png;.\Resources\theme\interface\rightmouseover.png;.\Resources\theme\interface\rightnormal.png;.\Resources\theme\interface\upbtn.png;.\Resources\theme\interface\vip_16.png;.\Resources\theme\interface\wblogicon.png;.\Resources\theme\interface\icon_blog_selected_Blue.png;.\Resources\theme\interface\icon_weather_selected_Blue.png;.\Resources\theme\interface\icon_zone_selected_Blue.png;.\Resources\theme\interface\news.png;.\Resources\theme\interface\shopping.png;.\Resources\theme\interface\soso.png;.\Resources\theme\interface\wallet.png;.\Resources\theme\interface\mail.png;.\Resources\theme\interface\blog.png;.\Resources\theme\interface\ClassicThemeBkg.jpg;.\Resources\theme\interface\CoverThemeBkg.jpg;.\Resources\theme\interface\default.jpg;.\Resources\theme\interface\WeatherThemeBkg.jpg;.\Resources\theme\interface\White.jpg;.\Resources\theme\interface\weather-back.png;.\Resources\theme\login\zhuce_press.png;.\Resources\theme\login\button_login_down.png;.\Resources\theme\login\button_login_hover.png;.\Resources\theme\login\button_login_normal.png;.\Resources\theme\login\checkbox_hover.png;.\Resources\theme\login\checkbox_normal.png;.\Resources\theme\login\checkbox_press.png;.\Resources\theme\login\checkbox_selected_hover.png;.\Resources\theme\login\checkbox_selected_normal.png;.\Resources\theme\login\checkbox_selected_press.png;.\Resources\theme\login\corner_back.png;.\Resources\theme\login\corner_back_hover.png;.\Resources\theme\login\corner_back_press.png;.\Resources\theme\login\corner_left.png;.\Resources\theme\login\corner_left_hover.png;.\Resources\theme\login\corner_left_press.png;.\Resources\theme\login\corner_right_hover.png;.\Resources\theme\login\corner_right_normal_down.png;.\Resources\theme\login\inputbox.png;.\Resources\theme\login\inputbox_hover.png;.\Resources\theme\login\keyboard.png;.\Resources\theme\login\loading.gif;.\Resources\theme\login\login_head_bkg.png;.\Resources\theme\login\mima.png;.\Resources\theme\login\mima_hover.png;.\Resources\theme\login\mima_press.png;.\Resources\theme\login\noon.jpg;.\Resources\theme\login\zhuce.png;.\Resources\theme\login\zhuce_hover.png;.\Resources\theme\login\afternoon.jpg;.\Resources\theme\login\morning.jpg;.\Resources\theme\login\night.jpg;.\Resources\theme\lockPanel\unlock20.png;.\Resources\theme\lockPanel\16.ico;.\Resources\theme\lockPanel\16_gray.ico;.\Resources\theme\lockPanel\20.png;.\Resources\theme\lockPanel\lock20.png;.\Resources\theme\lockPanel\lock.png;.\Resources\theme\lockPanel\lockBg_Highlight.png;.\Resources\theme\lockPanel\lockBg_Pushed.png;.\Resources\theme\maintabbar\0.png;.\Resources\theme\maintabbar\15.png;.\Resources\theme\maintabbar\30.png;.\Resources\theme\maintabbar\45.png;.\Resources\theme\maintabbar\60.png;.\Resources\theme\maintabbar\75.png;.\Resources\theme\maintabbar\90.png;.\Resources\theme\maintabbar\main_tabbtn_highlight.png;.\Resources\theme\maintabbar\icon_blog_normal.png;.\Resources\theme\maintabbar\icon_blog_selected.png;.\Resources\theme\maintabbar\icon_contacts_normal.png;.\Resources\theme\maintabbar\icon_contacts_selected.png;.\Resources\theme\maintabbar\icon_group_normal.png;.\Resources\theme\maintabbar\icon_group_selected.png;.\Resources\theme\maintabbar\icon_last_normal.png;.\Resources\theme\maintabbar\icon_last_selected.png;.\Resources\theme\maintabbar\icon_zone_normal.png;.\Resources\theme\maintabbar\icon_zone_selected.png;.\Resources\theme\maintabbar\main_tabbtn_down.png;.\Resources\theme\maintool\allbtn_highlight.png;.\Resources\theme\maintabbar\main_tab_check.png;.\Resources\theme\maintabbar\icon_search_normal.png;.\Resources\theme\maintabbar\main_tab_highlight.png;.\Resources\theme\maintool\allbtn_down.png.png;.\Resources\theme\maintool\filemanager.png;.\Resources\theme\maintool\find.png;.\Resources\theme\maintool\FriendCircleMainToolAreaEntry.png;.\Resources\theme\maintool\menu_btn_highlight.png;.\Resources\theme\maintool\menu_btn_normal.png;.\Resources\theme\maintool\message.png;.\Resources\theme\maintool\QPlusEntranceBtn.png;.\Resources\theme\maintool\TitleIcon.png;.\Resources\theme\maintool\Tools.png;.\Resources\theme\menu\adduser.png;.\Resources\theme\menu\aio_toobar_Report.png;.\Resources\theme\menu\bell_16.png;.\Resources\theme\menu\bellwithscore_16.png;.\Resources\theme\menu\ContactInfoTabNetGame2.png;.\Resources\theme\menu\ContactInfoTabNetGame.png;.\Resources\theme\menu\contactmgr.png;.\Resources\theme\menu\ContactTipsVASFlagExt_Mail.png;.\Resources\theme\menu\ContactTipsVASFlagExt_QQFlyIsland.png;.\Resources\theme\menu\ContactTipsVASFlagExt_QQFO.png;.\Resources\theme\menu\ContactTipsVASFlagExt_QQSG.png;.\Resources\theme\menu\ContactTipsVASFlagExt_QQTang.png;.\Resources\theme\menu\ContactTipsVASFlagExt_QQTangVip.png;.\Resources\theme\menu\crm.png;.\Resources\theme\menu\cutline.png;.\Resources\theme\menu\delfolder.png;.\Resources\theme\menu\deluser.png;.\Resources\theme\menu\groupmainpage.png;.\Resources\theme\menu\level0.bmp;.\Resources\theme\menu\level1.bmp;.\Resources\theme\menu\level2.bmp;.\Resources\theme\menu\level3.bmp;.\Resources\theme\menu\level4.bmp;.\Resources\theme\menu\level5.bmp;.\Resources\theme\menu\main_gamebtn20_game.png;.\Resources\theme\menu\main_musicbtn20_music.png;.\Resources\theme\menu\MainPanelServiceBarExt_XiaoYou.png;.\Resources\theme\menu\MainPanelServiceBarExt_XiaoYou_2.png;.\Resources\theme\menu\menu_arrow.png;.\Resources\theme\menu\menu_bkg.png;.\Resources\theme\menu\menu_bkg_board.png;.\Resources\theme\menu\menu_cutling.png;.\Resources\theme\menu\menu_highlight.png;.\Resources\theme\menu\modehead.png;.\Resources\theme\menu\moveuser.png;.\Resources\theme\menu\msgmgr.png;.\Resources\theme\menu\name.png;.\Resources\theme\menu\nopic.png;.\Resources\theme\menu\QQCenter.png;.\Resources\theme\menu\QQMusicVip.png;.\Resources\theme\menu\rf.png;.\Resources\theme\menu\search_16_with_shadow.png;.\Resources\theme\menu\search_20.png;.\Resources\theme\menu\sendmsg.png;.\Resources\theme\menu\tenpay20.png;.\Resources\theme\menu\tipicon_paddingDraw.png;.\Resources\theme\menu\VASFlagExt_HuaXia2_0.png;.\Resources\theme\menu\video.png;.\Resources\theme\screenshot\FilterBar\sweet_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\ageing.jpg;.\Resources\theme\screenshot\FilterBar\ageing_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\classiclomo.jpg;.\Resources\theme\screenshot\FilterBar\classiclomo_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\copperplate.jpg;.\Resources\theme\screenshot\FilterBar\copperplate_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\graying.jpg;.\Resources\theme\screenshot\FilterBar\graying_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\lomo.jpg;.\Resources\theme\screenshot\FilterBar\lomo_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\nightfall.jpg;.\Resources\theme\screenshot\FilterBar\nightfall_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\original.jpg;.\Resources\theme\screenshot\FilterBar\original_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\polaroid.jpg;.\Resources\theme\screenshot\FilterBar\polaroid_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\rainbow.jpg;.\Resources\theme\screenshot\FilterBar\rainbow_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\sketch.jpg;.\Resources\theme\screenshot\FilterBar\sketch_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\sunshine.jpg;.\Resources\theme\screenshot\FilterBar\sunshine_hightlight.jpg;.\Resources\theme\screenshot\FilterBar\sweet.jpg;.\Resources\theme\screenshot\Undo.png;.\Resources\theme\screenshot\Arrow.png;.\Resources\theme\screenshot\Brush.PNG;.\Resources\theme\screenshot\CameraToolbar_BtnDown.png;.\Resources\theme\screenshot\CameraToolbar_BtnHover.png;.\Resources\theme\screenshot\CameraToolbar_BtnNormal.png;.\Resources\theme\screenshot\Circle.png;.\Resources\theme\screenshot\Exit.png;.\Resources\theme\screenshot\Filter.png;.\Resources\theme\screenshot\Finish.png;.\Resources\theme\screenshot\LargeMagnifier.png;.\Resources\theme\screenshot\Magnifier.png;.\Resources\theme\screenshot\Rectangle.png;.\Resources\theme\screenshot\Save.png;.\Resources\theme\screenshot\SinglePoint.PNG;.\Resources\theme\screenshot\Text.png;.\Resources\theme\state\WebQQQme.png;.\Resources\theme\state\away.png;.\Resources\theme\state\busy.png;.\Resources\theme\state\imoffline.png;.\Resources\theme\state\imonline.png;.\Resources\theme\state\ImQQAway.png;.\Resources\theme\state\ImQQBusy.png;.\Resources\theme\state\ImQQMute.png;.\Resources\theme\state\ImQQOnline.png;.\Resources\theme\state\ImQQQme.png;.\Resources\theme\state\invisible.png;.\Resources\theme\state\IPhoneQQ_Head_Big.png;.\Resources\theme\state\MobilePhoneQQAway.png;.\Resources\theme\state\MobilePhoneQQBusy.png;.\Resources\theme\state\MobilePhoneQQOn.png;.\Resources\theme\state\MobileWapQQAway.png;.\Resources\theme\state\MobileWapQQOn.png;.\Resources\theme\state\mute.png;.\Resources\theme\state\Qme.png;.\Resources\theme\state\QQForPad_Head_Big.png;.\Resources\theme\state\WebQQAway.png;.\Resources\theme\state\WebQQBusy.png;.\Resources\theme\state\WebQQMute.png;.\Resources\theme\state\WebQQOnline.png;.\Resources\theme\systembutton\btn_restore_normal.png;.\Resources\theme\systembutton\AIO_SetBtn_down.png;.\Resources\theme\systembutton\AIO_SetBtn_highlight.png;.\Resources\theme\systembutton\AIO_SetBtn_highlight_normal.png;.\Resources\theme\systembutton\AIO_SetBtn_normal.png;.\Resources\theme\systembutton\btn_close_down.png;.\Resources\theme\systembutton\btn_close_highlight.png;.\Resources\theme\systembutton\btn_close_normal.png;.\Resources\theme\systembutton\btn_max_down.png;.\Resources\theme\systembutton\btn_max_highlight.png;.\Resources\theme\systembutton\btn_max_normal.png;.\Resources\theme\systembutton\btn_mini_down.png;.\Resources\theme\systembutton\btn_mini_highlight.png;.\Resources\theme\systembutton\btn_mini_normal.png;.\Resources\theme\systembutton\btn_restore_down.png;.\Resources\theme\systembutton\btn_restore_highlight.png;.\Resources\theme\systembutton\btn_Skin_down.png;.\Resources\theme\systembutton\btn_Skin_highlight.png;.\Resources\theme\systembutton\btn_Skin_normal.png;.\Resources\theme\systembutton\btn_set_hover.png;.\Resources\theme\systembutton\btn_set_normal.png;.\Resources\theme\systembutton\btn_set_press.png;.\Resources\theme\vip_setup.png;.\Resources\theme\CustomerCenter.PNG;.\Resources\theme\find_old.png;.\Resources\theme\Folder.png;.\Resources\theme\LevelValue.png;.\Resources\theme\LV.png;.\Resources\theme\menu_help.png;.\Resources\theme\ProductBlog.PNG;.\Resources\theme\qq.ico;.\Resources\theme\QQVIP_GRAY.png;.\Resources\theme\QQVIP_LIGHT.png;.\Resources\theme\QuestionAndAdvance.PNG;.\Resources\theme\SmallVideoDefault.png;.\Resources\theme\tray\Qme.ico;.\Resources\theme\tray\away.ico;.\Resources\theme\tray\busy.ico;.\Resources\theme\tray\imonline.ico;.\Resources\theme\tray\invisible.ico;.\Resources\theme\tray\mute.ico;.\Resources\theme\tray\offline.ico;.\Resources\theme\head.png;.\Resources\theme\group.png;.\Resources\theme\maintool\arrow_down.png;.\Resources\theme\maintool\allbtn_left_down.png;.\Resources\theme\maintool\allbtn_left_highlight.png;.\Resources\theme\maintool\allbtn_right_highlight.png;.\Resources\theme\maintool\allbtn_right_down.png;.\Resources\theme\maintabbar\add.png;.\Resources\theme\maintabbar\home.png;.\Resources\theme\maintabbar\tabbtn_bgk_pushed_hover.png;.\Resources\theme\maintabbar\tabbtn_bgk_pushed.png;.\Resources\theme.css;.\Resources\cityid.xml;.\Resources\weather\adver.png;.\Resources\weather\big_chance_of_rain.png;.\Resources\weather\big_chance_of_snow.png;.\Resources\weather\big_chance_of_storm.png;.\Resources\weather\big_chance_of_tstorm.png;.\Resources\weather\big_cloudy.png;.\Resources\weather\big_cn_cloudy.png;.\Resources\weather\big_cn_fog.png;.\Resources\weather\big_cn_heavyrain.png;.\Resources\weather\big_cn_heavysnow.png;.\Resources\weather\big_cn_lightrain.png;.\Resources\weather\big_cn_overcast.png;.\Resources\weather\big_cn_showers.png;.\Resources\weather\big_dust.png;.\Resources\weather\big_flurries.png;.\Resources\weather\big_fog.png;.\Resources\weather\big_haze.png;.\Resources\weather\big_icy.png;.\Resources\weather\big_mist.png;.\Resources\weather\big_mostly_cloudy.png;.\Resources\weather\big_mostly_sunny.png;.\Resources\weather\big_partly_cloudy.png;.\Resources\weather\big_rain.png;.\Resources\weather\big_sleet.png;.\Resources\weather\big_smoke.png;.\Resources\weather\big_snow.png;.\Resources\weather\big_storm.png;.\Resources\weather\big_sunny.png;.\Resources\weather\big_thunderstorm.png;.\Resources\weather\chance_of_rain.png;.\Resources\weather\chance_of_snow.png;.\Resources\weather\chance_of_storm.png;.\Resources\weather\chance_of_tstorm.png;.\Resources\weather\cloudy.png;.\Resources\weather\cn_cloudy.png;.\Resources\weather\cn_fog.png;.\Resources\weather\cn_heavyrain.png;.\Resources\weather\cn_heavysnow.png;.\Resources\weather\cn_lightrain.png;.\Resources\weather\cn_overcast.png;.\Resources\weather\cn_showers.png;.\Resources\weather\dust.png;.\Resources\weather\flurries.png;.\Resources\weather\fog.png;.\Resources\weather\haze.png;.\Resources\weather\icy.png;.\Resources\weather\mist.png;.\Resources\weather\mostly_cloudy.png;.\Resources\weather\mostly_sunny.png;.\Resources\weather\partly_cloudy.png;.\Resources\weather\rain.png;.\Resources\weather\sleet.png;.\Resources\weather\smoke.png;.\Resources\weather\snow.png;.\Resources\weather\storm.png;.\Resources\weather\sunny.png;.\Resources\weather\thunderstorm.png;%(AdditionalInputs) + .\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs) + + + Uic%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + + $(QTDIR)\bin\uic.exe;%(AdditionalInputs) + .\GeneratedFiles\ui_%(Filename).h;%(Outputs) + Uic%27ing %(Filename)%(Extension)... + "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + + $(QTDIR)\bin\uic.exe;%(AdditionalInputs) + .\GeneratedFiles\ui_%(Filename).h;%(Outputs) + + + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + true + true + + + + + true + true + + + + + + + + + + + + + + \ No newline at end of file diff --git a/imsclient/imsclient/imsclient.vcxproj.filters b/imsclient/imsclient/imsclient.vcxproj.filters new file mode 100644 index 00000000..c952f2d5 --- /dev/null +++ b/imsclient/imsclient/imsclient.vcxproj.filters @@ -0,0 +1,1687 @@ +锘 + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;cxx;c;def + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h + + + {99349809-55BA-4b9d-BF79-8FDBB0286EB3} + ui + + + {D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E} + qrc;* + false + + + {bf2e3f9f-9a8d-4b9c-b66b-b9f042387f2b} + + + {d87cb454-a889-4c36-94db-b13c66c5a6e8} + + + {71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11} + moc;h;cpp + False + + + {d064f53a-0be8-4a79-8082-76f32c9c3059} + cpp;moc + False + + + {b92d3feb-bc6a-42fd-8833-2c7ec544e70d} + cpp;moc + False + + + {b77bd3a0-fc7a-468e-bbf0-bc680c9b467e} + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Generated Files + + + Generated Files\Release + + + Generated Files\Release + + + Generated Files\Release + + + Generated Files\Release + + + Generated Files\Release + + + Generated Files\Release + + + Generated Files\Release + + + Generated Files\Release + + + Generated Files\Release + + + Generated Files\Release + + + Generated Files\Debug + + + Generated Files\Debug + + + Generated Files\Debug + + + Generated Files\Debug + + + Generated Files\Debug + + + Generated Files\Debug + + + Generated Files\Debug + + + Generated Files\Debug + + + Generated Files\Debug + + + Generated Files\Debug + + + tinyxml + + + tinyxml + + + tinyxml + + + tinyxml + + + + + Header Files + + + Header Files + + + Header Files + + + Generated Files + + + Generated Files + + + Generated Files + + + Generated Files + + + Generated Files + + + tinyxml + + + tinyxml + + + + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Form Files + + + Form Files + + + Form Files + + + Form Files + + + Form Files + + + Resource Files + + + Resource Files + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\WorkStation + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + Resource Files\Weather + + + \ No newline at end of file diff --git a/imsclient/imsclient/imsclient.vcxproj.user b/imsclient/imsclient/imsclient.vcxproj.user new file mode 100644 index 00000000..c82b8b33 --- /dev/null +++ b/imsclient/imsclient/imsclient.vcxproj.user @@ -0,0 +1,9 @@ +锘 + + + PATH="$(QTDIR)\bin%3b$(PATH) + + + PATH="$(QTDIR)\bin%3b$(PATH) + + \ No newline at end of file diff --git a/imsclient/imsclient/imsdefine.h b/imsclient/imsclient/imsdefine.h new file mode 100644 index 00000000..17e11295 --- /dev/null +++ b/imsclient/imsclient/imsdefine.h @@ -0,0 +1,29 @@ +#ifndef IMSDEFINE_H +#define IMSDEFINE_H + +#include +#include + +namespace Ims{ + //用户状态 + enum ImsState{ + StateUnLogin= 0,//未登录 + StateOnline = 1,//在线 + StateQMy = 2,//Q我吧 + StateLeave = 3,//离开 + StateBusy = 4,//忙碌 + StateNoDisturb = 5,//请勿打扰 + StateStealth = 6,//隐身 + StateOffline = 7,//离线 + }; + + enum ImsTabBar{ + BarContact = 1,//联系人 + BarGroup = 2,//群/讨论组 + BarZone = 3,//空间 + BarBlog = 4,//微博 + BarLast = 5,//历史记录 + }; +};//end namespace Ims + +#endif IMSDEFINE_H \ No newline at end of file diff --git a/imsclient/imsclient/imsimageaccount.cpp b/imsclient/imsclient/imsimageaccount.cpp new file mode 100644 index 00000000..a0ae18f9 --- /dev/null +++ b/imsclient/imsclient/imsimageaccount.cpp @@ -0,0 +1,12 @@ +#include "imsimageaccount.h" + +imsImageAccount::imsImageAccount(QWidget *parent) + : ImsImageLineEdit(parent) +{ + +} + +imsImageAccount::~imsImageAccount() +{ + +} diff --git a/imsclient/imsclient/imsimageaccount.h b/imsclient/imsclient/imsimageaccount.h new file mode 100644 index 00000000..f1d79b8c --- /dev/null +++ b/imsclient/imsclient/imsimageaccount.h @@ -0,0 +1,18 @@ +#ifndef IMSIMAGEACCOUNT_H +#define IMSIMAGEACCOUNT_H + +#include "imsimagelineedit.h" + +class imsImageAccount : public ImsImageLineEdit +{ + Q_OBJECT + +public: + imsImageAccount(QWidget *parent = 0); + ~imsImageAccount(); + +private: + +}; + +#endif // IMSIMAGEACCOUNT_H diff --git a/imsclient/imsclient/imsimagelabel.cpp b/imsclient/imsclient/imsimagelabel.cpp new file mode 100644 index 00000000..189ddfdd --- /dev/null +++ b/imsclient/imsclient/imsimagelabel.cpp @@ -0,0 +1,85 @@ +#include "imsimagelabel.h" +#include "imsresoursce.h" + +#include +#include + +ImsImageLabel::ImsImageLabel(QWidget * parent, Qt::WindowFlags f) + : QLabel(parent, f) +{ + mToolButton = NULL; + mCurrentState = Ims::StateOnline; + init(); +} + +ImsImageLabel::ImsImageLabel(const QString & text, QWidget * parent, Qt::WindowFlags f) + :QLabel(text, parent, f) +{ + mToolButton = NULL; + mCurrentState = Ims::StateOnline; + init(); +} + +ImsImageLabel::~ImsImageLabel() +{ + if (mToolButton) + delete mToolButton; + mToolButton = NULL; +} + +void ImsImageLabel::init() +{ + if (mToolButton == NULL) + { + mToolButton = new QToolButton(this); + mToolButton->setObjectName("imageLabel"); + connect(mToolButton, SIGNAL(clicked()), this, SLOT(doToolButton())); + } + mToolButton->setAutoRaise(true); + mToolButton->setGeometry(70, 70, 17, 17); + mToolButton->setIcon(CImsResource::stateIconByCode((Ims::ImsState)mCurrentState)); + + mToolButton->show(); +} + +void ImsImageLabel::doToolButton() +{ + QMenu menu; + QAction *action = menu.addAction(CImsResource::stateIconByCode(Ims::StateOnline), QStringLiteral("我在线上"), + this, SLOT(doActionState())); + action->setData(Ims::StateOnline); + + action = menu.addAction(CImsResource::stateIconByCode(Ims::StateQMy), QStringLiteral("Q我吧"), + this, SLOT(doActionState())); + action->setData(Ims::StateQMy); + + menu.addSeparator(); + + action = menu.addAction(CImsResource::stateIconByCode(Ims::StateLeave), QStringLiteral("离开"), + this, SLOT(doActionState())); + action->setData(Ims::StateLeave); + + action = menu.addAction(CImsResource::stateIconByCode(Ims::StateBusy), QStringLiteral("忙碌"), + this, SLOT(doActionState())); + action->setData(Ims::StateBusy); + + action = menu.addAction(CImsResource::stateIconByCode(Ims::StateNoDisturb), QStringLiteral("请勿打扰"), + this, SLOT(doActionState())); + action->setData(Ims::StateNoDisturb); + + menu.addSeparator(); + + action = menu.addAction(CImsResource::stateIconByCode(Ims::StateStealth), QStringLiteral("隐身"), this, + SLOT(doActionState())); + action->setData(Ims::StateStealth); + + QPoint point = mapToGlobal(QPoint(mToolButton->pos().x(), mToolButton->pos().y() + 13)); + menu.exec(point); +} + +void ImsImageLabel::doActionState() +{ + QAction *action = (QAction *)sender(); + mCurrentState = action->data().toUInt(); + mToolButton->setIcon(CImsResource::stateIconByCode((Ims::ImsState)mCurrentState)); +} diff --git a/imsclient/imsclient/imsimagelabel.h b/imsclient/imsclient/imsimagelabel.h new file mode 100644 index 00000000..1de98d68 --- /dev/null +++ b/imsclient/imsclient/imsimagelabel.h @@ -0,0 +1,34 @@ +#ifndef IMSIMAGELABEL_H +#define IMSIMAGELABEL_H + +#include + +class QToolButton; + +class ImsImageLabel : public QLabel +{ + Q_OBJECT + +public: + ImsImageLabel(QWidget * parent = 0, Qt::WindowFlags f = 0); + ImsImageLabel(const QString & text, QWidget * parent = 0, Qt::WindowFlags f = 0); + + ~ImsImageLabel(); + + quint32 currentState() + { + return mCurrentState; + } + +protected: + void init(); + protected slots: + void doToolButton(); + void doActionState(); + +private: + QToolButton *mToolButton; + unsigned int mCurrentState; +}; + +#endif // IMSIMAGELABEL_H diff --git a/imsclient/imsclient/imsimagelineedit.cpp b/imsclient/imsclient/imsimagelineedit.cpp new file mode 100644 index 00000000..6e67f745 --- /dev/null +++ b/imsclient/imsclient/imsimagelineedit.cpp @@ -0,0 +1,104 @@ +#include "imsimagelineedit.h" + +#include +#include +#include + +ImsImageLineEdit::ImsImageLineEdit(QWidget *parent) + : QLineEdit(parent) +{ + mImageLabel = NULL; + mImagePath = ""; + setAttribute(Qt::WA_TranslucentBackground); +} + +ImsImageLineEdit::ImsImageLineEdit(const QString & contents, QWidget *parent) + : QLineEdit(contents, parent) +{ + mImageLabel = NULL; + mImagePath = ""; + setAttribute(Qt::WA_TranslucentBackground); +} + +ImsImageLineEdit::ImsImageLineEdit(const QString & contents, const QString & pic, QWidget *parent) + : QLineEdit(contents, parent) +{ + mImageLabel = NULL; + mImagePath = pic; + setAttribute(Qt::WA_TranslucentBackground); + init(); +} + +ImsImageLineEdit::~ImsImageLineEdit() +{ + if (mImageLabel) + delete mImageLabel; + mImageLabel = NULL; +} + +void ImsImageLineEdit::setLabelPic(const QString strPic) +{ + mImagePath = strPic; + init(); +} + +void ImsImageLineEdit::resizeEvent(QResizeEvent *event) +{ + QLineEdit::resizeEvent(event); + changeLabelPosition(); +} + +void ImsImageLineEdit::init() +{ + if (mImageLabel == NULL) + { + mImageLabel = new QLabel(this); + mImageLabel->setScaledContents(true); + mImageLabel->installEventFilter(this); + mImageLabel->setCursor(QCursor(Qt::ArrowCursor)); + } + changeLabelPosition(); +} + +void ImsImageLineEdit::changeLabelPosition() +{ + if (mImageLabel == NULL) + { + return; + } + + if (mImagePath.isEmpty()) + { + mImageLabel->hide(); + } + else + { + int nLabelHeight = height() - 4; + int nLabelWidth = height() - 4;//默认为22 + mImageLabel->setMaximumSize(nLabelWidth, nLabelHeight); + mImageLabel->setGeometry(width() - nLabelWidth - 2, (height() - nLabelHeight) / 2, + nLabelWidth, nLabelHeight); + setTextMargins(QMargins(6, 0, nLabelHeight + 6, 0)); + mImageLabel->setPixmap(QPixmap(mImagePath)); + mImageLabel->show(); + } +} + +bool ImsImageLineEdit::eventFilter(QObject *obj, QEvent *event) +{ + if (mImageLabel && obj == mImageLabel) + { + if (event->type() == QEvent::MouseButtonPress) + { + QMouseEvent *mouseEvent = static_cast(event); + + if (mouseEvent->buttons() & Qt::LeftButton) + { + emit imageLabelClicked(); + return true; + } + } + } + + return QLineEdit::eventFilter(obj, event); +} diff --git a/imsclient/imsclient/imsimagelineedit.h b/imsclient/imsclient/imsimagelineedit.h new file mode 100644 index 00000000..9f704566 --- /dev/null +++ b/imsclient/imsclient/imsimagelineedit.h @@ -0,0 +1,37 @@ +#ifndef IMSIMAGELINEEDIT_H +#define IMSIMAGELINEEDIT_H + + +#include + +class QLabel; + +class ImsImageLineEdit : public QLineEdit +{ + Q_OBJECT + +public: + explicit ImsImageLineEdit(QWidget *parent = 0); + explicit ImsImageLineEdit(const QString & contents, QWidget *parent = 0); + explicit ImsImageLineEdit(const QString & contents, const QString & pic, QWidget *parent = 0); + virtual ~ImsImageLineEdit(); + + void setLabelPic(const QString strPic); + +signals: + void imageLabelClicked(); + +protected: + void init(); + void changeLabelPosition(); + +protected: + virtual void resizeEvent(QResizeEvent *event); + virtual bool eventFilter(QObject *obj, QEvent *e); + +private: + QString mImagePath; + QLabel *mImageLabel; +}; + +#endif // IMSIMAGELINEEDIT_H diff --git a/imsclient/imsclient/imsresoursce.cpp b/imsclient/imsclient/imsresoursce.cpp new file mode 100644 index 00000000..2fa9ae9e --- /dev/null +++ b/imsclient/imsclient/imsresoursce.cpp @@ -0,0 +1,130 @@ +#include "imsresoursce.h" + +#include + +QIcon CImsResource::stateIconByCode(Ims::ImsState state) +{ + switch (state) + { + case Ims::StateOnline://在线 + return QIcon(":/WorkStation/Resources/theme/state/imonline.png"); + case Ims::StateQMy://Q我吧 + return QIcon(":/WorkStation/Resources/theme/state/Qme.png"); + case Ims::StateLeave://离开 + return QIcon(":/WorkStation/Resources/theme/state/away.png"); + case Ims::StateBusy://忙碌 + return QIcon(":/WorkStation/Resources/theme/state/busy.png"); + case Ims::StateNoDisturb://请勿打扰 + return QIcon(":/WorkStation/Resources/theme/state/mute.png"); + case Ims::StateStealth://隐身 + return QIcon(":/WorkStation/Resources/theme/state/invisible.png"); + case Ims::StateOffline://离线 + return QIcon(":/WorkStation/Resources/theme/state/imoffline.png"); + } + return QIcon(); +} + +QIcon CImsResource::trayIconByCode(Ims::ImsState state) +{ + switch (state) + { + case Ims::StateOnline://在线 + return QIcon(":/WorkStation/Resources/theme/tray/imonline.ico"); + case Ims::StateQMy://Q我吧 + return QIcon(":/WorkStation/Resources/theme/tray/Qme.ico"); + break; + case Ims::StateLeave://离开 + return QIcon(":/WorkStation/Resources/theme/tray/away.ico"); + break; + case Ims::StateBusy://忙碌 + return QIcon(":/WorkStation/Resources/theme/tray/busy.ico"); + break; + case Ims::StateNoDisturb://请勿打扰 + return QIcon(":/WorkStation/Resources/theme/tray/mute.ico"); + break; + case Ims::StateStealth://隐身 + return QIcon(":/WorkStation/Resources/theme/tray/invisible.ico"); + break; + case Ims::StateOffline://离线 + return QIcon(":/WorkStation/Resources/theme/tray/offline.ico"); + break; + } + return QIcon(); +} + +QString CImsResource::mainWindowIcon() +{ + return ":/WorkStation/Resources/theme/qq.ico"; +} + +QString CImsResource::userHeadImage() +{ + return ":/WorkStation/Resources/theme/head.png"; +} + +QString CImsResource::loginBackground() +{ + int nCurrentHour = QTime::currentTime().hour(); + if (nCurrentHour >= 7 && nCurrentHour < 9) + return ":/WorkStation/Resources/theme/login/morning.jpg"; + else if (nCurrentHour >= 9 && nCurrentHour < 18) + return ":/WorkStation/Resources/theme/login/noon.jpg"; + else if (nCurrentHour >= 18 && nCurrentHour < 19) + return ":/WorkStation/Resources/theme/login/afternoon.jpg"; + return ":/WorkStation/Resources/theme/login/night.jpg"; +} + +QString CImsResource::mainAppBackground() +{ + return ":/WorkStation/Resources/theme/interface/default.jpg"; +} + +QString CImsResource::icomSearchEdit() +{ + return ":/WorkStation/Resources/theme/maintabbar/icon_search_normal.png"; +} + +QString CImsResource::icomPassWordEdit() +{ + return ":/WorkStation/Resources/theme/login/keyboard.png"; +} + +QString CImsResource::iconInterManager() +{ + return ":/WorkStation/Resources/theme/interface/AreaPresentMgr_RBMenu.png"; +} + +QString CImsResource::iconSignatureEdit() +{ + return ":/WorkStation/Resources/theme/interface/autograph.png"; +} + +QIcon CImsResource::iconMainMenuEnter() +{ + return QIcon(":/WorkStation/Resources/theme/maintool/menu_btn_highlight.png"); +} + +QIcon CImsResource::iconMainMenuLeave() +{ + return QIcon(":/WorkStation/Resources/theme/maintool/menu_btn_normal.png"); +} + +QString CImsResource::menuGroupIcon() +{ + return ":/WorkStation/Resources/theme/menu/groupmainpage.png"; +} + +QString CImsResource::menuContactHeadIcon() +{ + return ":/WorkStation/Resources/theme/menu/modehead.png"; +} + +QString CImsResource::interfaceCover() +{ + return ":/WorkStation/Resources/theme/interface/fengmian_1.png"; +} + +QString CImsResource::interfaceClassic() +{ + return ":/WorkStation/Resources/theme/interface/jingdian_2.png"; +} diff --git a/imsclient/imsclient/imsresoursce.h b/imsclient/imsclient/imsresoursce.h new file mode 100644 index 00000000..71a9a716 --- /dev/null +++ b/imsclient/imsclient/imsresoursce.h @@ -0,0 +1,32 @@ +#ifndef IMSRESOURSCE_H +#define IMSRESOURSCE_H + +#include +#include +#include "imsdefine.h" + +class CImsResource +{ +public: + CImsResource(); + ~CImsResource(); +public: + static QIcon stateIconByCode(Ims::ImsState state); + static QIcon trayIconByCode(Ims::ImsState state); + static QIcon iconMainMenuEnter(); + static QIcon iconMainMenuLeave(); + + static QString mainWindowIcon(); + static QString userHeadImage(); + static QString loginBackground(); + static QString mainAppBackground(); + static QString icomSearchEdit(); + static QString icomPassWordEdit(); + static QString iconInterManager(); + static QString iconSignatureEdit(); + static QString menuGroupIcon(); + static QString menuContactHeadIcon(); + static QString interfaceCover(); + static QString interfaceClassic(); +}; +#endif //IMSRESOURSCE_H \ No newline at end of file diff --git a/imsclient/imsclient/main.cpp b/imsclient/imsclient/main.cpp new file mode 100644 index 00000000..c81f348d --- /dev/null +++ b/imsclient/imsclient/main.cpp @@ -0,0 +1,19 @@ +#include "workstation.h" +#include + +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + WorkStation w; + int ret = w.createLoginScreen(); + + if (ret == QDialog::Accepted) + { + w.createShowScreen(); + ret = a.exec(); + } + + return ret; +} diff --git a/imsclient/imsclient/resource.h b/imsclient/imsclient/resource.h new file mode 100644 index 00000000..a89285ab --- /dev/null +++ b/imsclient/imsclient/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by imsclient.rc +// +#define IDI_ICON1 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/imsclient/imsclient/uiapplicationmanager.cpp b/imsclient/imsclient/uiapplicationmanager.cpp new file mode 100644 index 00000000..3fa971ef --- /dev/null +++ b/imsclient/imsclient/uiapplicationmanager.cpp @@ -0,0 +1,15 @@ +#include "uiapplicationmanager.h" +#include "ui_uiapplicationmanager.h" + +UiApplicationManager::UiApplicationManager(QWidget *parent) + : UiImsBaseDialog(parent) +{ + ui = new Ui::UiApplicationManager(); + ui->setupUi(this); +} + +UiApplicationManager::~UiApplicationManager() +{ + delete ui; +} + diff --git a/imsclient/imsclient/uiapplicationmanager.h b/imsclient/imsclient/uiapplicationmanager.h new file mode 100644 index 00000000..57b72a1c --- /dev/null +++ b/imsclient/imsclient/uiapplicationmanager.h @@ -0,0 +1,19 @@ +#ifndef UIAPPLICATIONMANAGER_H +#define UIAPPLICATIONMANAGER_H + +#include "uiimsbasedialog.h" +namespace Ui {class UiApplicationManager;}; + +class UiApplicationManager : public UiImsBaseDialog +{ + Q_OBJECT + +public: + UiApplicationManager(QWidget *parent = 0); + ~UiApplicationManager(); + +private: + Ui::UiApplicationManager *ui; +}; + +#endif // UIAPPLICATIONMANAGER_H diff --git a/imsclient/imsclient/uiapplicationmanager.ui b/imsclient/imsclient/uiapplicationmanager.ui new file mode 100644 index 00000000..a1f890a3 --- /dev/null +++ b/imsclient/imsclient/uiapplicationmanager.ui @@ -0,0 +1,31 @@ + + UiApplicationManager + + + UiApplicationManager + + + + 0 + 0 + 400 + 300 + + + + UiApplicationManager + + + + + + + UiImsBaseDialog + QWidget +
uiimsbasedialog.h
+ 1 +
+
+ + +
diff --git a/imsclient/imsclient/uiimsbasedialog.cpp b/imsclient/imsclient/uiimsbasedialog.cpp new file mode 100644 index 00000000..dc28ad1d --- /dev/null +++ b/imsclient/imsclient/uiimsbasedialog.cpp @@ -0,0 +1,205 @@ +#include "uiimsbasedialog.h" + +#include +#include +#include + +UiImsBaseDialog::UiImsBaseDialog(QWidget *parent) + : QDialog(parent) +{ + mMoveing = false; + mLabelIcon = NULL; + mLabelTitle = NULL; + mToolButtonClose = NULL; + mToolButtonMax = NULL; + mToolButtonMin = NULL; + mToolButtonNor = NULL; + mToolButtonSkin = NULL; + mToolButtonSet = NULL; + mBroudGroundPixmap = NULL; + mBroudGroundWidget = NULL; + mMovePosition = QPoint(0, 0); + setFocusPolicy(Qt::ClickFocus); + setWindowFlags(Qt::FramelessWindowHint | Qt::Tool); +} + +UiImsBaseDialog::~UiImsBaseDialog() +{ + if (mBroudGroundPixmap) + delete mBroudGroundPixmap; + mBroudGroundPixmap = NULL; + + if (mLabelIcon) + delete mLabelIcon; + mLabelIcon = NULL; + + if (mLabelTitle) + delete mLabelTitle; + mLabelTitle = NULL; + + if (mToolButtonClose) + delete mToolButtonClose; + mToolButtonClose = NULL; + + if (mToolButtonMax) + delete mToolButtonMax; + mToolButtonMax = NULL; + + if (mToolButtonMin) + delete mToolButtonMin; + mToolButtonMin = NULL; + + if (mToolButtonNor) + delete mToolButtonNor; + mToolButtonNor = NULL; + + if (mToolButtonSkin) + delete mToolButtonSkin; + mToolButtonSkin = NULL; + + if (mToolButtonSet) + delete mToolButtonSet; + mToolButtonSet = NULL; +} + +void UiImsBaseDialog::resizeEvent(QResizeEvent *event) +{ + if (mBroudGroundWidget && mBroudGroundPixmap) + { + QPalette palette(mBroudGroundWidget->palette()); + palette.setBrush(QPalette::Window, QBrush(mBroudGroundPixmap->scaled(mBroudGroundWidget->size(), + Qt::IgnoreAspectRatio, + Qt::SmoothTransformation))); + mBroudGroundWidget->setPalette(palette); + } + + //设置圆角矩形 + QPainterPath path; + path.addRoundedRect(rect(), 5, 5); + setMask(QRegion(path.toFillPolygon().toPolygon())); + return QDialog::resizeEvent(event); +} + +void UiImsBaseDialog::mousePressEvent(QMouseEvent *event) +{ + mMoveing = true; + mMovePosition = event->globalPos() - pos(); + return QDialog::mousePressEvent(event); +} + +void UiImsBaseDialog::mouseMoveEvent(QMouseEvent *event) +{ + if (mMoveing && (event->buttons() && Qt::LeftButton) + && (event->globalPos() - mMovePosition).manhattanLength() > QApplication::startDragDistance()) + { + move(event->globalPos() - mMovePosition); + mMovePosition = event->globalPos() - pos(); + } + return QDialog::mouseMoveEvent(event); +} + +void UiImsBaseDialog::mouseReleaseEvent(QMouseEvent *event) +{ + mMoveing = false; +} + +void UiImsBaseDialog::createTitleBar(QWidget *parent, uint flag, QString title /* = "" */) +{ + if (parent == NULL) + return; + parent->setMaximumHeight(20); + parent->setMinimumHeight(20); + QHBoxLayout *layout = new QHBoxLayout(parent); + + if ((flag & WindowToolIcon) == WindowToolIcon) + { + mLabelIcon = new QLabel(parent); + mLabelIcon->setPixmap(QPixmap(CImsResource::mainWindowIcon()).scaled(20, 20)); + layout->addWidget(mLabelIcon); + } + + if (!title.isEmpty()) + { + mLabelTitle = new QLabel(title, parent); + layout->addWidget(mLabelTitle); + } + + layout->addSpacerItem(new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum)); + + if ((flag & WindowToolSet) == WindowToolSet) + { + mToolButtonSet = new QToolButton(parent); + mToolButtonSet->setObjectName("toolButtonSet"); + mToolButtonSet->setAutoRaise(true); + connect(mToolButtonSet, SIGNAL(clicked()), this, SLOT(doToolButtonSet())); + layout->addWidget(mToolButtonSet); + } + + if ((flag & WindowToolSkin) == WindowToolSkin) + { + mToolButtonSkin = new QToolButton(parent); + mToolButtonSkin->setObjectName("toolButtonSkin"); + mToolButtonSkin->setAutoRaise(true); + connect(mToolButtonSkin, SIGNAL(clicked()), this, SLOT(doToolButtonSkin())); + layout->addWidget(mToolButtonSkin); + } + + if ((flag & WindowToolMin) == WindowToolMin) + { + mToolButtonMin = new QToolButton(parent); + mToolButtonMin->setObjectName("toolButtonMin"); + mToolButtonMin->setAutoRaise(true); + connect(mToolButtonMin, SIGNAL(clicked()), this, SLOT(hide())); + layout->addWidget(mToolButtonMin); + } + + if ((flag & WindowToolNor) == WindowToolNor) + { + mToolButtonNor = new QToolButton(parent); + mToolButtonNor->setObjectName("toolButtonNor"); + mToolButtonNor->setAutoRaise(true); + connect(mToolButtonNor, SIGNAL(clicked()), this, SLOT(doToolButtonNor())); + layout->addWidget(mToolButtonNor); + } + + if ((flag & WindowToolMax) == WindowToolMax) + { + mToolButtonMax = new QToolButton(parent); + mToolButtonMax->setObjectName("toolButtonMax"); + mToolButtonMax->setAutoRaise(true); + connect(mToolButtonMax, SIGNAL(clicked()), this, SLOT(doToolButtonMax())); + layout->addWidget(mToolButtonMax); + } + + if ((flag & WindowToolClose) == WindowToolClose) + { + mToolButtonClose = new QToolButton(parent); + mToolButtonClose->setObjectName("toolButtonClose"); + mToolButtonClose->setAutoRaise(true); + connect(mToolButtonClose, SIGNAL(clicked()), this, SLOT(doToolButtonClose())); + layout->addWidget(mToolButtonClose); + } + + layout->setSpacing(0); + layout->setContentsMargins(6, 0, 0, 0); + parent->setLayout(layout); +} + +void UiImsBaseDialog::doToolButtonMax() +{ + mToolButtonMax->setVisible(false); + mToolButtonNor->setVisible(true); + showMaximized(); +} + +void UiImsBaseDialog::doToolButtonNor() +{ + mToolButtonMax->setVisible(true); + mToolButtonNor->setVisible(false); + showNormal(); +} + +void UiImsBaseDialog::doToolButtonClose() +{ + close(); +} \ No newline at end of file diff --git a/imsclient/imsclient/uiimsbasedialog.h b/imsclient/imsclient/uiimsbasedialog.h new file mode 100644 index 00000000..64ae84c0 --- /dev/null +++ b/imsclient/imsclient/uiimsbasedialog.h @@ -0,0 +1,80 @@ +#ifndef UIIMSBASEDIALOG_H +#define UIIMSBASEDIALOG_H + +#include +#include +#include +#include +#include + +#include "imsresoursce.h" + +class UiImsBaseDialog : public QDialog +{ + Q_OBJECT + +public: + enum ImsWindowFlag { + WindowToolClose = 0x00000001, + WindowToolMax = 0x00000002, + WindowToolMin = 0x00000004, + WindowToolNor = 0x00000008, + WindowToolSkin = 0x00000010, + WindowToolSet = 0x00000020, + WindowToolIcon = 0x00000040, + }; + + enum ImsMainTab { + MainTabContact = 1,//好友 + MainTabGroup = 2,//群/讨论组 + MainTabLast = 3,//历史会话记录 + MainTabBlog = 4,//微博 + MainTabZone = 5,//空间-特别关心 + MainTabWeather = 6,//天气 + }; + enum ImsInterTool { + InterToolZone = 1,//空间 + InterToolBlog = 2,//微博 + InterToolMail = 3,//邮箱 + InterToolFrined = 4,//朋友网 + InterToolShopping = 5,//我的购物 + InterToolWallet = 6,//我的钱包 + InterToolSoso = 7,//搜搜问问个人中心 + InterToolNews = 8,//我的资讯 + InterToolQQVip = 9,//QQ会员信息中心 + InterToolArel = 10,//界面管理器 + }; + + UiImsBaseDialog(QWidget *parent = 0); + ~UiImsBaseDialog(); + +protected: + virtual void createTitleBar(QWidget *parent, uint flag, QString title = ""); + virtual void resizeEvent(QResizeEvent *event); + virtual void mousePressEvent(QMouseEvent *event); + virtual void mouseMoveEvent(QMouseEvent *event); + virtual void mouseReleaseEvent(QMouseEvent *event); + +protected slots: + virtual void doToolButtonMax(); + virtual void doToolButtonNor(); + virtual void doToolButtonClose(); + virtual void doToolButtonSet() {} + virtual void doToolButtonSkin() {} + +protected: + bool mMoveing; + QPoint mMovePosition; + QLabel *mLabelIcon; + QLabel *mLabelTitle; + QToolButton *mToolButtonClose; + QToolButton *mToolButtonMax; + QToolButton *mToolButtonMin; + QToolButton *mToolButtonNor; + QToolButton *mToolButtonSkin; + QToolButton *mToolButtonSet; + QPixmap *mBroudGroundPixmap; + QWidget *mBroudGroundWidget; +}; + +#endif // UIIMSBASEDIALOG_H diff --git a/imsclient/imsclient/uiinterfacemanager.cpp b/imsclient/imsclient/uiinterfacemanager.cpp new file mode 100644 index 00000000..63a07891 --- /dev/null +++ b/imsclient/imsclient/uiinterfacemanager.cpp @@ -0,0 +1,139 @@ +#include "uiinterfacemanager.h" +#include "ui_uiinterfacemanager.h" + +#include + +UiInterfaceManager::UiInterfaceManager(QWidget *parent) + : UiImsBaseDialog(parent) +{ + ui = new Ui::UiInterfaceManager(); + ui->setupUi(this); + createTitleBar(ui->widgetTitle, WindowToolIcon | WindowToolClose, "更改外观"); + mBroudGroundWidget = this; + mBroudGroundPixmap = new QPixmap(CImsResource::mainAppBackground()); + + ui->tableWidgetInter->setColumnWidth(0, 30); + ui->tableWidgetInter->setColumnWidth(1, 30); + ui->tableWidgetMainTab->setColumnWidth(0, 30); + ui->tableWidgetMainTab->setColumnWidth(1, 30); + + int i = 0; + for (i = 0; i < ui->tableWidgetInter->rowCount(); i++) + { + ui->tableWidgetInter->setRowHeight(i, 30); + ui->tableWidgetInter->item(i, 1)->setData(Qt::UserRole, i + 1); + } + for (int i = 0; i < ui->tableWidgetMainTab->rowCount(); i++) + { + ui->tableWidgetMainTab->setRowHeight(i, 30); + ui->tableWidgetMainTab->item(i, 1)->setData(Qt::UserRole, i + 1); + } + + connect(ui->pushButtonSkin, SIGNAL(clicked()), this, SLOT(doPushButtonSkin())); + connect(ui->pushButtonInter, SIGNAL(clicked()), this, SLOT(doPushButtonInter())); + connect(ui->pushButtonCover, SIGNAL(clicked()), this, SLOT(doPushButtonCover())); + connect(ui->pushButtonClassic, SIGNAL(clicked()), this, SLOT(doPushButtonClassic())); + connect(ui->pushButtonMoveUp, SIGNAL(clicked()), this, SLOT(doPushButtonMoveUp())); + connect(ui->pushButtonMoveDown, SIGNAL(clicked()), this, SLOT(doPushButtonMoveDown())); + connect(ui->tableWidgetInter, SIGNAL(itemSelectionChanged()), this, SLOT(doInterItemSelectionChanged())); + connect(ui->tableWidgetInter, SIGNAL(itemChanged(QTableWidgetItem *)), + this, SLOT(doInteritemChanged(QTableWidgetItem *))); + connect(ui->tableWidgetMainTab, SIGNAL(itemChanged(QTableWidgetItem *)), + this, SLOT(doMainTabitemChanged(QTableWidgetItem *))); + ui->tableWidgetInter->setCurrentItem(ui->tableWidgetInter->item(0, 0)); + doInterItemSelectionChanged(); +} + +UiInterfaceManager::~UiInterfaceManager() +{ + delete ui; +} + +void UiInterfaceManager::showSkin() +{ + doPushButtonSkin(); + ui->pushButtonSkin->setChecked(true); + show(); +} + +void UiInterfaceManager::showInterManager() +{ + doPushButtonInter(); + ui->pushButtonInter->setChecked(true); + show(); +} + +void UiInterfaceManager::doPushButtonSkin() +{ + ui->tabWidgetIterFace->setCurrentWidget(ui->tabSkin); + ui->toolButton->setVisible(true); + ui->pushButtonSkinSuit->setVisible(true); + ui->pushButtonMoreSkin->setVisible(true); +} + +void UiInterfaceManager::doPushButtonInter() +{ + ui->toolButton->setVisible(false); + ui->tabWidgetIterFace->setCurrentWidget(ui->tabInter); + ui->pushButtonSkinSuit->setVisible(false); + ui->pushButtonMoreSkin->setVisible(false); +} + +void UiInterfaceManager::doPushButtonClassic() +{ + ui->labelSkinPreview->setPixmap(CImsResource::interfaceClassic()); +} + +void UiInterfaceManager::doPushButtonCover() +{ + ui->labelSkinPreview->setPixmap(CImsResource::interfaceCover()); +} + +void UiInterfaceManager::doPushButtonMoveUp() +{ + int nRow = ui->tableWidgetInter->currentRow(); + int nRowCount = ui->tableWidgetInter->rowCount() - 1; + if (nRow <= 0 || nRow == nRowCount) + return; + QTableWidgetItem *item = ui->tableWidgetInter->item(nRow, 1); + int nIndex = item->data(Qt::UserRole).toInt(); + emit interToolMove(nIndex, true); +} + +void UiInterfaceManager::doPushButtonMoveDown() +{ + int nRow = ui->tableWidgetInter->currentRow(); + int nRowCount = ui->tableWidgetInter->rowCount() - 1; + if (nRow == -1 || nRow >= nRowCount - 1) + return; + QTableWidgetItem *item = ui->tableWidgetInter->item(nRow, 1); + int nIndex = item->data(Qt::UserRole).toInt(); + emit interToolMove(nIndex, false); +} + +void UiInterfaceManager::doInterItemSelectionChanged() +{ + int nRow = ui->tableWidgetInter->currentRow(); + int nRowCount = ui->tableWidgetInter->rowCount() - 1; + + ui->pushButtonMoveUp->setEnabled(!(nRow == 0 || nRow == nRowCount)); + ui->pushButtonMoveDown->setEnabled(nRow < nRowCount - 1); +} + +void UiInterfaceManager::doInteritemChanged(QTableWidgetItem * item) +{ + if (item->column() == 1) + { + int nIndex = item->data(Qt::UserRole).toInt(); + emit interToolVisibleChanged(nIndex, (item->checkState() == Qt::Checked)); + } +} + +void UiInterfaceManager::doMainTabitemChanged(QTableWidgetItem * item) +{ + if (item->column() == 1) + { + int nIndex = item->data(Qt::UserRole).toInt(); + emit mainTabVisibleChanged(nIndex, (item->checkState() == Qt::Checked)); + } +} diff --git a/imsclient/imsclient/uiinterfacemanager.h b/imsclient/imsclient/uiinterfacemanager.h new file mode 100644 index 00000000..d158a7bd --- /dev/null +++ b/imsclient/imsclient/uiinterfacemanager.h @@ -0,0 +1,36 @@ +#ifndef UIINTERFACEMANAGER_H +#define UIINTERFACEMANAGER_H + +#include "uiimsbasedialog.h" +namespace Ui {class UiInterfaceManager;}; + +class QTableWidgetItem; +class UiInterfaceManager : public UiImsBaseDialog +{ + Q_OBJECT + +public: + UiInterfaceManager(QWidget *parent = 0); + ~UiInterfaceManager(); +signals: + void interToolMove(int index,bool up); + void interToolVisibleChanged(int index,bool visible); + void mainTabVisibleChanged(int index,bool visible); +public slots: + void showSkin(); + void showInterManager(); +protected slots: + void doPushButtonSkin(); + void doPushButtonInter(); + void doPushButtonClassic(); + void doPushButtonCover(); + void doPushButtonMoveUp(); + void doPushButtonMoveDown(); + void doInterItemSelectionChanged(); + void doInteritemChanged(QTableWidgetItem * item); + void doMainTabitemChanged(QTableWidgetItem * item); +private: + Ui::UiInterfaceManager *ui; +}; + +#endif // UIINTERFACEMANAGER_H diff --git a/imsclient/imsclient/uiinterfacemanager.ui b/imsclient/imsclient/uiinterfacemanager.ui new file mode 100644 index 00000000..db871cdf --- /dev/null +++ b/imsclient/imsclient/uiinterfacemanager.ui @@ -0,0 +1,1010 @@ + + + UiInterfaceManager + + + + 0 + 0 + 723 + 533 + + + + + 723 + 0 + + + + + 723 + 16777215 + + + + UiInterfaceManager + + + + 0 + + + 0 + + + + + + 0 + 20 + + + + + + + + 0 + + + + + + 100 + 50 + + + + + 100 + 50 + + + + 鐨偆璁剧疆 + + + true + + + true + + + true + + + buttonGroupTabbar + + + + + + + + 100 + 50 + + + + + 100 + 50 + + + + 鐣岄潰绠$悊 + + + true + + + true + + + buttonGroupTabbar + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + 0 + 0 + + + + QTabWidget::Rounded + + + 0 + + + true + + + + 鐨偆璁剧疆 + + + + 9 + + + 9 + + + + + + 500 + 373 + + + + + + + + 0 + + + + + + 0 + 320 + + + + + 0 + + + 0 + + + + + + 197 + 320 + + + + + + + :/WorkStation/Resources/theme/interface/fengmian_1.png + + + true + + + + + + + + + + 0 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 缁忓吀 + + + true + + + true + + + false + + + buttonGroupCover + + + + + + + 灏侀潰 + + + true + + + false + + + buttonGroupCover + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + 浼氬憳灏婁韩7澶╃毊鑲ゅ瑁 + + + Qt::AlignCenter + + + + + + + + + + 鐣岄潰绠$悊 + + + + + + 鏄剧ず鍦ㄤ富闈㈡澘 + + + true + + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QAbstractItemView::NoEditTriggers + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + + 20 + 20 + + + + false + + + false + + + true + + + false + + + false + + + + New Row + + + + + New Row + + + + + New Row + + + + + New Row + + + + + New Row + + + + + New Row + + + + + New Column + + + + + New Column + + + + + New Column + + + + + + + + NoItemFlags + + + + + + + + Checked + + + ItemIsEnabled + + + + + 鑱旂郴浜 + + + + :/WorkStation/Resources/theme/interface/icon_contacts_selected_Blue.png:/WorkStation/Resources/theme/interface/icon_contacts_selected_Blue.png + + + ItemIsEnabled|ItemIsTristate + + + + + + + + NoItemFlags + + + + + + + + Checked + + + ItemIsEnabled + + + + + 缇/璁ㄨ缁 + + + + :/WorkStation/Resources/theme/interface/icon_group_selected_Blue.png:/WorkStation/Resources/theme/interface/icon_group_selected_Blue.png + + + ItemIsEnabled + + + + + + + + NoItemFlags + + + + + + + + Checked + + + ItemIsEnabled + + + + + 浼氳瘽 + + + + :/WorkStation/Resources/theme/interface/icon_last_selected_Blue.png:/WorkStation/Resources/theme/interface/icon_last_selected_Blue.png + + + ItemIsEnabled + + + + + + + + NoItemFlags + + + + + + + + Checked + + + ItemIsUserCheckable|ItemIsEnabled + + + + + 寰崥 + + + + :/WorkStation/Resources/theme/interface/icon_blog_selected_Blue.png:/WorkStation/Resources/theme/interface/icon_blog_selected_Blue.png + + + ItemIsEnabled + + + + + + + + NoItemFlags + + + + + + + + Checked + + + ItemIsUserCheckable|ItemIsEnabled + + + + + QQ绌洪棿-鐗瑰埆鍏冲績 + + + + :/WorkStation/Resources/theme/interface/icon_zone_selected_Blue.png:/WorkStation/Resources/theme/interface/icon_zone_selected_Blue.png + + + ItemIsEnabled + + + + + + + + NoItemFlags + + + + + + + + + + + Checked + + + ItemIsUserCheckable|ItemIsEnabled + + + + + 澶╂皵 + + + + :/WorkStation/Resources/theme/interface/icon_weather_selected_Blue.png:/WorkStation/Resources/theme/interface/icon_weather_selected_Blue.png + + + ItemIsEnabled + + + + + + + + + + + 鏄剧ず鍦ㄤ釜浜轰俊鎭尯 + + + true + + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QAbstractItemView::NoEditTriggers + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + + 20 + 20 + + + + false + + + false + + + true + + + false + + + + New Row + + + + + New Row + + + + + New Row + + + + + New Row + + + + + New Row + + + + + New Row + + + + + New Row + + + + + New Row + + + + + New Row + + + + + New Row + + + + + New Column + + + + + New Column + + + + + New Column + + + + + + + + Checked + + + + + QQ绌洪棿 + + + + :/WorkStation/Resources/theme/interface/qzoneicon.png:/WorkStation/Resources/theme/interface/qzoneicon.png + + + + + + + + Checked + + + + + 鑵捐寰崥 + + + + :/WorkStation/Resources/theme/interface/wblogicon.png:/WorkStation/Resources/theme/interface/wblogicon.png + + + + + + + + Checked + + + + + 鎴戠殑閭 + + + + :/WorkStation/Resources/theme/interface/mail.png:/WorkStation/Resources/theme/interface/mail.png + + + + + + + + Checked + + + + + 鏈嬪弸缃 + + + + :/WorkStation/Resources/theme/interface/friendicon.png:/WorkStation/Resources/theme/interface/friendicon.png + + + + + + + + Checked + + + + + 鎴戠殑璐墿 + + + + :/WorkStation/Resources/theme/interface/shopping.png:/WorkStation/Resources/theme/interface/shopping.png + + + + + + + + Checked + + + + + 鎴戠殑閽卞寘 + + + + :/WorkStation/Resources/theme/interface/wallet.png:/WorkStation/Resources/theme/interface/wallet.png + + + + + + + + Checked + + + + + 鎼滄悳闂棶涓汉涓績 + + + + :/WorkStation/Resources/theme/interface/soso.png:/WorkStation/Resources/theme/interface/soso.png + + + + + + + + Checked + + + + + 鎴戠殑璧勮 + + + + :/WorkStation/Resources/theme/interface/news.png:/WorkStation/Resources/theme/interface/news.png + + + + + + + + Checked + + + + + QQ浼氬憳淇℃伅涓績 + + + + :/WorkStation/Resources/theme/interface/vip_16.png:/WorkStation/Resources/theme/interface/vip_16.png + + + + + + + + Checked + + + + + 鐣岄潰绠$悊鍣 + + + + :/WorkStation/Resources/theme/interface/AreaMainIcon.png:/WorkStation/Resources/theme/interface/AreaMainIcon.png + + + + + + + + Qt::Vertical + + + + + + + + + 涓婄Щ + + + + :/WorkStation/Resources/theme/interface/upbtn.png:/WorkStation/Resources/theme/interface/upbtn.png + + + + + + + 涓嬬Щ + + + + :/WorkStation/Resources/theme/interface/downbtn.png:/WorkStation/Resources/theme/interface/downbtn.png + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + + + + 9 + + + 9 + + + + + 7澶╃毊鑲ゅ瑁 + + + + + + + 鑷畾涔 + + + + :/WorkStation/Resources/theme/interface/plus.png:/WorkStation/Resources/theme/interface/plus.png + + + + + + + 鏇村鐨偆 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + :/WorkStation/Resources/theme/interface/MaterialAlphaSet.png:/WorkStation/Resources/theme/interface/MaterialAlphaSet.png + + + + 20 + 20 + + + + true + + + + + + + + + + + UiImsBaseDialog + QWidget +
uiimsbasedialog.h
+ 1 +
+ + UiTabWidget + QTabWidget +
uitabwidget.h
+ 1 +
+
+ + + + + + + + +
diff --git a/imsclient/imsclient/uiloginscreen.cpp b/imsclient/imsclient/uiloginscreen.cpp new file mode 100644 index 00000000..5eb177ca --- /dev/null +++ b/imsclient/imsclient/uiloginscreen.cpp @@ -0,0 +1,60 @@ +#include "uiloginscreen.h" +#include "ui_uiloginscreen.h" + +UiLoginScreen::UiLoginScreen(QWidget *parent) + :UiImsBaseDialog(parent) +{ + ui = new Ui::UiLoginScreen(); + ui->setupUi(this); + + mLogin = false; + mBroudGroundWidget = ui->widgetParam; + mBroudGroundPixmap = new QPixmap(CImsResource::loginBackground()); + + createTitleBar(ui->widgetTitle, WindowToolSet | WindowToolMin | WindowToolClose); + + ui->labelPixmap->setScaledContents(true); + ui->labelPixmap->setFrameShape(QFrame::StyledPanel); + ui->labelPixmap->setPixmap(QPixmap(CImsResource::userHeadImage())); + ui->widgetParam->setAutoFillBackground(true); + + ui->lineEditAccount->setLabelPic(":/WorkStation/Resources/theme/ChatFrame/btnright_normal.png"); + ui->lineEditPass->setLabelPic(CImsResource::icomPassWordEdit()); + connect(ui->pushButtonLogin, SIGNAL(clicked()), this, SLOT(doPushButtonLogin())); +} + +UiLoginScreen::~UiLoginScreen() +{ + delete ui; +} + +void UiLoginScreen::doToolButtonSet() +{ + +} + +void UiLoginScreen::doToolButtonClose() +{ + qApp->quit(); +} + +void UiLoginScreen::doPushButtonLogin() +{ + mLogin = true; + return done(QDialog::Accepted); +} + +void UiLoginScreen::doImageClickedAccount() +{ + ui->lineEditAccount->setLabelPic(":/WorkStation/Resources/theme/ChatFrame/btnright_focus_down.png"); +} + +void UiLoginScreen::doImageClickedPassword() +{ + +} + +quint32 UiLoginScreen::loginState() +{ + return ui->labelPixmap->currentState(); +} diff --git a/imsclient/imsclient/uiloginscreen.h b/imsclient/imsclient/uiloginscreen.h new file mode 100644 index 00000000..feea0d2d --- /dev/null +++ b/imsclient/imsclient/uiloginscreen.h @@ -0,0 +1,30 @@ +#ifndef UILOGINSCREEN_H +#define UILOGINSCREEN_H + +#include "uiimsbasedialog.h" + +namespace Ui { class UiLoginScreen; }; + +class UiLoginScreen : public UiImsBaseDialog +{ + Q_OBJECT + +public: + UiLoginScreen(QWidget *parent = 0); + ~UiLoginScreen(); + + quint32 loginState(); + bool isLogin() { return mLogin; } + protected slots: + void doToolButtonSet(); + void doToolButtonClose(); + void doPushButtonLogin(); + void doImageClickedAccount(); + void doImageClickedPassword(); + +private: + bool mLogin; + Ui::UiLoginScreen *ui; +}; + +#endif // UILOGINSCREEN_H diff --git a/imsclient/imsclient/uiloginscreen.ui b/imsclient/imsclient/uiloginscreen.ui new file mode 100644 index 00000000..88b99f91 --- /dev/null +++ b/imsclient/imsclient/uiloginscreen.ui @@ -0,0 +1,430 @@ + + + UiLoginScreen + + + false + + + + 0 + 0 + 377 + 296 + + + + + 377 + 296 + + + + + 377 + 296 + + + + 鐧诲綍 + + + false + + + + 0 + + + 0 + + + + + + 16777215 + 241 + + + + + 10 + + + + + 9 + + + 0 + + + + + + 0 + 20 + + + + + 16777215 + 20 + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 100 + + + + + + + + 6 + + + + + + 90 + 0 + + + + + 16777215 + 16777215 + + + + + + + + + 0 + 16 + + + + + 16777215 + 16 + + + + + 9 + + + + + + + + + + + + + + + 0 + 28 + + + + + + + QLineEdit::Password + + + 瀵嗙爜 + + + + + + + 璁颁綇瀵嗙爜 + + + + + + + 鑷姩鐧诲綍 + + + + + + + + 51 + 16 + + + + + 51 + 16 + + + + + 9 + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 10 + + + + + + + + + 0 + 28 + + + + QQ鍙风爜/鎵嬫満/閭 + + + + + + + + + + + + + 0 + 50 + + + + + 16777215 + 50 + + + + + 0 + + + 0 + + + 0 + + + 10 + + + 0 + + + + + + + Qt::Vertical + + + + 20 + 18 + + + + + + + + + 30 + 30 + + + + + 30 + 30 + + + + 澶氳处鎴风櫥褰 + + + + + + + + + + + + Qt::Horizontal + + + + 53 + 36 + + + + + + + + 鐧诲綍 + + + + + + + Qt::Horizontal + + + + 52 + 36 + + + + + + + + + 26 + 27 + + + + + 26 + 27 + + + + 浜岀淮鐮佺櫥褰 + + + + + + + + + + + + + + + UiImsBaseDialog + QWidget +
uiimsbasedialog.h
+ 1 +
+ + ImsImageLineEdit + QLineEdit +
imsimagelineedit.h
+
+ + ImsImageLabel + QLabel +
imsimagelabel.h
+
+
+ + pushButtonLogin + lineEditAccount + lineEditPass + checkBoxRemember + checkBoxAuto + + + + + +
diff --git a/imsclient/imsclient/uitabwidget.cpp b/imsclient/imsclient/uitabwidget.cpp new file mode 100644 index 00000000..79c21e17 --- /dev/null +++ b/imsclient/imsclient/uitabwidget.cpp @@ -0,0 +1,14 @@ +#include "uitabwidget.h" + +#include + +UiTabWidget::UiTabWidget(QWidget *parent) + : QTabWidget(parent) +{ + tabBar()->hide(); +} + +UiTabWidget::~UiTabWidget() +{ + +} \ No newline at end of file diff --git a/imsclient/imsclient/uitabwidget.h b/imsclient/imsclient/uitabwidget.h new file mode 100644 index 00000000..d66641bb --- /dev/null +++ b/imsclient/imsclient/uitabwidget.h @@ -0,0 +1,18 @@ +#ifndef UITABWIDGET_H +#define UITABWIDGET_H + +#include + +class UiTabWidget : public QTabWidget +{ + Q_OBJECT + +public: + UiTabWidget(QWidget *parent); + ~UiTabWidget(); + +private: + +}; + +#endif // UITABWIDGET_H diff --git a/imsclient/imsclient/uiweatherinfo.cpp b/imsclient/imsclient/uiweatherinfo.cpp new file mode 100644 index 00000000..3e096266 --- /dev/null +++ b/imsclient/imsclient/uiweatherinfo.cpp @@ -0,0 +1,284 @@ +#include "workstation.h" +#include "uiweatherinfo.h" +#include "ui_uiweatherinfo.h" +#include "../tinyxml/tinyxml.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define LOGINIPINTER "http://www.3322.org/dyndns/getip" +#define CITYINTER "http://www.youdao.com/smartresult-xml/search.s?type=ip&q=" +#define WEATHERREAL "http://www.weather.com.cn/data/sk/<%cityid%>.html" +#define WEATHERINTER "http://m.weather.com.cn/data/<%cityid%>.html" +#define WEATHERIMAGE "http://m.weather.com.cn/img/" + +UiWeatherInfo::UiWeatherInfo(QWidget *parent) + : UiImsBaseDialog(parent) +{ + ui = new Ui::UiWeatherInfo(); + ui->setupUi(this); + mWeatgerContext = ""; + mLocalCityCode = ""; + mNetworkReply = NULL; + mNetworkAccessManager = NULL; + mXmlDocumentCity = NULL; + connect(&mTimer, SIGNAL(timeout()), this, SLOT(hide())); + loadCityInfomation(); +} + +UiWeatherInfo::~UiWeatherInfo() +{ + if (mNetworkAccessManager) + delete mNetworkAccessManager; + mNetworkAccessManager = NULL; + + if (mXmlDocumentCity) + delete mXmlDocumentCity; + mXmlDocumentCity = NULL; + delete ui; +} + +void UiWeatherInfo::enterEvent(QEvent *event) +{ + if (mTimer.isActive()) + mTimer.stop(); + return UiImsBaseDialog::enterEvent(event); +} + +void UiWeatherInfo::leaveEvent(QEvent *event) +{ + hideWeatherWidget(); + return UiImsBaseDialog::leaveEvent(event); +} + +void UiWeatherInfo::showEvent(QShowEvent *event) +{ + if (mTimer.isActive()) + mTimer.stop(); + if (!mLocalCityCode.isEmpty()) + doTimeOutWeather(); + return UiImsBaseDialog::showEvent(event); +} + +void UiWeatherInfo::hideWeatherWidget() +{ + if (!mTimer.isActive()) + mTimer.start(1000); +} + +void UiWeatherInfo::loadCityInfomation() +{ + QFile file(":/qss/Resources/cityid.xml"); + if (file.open(QIODevice::ReadOnly)) + { + mXmlDocumentCity = new TiXmlDocument; + mXmlDocumentCity->Parse(file.readAll().data()); + file.close(); + } +} + +QString UiWeatherInfo::getCityCodeByName(QString province, QString city) +{ + QString sCityId = ""; + if (mXmlDocumentCity == NULL) + return sCityId; + if (province.isEmpty()) + province = "直辖市"; + TiXmlElement *pXmlCity = NULL; + TiXmlElement *pXmlArea = NULL; + TiXmlElement *pXmlProv = mXmlDocumentCity->RootElement()->FirstChildElement(); + while (pXmlProv) + { + if (province == pXmlProv->Attribute("name")) + { + pXmlArea = pXmlProv->FirstChildElement(); + break; + } + pXmlProv = pXmlProv->NextSiblingElement(); + } + + while (pXmlArea) + { + if (city == pXmlArea->Attribute("name")); + { + pXmlCity = pXmlArea->FirstChildElement(); + break; + } + pXmlArea = pXmlArea->NextSiblingElement(); + } + + while (pXmlCity) + { + if (city == pXmlCity->Attribute("name")); + { + sCityId = pXmlCity->Attribute("id"); + break; + } + pXmlCity = pXmlCity->NextSiblingElement(); + } + return sCityId; +} + +void UiWeatherInfo::createWeatherInfo() +{ + if (mNetworkAccessManager == NULL) + mNetworkAccessManager = new QNetworkAccessManager(this); + mNetworkReply = mNetworkAccessManager->get(QNetworkRequest(QUrl(LOGINIPINTER))); + connect(mNetworkReply, SIGNAL(readyRead()), this, SLOT(doShowIpAddr())); +} + +void UiWeatherInfo::doShowIpAddr() +{ + QString sIp = mNetworkReply->readAll(); + mNetworkReply->deleteLater(); + qDebug() << "IP:" << sIp; + mNetworkReply = mNetworkAccessManager->get(QNetworkRequest(QUrl(CITYINTER + sIp))); + connect(mNetworkReply, SIGNAL(readyRead()), this, SLOT(doShowCityInfo())); +} + +//江苏省南京市 电信ADSL +void UiWeatherInfo::doShowCityInfo() +{ + TiXmlDocument doc; + QString sProvince, sCity = mNetworkReply->readAll(); + mNetworkReply->deleteLater(); + doc.Parse(sCity.toStdString().c_str()); + TiXmlElement *elem = doc.RootElement()->FirstChildElement("product"); + if (elem) + elem = elem->FirstChildElement("location"); + if (elem == NULL) + return; + sCity = elem->GetText(); + int nPos1 = sCity.indexOf("省"); + int nPos2 = sCity.indexOf("市"); + if (nPos2 == -1) return; + if (nPos1 > 0) + { + sProvince = sCity.mid(0, nPos1); + sCity = sCity.mid(nPos1 + 1, nPos2 - nPos1 - 1); + } + else + sCity = sCity.mid(0, nPos2); + ui->labelCity->setText(sCity); + mLocalCityCode = getCityCodeByName(sProvince, sCity); + if (mLocalCityCode.isEmpty()) + { + qDebug() << "can not find:" << sProvince << "省" << sCity << "市"; + return; + } + qDebug() << mLocalCityCode; + doTimeOutWeather(); +} + +void UiWeatherInfo::doTimeOutWeather() +{ + QString sUrl = QString(WEATHERREAL).replace("<%cityid%>", mLocalCityCode); + mNetworkReply = mNetworkAccessManager->get(QNetworkRequest(QUrl(sUrl))); + connect(mNetworkReply, SIGNAL(readyRead()), this, SLOT(doShowCurrWeather())); +} + +void UiWeatherInfo::doShowCurrWeather() +{ + QTextCodec *codec = QTextCodec::codecForName("UTF-8"); + mWeatgerContext = codec->toUnicode(mNetworkReply->readAll()); + mNetworkReply->deleteLater(); + + ui->labelTemperature->setText(explainWeatherAttribute("temp") + "℃"); + ui->labelWind->setText(explainWeatherAttribute("WD")); + + QString sUrl = QString(WEATHERINTER).replace("<%cityid%>", mLocalCityCode); + mNetworkReply = mNetworkAccessManager->get(QNetworkRequest(QUrl(sUrl))); + connect(mNetworkReply, SIGNAL(readyRead()), this, SLOT(doShowWeatherReport())); +} + +void UiWeatherInfo::doShowWeatherReport() +{ + QTextCodec *codec = QTextCodec::codecForName("UTF-8"); + mWeatgerContext = codec->toUnicode(mNetworkReply->readAll()); + mNetworkReply->deleteLater(); + + ui->labelWeather->setText(explainWeatherAttribute("weather1")); + ui->labelTodayTemp->setText(explainTemperatureReport("temp1")); + ui->labelTomrrowTemp->setText(explainTemperatureReport("temp2")); + ui->labelAfterTemp->setText(explainTemperatureReport("temp3")); + mTodayImage = QString("c%1.gif").arg(explainWeatherAttribute("img1")); + if (mTodayImage == "c99.gif") + mTodayImage = QString("c%1.gif").arg(explainWeatherAttribute("img2")); + mTomrrowImage = QString("c%1.gif").arg(explainWeatherAttribute("img3")); + if (mTomrrowImage == "c99.gif") + mTomrrowImage = QString("c%1.gif").arg(explainWeatherAttribute("img4")); + mAfterImage = QString("c%1.gif").arg(explainWeatherAttribute("img5")); + if (mAfterImage == "c99.gif") + mAfterImage = QString("c%1.gif").arg(explainWeatherAttribute("img6")); + qDebug() << "today:" << mTodayImage << " ;tomorrow:" << mTomrrowImage << " ;after day of tomorrow:" << mAfterImage; + mNetworkReply = mNetworkAccessManager->get(QNetworkRequest(QUrl(WEATHERIMAGE + mTodayImage))); + connect(mNetworkReply, SIGNAL(readyRead()), this, SLOT(doShowImageToday())); +} + +void UiWeatherInfo::doShowImageToday() +{ + QPixmap pix; + pix.loadFromData(mNetworkReply->readAll()); + mNetworkReply->deleteLater(); + ui->labelTodayWeather->setPixmap(pix); + WorkStation::workStation()->setCurrentWeather(pix); + + mNetworkReply = mNetworkAccessManager->get(QNetworkRequest(QUrl(WEATHERIMAGE + mTomrrowImage))); + connect(mNetworkReply, SIGNAL(readyRead()), this, SLOT(doShowImageTomrrow())); +} + +void UiWeatherInfo::doShowImageTomrrow() +{ + QPixmap pix; + pix.loadFromData(mNetworkReply->readAll()); + mNetworkReply->deleteLater(); + ui->labelTomrrowWeather->setPixmap(pix); + + mNetworkReply = mNetworkAccessManager->get(QNetworkRequest(QUrl(WEATHERIMAGE + mAfterImage))); + connect(mNetworkReply, SIGNAL(readyRead()), this, SLOT(doShowImageAfterDay())); +} + +void UiWeatherInfo::doShowImageAfterDay() +{ + QPixmap pix; + pix.loadFromData(mNetworkReply->readAll()); + mNetworkReply->deleteLater(); + ui->labelAfterWeather->setPixmap(pix); + + // if (!isHidden()) + // QTimer::singleShot(5000,this,SLOT(doTimeOutWeather())); +} + +QString UiWeatherInfo::explainWeatherAttribute(QString title) +{ + QString sValue = ""; + int nPos = mWeatgerContext.indexOf(title); + if (nPos != -1) + { + int nPos1 = mWeatgerContext.indexOf(":\"", nPos); + int nPos2 = mWeatgerContext.indexOf("\",", nPos); + if (nPos1 != -1 && nPos2 != -1) + sValue = mWeatgerContext.mid(nPos1 + 2, nPos2 - nPos1 - 2); + } + return sValue; +} + +//30℃~18℃ -->18℃/30℃ +QString UiWeatherInfo::explainTemperatureReport(QString title) +{ + QString sTemp = explainWeatherAttribute(title); + QStringList list = sTemp.split("~"); + if (list.count() > 1) + { + sTemp = list.at(1); + sTemp.push_back("/"); + sTemp.push_back(list.at(0)); + } + return sTemp; +} diff --git a/imsclient/imsclient/uiweatherinfo.h b/imsclient/imsclient/uiweatherinfo.h new file mode 100644 index 00000000..58fcc3a9 --- /dev/null +++ b/imsclient/imsclient/uiweatherinfo.h @@ -0,0 +1,60 @@ +#ifndef UIWEATHERINFO_H +#define UIWEATHERINFO_H + +#include "uiimsbasedialog.h" + +#include +namespace Ui { class UiWeatherInfo; }; + +class TiXmlDocument; +class QNetworkReply; +class QNetworkRequest; +class QNetworkAccessManager; + +class UiWeatherInfo : public UiImsBaseDialog +{ + Q_OBJECT + +public: + UiWeatherInfo(QWidget *parent = 0); + ~UiWeatherInfo(); + + void createWeatherInfo(); + void hideWeatherWidget(); + +protected: + virtual void enterEvent(QEvent *event); + virtual void leaveEvent(QEvent *event); + virtual void showEvent(QShowEvent *event); + +protected: + void loadCityInfomation(); + QString getCityCodeByName(QString province, QString city); + QString explainWeatherAttribute(QString title); + QString explainTemperatureReport(QString title); + +public slots: + void doShowIpAddr(); + void doShowCityInfo(); + void doTimeOutWeather(); + void doShowCurrWeather(); + void doShowWeatherReport(); + void doShowImageToday(); + void doShowImageTomrrow(); + void doShowImageAfterDay(); + +private: + Ui::UiWeatherInfo *ui; + QTimer mTimer; + QTimer mTimerWeather; + QString mTodayImage; + QString mTomrrowImage; + QString mAfterImage; + QString mLocalCityCode; + QString mWeatgerContext; + TiXmlDocument *mXmlDocumentCity; + QNetworkReply *mNetworkReply; + QNetworkAccessManager*mNetworkAccessManager; +}; + +#endif // UIWEATHERINFO_H diff --git a/imsclient/imsclient/uiweatherinfo.ui b/imsclient/imsclient/uiweatherinfo.ui new file mode 100644 index 00000000..7e8469b7 --- /dev/null +++ b/imsclient/imsclient/uiweatherinfo.ui @@ -0,0 +1,437 @@ + + + UiWeatherInfo + + + + 0 + 0 + 248 + 229 + + + + UiWeatherInfo + + + + 0 + + + 0 + + + + + + 9 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + + + + 30 + 75 + true + + + + + + + + + + + + 0 + 25 + + + + + 16777215 + 25 + + + + + 12 + 50 + false + false + false + true + + + + + + + + + + + + 0 + 25 + + + + + 16777215 + 25 + + + + + + + + + + + + + + + + + + + + + 28 + 22 + + + + + 28 + 22 + + + + + + + + :/WorkStation/Resources/theme/systembutton/btn_set_normal.png:/WorkStation/Resources/theme/systembutton/btn_set_normal.png + + + + 28 + 20 + + + + true + + + + + + + Qt::Vertical + + + + 20 + 103 + + + + + + + + + + + + 248 + 101 + + + + + 248 + 101 + + + + + 0 + + + 0 + + + + + 0 + + + + + + + + true + + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + 浠婂ぉ + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + + + Qt::AlignCenter + + + + + + + + + + Qt::AlignCenter + + + + + + + + + + + + + true + + + + 0 + + + 0 + + + + + + 0 + 23 + + + + + 16777215 + 23 + + + + 鏄庡ぉ + + + Qt::AlignCenter + + + + + + + + + + Qt::AlignCenter + + + + + + + + + + Qt::AlignCenter + + + + + + + + + + + + + true + + + + 0 + + + 0 + + + + + 鍚庡ぉ + + + Qt::AlignCenter + + + + + + + + + + Qt::AlignCenter + + + + + + + + + + Qt::AlignCenter + + + + + + + + + + + + true + + + Qt::Horizontal + + + + + + + 6 + + + + + + 16777215 + 25 + + + + + + + :/Weather/Resources/weather/adver.png + + + + + + + + 16777215 + 25 + + + + 绔崍鑺傛嫾鍋囧嚭娌癸紝閰掑簵58鍏冩姠锛 + + + + + + + + + + + + + + UiImsBaseDialog + QWidget +
uiimsbasedialog.h
+ 1 +
+
+ + + + +
diff --git a/imsclient/imsclient/weather.txt b/imsclient/imsclient/weather.txt new file mode 100644 index 00000000..6e3042d9 --- /dev/null +++ b/imsclient/imsclient/weather.txt @@ -0,0 +1,49 @@ +锘胯幏鍙朓P鍦板潃鍜屽煄甯侷D 锛歨ttp://61.4.185.48:81/g/ + +{"weatherinfo":{"city":"鍖椾含","city_en":"beijing","date_y":"2013骞5鏈24鏃","date":"","week":"鏄熸湡浜","fchh":"11","cityid":"101010100","temp1":"30鈩儈18鈩","temp2":"28鈩儈17鈩","temp3":"21鈩儈17鈩","temp4":"24鈩儈17鈩","temp5":"26鈩儈18鈩","temp6":"29鈩儈17鈩","tempF1":"86鈩墌64.4鈩","tempF2":"82.4鈩墌62.6鈩","tempF3":"69.8鈩墌62.6鈩","tempF4":"75.2鈩墌62.6鈩","tempF5":"78.8鈩墌64.4鈩","tempF6":"84.2鈩墌62.6鈩","weather1":"闃磋浆澶氫簯","weather2":"闃磋浆灏忛洦","weather3":"涓洦杞皬闆","weather4":"闃磋浆闃甸洦","weather5":"闃磋浆鏅","weather6":"鏅","img1":"2","img2":"1","img3":"2","img4":"7","img5":"8","img6":"7","img7":"2","img8":"3","img9":"2","img10":"0","img11":"0","img12":"99","img_single":"2","img_title1":"闃","img_title2":"澶氫簯","img_title3":"闃","img_title4":"灏忛洦","img_title5":"涓洦","img_title6":"灏忛洦","img_title7":"闃","img_title8":"闃甸洦","img_title9":"闃","img_title10":"鏅","img_title11":"鏅","img_title12":"鏅","img_title_single":"闃","wind1":"寰","wind2":"寰","wind3":"寰","wind4":"寰","wind5":"鍖楅3-4绾ц浆寰","wind6":"寰","fx1":"寰","fx2":"寰","fl1":"灏忎簬3绾","fl2":"灏忎簬3绾","fl3":"灏忎簬3绾","fl4":"灏忎簬3绾","fl5":"3-4绾ц浆灏忎簬3绾","fl6":"灏忎簬3绾","index":"鐑","index_d":"澶╂皵鐑紝寤鸿鐫鐭銆佺煭瑁ゃ佺煭钖勫濂椼乀鎭ょ瓑澶忓鏈嶈銆","index48":"鐑","index48_d":"澶╂皵鐑紝寤鸿鐫鐭銆佺煭瑁ゃ佺煭钖勫濂椼乀鎭ょ瓑澶忓鏈嶈銆","index_uv":"寮","index48_uv":"寮","index_xc":"涓嶅疁","index_tr":"閫傚疁","index_co":"杈冭垝閫","st1":"31","st2":"17","st3":"29","st4":"16","st5":"17","st6":"15","index_cl":"杈冮傚疁","index_ls":"涓嶅お閫傚疁","index_ag":"杈冩槗鍙"}} + + + + + + + +MJBlog澶╂皵棰勬姤-jQuery鐗 + + + + + + +
褰撳墠鍩庡競锛
+
+
+
浠 澶



+
+
+
+
鏄 澶



+
+
+
+
鍚 澶



+
+ + + \ No newline at end of file diff --git a/imsclient/imsclient/workstation.cpp b/imsclient/imsclient/workstation.cpp new file mode 100644 index 00000000..003a222b --- /dev/null +++ b/imsclient/imsclient/workstation.cpp @@ -0,0 +1,568 @@ +#include "workstation.h" +#include "ui_workstation.h" +#include "uiweatherinfo.h" +#include "uiinterfacemanager.h" +#include "uiapplicationmanager.h" + +#include +#include +#include +#include +#include + +#define SIGNATURE "编辑个性签名" + +WorkStation *WorkStation::mWorkStation = NULL; +WorkStation::WorkStation(QWidget *parent) + : UiImsBaseDialog(parent) +{ + ui = new Ui::WorkStation(); + ui->setupUi(this); + + mWorkStation = this; + mLoginScreen = NULL; + mWeatherInfo = NULL; + mSystemTrayIcon = NULL; + mInterfaceManager = NULL; + mApplicationManager = NULL; + + ui->lineEditSignature->setLabelPic(CImsResource::iconSignatureEdit()); + ui->lineEditSignature->setVisible(false); + + createStyleSheet(); + mBroudGroundWidget = this; + mBroudGroundPixmap = new QPixmap(CImsResource::mainAppBackground()); + + createTitleBar(ui->widgetTitle, WindowToolSkin | WindowToolMin | WindowToolClose, "QQ2013"); + + ui->labelPixmap->setScaledContents(true); + ui->labelPixmap->setFrameShape(QFrame::StyledPanel); + ui->labelPixmap->setPixmap(QPixmap(CImsResource::userHeadImage())); + ui->lineEditSearch->setLabelPic(CImsResource::icomSearchEdit()); + + ui->labelPixmap->installEventFilter(this); + ui->labelWeather->installEventFilter(this); + ui->labelSignature->installEventFilter(this); + ui->toolButtonMainMenu->installEventFilter(this); + + mUserState = Ims::StateOffline; + mLoginScreen = NULL; + mSystemTrayIcon = NULL; + + createSystemTrayIcon(); + + connect(ui->widgetUserInfoApp, SIGNAL(customContextMenuRequested(const QPoint &)), + this, SLOT(doCustomContextMenuRequestedInterManager(const QPoint &))); + connect(ui->pushButtonContact, SIGNAL(clicked()), this, SLOT(doPushButtonContact())); + connect(ui->pushButtonGroup, SIGNAL(clicked()), this, SLOT(doPushButtonGroup())); + connect(ui->pushButtonZone, SIGNAL(clicked()), this, SLOT(doPushButtonZone())); + connect(ui->pushButtonBlog, SIGNAL(clicked()), this, SLOT(doPushButtonBlog())); + connect(ui->pushButtonLast, SIGNAL(clicked()), this, SLOT(doPushButtonLast())); + connect(ui->lineEditSignature, SIGNAL(editingFinished()), this, SLOT(doEditingFinishedSign())); +} + +WorkStation::~WorkStation() +{ + if (mWeatherInfo) + delete mWeatherInfo; + mWeatherInfo = NULL; + + if (mSystemTrayIcon) + delete mSystemTrayIcon; + mSystemTrayIcon = NULL; + + if (mLoginScreen) + delete mLoginScreen; + mLoginScreen = NULL; + + if (mInterfaceManager) + delete mInterfaceManager; + mInterfaceManager = NULL; + + if (mApplicationManager) + delete mApplicationManager; + mApplicationManager = NULL; + + delete ui; +} + +bool WorkStation::eventFilter(QObject *object, QEvent *event) +{ + if (object == ui->labelWeather) + { + if (event->type() == QEvent::Enter) + { + if (mWeatherInfo == NULL) + createWeather(); + QPoint pos = this->pos(); + if (pos.x() > mWeatherInfo->width()) + mWeatherInfo->move(pos.x() - mWeatherInfo->width(), pos.y()); + else + mWeatherInfo->move(pos.x() + this->width(), pos.y()); + mWeatherInfo->show(); + } + else if (event->type() == QEvent::Leave) + { + if (mWeatherInfo) + mWeatherInfo->hideWeatherWidget(); + } + } + else if (object == ui->labelSignature) + { + if (event->type() == QEvent::MouseButtonPress) + { + doToolButtonSignature(); + } + } + else if (object == ui->toolButtonMainMenu) + { + if (event->type() == QEvent::Enter) + ui->toolButtonMainMenu->setIcon(CImsResource::iconMainMenuEnter()); + else if (event->type() == QEvent::Leave) + ui->toolButtonMainMenu->setIcon(CImsResource::iconMainMenuLeave()); + } + return UiImsBaseDialog::eventFilter(object, event); +} + +void WorkStation::createStyleSheet() +{ + QFile file(":/qss/Resources/theme.css"); + if (file.open(QIODevice::ReadOnly)) + { + qApp->setStyleSheet(file.readAll()); + } + file.close(); +} + +void WorkStation::createUserStateMenu() +{ + QMenu *pStateMenu = ui->toolButtonState->menu(); + if (pStateMenu == NULL) + { + pStateMenu = new QMenu(ui->toolButtonState); + ui->toolButtonState->setMenu(pStateMenu); + } + pStateMenu->clear(); + addStateAction(pStateMenu); + pStateMenu->addAction(tr("系统设置...")); + pStateMenu->addAction(tr("我的资料...")); + pStateMenu->addAction(tr("我的QQ中心")); + ui->toolButtonState->setIcon(CImsResource::stateIconByCode(mUserState)); +} + +void WorkStation::createSystemTrayIcon() +{ + QMenu *trayIconMenu = new QMenu(this); + if (mLoginScreen && mLoginScreen->isLogin()) + addStateAction(trayIconMenu); + trayIconMenu->addAction(tr("打开主界面"), this, SLOT(doActionShowLogin())); + trayIconMenu->addSeparator(); + trayIconMenu->addAction(tr("退出"), qApp, SLOT(quit())); + + if (mSystemTrayIcon == NULL) + { + mSystemTrayIcon = new QSystemTrayIcon(this); + connect(mSystemTrayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), + this, SLOT(doTrayIconActivated(QSystemTrayIcon::ActivationReason))); + } + mSystemTrayIcon->setContextMenu(trayIconMenu); + changeSystemTrayIcon(); + mSystemTrayIcon->setVisible(true); +} + +int WorkStation::createLoginScreen() +{ + hide(); + if (mLoginScreen == NULL) + mLoginScreen = new UiLoginScreen; + return mLoginScreen->exec(); +} + +void WorkStation::createShowScreen() +{ + mUserState = (Ims::ImsState)mLoginScreen->loginState(); + createUserStateMenu(); + createSystemTrayIcon(); + createWeather(); + doActionShowLogin(); +} + +void WorkStation::createInterFaceManager() +{ + if (mInterfaceManager) + return; + + mInterfaceManager = new UiInterfaceManager(this); + connect(mInterfaceManager, SIGNAL(interToolMove(int, bool)), + this, SLOT(doInterToolMove(int, bool))); + connect(mInterfaceManager, SIGNAL(interToolVisibleChanged(int, bool)), + this, SLOT(doInterToolVisibleChanged(int, bool))); + connect(mInterfaceManager, SIGNAL(mainTabVisibleChanged(int, bool)), + this, SLOT(doMainTabVisibleChanged(int, bool))); +} + +void WorkStation::createWeather() +{ + if (mWeatherInfo == NULL) + mWeatherInfo = new UiWeatherInfo(this); + mWeatherInfo->createWeatherInfo(); + mWeatherInfo->hide(); +} + +void WorkStation::changeUserStateIcon() +{ + ui->toolButtonState->setIcon(CImsResource::stateIconByCode(mUserState)); +} + +void WorkStation::changeSystemTrayIcon() +{ + QIcon icon = CImsResource::trayIconByCode(mUserState); + icon.actualSize(QSize(32, 32)); + mSystemTrayIcon->setIcon(icon); +} + +void WorkStation::addStateAction(QMenu *menu) +{ + if (menu == NULL) + return; + QAction *action = NULL; + QStringList list; + list << tr("在线") << tr("Q我吧") << tr("离开") << tr("忙碌") + << tr("请勿打扰") << tr("隐身") << tr("离线"); + for (unsigned int i = 1; i <= 7; i++) + { + action = menu->addAction(CImsResource::stateIconByCode((Ims::ImsState)i), + list.at(i - 1), this, SLOT(doActionChangeState())); + action->setData(i); + } + menu->addAction(tr("添加状态信息")); + menu->addSeparator(); + menu->addAction(tr("关闭所有声音")); + menu->addAction(tr("关闭头像闪动(仅本次)")); + menu->addSeparator(); + action = menu->addAction(tr("锁定QQ Ctrl+Alt+L"), this, SLOT(doActionLock())); + menu->addSeparator(); +} + +void WorkStation::doActionShowLogin() +{ + QWidget *widet = this; + if (!mLoginScreen || !mLoginScreen->isLogin()) + widet = mLoginScreen; + widet->showNormal(); + widet->raise(); +} + +void WorkStation::doActionChangeState() +{ + QAction *action = (QAction *)sender(); + uint nState = action->data().toUInt(); + if ((Ims::ImsState)nState == mUserState) + return; + mUserState = (Ims::ImsState)nState; + changeUserStateIcon(); + changeSystemTrayIcon(); +} + +void WorkStation::doTrayIconActivated(QSystemTrayIcon::ActivationReason reason) +{ + QMenu *pSystemTrayIconMenu = mSystemTrayIcon->contextMenu(); + if (pSystemTrayIconMenu) + { + pSystemTrayIconMenu->exec(QCursor::pos()); + pSystemTrayIconMenu->raise(); + } +} + +void WorkStation::doToolButtonSkin() +{ + createInterFaceManager(); + mInterfaceManager->showSkin(); +} + +void WorkStation::doToolButtonClose() +{ + qApp->quit(); +} + +void WorkStation::doActionInfoApp() +{ + createInterFaceManager(); + mInterfaceManager->showInterManager(); +} + +void WorkStation::doToolButtonAppManager() +{ + if (mApplicationManager == NULL) + mApplicationManager = new UiApplicationManager; + mApplicationManager->show(); +} + +void WorkStation::doToolButtonSignature() +{ + QString sSignature = ui->labelSignature->text(); + if (sSignature != SIGNATURE) + ui->lineEditSignature->setText(sSignature); + ui->labelSignature->setVisible(false); + ui->lineEditSignature->setVisible(true); +} + +void WorkStation::doEditingFinishedSign() +{ + QString sSignature = ui->lineEditSignature->text(); + if (sSignature.isEmpty()) + sSignature = SIGNATURE; + ui->labelSignature->setText(sSignature); + ui->labelSignature->setVisible(true); + ui->lineEditSignature->setVisible(false); +} + +void WorkStation::doCustomContextMenuRequestedInterManager(const QPoint & pos) +{ + QMenu menu; + menu.addAction(QIcon(CImsResource::iconInterManager()), tr("打开界面管理器"), this, SLOT(doActionInfoApp())); + menu.exec(QCursor::pos()); +} + +void WorkStation::setCurrentWeather(QPixmap &pix) +{ + ui->labelWeather->setPixmap(pix); +} + +void WorkStation::doActionLock() +{ + +} + +void WorkStation::doPushButtonContact() +{ + ui->tabWidgetMain->setCurrentWidget(ui->tabContact); + + ui->pushButtonLast->setMenu(NULL); + ui->pushButtonGroup->setMenu(NULL); + ui->pushButtonContact->setMenu(new QMenu(ui->pushButtonContact)); + QMenu *pMenu = ui->pushButtonContact->menu(); + + QAction *pAction = NULL; + QActionGroup *pActionGroup = NULL; + QMenu *pChildMenu = pMenu->addMenu(QIcon(CImsResource::menuContactHeadIcon()), tr("头像显示")); + pActionGroup = new QActionGroup(NULL); + pAction = pChildMenu->addAction(tr("大头像")); + pActionGroup->addAction(pAction); + pAction->setCheckable(true); + pAction->setChecked(true); + pChildMenu->addAction(tr("小头像")); + pActionGroup->addAction(pAction); + pAction->setCheckable(true); + pChildMenu->addSeparator(); + pChildMenu->addAction(tr("选中时显示大头像"))->setEnabled(false); + pChildMenu->addSeparator(); + pChildMenu->addAction(tr("显示我的头像"))->setCheckable(true); + + pChildMenu = pMenu->addMenu(tr("名称显示")); + pActionGroup = new QActionGroup(NULL); + pAction = pChildMenu->addAction(tr("显示备注和昵称")); + pActionGroup->addAction(pAction); + pAction->setCheckable(true); + pAction->setChecked(true); + pAction = pChildMenu->addAction(tr("显示备注")); + pActionGroup->addAction(pAction); + pAction->setCheckable(true); + pAction = pChildMenu->addAction(tr("显示昵称")); + pActionGroup->addAction(pAction); + pAction->setCheckable(true); + + pChildMenu = pMenu->addMenu(tr("列表显示")); + pActionGroup = new QActionGroup(NULL); + pAction = pChildMenu->addAction(tr("单列显示")); + pActionGroup->addAction(pAction); + pAction->setCheckable(true); + pAction->setChecked(true); + pAction = pChildMenu->addAction(tr("多列平铺")); + pActionGroup->addAction(pAction); + pAction->setCheckable(true); + pChildMenu->addSeparator(); + pChildMenu->addAction(tr("显示清爽资料"))->setEnabled(true); + pChildMenu->addSeparator(); + pChildMenu->addAction(tr("动画效果"))->setCheckable(true); + + pMenu->addSeparator(); + pChildMenu = pMenu->addMenu(tr("排序显示")); + pActionGroup = new QActionGroup(NULL); + pAction = pChildMenu->addAction(tr("按身份标识排序")); + pActionGroup->addAction(pAction); + pAction->setCheckable(true); + pAction->setChecked(true); + pAction = pChildMenu->addAction(tr("按服务更新排序")); + pActionGroup->addAction(pAction); + pAction->setCheckable(true); + pChildMenu->addAction(tr("按名称排序")); + pAction = pActionGroup->addAction(pAction); + pAction->setCheckable(true); + + pMenu->addAction(tr("刷新好友列表")); + pMenu->addSeparator(); + pMenu->addAction(tr("显示在线联系人")); + pMenu->addSeparator(); + pMenu->addAction(tr("显示企业分组")); + pMenu->addAction(tr("显示陌生人分组"))->setCheckable(true); + pMenu->addAction(tr("显示黑名单"))->setCheckable(true); +} + +void WorkStation::doPushButtonGroup() +{ + ui->tabWidgetMain->setCurrentWidget(ui->tabGroup); + + ui->pushButtonLast->setMenu(NULL); + ui->pushButtonContact->setMenu(NULL); + ui->pushButtonGroup->setMenu(new QMenu(ui->pushButtonGroup)); + QMenu *pMenu = ui->pushButtonGroup->menu(); + + QAction *pAction = NULL; + QActionGroup *pActionGroup = NULL; + QMenu *pChildMenu = pMenu->addMenu(QIcon(CImsResource::menuContactHeadIcon()), tr("图标")); + pActionGroup = new QActionGroup(NULL); + pAction = pChildMenu->addAction(tr("大图标")); + pActionGroup->addAction(pAction); + pAction->setCheckable(true); + pAction->setChecked(true); + pAction = pChildMenu->addAction(tr("小图标")); + pActionGroup->addAction(pAction); + pAction->setCheckable(true); + pChildMenu->addSeparator(); + pChildMenu->addAction(tr("选中时显示大图标"))->setEnabled(true); + + pChildMenu = pMenu->addMenu(tr("列表显示")); + pActionGroup = new QActionGroup(NULL); + pAction = pChildMenu->addAction(tr("单列显示")); + pActionGroup->addAction(pAction); + pAction->setCheckable(true); + pAction->setChecked(true); + pChildMenu->addAction(tr("多列平铺")); + pActionGroup->addAction(pAction); + pAction->setCheckable(true); + + pMenu->addSeparator(); + pMenu->addAction(QIcon(CImsResource::menuGroupIcon()), tr("访问我的群主页")); + pChildMenu = pMenu->addMenu(tr("所有群消息设置")); + pChildMenu->addAction(tr("接收并提示信息")); + pChildMenu->addAction(tr("不提示消息只显示数目")); + pChildMenu = pChildMenu->addMenu(tr("屏蔽群消息提示")); + pChildMenu->addAction(tr("15分钟提示一次")); + pChildMenu->addAction(tr("30分钟提示一次")); + pChildMenu->addAction(tr("1小时提示一次")); + pChildMenu->addAction(tr("4小时提示一次")); + pChildMenu->addSeparator(); + pChildMenu->addAction("始终不提示"); + + pMenu->addSeparator(); + pMenu->addAction(tr("查找添加群")); + pMenu->addAction(tr("创建一个群")); + pMenu->addSeparator(); + pMenu->addAction(tr("添加群分组")); +} + +void WorkStation::doPushButtonZone() +{ + ui->tabWidgetMain->setCurrentWidget(ui->tabZone); + + ui->pushButtonLast->setMenu(NULL); + ui->pushButtonGroup->setMenu(NULL); + ui->pushButtonContact->setMenu(NULL); +} + +void WorkStation::doPushButtonBlog() +{ + ui->tabWidgetMain->setCurrentWidget(ui->tabBlog); + + ui->pushButtonLast->setMenu(NULL); + ui->pushButtonGroup->setMenu(NULL); + ui->pushButtonContact->setMenu(NULL); +} + +void WorkStation::doPushButtonLast() +{ + ui->tabWidgetMain->setCurrentWidget(ui->tabLast); + + ui->pushButtonGroup->setMenu(NULL); + ui->pushButtonContact->setMenu(NULL); + ui->pushButtonLast->setMenu(new QMenu(ui->pushButtonLast)); + QMenu *pMenu = ui->pushButtonLast->menu(); + pMenu->addAction("清空会话列表"); +} + +void WorkStation::doInterToolMove(int index, bool up) +{ + QToolButton *pToolButton = userInfoAppToolButton(index); + QHBoxLayout *layout = (QHBoxLayout *)ui->widgetUserInfoApp->layout(); + if (layout == NULL || pToolButton == NULL) + return; + int nCount = layout->count(); + index = layout->indexOf(pToolButton); + if (index == -1) + return; + layout->removeWidget(pToolButton); + if (up && index > 0) + layout->insertWidget(index - 1, pToolButton); + else if (!up && index < nCount - 1) + layout->insertWidget(index + 1, pToolButton); +} + +void WorkStation::doInterToolVisibleChanged(int index, bool visible) +{ + QToolButton *pToolButton = userInfoAppToolButton(index); + if (pToolButton) + pToolButton->setVisible(visible); +} + +void WorkStation::doMainTabVisibleChanged(int index, bool visible) +{ + switch (index) + { + case MainTabContact:// = 1,//好友 + case MainTabGroup:// = 2,//群/讨论组 + case MainTabLast:// = 3,//历史会话记录 + break; + case MainTabBlog:// = 4,//微博 + ui->pushButtonBlog->setVisible(visible); + if (ui->tabWidgetMain->currentWidget() == ui->tabBlog) + doPushButtonContact(); + break; + case MainTabZone:// = 5,//空间-特别关心 + ui->pushButtonZone->setVisible(visible); + if (ui->tabWidgetMain->currentWidget() == ui->tabZone) + doPushButtonContact(); + break; + case MainTabWeather:// = 6,//天气 + ui->labelWeather->setVisible(visible); + break; + } +} + +QToolButton * WorkStation::userInfoAppToolButton(int index) +{ + switch (index) + { + case InterToolZone:// = 1,//空间 + return ui->toolButtonZone; + case InterToolBlog:// = 2,//微博 + return ui->toolButtonBlog; + case InterToolMail:// = 3,//邮箱 + return ui->toolButtonMail; + case InterToolFrined:// = 4,//朋友网 + return ui->toolButtonFriend; + case InterToolShopping:// = 5,//我的购物 + return ui->toolButtonShopping; + case InterToolWallet:// = 6,//我的钱包 + return ui->toolButtonWallet; + case InterToolSoso:// = 7,//搜搜问问个人中心 + return ui->toolButtonSoso; + case InterToolNews:// = 8,//我的资讯 + return ui->toolButtonNews; + case InterToolQQVip:// = 9,//QQ会员信息中心 + return ui->toolButtonQQVip; + case InterToolArel:// = 10,//界面管理器 + return ui->toolButtonManager; + } + return NULL; +} diff --git a/imsclient/imsclient/workstation.h b/imsclient/imsclient/workstation.h new file mode 100644 index 00000000..e4c20f18 --- /dev/null +++ b/imsclient/imsclient/workstation.h @@ -0,0 +1,79 @@ +#ifndef WORKSTATION_H +#define WORKSTATION_H + +#include +#include + +#include "uiloginscreen.h" +#include "imsdefine.h" + +namespace Ui { class WorkStation; }; + +class QMenu; +class QToolButton; +class UiWeatherInfo; +class UiInterfaceManager; +class UiApplicationManager; + +class WorkStation : public UiImsBaseDialog +{ + Q_OBJECT + +public: + WorkStation(QWidget *parent = 0); + ~WorkStation(); + + static WorkStation *workStation() { return mWorkStation; } + int createLoginScreen(); + void createShowScreen(); + void setCurrentWeather(QPixmap &pix); + +protected: + virtual bool eventFilter(QObject *object, QEvent *event); + +protected: + void createStyleSheet(); + void createUserStateMenu(); + void createSystemTrayIcon(); + void createInterFaceManager(); + void createWeather(); + void changeUserStateIcon(); + void changeSystemTrayIcon(); + void addStateAction(QMenu *menu); + QToolButton *userInfoAppToolButton(int index); + +protected slots: + void doTrayIconActivated(QSystemTrayIcon::ActivationReason reason); + void doActionChangeState(); + void doActionShowLogin(); + void doActionLock(); + void doActionInfoApp(); + void doToolButtonSkin(); + void doToolButtonClose(); + void doPushButtonContact(); + void doPushButtonGroup(); + void doPushButtonZone(); + void doPushButtonBlog(); + void doPushButtonLast(); + void doToolButtonAppManager(); + void doToolButtonSignature(); + void doEditingFinishedSign(); + void doInterToolMove(int index, bool up); + void doInterToolVisibleChanged(int index, bool visible); + void doMainTabVisibleChanged(int index, bool visible); + void doCustomContextMenuRequestedInterManager(const QPoint & pos); + +protected: + static WorkStation *mWorkStation; + +private: + Ui::WorkStation *ui; + Ims::ImsState mUserState; + UiWeatherInfo *mWeatherInfo; + UiLoginScreen *mLoginScreen; + QSystemTrayIcon *mSystemTrayIcon; + UiInterfaceManager *mInterfaceManager; + UiApplicationManager *mApplicationManager; +}; + +#endif // WORKSTATION_H diff --git a/imsclient/imsclient/workstation.qrc b/imsclient/imsclient/workstation.qrc new file mode 100644 index 00000000..ca07a09b --- /dev/null +++ b/imsclient/imsclient/workstation.qrc @@ -0,0 +1,429 @@ + + + Resources/theme/appmanager/more_app_btn_normal.png + Resources/theme/appmanager/app_bkg_hover.png + Resources/theme/appmanager/app_bkg_normal.png + Resources/theme/appmanager/app_bkg_push.png + Resources/theme/appmanager/app_manager_icon.png + Resources/theme/appmanager/appbox_mgr_btn.png + Resources/theme/appmanager/fav_app_empty.png + Resources/theme/appmanager/more_app_btn_down.png + Resources/theme/appmanager/more_app_btn_hover.png + Resources/theme/ChatFrame/Wireless.png + Resources/theme/ChatFrame/aio_quickbar_cut.png + Resources/theme/ChatFrame/aio_quickbar_face.png + Resources/theme/ChatFrame/aio_quickbar_flirtationface.png + Resources/theme/ChatFrame/aio_quickbar_font.png + Resources/theme/ChatFrame/aio_quickbar_inputassist.png + Resources/theme/ChatFrame/aio_quickbar_inputassist_dropdown.png + Resources/theme/ChatFrame/aio_quickbar_more.png + Resources/theme/ChatFrame/aio_quickbar_register.png + Resources/theme/ChatFrame/aio_quickbar_richface.png + Resources/theme/ChatFrame/aio_quickbar_screen1.png + Resources/theme/ChatFrame/aio_quickbar_screen2.png + Resources/theme/ChatFrame/aio_quickbar_sendpic.png + Resources/theme/ChatFrame/aio_quickbar_sysfont_tab_button.png + Resources/theme/ChatFrame/aio_quickbar_twitter.png + Resources/theme/ChatFrame/aio_toobar_add.png + Resources/theme/ChatFrame/aio_toobar_addhuman.png + Resources/theme/ChatFrame/aio_toobar_app.png + Resources/theme/ChatFrame/aio_toobar_block.png + Resources/theme/ChatFrame/aio_toobar_game.png + Resources/theme/ChatFrame/AM_MenuICON.png + Resources/theme/ChatFrame/AppMenuExt_DeleteFriend.png + Resources/theme/ChatFrame/AppMenuExt_ImPeachUin.png + Resources/theme/ChatFrame/AppMenuExt_MoveToBlackList.png + Resources/theme/ChatFrame/Bold.png + Resources/theme/ChatFrame/btnleft_down.png + Resources/theme/ChatFrame/btnleft_focus_down.png + Resources/theme/ChatFrame/btnleft_focus_highlight.png + Resources/theme/ChatFrame/btnleft_focus_normal.png + Resources/theme/ChatFrame/btnleft_highlight.png + Resources/theme/ChatFrame/btnleft_normal.png + Resources/theme/ChatFrame/btnright_down.png + Resources/theme/ChatFrame/btnright_focus_down.png + Resources/theme/ChatFrame/btnright_focus_highlight.png + Resources/theme/ChatFrame/btnright_focus_normal.png + Resources/theme/ChatFrame/btnright_highlight.png + Resources/theme/ChatFrame/btnright_normal.png + Resources/theme/ChatFrame/color.png + Resources/theme/ChatFrame/ContactMgr.png + Resources/theme/ChatFrame/deta.png + Resources/theme/ChatFrame/GroupDyncIcon.png + Resources/theme/ChatFrame/Import.png + Resources/theme/ChatFrame/Italic.png + Resources/theme/ChatFrame/mainmenu_allservices.png + Resources/theme/ChatFrame/mainmenu_imqqcom.png + Resources/theme/ChatFrame/mainmenu_NewsOrder.png + Resources/theme/ChatFrame/MainPanelVasIcon.png + Resources/theme/ChatFrame/menu_changepswd.png + Resources/theme/ChatFrame/menu_exit.png + Resources/theme/ChatFrame/menu_filemanager.png + Resources/theme/ChatFrame/menu_switch.png + Resources/theme/ChatFrame/MiniService.png + Resources/theme/ChatFrame/msg_upload.png + Resources/theme/ChatFrame/msgmgr.png + Resources/theme/ChatFrame/note0.png + Resources/theme/ChatFrame/note1.png + Resources/theme/ChatFrame/OnlineUpdate.png + Resources/theme/ChatFrame/QA.png + Resources/theme/ChatFrame/QQ_TempSession.png + Resources/theme/ChatFrame/QQZone.png + Resources/theme/ChatFrame/recover.png + Resources/theme/ChatFrame/safe.png + Resources/theme/ChatFrame/save_16.png + Resources/theme/ChatFrame/SoSo.png + Resources/theme/ChatFrame/TencentNet.png + Resources/theme/ChatFrame/Tools.png + Resources/theme/ChatFrame/underline.png + Resources/theme/ChatFrame/WhatsNew.png + Resources/theme/interface/AreaIcon.png + Resources/theme/interface/AreaMainIcon.png + Resources/theme/interface/AreaMainIcon_2.png + Resources/theme/interface/AreaPresentMgr_RBMenu.png + Resources/theme/interface/autograph.png + Resources/theme/interface/downbtn.png + Resources/theme/interface/fengmian_1.png + Resources/theme/interface/friendicon.png + Resources/theme/interface/head_bkg__normal.png + Resources/theme/interface/head_bkg_highlight.png + Resources/theme/interface/icon_contacts_selected_Blue.png + Resources/theme/interface/icon_group_selected_Blue.png + Resources/theme/interface/icon_last_selected_Blue.png + Resources/theme/interface/jingdian_2.png + Resources/theme/interface/leftdown.png + Resources/theme/interface/leftmouseover.png + Resources/theme/interface/leftnormal.png + Resources/theme/interface/MaterialAlphaSet.png + Resources/theme/interface/Messagebox18_highlight.png + Resources/theme/interface/middledown.png + Resources/theme/interface/middlemouseover.png + Resources/theme/interface/middlenormal.png + Resources/theme/interface/more.PNG + Resources/theme/interface/plus.png + Resources/theme/interface/qqshowicon.png + Resources/theme/interface/qzoneicon.png + Resources/theme/interface/rightdown.png + Resources/theme/interface/rightmouseover.png + Resources/theme/interface/rightnormal.png + Resources/theme/interface/upbtn.png + Resources/theme/interface/vip_16.png + Resources/theme/interface/wblogicon.png + Resources/theme/interface/icon_blog_selected_Blue.png + Resources/theme/interface/icon_weather_selected_Blue.png + Resources/theme/interface/icon_zone_selected_Blue.png + Resources/theme/interface/news.png + Resources/theme/interface/shopping.png + Resources/theme/interface/soso.png + Resources/theme/interface/wallet.png + Resources/theme/interface/mail.png + Resources/theme/interface/blog.png + Resources/theme/interface/ClassicThemeBkg.jpg + Resources/theme/interface/CoverThemeBkg.jpg + Resources/theme/interface/default.jpg + Resources/theme/interface/WeatherThemeBkg.jpg + Resources/theme/interface/White.jpg + Resources/theme/interface/weather-back.png + Resources/theme/login/zhuce_press.png + Resources/theme/login/button_login_down.png + Resources/theme/login/button_login_hover.png + Resources/theme/login/button_login_normal.png + Resources/theme/login/checkbox_hover.png + Resources/theme/login/checkbox_normal.png + Resources/theme/login/checkbox_press.png + Resources/theme/login/checkbox_selected_hover.png + Resources/theme/login/checkbox_selected_normal.png + Resources/theme/login/checkbox_selected_press.png + Resources/theme/login/corner_back.png + Resources/theme/login/corner_back_hover.png + Resources/theme/login/corner_back_press.png + Resources/theme/login/corner_left.png + Resources/theme/login/corner_left_hover.png + Resources/theme/login/corner_left_press.png + Resources/theme/login/corner_right_hover.png + Resources/theme/login/corner_right_normal_down.png + Resources/theme/login/inputbox.png + Resources/theme/login/inputbox_hover.png + Resources/theme/login/keyboard.png + Resources/theme/login/loading.gif + Resources/theme/login/login_head_bkg.png + Resources/theme/login/mima.png + Resources/theme/login/mima_hover.png + Resources/theme/login/mima_press.png + Resources/theme/login/noon.jpg + Resources/theme/login/zhuce.png + Resources/theme/login/zhuce_hover.png + Resources/theme/login/afternoon.jpg + Resources/theme/login/morning.jpg + Resources/theme/login/night.jpg + Resources/theme/lockPanel/unlock20.png + Resources/theme/lockPanel/16.ico + Resources/theme/lockPanel/16_gray.ico + Resources/theme/lockPanel/20.png + Resources/theme/lockPanel/lock20.png + Resources/theme/lockPanel/lock.png + Resources/theme/lockPanel/lockBg_Highlight.png + Resources/theme/lockPanel/lockBg_Pushed.png + Resources/theme/maintabbar/0.png + Resources/theme/maintabbar/15.png + Resources/theme/maintabbar/30.png + Resources/theme/maintabbar/45.png + Resources/theme/maintabbar/60.png + Resources/theme/maintabbar/75.png + Resources/theme/maintabbar/90.png + Resources/theme/maintabbar/main_tabbtn_highlight.png + Resources/theme/maintabbar/icon_blog_normal.png + Resources/theme/maintabbar/icon_blog_selected.png + Resources/theme/maintabbar/icon_contacts_normal.png + Resources/theme/maintabbar/icon_contacts_selected.png + Resources/theme/maintabbar/icon_group_normal.png + Resources/theme/maintabbar/icon_group_selected.png + Resources/theme/maintabbar/icon_last_normal.png + Resources/theme/maintabbar/icon_last_selected.png + Resources/theme/maintabbar/icon_zone_normal.png + Resources/theme/maintabbar/icon_zone_selected.png + Resources/theme/maintabbar/main_tabbtn_down.png + Resources/theme/maintool/allbtn_highlight.png + Resources/theme/maintabbar/main_tab_check.png + Resources/theme/maintabbar/icon_search_normal.png + Resources/theme/maintabbar/main_tab_highlight.png + Resources/theme/maintool/allbtn_down.png.png + Resources/theme/maintool/filemanager.png + Resources/theme/maintool/find.png + Resources/theme/maintool/FriendCircleMainToolAreaEntry.png + Resources/theme/maintool/menu_btn_highlight.png + Resources/theme/maintool/menu_btn_normal.png + Resources/theme/maintool/message.png + Resources/theme/maintool/QPlusEntranceBtn.png + Resources/theme/maintool/TitleIcon.png + Resources/theme/maintool/Tools.png + Resources/theme/menu/adduser.png + Resources/theme/menu/aio_toobar_Report.png + Resources/theme/menu/bell_16.png + Resources/theme/menu/bellwithscore_16.png + Resources/theme/menu/ContactInfoTabNetGame2.png + Resources/theme/menu/ContactInfoTabNetGame.png + Resources/theme/menu/contactmgr.png + Resources/theme/menu/ContactTipsVASFlagExt_Mail.png + Resources/theme/menu/ContactTipsVASFlagExt_QQFlyIsland.png + Resources/theme/menu/ContactTipsVASFlagExt_QQFO.png + Resources/theme/menu/ContactTipsVASFlagExt_QQSG.png + Resources/theme/menu/ContactTipsVASFlagExt_QQTang.png + Resources/theme/menu/ContactTipsVASFlagExt_QQTangVip.png + Resources/theme/menu/crm.png + Resources/theme/menu/cutline.png + Resources/theme/menu/delfolder.png + Resources/theme/menu/deluser.png + Resources/theme/menu/groupmainpage.png + Resources/theme/menu/level0.bmp + Resources/theme/menu/level1.bmp + Resources/theme/menu/level2.bmp + Resources/theme/menu/level3.bmp + Resources/theme/menu/level4.bmp + Resources/theme/menu/level5.bmp + Resources/theme/menu/main_gamebtn20_game.png + Resources/theme/menu/main_musicbtn20_music.png + Resources/theme/menu/MainPanelServiceBarExt_XiaoYou.png + Resources/theme/menu/MainPanelServiceBarExt_XiaoYou_2.png + Resources/theme/menu/menu_arrow.png + Resources/theme/menu/menu_bkg.png + Resources/theme/menu/menu_bkg_board.png + Resources/theme/menu/menu_cutling.png + Resources/theme/menu/menu_highlight.png + Resources/theme/menu/modehead.png + Resources/theme/menu/moveuser.png + Resources/theme/menu/msgmgr.png + Resources/theme/menu/name.png + Resources/theme/menu/nopic.png + Resources/theme/menu/QQCenter.png + Resources/theme/menu/QQMusicVip.png + Resources/theme/menu/rf.png + Resources/theme/menu/search_16_with_shadow.png + Resources/theme/menu/search_20.png + Resources/theme/menu/sendmsg.png + Resources/theme/menu/tenpay20.png + Resources/theme/menu/tipicon_paddingDraw.png + Resources/theme/menu/VASFlagExt_HuaXia2_0.png + Resources/theme/menu/video.png + Resources/theme/screenshot/FilterBar/sweet_hightlight.jpg + Resources/theme/screenshot/FilterBar/ageing.jpg + Resources/theme/screenshot/FilterBar/ageing_hightlight.jpg + Resources/theme/screenshot/FilterBar/classiclomo.jpg + Resources/theme/screenshot/FilterBar/classiclomo_hightlight.jpg + Resources/theme/screenshot/FilterBar/copperplate.jpg + Resources/theme/screenshot/FilterBar/copperplate_hightlight.jpg + Resources/theme/screenshot/FilterBar/graying.jpg + Resources/theme/screenshot/FilterBar/graying_hightlight.jpg + Resources/theme/screenshot/FilterBar/lomo.jpg + Resources/theme/screenshot/FilterBar/lomo_hightlight.jpg + Resources/theme/screenshot/FilterBar/nightfall.jpg + Resources/theme/screenshot/FilterBar/nightfall_hightlight.jpg + Resources/theme/screenshot/FilterBar/original.jpg + Resources/theme/screenshot/FilterBar/original_hightlight.jpg + Resources/theme/screenshot/FilterBar/polaroid.jpg + Resources/theme/screenshot/FilterBar/polaroid_hightlight.jpg + Resources/theme/screenshot/FilterBar/rainbow.jpg + Resources/theme/screenshot/FilterBar/rainbow_hightlight.jpg + Resources/theme/screenshot/FilterBar/sketch.jpg + Resources/theme/screenshot/FilterBar/sketch_hightlight.jpg + Resources/theme/screenshot/FilterBar/sunshine.jpg + Resources/theme/screenshot/FilterBar/sunshine_hightlight.jpg + Resources/theme/screenshot/FilterBar/sweet.jpg + Resources/theme/screenshot/Undo.png + Resources/theme/screenshot/Arrow.png + Resources/theme/screenshot/Brush.PNG + Resources/theme/screenshot/CameraToolbar_BtnDown.png + Resources/theme/screenshot/CameraToolbar_BtnHover.png + Resources/theme/screenshot/CameraToolbar_BtnNormal.png + Resources/theme/screenshot/Circle.png + Resources/theme/screenshot/Exit.png + Resources/theme/screenshot/Filter.png + Resources/theme/screenshot/Finish.png + Resources/theme/screenshot/LargeMagnifier.png + Resources/theme/screenshot/Magnifier.png + Resources/theme/screenshot/Rectangle.png + Resources/theme/screenshot/Save.png + Resources/theme/screenshot/SinglePoint.PNG + Resources/theme/screenshot/Text.png + Resources/theme/state/WebQQQme.png + Resources/theme/state/away.png + Resources/theme/state/busy.png + Resources/theme/state/imoffline.png + Resources/theme/state/imonline.png + Resources/theme/state/ImQQAway.png + Resources/theme/state/ImQQBusy.png + Resources/theme/state/ImQQMute.png + Resources/theme/state/ImQQOnline.png + Resources/theme/state/ImQQQme.png + Resources/theme/state/invisible.png + Resources/theme/state/IPhoneQQ_Head_Big.png + Resources/theme/state/MobilePhoneQQAway.png + Resources/theme/state/MobilePhoneQQBusy.png + Resources/theme/state/MobilePhoneQQOn.png + Resources/theme/state/MobileWapQQAway.png + Resources/theme/state/MobileWapQQOn.png + Resources/theme/state/mute.png + Resources/theme/state/Qme.png + Resources/theme/state/QQForPad_Head_Big.png + Resources/theme/state/WebQQAway.png + Resources/theme/state/WebQQBusy.png + Resources/theme/state/WebQQMute.png + Resources/theme/state/WebQQOnline.png + Resources/theme/systembutton/btn_restore_normal.png + Resources/theme/systembutton/AIO_SetBtn_down.png + Resources/theme/systembutton/AIO_SetBtn_highlight.png + Resources/theme/systembutton/AIO_SetBtn_highlight_normal.png + Resources/theme/systembutton/AIO_SetBtn_normal.png + Resources/theme/systembutton/btn_close_down.png + Resources/theme/systembutton/btn_close_highlight.png + Resources/theme/systembutton/btn_close_normal.png + Resources/theme/systembutton/btn_max_down.png + Resources/theme/systembutton/btn_max_highlight.png + Resources/theme/systembutton/btn_max_normal.png + Resources/theme/systembutton/btn_mini_down.png + Resources/theme/systembutton/btn_mini_highlight.png + Resources/theme/systembutton/btn_mini_normal.png + Resources/theme/systembutton/btn_restore_down.png + Resources/theme/systembutton/btn_restore_highlight.png + Resources/theme/systembutton/btn_Skin_down.png + Resources/theme/systembutton/btn_Skin_highlight.png + Resources/theme/systembutton/btn_Skin_normal.png + Resources/theme/systembutton/btn_set_hover.png + Resources/theme/systembutton/btn_set_normal.png + Resources/theme/systembutton/btn_set_press.png + Resources/theme/vip_setup.png + Resources/theme/CustomerCenter.PNG + Resources/theme/find_old.png + Resources/theme/Folder.png + Resources/theme/LevelValue.png + Resources/theme/LV.png + Resources/theme/menu_help.png + Resources/theme/ProductBlog.PNG + Resources/theme/qq.ico + Resources/theme/QQVIP_GRAY.png + Resources/theme/QQVIP_LIGHT.png + Resources/theme/QuestionAndAdvance.PNG + Resources/theme/SmallVideoDefault.png + Resources/theme/tray/Qme.ico + Resources/theme/tray/away.ico + Resources/theme/tray/busy.ico + Resources/theme/tray/imonline.ico + Resources/theme/tray/invisible.ico + Resources/theme/tray/mute.ico + Resources/theme/tray/offline.ico + Resources/theme/head.png + Resources/theme/group.png + Resources/theme/maintool/arrow_down.png + Resources/theme/maintool/allbtn_left_down.png + Resources/theme/maintool/allbtn_left_highlight.png + Resources/theme/maintool/allbtn_right_highlight.png + Resources/theme/maintool/allbtn_right_down.png + Resources/theme/maintabbar/add.png + Resources/theme/maintabbar/home.png + Resources/theme/maintabbar/tabbtn_bgk_pushed_hover.png + Resources/theme/maintabbar/tabbtn_bgk_pushed.png + + + Resources/theme.css + Resources/cityid.xml + + + Resources/weather/adver.png + Resources/weather/big_chance_of_rain.png + Resources/weather/big_chance_of_snow.png + Resources/weather/big_chance_of_storm.png + Resources/weather/big_chance_of_tstorm.png + Resources/weather/big_cloudy.png + Resources/weather/big_cn_cloudy.png + Resources/weather/big_cn_fog.png + Resources/weather/big_cn_heavyrain.png + Resources/weather/big_cn_heavysnow.png + Resources/weather/big_cn_lightrain.png + Resources/weather/big_cn_overcast.png + Resources/weather/big_cn_showers.png + Resources/weather/big_dust.png + Resources/weather/big_flurries.png + Resources/weather/big_fog.png + Resources/weather/big_haze.png + Resources/weather/big_icy.png + Resources/weather/big_mist.png + Resources/weather/big_mostly_cloudy.png + Resources/weather/big_mostly_sunny.png + Resources/weather/big_partly_cloudy.png + Resources/weather/big_rain.png + Resources/weather/big_sleet.png + Resources/weather/big_smoke.png + Resources/weather/big_snow.png + Resources/weather/big_storm.png + Resources/weather/big_sunny.png + Resources/weather/big_thunderstorm.png + Resources/weather/chance_of_rain.png + Resources/weather/chance_of_snow.png + Resources/weather/chance_of_storm.png + Resources/weather/chance_of_tstorm.png + Resources/weather/cloudy.png + Resources/weather/cn_cloudy.png + Resources/weather/cn_fog.png + Resources/weather/cn_heavyrain.png + Resources/weather/cn_heavysnow.png + Resources/weather/cn_lightrain.png + Resources/weather/cn_overcast.png + Resources/weather/cn_showers.png + Resources/weather/dust.png + Resources/weather/flurries.png + Resources/weather/fog.png + Resources/weather/haze.png + Resources/weather/icy.png + Resources/weather/mist.png + Resources/weather/mostly_cloudy.png + Resources/weather/mostly_sunny.png + Resources/weather/partly_cloudy.png + Resources/weather/rain.png + Resources/weather/sleet.png + Resources/weather/smoke.png + Resources/weather/snow.png + Resources/weather/storm.png + Resources/weather/sunny.png + Resources/weather/thunderstorm.png + + diff --git a/imsclient/imsclient/workstation.ui b/imsclient/imsclient/workstation.ui new file mode 100644 index 00000000..c9df4cee --- /dev/null +++ b/imsclient/imsclient/workstation.ui @@ -0,0 +1,1453 @@ + + + WorkStation + + + + 0 + 0 + 280 + 523 + + + + + 550 + 16777215 + + + + WorkStation + + + + + + + 0 + + + 0 + + + + + + 0 + 20 + + + + + 16777215 + 20 + + + + + + + + + 0 + 80 + + + + + 16777215 + 80 + + + + + 9 + + + 0 + + + 9 + + + 9 + + + 0 + + + + + + 65 + 0 + + + + + 65 + 16777215 + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 30 + 20 + + + + + 30 + 20 + + + + + + + + :/WorkStation/Resources/theme/state_imonline.png:/WorkStation/Resources/theme/state_imonline.png + + + QToolButton::InstantPopup + + + true + + + + + + + + 0 + 20 + + + + + 16777215 + 20 + + + + 鏄撴按瀵 + + + + + + + + 0 + 20 + + + + + 16777215 + 20 + + + + + :/WorkStation/Resources/theme/LV.png:/WorkStation/Resources/theme/LV.png + + + + 16 + 8 + + + + true + + + + + + + + 0 + 20 + + + + + 16777215 + 20 + + + + + + + + :/WorkStation/Resources/theme/QQVIP_GRAY.png:/WorkStation/Resources/theme/QQVIP_GRAY.png + + + + 25 + 8 + + + + true + + + + + + + Qt::Horizontal + + + + 138 + 10 + + + + + + + + + + 0 + + + + + + 0 + 20 + + + + + 16777215 + 20 + + + + + + + + + 0 + 20 + + + + + 16777215 + 20 + + + + 缂栬緫涓х鍚 + + + + + + + + + + + + 45 + 45 + + + + + 45 + 45 + + + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + + + true + + + + + + + + + + + + 0 + + + + + + 30 + 20 + + + + + 16777215 + 20 + + + + Qt::CustomContextMenu + + + + 0 + + + 0 + + + + + ... + + + + :/WorkStation/Resources/theme/interface/qzoneicon.png:/WorkStation/Resources/theme/interface/qzoneicon.png + + + + 20 + 20 + + + + true + + + + + + + ... + + + + :/WorkStation/Resources/theme/interface/wblogicon.png:/WorkStation/Resources/theme/interface/wblogicon.png + + + + 20 + 20 + + + + true + + + + + + + ... + + + + :/WorkStation/Resources/theme/interface/mail.png:/WorkStation/Resources/theme/interface/mail.png + + + + 20 + 20 + + + + true + + + + + + + ... + + + + :/WorkStation/Resources/theme/interface/friendicon.png:/WorkStation/Resources/theme/interface/friendicon.png + + + true + + + + + + + ... + + + + :/WorkStation/Resources/theme/interface/shopping.png:/WorkStation/Resources/theme/interface/shopping.png + + + + 20 + 20 + + + + true + + + + + + + ... + + + + :/WorkStation/Resources/theme/interface/wallet.png:/WorkStation/Resources/theme/interface/wallet.png + + + + 20 + 20 + + + + true + + + + + + + ... + + + + :/WorkStation/Resources/theme/interface/soso.png:/WorkStation/Resources/theme/interface/soso.png + + + + 20 + 20 + + + + true + + + + + + + ... + + + + :/WorkStation/Resources/theme/interface/news.png:/WorkStation/Resources/theme/interface/news.png + + + + 20 + 20 + + + + true + + + + + + + ... + + + + :/WorkStation/Resources/theme/interface/vip_16.png:/WorkStation/Resources/theme/interface/vip_16.png + + + + 20 + 20 + + + + true + + + + + + + ... + + + + :/WorkStation/Resources/theme/interface/AreaMainIcon.png:/WorkStation/Resources/theme/interface/AreaMainIcon.png + + + + 20 + 20 + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + 16777215 + 20 + + + + + :/WorkStation/Resources/theme/interface/Messagebox18_highlight.png:/WorkStation/Resources/theme/interface/Messagebox18_highlight.png + + + + 20 + 20 + + + + true + + + + + + + + + + + + + 0 + 30 + + + + + 16777215 + 30 + + + + + 0 + + + 0 + + + + + + 0 + 30 + + + + 鎼滅储锛氳仈绯讳汉銆佽璁虹粍銆佺兢銆佷紒涓 + + + + + + + + + + + 0 + 35 + + + + + 16777215 + 35 + + + + + 0 + + + 0 + + + + + + :/WorkStation/Resources/theme/maintabbar/icon_contacts_normal.png + :/WorkStation/Resources/theme/maintabbar/icon_contacts_selected.png:/WorkStation/Resources/theme/maintabbar/icon_contacts_normal.png + + + true + + + true + + + true + + + buttonGroupMainTabBar + + + + + + + + :/WorkStation/Resources/theme/maintabbar/icon_group_normal.png + :/WorkStation/Resources/theme/maintabbar/icon_group_selected.png:/WorkStation/Resources/theme/maintabbar/icon_group_normal.png + + + true + + + true + + + buttonGroupMainTabBar + + + + + + + + :/WorkStation/Resources/theme/maintabbar/icon_zone_normal.png + :/WorkStation/Resources/theme/maintabbar/icon_zone_selected.png:/WorkStation/Resources/theme/maintabbar/icon_zone_normal.png + + + true + + + true + + + buttonGroupMainTabBar + + + + + + + + :/WorkStation/Resources/theme/maintabbar/icon_blog_normal.png + :/WorkStation/Resources/theme/maintabbar/icon_blog_selected.png:/WorkStation/Resources/theme/maintabbar/icon_blog_normal.png + + + true + + + true + + + buttonGroupMainTabBar + + + + + + + + :/WorkStation/Resources/theme/maintabbar/icon_last_normal.png + :/WorkStation/Resources/theme/maintabbar/icon_last_selected.png:/WorkStation/Resources/theme/maintabbar/icon_last_normal.png + + + true + + + true + + + buttonGroupMainTabBar + + + + + + + + + + + 275 + 300 + + + + + 0 + + + 0 + + + + + 0 + + + true + + + + + + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Sunken + + + 0 + + + QAbstractItemView::NoEditTriggers + + + false + + + false + + + + 1 + + + + + + + + + + + + + 0 + + + 0 + + + + + 0 + + + 6 + + + 6 + + + + + QQ缇 + + + true + + + true + + + true + + + buttonGroupDiscussion + + + + + + + 璁ㄨ缁 + + + true + + + true + + + buttonGroupDiscussion + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 鍒涘缓 + + + + :/WorkStation/Resources/theme/maintabbar/add.png:/WorkStation/Resources/theme/maintabbar/add.png + + + Qt::ToolButtonTextBesideIcon + + + true + + + + + + + + + + + :/WorkStation/Resources/theme/maintabbar/home.png:/WorkStation/Resources/theme/maintabbar/home.png + + + true + + + + + + + + + 0 + + + true + + + + QQ缇 + + + + 0 + + + 0 + + + + + TextLabel + + + + + + + QFrame::NoFrame + + + QAbstractItemView::NoEditTriggers + + + false + + + false + + + + 1 + + + + + + + + + 璁ㄨ缁 + + + + 0 + + + 0 + + + + + TextLabel + + + + + + + QFrame::NoFrame + + + QAbstractItemView::NoEditTriggers + + + false + + + false + + + + 1 + + + + + + + + + + + + + + + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + false + + + true + + + + + + + + + + + + 0 + + + 0 + + + + + TextLabel + + + + + + + + + + + + 0 + + + 0 + + + + + 鏆傛椂娌℃湁浼氳瘽 + + + Qt::AlignCenter + + + + + + + QFrame::NoFrame + + + + + + + + + + + + + + + 0 + 30 + + + + + 16777215 + 30 + + + + + 0 + + + 0 + + + + + 3 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + :/WorkStation/Resources/theme/appmanager/appbox_mgr_btn.png:/WorkStation/Resources/theme/appmanager/appbox_mgr_btn.png + + + + 20 + 20 + + + + true + + + + + + + + + + + 0 + 28 + + + + + 16777215 + 28 + + + + + 0 + + + 0 + + + + + + 25 + 0 + + + + + 25 + 16777215 + + + + 涓昏彍鍗 + + + + :/WorkStation/Resources/theme/maintool/menu_btn_normal.png:/WorkStation/Resources/theme/maintool/menu_btn_normal.png + + + + 20 + 20 + + + + QToolButton::InstantPopup + + + true + + + + + + + 閰嶇疆 + + + + :/WorkStation/Resources/theme/maintool/Tools.png:/WorkStation/Resources/theme/maintool/Tools.png + + + + 18 + 18 + + + + true + + + + + + + 娑堟伅绠$悊 + + + + + + + :/WorkStation/Resources/theme/maintool/message.png:/WorkStation/Resources/theme/maintool/message.png + + + + 18 + 18 + + + + true + + + + + + + 鏂囦欢绠$悊 + + + + + + + :/WorkStation/Resources/theme/maintool/filemanager.png:/WorkStation/Resources/theme/maintool/filemanager.png + + + + 18 + 18 + + + + true + + + + + + + 瀹夊叏绠$悊 + + + + + + + :/WorkStation/Resources/theme/maintool/TitleIcon.png:/WorkStation/Resources/theme/maintool/TitleIcon.png + + + + 18 + 18 + + + + true + + + + + + + QQ鍦堝瓙 + + + + + + + :/WorkStation/Resources/theme/maintool/FriendCircleMainToolAreaEntry.png:/WorkStation/Resources/theme/maintool/FriendCircleMainToolAreaEntry.png + + + + 18 + 18 + + + + true + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + 鏌ユ壘 + + + 鏌ユ壘 + + + + :/WorkStation/Resources/theme/maintool/find.png:/WorkStation/Resources/theme/maintool/find.png + + + + 18 + 18 + + + + Qt::ToolButtonTextBesideIcon + + + true + + + + + + + Qt::Horizontal + + + + 2 + 20 + + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + 搴旂敤 + + + + :/WorkStation/Resources/theme/maintool/QPlusEntranceBtn.png:/WorkStation/Resources/theme/maintool/QPlusEntranceBtn.png + + + + 18 + 18 + + + + Qt::ToolButtonTextBesideIcon + + + true + + + + + + + + + + + + UiImsBaseDialog + QWidget +
uiimsbasedialog.h
+ 1 +
+ + ImsImageLineEdit + QLineEdit +
imsimagelineedit.h
+
+ + UiTabWidget + QTabWidget +
uitabwidget.h
+ 1 +
+
+ + lineEditSearch + toolButtonMainMenu + toolButtonConfig + toolButtonMessageManage + toolButtonFileManager + toolButtonSafety + toolButtonCommunity + toolButtonSearch + toolButtonApp + toolButtonAppManager + + + + + + + + + +
diff --git a/imsclient/tinyxml/tinystr.cpp b/imsclient/tinyxml/tinystr.cpp new file mode 100644 index 00000000..b9a05c37 --- /dev/null +++ b/imsclient/tinyxml/tinystr.cpp @@ -0,0 +1,111 @@ +/* +www.sourceforge.net/projects/tinyxml + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + + +#ifndef TIXML_USE_STL + +#include "tinystr.h" + +// Error value for find primitive +const TiXmlString::size_type TiXmlString::npos = static_cast(-1); + + +// Null rep. +TiXmlString::Rep TiXmlString::nullrep_ = { 0, 0, { '\0' } }; + + +void TiXmlString::reserve(size_type cap) +{ + if (cap > capacity()) + { + TiXmlString tmp; + tmp.init(length(), cap); + memcpy(tmp.start(), data(), length()); + swap(tmp); + } +} + + +TiXmlString& TiXmlString::assign(const char* str, size_type len) +{ + size_type cap = capacity(); + if (len > cap || cap > 3 * (len + 8)) + { + TiXmlString tmp; + tmp.init(len); + memcpy(tmp.start(), str, len); + swap(tmp); + } + else + { + memmove(start(), str, len); + set_size(len); + } + return *this; +} + + +TiXmlString& TiXmlString::append(const char* str, size_type len) +{ + size_type newsize = length() + len; + if (newsize > capacity()) + { + reserve(newsize + capacity()); + } + memmove(finish(), str, len); + set_size(newsize); + return *this; +} + + +TiXmlString operator + (const TiXmlString & a, const TiXmlString & b) +{ + TiXmlString tmp; + tmp.reserve(a.length() + b.length()); + tmp += a; + tmp += b; + return tmp; +} + +TiXmlString operator + (const TiXmlString & a, const char* b) +{ + TiXmlString tmp; + TiXmlString::size_type b_len = static_cast(strlen(b)); + tmp.reserve(a.length() + b_len); + tmp += a; + tmp.append(b, b_len); + return tmp; +} + +TiXmlString operator + (const char* a, const TiXmlString & b) +{ + TiXmlString tmp; + TiXmlString::size_type a_len = static_cast(strlen(a)); + tmp.reserve(a_len + b.length()); + tmp.append(a, a_len); + tmp += b; + return tmp; +} + + +#endif // TIXML_USE_STL diff --git a/imsclient/tinyxml/tinystr.h b/imsclient/tinyxml/tinystr.h new file mode 100644 index 00000000..89cca334 --- /dev/null +++ b/imsclient/tinyxml/tinystr.h @@ -0,0 +1,305 @@ +/* +www.sourceforge.net/projects/tinyxml + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + + +#ifndef TIXML_USE_STL + +#ifndef TIXML_STRING_INCLUDED +#define TIXML_STRING_INCLUDED + +#include +#include + +/* The support for explicit isn't that universal, and it isn't really + required - it is used to check that the TiXmlString class isn't incorrectly + used. Be nice to old compilers and macro it here: +*/ +#if defined(_MSC_VER) && (_MSC_VER >= 1200 ) + // Microsoft visual studio, version 6 and higher. + #define TIXML_EXPLICIT explicit +#elif defined(__GNUC__) && (__GNUC__ >= 3 ) + // GCC version 3 and higher.s + #define TIXML_EXPLICIT explicit +#else + #define TIXML_EXPLICIT +#endif + + +/* + TiXmlString is an emulation of a subset of the std::string template. + Its purpose is to allow compiling TinyXML on compilers with no or poor STL support. + Only the member functions relevant to the TinyXML project have been implemented. + The buffer allocation is made by a simplistic power of 2 like mechanism : if we increase + a string and there's no more room, we allocate a buffer twice as big as we need. +*/ +class TiXmlString +{ + public : + // The size type used + typedef size_t size_type; + + // Error value for find primitive + static const size_type npos; // = -1; + + + // TiXmlString empty constructor + TiXmlString () : rep_(&nullrep_) + { + } + + // TiXmlString copy constructor + TiXmlString ( const TiXmlString & copy) : rep_(0) + { + init(copy.length()); + memcpy(start(), copy.data(), length()); + } + + // TiXmlString constructor, based on a string + TIXML_EXPLICIT TiXmlString ( const char * copy) : rep_(0) + { + init( static_cast( strlen(copy) )); + memcpy(start(), copy, length()); + } + + // TiXmlString constructor, based on a string + TIXML_EXPLICIT TiXmlString ( const char * str, size_type len) : rep_(0) + { + init(len); + memcpy(start(), str, len); + } + + // TiXmlString destructor + ~TiXmlString () + { + quit(); + } + + TiXmlString& operator = (const char * copy) + { + return assign( copy, (size_type)strlen(copy)); + } + + TiXmlString& operator = (const TiXmlString & copy) + { + return assign(copy.start(), copy.length()); + } + + + // += operator. Maps to append + TiXmlString& operator += (const char * suffix) + { + return append(suffix, static_cast( strlen(suffix) )); + } + + // += operator. Maps to append + TiXmlString& operator += (char single) + { + return append(&single, 1); + } + + // += operator. Maps to append + TiXmlString& operator += (const TiXmlString & suffix) + { + return append(suffix.data(), suffix.length()); + } + + + // Convert a TiXmlString into a null-terminated char * + const char * c_str () const { return rep_->str; } + + // Convert a TiXmlString into a char * (need not be null terminated). + const char * data () const { return rep_->str; } + + // Return the length of a TiXmlString + size_type length () const { return rep_->size; } + + // Alias for length() + size_type size () const { return rep_->size; } + + // Checks if a TiXmlString is empty + bool empty () const { return rep_->size == 0; } + + // Return capacity of string + size_type capacity () const { return rep_->capacity; } + + + // single char extraction + const char& at (size_type index) const + { + assert( index < length() ); + return rep_->str[ index ]; + } + + // [] operator + char& operator [] (size_type index) const + { + assert( index < length() ); + return rep_->str[ index ]; + } + + // find a char in a string. Return TiXmlString::npos if not found + size_type find (char lookup) const + { + return find(lookup, 0); + } + + // find a char in a string from an offset. Return TiXmlString::npos if not found + size_type find (char tofind, size_type offset) const + { + if (offset >= length()) return npos; + + for (const char* p = c_str() + offset; *p != '\0'; ++p) + { + if (*p == tofind) return static_cast< size_type >( p - c_str() ); + } + return npos; + } + + void clear () + { + //Lee: + //The original was just too strange, though correct: + // TiXmlString().swap(*this); + //Instead use the quit & re-init: + quit(); + init(0,0); + } + + /* Function to reserve a big amount of data when we know we'll need it. Be aware that this + function DOES NOT clear the content of the TiXmlString if any exists. + */ + void reserve (size_type cap); + + TiXmlString& assign (const char* str, size_type len); + + TiXmlString& append (const char* str, size_type len); + + void swap (TiXmlString& other) + { + Rep* r = rep_; + rep_ = other.rep_; + other.rep_ = r; + } + + private: + + void init(size_type sz) { init(sz, sz); } + void set_size(size_type sz) { rep_->str[ rep_->size = sz ] = '\0'; } + char* start() const { return rep_->str; } + char* finish() const { return rep_->str + rep_->size; } + + struct Rep + { + size_type size, capacity; + char str[1]; + }; + + void init(size_type sz, size_type cap) + { + if (cap) + { + // Lee: the original form: + // rep_ = static_cast(operator new(sizeof(Rep) + cap)); + // doesn't work in some cases of new being overloaded. Switching + // to the normal allocation, although use an 'int' for systems + // that are overly picky about structure alignment. + const size_type bytesNeeded = sizeof(Rep) + cap; + const size_type intsNeeded = ( bytesNeeded + sizeof(int) - 1 ) / sizeof( int ); + rep_ = reinterpret_cast( new int[ intsNeeded ] ); + + rep_->str[ rep_->size = sz ] = '\0'; + rep_->capacity = cap; + } + else + { + rep_ = &nullrep_; + } + } + + void quit() + { + if (rep_ != &nullrep_) + { + // The rep_ is really an array of ints. (see the allocator, above). + // Cast it back before delete, so the compiler won't incorrectly call destructors. + delete [] ( reinterpret_cast( rep_ ) ); + } + } + + Rep * rep_; + static Rep nullrep_; + +} ; + + +inline bool operator == (const TiXmlString & a, const TiXmlString & b) +{ + return ( a.length() == b.length() ) // optimization on some platforms + && ( strcmp(a.c_str(), b.c_str()) == 0 ); // actual compare +} +inline bool operator < (const TiXmlString & a, const TiXmlString & b) +{ + return strcmp(a.c_str(), b.c_str()) < 0; +} + +inline bool operator != (const TiXmlString & a, const TiXmlString & b) { return !(a == b); } +inline bool operator > (const TiXmlString & a, const TiXmlString & b) { return b < a; } +inline bool operator <= (const TiXmlString & a, const TiXmlString & b) { return !(b < a); } +inline bool operator >= (const TiXmlString & a, const TiXmlString & b) { return !(a < b); } + +inline bool operator == (const TiXmlString & a, const char* b) { return strcmp(a.c_str(), b) == 0; } +inline bool operator == (const char* a, const TiXmlString & b) { return b == a; } +inline bool operator != (const TiXmlString & a, const char* b) { return !(a == b); } +inline bool operator != (const char* a, const TiXmlString & b) { return !(b == a); } + +TiXmlString operator + (const TiXmlString & a, const TiXmlString & b); +TiXmlString operator + (const TiXmlString & a, const char* b); +TiXmlString operator + (const char* a, const TiXmlString & b); + + +/* + TiXmlOutStream is an emulation of std::ostream. It is based on TiXmlString. + Only the operators that we need for TinyXML have been developped. +*/ +class TiXmlOutStream : public TiXmlString +{ +public : + + // TiXmlOutStream << operator. + TiXmlOutStream & operator << (const TiXmlString & in) + { + *this += in; + return *this; + } + + // TiXmlOutStream << operator. + TiXmlOutStream & operator << (const char * in) + { + *this += in; + return *this; + } + +} ; + +#endif // TIXML_STRING_INCLUDED +#endif // TIXML_USE_STL diff --git a/imsclient/tinyxml/tinyxml.cpp b/imsclient/tinyxml/tinyxml.cpp new file mode 100644 index 00000000..9c161dfc --- /dev/null +++ b/imsclient/tinyxml/tinyxml.cpp @@ -0,0 +1,1886 @@ +/* +www.sourceforge.net/projects/tinyxml +Original code by Lee Thomason (www.grinninglizard.com) + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +#include + +#ifdef TIXML_USE_STL +#include +#include +#endif + +#include "tinyxml.h" + +FILE* TiXmlFOpen( const char* filename, const char* mode ); + +bool TiXmlBase::condenseWhiteSpace = true; + +// Microsoft compiler security +FILE* TiXmlFOpen( const char* filename, const char* mode ) +{ + #if defined(_MSC_VER) && (_MSC_VER >= 1400 ) + FILE* fp = 0; + errno_t err = fopen_s( &fp, filename, mode ); + if ( !err && fp ) + return fp; + return 0; + #else + return fopen( filename, mode ); + #endif +} + +void TiXmlBase::EncodeString( const TIXML_STRING& str, TIXML_STRING* outString ) +{ + int i=0; + + while( i<(int)str.length() ) + { + unsigned char c = (unsigned char) str[i]; + + if ( c == '&' + && i < ( (int)str.length() - 2 ) + && str[i+1] == '#' + && str[i+2] == 'x' ) + { + // Hexadecimal character reference. + // Pass through unchanged. + // © -- copyright symbol, for example. + // + // The -1 is a bug fix from Rob Laveaux. It keeps + // an overflow from happening if there is no ';'. + // There are actually 2 ways to exit this loop - + // while fails (error case) and break (semicolon found). + // However, there is no mechanism (currently) for + // this function to return an error. + while ( i<(int)str.length()-1 ) + { + outString->append( str.c_str() + i, 1 ); + ++i; + if ( str[i] == ';' ) + break; + } + } + else if ( c == '&' ) + { + outString->append( entity[0].str, entity[0].strLength ); + ++i; + } + else if ( c == '<' ) + { + outString->append( entity[1].str, entity[1].strLength ); + ++i; + } + else if ( c == '>' ) + { + outString->append( entity[2].str, entity[2].strLength ); + ++i; + } + else if ( c == '\"' ) + { + outString->append( entity[3].str, entity[3].strLength ); + ++i; + } + else if ( c == '\'' ) + { + outString->append( entity[4].str, entity[4].strLength ); + ++i; + } + else if ( c < 32 ) + { + // Easy pass at non-alpha/numeric/symbol + // Below 32 is symbolic. + char buf[ 32 ]; + + #if defined(TIXML_SNPRINTF) + TIXML_SNPRINTF( buf, sizeof(buf), "&#x%02X;", (unsigned) ( c & 0xff ) ); + #else + sprintf( buf, "&#x%02X;", (unsigned) ( c & 0xff ) ); + #endif + + //*ME: warning C4267: convert 'size_t' to 'int' + //*ME: Int-Cast to make compiler happy ... + outString->append( buf, (int)strlen( buf ) ); + ++i; + } + else + { + //char realc = (char) c; + //outString->append( &realc, 1 ); + *outString += (char) c; // somewhat more efficient function call. + ++i; + } + } +} + + +TiXmlNode::TiXmlNode( NodeType _type ) : TiXmlBase() +{ + parent = 0; + type = _type; + firstChild = 0; + lastChild = 0; + prev = 0; + next = 0; +} + + +TiXmlNode::~TiXmlNode() +{ + TiXmlNode* node = firstChild; + TiXmlNode* temp = 0; + + while ( node ) + { + temp = node; + node = node->next; + delete temp; + } +} + + +void TiXmlNode::CopyTo( TiXmlNode* target ) const +{ + target->SetValue (value.c_str() ); + target->userData = userData; + target->location = location; +} + + +void TiXmlNode::Clear() +{ + TiXmlNode* node = firstChild; + TiXmlNode* temp = 0; + + while ( node ) + { + temp = node; + node = node->next; + delete temp; + } + + firstChild = 0; + lastChild = 0; +} + + +TiXmlNode* TiXmlNode::LinkEndChild( TiXmlNode* node ) +{ + assert( node->parent == 0 || node->parent == this ); + assert( node->GetDocument() == 0 || node->GetDocument() == this->GetDocument() ); + + if ( node->Type() == TiXmlNode::TINYXML_DOCUMENT ) + { + delete node; + if ( GetDocument() ) + GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + node->parent = this; + + node->prev = lastChild; + node->next = 0; + + if ( lastChild ) + lastChild->next = node; + else + firstChild = node; // it was an empty list. + + lastChild = node; + return node; +} + + +TiXmlNode* TiXmlNode::InsertEndChild( const TiXmlNode& addThis ) +{ + if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT ) + { + if ( GetDocument() ) + GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + TiXmlNode* node = addThis.Clone(); + if ( !node ) + return 0; + + return LinkEndChild( node ); +} + + +TiXmlNode* TiXmlNode::InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis ) +{ + if ( !beforeThis || beforeThis->parent != this ) { + return 0; + } + if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT ) + { + if ( GetDocument() ) + GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + TiXmlNode* node = addThis.Clone(); + if ( !node ) + return 0; + node->parent = this; + + node->next = beforeThis; + node->prev = beforeThis->prev; + if ( beforeThis->prev ) + { + beforeThis->prev->next = node; + } + else + { + assert( firstChild == beforeThis ); + firstChild = node; + } + beforeThis->prev = node; + return node; +} + + +TiXmlNode* TiXmlNode::InsertAfterChild( TiXmlNode* afterThis, const TiXmlNode& addThis ) +{ + if ( !afterThis || afterThis->parent != this ) { + return 0; + } + if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT ) + { + if ( GetDocument() ) + GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + TiXmlNode* node = addThis.Clone(); + if ( !node ) + return 0; + node->parent = this; + + node->prev = afterThis; + node->next = afterThis->next; + if ( afterThis->next ) + { + afterThis->next->prev = node; + } + else + { + assert( lastChild == afterThis ); + lastChild = node; + } + afterThis->next = node; + return node; +} + + +TiXmlNode* TiXmlNode::ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& withThis ) +{ + if ( !replaceThis ) + return 0; + + if ( replaceThis->parent != this ) + return 0; + + if ( withThis.ToDocument() ) { + // A document can never be a child. Thanks to Noam. + TiXmlDocument* document = GetDocument(); + if ( document ) + document->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + TiXmlNode* node = withThis.Clone(); + if ( !node ) + return 0; + + node->next = replaceThis->next; + node->prev = replaceThis->prev; + + if ( replaceThis->next ) + replaceThis->next->prev = node; + else + lastChild = node; + + if ( replaceThis->prev ) + replaceThis->prev->next = node; + else + firstChild = node; + + delete replaceThis; + node->parent = this; + return node; +} + + +bool TiXmlNode::RemoveChild( TiXmlNode* removeThis ) +{ + if ( !removeThis ) { + return false; + } + + if ( removeThis->parent != this ) + { + assert( 0 ); + return false; + } + + if ( removeThis->next ) + removeThis->next->prev = removeThis->prev; + else + lastChild = removeThis->prev; + + if ( removeThis->prev ) + removeThis->prev->next = removeThis->next; + else + firstChild = removeThis->next; + + delete removeThis; + return true; +} + +const TiXmlNode* TiXmlNode::FirstChild( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = firstChild; node; node = node->next ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +const TiXmlNode* TiXmlNode::LastChild( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = lastChild; node; node = node->prev ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +const TiXmlNode* TiXmlNode::IterateChildren( const TiXmlNode* previous ) const +{ + if ( !previous ) + { + return FirstChild(); + } + else + { + assert( previous->parent == this ); + return previous->NextSibling(); + } +} + + +const TiXmlNode* TiXmlNode::IterateChildren( const char * val, const TiXmlNode* previous ) const +{ + if ( !previous ) + { + return FirstChild( val ); + } + else + { + assert( previous->parent == this ); + return previous->NextSibling( val ); + } +} + + +const TiXmlNode* TiXmlNode::NextSibling( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = next; node; node = node->next ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +const TiXmlNode* TiXmlNode::PreviousSibling( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = prev; node; node = node->prev ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +void TiXmlElement::RemoveAttribute( const char * name ) +{ + #ifdef TIXML_USE_STL + TIXML_STRING str( name ); + TiXmlAttribute* node = attributeSet.Find( str ); + #else + TiXmlAttribute* node = attributeSet.Find( name ); + #endif + if ( node ) + { + attributeSet.Remove( node ); + delete node; + } +} + +const TiXmlElement* TiXmlNode::FirstChildElement() const +{ + const TiXmlNode* node; + + for ( node = FirstChild(); + node; + node = node->NextSibling() ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlElement* TiXmlNode::FirstChildElement( const char * _value ) const +{ + const TiXmlNode* node; + + for ( node = FirstChild( _value ); + node; + node = node->NextSibling( _value ) ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlElement* TiXmlNode::NextSiblingElement() const +{ + const TiXmlNode* node; + + for ( node = NextSibling(); + node; + node = node->NextSibling() ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlElement* TiXmlNode::NextSiblingElement( const char * _value ) const +{ + const TiXmlNode* node; + + for ( node = NextSibling( _value ); + node; + node = node->NextSibling( _value ) ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlDocument* TiXmlNode::GetDocument() const +{ + const TiXmlNode* node; + + for( node = this; node; node = node->parent ) + { + if ( node->ToDocument() ) + return node->ToDocument(); + } + return 0; +} + + +TiXmlElement::TiXmlElement (const char * _value) + : TiXmlNode( TiXmlNode::TINYXML_ELEMENT ) +{ + firstChild = lastChild = 0; + value = _value; +} + + +#ifdef TIXML_USE_STL +TiXmlElement::TiXmlElement( const std::string& _value ) + : TiXmlNode( TiXmlNode::TINYXML_ELEMENT ) +{ + firstChild = lastChild = 0; + value = _value; +} +#endif + + +TiXmlElement::TiXmlElement( const TiXmlElement& copy) + : TiXmlNode( TiXmlNode::TINYXML_ELEMENT ) +{ + firstChild = lastChild = 0; + copy.CopyTo( this ); +} + + +TiXmlElement& TiXmlElement::operator=( const TiXmlElement& base ) +{ + ClearThis(); + base.CopyTo( this ); + return *this; +} + + +TiXmlElement::~TiXmlElement() +{ + ClearThis(); +} + + +void TiXmlElement::ClearThis() +{ + Clear(); + while( attributeSet.First() ) + { + TiXmlAttribute* node = attributeSet.First(); + attributeSet.Remove( node ); + delete node; + } +} + + +const char* TiXmlElement::Attribute( const char* name ) const +{ + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( node ) + return node->Value(); + return 0; +} + + +#ifdef TIXML_USE_STL +const std::string* TiXmlElement::Attribute( const std::string& name ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( attrib ) + return &attrib->ValueStr(); + return 0; +} +#endif + + +const char* TiXmlElement::Attribute( const char* name, int* i ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + const char* result = 0; + + if ( attrib ) { + result = attrib->Value(); + if ( i ) { + attrib->QueryIntValue( i ); + } + } + return result; +} + + +#ifdef TIXML_USE_STL +const std::string* TiXmlElement::Attribute( const std::string& name, int* i ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + const std::string* result = 0; + + if ( attrib ) { + result = &attrib->ValueStr(); + if ( i ) { + attrib->QueryIntValue( i ); + } + } + return result; +} +#endif + + +const char* TiXmlElement::Attribute( const char* name, double* d ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + const char* result = 0; + + if ( attrib ) { + result = attrib->Value(); + if ( d ) { + attrib->QueryDoubleValue( d ); + } + } + return result; +} + + +#ifdef TIXML_USE_STL +const std::string* TiXmlElement::Attribute( const std::string& name, double* d ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + const std::string* result = 0; + + if ( attrib ) { + result = &attrib->ValueStr(); + if ( d ) { + attrib->QueryDoubleValue( d ); + } + } + return result; +} +#endif + + +int TiXmlElement::QueryIntAttribute( const char* name, int* ival ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( !attrib ) + return TIXML_NO_ATTRIBUTE; + return attrib->QueryIntValue( ival ); +} + + +int TiXmlElement::QueryUnsignedAttribute( const char* name, unsigned* value ) const +{ + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + + int ival = 0; + int result = node->QueryIntValue( &ival ); + *value = (unsigned)ival; + return result; +} + + +int TiXmlElement::QueryBoolAttribute( const char* name, bool* bval ) const +{ + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + + int result = TIXML_WRONG_TYPE; + if ( StringEqual( node->Value(), "true", true, TIXML_ENCODING_UNKNOWN ) + || StringEqual( node->Value(), "yes", true, TIXML_ENCODING_UNKNOWN ) + || StringEqual( node->Value(), "1", true, TIXML_ENCODING_UNKNOWN ) ) + { + *bval = true; + result = TIXML_SUCCESS; + } + else if ( StringEqual( node->Value(), "false", true, TIXML_ENCODING_UNKNOWN ) + || StringEqual( node->Value(), "no", true, TIXML_ENCODING_UNKNOWN ) + || StringEqual( node->Value(), "0", true, TIXML_ENCODING_UNKNOWN ) ) + { + *bval = false; + result = TIXML_SUCCESS; + } + return result; +} + + + +#ifdef TIXML_USE_STL +int TiXmlElement::QueryIntAttribute( const std::string& name, int* ival ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( !attrib ) + return TIXML_NO_ATTRIBUTE; + return attrib->QueryIntValue( ival ); +} +#endif + + +int TiXmlElement::QueryDoubleAttribute( const char* name, double* dval ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( !attrib ) + return TIXML_NO_ATTRIBUTE; + return attrib->QueryDoubleValue( dval ); +} + + +#ifdef TIXML_USE_STL +int TiXmlElement::QueryDoubleAttribute( const std::string& name, double* dval ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( !attrib ) + return TIXML_NO_ATTRIBUTE; + return attrib->QueryDoubleValue( dval ); +} +#endif + + +void TiXmlElement::SetAttribute( const char * name, int val ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( name ); + if ( attrib ) { + attrib->SetIntValue( val ); + } +} + + +#ifdef TIXML_USE_STL +void TiXmlElement::SetAttribute( const std::string& name, int val ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( name ); + if ( attrib ) { + attrib->SetIntValue( val ); + } +} +#endif + + +void TiXmlElement::SetDoubleAttribute( const char * name, double val ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( name ); + if ( attrib ) { + attrib->SetDoubleValue( val ); + } +} + + +#ifdef TIXML_USE_STL +void TiXmlElement::SetDoubleAttribute( const std::string& name, double val ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( name ); + if ( attrib ) { + attrib->SetDoubleValue( val ); + } +} +#endif + + +void TiXmlElement::SetAttribute( const char * cname, const char * cvalue ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( cname ); + if ( attrib ) { + attrib->SetValue( cvalue ); + } +} + + +#ifdef TIXML_USE_STL +void TiXmlElement::SetAttribute( const std::string& _name, const std::string& _value ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( _name ); + if ( attrib ) { + attrib->SetValue( _value ); + } +} +#endif + + +void TiXmlElement::Print( FILE* cfile, int depth ) const +{ + int i; + assert( cfile ); + for ( i=0; iNext() ) + { + fprintf( cfile, " " ); + attrib->Print( cfile, depth ); + } + + // There are 3 different formatting approaches: + // 1) An element without children is printed as a node + // 2) An element with only a text child is printed as text + // 3) An element with children is printed on multiple lines. + TiXmlNode* node; + if ( !firstChild ) + { + fprintf( cfile, " />" ); + } + else if ( firstChild == lastChild && firstChild->ToText() ) + { + fprintf( cfile, ">" ); + firstChild->Print( cfile, depth + 1 ); + fprintf( cfile, "", value.c_str() ); + } + else + { + fprintf( cfile, ">" ); + + for ( node = firstChild; node; node=node->NextSibling() ) + { + if ( !node->ToText() ) + { + fprintf( cfile, "\n" ); + } + node->Print( cfile, depth+1 ); + } + fprintf( cfile, "\n" ); + for( i=0; i", value.c_str() ); + } +} + + +void TiXmlElement::CopyTo( TiXmlElement* target ) const +{ + // superclass: + TiXmlNode::CopyTo( target ); + + // Element class: + // Clone the attributes, then clone the children. + const TiXmlAttribute* attribute = 0; + for( attribute = attributeSet.First(); + attribute; + attribute = attribute->Next() ) + { + target->SetAttribute( attribute->Name(), attribute->Value() ); + } + + TiXmlNode* node = 0; + for ( node = firstChild; node; node = node->NextSibling() ) + { + target->LinkEndChild( node->Clone() ); + } +} + +bool TiXmlElement::Accept( TiXmlVisitor* visitor ) const +{ + if ( visitor->VisitEnter( *this, attributeSet.First() ) ) + { + for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() ) + { + if ( !node->Accept( visitor ) ) + break; + } + } + return visitor->VisitExit( *this ); +} + + +TiXmlNode* TiXmlElement::Clone() const +{ + TiXmlElement* clone = new TiXmlElement( Value() ); + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +const char* TiXmlElement::GetText() const +{ + const TiXmlNode* child = this->FirstChild(); + if ( child ) { + const TiXmlText* childText = child->ToText(); + if ( childText ) { + return childText->Value(); + } + } + return 0; +} + + +TiXmlDocument::TiXmlDocument() : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT ) +{ + tabsize = 4; + useMicrosoftBOM = false; + ClearError(); +} + +TiXmlDocument::TiXmlDocument( const char * documentName ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT ) +{ + tabsize = 4; + useMicrosoftBOM = false; + value = documentName; + ClearError(); +} + + +#ifdef TIXML_USE_STL +TiXmlDocument::TiXmlDocument( const std::string& documentName ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT ) +{ + tabsize = 4; + useMicrosoftBOM = false; + value = documentName; + ClearError(); +} +#endif + + +TiXmlDocument::TiXmlDocument( const TiXmlDocument& copy ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT ) +{ + copy.CopyTo( this ); +} + + +TiXmlDocument& TiXmlDocument::operator=( const TiXmlDocument& copy ) +{ + Clear(); + copy.CopyTo( this ); + return *this; +} + + +bool TiXmlDocument::LoadFile( TiXmlEncoding encoding ) +{ + return LoadFile( Value(), encoding ); +} + + +bool TiXmlDocument::SaveFile() const +{ + return SaveFile( Value() ); +} + +bool TiXmlDocument::LoadFile( const char* _filename, TiXmlEncoding encoding ) +{ + TIXML_STRING filename( _filename ); + value = filename; + + // reading in binary mode so that tinyxml can normalize the EOL + FILE* file = TiXmlFOpen( value.c_str (), "rb" ); + + if ( file ) + { + bool result = LoadFile( file, encoding ); + fclose( file ); + return result; + } + else + { + SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } +} + +bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding ) +{ + if ( !file ) + { + SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } + + // Delete the existing data: + Clear(); + location.Clear(); + + // Get the file size, so we can pre-allocate the string. HUGE speed impact. + long length = 0; + fseek( file, 0, SEEK_END ); + length = ftell( file ); + fseek( file, 0, SEEK_SET ); + + // Strange case, but good to handle up front. + if ( length <= 0 ) + { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } + + // Subtle bug here. TinyXml did use fgets. But from the XML spec: + // 2.11 End-of-Line Handling + // + // + // ...the XML processor MUST behave as if it normalized all line breaks in external + // parsed entities (including the document entity) on input, before parsing, by translating + // both the two-character sequence #xD #xA and any #xD that is not followed by #xA to + // a single #xA character. + // + // + // It is not clear fgets does that, and certainly isn't clear it works cross platform. + // Generally, you expect fgets to translate from the convention of the OS to the c/unix + // convention, and not work generally. + + /* + while( fgets( buf, sizeof(buf), file ) ) + { + data += buf; + } + */ + + char* buf = new char[ length+1 ]; + buf[0] = 0; + + if ( fread( buf, length, 1, file ) != 1 ) { + delete [] buf; + SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } + + // Process the buffer in place to normalize new lines. (See comment above.) + // Copies from the 'p' to 'q' pointer, where p can advance faster if + // a newline-carriage return is hit. + // + // Wikipedia: + // Systems based on ASCII or a compatible character set use either LF (Line feed, '\n', 0x0A, 10 in decimal) or + // CR (Carriage return, '\r', 0x0D, 13 in decimal) individually, or CR followed by LF (CR+LF, 0x0D 0x0A)... + // * LF: Multics, Unix and Unix-like systems (GNU/Linux, AIX, Xenix, Mac OS X, FreeBSD, etc.), BeOS, Amiga, RISC OS, and others + // * CR+LF: DEC RT-11 and most other early non-Unix, non-IBM OSes, CP/M, MP/M, DOS, OS/2, Microsoft Windows, Symbian OS + // * CR: Commodore 8-bit machines, Apple II family, Mac OS up to version 9 and OS-9 + + const char* p = buf; // the read head + char* q = buf; // the write head + const char CR = 0x0d; + const char LF = 0x0a; + + buf[length] = 0; + while( *p ) { + assert( p < (buf+length) ); + assert( q <= (buf+length) ); + assert( q <= p ); + + if ( *p == CR ) { + *q++ = LF; + p++; + if ( *p == LF ) { // check for CR+LF (and skip LF) + p++; + } + } + else { + *q++ = *p++; + } + } + assert( q <= (buf+length) ); + *q = 0; + + Parse( buf, 0, encoding ); + + delete [] buf; + return !Error(); +} + + +bool TiXmlDocument::SaveFile( const char * filename ) const +{ + // The old c stuff lives on... + FILE* fp = TiXmlFOpen( filename, "w" ); + if ( fp ) + { + bool result = SaveFile( fp ); + fclose( fp ); + return result; + } + return false; +} + + +bool TiXmlDocument::SaveFile( FILE* fp ) const +{ + if ( useMicrosoftBOM ) + { + const unsigned char TIXML_UTF_LEAD_0 = 0xefU; + const unsigned char TIXML_UTF_LEAD_1 = 0xbbU; + const unsigned char TIXML_UTF_LEAD_2 = 0xbfU; + + fputc( TIXML_UTF_LEAD_0, fp ); + fputc( TIXML_UTF_LEAD_1, fp ); + fputc( TIXML_UTF_LEAD_2, fp ); + } + Print( fp, 0 ); + return (ferror(fp) == 0); +} + + +void TiXmlDocument::CopyTo( TiXmlDocument* target ) const +{ + TiXmlNode::CopyTo( target ); + + target->error = error; + target->errorId = errorId; + target->errorDesc = errorDesc; + target->tabsize = tabsize; + target->errorLocation = errorLocation; + target->useMicrosoftBOM = useMicrosoftBOM; + + TiXmlNode* node = 0; + for ( node = firstChild; node; node = node->NextSibling() ) + { + target->LinkEndChild( node->Clone() ); + } +} + + +TiXmlNode* TiXmlDocument::Clone() const +{ + TiXmlDocument* clone = new TiXmlDocument(); + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +void TiXmlDocument::Print( FILE* cfile, int depth ) const +{ + assert( cfile ); + for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() ) + { + node->Print( cfile, depth ); + fprintf( cfile, "\n" ); + } +} + + +bool TiXmlDocument::Accept( TiXmlVisitor* visitor ) const +{ + if ( visitor->VisitEnter( *this ) ) + { + for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() ) + { + if ( !node->Accept( visitor ) ) + break; + } + } + return visitor->VisitExit( *this ); +} + + +const TiXmlAttribute* TiXmlAttribute::Next() const +{ + // We are using knowledge of the sentinel. The sentinel + // have a value or name. + if ( next->value.empty() && next->name.empty() ) + return 0; + return next; +} + +/* +TiXmlAttribute* TiXmlAttribute::Next() +{ + // We are using knowledge of the sentinel. The sentinel + // have a value or name. + if ( next->value.empty() && next->name.empty() ) + return 0; + return next; +} +*/ + +const TiXmlAttribute* TiXmlAttribute::Previous() const +{ + // We are using knowledge of the sentinel. The sentinel + // have a value or name. + if ( prev->value.empty() && prev->name.empty() ) + return 0; + return prev; +} + +/* +TiXmlAttribute* TiXmlAttribute::Previous() +{ + // We are using knowledge of the sentinel. The sentinel + // have a value or name. + if ( prev->value.empty() && prev->name.empty() ) + return 0; + return prev; +} +*/ + +void TiXmlAttribute::Print( FILE* cfile, int /*depth*/, TIXML_STRING* str ) const +{ + TIXML_STRING n, v; + + EncodeString( name, &n ); + EncodeString( value, &v ); + + if (value.find ('\"') == TIXML_STRING::npos) { + if ( cfile ) { + fprintf (cfile, "%s=\"%s\"", n.c_str(), v.c_str() ); + } + if ( str ) { + (*str) += n; (*str) += "=\""; (*str) += v; (*str) += "\""; + } + } + else { + if ( cfile ) { + fprintf (cfile, "%s='%s'", n.c_str(), v.c_str() ); + } + if ( str ) { + (*str) += n; (*str) += "='"; (*str) += v; (*str) += "'"; + } + } +} + + +int TiXmlAttribute::QueryIntValue( int* ival ) const +{ + if ( TIXML_SSCANF( value.c_str(), "%d", ival ) == 1 ) + return TIXML_SUCCESS; + return TIXML_WRONG_TYPE; +} + +int TiXmlAttribute::QueryDoubleValue( double* dval ) const +{ + if ( TIXML_SSCANF( value.c_str(), "%lf", dval ) == 1 ) + return TIXML_SUCCESS; + return TIXML_WRONG_TYPE; +} + +void TiXmlAttribute::SetIntValue( int _value ) +{ + char buf [64]; + #if defined(TIXML_SNPRINTF) + TIXML_SNPRINTF(buf, sizeof(buf), "%d", _value); + #else + sprintf (buf, "%d", _value); + #endif + SetValue (buf); +} + +void TiXmlAttribute::SetDoubleValue( double _value ) +{ + char buf [256]; + #if defined(TIXML_SNPRINTF) + TIXML_SNPRINTF( buf, sizeof(buf), "%g", _value); + #else + sprintf (buf, "%g", _value); + #endif + SetValue (buf); +} + +int TiXmlAttribute::IntValue() const +{ + return atoi (value.c_str ()); +} + +double TiXmlAttribute::DoubleValue() const +{ + return atof (value.c_str ()); +} + + +TiXmlComment::TiXmlComment( const TiXmlComment& copy ) : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) +{ + copy.CopyTo( this ); +} + + +TiXmlComment& TiXmlComment::operator=( const TiXmlComment& base ) +{ + Clear(); + base.CopyTo( this ); + return *this; +} + + +void TiXmlComment::Print( FILE* cfile, int depth ) const +{ + assert( cfile ); + for ( int i=0; i", value.c_str() ); +} + + +void TiXmlComment::CopyTo( TiXmlComment* target ) const +{ + TiXmlNode::CopyTo( target ); +} + + +bool TiXmlComment::Accept( TiXmlVisitor* visitor ) const +{ + return visitor->Visit( *this ); +} + + +TiXmlNode* TiXmlComment::Clone() const +{ + TiXmlComment* clone = new TiXmlComment(); + + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +void TiXmlText::Print( FILE* cfile, int depth ) const +{ + assert( cfile ); + if ( cdata ) + { + int i; + fprintf( cfile, "\n" ); + for ( i=0; i\n", value.c_str() ); // unformatted output + } + else + { + TIXML_STRING buffer; + EncodeString( value, &buffer ); + fprintf( cfile, "%s", buffer.c_str() ); + } +} + + +void TiXmlText::CopyTo( TiXmlText* target ) const +{ + TiXmlNode::CopyTo( target ); + target->cdata = cdata; +} + + +bool TiXmlText::Accept( TiXmlVisitor* visitor ) const +{ + return visitor->Visit( *this ); +} + + +TiXmlNode* TiXmlText::Clone() const +{ + TiXmlText* clone = 0; + clone = new TiXmlText( "" ); + + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +TiXmlDeclaration::TiXmlDeclaration( const char * _version, + const char * _encoding, + const char * _standalone ) + : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) +{ + version = _version; + encoding = _encoding; + standalone = _standalone; +} + + +#ifdef TIXML_USE_STL +TiXmlDeclaration::TiXmlDeclaration( const std::string& _version, + const std::string& _encoding, + const std::string& _standalone ) + : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) +{ + version = _version; + encoding = _encoding; + standalone = _standalone; +} +#endif + + +TiXmlDeclaration::TiXmlDeclaration( const TiXmlDeclaration& copy ) + : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) +{ + copy.CopyTo( this ); +} + + +TiXmlDeclaration& TiXmlDeclaration::operator=( const TiXmlDeclaration& copy ) +{ + Clear(); + copy.CopyTo( this ); + return *this; +} + + +void TiXmlDeclaration::Print( FILE* cfile, int /*depth*/, TIXML_STRING* str ) const +{ + if ( cfile ) fprintf( cfile, "" ); + if ( str ) (*str) += "?>"; +} + + +void TiXmlDeclaration::CopyTo( TiXmlDeclaration* target ) const +{ + TiXmlNode::CopyTo( target ); + + target->version = version; + target->encoding = encoding; + target->standalone = standalone; +} + + +bool TiXmlDeclaration::Accept( TiXmlVisitor* visitor ) const +{ + return visitor->Visit( *this ); +} + + +TiXmlNode* TiXmlDeclaration::Clone() const +{ + TiXmlDeclaration* clone = new TiXmlDeclaration(); + + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +void TiXmlUnknown::Print( FILE* cfile, int depth ) const +{ + for ( int i=0; i", value.c_str() ); +} + + +void TiXmlUnknown::CopyTo( TiXmlUnknown* target ) const +{ + TiXmlNode::CopyTo( target ); +} + + +bool TiXmlUnknown::Accept( TiXmlVisitor* visitor ) const +{ + return visitor->Visit( *this ); +} + + +TiXmlNode* TiXmlUnknown::Clone() const +{ + TiXmlUnknown* clone = new TiXmlUnknown(); + + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +TiXmlAttributeSet::TiXmlAttributeSet() +{ + sentinel.next = &sentinel; + sentinel.prev = &sentinel; +} + + +TiXmlAttributeSet::~TiXmlAttributeSet() +{ + assert( sentinel.next == &sentinel ); + assert( sentinel.prev == &sentinel ); +} + + +void TiXmlAttributeSet::Add( TiXmlAttribute* addMe ) +{ + #ifdef TIXML_USE_STL + assert( !Find( TIXML_STRING( addMe->Name() ) ) ); // Shouldn't be multiply adding to the set. + #else + assert( !Find( addMe->Name() ) ); // Shouldn't be multiply adding to the set. + #endif + + addMe->next = &sentinel; + addMe->prev = sentinel.prev; + + sentinel.prev->next = addMe; + sentinel.prev = addMe; +} + +void TiXmlAttributeSet::Remove( TiXmlAttribute* removeMe ) +{ + TiXmlAttribute* node; + + for( node = sentinel.next; node != &sentinel; node = node->next ) + { + if ( node == removeMe ) + { + node->prev->next = node->next; + node->next->prev = node->prev; + node->next = 0; + node->prev = 0; + return; + } + } + assert( 0 ); // we tried to remove a non-linked attribute. +} + + +#ifdef TIXML_USE_STL +TiXmlAttribute* TiXmlAttributeSet::Find( const std::string& name ) const +{ + for( TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next ) + { + if ( node->name == name ) + return node; + } + return 0; +} + +TiXmlAttribute* TiXmlAttributeSet::FindOrCreate( const std::string& _name ) +{ + TiXmlAttribute* attrib = Find( _name ); + if ( !attrib ) { + attrib = new TiXmlAttribute(); + Add( attrib ); + attrib->SetName( _name ); + } + return attrib; +} +#endif + + +TiXmlAttribute* TiXmlAttributeSet::Find( const char* name ) const +{ + for( TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next ) + { + if ( strcmp( node->name.c_str(), name ) == 0 ) + return node; + } + return 0; +} + + +TiXmlAttribute* TiXmlAttributeSet::FindOrCreate( const char* _name ) +{ + TiXmlAttribute* attrib = Find( _name ); + if ( !attrib ) { + attrib = new TiXmlAttribute(); + Add( attrib ); + attrib->SetName( _name ); + } + return attrib; +} + + +#ifdef TIXML_USE_STL +std::istream& operator>> (std::istream & in, TiXmlNode & base) +{ + TIXML_STRING tag; + tag.reserve( 8 * 1000 ); + base.StreamIn( &in, &tag ); + + base.Parse( tag.c_str(), 0, TIXML_DEFAULT_ENCODING ); + return in; +} +#endif + + +#ifdef TIXML_USE_STL +std::ostream& operator<< (std::ostream & out, const TiXmlNode & base) +{ + TiXmlPrinter printer; + printer.SetStreamPrinting(); + base.Accept( &printer ); + out << printer.Str(); + + return out; +} + + +std::string& operator<< (std::string& out, const TiXmlNode& base ) +{ + TiXmlPrinter printer; + printer.SetStreamPrinting(); + base.Accept( &printer ); + out.append( printer.Str() ); + + return out; +} +#endif + + +TiXmlHandle TiXmlHandle::FirstChild() const +{ + if ( node ) + { + TiXmlNode* child = node->FirstChild(); + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::FirstChild( const char * value ) const +{ + if ( node ) + { + TiXmlNode* child = node->FirstChild( value ); + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::FirstChildElement() const +{ + if ( node ) + { + TiXmlElement* child = node->FirstChildElement(); + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::FirstChildElement( const char * value ) const +{ + if ( node ) + { + TiXmlElement* child = node->FirstChildElement( value ); + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::Child( int count ) const +{ + if ( node ) + { + int i; + TiXmlNode* child = node->FirstChild(); + for ( i=0; + child && iNextSibling(), ++i ) + { + // nothing + } + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::Child( const char* value, int count ) const +{ + if ( node ) + { + int i; + TiXmlNode* child = node->FirstChild( value ); + for ( i=0; + child && iNextSibling( value ), ++i ) + { + // nothing + } + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::ChildElement( int count ) const +{ + if ( node ) + { + int i; + TiXmlElement* child = node->FirstChildElement(); + for ( i=0; + child && iNextSiblingElement(), ++i ) + { + // nothing + } + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::ChildElement( const char* value, int count ) const +{ + if ( node ) + { + int i; + TiXmlElement* child = node->FirstChildElement( value ); + for ( i=0; + child && iNextSiblingElement( value ), ++i ) + { + // nothing + } + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +bool TiXmlPrinter::VisitEnter( const TiXmlDocument& ) +{ + return true; +} + +bool TiXmlPrinter::VisitExit( const TiXmlDocument& ) +{ + return true; +} + +bool TiXmlPrinter::VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute ) +{ + DoIndent(); + buffer += "<"; + buffer += element.Value(); + + for( const TiXmlAttribute* attrib = firstAttribute; attrib; attrib = attrib->Next() ) + { + buffer += " "; + attrib->Print( 0, 0, &buffer ); + } + + if ( !element.FirstChild() ) + { + buffer += " />"; + DoLineBreak(); + } + else + { + buffer += ">"; + if ( element.FirstChild()->ToText() + && element.LastChild() == element.FirstChild() + && element.FirstChild()->ToText()->CDATA() == false ) + { + simpleTextPrint = true; + // no DoLineBreak()! + } + else + { + DoLineBreak(); + } + } + ++depth; + return true; +} + + +bool TiXmlPrinter::VisitExit( const TiXmlElement& element ) +{ + --depth; + if ( !element.FirstChild() ) + { + // nothing. + } + else + { + if ( simpleTextPrint ) + { + simpleTextPrint = false; + } + else + { + DoIndent(); + } + buffer += ""; + DoLineBreak(); + } + return true; +} + + +bool TiXmlPrinter::Visit( const TiXmlText& text ) +{ + if ( text.CDATA() ) + { + DoIndent(); + buffer += ""; + DoLineBreak(); + } + else if ( simpleTextPrint ) + { + TIXML_STRING str; + TiXmlBase::EncodeString( text.ValueTStr(), &str ); + buffer += str; + } + else + { + DoIndent(); + TIXML_STRING str; + TiXmlBase::EncodeString( text.ValueTStr(), &str ); + buffer += str; + DoLineBreak(); + } + return true; +} + + +bool TiXmlPrinter::Visit( const TiXmlDeclaration& declaration ) +{ + DoIndent(); + declaration.Print( 0, 0, &buffer ); + DoLineBreak(); + return true; +} + + +bool TiXmlPrinter::Visit( const TiXmlComment& comment ) +{ + DoIndent(); + buffer += ""; + DoLineBreak(); + return true; +} + + +bool TiXmlPrinter::Visit( const TiXmlUnknown& unknown ) +{ + DoIndent(); + buffer += "<"; + buffer += unknown.Value(); + buffer += ">"; + DoLineBreak(); + return true; +} + diff --git a/imsclient/tinyxml/tinyxml.h b/imsclient/tinyxml/tinyxml.h new file mode 100644 index 00000000..a3589e5b --- /dev/null +++ b/imsclient/tinyxml/tinyxml.h @@ -0,0 +1,1805 @@ +/* +www.sourceforge.net/projects/tinyxml +Original code by Lee Thomason (www.grinninglizard.com) + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + + +#ifndef TINYXML_INCLUDED +#define TINYXML_INCLUDED + +#ifdef _MSC_VER +#pragma warning( push ) +#pragma warning( disable : 4530 ) +#pragma warning( disable : 4786 ) +#endif + +#include +#include +#include +#include +#include + +// Help out windows: +#if defined( _DEBUG ) && !defined( DEBUG ) +#define DEBUG +#endif + +#ifdef TIXML_USE_STL + #include + #include + #include + #define TIXML_STRING std::string +#else + #include "tinystr.h" + #define TIXML_STRING TiXmlString +#endif + +// Deprecated library function hell. Compilers want to use the +// new safe versions. This probably doesn't fully address the problem, +// but it gets closer. There are too many compilers for me to fully +// test. If you get compilation troubles, undefine TIXML_SAFE +#define TIXML_SAFE + +#ifdef TIXML_SAFE + #if defined(_MSC_VER) && (_MSC_VER >= 1400 ) + // Microsoft visual studio, version 2005 and higher. + #define TIXML_SNPRINTF _snprintf_s + #define TIXML_SSCANF sscanf_s + #elif defined(_MSC_VER) && (_MSC_VER >= 1200 ) + // Microsoft visual studio, version 6 and higher. + //#pragma message( "Using _sn* functions." ) + #define TIXML_SNPRINTF _snprintf + #define TIXML_SSCANF sscanf + #elif defined(__GNUC__) && (__GNUC__ >= 3 ) + // GCC version 3 and higher.s + //#warning( "Using sn* functions." ) + #define TIXML_SNPRINTF snprintf + #define TIXML_SSCANF sscanf + #else + #define TIXML_SNPRINTF snprintf + #define TIXML_SSCANF sscanf + #endif +#endif + +class TiXmlDocument; +class TiXmlElement; +class TiXmlComment; +class TiXmlUnknown; +class TiXmlAttribute; +class TiXmlText; +class TiXmlDeclaration; +class TiXmlParsingData; + +const int TIXML_MAJOR_VERSION = 2; +const int TIXML_MINOR_VERSION = 6; +const int TIXML_PATCH_VERSION = 2; + +/* Internal structure for tracking location of items + in the XML file. +*/ +struct TiXmlCursor +{ + TiXmlCursor() { Clear(); } + void Clear() { row = col = -1; } + + int row; // 0 based. + int col; // 0 based. +}; + + +/** + Implements the interface to the "Visitor pattern" (see the Accept() method.) + If you call the Accept() method, it requires being passed a TiXmlVisitor + class to handle callbacks. For nodes that contain other nodes (Document, Element) + you will get called with a VisitEnter/VisitExit pair. Nodes that are always leaves + are simply called with Visit(). + + If you return 'true' from a Visit method, recursive parsing will continue. If you return + false, no children of this node or its sibilings will be Visited. + + All flavors of Visit methods have a default implementation that returns 'true' (continue + visiting). You need to only override methods that are interesting to you. + + Generally Accept() is called on the TiXmlDocument, although all nodes suppert Visiting. + + You should never change the document from a callback. + + @sa TiXmlNode::Accept() +*/ +class TiXmlVisitor +{ +public: + virtual ~TiXmlVisitor() {} + + /// Visit a document. + virtual bool VisitEnter( const TiXmlDocument& /*doc*/ ) { return true; } + /// Visit a document. + virtual bool VisitExit( const TiXmlDocument& /*doc*/ ) { return true; } + + /// Visit an element. + virtual bool VisitEnter( const TiXmlElement& /*element*/, const TiXmlAttribute* /*firstAttribute*/ ) { return true; } + /// Visit an element. + virtual bool VisitExit( const TiXmlElement& /*element*/ ) { return true; } + + /// Visit a declaration + virtual bool Visit( const TiXmlDeclaration& /*declaration*/ ) { return true; } + /// Visit a text node + virtual bool Visit( const TiXmlText& /*text*/ ) { return true; } + /// Visit a comment node + virtual bool Visit( const TiXmlComment& /*comment*/ ) { return true; } + /// Visit an unknown node + virtual bool Visit( const TiXmlUnknown& /*unknown*/ ) { return true; } +}; + +// Only used by Attribute::Query functions +enum +{ + TIXML_SUCCESS, + TIXML_NO_ATTRIBUTE, + TIXML_WRONG_TYPE +}; + + +// Used by the parsing routines. +enum TiXmlEncoding +{ + TIXML_ENCODING_UNKNOWN, + TIXML_ENCODING_UTF8, + TIXML_ENCODING_LEGACY +}; + +const TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN; + +/** TiXmlBase is a base class for every class in TinyXml. + It does little except to establish that TinyXml classes + can be printed and provide some utility functions. + + In XML, the document and elements can contain + other elements and other types of nodes. + + @verbatim + A Document can contain: Element (container or leaf) + Comment (leaf) + Unknown (leaf) + Declaration( leaf ) + + An Element can contain: Element (container or leaf) + Text (leaf) + Attributes (not on tree) + Comment (leaf) + Unknown (leaf) + + A Decleration contains: Attributes (not on tree) + @endverbatim +*/ +class TiXmlBase +{ + friend class TiXmlNode; + friend class TiXmlElement; + friend class TiXmlDocument; + +public: + TiXmlBase() : userData(0) {} + virtual ~TiXmlBase() {} + + /** All TinyXml classes can print themselves to a filestream + or the string class (TiXmlString in non-STL mode, std::string + in STL mode.) Either or both cfile and str can be null. + + This is a formatted print, and will insert + tabs and newlines. + + (For an unformatted stream, use the << operator.) + */ + virtual void Print( FILE* cfile, int depth ) const = 0; + + /** The world does not agree on whether white space should be kept or + not. In order to make everyone happy, these global, static functions + are provided to set whether or not TinyXml will condense all white space + into a single space or not. The default is to condense. Note changing this + value is not thread safe. + */ + static void SetCondenseWhiteSpace( bool condense ) { condenseWhiteSpace = condense; } + + /// Return the current white space setting. + static bool IsWhiteSpaceCondensed() { return condenseWhiteSpace; } + + /** Return the position, in the original source file, of this node or attribute. + The row and column are 1-based. (That is the first row and first column is + 1,1). If the returns values are 0 or less, then the parser does not have + a row and column value. + + Generally, the row and column value will be set when the TiXmlDocument::Load(), + TiXmlDocument::LoadFile(), or any TiXmlNode::Parse() is called. It will NOT be set + when the DOM was created from operator>>. + + The values reflect the initial load. Once the DOM is modified programmatically + (by adding or changing nodes and attributes) the new values will NOT update to + reflect changes in the document. + + There is a minor performance cost to computing the row and column. Computation + can be disabled if TiXmlDocument::SetTabSize() is called with 0 as the value. + + @sa TiXmlDocument::SetTabSize() + */ + int Row() const { return location.row + 1; } + int Column() const { return location.col + 1; } ///< See Row() + + void SetUserData( void* user ) { userData = user; } ///< Set a pointer to arbitrary user data. + void* GetUserData() { return userData; } ///< Get a pointer to arbitrary user data. + const void* GetUserData() const { return userData; } ///< Get a pointer to arbitrary user data. + + // Table that returs, for a given lead byte, the total number of bytes + // in the UTF-8 sequence. + static const int utf8ByteTable[256]; + + virtual const char* Parse( const char* p, + TiXmlParsingData* data, + TiXmlEncoding encoding /*= TIXML_ENCODING_UNKNOWN */ ) = 0; + + /** Expands entities in a string. Note this should not contian the tag's '<', '>', etc, + or they will be transformed into entities! + */ + static void EncodeString( const TIXML_STRING& str, TIXML_STRING* out ); + + enum + { + TIXML_NO_ERROR = 0, + TIXML_ERROR, + TIXML_ERROR_OPENING_FILE, + TIXML_ERROR_PARSING_ELEMENT, + TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME, + TIXML_ERROR_READING_ELEMENT_VALUE, + TIXML_ERROR_READING_ATTRIBUTES, + TIXML_ERROR_PARSING_EMPTY, + TIXML_ERROR_READING_END_TAG, + TIXML_ERROR_PARSING_UNKNOWN, + TIXML_ERROR_PARSING_COMMENT, + TIXML_ERROR_PARSING_DECLARATION, + TIXML_ERROR_DOCUMENT_EMPTY, + TIXML_ERROR_EMBEDDED_NULL, + TIXML_ERROR_PARSING_CDATA, + TIXML_ERROR_DOCUMENT_TOP_ONLY, + + TIXML_ERROR_STRING_COUNT + }; + +protected: + + static const char* SkipWhiteSpace( const char*, TiXmlEncoding encoding ); + + inline static bool IsWhiteSpace( char c ) + { + return ( isspace( (unsigned char) c ) || c == '\n' || c == '\r' ); + } + inline static bool IsWhiteSpace( int c ) + { + if ( c < 256 ) + return IsWhiteSpace( (char) c ); + return false; // Again, only truly correct for English/Latin...but usually works. + } + + #ifdef TIXML_USE_STL + static bool StreamWhiteSpace( std::istream * in, TIXML_STRING * tag ); + static bool StreamTo( std::istream * in, int character, TIXML_STRING * tag ); + #endif + + /* Reads an XML name into the string provided. Returns + a pointer just past the last character of the name, + or 0 if the function has an error. + */ + static const char* ReadName( const char* p, TIXML_STRING* name, TiXmlEncoding encoding ); + + /* Reads text. Returns a pointer past the given end tag. + Wickedly complex options, but it keeps the (sensitive) code in one place. + */ + static const char* ReadText( const char* in, // where to start + TIXML_STRING* text, // the string read + bool ignoreWhiteSpace, // whether to keep the white space + const char* endTag, // what ends this text + bool ignoreCase, // whether to ignore case in the end tag + TiXmlEncoding encoding ); // the current encoding + + // If an entity has been found, transform it into a character. + static const char* GetEntity( const char* in, char* value, int* length, TiXmlEncoding encoding ); + + // Get a character, while interpreting entities. + // The length can be from 0 to 4 bytes. + inline static const char* GetChar( const char* p, char* _value, int* length, TiXmlEncoding encoding ) + { + assert( p ); + if ( encoding == TIXML_ENCODING_UTF8 ) + { + *length = utf8ByteTable[ *((const unsigned char*)p) ]; + assert( *length >= 0 && *length < 5 ); + } + else + { + *length = 1; + } + + if ( *length == 1 ) + { + if ( *p == '&' ) + return GetEntity( p, _value, length, encoding ); + *_value = *p; + return p+1; + } + else if ( *length ) + { + //strncpy( _value, p, *length ); // lots of compilers don't like this function (unsafe), + // and the null terminator isn't needed + for( int i=0; p[i] && i<*length; ++i ) { + _value[i] = p[i]; + } + return p + (*length); + } + else + { + // Not valid text. + return 0; + } + } + + // Return true if the next characters in the stream are any of the endTag sequences. + // Ignore case only works for english, and should only be relied on when comparing + // to English words: StringEqual( p, "version", true ) is fine. + static bool StringEqual( const char* p, + const char* endTag, + bool ignoreCase, + TiXmlEncoding encoding ); + + static const char* errorString[ TIXML_ERROR_STRING_COUNT ]; + + TiXmlCursor location; + + /// Field containing a generic user pointer + void* userData; + + // None of these methods are reliable for any language except English. + // Good for approximation, not great for accuracy. + static int IsAlpha( unsigned char anyByte, TiXmlEncoding encoding ); + static int IsAlphaNum( unsigned char anyByte, TiXmlEncoding encoding ); + inline static int ToLower( int v, TiXmlEncoding encoding ) + { + if ( encoding == TIXML_ENCODING_UTF8 ) + { + if ( v < 128 ) return tolower( v ); + return v; + } + else + { + return tolower( v ); + } + } + static void ConvertUTF32ToUTF8( unsigned long input, char* output, int* length ); + +private: + TiXmlBase( const TiXmlBase& ); // not implemented. + void operator=( const TiXmlBase& base ); // not allowed. + + struct Entity + { + const char* str; + unsigned int strLength; + char chr; + }; + enum + { + NUM_ENTITY = 5, + MAX_ENTITY_LENGTH = 6 + + }; + static Entity entity[ NUM_ENTITY ]; + static bool condenseWhiteSpace; +}; + + +/** The parent class for everything in the Document Object Model. + (Except for attributes). + Nodes have siblings, a parent, and children. A node can be + in a document, or stand on its own. The type of a TiXmlNode + can be queried, and it can be cast to its more defined type. +*/ +class TiXmlNode : public TiXmlBase +{ + friend class TiXmlDocument; + friend class TiXmlElement; + +public: + #ifdef TIXML_USE_STL + + /** An input stream operator, for every class. Tolerant of newlines and + formatting, but doesn't expect them. + */ + friend std::istream& operator >> (std::istream& in, TiXmlNode& base); + + /** An output stream operator, for every class. Note that this outputs + without any newlines or formatting, as opposed to Print(), which + includes tabs and new lines. + + The operator<< and operator>> are not completely symmetric. Writing + a node to a stream is very well defined. You'll get a nice stream + of output, without any extra whitespace or newlines. + + But reading is not as well defined. (As it always is.) If you create + a TiXmlElement (for example) and read that from an input stream, + the text needs to define an element or junk will result. This is + true of all input streams, but it's worth keeping in mind. + + A TiXmlDocument will read nodes until it reads a root element, and + all the children of that root element. + */ + friend std::ostream& operator<< (std::ostream& out, const TiXmlNode& base); + + /// Appends the XML node or attribute to a std::string. + friend std::string& operator<< (std::string& out, const TiXmlNode& base ); + + #endif + + /** The types of XML nodes supported by TinyXml. (All the + unsupported types are picked up by UNKNOWN.) + */ + enum NodeType + { + TINYXML_DOCUMENT, + TINYXML_ELEMENT, + TINYXML_COMMENT, + TINYXML_UNKNOWN, + TINYXML_TEXT, + TINYXML_DECLARATION, + TINYXML_TYPECOUNT + }; + + virtual ~TiXmlNode(); + + /** The meaning of 'value' changes for the specific type of + TiXmlNode. + @verbatim + Document: filename of the xml file + Element: name of the element + Comment: the comment text + Unknown: the tag contents + Text: the text string + @endverbatim + + The subclasses will wrap this function. + */ + const char *Value() const { return value.c_str (); } + + #ifdef TIXML_USE_STL + /** Return Value() as a std::string. If you only use STL, + this is more efficient than calling Value(). + Only available in STL mode. + */ + const std::string& ValueStr() const { return value; } + #endif + + const TIXML_STRING& ValueTStr() const { return value; } + + /** Changes the value of the node. Defined as: + @verbatim + Document: filename of the xml file + Element: name of the element + Comment: the comment text + Unknown: the tag contents + Text: the text string + @endverbatim + */ + void SetValue(const char * _value) { value = _value;} + + #ifdef TIXML_USE_STL + /// STL std::string form. + void SetValue( const std::string& _value ) { value = _value; } + #endif + + /// Delete all the children of this node. Does not affect 'this'. + void Clear(); + + /// One step up the DOM. + TiXmlNode* Parent() { return parent; } + const TiXmlNode* Parent() const { return parent; } + + const TiXmlNode* FirstChild() const { return firstChild; } ///< The first child of this node. Will be null if there are no children. + TiXmlNode* FirstChild() { return firstChild; } + const TiXmlNode* FirstChild( const char * value ) const; ///< The first child of this node with the matching 'value'. Will be null if none found. + /// The first child of this node with the matching 'value'. Will be null if none found. + TiXmlNode* FirstChild( const char * _value ) { + // Call through to the const version - safe since nothing is changed. Exiting syntax: cast this to a const (always safe) + // call the method, cast the return back to non-const. + return const_cast< TiXmlNode* > ((const_cast< const TiXmlNode* >(this))->FirstChild( _value )); + } + const TiXmlNode* LastChild() const { return lastChild; } /// The last child of this node. Will be null if there are no children. + TiXmlNode* LastChild() { return lastChild; } + + const TiXmlNode* LastChild( const char * value ) const; /// The last child of this node matching 'value'. Will be null if there are no children. + TiXmlNode* LastChild( const char * _value ) { + return const_cast< TiXmlNode* > ((const_cast< const TiXmlNode* >(this))->LastChild( _value )); + } + + #ifdef TIXML_USE_STL + const TiXmlNode* FirstChild( const std::string& _value ) const { return FirstChild (_value.c_str ()); } ///< STL std::string form. + TiXmlNode* FirstChild( const std::string& _value ) { return FirstChild (_value.c_str ()); } ///< STL std::string form. + const TiXmlNode* LastChild( const std::string& _value ) const { return LastChild (_value.c_str ()); } ///< STL std::string form. + TiXmlNode* LastChild( const std::string& _value ) { return LastChild (_value.c_str ()); } ///< STL std::string form. + #endif + + /** An alternate way to walk the children of a node. + One way to iterate over nodes is: + @verbatim + for( child = parent->FirstChild(); child; child = child->NextSibling() ) + @endverbatim + + IterateChildren does the same thing with the syntax: + @verbatim + child = 0; + while( child = parent->IterateChildren( child ) ) + @endverbatim + + IterateChildren takes the previous child as input and finds + the next one. If the previous child is null, it returns the + first. IterateChildren will return null when done. + */ + const TiXmlNode* IterateChildren( const TiXmlNode* previous ) const; + TiXmlNode* IterateChildren( const TiXmlNode* previous ) { + return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->IterateChildren( previous ) ); + } + + /// This flavor of IterateChildren searches for children with a particular 'value' + const TiXmlNode* IterateChildren( const char * value, const TiXmlNode* previous ) const; + TiXmlNode* IterateChildren( const char * _value, const TiXmlNode* previous ) { + return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->IterateChildren( _value, previous ) ); + } + + #ifdef TIXML_USE_STL + const TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) const { return IterateChildren (_value.c_str (), previous); } ///< STL std::string form. + TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) { return IterateChildren (_value.c_str (), previous); } ///< STL std::string form. + #endif + + /** Add a new node related to this. Adds a child past the LastChild. + Returns a pointer to the new object or NULL if an error occured. + */ + TiXmlNode* InsertEndChild( const TiXmlNode& addThis ); + + + /** Add a new node related to this. Adds a child past the LastChild. + + NOTE: the node to be added is passed by pointer, and will be + henceforth owned (and deleted) by tinyXml. This method is efficient + and avoids an extra copy, but should be used with care as it + uses a different memory model than the other insert functions. + + @sa InsertEndChild + */ + TiXmlNode* LinkEndChild( TiXmlNode* addThis ); + + /** Add a new node related to this. Adds a child before the specified child. + Returns a pointer to the new object or NULL if an error occured. + */ + TiXmlNode* InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis ); + + /** Add a new node related to this. Adds a child after the specified child. + Returns a pointer to the new object or NULL if an error occured. + */ + TiXmlNode* InsertAfterChild( TiXmlNode* afterThis, const TiXmlNode& addThis ); + + /** Replace a child of this node. + Returns a pointer to the new object or NULL if an error occured. + */ + TiXmlNode* ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& withThis ); + + /// Delete a child of this node. + bool RemoveChild( TiXmlNode* removeThis ); + + /// Navigate to a sibling node. + const TiXmlNode* PreviousSibling() const { return prev; } + TiXmlNode* PreviousSibling() { return prev; } + + /// Navigate to a sibling node. + const TiXmlNode* PreviousSibling( const char * ) const; + TiXmlNode* PreviousSibling( const char *_prev ) { + return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->PreviousSibling( _prev ) ); + } + + #ifdef TIXML_USE_STL + const TiXmlNode* PreviousSibling( const std::string& _value ) const { return PreviousSibling (_value.c_str ()); } ///< STL std::string form. + TiXmlNode* PreviousSibling( const std::string& _value ) { return PreviousSibling (_value.c_str ()); } ///< STL std::string form. + const TiXmlNode* NextSibling( const std::string& _value) const { return NextSibling (_value.c_str ()); } ///< STL std::string form. + TiXmlNode* NextSibling( const std::string& _value) { return NextSibling (_value.c_str ()); } ///< STL std::string form. + #endif + + /// Navigate to a sibling node. + const TiXmlNode* NextSibling() const { return next; } + TiXmlNode* NextSibling() { return next; } + + /// Navigate to a sibling node with the given 'value'. + const TiXmlNode* NextSibling( const char * ) const; + TiXmlNode* NextSibling( const char* _next ) { + return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->NextSibling( _next ) ); + } + + /** Convenience function to get through elements. + Calls NextSibling and ToElement. Will skip all non-Element + nodes. Returns 0 if there is not another element. + */ + const TiXmlElement* NextSiblingElement() const; + TiXmlElement* NextSiblingElement() { + return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->NextSiblingElement() ); + } + + /** Convenience function to get through elements. + Calls NextSibling and ToElement. Will skip all non-Element + nodes. Returns 0 if there is not another element. + */ + const TiXmlElement* NextSiblingElement( const char * ) const; + TiXmlElement* NextSiblingElement( const char *_next ) { + return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->NextSiblingElement( _next ) ); + } + + #ifdef TIXML_USE_STL + const TiXmlElement* NextSiblingElement( const std::string& _value) const { return NextSiblingElement (_value.c_str ()); } ///< STL std::string form. + TiXmlElement* NextSiblingElement( const std::string& _value) { return NextSiblingElement (_value.c_str ()); } ///< STL std::string form. + #endif + + /// Convenience function to get through elements. + const TiXmlElement* FirstChildElement() const; + TiXmlElement* FirstChildElement() { + return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->FirstChildElement() ); + } + + /// Convenience function to get through elements. + const TiXmlElement* FirstChildElement( const char * _value ) const; + TiXmlElement* FirstChildElement( const char * _value ) { + return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->FirstChildElement( _value ) ); + } + + #ifdef TIXML_USE_STL + const TiXmlElement* FirstChildElement( const std::string& _value ) const { return FirstChildElement (_value.c_str ()); } ///< STL std::string form. + TiXmlElement* FirstChildElement( const std::string& _value ) { return FirstChildElement (_value.c_str ()); } ///< STL std::string form. + #endif + + /** Query the type (as an enumerated value, above) of this node. + The possible types are: TINYXML_DOCUMENT, TINYXML_ELEMENT, TINYXML_COMMENT, + TINYXML_UNKNOWN, TINYXML_TEXT, and TINYXML_DECLARATION. + */ + int Type() const { return type; } + + /** Return a pointer to the Document this node lives in. + Returns null if not in a document. + */ + const TiXmlDocument* GetDocument() const; + TiXmlDocument* GetDocument() { + return const_cast< TiXmlDocument* >( (const_cast< const TiXmlNode* >(this))->GetDocument() ); + } + + /// Returns true if this node has no children. + bool NoChildren() const { return !firstChild; } + + virtual const TiXmlDocument* ToDocument() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlElement* ToElement() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlComment* ToComment() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlUnknown* ToUnknown() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlText* ToText() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlDeclaration* ToDeclaration() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + + virtual TiXmlDocument* ToDocument() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlElement* ToElement() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlComment* ToComment() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlUnknown* ToUnknown() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlText* ToText() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlDeclaration* ToDeclaration() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + + /** Create an exact duplicate of this node and return it. The memory must be deleted + by the caller. + */ + virtual TiXmlNode* Clone() const = 0; + + /** Accept a hierchical visit the nodes in the TinyXML DOM. Every node in the + XML tree will be conditionally visited and the host will be called back + via the TiXmlVisitor interface. + + This is essentially a SAX interface for TinyXML. (Note however it doesn't re-parse + the XML for the callbacks, so the performance of TinyXML is unchanged by using this + interface versus any other.) + + The interface has been based on ideas from: + + - http://www.saxproject.org/ + - http://c2.com/cgi/wiki?HierarchicalVisitorPattern + + Which are both good references for "visiting". + + An example of using Accept(): + @verbatim + TiXmlPrinter printer; + tinyxmlDoc.Accept( &printer ); + const char* xmlcstr = printer.CStr(); + @endverbatim + */ + virtual bool Accept( TiXmlVisitor* visitor ) const = 0; + +protected: + TiXmlNode( NodeType _type ); + + // Copy to the allocated object. Shared functionality between Clone, Copy constructor, + // and the assignment operator. + void CopyTo( TiXmlNode* target ) const; + + #ifdef TIXML_USE_STL + // The real work of the input operator. + virtual void StreamIn( std::istream* in, TIXML_STRING* tag ) = 0; + #endif + + // Figure out what is at *p, and parse it. Returns null if it is not an xml node. + TiXmlNode* Identify( const char* start, TiXmlEncoding encoding ); + + TiXmlNode* parent; + NodeType type; + + TiXmlNode* firstChild; + TiXmlNode* lastChild; + + TIXML_STRING value; + + TiXmlNode* prev; + TiXmlNode* next; + +private: + TiXmlNode( const TiXmlNode& ); // not implemented. + void operator=( const TiXmlNode& base ); // not allowed. +}; + + +/** An attribute is a name-value pair. Elements have an arbitrary + number of attributes, each with a unique name. + + @note The attributes are not TiXmlNodes, since they are not + part of the tinyXML document object model. There are other + suggested ways to look at this problem. +*/ +class TiXmlAttribute : public TiXmlBase +{ + friend class TiXmlAttributeSet; + +public: + /// Construct an empty attribute. + TiXmlAttribute() : TiXmlBase() + { + document = 0; + prev = next = 0; + } + + #ifdef TIXML_USE_STL + /// std::string constructor. + TiXmlAttribute( const std::string& _name, const std::string& _value ) + { + name = _name; + value = _value; + document = 0; + prev = next = 0; + } + #endif + + /// Construct an attribute with a name and value. + TiXmlAttribute( const char * _name, const char * _value ) + { + name = _name; + value = _value; + document = 0; + prev = next = 0; + } + + const char* Name() const { return name.c_str(); } ///< Return the name of this attribute. + const char* Value() const { return value.c_str(); } ///< Return the value of this attribute. + #ifdef TIXML_USE_STL + const std::string& ValueStr() const { return value; } ///< Return the value of this attribute. + #endif + int IntValue() const; ///< Return the value of this attribute, converted to an integer. + double DoubleValue() const; ///< Return the value of this attribute, converted to a double. + + // Get the tinyxml string representation + const TIXML_STRING& NameTStr() const { return name; } + + /** QueryIntValue examines the value string. It is an alternative to the + IntValue() method with richer error checking. + If the value is an integer, it is stored in 'value' and + the call returns TIXML_SUCCESS. If it is not + an integer, it returns TIXML_WRONG_TYPE. + + A specialized but useful call. Note that for success it returns 0, + which is the opposite of almost all other TinyXml calls. + */ + int QueryIntValue( int* _value ) const; + /// QueryDoubleValue examines the value string. See QueryIntValue(). + int QueryDoubleValue( double* _value ) const; + + void SetName( const char* _name ) { name = _name; } ///< Set the name of this attribute. + void SetValue( const char* _value ) { value = _value; } ///< Set the value. + + void SetIntValue( int _value ); ///< Set the value from an integer. + void SetDoubleValue( double _value ); ///< Set the value from a double. + + #ifdef TIXML_USE_STL + /// STL std::string form. + void SetName( const std::string& _name ) { name = _name; } + /// STL std::string form. + void SetValue( const std::string& _value ) { value = _value; } + #endif + + /// Get the next sibling attribute in the DOM. Returns null at end. + const TiXmlAttribute* Next() const; + TiXmlAttribute* Next() { + return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttribute* >(this))->Next() ); + } + + /// Get the previous sibling attribute in the DOM. Returns null at beginning. + const TiXmlAttribute* Previous() const; + TiXmlAttribute* Previous() { + return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttribute* >(this))->Previous() ); + } + + bool operator==( const TiXmlAttribute& rhs ) const { return rhs.name == name; } + bool operator<( const TiXmlAttribute& rhs ) const { return name < rhs.name; } + bool operator>( const TiXmlAttribute& rhs ) const { return name > rhs.name; } + + /* Attribute parsing starts: first letter of the name + returns: the next char after the value end quote + */ + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + // Prints this Attribute to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const { + Print( cfile, depth, 0 ); + } + void Print( FILE* cfile, int depth, TIXML_STRING* str ) const; + + // [internal use] + // Set the document pointer so the attribute can report errors. + void SetDocument( TiXmlDocument* doc ) { document = doc; } + +private: + TiXmlAttribute( const TiXmlAttribute& ); // not implemented. + void operator=( const TiXmlAttribute& base ); // not allowed. + + TiXmlDocument* document; // A pointer back to a document, for error reporting. + TIXML_STRING name; + TIXML_STRING value; + TiXmlAttribute* prev; + TiXmlAttribute* next; +}; + + +/* A class used to manage a group of attributes. + It is only used internally, both by the ELEMENT and the DECLARATION. + + The set can be changed transparent to the Element and Declaration + classes that use it, but NOT transparent to the Attribute + which has to implement a next() and previous() method. Which makes + it a bit problematic and prevents the use of STL. + + This version is implemented with circular lists because: + - I like circular lists + - it demonstrates some independence from the (typical) doubly linked list. +*/ +class TiXmlAttributeSet +{ +public: + TiXmlAttributeSet(); + ~TiXmlAttributeSet(); + + void Add( TiXmlAttribute* attribute ); + void Remove( TiXmlAttribute* attribute ); + + const TiXmlAttribute* First() const { return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; } + TiXmlAttribute* First() { return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; } + const TiXmlAttribute* Last() const { return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; } + TiXmlAttribute* Last() { return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; } + + TiXmlAttribute* Find( const char* _name ) const; + TiXmlAttribute* FindOrCreate( const char* _name ); + +# ifdef TIXML_USE_STL + TiXmlAttribute* Find( const std::string& _name ) const; + TiXmlAttribute* FindOrCreate( const std::string& _name ); +# endif + + +private: + //*ME: Because of hidden/disabled copy-construktor in TiXmlAttribute (sentinel-element), + //*ME: this class must be also use a hidden/disabled copy-constructor !!! + TiXmlAttributeSet( const TiXmlAttributeSet& ); // not allowed + void operator=( const TiXmlAttributeSet& ); // not allowed (as TiXmlAttribute) + + TiXmlAttribute sentinel; +}; + + +/** The element is a container class. It has a value, the element name, + and can contain other elements, text, comments, and unknowns. + Elements also contain an arbitrary number of attributes. +*/ +class TiXmlElement : public TiXmlNode +{ +public: + /// Construct an element. + TiXmlElement (const char * in_value); + + #ifdef TIXML_USE_STL + /// std::string constructor. + TiXmlElement( const std::string& _value ); + #endif + + TiXmlElement( const TiXmlElement& ); + + TiXmlElement& operator=( const TiXmlElement& base ); + + virtual ~TiXmlElement(); + + /** Given an attribute name, Attribute() returns the value + for the attribute of that name, or null if none exists. + */ + const char* Attribute( const char* name ) const; + + /** Given an attribute name, Attribute() returns the value + for the attribute of that name, or null if none exists. + If the attribute exists and can be converted to an integer, + the integer value will be put in the return 'i', if 'i' + is non-null. + */ + const char* Attribute( const char* name, int* i ) const; + + /** Given an attribute name, Attribute() returns the value + for the attribute of that name, or null if none exists. + If the attribute exists and can be converted to an double, + the double value will be put in the return 'd', if 'd' + is non-null. + */ + const char* Attribute( const char* name, double* d ) const; + + /** QueryIntAttribute examines the attribute - it is an alternative to the + Attribute() method with richer error checking. + If the attribute is an integer, it is stored in 'value' and + the call returns TIXML_SUCCESS. If it is not + an integer, it returns TIXML_WRONG_TYPE. If the attribute + does not exist, then TIXML_NO_ATTRIBUTE is returned. + */ + int QueryIntAttribute( const char* name, int* _value ) const; + /// QueryUnsignedAttribute examines the attribute - see QueryIntAttribute(). + int QueryUnsignedAttribute( const char* name, unsigned* _value ) const; + /** QueryBoolAttribute examines the attribute - see QueryIntAttribute(). + Note that '1', 'true', or 'yes' are considered true, while '0', 'false' + and 'no' are considered false. + */ + int QueryBoolAttribute( const char* name, bool* _value ) const; + /// QueryDoubleAttribute examines the attribute - see QueryIntAttribute(). + int QueryDoubleAttribute( const char* name, double* _value ) const; + /// QueryFloatAttribute examines the attribute - see QueryIntAttribute(). + int QueryFloatAttribute( const char* name, float* _value ) const { + double d; + int result = QueryDoubleAttribute( name, &d ); + if ( result == TIXML_SUCCESS ) { + *_value = (float)d; + } + return result; + } + + #ifdef TIXML_USE_STL + /// QueryStringAttribute examines the attribute - see QueryIntAttribute(). + int QueryStringAttribute( const char* name, std::string* _value ) const { + const char* cstr = Attribute( name ); + if ( cstr ) { + *_value = std::string( cstr ); + return TIXML_SUCCESS; + } + return TIXML_NO_ATTRIBUTE; + } + + /** Template form of the attribute query which will try to read the + attribute into the specified type. Very easy, very powerful, but + be careful to make sure to call this with the correct type. + + NOTE: This method doesn't work correctly for 'string' types that contain spaces. + + @return TIXML_SUCCESS, TIXML_WRONG_TYPE, or TIXML_NO_ATTRIBUTE + */ + template< typename T > int QueryValueAttribute( const std::string& name, T* outValue ) const + { + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + + std::stringstream sstream( node->ValueStr() ); + sstream >> *outValue; + if ( !sstream.fail() ) + return TIXML_SUCCESS; + return TIXML_WRONG_TYPE; + } + + int QueryValueAttribute( const std::string& name, std::string* outValue ) const + { + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + *outValue = node->ValueStr(); + return TIXML_SUCCESS; + } + #endif + + /** Sets an attribute of name to a given value. The attribute + will be created if it does not exist, or changed if it does. + */ + void SetAttribute( const char* name, const char * _value ); + + #ifdef TIXML_USE_STL + const std::string* Attribute( const std::string& name ) const; + const std::string* Attribute( const std::string& name, int* i ) const; + const std::string* Attribute( const std::string& name, double* d ) const; + int QueryIntAttribute( const std::string& name, int* _value ) const; + int QueryDoubleAttribute( const std::string& name, double* _value ) const; + + /// STL std::string form. + void SetAttribute( const std::string& name, const std::string& _value ); + ///< STL std::string form. + void SetAttribute( const std::string& name, int _value ); + ///< STL std::string form. + void SetDoubleAttribute( const std::string& name, double value ); + #endif + + /** Sets an attribute of name to a given value. The attribute + will be created if it does not exist, or changed if it does. + */ + void SetAttribute( const char * name, int value ); + + /** Sets an attribute of name to a given value. The attribute + will be created if it does not exist, or changed if it does. + */ + void SetDoubleAttribute( const char * name, double value ); + + /** Deletes an attribute with the given name. + */ + void RemoveAttribute( const char * name ); + #ifdef TIXML_USE_STL + void RemoveAttribute( const std::string& name ) { RemoveAttribute (name.c_str ()); } ///< STL std::string form. + #endif + + const TiXmlAttribute* FirstAttribute() const { return attributeSet.First(); } ///< Access the first attribute in this element. + TiXmlAttribute* FirstAttribute() { return attributeSet.First(); } + const TiXmlAttribute* LastAttribute() const { return attributeSet.Last(); } ///< Access the last attribute in this element. + TiXmlAttribute* LastAttribute() { return attributeSet.Last(); } + + /** Convenience function for easy access to the text inside an element. Although easy + and concise, GetText() is limited compared to getting the TiXmlText child + and accessing it directly. + + If the first child of 'this' is a TiXmlText, the GetText() + returns the character string of the Text node, else null is returned. + + This is a convenient method for getting the text of simple contained text: + @verbatim + This is text + const char* str = fooElement->GetText(); + @endverbatim + + 'str' will be a pointer to "This is text". + + Note that this function can be misleading. If the element foo was created from + this XML: + @verbatim + This is text + @endverbatim + + then the value of str would be null. The first child node isn't a text node, it is + another element. From this XML: + @verbatim + This is text + @endverbatim + GetText() will return "This is ". + + WARNING: GetText() accesses a child node - don't become confused with the + similarly named TiXmlHandle::Text() and TiXmlNode::ToText() which are + safe type casts on the referenced node. + */ + const char* GetText() const; + + /// Creates a new Element and returns it - the returned element is a copy. + virtual TiXmlNode* Clone() const; + // Print the Element to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const; + + /* Attribtue parsing starts: next char past '<' + returns: next char past '>' + */ + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlElement* ToElement() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlElement* ToElement() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* visitor ) const; + +protected: + + void CopyTo( TiXmlElement* target ) const; + void ClearThis(); // like clear, but initializes 'this' object as well + + // Used to be public [internal use] + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + /* [internal use] + Reads the "value" of the element -- another element, or text. + This should terminate with the current end tag. + */ + const char* ReadValue( const char* in, TiXmlParsingData* prevData, TiXmlEncoding encoding ); + +private: + TiXmlAttributeSet attributeSet; +}; + + +/** An XML comment. +*/ +class TiXmlComment : public TiXmlNode +{ +public: + /// Constructs an empty comment. + TiXmlComment() : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) {} + /// Construct a comment from text. + TiXmlComment( const char* _value ) : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) { + SetValue( _value ); + } + TiXmlComment( const TiXmlComment& ); + TiXmlComment& operator=( const TiXmlComment& base ); + + virtual ~TiXmlComment() {} + + /// Returns a copy of this Comment. + virtual TiXmlNode* Clone() const; + // Write this Comment to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const; + + /* Attribtue parsing starts: at the ! of the !-- + returns: next char past '>' + */ + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlComment* ToComment() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlComment* ToComment() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* visitor ) const; + +protected: + void CopyTo( TiXmlComment* target ) const; + + // used to be public + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif +// virtual void StreamOut( TIXML_OSTREAM * out ) const; + +private: + +}; + + +/** XML text. A text node can have 2 ways to output the next. "normal" output + and CDATA. It will default to the mode it was parsed from the XML file and + you generally want to leave it alone, but you can change the output mode with + SetCDATA() and query it with CDATA(). +*/ +class TiXmlText : public TiXmlNode +{ + friend class TiXmlElement; +public: + /** Constructor for text element. By default, it is treated as + normal, encoded text. If you want it be output as a CDATA text + element, set the parameter _cdata to 'true' + */ + TiXmlText (const char * initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT) + { + SetValue( initValue ); + cdata = false; + } + virtual ~TiXmlText() {} + + #ifdef TIXML_USE_STL + /// Constructor. + TiXmlText( const std::string& initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT) + { + SetValue( initValue ); + cdata = false; + } + #endif + + TiXmlText( const TiXmlText& copy ) : TiXmlNode( TiXmlNode::TINYXML_TEXT ) { copy.CopyTo( this ); } + TiXmlText& operator=( const TiXmlText& base ) { base.CopyTo( this ); return *this; } + + // Write this text object to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const; + + /// Queries whether this represents text using a CDATA section. + bool CDATA() const { return cdata; } + /// Turns on or off a CDATA representation of text. + void SetCDATA( bool _cdata ) { cdata = _cdata; } + + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlText* ToText() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlText* ToText() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* content ) const; + +protected : + /// [internal use] Creates a new Element and returns it. + virtual TiXmlNode* Clone() const; + void CopyTo( TiXmlText* target ) const; + + bool Blank() const; // returns true if all white space and new lines + // [internal use] + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + +private: + bool cdata; // true if this should be input and output as a CDATA style text element +}; + + +/** In correct XML the declaration is the first entry in the file. + @verbatim + + @endverbatim + + TinyXml will happily read or write files without a declaration, + however. There are 3 possible attributes to the declaration: + version, encoding, and standalone. + + Note: In this version of the code, the attributes are + handled as special cases, not generic attributes, simply + because there can only be at most 3 and they are always the same. +*/ +class TiXmlDeclaration : public TiXmlNode +{ +public: + /// Construct an empty declaration. + TiXmlDeclaration() : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) {} + +#ifdef TIXML_USE_STL + /// Constructor. + TiXmlDeclaration( const std::string& _version, + const std::string& _encoding, + const std::string& _standalone ); +#endif + + /// Construct. + TiXmlDeclaration( const char* _version, + const char* _encoding, + const char* _standalone ); + + TiXmlDeclaration( const TiXmlDeclaration& copy ); + TiXmlDeclaration& operator=( const TiXmlDeclaration& copy ); + + virtual ~TiXmlDeclaration() {} + + /// Version. Will return an empty string if none was found. + const char *Version() const { return version.c_str (); } + /// Encoding. Will return an empty string if none was found. + const char *Encoding() const { return encoding.c_str (); } + /// Is this a standalone document? + const char *Standalone() const { return standalone.c_str (); } + + /// Creates a copy of this Declaration and returns it. + virtual TiXmlNode* Clone() const; + // Print this declaration to a FILE stream. + virtual void Print( FILE* cfile, int depth, TIXML_STRING* str ) const; + virtual void Print( FILE* cfile, int depth ) const { + Print( cfile, depth, 0 ); + } + + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlDeclaration* ToDeclaration() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlDeclaration* ToDeclaration() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* visitor ) const; + +protected: + void CopyTo( TiXmlDeclaration* target ) const; + // used to be public + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + +private: + + TIXML_STRING version; + TIXML_STRING encoding; + TIXML_STRING standalone; +}; + + +/** Any tag that tinyXml doesn't recognize is saved as an + unknown. It is a tag of text, but should not be modified. + It will be written back to the XML, unchanged, when the file + is saved. + + DTD tags get thrown into TiXmlUnknowns. +*/ +class TiXmlUnknown : public TiXmlNode +{ +public: + TiXmlUnknown() : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN ) {} + virtual ~TiXmlUnknown() {} + + TiXmlUnknown( const TiXmlUnknown& copy ) : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN ) { copy.CopyTo( this ); } + TiXmlUnknown& operator=( const TiXmlUnknown& copy ) { copy.CopyTo( this ); return *this; } + + /// Creates a copy of this Unknown and returns it. + virtual TiXmlNode* Clone() const; + // Print this Unknown to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const; + + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlUnknown* ToUnknown() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlUnknown* ToUnknown() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* content ) const; + +protected: + void CopyTo( TiXmlUnknown* target ) const; + + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + +private: + +}; + + +/** Always the top level node. A document binds together all the + XML pieces. It can be saved, loaded, and printed to the screen. + The 'value' of a document node is the xml file name. +*/ +class TiXmlDocument : public TiXmlNode +{ +public: + /// Create an empty document, that has no name. + TiXmlDocument(); + /// Create a document with a name. The name of the document is also the filename of the xml. + TiXmlDocument( const char * documentName ); + + #ifdef TIXML_USE_STL + /// Constructor. + TiXmlDocument( const std::string& documentName ); + #endif + + TiXmlDocument( const TiXmlDocument& copy ); + TiXmlDocument& operator=( const TiXmlDocument& copy ); + + virtual ~TiXmlDocument() {} + + /** Load a file using the current document value. + Returns true if successful. Will delete any existing + document data before loading. + */ + bool LoadFile( TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + /// Save a file using the current document value. Returns true if successful. + bool SaveFile() const; + /// Load a file using the given filename. Returns true if successful. + bool LoadFile( const char * filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + /// Save a file using the given filename. Returns true if successful. + bool SaveFile( const char * filename ) const; + /** Load a file using the given FILE*. Returns true if successful. Note that this method + doesn't stream - the entire object pointed at by the FILE* + will be interpreted as an XML file. TinyXML doesn't stream in XML from the current + file location. Streaming may be added in the future. + */ + bool LoadFile( FILE*, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + /// Save a file using the given FILE*. Returns true if successful. + bool SaveFile( FILE* ) const; + + #ifdef TIXML_USE_STL + bool LoadFile( const std::string& filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ) ///< STL std::string version. + { + return LoadFile( filename.c_str(), encoding ); + } + bool SaveFile( const std::string& filename ) const ///< STL std::string version. + { + return SaveFile( filename.c_str() ); + } + #endif + + /** Parse the given null terminated block of xml data. Passing in an encoding to this + method (either TIXML_ENCODING_LEGACY or TIXML_ENCODING_UTF8 will force TinyXml + to use that encoding, regardless of what TinyXml might otherwise try to detect. + */ + virtual const char* Parse( const char* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + + /** Get the root element -- the only top level element -- of the document. + In well formed XML, there should only be one. TinyXml is tolerant of + multiple elements at the document level. + */ + const TiXmlElement* RootElement() const { return FirstChildElement(); } + TiXmlElement* RootElement() { return FirstChildElement(); } + + /** If an error occurs, Error will be set to true. Also, + - The ErrorId() will contain the integer identifier of the error (not generally useful) + - The ErrorDesc() method will return the name of the error. (very useful) + - The ErrorRow() and ErrorCol() will return the location of the error (if known) + */ + bool Error() const { return error; } + + /// Contains a textual (english) description of the error if one occurs. + const char * ErrorDesc() const { return errorDesc.c_str (); } + + /** Generally, you probably want the error string ( ErrorDesc() ). But if you + prefer the ErrorId, this function will fetch it. + */ + int ErrorId() const { return errorId; } + + /** Returns the location (if known) of the error. The first column is column 1, + and the first row is row 1. A value of 0 means the row and column wasn't applicable + (memory errors, for example, have no row/column) or the parser lost the error. (An + error in the error reporting, in that case.) + + @sa SetTabSize, Row, Column + */ + int ErrorRow() const { return errorLocation.row+1; } + int ErrorCol() const { return errorLocation.col+1; } ///< The column where the error occured. See ErrorRow() + + /** SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol()) + to report the correct values for row and column. It does not change the output + or input in any way. + + By calling this method, with a tab size + greater than 0, the row and column of each node and attribute is stored + when the file is loaded. Very useful for tracking the DOM back in to + the source file. + + The tab size is required for calculating the location of nodes. If not + set, the default of 4 is used. The tabsize is set per document. Setting + the tabsize to 0 disables row/column tracking. + + Note that row and column tracking is not supported when using operator>>. + + The tab size needs to be enabled before the parse or load. Correct usage: + @verbatim + TiXmlDocument doc; + doc.SetTabSize( 8 ); + doc.Load( "myfile.xml" ); + @endverbatim + + @sa Row, Column + */ + void SetTabSize( int _tabsize ) { tabsize = _tabsize; } + + int TabSize() const { return tabsize; } + + /** If you have handled the error, it can be reset with this call. The error + state is automatically cleared if you Parse a new XML block. + */ + void ClearError() { error = false; + errorId = 0; + errorDesc = ""; + errorLocation.row = errorLocation.col = 0; + //errorLocation.last = 0; + } + + /** Write the document to standard out using formatted printing ("pretty print"). */ + void Print() const { Print( stdout, 0 ); } + + /* Write the document to a string using formatted printing ("pretty print"). This + will allocate a character array (new char[]) and return it as a pointer. The + calling code pust call delete[] on the return char* to avoid a memory leak. + */ + //char* PrintToMemory() const; + + /// Print this Document to a FILE stream. + virtual void Print( FILE* cfile, int depth = 0 ) const; + // [internal use] + void SetError( int err, const char* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding ); + + virtual const TiXmlDocument* ToDocument() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlDocument* ToDocument() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* content ) const; + +protected : + // [internal use] + virtual TiXmlNode* Clone() const; + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + +private: + void CopyTo( TiXmlDocument* target ) const; + + bool error; + int errorId; + TIXML_STRING errorDesc; + int tabsize; + TiXmlCursor errorLocation; + bool useMicrosoftBOM; // the UTF-8 BOM were found when read. Note this, and try to write. +}; + + +/** + A TiXmlHandle is a class that wraps a node pointer with null checks; this is + an incredibly useful thing. Note that TiXmlHandle is not part of the TinyXml + DOM structure. It is a separate utility class. + + Take an example: + @verbatim + + + + + + + @endverbatim + + Assuming you want the value of "attributeB" in the 2nd "Child" element, it's very + easy to write a *lot* of code that looks like: + + @verbatim + TiXmlElement* root = document.FirstChildElement( "Document" ); + if ( root ) + { + TiXmlElement* element = root->FirstChildElement( "Element" ); + if ( element ) + { + TiXmlElement* child = element->FirstChildElement( "Child" ); + if ( child ) + { + TiXmlElement* child2 = child->NextSiblingElement( "Child" ); + if ( child2 ) + { + // Finally do something useful. + @endverbatim + + And that doesn't even cover "else" cases. TiXmlHandle addresses the verbosity + of such code. A TiXmlHandle checks for null pointers so it is perfectly safe + and correct to use: + + @verbatim + TiXmlHandle docHandle( &document ); + TiXmlElement* child2 = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", 1 ).ToElement(); + if ( child2 ) + { + // do something useful + @endverbatim + + Which is MUCH more concise and useful. + + It is also safe to copy handles - internally they are nothing more than node pointers. + @verbatim + TiXmlHandle handleCopy = handle; + @endverbatim + + What they should not be used for is iteration: + + @verbatim + int i=0; + while ( true ) + { + TiXmlElement* child = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", i ).ToElement(); + if ( !child ) + break; + // do something + ++i; + } + @endverbatim + + It seems reasonable, but it is in fact two embedded while loops. The Child method is + a linear walk to find the element, so this code would iterate much more than it needs + to. Instead, prefer: + + @verbatim + TiXmlElement* child = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).FirstChild( "Child" ).ToElement(); + + for( child; child; child=child->NextSiblingElement() ) + { + // do something + } + @endverbatim +*/ +class TiXmlHandle +{ +public: + /// Create a handle from any node (at any depth of the tree.) This can be a null pointer. + TiXmlHandle( TiXmlNode* _node ) { this->node = _node; } + /// Copy constructor + TiXmlHandle( const TiXmlHandle& ref ) { this->node = ref.node; } + TiXmlHandle operator=( const TiXmlHandle& ref ) { if ( &ref != this ) this->node = ref.node; return *this; } + + /// Return a handle to the first child node. + TiXmlHandle FirstChild() const; + /// Return a handle to the first child node with the given name. + TiXmlHandle FirstChild( const char * value ) const; + /// Return a handle to the first child element. + TiXmlHandle FirstChildElement() const; + /// Return a handle to the first child element with the given name. + TiXmlHandle FirstChildElement( const char * value ) const; + + /** Return a handle to the "index" child with the given name. + The first child is 0, the second 1, etc. + */ + TiXmlHandle Child( const char* value, int index ) const; + /** Return a handle to the "index" child. + The first child is 0, the second 1, etc. + */ + TiXmlHandle Child( int index ) const; + /** Return a handle to the "index" child element with the given name. + The first child element is 0, the second 1, etc. Note that only TiXmlElements + are indexed: other types are not counted. + */ + TiXmlHandle ChildElement( const char* value, int index ) const; + /** Return a handle to the "index" child element. + The first child element is 0, the second 1, etc. Note that only TiXmlElements + are indexed: other types are not counted. + */ + TiXmlHandle ChildElement( int index ) const; + + #ifdef TIXML_USE_STL + TiXmlHandle FirstChild( const std::string& _value ) const { return FirstChild( _value.c_str() ); } + TiXmlHandle FirstChildElement( const std::string& _value ) const { return FirstChildElement( _value.c_str() ); } + + TiXmlHandle Child( const std::string& _value, int index ) const { return Child( _value.c_str(), index ); } + TiXmlHandle ChildElement( const std::string& _value, int index ) const { return ChildElement( _value.c_str(), index ); } + #endif + + /** Return the handle as a TiXmlNode. This may return null. + */ + TiXmlNode* ToNode() const { return node; } + /** Return the handle as a TiXmlElement. This may return null. + */ + TiXmlElement* ToElement() const { return ( ( node && node->ToElement() ) ? node->ToElement() : 0 ); } + /** Return the handle as a TiXmlText. This may return null. + */ + TiXmlText* ToText() const { return ( ( node && node->ToText() ) ? node->ToText() : 0 ); } + /** Return the handle as a TiXmlUnknown. This may return null. + */ + TiXmlUnknown* ToUnknown() const { return ( ( node && node->ToUnknown() ) ? node->ToUnknown() : 0 ); } + + /** @deprecated use ToNode. + Return the handle as a TiXmlNode. This may return null. + */ + TiXmlNode* Node() const { return ToNode(); } + /** @deprecated use ToElement. + Return the handle as a TiXmlElement. This may return null. + */ + TiXmlElement* Element() const { return ToElement(); } + /** @deprecated use ToText() + Return the handle as a TiXmlText. This may return null. + */ + TiXmlText* Text() const { return ToText(); } + /** @deprecated use ToUnknown() + Return the handle as a TiXmlUnknown. This may return null. + */ + TiXmlUnknown* Unknown() const { return ToUnknown(); } + +private: + TiXmlNode* node; +}; + + +/** Print to memory functionality. The TiXmlPrinter is useful when you need to: + + -# Print to memory (especially in non-STL mode) + -# Control formatting (line endings, etc.) + + When constructed, the TiXmlPrinter is in its default "pretty printing" mode. + Before calling Accept() you can call methods to control the printing + of the XML document. After TiXmlNode::Accept() is called, the printed document can + be accessed via the CStr(), Str(), and Size() methods. + + TiXmlPrinter uses the Visitor API. + @verbatim + TiXmlPrinter printer; + printer.SetIndent( "\t" ); + + doc.Accept( &printer ); + fprintf( stdout, "%s", printer.CStr() ); + @endverbatim +*/ +class TiXmlPrinter : public TiXmlVisitor +{ +public: + TiXmlPrinter() : depth( 0 ), simpleTextPrint( false ), + buffer(), indent( " " ), lineBreak( "\n" ) {} + + virtual bool VisitEnter( const TiXmlDocument& doc ); + virtual bool VisitExit( const TiXmlDocument& doc ); + + virtual bool VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute ); + virtual bool VisitExit( const TiXmlElement& element ); + + virtual bool Visit( const TiXmlDeclaration& declaration ); + virtual bool Visit( const TiXmlText& text ); + virtual bool Visit( const TiXmlComment& comment ); + virtual bool Visit( const TiXmlUnknown& unknown ); + + /** Set the indent characters for printing. By default 4 spaces + but tab (\t) is also useful, or null/empty string for no indentation. + */ + void SetIndent( const char* _indent ) { indent = _indent ? _indent : "" ; } + /// Query the indention string. + const char* Indent() { return indent.c_str(); } + /** Set the line breaking string. By default set to newline (\n). + Some operating systems prefer other characters, or can be + set to the null/empty string for no indenation. + */ + void SetLineBreak( const char* _lineBreak ) { lineBreak = _lineBreak ? _lineBreak : ""; } + /// Query the current line breaking string. + const char* LineBreak() { return lineBreak.c_str(); } + + /** Switch over to "stream printing" which is the most dense formatting without + linebreaks. Common when the XML is needed for network transmission. + */ + void SetStreamPrinting() { indent = ""; + lineBreak = ""; + } + /// Return the result. + const char* CStr() { return buffer.c_str(); } + /// Return the length of the result string. + size_t Size() { return buffer.size(); } + + #ifdef TIXML_USE_STL + /// Return the result. + const std::string& Str() { return buffer; } + #endif + +private: + void DoIndent() { + for( int i=0; i +#include + +#include "tinyxml.h" + +//#define DEBUG_PARSER +#if defined( DEBUG_PARSER ) +# if defined( DEBUG ) && defined( _MSC_VER ) +# include +# define TIXML_LOG OutputDebugString +# else +# define TIXML_LOG printf +# endif +#endif + +// Note tha "PutString" hardcodes the same list. This +// is less flexible than it appears. Changing the entries +// or order will break putstring. +TiXmlBase::Entity TiXmlBase::entity[ TiXmlBase::NUM_ENTITY ] = +{ + { "&", 5, '&' }, + { "<", 4, '<' }, + { ">", 4, '>' }, + { """, 6, '\"' }, + { "'", 6, '\'' } +}; + +// Bunch of unicode info at: +// http://www.unicode.org/faq/utf_bom.html +// Including the basic of this table, which determines the #bytes in the +// sequence from the lead byte. 1 placed for invalid sequences -- +// although the result will be junk, pass it through as much as possible. +// Beware of the non-characters in UTF-8: +// ef bb bf (Microsoft "lead bytes") +// ef bf be +// ef bf bf + +const unsigned char TIXML_UTF_LEAD_0 = 0xefU; +const unsigned char TIXML_UTF_LEAD_1 = 0xbbU; +const unsigned char TIXML_UTF_LEAD_2 = 0xbfU; + +const int TiXmlBase::utf8ByteTable[256] = +{ + // 0 1 2 3 4 5 6 7 8 9 a b c d e f + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x00 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x10 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x20 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x30 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x40 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x50 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x60 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x70 End of ASCII range + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x80 0x80 to 0xc1 invalid + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x90 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xa0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xb0 + 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xc0 0xc2 to 0xdf 2 byte + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xd0 + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 0xe0 0xe0 to 0xef 3 byte + 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // 0xf0 0xf0 to 0xf4 4 byte, 0xf5 and higher invalid +}; + + +void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length ) +{ + const unsigned long BYTE_MASK = 0xBF; + const unsigned long BYTE_MARK = 0x80; + const unsigned long FIRST_BYTE_MARK[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; + + if (input < 0x80) + *length = 1; + else if ( input < 0x800 ) + *length = 2; + else if ( input < 0x10000 ) + *length = 3; + else if ( input < 0x200000 ) + *length = 4; + else + { *length = 0; return; } // This code won't covert this correctly anyway. + + output += *length; + + // Scary scary fall throughs. + switch (*length) + { + case 4: + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); + input >>= 6; + case 3: + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); + input >>= 6; + case 2: + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); + input >>= 6; + case 1: + --output; + *output = (char)(input | FIRST_BYTE_MARK[*length]); + } +} + + +/*static*/ int TiXmlBase::IsAlpha( unsigned char anyByte, TiXmlEncoding /*encoding*/ ) +{ + // This will only work for low-ascii, everything else is assumed to be a valid + // letter. I'm not sure this is the best approach, but it is quite tricky trying + // to figure out alhabetical vs. not across encoding. So take a very + // conservative approach. + +// if ( encoding == TIXML_ENCODING_UTF8 ) +// { + if ( anyByte < 127 ) + return isalpha( anyByte ); + else + return 1; // What else to do? The unicode set is huge...get the english ones right. +// } +// else +// { +// return isalpha( anyByte ); +// } +} + + +/*static*/ int TiXmlBase::IsAlphaNum( unsigned char anyByte, TiXmlEncoding /*encoding*/ ) +{ + // This will only work for low-ascii, everything else is assumed to be a valid + // letter. I'm not sure this is the best approach, but it is quite tricky trying + // to figure out alhabetical vs. not across encoding. So take a very + // conservative approach. + +// if ( encoding == TIXML_ENCODING_UTF8 ) +// { + if ( anyByte < 127 ) + return isalnum( anyByte ); + else + return 1; // What else to do? The unicode set is huge...get the english ones right. +// } +// else +// { +// return isalnum( anyByte ); +// } +} + + +class TiXmlParsingData +{ + friend class TiXmlDocument; + public: + void Stamp( const char* now, TiXmlEncoding encoding ); + + const TiXmlCursor& Cursor() const { return cursor; } + + private: + // Only used by the document! + TiXmlParsingData( const char* start, int _tabsize, int row, int col ) + { + assert( start ); + stamp = start; + tabsize = _tabsize; + cursor.row = row; + cursor.col = col; + } + + TiXmlCursor cursor; + const char* stamp; + int tabsize; +}; + + +void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding ) +{ + assert( now ); + + // Do nothing if the tabsize is 0. + if ( tabsize < 1 ) + { + return; + } + + // Get the current row, column. + int row = cursor.row; + int col = cursor.col; + const char* p = stamp; + assert( p ); + + while ( p < now ) + { + // Treat p as unsigned, so we have a happy compiler. + const unsigned char* pU = (const unsigned char*)p; + + // Code contributed by Fletcher Dunn: (modified by lee) + switch (*pU) { + case 0: + // We *should* never get here, but in case we do, don't + // advance past the terminating null character, ever + return; + + case '\r': + // bump down to the next line + ++row; + col = 0; + // Eat the character + ++p; + + // Check for \r\n sequence, and treat this as a single character + if (*p == '\n') { + ++p; + } + break; + + case '\n': + // bump down to the next line + ++row; + col = 0; + + // Eat the character + ++p; + + // Check for \n\r sequence, and treat this as a single + // character. (Yes, this bizarre thing does occur still + // on some arcane platforms...) + if (*p == '\r') { + ++p; + } + break; + + case '\t': + // Eat the character + ++p; + + // Skip to next tab stop + col = (col / tabsize + 1) * tabsize; + break; + + case TIXML_UTF_LEAD_0: + if ( encoding == TIXML_ENCODING_UTF8 ) + { + if ( *(p+1) && *(p+2) ) + { + // In these cases, don't advance the column. These are + // 0-width spaces. + if ( *(pU+1)==TIXML_UTF_LEAD_1 && *(pU+2)==TIXML_UTF_LEAD_2 ) + p += 3; + else if ( *(pU+1)==0xbfU && *(pU+2)==0xbeU ) + p += 3; + else if ( *(pU+1)==0xbfU && *(pU+2)==0xbfU ) + p += 3; + else + { p +=3; ++col; } // A normal character. + } + } + else + { + ++p; + ++col; + } + break; + + default: + if ( encoding == TIXML_ENCODING_UTF8 ) + { + // Eat the 1 to 4 byte utf8 character. + int step = TiXmlBase::utf8ByteTable[*((const unsigned char*)p)]; + if ( step == 0 ) + step = 1; // Error case from bad encoding, but handle gracefully. + p += step; + + // Just advance one column, of course. + ++col; + } + else + { + ++p; + ++col; + } + break; + } + } + cursor.row = row; + cursor.col = col; + assert( cursor.row >= -1 ); + assert( cursor.col >= -1 ); + stamp = p; + assert( stamp ); +} + + +const char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding ) +{ + if ( !p || !*p ) + { + return 0; + } + if ( encoding == TIXML_ENCODING_UTF8 ) + { + while ( *p ) + { + const unsigned char* pU = (const unsigned char*)p; + + // Skip the stupid Microsoft UTF-8 Byte order marks + if ( *(pU+0)==TIXML_UTF_LEAD_0 + && *(pU+1)==TIXML_UTF_LEAD_1 + && *(pU+2)==TIXML_UTF_LEAD_2 ) + { + p += 3; + continue; + } + else if(*(pU+0)==TIXML_UTF_LEAD_0 + && *(pU+1)==0xbfU + && *(pU+2)==0xbeU ) + { + p += 3; + continue; + } + else if(*(pU+0)==TIXML_UTF_LEAD_0 + && *(pU+1)==0xbfU + && *(pU+2)==0xbfU ) + { + p += 3; + continue; + } + + if ( IsWhiteSpace( *p ) ) // Still using old rules for white space. + ++p; + else + break; + } + } + else + { + while ( *p && IsWhiteSpace( *p ) ) + ++p; + } + + return p; +} + +#ifdef TIXML_USE_STL +/*static*/ bool TiXmlBase::StreamWhiteSpace( std::istream * in, TIXML_STRING * tag ) +{ + for( ;; ) + { + if ( !in->good() ) return false; + + int c = in->peek(); + // At this scope, we can't get to a document. So fail silently. + if ( !IsWhiteSpace( c ) || c <= 0 ) + return true; + + *tag += (char) in->get(); + } +} + +/*static*/ bool TiXmlBase::StreamTo( std::istream * in, int character, TIXML_STRING * tag ) +{ + //assert( character > 0 && character < 128 ); // else it won't work in utf-8 + while ( in->good() ) + { + int c = in->peek(); + if ( c == character ) + return true; + if ( c <= 0 ) // Silent failure: can't get document at this scope + return false; + + in->get(); + *tag += (char) c; + } + return false; +} +#endif + +// One of TinyXML's more performance demanding functions. Try to keep the memory overhead down. The +// "assign" optimization removes over 10% of the execution time. +// +const char* TiXmlBase::ReadName( const char* p, TIXML_STRING * name, TiXmlEncoding encoding ) +{ + // Oddly, not supported on some comilers, + //name->clear(); + // So use this: + *name = ""; + assert( p ); + + // Names start with letters or underscores. + // Of course, in unicode, tinyxml has no idea what a letter *is*. The + // algorithm is generous. + // + // After that, they can be letters, underscores, numbers, + // hyphens, or colons. (Colons are valid ony for namespaces, + // but tinyxml can't tell namespaces from names.) + if ( p && *p + && ( IsAlpha( (unsigned char) *p, encoding ) || *p == '_' ) ) + { + const char* start = p; + while( p && *p + && ( IsAlphaNum( (unsigned char ) *p, encoding ) + || *p == '_' + || *p == '-' + || *p == '.' + || *p == ':' ) ) + { + //(*name) += *p; // expensive + ++p; + } + if ( p-start > 0 ) { + name->assign( start, p-start ); + } + return p; + } + return 0; +} + +const char* TiXmlBase::GetEntity( const char* p, char* value, int* length, TiXmlEncoding encoding ) +{ + // Presume an entity, and pull it out. + TIXML_STRING ent; + int i; + *length = 0; + + if ( *(p+1) && *(p+1) == '#' && *(p+2) ) + { + unsigned long ucs = 0; + ptrdiff_t delta = 0; + unsigned mult = 1; + + if ( *(p+2) == 'x' ) + { + // Hexadecimal. + if ( !*(p+3) ) return 0; + + const char* q = p+3; + q = strchr( q, ';' ); + + if ( !q || !*q ) return 0; + + delta = q-p; + --q; + + while ( *q != 'x' ) + { + if ( *q >= '0' && *q <= '9' ) + ucs += mult * (*q - '0'); + else if ( *q >= 'a' && *q <= 'f' ) + ucs += mult * (*q - 'a' + 10); + else if ( *q >= 'A' && *q <= 'F' ) + ucs += mult * (*q - 'A' + 10 ); + else + return 0; + mult *= 16; + --q; + } + } + else + { + // Decimal. + if ( !*(p+2) ) return 0; + + const char* q = p+2; + q = strchr( q, ';' ); + + if ( !q || !*q ) return 0; + + delta = q-p; + --q; + + while ( *q != '#' ) + { + if ( *q >= '0' && *q <= '9' ) + ucs += mult * (*q - '0'); + else + return 0; + mult *= 10; + --q; + } + } + if ( encoding == TIXML_ENCODING_UTF8 ) + { + // convert the UCS to UTF-8 + ConvertUTF32ToUTF8( ucs, value, length ); + } + else + { + *value = (char)ucs; + *length = 1; + } + return p + delta + 1; + } + + // Now try to match it. + for( i=0; iappend( cArr, len ); + } + } + else + { + bool whitespace = false; + + // Remove leading white space: + p = SkipWhiteSpace( p, encoding ); + while ( p && *p + && !StringEqual( p, endTag, caseInsensitive, encoding ) ) + { + if ( *p == '\r' || *p == '\n' ) + { + whitespace = true; + ++p; + } + else if ( IsWhiteSpace( *p ) ) + { + whitespace = true; + ++p; + } + else + { + // If we've found whitespace, add it before the + // new character. Any whitespace just becomes a space. + if ( whitespace ) + { + (*text) += ' '; + whitespace = false; + } + int len; + char cArr[4] = { 0, 0, 0, 0 }; + p = GetChar( p, cArr, &len, encoding ); + if ( len == 1 ) + (*text) += cArr[0]; // more efficient + else + text->append( cArr, len ); + } + } + } + if ( p && *p ) + p += strlen( endTag ); + return ( p && *p ) ? p : 0; +} + +#ifdef TIXML_USE_STL + +void TiXmlDocument::StreamIn( std::istream * in, TIXML_STRING * tag ) +{ + // The basic issue with a document is that we don't know what we're + // streaming. Read something presumed to be a tag (and hope), then + // identify it, and call the appropriate stream method on the tag. + // + // This "pre-streaming" will never read the closing ">" so the + // sub-tag can orient itself. + + if ( !StreamTo( in, '<', tag ) ) + { + SetError( TIXML_ERROR_PARSING_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return; + } + + while ( in->good() ) + { + int tagIndex = (int) tag->length(); + while ( in->good() && in->peek() != '>' ) + { + int c = in->get(); + if ( c <= 0 ) + { + SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); + break; + } + (*tag) += (char) c; + } + + if ( in->good() ) + { + // We now have something we presume to be a node of + // some sort. Identify it, and call the node to + // continue streaming. + TiXmlNode* node = Identify( tag->c_str() + tagIndex, TIXML_DEFAULT_ENCODING ); + + if ( node ) + { + node->StreamIn( in, tag ); + bool isElement = node->ToElement() != 0; + delete node; + node = 0; + + // If this is the root element, we're done. Parsing will be + // done by the >> operator. + if ( isElement ) + { + return; + } + } + else + { + SetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN ); + return; + } + } + } + // We should have returned sooner. + SetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN ); +} + +#endif + +const char* TiXmlDocument::Parse( const char* p, TiXmlParsingData* prevData, TiXmlEncoding encoding ) +{ + ClearError(); + + // Parse away, at the document level. Since a document + // contains nothing but other tags, most of what happens + // here is skipping white space. + if ( !p || !*p ) + { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + // Note that, for a document, this needs to come + // before the while space skip, so that parsing + // starts from the pointer we are given. + location.Clear(); + if ( prevData ) + { + location.row = prevData->cursor.row; + location.col = prevData->cursor.col; + } + else + { + location.row = 0; + location.col = 0; + } + TiXmlParsingData data( p, TabSize(), location.row, location.col ); + location = data.Cursor(); + + if ( encoding == TIXML_ENCODING_UNKNOWN ) + { + // Check for the Microsoft UTF-8 lead bytes. + const unsigned char* pU = (const unsigned char*)p; + if ( *(pU+0) && *(pU+0) == TIXML_UTF_LEAD_0 + && *(pU+1) && *(pU+1) == TIXML_UTF_LEAD_1 + && *(pU+2) && *(pU+2) == TIXML_UTF_LEAD_2 ) + { + encoding = TIXML_ENCODING_UTF8; + useMicrosoftBOM = true; + } + } + + p = SkipWhiteSpace( p, encoding ); + if ( !p ) + { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + while ( p && *p ) + { + TiXmlNode* node = Identify( p, encoding ); + if ( node ) + { + p = node->Parse( p, &data, encoding ); + LinkEndChild( node ); + } + else + { + break; + } + + // Did we get encoding info? + if ( encoding == TIXML_ENCODING_UNKNOWN + && node->ToDeclaration() ) + { + TiXmlDeclaration* dec = node->ToDeclaration(); + const char* enc = dec->Encoding(); + assert( enc ); + + if ( *enc == 0 ) + encoding = TIXML_ENCODING_UTF8; + else if ( StringEqual( enc, "UTF-8", true, TIXML_ENCODING_UNKNOWN ) ) + encoding = TIXML_ENCODING_UTF8; + else if ( StringEqual( enc, "UTF8", true, TIXML_ENCODING_UNKNOWN ) ) + encoding = TIXML_ENCODING_UTF8; // incorrect, but be nice + else + encoding = TIXML_ENCODING_LEGACY; + } + + p = SkipWhiteSpace( p, encoding ); + } + + // Was this empty? + if ( !firstChild ) { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, encoding ); + return 0; + } + + // All is well. + return p; +} + +void TiXmlDocument::SetError( int err, const char* pError, TiXmlParsingData* data, TiXmlEncoding encoding ) +{ + // The first error in a chain is more accurate - don't set again! + if ( error ) + return; + + assert( err > 0 && err < TIXML_ERROR_STRING_COUNT ); + error = true; + errorId = err; + errorDesc = errorString[ errorId ]; + + errorLocation.Clear(); + if ( pError && data ) + { + data->Stamp( pError, encoding ); + errorLocation = data->Cursor(); + } +} + + +TiXmlNode* TiXmlNode::Identify( const char* p, TiXmlEncoding encoding ) +{ + TiXmlNode* returnNode = 0; + + p = SkipWhiteSpace( p, encoding ); + if( !p || !*p || *p != '<' ) + { + return 0; + } + + p = SkipWhiteSpace( p, encoding ); + + if ( !p || !*p ) + { + return 0; + } + + // What is this thing? + // - Elements start with a letter or underscore, but xml is reserved. + // - Comments: "; + + if ( !StringEqual( p, startTag, false, encoding ) ) + { + if ( document ) + document->SetError( TIXML_ERROR_PARSING_COMMENT, p, data, encoding ); + return 0; + } + p += strlen( startTag ); + + // [ 1475201 ] TinyXML parses entities in comments + // Oops - ReadText doesn't work, because we don't want to parse the entities. + // p = ReadText( p, &value, false, endTag, false, encoding ); + // + // from the XML spec: + /* + [Definition: Comments may appear anywhere in a document outside other markup; in addition, + they may appear within the document type declaration at places allowed by the grammar. + They are not part of the document's character data; an XML processor MAY, but need not, + make it possible for an application to retrieve the text of comments. For compatibility, + the string "--" (double-hyphen) MUST NOT occur within comments.] Parameter entity + references MUST NOT be recognized within comments. + + An example of a comment: + + + */ + + value = ""; + // Keep all the white space. + while ( p && *p && !StringEqual( p, endTag, false, encoding ) ) + { + value.append( p, 1 ); + ++p; + } + if ( p && *p ) + p += strlen( endTag ); + + return p; +} + + +const char* TiXmlAttribute::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) +{ + p = SkipWhiteSpace( p, encoding ); + if ( !p || !*p ) return 0; + + if ( data ) + { + data->Stamp( p, encoding ); + location = data->Cursor(); + } + // Read the name, the '=' and the value. + const char* pErr = p; + p = ReadName( p, &name, encoding ); + if ( !p || !*p ) + { + if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, pErr, data, encoding ); + return 0; + } + p = SkipWhiteSpace( p, encoding ); + if ( !p || !*p || *p != '=' ) + { + if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); + return 0; + } + + ++p; // skip '=' + p = SkipWhiteSpace( p, encoding ); + if ( !p || !*p ) + { + if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); + return 0; + } + + const char* end; + const char SINGLE_QUOTE = '\''; + const char DOUBLE_QUOTE = '\"'; + + if ( *p == SINGLE_QUOTE ) + { + ++p; + end = "\'"; // single quote in string + p = ReadText( p, &value, false, end, false, encoding ); + } + else if ( *p == DOUBLE_QUOTE ) + { + ++p; + end = "\""; // double quote in string + p = ReadText( p, &value, false, end, false, encoding ); + } + else + { + // All attribute values should be in single or double quotes. + // But this is such a common error that the parser will try + // its best, even without them. + value = ""; + while ( p && *p // existence + && !IsWhiteSpace( *p ) // whitespace + && *p != '/' && *p != '>' ) // tag end + { + if ( *p == SINGLE_QUOTE || *p == DOUBLE_QUOTE ) { + // [ 1451649 ] Attribute values with trailing quotes not handled correctly + // We did not have an opening quote but seem to have a + // closing one. Give up and throw an error. + if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); + return 0; + } + value += *p; + ++p; + } + } + return p; +} + +#ifdef TIXML_USE_STL +void TiXmlText::StreamIn( std::istream * in, TIXML_STRING * tag ) +{ + while ( in->good() ) + { + int c = in->peek(); + if ( !cdata && (c == '<' ) ) + { + return; + } + if ( c <= 0 ) + { + TiXmlDocument* document = GetDocument(); + if ( document ) + document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); + return; + } + + (*tag) += (char) c; + in->get(); // "commits" the peek made above + + if ( cdata && c == '>' && tag->size() >= 3 ) { + size_t len = tag->size(); + if ( (*tag)[len-2] == ']' && (*tag)[len-3] == ']' ) { + // terminator of cdata. + return; + } + } + } +} +#endif + +const char* TiXmlText::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) +{ + value = ""; + TiXmlDocument* document = GetDocument(); + + if ( data ) + { + data->Stamp( p, encoding ); + location = data->Cursor(); + } + + const char* const startTag = ""; + + if ( cdata || StringEqual( p, startTag, false, encoding ) ) + { + cdata = true; + + if ( !StringEqual( p, startTag, false, encoding ) ) + { + if ( document ) + document->SetError( TIXML_ERROR_PARSING_CDATA, p, data, encoding ); + return 0; + } + p += strlen( startTag ); + + // Keep all the white space, ignore the encoding, etc. + while ( p && *p + && !StringEqual( p, endTag, false, encoding ) + ) + { + value += *p; + ++p; + } + + TIXML_STRING dummy; + p = ReadText( p, &dummy, false, endTag, false, encoding ); + return p; + } + else + { + bool ignoreWhite = true; + + const char* end = "<"; + p = ReadText( p, &value, ignoreWhite, end, false, encoding ); + if ( p && *p ) + return p-1; // don't truncate the '<' + return 0; + } +} + +#ifdef TIXML_USE_STL +void TiXmlDeclaration::StreamIn( std::istream * in, TIXML_STRING * tag ) +{ + while ( in->good() ) + { + int c = in->get(); + if ( c <= 0 ) + { + TiXmlDocument* document = GetDocument(); + if ( document ) + document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); + return; + } + (*tag) += (char) c; + + if ( c == '>' ) + { + // All is well. + return; + } + } +} +#endif + +const char* TiXmlDeclaration::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding _encoding ) +{ + p = SkipWhiteSpace( p, _encoding ); + // Find the beginning, find the end, and look for + // the stuff in-between. + TiXmlDocument* document = GetDocument(); + if ( !p || !*p || !StringEqual( p, "SetError( TIXML_ERROR_PARSING_DECLARATION, 0, 0, _encoding ); + return 0; + } + if ( data ) + { + data->Stamp( p, _encoding ); + location = data->Cursor(); + } + p += 5; + + version = ""; + encoding = ""; + standalone = ""; + + while ( p && *p ) + { + if ( *p == '>' ) + { + ++p; + return p; + } + + p = SkipWhiteSpace( p, _encoding ); + if ( StringEqual( p, "version", true, _encoding ) ) + { + TiXmlAttribute attrib; + p = attrib.Parse( p, data, _encoding ); + version = attrib.Value(); + } + else if ( StringEqual( p, "encoding", true, _encoding ) ) + { + TiXmlAttribute attrib; + p = attrib.Parse( p, data, _encoding ); + encoding = attrib.Value(); + } + else if ( StringEqual( p, "standalone", true, _encoding ) ) + { + TiXmlAttribute attrib; + p = attrib.Parse( p, data, _encoding ); + standalone = attrib.Value(); + } + else + { + // Read over whatever it is. + while( p && *p && *p != '>' && !IsWhiteSpace( *p ) ) + ++p; + } + } + return 0; +} + +bool TiXmlText::Blank() const +{ + for ( unsigned i=0; i