damn designer sucks, this program *has* to be a joke.

takes me longer to get nowhere with this program than
it does for me to just write the code. (unfinished though)
maybe the xul editors are actually sanely designed...

svn path=/trunk/kdebase/konqueror/keditbookmarks/; revision=230233
This commit is contained in:
Alexander Kellett 2003-06-07 19:52:21 +00:00
parent f78d8430d4
commit 1e1254b97a
3 changed files with 27 additions and 212 deletions

View file

@ -4,7 +4,7 @@ METASOURCES = AUTO
lib_LTLIBRARIES = keditbookmarks.la
keditbookmarks_la_SOURCES = bookmarkinfo.ui main.cpp listview.cpp toplevel.cpp actionsimpl.cpp commands.cpp importers.cpp dcop.skel dcop.cpp bookmarkiterator.cpp testlink.cpp favicons.cpp updater.cpp search.cpp kbookmarknotifier.stub
keditbookmarks_la_SOURCES = main.cpp listview.cpp toplevel.cpp actionsimpl.cpp commands.cpp importers.cpp dcop.skel dcop.cpp bookmarkiterator.cpp testlink.cpp favicons.cpp updater.cpp search.cpp kbookmarknotifier.stub
kbookmarknotifier_DIR = $(includedir)
keditbookmarks_la_LIBADD = $(top_builddir)/libkonq/libkonq.la
keditbookmarks_la_LDFLAGS = $(all_libraries) -module -avoid-version

View file

@ -1,207 +0,0 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>BookmarkInfoWidget</class>
<widget class="QWidget">
<property name="name">
<cstring>BookmarkInfoWidget</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>480</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>3</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>302</width>
<height>89</height>
</size>
</property>
<property name="caption">
<string>Form1</string>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout2</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>315</width>
<height>100</height>
</rect>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
<property name="text">
<string>&lt;p align="right"&gt;Name&lt;/p&gt;</string>
</property>
</widget>
<widget class="QLineEdit" row="2" column="1">
<property name="name">
<cstring>lineEdit1_3</cstring>
</property>
</widget>
<widget class="QLineEdit" row="1" column="1">
<property name="name">
<cstring>lineEdit1_2</cstring>
</property>
</widget>
<widget class="QLabel" row="0" column="2">
<property name="name">
<cstring>textLabel2</cstring>
</property>
<property name="text">
<string>&lt;p align="right"&gt;Last Modified&lt;/p&gt;</string>
</property>
<property name="alignment">
<set>AlignVCenter</set>
</property>
</widget>
<widget class="QLabel" row="1" column="2">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&lt;p align="right"&gt;Last viewed&lt;/p&gt;</string>
</property>
<property name="alignment">
<set>AlignVCenter</set>
</property>
</widget>
<widget class="KActiveLabel" row="2" column="3">
<property name="name">
<cstring>kActiveLabel1_4</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="KActiveLabel" row="0" column="3">
<property name="name">
<cstring>kActiveLabel1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLabel" row="2" column="0">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
<property name="text">
<string>&lt;p align="right"&gt;Comment&lt;/p&gt;</string>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
<property name="text">
<string>&lt;p align="right"&gt;Address&lt;/p&gt;</string>
</property>
</widget>
<widget class="KActiveLabel" row="1" column="3">
<property name="name">
<cstring>kActiveLabel1_5</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLabel" row="2" column="2">
<property name="name">
<cstring>textLabel2_3</cstring>
</property>
<property name="text">
<string>&lt;p align="right"&gt;Times viewed&lt;/p&gt;</string>
</property>
<property name="alignment">
<set>AlignVCenter</set>
</property>
</widget>
<widget class="QLineEdit" row="0" column="1">
<property name="name">
<cstring>lineEdit1</cstring>
</property>
</widget>
</grid>
</widget>
</widget>
<includes>
<include location="local" impldecl="in implementation">kdialog.h</include>
</includes>
<layoutdefaults spacing="3" margin="6"/>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<includehints>
<includehint>kactivelabel.h</includehint>
<includehint>kactivelabel.h</includehint>
<includehint>kactivelabel.h</includehint>
</includehints>
</UI>

View file

@ -22,6 +22,8 @@
#include <qclipboard.h>
#include <qsplitter.h>
#include <qlayout.h>
#include <klocale.h>
#include <kdebug.h>
@ -51,8 +53,6 @@
#include "toplevel.h"
#include "bookmarkinfo.h"
CmdHistory* CmdHistory::s_self = 0;
CmdHistory::CmdHistory(KActionCollection *collection) : m_commandHistory(collection) {
@ -240,6 +240,28 @@ QString CurrentMgr::correctAddress(const QString &address) {
KEBApp *KEBApp::s_topLevel = 0;
#include <qlabel.h>
class BookmarkInfoWidget : public QWidget {
public:
BookmarkInfoWidget(QWidget * parent = 0, const char * name = 0)
: QWidget (parent, name) {
QBoxLayout *vbox = new QVBoxLayout(this);
QGridLayout *grid = new QGridLayout( vbox, 2, 2 );
m_title_le = new KLineEdit( this );
m_title_le->setText( m_title );
grid->addWidget( m_title_le, 0, 1 );
grid->addWidget( new QLabel( m_title_le, i18n( "Name:" ), this ), 0, 0 );
m_url_le = new KLineEdit( this );
m_url_le->setText( m_url );
grid->addWidget( m_url_le, 1, 1 );
grid->addWidget( new QLabel( m_url_le, i18n( "Location:" ), this ), 1, 0 );
}
KLineEdit *m_title_le, *m_url_le;
QString m_title, m_url;
};
KEBApp::KEBApp(const QString & bookmarksFile, bool readonly, const QString &address)
: KMainWindow(), m_dcopIface(0) {
@ -261,9 +283,9 @@ KEBApp::KEBApp(const QString & bookmarksFile, bool readonly, const QString &addr
ListView::self()->initListViews();
ListView::self()->setInitialAddress(address);
// BookmarkInfoWidget *bkinfo = new BookmarkInfoWidget(vsplitter);
BookmarkInfoWidget *bkinfo = new BookmarkInfoWidget(vsplitter);
vsplitter->setOrientation(QSplitter::Vertical);
vsplitter->setSizes(QValueList<int>() << h << 380 /*<< bkinfo->sizeHint().height()*/ );
vsplitter->setSizes(QValueList<int>() << h << 380 << bkinfo->sizeHint().height() );
setCentralWidget(vsplitter);
resize(ListView::self()->widget()->sizeHint().width(), vsplitter->sizeHint().height());