From 42479e51dc9a0cd3da7203abd81b48fe7baca9c7 Mon Sep 17 00:00:00 2001 From: Peter Morgan Date: Tue, 5 Oct 2010 02:31:29 +0100 Subject: [PATCH] Tidy up createtable dialog --- sqlitebrowser/sqlitebrowser/createtableform.h | 117 +++++++++++------- sqlitebrowser/sqlitebrowser/icons/accept.png | Bin 0 -> 781 bytes sqlitebrowser/sqlitebrowser/icons/add.png | Bin 0 -> 733 bytes .../sqlitebrowser/icons/bullet_black.png | Bin 0 -> 211 bytes sqlitebrowser/sqlitebrowser/icons/icons.qrc | 6 + .../sqlitebrowser/icons/page_add.png | Bin 0 -> 739 bytes .../sqlitebrowser/icons/page_delete.png | Bin 0 -> 740 bytes .../sqlitebrowser/icons/page_edit.png | Bin 0 -> 807 bytes 8 files changed, 76 insertions(+), 47 deletions(-) create mode 100755 sqlitebrowser/sqlitebrowser/icons/accept.png create mode 100755 sqlitebrowser/sqlitebrowser/icons/add.png create mode 100755 sqlitebrowser/sqlitebrowser/icons/bullet_black.png create mode 100755 sqlitebrowser/sqlitebrowser/icons/page_add.png create mode 100755 sqlitebrowser/sqlitebrowser/icons/page_delete.png create mode 100755 sqlitebrowser/sqlitebrowser/icons/page_edit.png diff --git a/sqlitebrowser/sqlitebrowser/createtableform.h b/sqlitebrowser/sqlitebrowser/createtableform.h index aaac8f11..efd80af7 100644 --- a/sqlitebrowser/sqlitebrowser/createtableform.h +++ b/sqlitebrowser/sqlitebrowser/createtableform.h @@ -12,7 +12,7 @@ #define QT_END_NAMESPACE #endif -#include +#include #include #include #include @@ -36,58 +36,76 @@ class Ui_createTableForm { public: QVBoxLayout *vboxLayout; - QHBoxLayout *hboxLayout; + + QHBoxLayout *topTableLayout; + + QGroupBox *groupBox1; + QVBoxLayout *groupBoxLayout; QLabel *textLabel1; QLineEdit *tablenameLineEdit; - Q3GroupBox *groupBox1; + QVBoxLayout *vboxLayout1; Q3ListView *fieldListView; - QHBoxLayout *hboxLayout1; + QSpacerItem *spacer4; + + QHBoxLayout *fieldActionsButtonLayout; QPushButton *buttonAddField; QPushButton *buttonDeleteField; + QHBoxLayout *hboxLayout2; QSpacerItem *spacer6; + QHBoxLayout *bottomButtonLayout; QPushButton *buttonCreate; QPushButton *buttonCancel; void setupUi(QDialog *createTableForm) { - if (createTableForm->objectName().isEmpty()) + if (createTableForm->objectName().isEmpty()){ createTableForm->setObjectName(QString::fromUtf8("createTableForm")); + } + createTableForm->setWindowIcon(QIcon(":/icons/db_new")); + createTableForm->resize(309, 320); + + //** Main Layout vboxLayout = new QVBoxLayout(createTableForm); vboxLayout->setSpacing(6); vboxLayout->setContentsMargins(11, 11, 11, 11); vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); - hboxLayout = new QHBoxLayout(); - hboxLayout->setSpacing(6); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + + //**** Top Table Box **** + topTableLayout = new QHBoxLayout(); + topTableLayout->setSpacing(6); + //topTableLayout->setObjectName(QString::fromUtf8("hboxLayout")); textLabel1 = new QLabel(createTableForm); - textLabel1->setObjectName(QString::fromUtf8("textLabel1")); + //textLabel1->setObjectName(QString::fromUtf8("textLabel1")); textLabel1->setWordWrap(false); - hboxLayout->addWidget(textLabel1); + topTableLayout->addWidget(textLabel1); tablenameLineEdit = new QLineEdit(createTableForm); - tablenameLineEdit->setObjectName(QString::fromUtf8("tablenameLineEdit")); + //tablenameLineEdit->setObjectName(QString::fromUtf8("tablenameLineEdit")); - hboxLayout->addWidget(tablenameLineEdit); + topTableLayout->addWidget(tablenameLineEdit); - vboxLayout->addLayout(hboxLayout); + vboxLayout->addLayout(topTableLayout); - groupBox1 = new Q3GroupBox(createTableForm); + //**** Fields GroupBox + groupBox1 = new QGroupBox(createTableForm); groupBox1->setObjectName(QString::fromUtf8("groupBox1")); - groupBox1->setColumnLayout(0, Qt::Vertical); - groupBox1->layout()->setSpacing(6); - groupBox1->layout()->setContentsMargins(11, 11, 11, 11); - vboxLayout1 = new QVBoxLayout(); - QBoxLayout *boxlayout = qobject_cast(groupBox1->layout()); - if (boxlayout) - boxlayout->addLayout(vboxLayout1); - vboxLayout1->setAlignment(Qt::AlignTop); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + //groupBox1->setColumnLayout(0, Qt::Vertical); + //groupBox1->layout()->setSpacing(6); + //groupBox1->layout()->setContentsMargins(11, 11, 11, 11); + groupBoxLayout = new QVBoxLayout(); + groupBox1->setLayout(groupBoxLayout); + //QBoxLayout *boxlayout = qobject_cast(groupBox1->layout()); + //if (boxlayout) + // boxlayout->addLayout(vboxLayout1); + //vboxLayout1->setAlignment(Qt::AlignTop); + //vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + fieldListView = new Q3ListView(groupBox1); fieldListView->addColumn(QApplication::translate("createTableForm", "Field name", 0, QApplication::UnicodeUTF8)); fieldListView->header()->setClickEnabled(true, fieldListView->header()->count() - 1); @@ -99,52 +117,57 @@ public: fieldListView->setResizePolicy(Q3ScrollView::Manual); fieldListView->setResizeMode(Q3ListView::AllColumns); - vboxLayout1->addWidget(fieldListView); + groupBoxLayout->addWidget(fieldListView); - hboxLayout1 = new QHBoxLayout(); - hboxLayout1->setSpacing(6); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); - spacer4 = new QSpacerItem(111, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - hboxLayout1->addItem(spacer4); + //** Field Action Buttons Box + fieldActionsButtonLayout = new QHBoxLayout(); + fieldActionsButtonLayout->setSpacing(6); + fieldActionsButtonLayout->setObjectName(QString::fromUtf8("hboxLayout1")); + //spacer4 = new QSpacerItem(111, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + fieldActionsButtonLayout->addStretch(10); // force right + //hboxLayout1->addItem(spacer4); buttonAddField = new QPushButton(groupBox1); buttonAddField->setObjectName(QString::fromUtf8("buttonAddField")); - hboxLayout1->addWidget(buttonAddField); + fieldActionsButtonLayout->addWidget(buttonAddField); buttonDeleteField = new QPushButton(groupBox1); buttonDeleteField->setObjectName(QString::fromUtf8("buttonDeleteField")); buttonDeleteField->setEnabled(false); - hboxLayout1->addWidget(buttonDeleteField); + fieldActionsButtonLayout->addWidget(buttonDeleteField); - vboxLayout1->addLayout(hboxLayout1); + groupBoxLayout->addLayout(fieldActionsButtonLayout); vboxLayout->addWidget(groupBox1); - hboxLayout2 = new QHBoxLayout(); - hboxLayout2->setSpacing(6); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); - spacer6 = new QSpacerItem(91, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - hboxLayout2->addItem(spacer6); - - buttonCreate = new QPushButton(createTableForm); - buttonCreate->setObjectName(QString::fromUtf8("buttonCreate")); - - hboxLayout2->addWidget(buttonCreate); + //*************************************** + //*** Bottom Dialog action Buttons + bottomButtonLayout = new QHBoxLayout(); + bottomButtonLayout->setSpacing(6); + //bottomButtonLayout->setObjectName(QString::fromUtf8("hboxLayout2")); + bottomButtonLayout->addStretch(10); // force right + //** Cancel Button buttonCancel = new QPushButton(createTableForm); - buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); - buttonCancel->setDefault(true); + //buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + buttonCancel->setIcon(QIcon(":/icons/cancel")); + bottomButtonLayout->addWidget(buttonCancel); - hboxLayout2->addWidget(buttonCancel); + //** Create Button + buttonCreate = new QPushButton(createTableForm); + //buttonCreate->setObjectName(QString::fromUtf8("buttonCreate")); + buttonCreate->setIcon(QIcon(":/icons/save")); + bottomButtonLayout->addWidget(buttonCreate); - vboxLayout->addLayout(hboxLayout2); + + + vboxLayout->addLayout(bottomButtonLayout); retranslateUi(createTableForm); diff --git a/sqlitebrowser/sqlitebrowser/icons/accept.png b/sqlitebrowser/sqlitebrowser/icons/accept.png new file mode 100755 index 0000000000000000000000000000000000000000..89c8129a490b329f3165f32fa0781701aab417ea GIT binary patch literal 781 zcmV+o1M>WdP)4-QibtN)VXQDpczE`xXAkUjh%RI>;okxb7K@0kpyQ1k_Y(|Oe7$m(^ zNYX>mI||sUbmn+c3<&FnE=4u#()KBS^SH8e)Qs5i!#lY=$-1gbH6VluzU=m=EP78&5vQ z-?+fFP-G2l&l_QzYealK$;1Rl?FkzXR&Jv@fBPNjCr#AYRyJ7UJQ0v#?)7Ott=>3`#-pV!7>9}>Q1jL)H6h&gkP@3nI=+F3nA~M>u#(n* z8T!#8oEw&-mED4!h4s!N@Jo3S7N&Q6%6l3}nlcd~X@>;uelvPsSkXIgg~e+^T1zSf z3SNj(5%jK~i8@b;C9VHk(~TedF+gQSL8D5xnVSSWAVY>J9b+m>@{iq7_KE}go~11+5s4;8hc+i0Xa zI1j@EX5!S+Me6HNqKzU5YQwL;-W5$p%ZMKMeR<%zp69-~?<4?8|C8S?bklXr4v&Ov zb&06v2|-x?qB`90yn>Qi%Sh2^G4n)$ZdyvTPf9}1)_buUT7>`e2G&2VU@~Bb(o+Mz zi4)>IxlSY${Dj4k={-9RzU^W5g9|2V5RZ2ZulL9s2xQbZ@r6eP9Ra5u(s|C0Nj#&4>wTSkb?%#=9?@ z^oxDy-O@tyN{L@by(WWvQ3%CyEu8x{+#Jb4-h&K9Owi)2pgg+heWDyked|3R$$kL@A z#sp1v-r+=G4B8D6DqsDH0@7OztA7aT9qc1Py{()w`m``?Y0&gi2=ROcc-9+nU^I6< zT=e_Y=vSnG@?3Ue{BW5ONFttcE!R-R_W4O01|0-|K-YNXLo2`4Qv z`r1LxR6#yf3FB%T95gJnaKKivA~Z}S9A(ZxEDK}O3T04USJ P00000NkvXXu0mjf^IS-S literal 0 HcmV?d00001 diff --git a/sqlitebrowser/sqlitebrowser/icons/bullet_black.png b/sqlitebrowser/sqlitebrowser/icons/bullet_black.png new file mode 100755 index 0000000000000000000000000000000000000000..57619706d10d9736b1849a83f2c5694fbe09c53b GIT binary patch literal 211 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^zbpD<_bdI{u9mbgZg z1m~xflqVLYGB~E>C#5QQ<|d}62BjvZR2H60wE-$h^>lFz(Kw&{<9vg>5sw~gS5O!4 zr|{HuUFIBKiQyL}eBJ-L{`UVT|6_O~L{G%N{Wbre{kQtZ_0LvEhtable_edit.png tag_blue_add.png tag_blue_delete.png + page_edit.png + page_delete.png + page_add.png + add.png + accept.png + bullet_black.png diff --git a/sqlitebrowser/sqlitebrowser/icons/page_add.png b/sqlitebrowser/sqlitebrowser/icons/page_add.png new file mode 100755 index 0000000000000000000000000000000000000000..d5bfa0719bc3a2ce4fc529403f0acd6b6057c956 GIT binary patch literal 739 zcmV<90v!E`P)BG67=JY6c|L1R-#TR>fC$3^Y%QEnYO1xHsf)+GU`3F<{J0kR(;pbF3)zyg$H+idfnl-wl5Wkh!vUH z4Z32YP=l_}1rZd1W_D&^$A($A+&a0e&P?xx0!ctY2}*<#p+qPVN*B(YzvAWXa*%bzq z7Fz41LKILT(GWohi9|LgIzSZBhb*Zf6R6O}WYQ4GOi&71s9lmll0x6;8&ILOl$j(c z0Z1T(6Tg09{?wd{moFHNN6PS?$|e>1MxSJ(0Z7o2)J-Zv|>acY@f`(Y@g7GwsEj5NLQo+q|HsxQ5}XSX_d@*^A9ZT9=A{W~j+$GyI1 zc4oqTHx@1FlRjw4XWyPN5i2~l_F3@aBk!0yu^aoRDvXy}8@HCjUVQUsuSH4$T5|r< zzZOn^?Wfa6y|Q($Hx4{ws+)wX6-HP4zo!S?4KJ@7PG@G3G{CjXs(p*kIrj6rHs7_y z+=<-=Q62s9FuWa^X~WKgJIAAZJR&XBB002ovPDHLkV1jCMPILeO literal 0 HcmV?d00001 diff --git a/sqlitebrowser/sqlitebrowser/icons/page_delete.png b/sqlitebrowser/sqlitebrowser/icons/page_delete.png new file mode 100755 index 0000000000000000000000000000000000000000..3141467c678d2b53f79deb22086a9cb3a576a08d GIT binary patch literal 740 zcmVP z|1Ep}yDQG09bP~E^Dk?@JiKQJ z6-pO(3~IOP)IYisL6D6;oAEd;E%zR}{U$rMRNuD6nQV7nesKS>)yLo7JuDCrD>Abi zbj3uW23?^GA}9jQ{M^8v?ejL?HaT7AX5WPZNkBmfN`w-jL?{tT7ykZt$%Yln?p_m~ z-?>&d(LD(jAd}h=LPltPQbO$*Wbyl@G-_k5jXbb#qffHY03>M1jfEqoPJQ6Mr=Byp=^jfzePZV1 zLjCmNi31hdIJHa%e;5g=1(`u3BRzfeExY%=VCu{loOr{`%2hUR*x>tL^W_TTaj);0 zpPR6CUD1+0>4TQ6zVfH3TQ;%l6#(_%yspK@3gcmG#Q4!WCPyLU93nMKk7E2pcA=l45({2jNho>sdF*A~bA zxX?-cp~y_z_kFf+yqu3m#QiB}03?Z&9vvR5TNgj<)($Vm)xq5G>|o2sFMag&6aNF+ WAT1?sQBYt20000iHtsh1EzPArg^Q zIZrOk#rNsfjaSbMAL;<4h;Z=jvu8dzyz8N&Nb7=z03ZUw?9z%8KQEa6yM5=kUnka& z3?FJk2}L7q>na=T#;<7U*P91xfF`;`6%pVgWgRy0?1ZryL@%z52=-!fGXWGEn4M351L4<+7eDgwo|moqXT+s1&Kmn>-uQQ8mL7XY)w5Zk*(g+<3Y3tmkR!bL zOUKaUtj_pX26sH+=Iorwu}MGd`_%O-_sS}8VpG#fJA)Fcs#ezwtZf?q?Ac70mDv`rVs{$od?VPKeqf<-kUjNtS6ecB*mq<&M97K^6IVsDO zt2$Ru!b+>2S<}_H>$RcInusU_8PMNdf(W{sNlJ3FkrwMJPeBPO#d}Y^a{9TH(#{Y) l0D?dWAV4eUJX#h`!2gmISk&ZKd4B)^002ovPDHLkV1g&sd|Lnj literal 0 HcmV?d00001