[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: KMainWindow Inteface updates
From:       Simon Hausmann <hausmann () kde ! org>
Date:       2001-10-25 16:52:50
[Download RAW message or body]

On Thu, Oct 25, 2001 at 12:36:35PM -0400, ian reinhart geiser wrote:
> // Get the window ID... this is very fun with xwd -id 
> 	int getWinID()

Just a suggestion, but it might make sense to stay consistent with
kdelibs/Qt and name this method winId().

> // Dump a screenshot of the current window to the clipboard
> 	void grabWindowToClipBoard()
> // Check to see if the window is hideing
> 	bool isHidden()
> // Hide the window
> 	void hide()
> // Check to see if the window is maximized
> 	bool isMaximized()
> // Maximize the window
> 	void maximize()
> // Check to see if the window is minimized
> 	bool isMinimized()
> // Minimize the window
> 	void minimize()
> // Get the width of the current window
> 	int width()
> // Get the height of the current window
> 	int height()
> // Resize the current window
> 	void resize(int newWidth,int newHeight)
> // Get the X position of the window
> 	int Xpos()
> // Get the Y position of the window
> 	int Ypos()

For consistency I suggest xPos and yPos. (or rather
QPoint pos() or (more elaborate) position() ).

> // Move the window to a new position
> 	void move(int newX,int newY)
> // Set the windows geometry
> 	void setGeometry(int newX,int newY,int newWidth,int newHeight)
> // Raise the windows focus
> 	void raise()
> // Lower the windows focus
> 	void lower()

Maybe a smarter way to avoid the ugly API duplication of QWidget for the
dcop interface would be to utilize the KDCOPPropertyProxy class in
kdecore which can map Qt properties to and from dcop requests. If
you compare the list of Qt properties of QWidget with the
methods/properties in your interface you'll see a lot of
duplication, which can be removed very easy :)


Simon

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic