# # # add_file "src/view/dialogs/KeyManagment.cpp" # content [e6b7fc996f3623f4f9933b7a79c93f76520423cf] # # add_file "src/view/dialogs/KeyManagment.h" # content [266ae02b3462ef2a06e2d0529f1699d2c4767963] # # add_file "src/view/dialogs/ui_KeyManagment.h" # content [e82e9ba78fec73e56da2e9b08b2d64171849f85d] # # patch "guitone.pro" # from [c60746653e4ae27f1fa8a8ae53333cafc1d39c7a] # to [927b7eb455eec3e01d0d4bbd8980298030d5635c] # # patch "src/view/Guitone.cpp" # from [c7c7d81bf31d6ffc59c8c83860598345fac7bd98] # to [bf65255876d788cddad6ebfbb4808291ac52871f] # # patch "src/view/Guitone.h" # from [4343f22a63285af07028a9d734b28662b82116d5] # to [e5db27aa3fa18109257cce092ff3f8b22c7e6ae1] # ============================================================ --- src/view/dialogs/KeyManagment.cpp e6b7fc996f3623f4f9933b7a79c93f76520423cf +++ src/view/dialogs/KeyManagment.cpp e6b7fc996f3623f4f9933b7a79c93f76520423cf @@ -0,0 +1,36 @@ +/*************************************************************************** + * Copyright (C) 2006 by Ingo Maindorfer * + * address@hidden * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include "KeyManagment.h" +#include "../../util/Settings.h" +#include "../../monotone/Monotone.h" + +KeyManagment::KeyManagment(QWidget* parent) + : QDialog(parent) +{ + setupUi(this); +} + +KeyManagment::~KeyManagment() {} + +void KeyManagment::accept() +{ + done(0); +} ============================================================ --- src/view/dialogs/KeyManagment.h 266ae02b3462ef2a06e2d0529f1699d2c4767963 +++ src/view/dialogs/KeyManagment.h 266ae02b3462ef2a06e2d0529f1699d2c4767963 @@ -0,0 +1,38 @@ +/*************************************************************************** + * Copyright (C) 2006 by Ingo Maindorfer * + * address@hidden * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef KEYMANAGMENT_H +#define KEYMANAGMENT_H + +#include "ui_KeyManagment.h" + +class KeyManagment : public QDialog, private Ui::KeyManagment +{ + Q_OBJECT + +public: + KeyManagment(QWidget*); + ~KeyManagment(); + +private slots: + void accept(); +}; + +#endif ============================================================ --- src/view/dialogs/ui_KeyManagment.h e82e9ba78fec73e56da2e9b08b2d64171849f85d +++ src/view/dialogs/ui_KeyManagment.h e82e9ba78fec73e56da2e9b08b2d64171849f85d @@ -0,0 +1,127 @@ +#ifndef UI_KEYMANAGMENT_H +#define UI_KEYMANAGMENT_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class Ui_KeyManagment +{ +public: + QGridLayout *gridLayout; + QTableWidget *tableWidget; + QVBoxLayout *vboxLayout; + QPushButton *pushButtonGenerate; + QPushButton *pushButtonRemove; + QSpacerItem *spacerItem; + QHBoxLayout *hboxLayout; + QSpacerItem *spacerItem1; + QPushButton *okButton; + QPushButton *cancelButton; + + void setupUi(QDialog *KeyManagment) + { + KeyManagment->setObjectName(QString::fromUtf8("KeyManagment")); + KeyManagment->resize(QSize(587, 433).expandedTo(KeyManagment->minimumSizeHint())); + gridLayout = new QGridLayout(KeyManagment); + gridLayout->setSpacing(6); + gridLayout->setMargin(9); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + tableWidget = new QTableWidget(KeyManagment); + tableWidget->setObjectName(QString::fromUtf8("tableWidget")); + + gridLayout->addWidget(tableWidget, 0, 0, 2, 1); + + vboxLayout = new QVBoxLayout(); + vboxLayout->setSpacing(6); + vboxLayout->setMargin(0); + vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + pushButtonGenerate = new QPushButton(KeyManagment); + pushButtonGenerate->setObjectName(QString::fromUtf8("pushButtonGenerate")); + + vboxLayout->addWidget(pushButtonGenerate); + + pushButtonRemove = new QPushButton(KeyManagment); + pushButtonRemove->setObjectName(QString::fromUtf8("pushButtonRemove")); + + vboxLayout->addWidget(pushButtonRemove); + + + gridLayout->addLayout(vboxLayout, 0, 1, 1, 1); + + spacerItem = new QSpacerItem(20, 131, QSizePolicy::Minimum, QSizePolicy::Expanding); + + gridLayout->addItem(spacerItem, 1, 1, 1, 1); + + hboxLayout = new QHBoxLayout(); + hboxLayout->setSpacing(6); + hboxLayout->setMargin(0); + hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + spacerItem1 = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum); + + hboxLayout->addItem(spacerItem1); + + okButton = new QPushButton(KeyManagment); + okButton->setObjectName(QString::fromUtf8("okButton")); + + hboxLayout->addWidget(okButton); + + cancelButton = new QPushButton(KeyManagment); + cancelButton->setObjectName(QString::fromUtf8("cancelButton")); + + hboxLayout->addWidget(cancelButton); + + + gridLayout->addLayout(hboxLayout, 2, 0, 1, 1); + + retranslateUi(KeyManagment); + QObject::connect(okButton, SIGNAL(clicked()), KeyManagment, SLOT(accept())); + QObject::connect(cancelButton, SIGNAL(clicked()), KeyManagment, SLOT(reject())); + + QMetaObject::connectSlotsByName(KeyManagment); + } // setupUi + + void retranslateUi(QDialog *KeyManagment) + { + KeyManagment->setWindowTitle(QApplication::translate("KeyManagment", "Key Managment", 0, QApplication::UnicodeUTF8)); + tableWidget->clear(); + tableWidget->setColumnCount(4); + + QTableWidgetItem *__colItem = new QTableWidgetItem(); + __colItem->setText(QApplication::translate("KeyManagment", "Hash", 0, QApplication::UnicodeUTF8)); + tableWidget->setHorizontalHeaderItem(0, __colItem); + + QTableWidgetItem *__colItem1 = new QTableWidgetItem(); + __colItem1->setText(QApplication::translate("KeyManagment", "Name", 0, QApplication::UnicodeUTF8)); + tableWidget->setHorizontalHeaderItem(1, __colItem1); + + QTableWidgetItem *__colItem2 = new QTableWidgetItem(); + __colItem2->setText(QApplication::translate("KeyManagment", "Pub Loc", 0, QApplication::UnicodeUTF8)); + tableWidget->setHorizontalHeaderItem(2, __colItem2); + + QTableWidgetItem *__colItem3 = new QTableWidgetItem(); + __colItem3->setText(QApplication::translate("KeyManagment", "Priv Loc", 0, QApplication::UnicodeUTF8)); + tableWidget->setHorizontalHeaderItem(3, __colItem3); + tableWidget->setRowCount(0); + pushButtonGenerate->setText(QApplication::translate("KeyManagment", "Generate", 0, QApplication::UnicodeUTF8)); + pushButtonRemove->setText(QApplication::translate("KeyManagment", "Remove", 0, QApplication::UnicodeUTF8)); + okButton->setText(QApplication::translate("KeyManagment", "OK", 0, QApplication::UnicodeUTF8)); + cancelButton->setText(QApplication::translate("KeyManagment", "Cancel", 0, QApplication::UnicodeUTF8)); + Q_UNUSED(KeyManagment); + } // retranslateUi + +}; + +namespace Ui { + class KeyManagment: public Ui_KeyManagment {}; +} // namespace Ui + +#endif // UI_KEYMANAGMENT_H ============================================================ --- guitone.pro c60746653e4ae27f1fa8a8ae53333cafc1d39c7a +++ guitone.pro 927b7eb455eec3e01d0d4bbd8980298030d5635c @@ -6,6 +6,7 @@ HEADERS += src/view/Guitone.h \ src/view/AttributesView.h \ src/view/dialogs/SwitchWorkspaceRevision.h \ src/view/dialogs/Preferences.h \ + src/view/dialogs/KeyManagment.h \ src/monotone/Monotone.h \ src/model/AutomateCommand.h \ src/model/Inventory.h \ @@ -24,6 +25,7 @@ SOURCES += src/view/Guitone.cpp \ src/view/AttributesView.cpp \ src/view/dialogs/SwitchWorkspaceRevision.cpp \ src/view/dialogs/Preferences.cpp \ + src/view/dialogs/KeyManagment.cpp \ src/monotone/Monotone.cpp \ src/model/AutomateCommand.cpp \ src/model/Inventory.cpp \ @@ -37,7 +39,8 @@ FORMS += res/dialogs/switch_workspace. src/util/Settings.cpp \ src/main.cpp FORMS += res/dialogs/switch_workspace.ui \ - res/dialogs/preferences.ui + res/dialogs/preferences.ui \ + res/dialogs/KeyManagment.ui UI_DIR = src/view/dialogs TEMPLATE = app DEPENDPATH += src ============================================================ --- src/view/Guitone.cpp c7c7d81bf31d6ffc59c8c83860598345fac7bd98 +++ src/view/Guitone.cpp bf65255876d788cddad6ebfbb4808291ac52871f @@ -29,6 +29,7 @@ #include "../view/AttributesView.h" #include "../view/dialogs/SwitchWorkspaceRevision.h" #include "../view/dialogs/Preferences.h" +#include "../view/dialogs/KeyManagment.h" #include "../util/Settings.h" Guitone::Guitone() @@ -101,6 +102,22 @@ Guitone::Guitone() Qt::CTRL + Qt::Key_R ); + menu = menuBar()->addMenu(tr("&Key Managment")); + menu->addAction( + tr("&Key Managment"), + this, + SLOT(openKeyManagmentDialog()), + Qt::CTRL + Qt::Key_K + ); + + menu = menuBar()->addMenu(tr("&Help")); + menu->addAction( + tr("About &Qt"), + qApp, + SLOT(aboutQt()) + ); + + // // Main view // @@ -355,3 +372,8 @@ void Guitone::openPreferencesDialog() dialog.exec(); } +void Guitone::openKeyManagmentDialog() +{ + KeyManagment dialog(this); + dialog.exec(); +} ============================================================ --- src/view/Guitone.h 4343f22a63285af07028a9d734b28662b82116d5 +++ src/view/Guitone.h e5db27aa3fa18109257cce092ff3f8b22c7e6ae1 @@ -48,6 +48,7 @@ private slots: void showHideIgnoredFiles(); void openSwitchWorkspaceRevisionDialog(); void openPreferencesDialog(); + void openKeyManagmentDialog(); private: void closeEvent(QCloseEvent *);