summaryrefslogtreecommitdiffstats
path: root/tdeui/tests/kdocktest.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-06 15:56:40 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-06 15:56:40 -0600
commite16866e072f94410321d70daedbcb855ea878cac (patch)
treeee3f52eabde7da1a0e6ca845fb9c2813cf1558cf /tdeui/tests/kdocktest.cpp
parenta58c20c1a7593631a1b50213c805507ebc16adaf (diff)
downloadtdelibs-e16866e072f94410321d70daedbcb855ea878cac.tar.gz
tdelibs-e16866e072f94410321d70daedbcb855ea878cac.zip
Actually move the kde files that were renamed in the last commit
Diffstat (limited to 'tdeui/tests/kdocktest.cpp')
-rw-r--r--tdeui/tests/kdocktest.cpp65
1 files changed, 65 insertions, 0 deletions
diff --git a/tdeui/tests/kdocktest.cpp b/tdeui/tests/kdocktest.cpp
new file mode 100644
index 000000000..84895c414
--- /dev/null
+++ b/tdeui/tests/kdocktest.cpp
@@ -0,0 +1,65 @@
+#include "kdocktest.h"
+
+#include <kapplication.h>
+#include <kiconloader.h>
+
+#include <tqwidget.h>
+#include <tqstring.h>
+
+DockTest::DockTest( TQWidget* parent )
+ : KDockArea( parent )
+{
+ m_blueDock = createDockWidget( "Blue Widget", SmallIcon("mail") );
+ //m_blueDock->setDetachable( false );
+ m_blueDock->setEnableDocking( KDockWidget::DockFullSite );
+ KDockWidgetHeader *header = new KDockWidgetHeader( m_blueDock, "Blue Header" );
+ header->forceCloseButtonHidden();
+ m_blueDock->setHeader( header );
+ m_blueDock->setCaption( "Blue" );
+ m_blueDock->setGeometry( 50, 50, 100, 100 );
+ TQWidget *l = new TQWidget( m_blueDock );
+ l->setBackgroundColor( Qt::blue );
+ l->setMinimumSize( 100,100 );
+ m_blueDock->setWidget( l );
+
+ setMainDockWidget( m_blueDock );
+
+ m_redDock = createDockWidget( "Red Widget", SmallIcon("news") );
+ m_redDock->setEnableDocking( KDockWidget::DockFullSite );
+ //m_redDock->setDetachable( false );
+ header = new KDockWidgetHeader( m_redDock, "Red kHeader" );
+ m_redDock->setHeader( header );
+ m_redDock->setCaption( "Red" );
+ m_redDock->setGeometry( 50, 50, 100, 100 );
+ l = new TQWidget( m_redDock );
+ l->setBackgroundColor( Qt::red );
+ l->setMinimumSize( 100,100 );
+ m_redDock->setWidget( l );
+ m_redDock->manualDock( m_blueDock, KDockWidget::DockLeft, 3000 );
+
+ m_yellowDock = createDockWidget( "Yellow Widget", SmallIcon("web") );
+ m_yellowDock->setEnableDocking( KDockWidget::DockFullSite );
+ //m_yellowDock->setDetachable( false );
+// header = new KDockWidgetHeader( m_yellowDock, "Yellow Header" );
+ // m_yellowDock->setHeader( header );
+ m_yellowDock->setCaption( "Yellow" );
+ m_yellowDock->setGeometry( 50, 50, 100, 100 );
+ l = new TQWidget( m_yellowDock );
+ l->setBackgroundColor( Qt::yellow );
+ l->setMinimumSize( 100,100 );
+ m_yellowDock->setWidget( l );
+ m_yellowDock->manualDock( m_blueDock, KDockWidget::DockTop, 5000 );
+}
+
+int
+main( int argc, char** argv )
+{
+ KApplication a( argc,argv, "docktest" );
+ DockTest* ap = new DockTest();
+ ap->setCaption("DockWidget demo");
+ a.setMainWidget( ap );
+ ap->show();
+ return a.exec();
+}
+
+#include "kdocktest.moc"